Skip to content
GitLab
Menu
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
516b3591
Commit
516b3591
authored
Feb 19, 1994
by
Per Cederqvist
Browse files
(assign_bool, configure_line): Use strcmp, not strcasecmp (which is
not portable).
parent
178a03ac
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/server/conf-file.c
View file @
516b3591
/*
* $Id: conf-file.c,v 1.
2
1994/0
1
/1
2
0
4:07:33
ceder Exp $
* $Id: conf-file.c,v 1.
3
1994/0
2
/1
9
0
3:41:51
ceder Exp $
* Copyright (C) 1994 Lysator Academic Computer Association.
*
* This file is part of the LysKOM server.
...
...
@@ -26,7 +26,7 @@
* Read configuration files.
*/
static
char
*
rcsid
=
"$Id: conf-file.c,v 1.
2
1994/0
1
/1
2
0
4:07:33
ceder Exp $"
;
static
char
*
rcsid
=
"$Id: conf-file.c,v 1.
3
1994/0
2
/1
9
0
3:41:51
ceder Exp $"
;
#include "rcs.h"
USE
(
rcsid
);
...
...
@@ -166,7 +166,7 @@ configure_line(FILE *fp,
found
=
0
;
for
(
ix
=
0
;
ix
<
npar
;
ix
++
)
{
if
(
!
strc
asec
mp
(
start
,
par
[
ix
].
name
))
if
(
!
strcmp
(
start
,
par
[
ix
].
name
))
{
found
++
;
if
(
assignment_count
[
ix
]
>
par
[
ix
].
max_assignments
...
...
@@ -268,15 +268,17 @@ assign_bool(const char *val,
const
struct
parameter
*
par
)
{
if
(
val
==
NULL
||!
strcasecmp
(
val
,
"false"
)
||
!
strcasecmp
(
val
,
"off"
)
||
!
strcasecmp
(
val
,
"0"
))
||!
strcmp
(
val
,
"false"
)
||
!
strcmp
(
val
,
"off"
)
||
!
strcmp
(
val
,
"no"
)
||
!
strcmp
(
val
,
"0"
))
{
*
(
Bool
*
)
par
->
value
=
FALSE
;
}
else
if
(
!
strcasecmp
(
val
,
"true"
)
||
!
strcasecmp
(
val
,
"on"
)
||
!
strcasecmp
(
val
,
"1"
))
else
if
(
!
strcmp
(
val
,
"true"
)
||
!
strcmp
(
val
,
"on"
)
||
!
strcmp
(
val
,
"yes"
)
||
!
strcmp
(
val
,
"1"
))
{
*
(
Bool
*
)
par
->
value
=
TRUE
;
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a 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