Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10 5/3/83; site umcp-cs.UUCP Path: utzoo!watmath!clyde!burl!ulysses!harpo!decvax!ittvax!dcdwest!sdcsvax!sdcrdcf!hplabs!hao!seismo!rlgvax!cvl!umcp-cs!chris From: chris@umcp-cs.UUCP Newsgroups: net.unix-wizards,net.bugs Subject: Re: Chris Torek's warning on 11-squishing Message-ID: <6956@umcp-cs.UUCP> Date: Mon, 7-May-84 20:27:02 EDT Article-I.D.: umcp-cs.6956 Posted: Mon May 7 20:27:02 1984 Date-Received: Sun, 13-May-84 00:31:44 EDT References: <6859@umcp-cs.UUCP>, <469@ucbtopaz.CC.Berkeley.ARPA> <476@ucbtopaz.CC.Berkeley.ARPA> Organization: Univ. of Maryland, Computer Science Dept. Lines: 41 Xref: 1135 77 Sorry if I confused people. I made up ``11-squishing'' on the spur of the moment, and meant the kind of hacks one writes when trying to squeeze a program written for a Vax onto the PDP-11 downstairs. There's always a few more bytes you can save, if you reuse this buffer here, over there, and there too. Vi has a lot of this kind of buffer reuse, mostly dealing with undo. I haven't seen any bugs that would blow away an entire file (except for the occasional segmentation fault), but there seem to be some which would cause great anguish if one used undo after using a fancy macro. It's not nice to see all the text you typed in for the last hour or two jump around, even if it is still all there in some form.... Let's see if I can find some bugs right now. Aha, here's one. First, a "map": :map = "ayy1GPu Now type =; the cursor will jump to the top line and you'll get an error about puts inside macros. Now type U (capital u), and something strange happens to the first line. (I got the ``Newsgroups:'' line replaced by the ``Subject:'' line, for some reason.) Just found another bug: if you use a global command that invokes a substitute command, and the substitute command happens to make a line longer than 1023 characters after succeeding on a previous line, the substitute tries to use undo to fix things, but the global prevents the use of undo, and the editor buffer is left rather clobbered. (This was inside a :map'ped key, if you care to experiment.) Admittedly these cases are somewhat unlikely, but if you start experimenting, you should be aware that there *are* bugs. (For the record, these experiments were done on a 4.1BSD system. 4.2 may have new and improved vi bugs :-).) -- In-Real-Life: Chris Torek, Univ of MD Comp Sci (301) 454-7690 UUCP: {seismo,allegra,brl-bmd}!umcp-cs!chris CSNet: chris@umcp-cs ARPA: chris@maryland