From 8961fb9fd424528c0a99d4fa34a995c6b466fa29 Mon Sep 17 00:00:00 2001 From: "Andrey A. Chernov" Date: Sat, 22 Oct 1994 03:51:36 +0000 Subject: Allow '#' in address in rmail arguments Obtained from: taylor-uucp list --- gnu/libexec/uucp/common_sources/uuconf.h | 4 ++++ gnu/libexec/uucp/libuuconf/cmdlin.c | 23 +++++++++++++---------- gnu/libexec/uucp/uuxqt/uuxqt.c | 6 ++++-- 3 files changed, 21 insertions(+), 12 deletions(-) (limited to 'gnu/libexec') diff --git a/gnu/libexec/uucp/common_sources/uuconf.h b/gnu/libexec/uucp/common_sources/uuconf.h index 1710568d499a..cb6dbb648c3e 100644 --- a/gnu/libexec/uucp/common_sources/uuconf.h +++ b/gnu/libexec/uucp/common_sources/uuconf.h @@ -1418,6 +1418,10 @@ struct uuconf_cmdtab /* If set, a backslash at the end of a line may be used to include the next physical line in the logical line. */ #define UUCONF_CMDTABFLAG_BACKSLASH (0x2) + +/* If set, the comment character (#) is treated as a normal character, + rather than as starting a comment. */ +#define UUCONF_CMDTABFLAG_NOCOMMENTS (0x4) #if UUCONF_ANSI_C 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 @@ -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. */ diff --git a/gnu/libexec/uucp/uuxqt/uuxqt.c b/gnu/libexec/uucp/uuxqt/uuxqt.c index 4d23cf1b6e86..890aa4326815 100644 --- a/gnu/libexec/uucp/uuxqt/uuxqt.c +++ b/gnu/libexec/uucp/uuxqt/uuxqt.c @@ -26,7 +26,7 @@ #include "uucp.h" #if USE_RCS_ID -const char uuxqt_rcsid[] = "$Id: uuxqt.c,v 1.76 1994/01/30 20:59:40 ian Rel $"; +const char uuxqt_rcsid[] = "$Id: uuxqt.c,v 1.2 1994/05/07 18:14:43 ache Exp $"; #endif #include @@ -742,7 +742,9 @@ uqdo_xqt_file (puuconf, zfile, zbase, qsys, zlocalname, zcmd, pfprocessed) iuuconf = uuconf_cmd_file (puuconf, e, asQcmds, (pointer) zbase, (uuconf_cmdtabfn) NULL, - UUCONF_CMDTABFLAG_CASE, (pointer) NULL); + (UUCONF_CMDTABFLAG_CASE + | UUCONF_CMDTABFLAG_NOCOMMENTS), + (pointer) NULL); (void) fclose (e); if (iuuconf != UUCONF_SUCCESS) -- cgit v1.3