aboutsummaryrefslogtreecommitdiff
path: root/gnu/libexec/uucp/libuuconf/cmdlin.c
diff options
context:
space:
mode:
authorAndrey A. Chernov <ache@FreeBSD.org>1994-10-22 03:51:36 +0000
committerAndrey A. Chernov <ache@FreeBSD.org>1994-10-22 03:51:36 +0000
commit8961fb9fd424528c0a99d4fa34a995c6b466fa29 (patch)
treec2d5bb6b2cac0f7a66b7a3a9016f380c7036b5c5 /gnu/libexec/uucp/libuuconf/cmdlin.c
parent36df95144485cdc00ad23a3f484bad449307eb6a (diff)
Notes
Diffstat (limited to 'gnu/libexec/uucp/libuuconf/cmdlin.c')
-rw-r--r--gnu/libexec/uucp/libuuconf/cmdlin.c23
1 files changed, 13 insertions, 10 deletions
diff --git a/gnu/libexec/uucp/libuuconf/cmdlin.c b/gnu/libexec/uucp/libuuconf/cmdlin.c
index 6a7406fe0c1a..736dd0ca8b1b 100644
--- a/gnu/libexec/uucp/libuuconf/cmdlin.c
+++ b/gnu/libexec/uucp/libuuconf/cmdlin.c
@@ -26,7 +26,7 @@
#include "uucnfi.h"
#if USE_RCS_ID
-const char _uuconf_cmdlin_rcsid[] = "$Id: cmdlin.c,v 1.3 1994/01/30 21:14:29 ian Rel $";
+const char _uuconf_cmdlin_rcsid[] = "$Id: cmdlin.c,v 1.2 1994/05/07 18:12:04 ache Exp $";
#endif
#include <errno.h>
@@ -56,18 +56,21 @@ uuconf_cmd_line (pglobal, zline, qtab, pinfo, pfiunknown, iflags, pblock)
char **pzargs;
int iret;
- /* Any # not preceeded by a backslash starts a comment. */
- z = zline;
- while ((z = strchr (z, '#')) != NULL)
+ if ((iflags & UUCONF_CMDTABFLAG_NOCOMMENTS) == 0)
{
- if (z == zline || *(z - 1) != '\\')
+ /* Any # not preceeded by a backslash starts a comment. */
+ z = zline;
+ while ((z = strchr (z, '#')) != NULL)
{
- *z = '\0';
- break;
+ if (z == zline || *(z - 1) != '\\')
+ {
+ *z = '\0';
+ break;
+ }
+ /* Remove the backslash. */
+ while ((*(z - 1) = *z) != '\0')
+ ++z;
}
- /* Remove the backslash. */
- while ((*(z - 1) = *z) != '\0')
- ++z;
}
/* Parse the first CSTACK arguments by hand to avoid malloc. */