diff options
author | jkh <jkh@FreeBSD.org> | 1998-12-04 06:49:20 +0000 |
---|---|---|
committer | jkh <jkh@FreeBSD.org> | 1998-12-04 06:49:20 +0000 |
commit | 20107e8f4764aa3175f409771cda14a671f81324 (patch) | |
tree | 60b14453bcd79710ed994636168fac4b679e1bc0 /usr.sbin/syslogd/syslogd.c | |
parent | 7da0628e5519c77b2818b30342209fc1fc878815 (diff) | |
download | FreeBSD-src-20107e8f4764aa3175f409771cda14a671f81324.zip FreeBSD-src-20107e8f4764aa3175f409771cda14a671f81324.tar.gz |
Allow either tabs or spaces in configuration files.
PR: 8762
Submitted by: Igor Roshchin <str@giganda.komkon.org>
Diffstat (limited to 'usr.sbin/syslogd/syslogd.c')
-rw-r--r-- | usr.sbin/syslogd/syslogd.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/usr.sbin/syslogd/syslogd.c b/usr.sbin/syslogd/syslogd.c index 66d33c3..685adaf 100644 --- a/usr.sbin/syslogd/syslogd.c +++ b/usr.sbin/syslogd/syslogd.c @@ -42,7 +42,7 @@ static const char copyright[] = static char sccsid[] = "@(#)syslogd.c 8.3 (Berkeley) 4/4/94"; #endif static const char rcsid[] = - "$Id: syslogd.c,v 1.41 1998/08/25 21:16:47 julian Exp $"; + "$Id: syslogd.c,v 1.42 1998/11/05 10:51:21 dg Exp $"; #endif /* not lint */ /* @@ -1366,12 +1366,12 @@ cfline(line, f, prog) } /* scan through the list of selectors */ - for (p = line; *p && *p != '\t';) { + for (p = line; *p && *p != '\t' && *p != ' ';) { int pri_done; int pri_cmp; /* find the end of this facility name list */ - for (q = p; *q && *q != '\t' && *q++ != '.'; ) + for (q = p; *q && *q != '\t' && *q != ' ' && *q++ != '.'; ) continue; /* get the priority comparison */ @@ -1403,12 +1403,12 @@ cfline(line, f, prog) ; /* collect priority name */ - for (bp = buf; *q && !strchr("\t,;", *q); ) + for (bp = buf; *q && !strchr("\t,; ", *q); ) *bp++ = *q++; *bp = '\0'; /* skip cruft */ - while (strchr(", ;", *q)) + while (strchr(",;", *q)) q++; /* decode priority name */ @@ -1425,8 +1425,8 @@ cfline(line, f, prog) } /* scan facilities */ - while (*p && !strchr("\t.;", *p)) { - for (bp = buf; *p && !strchr("\t,;.", *p); ) + while (*p && !strchr("\t.; ", *p)) { + for (bp = buf; *p && !strchr("\t,;. ", *p); ) *bp++ = *p++; *bp = '\0'; @@ -1455,7 +1455,7 @@ cfline(line, f, prog) } /* skip to action part */ - while (*p == '\t') + while (*p == '\t' || *p == ' ') p++; switch (*p) |