lineno = skip = 0;
while (!feof(in)) {
- if( fscanf(in, "%[^\n]\n", line) != 1) break;
+ if( !fgets(line, sizeof(line), in)) break;
+ if( (s=strchr(line, '\n')) ) *s = '\0';
lineno++;
/*
(void) memset((char *) compexs, 0, sizeof(unsigned long) << 11);
while (!feof(in)) {
- if( fscanf(in, "%[^\n]\n", line) != 1) break;
+ if( !fgets(line, sizeof(line), in)) break;
+ if( (s=strchr(line, '\n')) ) *s = '\0';
/*
* Skip blank lines and lines that start with a '#'.
*/
FILE *in;
char *prog, *opath;
- if ((prog = strrchr(argv[0], *LDAP_DIRSEP)) != 0)
- prog++;
- else
- prog = argv[0];
+ prog = lutil_progname( "ucgendat", argc, argv );
opath = 0;
in = stdin;