=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/mg/extend.c,v retrieving revision 1.24 retrieving revision 1.25 diff -u -r1.24 -r1.25 --- src/usr.bin/mg/extend.c 2002/03/11 13:08:51 1.24 +++ src/usr.bin/mg/extend.c 2002/05/29 12:28:45 1.25 @@ -1,4 +1,4 @@ -/* $OpenBSD: extend.c,v 1.24 2002/03/11 13:08:51 vincent Exp $ */ +/* $OpenBSD: extend.c,v 1.25 2002/05/29 12:28:45 vincent Exp $ */ /* * Extended (M-X) commands, rebinding, and startup file processing. @@ -625,7 +625,7 @@ int load(const char *fname) { - int s = TRUE; + int s = TRUE, line; int nbytes = 0; char excbuf[128]; @@ -636,11 +636,13 @@ if (ffropen(fname, NULL) != FIOSUC) return FALSE; + line = 0; while ((s = ffgetline(excbuf, sizeof(excbuf) - 1, &nbytes)) == FIOSUC) { + line++; excbuf[nbytes] = '\0'; if (excline(excbuf) != TRUE) { s = FIOERR; - ewprintf("Error loading file %s", fname); + ewprintf("Error loading file %s at line %d", fname, line); break; } }