Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Per Cederqvist
lyskom-server-ceder-1616-generations-topgit
Commits
2428c242
Commit
2428c242
authored
Dec 19, 1992
by
Per Cederqvist
Browse files
Some trivial bug-fixes.
parent
9d43e410
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/server/Makefile
View file @
2428c242
#
# $Id: Makefile,v 0.2
7
1992/12/19 0
0:32:36
ceder Exp $
# $Id: Makefile,v 0.2
8
1992/12/19 0
1:56:20
ceder Exp $
# Copyright (C) 1991 Lysator Academic Computer Association.
#
# This file is part of the LysKOM server.
...
...
@@ -22,7 +22,7 @@
#
# Please mail bug reports to bug-lyskom@lysator.liu.se.
#
# $Id: Makefile,v 0.2
7
1992/12/19 0
0:32:36
ceder Exp $
# $Id: Makefile,v 0.2
8
1992/12/19 0
1:56:20
ceder Exp $
include
Topdir.make
SCRIPTDIR
=
$(TOPDIR)
/scripts
...
...
@@ -41,7 +41,7 @@ HDRS = admin.h isc-parse.h prot-a-output.h async.h isc-interface.h \
LIBS
=
-lisc-new
$
(
PROFILE-LIB-SUFFIX
)
-lmisc
$
(
PROFILE-LIB-SUFFIX
)
\
-llyskom-server
$
(
PROFILE-LIB-SUFFIX
)
-lansi
$
(
PROFILE-LIB-SUFFIX
)
\
$(LIBRESOLV)
$(LIBIDENT)
$(LIBRESOLV)
$(LIBIDENT)
-lregex
TARGET
=
-DSERVER
...
...
src/server/regex-match.c
View file @
2428c242
/*
* $Id: regex-match.c,v 1.
1
1992/12/19 0
0:32:39
ceder Exp $
* $Id: regex-match.c,v 1.
2
1992/12/19 0
1:56:23
ceder Exp $
* Copyright (C) 1992 Lysator Academic Computer Association.
*
* This file is part of the LysKOM server.
...
...
@@ -27,7 +27,7 @@
* Regexp matching
*/
static
char
*
rcsid
=
"$Id: regex-match.c,v 1.
1
1992/12/19 0
0:32:39
ceder Exp $"
;
static
char
*
rcsid
=
"$Id: regex-match.c,v 1.
2
1992/12/19 0
1:56:23
ceder Exp $"
;
#include
<sys/types.h>
#include
<regex.h>
...
...
@@ -37,40 +37,50 @@ static char *rcsid = "$Id: regex-match.c,v 1.1 1992/12/19 00:32:39 ceder Exp $";
#include
"s-string.h"
#include
"s-collat-tabs.h"
#include
<services.h>
static
const
int
CHUNK
=
10
;
#include
<server/smalloc.h>
#include
"cache.h"
#include
"log.h"
#include
"manipulate.h"
#include
"com.h"
#include
"connections.h"
static
Success
lookup_regexp
(
const
String
regexp
,
Conf_no_list
*
result
,
Bool
ean
want_persons
)
Bool
want_persons
)
{
struct
re_pattern_buffer
pat_buf
;
Conf_no
conf
;
Small_conf
*
small
;
Conf_no
conf_no
;
String
name
=
EMPTY_STRING
;
char
*
errmsg
;
/* +++ Unnecessary to allocate this much if only one conference matches. */
result
->
conf_nos
=
tmp_alloc
(
cached_no_of_existing_conferences
()
*
sizeof
(
Conf_no
));
result
->
no_of_confs
=
0
;
re_syntax_options
=
RE_SYNTAX_GREP
;
pat_buf
.
translate
=
swedish_collate_tab
;
pat_buf
.
fastmap
=
1
;
pat_buf
.
translate
=
NULL
;
pat_buf
.
fastmap
=
0
;
pat_buf
.
allocated
=
0
;
pat_buf
.
buffer
=
0
;
if
(
re_compile_pattern
(
regexp
.
string
,
s_strlen
(
regexp
),
pat_buf
))
if
(
errmsg
=
re_compile_pattern
(
regexp
.
string
,
s_strlen
(
regexp
),
&
pat_buf
))
{
regfree
(
&
pat_buf
);
kom_errno
=
KOM_REGEX_ERROR
;
return
FAILURE
;
}
for
(
conf_no
=
0
;
(
conf_no
=
traverse_conference
(
conf_no
))
!=
0
;)
{
if
(
cached_get_conf_type
(
conf_no
).
letter_box
==
want_persons
)
if
(
cached_get_conf_type
(
conf_no
).
letter_box
==
want_persons
&&
fast_access_perm
(
conf_no
,
ACTPERS
,
ACT_P
)
>
none
)
{
name
=
cached_get_
conf_
name
(
conf_no
);
switch
(
re_search
(
pat_buf
,
name
.
string
,
s_strlen
(
name
),
0
,
name
=
cached_get_name
(
conf_no
);
switch
(
re_search
(
&
pat_buf
,
name
.
string
,
s_strlen
(
name
),
0
,
s_strlen
(
name
),
NULL
)
)
{
case
-
1
:
...
...
@@ -86,7 +96,9 @@ lookup_regexp (const String regexp,
}
}
return
SUCCESS
;
regfree
(
&
pat_buf
);
return
OK
;
}
Success
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment