diff options
author | bde <bde@FreeBSD.org> | 1998-04-23 16:37:06 +0000 |
---|---|---|
committer | bde <bde@FreeBSD.org> | 1998-04-23 16:37:06 +0000 |
commit | 6cfa12f63a92607898a1d433ec48fef8dbf933a4 (patch) | |
tree | b4c5e299417ebdb7b74f6996b98dd8222ee91c88 /usr.sbin/config | |
parent | 6adf1d592649ad55584a0b61bdfa6ef21460ff86 (diff) | |
download | FreeBSD-src-6cfa12f63a92607898a1d433ec48fef8dbf933a4.zip FreeBSD-src-6cfa12f63a92607898a1d433ec48fef8dbf933a4.tar.gz |
Don't generate code with syntax errors (hard newlines in string constants
in config.c).
Diffstat (limited to 'usr.sbin/config')
-rw-r--r-- | usr.sbin/config/main.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/usr.sbin/config/main.c b/usr.sbin/config/main.c index a87e85f..008821a 100644 --- a/usr.sbin/config/main.c +++ b/usr.sbin/config/main.c @@ -42,7 +42,7 @@ static const char copyright[] = static char sccsid[] = "@(#)main.c 8.1 (Berkeley) 6/6/93"; #endif static const char rcsid[] = - "$Id: main.c,v 1.21 1998/02/19 00:45:33 eivind Exp $"; + "$Id: main.c,v 1.22 1998/03/16 11:19:10 eivind Exp $"; #endif /* not lint */ #include <sys/types.h> @@ -353,11 +353,11 @@ configfile() err(2, "%s", p); fprintf(fo,"#include \"opt_config.h\"\n"); fprintf(fo,"#ifdef INCLUDE_CONFIG_FILE \n"); - fprintf(fo,"static char *config = \"\n"); - fprintf(fo,"START CONFIG FILE %s\n___",PREFIX); + fprintf(fo,"static char *config = \"\\\n"); + fprintf(fo,"START CONFIG FILE %s\\n\\\n___",PREFIX); while (EOF != (i=getc(fi))) { if(i == '\n') { - fprintf(fo,"\n___"); + fprintf(fo,"\\n\\\n___"); } else if(i == '\"') { fprintf(fo,"\\\""); } else if(i == '\\') { @@ -366,7 +366,7 @@ configfile() putc(i,fo); } } - fprintf(fo,"\nEND CONFIG FILE %s\n",PREFIX); + fprintf(fo,"\\n\\\nEND CONFIG FILE %s\\n\\\n",PREFIX); fprintf(fo,"\";\n"); fprintf(fo,"\n#endif /* INCLUDE_CONFIG_FILE */\n"); fclose(fi); |