[Pkg-wmaker-commits] [wmbiff] 35/38: handle comments the way I meant to...
Doug Torrance
dtorrance-guest at moszumanska.debian.org
Thu Aug 20 03:03:42 UTC 2015
This is an automated email from the git hooks/post-receive script.
dtorrance-guest pushed a commit to tag wmbiff_0_4_16
in repository wmbiff.
commit dc82439b261443fac91ed57e64f5dbab5dad21b0
Author: bluehal <bluehal>
Date: Fri Jul 4 21:42:35 2003 +0000
handle comments the way I meant to...
---
wmbiff/wmbiff.c | 13 ++++++++-----
1 file changed, 8 insertions(+), 5 deletions(-)
diff --git a/wmbiff/wmbiff.c b/wmbiff/wmbiff.c
index cd95265..c679338 100644
--- a/wmbiff/wmbiff.c
+++ b/wmbiff/wmbiff.c
@@ -1,4 +1,4 @@
-/* $Id: wmbiff.c,v 1.57 2003/07/03 01:03:27 bluehal Exp $ */
+/* $Id: wmbiff.c,v 1.58 2003/07/04 21:42:35 bluehal Exp $ */
#ifdef HAVE_CONFIG_H
#include <config.h>
@@ -160,10 +160,13 @@ static int ReadLine(FILE * fp, /*@out@ */ char *setting,
if (buf[len - 1] == '\n') {
buf[len - 1] = '\0'; /* strip linefeed */
}
- for (p = (char *) buf; *p != '#' && *p; p++);
- if (p == buf || isspace(*(p - 1))) {
- /* Strip comments at beginning of line, or after whitespace.
- a kludgy way of avoiding problems with #'s in passwords. */
+ /* Strip comments at beginning of line, or after whitespace.
+ a kludgy way of avoiding problems with #'s in passwords. */
+ if (buf[0] == '#')
+ buf[0] = '\0';
+ for (p = (char *) buf + 1; *p && !(*p == '#' && isspace(*(p - 1)));
+ p++);
+ if (*p) {
*p = '\0';
}
if (!(p = strtok(buf, "=")))
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-wmaker/wmbiff.git
More information about the Pkg-wmaker-commits
mailing list