From wlbr!news Wed Sep 11 05:13:48 PDT 1991 Article: 313 of comp.bugs.2bsd Newsgroups: comp.bugs.2bsd Path: wlbr!news From: sms@wlv.imsd.contel.com (Steven M. Schultz) Subject: 'vi' macro arena too small Message-ID: <1991Sep11.121059.16684@wlbr.imsd.contel.com> Sender: news@wlbr.imsd.contel.com (news) Nntp-Posting-Host: wlv.imsd.contel.com Organization: Contel Federal Systems Date: Wed, 11 Sep 91 12:10:59 GMT Subject: 'vi' macro arena too small Index: ucb/ex 2.11BSD Description: The buffer declared for macros is only 512 bytes long (versus 2048 for larger machines). The number of macros is also low, being set at 32. Repeat-By: Have more than just a few macros (can be as few as 3 or 4 if they are not small) defined in .exrc. Fix: Apply the patch inlcuded below, recompile and install 'vi'. The patch below saves over 1200 bytes of D-space by ifdef'ing out the sccs strings. This is enough space to increase the macro buffer to 1536 bytes and the number of macros to 48 without an overall increase in size of 'vi'. ------------------------------------------------------------------------------ *** bcopy.c.old Tue Feb 17 01:07:24 1987 --- bcopy.c Sun Sep 8 14:56:55 1991 *************** *** 4,12 **** * specifies the terms and conditions for redistribution. */ ! #ifndef lint static char *sccsid = "@(#)bcopy.c 7.3 (Berkeley) 6/7/85"; ! #endif not lint /* block copy from from to to, count bytes */ bcopy(from, to, count) --- 4,12 ---- * specifies the terms and conditions for redistribution. */ ! #if !defined(lint) && defined(DOSCCS) static char *sccsid = "@(#)bcopy.c 7.3 (Berkeley) 6/7/85"; ! #endif /* block copy from from to to, count bytes */ bcopy(from, to, count) *** ex.c.old Tue Feb 17 01:07:24 1987 --- ex.c Sun Sep 8 14:57:27 1991 *************** *** 4,16 **** * specifies the terms and conditions for redistribution. */ ! #ifndef lint char *copyright = "@(#) Copyright (c) 1980 Regents of the University of California.\n\ All rights reserved.\n"; - #endif not lint - #ifndef lint static char *sccsid = "@(#)ex.c 7.5.1.1 (Berkeley) 8/12/86"; #endif not lint --- 4,14 ---- * specifies the terms and conditions for redistribution. */ ! #if !defined(lint) && defined(DOSCCS) char *copyright = "@(#) Copyright (c) 1980 Regents of the University of California.\n\ All rights reserved.\n"; static char *sccsid = "@(#)ex.c 7.5.1.1 (Berkeley) 8/12/86"; #endif not lint *** ex_addr.c.old Tue Feb 17 01:07:24 1987 --- ex_addr.c Sun Sep 8 14:57:42 1991 *************** *** 4,10 **** * specifies the terms and conditions for redistribution. */ ! #ifndef lint static char *sccsid = "@(#)ex_addr.c 7.3 (Berkeley) 6/7/85"; #endif not lint --- 4,10 ---- * specifies the terms and conditions for redistribution. */ ! #if !defined(lint) && defined(DOSCCS) static char *sccsid = "@(#)ex_addr.c 7.3 (Berkeley) 6/7/85"; #endif not lint *** ex_cmds.c.old Tue Feb 17 01:07:24 1987 --- ex_cmds.c Sun Sep 8 14:58:02 1991 *************** *** 4,12 **** * specifies the terms and conditions for redistribution. */ ! #ifndef lint static char *sccsid = "@(#)ex_cmds.c 7.10 (Berkeley) 6/7/85"; ! #endif not lint #include "ex.h" #include "ex_argv.h" --- 4,12 ---- * specifies the terms and conditions for redistribution. */ ! #if !defined(lint) && defined(DOSCCS) static char *sccsid = "@(#)ex_cmds.c 7.10 (Berkeley) 6/7/85"; ! #endif #include "ex.h" #include "ex_argv.h" *** ex_cmds2.c.old Tue Feb 17 01:07:25 1987 --- ex_cmds2.c Sun Sep 8 14:58:20 1991 *************** *** 4,12 **** * specifies the terms and conditions for redistribution. */ ! #ifndef lint static char *sccsid = "@(#)ex_cmds2.c 7.4 (Berkeley) 6/7/85"; ! #endif not lint #include "ex.h" #include "ex_argv.h" --- 4,12 ---- * specifies the terms and conditions for redistribution. */ ! #if !defined(lint) && defined(DOSCCS) static char *sccsid = "@(#)ex_cmds2.c 7.4 (Berkeley) 6/7/85"; ! #endif #include "ex.h" #include "ex_argv.h" *** ex_cmdsub.c.old Tue Feb 17 01:07:25 1987 --- ex_cmdsub.c Sun Sep 8 14:58:39 1991 *************** *** 4,12 **** * specifies the terms and conditions for redistribution. */ ! #ifndef lint static char *sccsid = "@(#)ex_cmdsub.c 7.7 (Berkeley) 6/7/85"; ! #endif not lint #include "ex.h" #include "ex_argv.h" --- 4,12 ---- * specifies the terms and conditions for redistribution. */ ! #if !defined(lint) && defined(DOSCCS) static char *sccsid = "@(#)ex_cmdsub.c 7.7 (Berkeley) 6/7/85"; ! #endif #include "ex.h" #include "ex_argv.h" *** ex_data.c.old Tue Feb 17 01:07:25 1987 --- ex_data.c Sun Sep 8 14:58:54 1991 *************** *** 4,12 **** * specifies the terms and conditions for redistribution. */ ! #ifndef lint static char *sccsid = "@(#)ex_data.c 7.5 (Berkeley) 8/29/85"; ! #endif not lint #include "ex.h" #include "ex_tty.h" --- 4,12 ---- * specifies the terms and conditions for redistribution. */ ! #if !defined(lint) && defined(DOSCCS) static char *sccsid = "@(#)ex_data.c 7.5 (Berkeley) 8/29/85"; ! #endif #include "ex.h" #include "ex_tty.h" *** ex_extern.c.old Tue Feb 17 01:07:25 1987 --- ex_extern.c Sun Sep 8 14:59:09 1991 *************** *** 4,12 **** * specifies the terms and conditions for redistribution. */ ! #ifndef lint static char *sccsid = "@(#)ex_extern.c 7.4 (Berkeley) 6/7/85"; ! #endif not lint /* * Provide defs of the global variables. --- 4,12 ---- * specifies the terms and conditions for redistribution. */ ! #if !defined(lint) && defined(DOSCCS) static char *sccsid = "@(#)ex_extern.c 7.4 (Berkeley) 6/7/85"; ! #endif /* * Provide defs of the global variables. *** ex_get.c.old Tue Feb 17 01:07:26 1987 --- ex_get.c Sun Sep 8 14:59:26 1991 *************** *** 4,12 **** * specifies the terms and conditions for redistribution. */ ! #ifndef lint static char *sccsid = "@(#)ex_get.c 7.6 (Berkeley) 6/7/85"; ! #endif not lint #include "ex.h" #include "ex_tty.h" --- 4,12 ---- * specifies the terms and conditions for redistribution. */ ! #if !defined(lint) && defined(DOSCCS) static char *sccsid = "@(#)ex_get.c 7.6 (Berkeley) 6/7/85"; ! #endif #include "ex.h" #include "ex_tty.h" *** ex_io.c.old Tue Feb 17 01:07:26 1987 --- ex_io.c Sun Sep 8 14:59:44 1991 *************** *** 4,12 **** * specifies the terms and conditions for redistribution. */ ! #ifndef lint static char *sccsid = "@(#)ex_io.c 7.11.1.1 (Berkeley) 8/12/86"; ! #endif not lint #include "ex.h" #include "ex_argv.h" --- 4,12 ---- * specifies the terms and conditions for redistribution. */ ! #if !defined(lint) && defined(DOSCCS) static char *sccsid = "@(#)ex_io.c 7.11.1.1 (Berkeley) 8/12/86"; ! #endif #include "ex.h" #include "ex_argv.h" *** ex_put.c.old Tue Feb 17 01:07:27 1987 --- ex_put.c Sun Sep 8 15:00:02 1991 *************** *** 4,12 **** * specifies the terms and conditions for redistribution. */ ! #ifndef lint static char *sccsid = "@(#)ex_put.c 7.9 (Berkeley) 6/7/85"; ! #endif not lint #include "ex.h" #include "ex_tty.h" --- 4,12 ---- * specifies the terms and conditions for redistribution. */ ! #if !defined(lint) && defined(DOSCCS) static char *sccsid = "@(#)ex_put.c 7.9 (Berkeley) 6/7/85"; ! #endif #include "ex.h" #include "ex_tty.h" *** ex_re.c.old Sat Mar 14 17:51:00 1987 --- ex_re.c Sun Sep 8 15:00:20 1991 *************** *** 4,12 **** * specifies the terms and conditions for redistribution. */ ! #ifndef lint static char *sccsid = "@(#)ex_re.c 7.5 (Berkeley) 6/7/85"; ! #endif not lint #include "ex.h" #include "ex_re.h" --- 4,12 ---- * specifies the terms and conditions for redistribution. */ ! #if !defined(lint) && defined(DOSCCS) static char *sccsid = "@(#)ex_re.c 7.5 (Berkeley) 6/7/85"; ! #endif #include "ex.h" #include "ex_re.h" *** ex_set.c.old Tue Feb 17 01:07:28 1987 --- ex_set.c Sun Sep 8 15:00:35 1991 *************** *** 4,12 **** * specifies the terms and conditions for redistribution. */ ! #ifndef lint static char *sccsid = "@(#)ex_set.c 7.4 (Berkeley) 6/7/85"; ! #endif not lint #include "ex.h" #include "ex_temp.h" --- 4,12 ---- * specifies the terms and conditions for redistribution. */ ! #if !defined(lint) && defined(DOSCCS) static char *sccsid = "@(#)ex_set.c 7.4 (Berkeley) 6/7/85"; ! #endif #include "ex.h" #include "ex_temp.h" *** ex_subr.c.old Sat Mar 14 17:52:40 1987 --- ex_subr.c Sun Sep 8 15:00:56 1991 *************** *** 4,12 **** * specifies the terms and conditions for redistribution. */ ! #ifndef lint static char *sccsid = "@(#)ex_subr.c 7.10 (Berkeley) 6/7/85"; ! #endif not lint #include "ex.h" #include "ex_re.h" --- 4,12 ---- * specifies the terms and conditions for redistribution. */ ! #if !defined(lint) && defined(DOSCCS) static char *sccsid = "@(#)ex_subr.c 7.10 (Berkeley) 6/7/85"; ! #endif #include "ex.h" #include "ex_re.h" *** ex_tagio.c.old Wed Feb 18 03:28:35 1987 --- ex_tagio.c Sun Sep 8 15:01:39 1991 *************** *** 8,14 **** */ #ifdef FASTTAG ! #ifndef lint static char *sccsid = "@(#)ex_tagio.c 7.3 (Berkeley) 1/31/86"; #endif --- 8,14 ---- */ #ifdef FASTTAG ! #if !defined(lint) && defined(DOSCCS) static char *sccsid = "@(#)ex_tagio.c 7.3 (Berkeley) 1/31/86"; #endif *** ex_temp.c.old Tue Feb 17 01:07:29 1987 --- ex_temp.c Sun Sep 8 15:01:56 1991 *************** *** 4,12 **** * specifies the terms and conditions for redistribution. */ ! #ifndef lint static char *sccsid = "@(#)ex_temp.c 7.5.1.1 (Berkeley) 8/12/86"; ! #endif not lint #include "ex.h" #include "ex_temp.h" --- 4,12 ---- * specifies the terms and conditions for redistribution. */ ! #if !defined(lint) && defined(DOSCCS) static char *sccsid = "@(#)ex_temp.c 7.5.1.1 (Berkeley) 8/12/86"; ! #endif #include "ex.h" #include "ex_temp.h" *** ex_tty.c.old Tue Feb 17 01:07:30 1987 --- ex_tty.c Sun Sep 8 15:02:11 1991 *************** *** 4,12 **** * specifies the terms and conditions for redistribution. */ ! #ifndef lint static char *sccsid = "@(#)ex_tty.c 7.10 (Berkeley) 6/7/85"; ! #endif not lint #include "ex.h" #include "ex_tty.h" --- 4,12 ---- * specifies the terms and conditions for redistribution. */ ! #if !defined(lint) && defined(DOSCCS) static char *sccsid = "@(#)ex_tty.c 7.10 (Berkeley) 6/7/85"; ! #endif #include "ex.h" #include "ex_tty.h" *** ex_tty.h.old Tue Feb 17 01:07:31 1987 --- ex_tty.h Sun Sep 8 15:45:55 1991 *************** *** 172,179 **** # define MAXNOMACS 128 /* max number of macros of each kind */ # define MAXCHARMACS 2048 /* max # of chars total in macros */ #else ! # define MAXNOMACS 32 /* max number of macros of each kind */ ! # define MAXCHARMACS 512 /* max # of chars total in macros */ #endif struct maps { char *cap; /* pressing button that sends this.. */ --- 172,179 ---- # define MAXNOMACS 128 /* max number of macros of each kind */ # define MAXCHARMACS 2048 /* max # of chars total in macros */ #else ! # define MAXNOMACS 48 /* max number of macros of each kind */ ! # define MAXCHARMACS 1536 /* max # of chars total in macros */ #endif struct maps { char *cap; /* pressing button that sends this.. */ *** ex_unix.c.old Tue Feb 17 01:07:30 1987 --- ex_unix.c Sun Sep 8 15:02:27 1991 *************** *** 4,12 **** * specifies the terms and conditions for redistribution. */ ! #ifndef lint static char *sccsid = "@(#)ex_unix.c 7.6 (Berkeley) 10/22/85"; ! #endif not lint #include "ex.h" #include "ex_temp.h" --- 4,12 ---- * specifies the terms and conditions for redistribution. */ ! #if !defined(lint) && defined(DOSCCS) static char *sccsid = "@(#)ex_unix.c 7.6 (Berkeley) 10/22/85"; ! #endif #include "ex.h" #include "ex_temp.h" *** ex_v.c.old Tue Feb 17 01:07:29 1987 --- ex_v.c Sun Sep 8 15:02:43 1991 *************** *** 4,12 **** * specifies the terms and conditions for redistribution. */ ! #ifndef lint static char *sccsid = "@(#)ex_v.c 7.8 (Berkeley) 6/7/85"; ! #endif not lint #include "ex.h" #include "ex_re.h" --- 4,12 ---- * specifies the terms and conditions for redistribution. */ ! #if !defined(lint) && defined(DOSCCS) static char *sccsid = "@(#)ex_v.c 7.8 (Berkeley) 6/7/85"; ! #endif #include "ex.h" #include "ex_re.h" *** ex_vadj.c.old Tue Feb 17 01:07:30 1987 --- ex_vadj.c Sun Sep 8 15:03:00 1991 *************** *** 4,12 **** * specifies the terms and conditions for redistribution. */ ! #ifndef lint static char *sccsid = "@(#)ex_vadj.c 7.9 (Berkeley) 6/7/85"; ! #endif not lint #include "ex.h" #include "ex_tty.h" --- 4,12 ---- * specifies the terms and conditions for redistribution. */ ! #if !defined(lint) && defined(DOSCCS) static char *sccsid = "@(#)ex_vadj.c 7.9 (Berkeley) 6/7/85"; ! #endif #include "ex.h" #include "ex_tty.h" *** ex_vget.c.old Tue Feb 17 01:07:33 1987 --- ex_vget.c Sun Sep 8 15:03:16 1991 *************** *** 4,12 **** * specifies the terms and conditions for redistribution. */ ! #ifndef lint static char *sccsid = "@(#)ex_vget.c 6.8 (Berkeley) 6/7/85"; ! #endif not lint #include "ex.h" #include "ex_tty.h" --- 4,12 ---- * specifies the terms and conditions for redistribution. */ ! #if !defined(lint) && defined(DOSCCS) static char *sccsid = "@(#)ex_vget.c 6.8 (Berkeley) 6/7/85"; ! #endif #include "ex.h" #include "ex_tty.h" *** ex_vmain.c.old Tue Feb 17 01:07:33 1987 --- ex_vmain.c Sun Sep 8 15:03:35 1991 *************** *** 4,12 **** * specifies the terms and conditions for redistribution. */ ! #ifndef lint static char *sccsid = "@(#)ex_vmain.c 7.7 (Berkeley) 6/7/85"; ! #endif not lint #include "ex.h" #include "ex_tty.h" --- 4,12 ---- * specifies the terms and conditions for redistribution. */ ! #if !defined(lint) && defined(DOSCCS) static char *sccsid = "@(#)ex_vmain.c 7.7 (Berkeley) 6/7/85"; ! #endif #include "ex.h" #include "ex_tty.h" *** ex_voper.c.old Tue Feb 17 01:07:33 1987 --- ex_voper.c Sun Sep 8 15:03:53 1991 *************** *** 4,12 **** * specifies the terms and conditions for redistribution. */ ! #ifndef lint static char *sccsid = "@(#)ex_voper.c 7.4 (Berkeley) 6/7/85"; ! #endif not lint #include "ex.h" #include "ex_tty.h" --- 4,12 ---- * specifies the terms and conditions for redistribution. */ ! #if !defined(lint) && defined(DOSCCS) static char *sccsid = "@(#)ex_voper.c 7.4 (Berkeley) 6/7/85"; ! #endif #include "ex.h" #include "ex_tty.h" *** ex_vops.c.old Wed Feb 18 03:52:07 1987 --- ex_vops.c Sun Sep 8 15:04:10 1991 *************** *** 4,12 **** * specifies the terms and conditions for redistribution. */ ! #ifndef lint static char *sccsid = "@(#)ex_vops.c 7.7 (Berkeley) 6/7/85"; ! #endif not lint #include "ex.h" #include "ex_tty.h" --- 4,12 ---- * specifies the terms and conditions for redistribution. */ ! #if !defined(lint) && defined(DOSCCS) static char *sccsid = "@(#)ex_vops.c 7.7 (Berkeley) 6/7/85"; ! #endif #include "ex.h" #include "ex_tty.h" *** ex_vops2.c.old Wed Feb 18 03:53:10 1987 --- ex_vops2.c Sun Sep 8 15:04:27 1991 *************** *** 4,12 **** * specifies the terms and conditions for redistribution. */ ! #ifndef lint static char *sccsid = "@(#)ex_vops2.c 6.8 (Berkeley) 6/7/85"; ! #endif not lint #include "ex.h" #include "ex_tty.h" --- 4,12 ---- * specifies the terms and conditions for redistribution. */ ! #if !defined(lint) && defined(DOSCCS) static char *sccsid = "@(#)ex_vops2.c 6.8 (Berkeley) 6/7/85"; ! #endif #include "ex.h" #include "ex_tty.h" *** ex_vops3.c.old Tue Feb 17 01:07:35 1987 --- ex_vops3.c Sun Sep 8 15:04:44 1991 *************** *** 4,12 **** * specifies the terms and conditions for redistribution. */ ! #ifndef lint static char *sccsid = "@(#)ex_vops3.c 7.3 (Berkeley) 6/7/85"; ! #endif not lint #include "ex.h" #include "ex_tty.h" --- 4,12 ---- * specifies the terms and conditions for redistribution. */ ! #if !defined(lint) && defined(DOSCCS) static char *sccsid = "@(#)ex_vops3.c 7.3 (Berkeley) 6/7/85"; ! #endif #include "ex.h" #include "ex_tty.h" *** ex_vput.c.old Tue Feb 17 01:07:35 1987 --- ex_vput.c Sun Sep 8 15:05:03 1991 *************** *** 4,12 **** * specifies the terms and conditions for redistribution. */ ! #ifndef lint static char *sccsid = "@(#)ex_vput.c 7.4 (Berkeley) 6/7/85"; ! #endif not lint #include "ex.h" #include "ex_tty.h" --- 4,12 ---- * specifies the terms and conditions for redistribution. */ ! #if !defined(lint) && defined(DOSCCS) static char *sccsid = "@(#)ex_vput.c 7.4 (Berkeley) 6/7/85"; ! #endif #include "ex.h" #include "ex_tty.h" *** ex_vwind.c.old Tue Feb 17 01:07:38 1987 --- ex_vwind.c Sun Sep 8 15:05:18 1991 *************** *** 4,12 **** * specifies the terms and conditions for redistribution. */ ! #ifndef lint static char *sccsid = "@(#)ex_vwind.c 7.3 (Berkeley) 6/7/85"; ! #endif not lint #include "ex.h" #include "ex_tty.h" --- 4,12 ---- * specifies the terms and conditions for redistribution. */ ! #if !defined(lint) && defined(DOSCCS) static char *sccsid = "@(#)ex_vwind.c 7.3 (Berkeley) 6/7/85"; ! #endif #include "ex.h" #include "ex_tty.h" *** expreserve.c.old Sun Feb 22 19:14:57 1987 --- expreserve.c Sun Sep 8 15:05:44 1991 *************** *** 4,18 **** * specifies the terms and conditions for redistribution. */ ! #ifndef lint char *copyright = "@(#) Copyright (c) 1980 Regents of the University of California.\n\ All rights reserved.\n"; - #endif not lint - #ifndef lint static char *sccsid = "@(#)expreserve.c 7.13 (Berkeley) 1/22/86"; ! #endif not lint #ifdef BSD2_10 #include /* mjm: BUFSIZ: stdio = 512, VMUNIX = 1024 */ #undef BUFSIZ /* mjm: BUFSIZ different */ --- 4,16 ---- * specifies the terms and conditions for redistribution. */ ! #if !defined(lint) && defined(DOSCCS) char *copyright = "@(#) Copyright (c) 1980 Regents of the University of California.\n\ All rights reserved.\n"; static char *sccsid = "@(#)exrecover.c 7.9 (Berkeley) 6/7/85"; ! #endif #include /* mjm: BUFSIZ: stdio = 512, VMUNIX = 1024 */ #undef BUFSIZ /* mjm: BUFSIZ different */ *** ovprintf.c.old Tue Feb 17 01:07:40 1987 --- ovprintf.c Sun Sep 8 15:06:24 1991 *************** *** 4,12 **** * specifies the terms and conditions for redistribution. */ ! #ifndef lint static char *sccsid = "@(#)ovprintf.c 1.3 (Berkeley) 6/7/85"; ! #endif not lint /* * This version of printf calls doprnt, and as such is not portable, --- 4,12 ---- * specifies the terms and conditions for redistribution. */ ! #if !defined(lint) && defined(DOSCCS) static char *sccsid = "@(#)ovprintf.c 1.3 (Berkeley) 6/7/85"; ! #endif /* * This version of printf calls doprnt, and as such is not portable, *** printf.c.old Tue Feb 17 01:07:40 1987 --- printf.c Sun Sep 8 15:07:03 1991 *************** *** 4,15 **** * specifies the terms and conditions for redistribution. */ ! #ifndef lint static char *sccsid = "@(#)printf.c 7.3 (Berkeley) 6/7/85"; - #endif not lint /* The pwb version this is based on */ static char *printf_id = "@(#) printf.c:2.2 6/5/79"; #include "varargs.h" /* * This version of printf is compatible with the Version 7 C --- 4,16 ---- * specifies the terms and conditions for redistribution. */ ! #if !defined(lint) && defined(DOSCCS) static char *sccsid = "@(#)printf.c 7.3 (Berkeley) 6/7/85"; /* The pwb version this is based on */ static char *printf_id = "@(#) printf.c:2.2 6/5/79"; + #endif + #include "varargs.h" /* * This version of printf is compatible with the Version 7 C