cvs commit: ALFS/nALFS/src init.c

kpfleming at linuxfromscratch.org kpfleming at linuxfromscratch.org
Tue Nov 4 19:30:20 PST 2003


kpfleming    03/11/04 20:30:20

  Modified:    nALFS/src init.c
  Log:
  always report rcfile path for errors found during parsing
  report all failures found in an rcfile, not just the first one
  
  Revision  Changes    Path
  1.7       +6 -5      ALFS/nALFS/src/init.c
  
  Index: init.c
  ===================================================================
  RCS file: /home/cvsroot/ALFS/nALFS/src/init.c,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- init.c	5 Nov 2003 03:21:58 -0000	1.6
  +++ init.c	5 Nov 2003 03:30:20 -0000	1.7
  @@ -239,14 +239,15 @@
   			while ((c = getc(fp)) != EOF && c != '\n')
   				/* Skip in circle. */;
   
  -			fprintf(stderr, "Line %d too long, won't read it.\n",
  -								line_num);
  +			fprintf(stderr, "File %s:\nLine %d too long, won't read it.\n",
  +				rcfile, line_num);
   		}
   
  -		if ((ret = parse_rc_line(line)) != 0) {
  +		if (parse_rc_line(line) != 0) {
  +			ret = 1;
   			fprintf(stderr, 
  -				"Error at line %d: %s\n", line_num, line);
  -			break;
  +				"File %s:\nError at line %d: %s\n",
  +				rcfile, line_num, line);
   		}
   	}
   
  
  
  



More information about the alfs-log mailing list