dolf@uva.UUCP (Dolf Starreveld) (08/20/84)
There was a bug in the vi startup program I posted to the net a week ago. It caused the program to behave incorrectly when it was called with option arguments as in: vi +100 junk.c I corrected the bug and a diff-listing follows. Also I changed to program not to stop with a fatal error condition if the format of the ".virc" file is incorrect. Now the incorrect line is skipped with a warning. Dolf Starreveld Computer Science Department University of Amsterdam The Netherlands {philabs, decvax}!mcvax!uva!dolf ---------------- diff <new> <old> -------------------- 71,72c71 < while (--argc && option(*argv[0])) /* Skip all options */ < argv++; --- > while (--argc && option(*argv[0])) ; /* Skip all options */ 144,148c143,144 < if (pip == NULL) { < diag("Illegal format of %s file: line %d\n", < SOURCE, nr + 1); < continue; < } --- > if (pip == NULL) > fatal("Illegal format of %s file\n", SOURCE); 152,156c148,149 < if (pip == NULL) { < diag("Illegal format of %s file: line %d\n", < SOURCE, nr + 1); < continue; < } --- > if (pip == NULL) > fatal("Illegal format of %s file\n", SOURCE); 160,164c153,154 < if (pip == NULL) { < diag("Illegal format of %s file: line %d\n", < SOURCE, nr + 1); < continue; < } --- > if (pip == NULL) > fatal("Illegal format of %s file\n", SOURCE); 196,197c186,187 < diag (s1, a1, a2, a3, a4) < int *s1, *a1, *a2, *a3, *a4; --- > fatal (s1, s2, s3, s4) > int *s1, *s2, *s3, *s4; 200c190 < fprintf (stderr, s1, a1, a2, a3, a4); --- > fprintf (stderr, s1, s2, s3, s4); 202,209c192 < } < < < fatal (s1, a1, a2, a3, a4) < int *s1, *a1, *a2, *a3, *a4; < { < diag (s1, a1, a2, a3, a4); < exit (-1); --- > exit (1);