diff options
author | Keith Vetter <keithv@fusion.com> | 1995-05-26 23:49:02 +0000 |
---|---|---|
committer | Keith Vetter <keithv@fusion.com> | 1995-05-26 23:49:02 +0000 |
commit | 0f30c97b9cb1a1e0d8437d65ff557116346b6a50 (patch) | |
tree | 20b2baf874ca25b30579bfbd4d7bd602824b580c /src/wconfig.c | |
parent | 7b506824f7df591fb264fe888ce57cfeedad6e38 (diff) | |
download | krb5-0f30c97b9cb1a1e0d8437d65ff557116346b6a50.zip krb5-0f30c97b9cb1a1e0d8437d65ff557116346b6a50.tar.gz krb5-0f30c97b9cb1a1e0d8437d65ff557116346b6a50.tar.bz2 |
Windows makefile file configuration excludes lines beginning with '@'
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@5902 dc483132-0cff-0310-8789-dd5450dbe970
Diffstat (limited to 'src/wconfig.c')
-rw-r--r-- | src/wconfig.c | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/src/wconfig.c b/src/wconfig.c index cd78293..9081f1d 100644 --- a/src/wconfig.c +++ b/src/wconfig.c @@ -27,24 +27,23 @@ * first 5 characters of the line. This will allow lines like: * ##DOS!include windows.in to become: !include windows.in * + * We also turn any line beginning with '@' into a blank line. + * * If a config directory is specified, then the output will be start with * config\pre.in, then the filtered stdin text, and will end with * config\post.in. * - * Syntax: wconfig [<config directory>] <input >output + * Syntax: wconfig [config_directory] <input_file >output_file * */ - #include <stdio.h> -static char buf [1024]; +#include <string.h> + +static char buf [1024]; /* Holds line from a file */ static int copy_file (char *path, char *fname); -int main(argc, argv) - int argc; - char *argv[]; -{ - int l; - char *ptr; +int main(int argc, char *argv[]) { + char *ptr; /* For parsing the input */ if (argc == 2) /* Config directory given */ copy_file (argv[1], "\\pre.in"); /* Send out prefix */ @@ -52,6 +51,9 @@ int main(argc, argv) while ((ptr = gets(buf)) != NULL) { /* Filter stdin */ if (memcmp ("##DOS", buf, 5) == 0) ptr += 5; + else if (*ptr == '@') /* Lines starting w/ '@'... */ + *ptr = '\0'; /* ...turn into blank lines */ + puts (ptr); } |