Commit 516b3591 authored by Per Cederqvist's avatar Per Cederqvist
Browse files

(assign_bool, configure_line): Use strcmp, not strcasecmp (which is

not portable).
parent 178a03ac
/*
* $Id: conf-file.c,v 1.2 1994/01/12 04:07:33 ceder Exp $
* $Id: conf-file.c,v 1.3 1994/02/19 03: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/01/12 04:07:33 ceder Exp $";
static char *rcsid = "$Id: conf-file.c,v 1.3 1994/02/19 03: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 (!strcasecmp(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;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment