Allow '#' in address in rmail arguments

Obtained from: taylor-uucp list
This commit is contained in:
Andrey A. Chernov 1994-10-22 03:51:36 +00:00
parent 36df951444
commit 8961fb9fd4
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=3773
3 changed files with 21 additions and 12 deletions

View File

@ -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

View File

@ -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. */

View File

@ -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 <errno.h>
@ -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)