Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.1 6/24/83 (MC830713); site uva.UUCP Path: utzoo!linus!philabs!mcvax!uva!dolf From: dolf@uva.UUCP (Dolf Starreveld) Newsgroups: net.sources Subject: Correction to vistartup program Message-ID: <135@uva.UUCP> Date: Mon, 20-Aug-84 11:39:58 EDT Article-I.D.: uva.135 Posted: Mon Aug 20 11:39:58 1984 Date-Received: Tue, 21-Aug-84 05:26:09 EDT Organization: Comp. Science Dept., University of Amsterdam Lines: 73 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 -------------------- 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);