home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 October / usenetsourcesnewsgroupsinfomagicoctober1994disk2.iso / misc / volume44 / vim / part25 < prev    next >
Internet Message Format  |  1994-08-18  |  70KB

  1. From: mool@oce.nl (Bram Moolenaar)
  2. Newsgroups: comp.sources.misc
  3. Subject: v44i044:  vim - Vi IMproved editor, v3.0, Part25/26
  4. Date: 18 Aug 1994 14:04:07 -0500
  5. Organization: Sterling Software
  6. Sender: kent@sparky.sterling.com
  7. Approved: kent@sparky.sterling.com
  8. Message-ID: <330bb7$e9q@sparky.sterling.com>
  9. X-Md4-Signature: 766c1d17ce0e7a8eed8d4f593defd6ad
  10.  
  11. Submitted-by: mool@oce.nl (Bram Moolenaar)
  12. Posting-number: Volume 44, Issue 44
  13. Archive-name: vim/part25
  14. Environment: UNIX, AMIGA, MS-DOS, Windows NT
  15. Supersedes: vim: Volume 41, Issue 50-75
  16.  
  17. #! /bin/sh
  18. # This is a shell archive.  Remove anything before this line, then feed it
  19. # into a shell via "sh file" or similar.  To overwrite existing files,
  20. # type "sh file -c".
  21. # Contents:  vim/README vim/credits.txt vim/doc/archie.doc
  22. #   vim/doc/unix.doc vim/macros/hanoi/hanoi.mac.UU
  23. #   vim/macros/hanoi/poster vim/macros/maze/README
  24. #   vim/macros/maze/maze_ansi.c vim/macros/maze/poster
  25. #   vim/macros/urm/README vim/macros/urm/examples
  26. #   vim/macros/urm/urm.UU vim/poster vim/src/amiga.h vim/src/charset.c
  27. #   vim/src/keymap.h vim/src/macros.h vim/src/mkcmdtab.c
  28. #   vim/src/msdos.h vim/src/ops.h vim/src/proto.h
  29. #   vim/src/proto/amiga.pro vim/src/proto/getchar.pro
  30. #   vim/src/proto/memfile.pro vim/src/proto/memline.pro
  31. #   vim/src/proto/misccmds.pro vim/src/proto/msdos.pro
  32. #   vim/src/proto/ops.pro vim/src/proto/screen.pro
  33. #   vim/src/proto/search.pro vim/src/proto/term.pro
  34. #   vim/src/proto/unix.pro vim/src/proto/window.pro
  35. #   vim/src/ptx_stdlib.h vim/src/regexp.h vim/src/sun_stdlib.h
  36. #   vim/tutor/poster
  37. # Wrapped by kent@sparky on Mon Aug 15 21:44:16 1994
  38. PATH=/bin:/usr/bin:/usr/ucb:/usr/local/bin:/usr/lbin:$PATH ; export PATH
  39. echo If this archive is complete, you will see the following message:
  40. echo '          "shar: End of archive 25 (of 26)."'
  41. if test -f 'vim/README' -a "${1}" != "-c" ; then 
  42.   echo shar: Will not clobber existing file \"'vim/README'\"
  43. else
  44.   echo shar: Extracting \"'vim/README'\" \(2187 characters\)
  45.   sed "s/^X//" >'vim/README' <<'END_OF_FILE'
  46. XREADME for version 3.0 of Vim: Vi IMproved.
  47. X
  48. XVim is an almost compatible version of the UNIX editor vi. Only the 'Q'
  49. Xcommand is missing (you don't need it). Many new features have been added:
  50. Xmulti level undo, command line history, filename completion, block operations,
  51. Xetc. See difference.doc.
  52. X
  53. XThis editor is very useful for editing programs and other plain ASCII files. 
  54. XAll commands are given with normal keyboard characters, so those who can type 
  55. Xwith ten fingers can work very fast. Additionally function keys can be defined
  56. Xby the user.
  57. X
  58. XVim currently runs under Amiga DOS, MSDOS, Windows NT and many UNIX versions.
  59. XThere are some things included for the Archimedes, but it does not work yet.
  60. XPorting to other systems should not be very difficult. 
  61. X
  62. XDocumentation:
  63. X      tutor/readme - one hour training course for beginners
  64. X     reference.doc - complete reference of all Vim commands
  65. X    difference.doc - summarizes the differences with UNIX vi
  66. X       windows.doc - reference for the multi windows and buffer commands
  67. X         index - alfabetical list of commands
  68. X         amiga.doc - remarks for Amiga
  69. X          unix.doc - remarks for unix
  70. X         msdos.doc - remarks for MSDOS
  71. X         winnt.doc - remarks for Windows NT
  72. X            archie.doc - remarks for Archimedes
  73. X
  74. XVim is Charityware. You can copy it as much as you like. Please read
  75. Xuganda.txt for details.
  76. X
  77. X
  78. XCompiling:
  79. X    cd src
  80. X    cp makefile.<system> makefile
  81. X    make
  82. X
  83. XWhen using makefile.unix you MUST uncomment three lines for your system!
  84. X
  85. XThe makefile offers some compilation options. If you do not use digraphs, you
  86. Xcan save some memory by recompiling without the DIGRAPHS option. The Amiga
  87. Xand MS-DOS versions are compiled for a limited number of supported terminals.
  88. XIf you want to use Vim with other terminals you can recompile with the
  89. XTERMCAP option. See the makefiles for further options.
  90. X
  91. XPlease send comments, bug reports and suggestions to:
  92. X
  93. Xstable address:    Bram Moolenaar        UUCP E-mail:    mool@oce.nl
  94. X        molenstraat 2
  95. X        2162 HP  Lisse        Fax: +31 2521 16381
  96. X        The Netherlands        Tel: +31 2521 13037
  97. X
  98. XSeptember 1994 - August 1995:
  99. XKibaale Children's Centre            Tel: +256 481 21033
  100. Xp.o. box 1658, Masaka, Uganda, East Africa       Fax: +256 481 20514
  101. END_OF_FILE
  102.   if test 2187 -ne `wc -c <'vim/README'`; then
  103.     echo shar: \"'vim/README'\" unpacked with wrong size!
  104.   fi
  105.   # end of 'vim/README'
  106. fi
  107. if test -f 'vim/credits.txt' -a "${1}" != "-c" ; then 
  108.   echo shar: Will not clobber existing file \"'vim/credits.txt'\"
  109. else
  110.   echo shar: Extracting \"'vim/credits.txt'\" \(1170 characters\)
  111.   sed "s/^X//" >'vim/credits.txt' <<'END_OF_FILE'
  112. XCredits for Vim - Vi Improved
  113. X
  114. XMost of Vim was written by Bram Moolenaar.
  115. X
  116. XParts of reference.doc come from several Vi manuals, written by:
  117. X    W.N. Joy
  118. X    Alan P.W. Hewett
  119. X    Mark Horton
  120. X
  121. XThe editor Vim is based on Stevie and includes (ideas from) other software,
  122. Xworked on by:
  123. X    Tim Thompson        Stevie
  124. X    Tony Andrews        Stevie
  125. X    G. R. (Fred) Walter    Stevie
  126. X    Henry Spencer        regular expressions
  127. X    Steve Kirkendall    Elvis
  128. X    Juergen Weigert        Lattice version, AUX improvements, UNIX and 
  129. X                MSDOS ports
  130. X    Robert Webb        Command line completion and other patches
  131. X    Olaf Seibert        DICE version and regexp improvements
  132. X    Peter da Silva        termlib
  133. X    Chris & John Downey     xvi (ideas for multi windows version)
  134. X        Loic Grenie             xvim (ideas for multi windows version)
  135. X        Keith Bostic            nvi
  136. X    Berkeley DB(3)        ideas for swap file
  137. X    Ralf Brown        SPAWNO library for MSDOS
  138. X
  139. XI must thank all the people that sent me bug reports and suggestions. The
  140. Xlist is too long to mention them all here. And mentioning only a few of them
  141. Xwould be an insult to the others, so I'll don't mention anybody. But Vim
  142. Xwould not be the same without the ideas from all these people. They keep Vim
  143. Xalive!
  144. END_OF_FILE
  145.   if test 1170 -ne `wc -c <'vim/credits.txt'`; then
  146.     echo shar: \"'vim/credits.txt'\" unpacked with wrong size!
  147.   fi
  148.   # end of 'vim/credits.txt'
  149. fi
  150. if test -f 'vim/doc/archie.doc' -a "${1}" != "-c" ; then 
  151.   echo shar: Will not clobber existing file \"'vim/doc/archie.doc'\"
  152. else
  153.   echo shar: Extracting \"'vim/doc/archie.doc'\" \(1866 characters\)
  154.   sed "s/^X//" >'vim/doc/archie.doc' <<'END_OF_FILE'
  155. XThis file contains the particularities for the Archimedes version of Vim.
  156. X
  157. X============================================================================
  158. XThe Archimedes version has not been tested. It probably doesn't work at the
  159. Xmoment, because only patches for Vim version 2.0 were available.
  160. X============================================================================
  161. X
  162. Xvim.hlp needs to be saved as Lib:vimhlp (you should set Lib$Path to be a
  163. Xpath to the directory you want to save this. Your system vimrc file should
  164. Xbe named vimrc in this directory too.) 
  165. X
  166. XAnother path to set is Tmp$Path This should be the directory you want vim to
  167. Xuse when it does pipes.
  168. X
  169. XUnixLib's translations means that local .vimrc files should really be named
  170. X/vimrc. Of course vim does these translations, so vim .vimrc will create the
  171. Xfile /vimrc.
  172. X
  173. XYou need a termcap file - I haven't built this in. To install the termcap
  174. Xfile, you need to assign a variable, UnixLib$/etc to your "/etc" directory
  175. Xand copy the file "arctermcap" as "/etc/termcap" You also need your TERM
  176. Xvariable to be set to acorn0 before you use vim. Note also that I've set the
  177. X"cl" command, clear screen to clear to green screen. You can change this if
  178. Xyou want.
  179. X
  180. XErrorfile handling may not work properly. This is not vim's fault, but
  181. XUnixLib's system() and exec() handling. It may be OK for Acorn's cc, but gcc
  182. Xuses exec() and loses redirections, so gcc -c fred.c 2> errorfile doesn't
  183. Xgenerate a valid errorfile. Problem is that this is a biggy within UnixLib
  184. Xto fix, I think.
  185. X
  186. XWhen you call a shell up with :sh and ^Z, you'll get a GOS shell by default.
  187. XThis means that running another application will exit GOS and throw you back
  188. Xinto vim. I'm working on a bash-like shell for the Arc which will get round
  189. Xthis.
  190. X
  191. XIf I've missed anything, please drop me a line and I'll try to fix it.
  192. X
  193. XAlun Jones, auj@aber.ac.uk
  194. END_OF_FILE
  195.   if test 1866 -ne `wc -c <'vim/doc/archie.doc'`; then
  196.     echo shar: \"'vim/doc/archie.doc'\" unpacked with wrong size!
  197.   fi
  198.   # end of 'vim/doc/archie.doc'
  199. fi
  200. if test -f 'vim/doc/unix.doc' -a "${1}" != "-c" ; then 
  201.   echo shar: Will not clobber existing file \"'vim/doc/unix.doc'\"
  202. else
  203.   echo shar: Extracting \"'vim/doc/unix.doc'\" \(796 characters\)
  204.   sed "s/^X//" >'vim/doc/unix.doc' <<'END_OF_FILE'
  205. XThis file contains the particularities for the UNIX version of Vim.
  206. X
  207. XThe default help filename is "/usr/local/lib/vim.hlp"
  208. XThe files "$HOME/.vimrc" and "$HOME/.exrc" are used instead of "s:.vimrc" and 
  209. X"s:.exrc". Additionally "/usr/local/etc/vimrc" is used first.
  210. X
  211. XTemporary files (for filtering) are put in "/tmp".
  212. X
  213. XWith wildcard expansion you can use <~> (home directory) and <$> 
  214. X(environment variable).
  215. X
  216. XBecause terminal updating under UNIX is often slow (e.g. serial line 
  217. Xterminal, shell window in suntools), the 'showcommand' and 'ruler' options 
  218. Xare default off. If you have a fast terminal, try setting them.
  219. X
  220. XThe file Vim132 is a shell script that can be used to put Vim in 132 column 
  221. Xmode on a vt100 and lookalikes.
  222. X
  223. XThe *.info files are for the Amiga. You don't need them with unix.
  224. END_OF_FILE
  225.   if test 796 -ne `wc -c <'vim/doc/unix.doc'`; then
  226.     echo shar: \"'vim/doc/unix.doc'\" unpacked with wrong size!
  227.   fi
  228.   # end of 'vim/doc/unix.doc'
  229. fi
  230. if test -f 'vim/macros/hanoi/hanoi.mac.UU' -a "${1}" != "-c" ; then 
  231.   echo shar: Will not clobber existing file \"'vim/macros/hanoi/hanoi.mac.UU'\"
  232. else
  233.   echo shar: Extracting \"'vim/macros/hanoi/hanoi.mac.UU'\" \(1557 characters\)
  234.   sed "s/^X//" >'vim/macros/hanoi/hanoi.mac.UU' <<'END_OF_FILE'
  235. Xbegin 644 vim/macros/hanoi/hanoi.mac
  236. XM<V5T(')E;6%P"G-E="!N;W1E<G-E"G-E="!W<F%P<V-A;@HB('1O('-E="!T
  237. XM:&4@:&5I9VAT(&]F('1H92!T;W=E<BP@8VAA;F=E('1H92!D:6=I="!I;B!T
  238. XM:&4@9F]L;&]W:6YG"B(@='=O(&QI;F5S('1O('1H92!H96EG:'0@>6]U('=A
  239. XM;G0@*'-E;&5C="!F<F]M(#$@=&\@.2D*;6%P('0@-PIM87 A('0@-PIM87 @
  240. XM3" Q1R]T#5@O7C -)% Q1THD06XD0D=#,&4D6#!%,$8D6"]4#4!F#4!H#21!
  241. XM,4=*0&8P;"18;B1050IM87 @9R!)3 H*;6%P($H@+UXP6UYT72HD#0IM87 @
  242. XM6"!X"FUA<"!0(' *;6%P(%4@3 IM87 @02 B9GEL"FUA<"!"(")H>6P*;6%P
  243. XM($,@(F9P"FUA<"!E(")F>3)L"FUA<"!%(")H< IM87 @1B B:'DR; H*(B!I
  244. XM;FET:6%L:7-A=&EO;G,Z"B(@2TT)8VQE86YU<"!B=69F97(*(B!9"6-R96%T
  245. XM92!T;W=E<B!O9B!D97-I<F5D(&AE:6=H= HB($Y/40EC;W!Y(&ET(&%N9"!I
  246. XM;G-T97(@82!4"B(@3D\)8V]P>2!T:&ES(&]N90HB(%,)8VAA;F=E(&QA<W0@
  247. XM8VAA<B!I;G1O(&$@) HB(%()8VAA;F=E(&QA<W0@8VAA<B!I;B!P<F5V:6]U
  248. XM<R!L:6YE(&EN=&\@82!N"B(@5 EI;G-E<G0@='=O(&QI;F5S(&-O;G1A:6YI
  249. XM;F<@82!Z97)O"B(@5@EA9&0@82!L87-T(&QI;F4@8V]N=&%I;FEN9R!A(&)A
  250. XM8VMS;&%S: IM87 @22!+35E.3U%.3U-K4E16"@HB8W)E871E(&5M<'1Y(&QI
  251. XM;F4*;6%P($L@,4=O&PH*(F1E;&5T92!T;R!E;F0@;V8@9FEL90IM87 @32!D
  252. XM1PH*(GEA;FL@;VYE(&QI;F4*;6%P($X@>7D*"B)P=70*;6%P($\@< H*(F1E
  253. XM;&5T92!M;W)E('1H86X@:&5I9VAT+6]F+71O=V5R(&-H87)A8W1E<G,*;6%P
  254. XM('$@=&QL1 H*(F-R96%T92!A('1O=V5R(&]F(&1E<VER960@:&5I9VAT"FUA
  255. XM<"!9(&\P,3(S-#4V-S@Y6ALP<0H*(FEN<V5R="!A(%0@:6X@8V]L=6UN(#$*
  256. XM;6%P(%$@,&E4&PH*(G-U8G-T:71U=&4@;&%S="!C:&%R86-T97(@=VET:"!A
  257. XM(&X*;6%P(%(@)')N"@HB<W5B<W1I='5T92!L87-T(&-H87)A8W1E<B!W:71H
  258. XM(&$@) IM87 @4R D<B0*"B)I;G-E<G0@='=O(&QI;F5S(&-O;G1A:6YI;F<@
  259. XM82!Z97)O"FUA<"!4(&MO, TP#0T;"@HB861D(&$@8F%C:W-L87-H(&%T('1H
  260. X192!E;F0*;6%P(%8@1V\O&PHP
  261. Xend
  262. END_OF_FILE
  263.   if test 1557 -ne `wc -c <'vim/macros/hanoi/hanoi.mac.UU'`; then
  264.     echo shar: \"'vim/macros/hanoi/hanoi.mac.UU'\" unpacked with wrong size!
  265.   else
  266.     echo shar: Uudecoding \"'vim/macros/hanoi/hanoi.mac'\" \(1097 characters\)
  267.     cat vim/macros/hanoi/hanoi.mac.UU | uudecode
  268.     if test 1097 -ne `wc -c <'vim/macros/hanoi/hanoi.mac'`; then
  269.       echo shar: \"'vim/macros/hanoi/hanoi.mac'\" uudecoded with wrong size!
  270.     else
  271.       rm vim/macros/hanoi/hanoi.mac.UU
  272.     fi
  273.   fi
  274.   # end of 'vim/macros/hanoi/hanoi.mac.UU'
  275. fi
  276. if test -f 'vim/macros/hanoi/poster' -a "${1}" != "-c" ; then 
  277.   echo shar: Will not clobber existing file \"'vim/macros/hanoi/poster'\"
  278. else
  279.   echo shar: Extracting \"'vim/macros/hanoi/poster'\" \(1259 characters\)
  280.   sed "s/^X//" >'vim/macros/hanoi/poster' <<'END_OF_FILE'
  281. XArticle 2913 of alt.sources:
  282. XPath: oce-rd1!hp4nl!mcsun!uunet!munnari.oz.au!metro!cluster!swift!softway!otc!gregm
  283. XFrom: gregm@otc.otca.oz.au (Greg McFarlane)
  284. XNewsgroups: comp.sources.d,alt.sources,comp.editors
  285. XSubject: VI SOLVES HANOI
  286. XMessage-ID: <2323@otc.otca.oz>
  287. XDate: 19 Feb 91 01:32:14 GMT
  288. XSender: news@otc.otca.oz
  289. XReply-To: gregm@otc.otca.oz.au (Greg McFarlane)
  290. XOrganization: OTC Development Unit, Australia
  291. XLines: 80
  292. XXref: oce-rd1 comp.sources.d:5702 alt.sources:2913 comp.editors:2313
  293. X
  294. XSubmitted-by: gregm@otc.otca.oz.au
  295. XArchive-name: hanoi.vi.macros/part01
  296. X
  297. XEveryone seems to be writing stupid Tower of Hanoi programs.
  298. XWell, here is the stupidest of them all: the hanoi solving vi macros.
  299. X
  300. XSave this article, unshar it, and run uudecode on hanoi.vi.macros.uu.
  301. XThis will give you the macro file hanoi.vi.macros.
  302. XThen run vi (with no file: just type "vi") and type:
  303. X    :so hanoi.vi.macros
  304. X    g
  305. Xand watch it go.
  306. X
  307. XThe default height of the tower is 7 but can be easily changed by editing
  308. Xthe macro file.
  309. X
  310. XThe disks aren't actually shown in this version, only numbers representing
  311. Xeach disk, but I believe it is possible to write some macros to show the
  312. Xdisks moving about as well. Any takers?
  313. X
  314. X(For maze solving macros, see alt.sources or comp.editors)
  315. X
  316. XGreg
  317. END_OF_FILE
  318.   if test 1259 -ne `wc -c <'vim/macros/hanoi/poster'`; then
  319.     echo shar: \"'vim/macros/hanoi/poster'\" unpacked with wrong size!
  320.   fi
  321.   # end of 'vim/macros/hanoi/poster'
  322. fi
  323. if test -f 'vim/macros/maze/README' -a "${1}" != "-c" ; then 
  324.   echo shar: Will not clobber existing file \"'vim/macros/maze/README'\"
  325. else
  326.   echo shar: Extracting \"'vim/macros/maze/README'\" \(1666 characters\)
  327.   sed "s/^X//" >'vim/macros/maze/README' <<'END_OF_FILE'
  328. XTo prove that you can do anything in vi, I wrote a couple of macros that
  329. Xallows vi to solve mazes. It will solve any maze produced by maze.c
  330. Xthat was posted to the net recently.
  331. X
  332. XJust follow this recipe and SEE FOR YOURSELF.
  333. X    1. run uudecode on the file "maze.vi.macros.uu" to
  334. X        produce the file "maze.vi.macros"
  335. X    (If you can't wait to see the action, jump to step 4)
  336. X    2. compile maze.c with "cc -o maze maze.c"
  337. X    3. run maze > maze.out and input a small number (for example 10 if
  338. X        you are on a fast machine, 3-5 if slow) which
  339. X        is the size of the maze to produce
  340. X    4. edit the maze (vi maze.out)
  341. X    5. include the macros with the vi command:
  342. X        :so maze.vi.macros
  343. X    6. type the letter "g" (for "go") and watch vi solve the maze
  344. X    7. when vi solves the maze, you will see why it lies
  345. X    8. now look at maze.vi.macros and all will be revealed
  346. X
  347. XTested on a sparc, a sun and a pyramid (although maze.c will not compile
  348. Xon the pyramid).
  349. X
  350. XAnyone who can't get the maze.c file to compile, get a new compiler,
  351. Xtry maze.ansi.c which was also posted to the net.
  352. XIf you can get it to compile but the maze comes out looking like a fence
  353. Xand not a maze and you are using SysV or DOS replace the "27" on the
  354. Xlast line of maze.c by "11"
  355. XThanks to John Tromp (tromp@piring.cwi.nl) for maze.c.
  356. XThanks to antonyc@nntp-server.caltech.edu (Bill T. Cat) for maze.ansi.c.
  357. X
  358. XAny donations should be in unmarked small denomination bills :^)=.
  359. X
  360. X                   ACSnet:  gregm@otc.otca.oz.au
  361. XGreg McFarlane       UUCP:  {uunet,mcvax}!otc.otca.oz.au!gregm
  362. X|||| OTC ||         Snail:  OTC R&D GPO Box 7000, Sydney 2001, Australia
  363. X                    Phone:  +61 2 287 3139    Fax: +61 2 287 3299
  364. X
  365. X
  366. END_OF_FILE
  367.   if test 1666 -ne `wc -c <'vim/macros/maze/README'`; then
  368.     echo shar: \"'vim/macros/maze/README'\" unpacked with wrong size!
  369.   fi
  370.   # end of 'vim/macros/maze/README'
  371. fi
  372. if test -f 'vim/macros/maze/maze_ansi.c' -a "${1}" != "-c" ; then 
  373.   echo shar: Will not clobber existing file \"'vim/macros/maze/maze_ansi.c'\"
  374. else
  375.   echo shar: Extracting \"'vim/macros/maze/maze_ansi.c'\" \(441 characters\)
  376.   sed "s/^X//" >'vim/macros/maze/maze_ansi.c' <<'END_OF_FILE'
  377. Xchar*M,A,Z,E=40,J[80],T[3];main(C){for(M=J+E,*J=A=scanf("%d",&
  378. XC)            ;--            E;J             [E            ]=M
  379. X[E   ]=  E)   printf("._");  for(;(A-=Z=!Z)  ||  (printf("\n|"
  380. X)    ,   A    =              39              ,C             --
  381. X)    ;   Z    ||    printf   (T   ))T[Z]=Z[A-(E   =A[J-Z])&&!C
  382. X&    A   ==             M[                                  A]
  383. X|6<<11<rand()||!C&!Z?J[M[E]=M[A]]=E,J[M[A]=A-Z]=A,"_.":" |"];}
  384. END_OF_FILE
  385.   if test 441 -ne `wc -c <'vim/macros/maze/maze_ansi.c'`; then
  386.     echo shar: \"'vim/macros/maze/maze_ansi.c'\" unpacked with wrong size!
  387.   fi
  388.   # end of 'vim/macros/maze/maze_ansi.c'
  389. fi
  390. if test -f 'vim/macros/maze/poster' -a "${1}" != "-c" ; then 
  391.   echo shar: Will not clobber existing file \"'vim/macros/maze/poster'\"
  392. else
  393.   echo shar: Extracting \"'vim/macros/maze/poster'\" \(1562 characters\)
  394.   sed "s/^X//" >'vim/macros/maze/poster' <<'END_OF_FILE'
  395. XArticle 2846 of alt.sources:
  396. XPath: oce-rd1!hp4nl!mcsun!uunet!munnari.oz.au!metro!otc!gregm
  397. XFrom: gregm@otc.otca.oz.au (Greg McFarlane)
  398. XNewsgroups: alt.sources
  399. XSubject: VI SOLVES MAZE (commented macros)
  400. XMessage-ID: <2289@otc.otca.oz>
  401. XDate: 10 Feb 91 23:31:02 GMT
  402. XSender: news@otc.otca.oz
  403. XReply-To: gregm@otc.otca.oz.au (Greg McFarlane)
  404. XOrganization: OTC Development Unit, Australia
  405. XLines: 464
  406. X
  407. XSubmitted-by: gregm@otc.otca.oz.au
  408. XArchive-name: maze_solving_vi_macros
  409. X
  410. XA real working model. See it walk the maze in front of your very own eyes.
  411. X
  412. XTo prove that you can do anything in vi, I wrote a couple of macros that
  413. Xallows vi to solve mazes. It will solve any maze produced by maze.c
  414. Xthat was posted to the alt.sources last month. (Maze.c is also included
  415. Xin this posting as well as an example of its output.)
  416. X
  417. XThe uncommented version of the macros was sent to alt.sources last month.
  418. XHowever, so many people mailed me requesting the commented version of the
  419. Xmacros that I decided to post it. I have made some modifications to the
  420. Xoriginal macros to make them easier to follow and also after I learnt
  421. Xthat you can escape the special meaning of '|' in macros by using '^V|'.
  422. X
  423. XSave this article and unshar it. Then read maze.README.
  424. X
  425. XAfter studying these macros, anyone who cannot write an emacs emulator
  426. Xin vi macros should just curl up and :q!.
  427. X
  428. XComing soon to a newsgroup near you: "Vi macros solve Tower of Hanoi",
  429. Xand a repost of the original "Turing Machine implemented in Vi macros"
  430. X
  431. XAnyone who has a version of these macros for edlin or nroff, please post.
  432. END_OF_FILE
  433.   if test 1562 -ne `wc -c <'vim/macros/maze/poster'`; then
  434.     echo shar: \"'vim/macros/maze/poster'\" unpacked with wrong size!
  435.   fi
  436.   # end of 'vim/macros/maze/poster'
  437. fi
  438. if test -f 'vim/macros/urm/README' -a "${1}" != "-c" ; then 
  439.   echo shar: Will not clobber existing file \"'vim/macros/urm/README'\"
  440. else
  441.   echo shar: Extracting \"'vim/macros/urm/README'\" \(1651 characters\)
  442.   sed "s/^X//" >'vim/macros/urm/README' <<'END_OF_FILE'
  443. XThis is another proof that vim is perfectly compatible with SYSV-vi.
  444. XThe URM macro package was written by Rudolf Koenig ("Rudi") 
  445. X(rfkoenig@immd4.uni-erlangen.de) for hpux-vi in August 1991.
  446. X
  447. XGetting started:
  448. X
  449. Xtype 
  450. Xin your shell:     vim urm<RETURN>
  451. Xin vim:             :so urm.mac<RETURN>
  452. Xin vim:             *    (to load the registers and boot the URM-machine :-)
  453. Xin vim:             g      (for 'go') and watch the fun. Per default, 3 and 4
  454. X                        are multiplied. Watch the Program counter, it is 
  455. X            visible as a komma moving around.
  456. X
  457. XThis is a "standard URM" (Universal register machine)  interpreter. The URM 
  458. Xconcept is used in theoretical computer science to aid in theorem proving.
  459. XHere it proves that vim is a general problem solver (if you bring enough 
  460. Xpatience).
  461. X
  462. XThe interpreter begins with register 1 (not 0), without macros and more-lines
  463. Xcapability.  A dot marks the end of a program. (Bug: there must be a space 
  464. Xafter the dot.)
  465. X
  466. XThe registers are the first few lines, beginning with a '>' .
  467. XThe program is the first line after the registers.
  468. XYou should always initialize the registers required by the program. 
  469. X
  470. XOutput register:    line 2
  471. XInput registers:    line 2 to ...
  472. X
  473. XCommands:
  474. Xa<n>        increment register <n>
  475. Xs<n>        decrement register <n>
  476. X<x>;<y>        execute command <x> and then <y>
  477. X(<x>)<n>    execute command <x> while register <n> is nonzero
  478. X.         ("dot blank")  halt the machine.
  479. X
  480. XExamples:
  481. X
  482. XAdd register 2 to register 3:
  483. X    (a2;s3)3. 
  484. XMultiply register 2 with register 3:
  485. X    (a4;a5;s2)2; ((a2;s4)4; s3; (a1;a4;s5)5; (a5;s1)1)3. 
  486. X
  487. XThere are more (complicated) examples in the file examples.
  488. XNote, undo may take a while after a division.
  489. X
  490. END_OF_FILE
  491.   if test 1651 -ne `wc -c <'vim/macros/urm/README'`; then
  492.     echo shar: \"'vim/macros/urm/README'\" unpacked with wrong size!
  493.   fi
  494.   # end of 'vim/macros/urm/README'
  495. fi
  496. if test -f 'vim/macros/urm/examples' -a "${1}" != "-c" ; then 
  497.   echo shar: Will not clobber existing file \"'vim/macros/urm/examples'\"
  498. else
  499.   echo shar: Extracting \"'vim/macros/urm/examples'\" \(1092 characters\)
  500.   sed "s/^X//" >'vim/macros/urm/examples' <<'END_OF_FILE'
  501. XNote that enough temporary registers should be provided for each example.
  502. XAll should be initialised to 0.
  503. X
  504. XInitial register values for benchmarking: 0,8,3,0,...
  505. X
  506. XPerformed on a Xenix 386/16:
  507. XOperation [sec, kbyte tmp space]: program
  508. X
  509. XAsym. Diff.[ 7, 4]: (s2;s3)3. 
  510. XAbs. Diff. [90,81]: (a1;a4;s2)2; (a2;s1)1; (a1;a5;s3)3; (a3;s1)1; (s2;s3)3; (s5;s4)4; (a2;s5)5. 
  511. XAdd  [  7,   4]: (a2;s3)3. 
  512. XMult [227, 161]: (a4;a5;s2)2; ((a2;s4)4; s3; (a1;a4;s5)5; (a5;s1)1)3. 
  513. XCopy [ 48,  25]: (a1;a3;s2)2; (a2;s1)1. 
  514. Xsign [ 30,  17]: (a3;s2)2; (a2;(s3)3)3. 
  515. X!sign[ 36,  28]: (a3;s2)2; (a2;(s3)3)3; a3; (s3;s2)2; (s3;a2)3.  
  516. XDiv  [630,1522]: (a9;s2)2; (a2;a10;s3)3; (a3;s2)2; (a2;(s3)3)3; a3; (s3;s2)2; (s3;a2)3; (a2)2;(a2;s9)9;(a3;s10)10; (a9;a10;s2)2; (a11;a12;s3)3; (a2;s12)12; (a3;s9)9; (s2;s3)3; (a3;s2)2; (a2;(s3)3)3; a3; (s3;s2)2; (s3;a2)3; (a1;s2)2; (a2;s10)10; (a3;s11)11; ((a12;a13;s3)3; (a3;s13)13; (s2;s3)3; (a3;s12)12; a14; (s1)1; (a9;a10;s2)2; (a11;a12;s3)3; (a2;s12)12; (a3;s9)9; (s2;s3)3; (a3;s2)2; (a2;(s3)3)3; a3; (s3;s2)2; (s3;a2)3; (a1;s2)2; (a2;s10)10; (a3;s11)11)1; (s2)2; (a2;s14)14. 
  517. END_OF_FILE
  518.   if test 1092 -ne `wc -c <'vim/macros/urm/examples'`; then
  519.     echo shar: \"'vim/macros/urm/examples'\" unpacked with wrong size!
  520.   fi
  521.   # end of 'vim/macros/urm/examples'
  522. fi
  523. if test -f 'vim/macros/urm/urm.UU' -a "${1}" != "-c" ; then 
  524.   echo shar: Will not clobber existing file \"'vim/macros/urm/urm.UU'\"
  525. else
  526.   echo shar: Extracting \"'vim/macros/urm/urm.UU'\" \(903 characters\)
  527.   sed "s/^X//" >'vim/macros/urm/urm.UU' <<'END_OF_FILE'
  528. Xbegin 644 vim/macros/urm/urm
  529. XM/C */C,*/C0*/C */C */C **&$T.V$U.W,R*3([("@H83([<S0I-#L@<S,[
  530. XM("AA,3MA-#MS-2DU.R H834[<S$I,2DS+B *7U]?7U]?7U]?"D\).R ]>' @
  531. XM*" ]>"5H<" I($!L(&$@0&1B(',@0&1T("X@/7@P>&MD9#IR96%D>2!?96YD
  532. XM7PIO"3 @,2 R(#,@-" U(#8@-R X(#D@, I?7U]?7U]?7U\*24Y)5"!M86EN
  533. XM*&LI+"!L+"!B+"!C+"!T+"!U+"!Q+"!D( H-(FM4#2)L5 TB8E0-(F-4#2)T
  534. XM5 TB=50-(G%4#2)D5 H];$8G=V$O3Q8-9AMP87<B>F1T(&AP0'H;,")X1$!X
  535. XM0&L*/3)L9'=H<"=W:4=4)W=P&S!0,")Y1$!Y82 ]>&QW4" ^," ]>"5P(!M)
  536. XM(!MK+SXP#7=W(GED=" P1$!Y"B=W82]O%@UF=T8G=W!I8&%R%AL;8&%&)W=F
  537. XM9G P(G9$0'8P(G9$<# S>$!V)W=A($!C(# @," ;,$D@&V8P=R)W9'0@,$1 
  538. XM=PI@86AM848G=V$@("=A83$6&R ^($!B(!LP<#!F/G<B=F1T(#!$0'8*)W=A
  539. XM+V\6#7=F8D8G=W!I8&%R%AL;8&%&)W=F9G P(G9$0'8P(G9$<# S>$!V)W=A
  540. XM($!U(#D@," ;,$D@&V8Y=R)W9'0@,$1 =PI@86AM848G=V$@(&!A;'(P(#X@
  541. XM0'$@&S!P,&8^=R)V9'0@,$1 =@I@86AY,FPG=V$@(&!A>" ^,2! =" ;,' P
  542. XM+SXQ#7=W(FED=" P1$!I"CUX=VAP8FQD=VAP)W=P84<D;6$;,")Y1$!Y0 H*
  543. Xend
  544. END_OF_FILE
  545.   if test 903 -ne `wc -c <'vim/macros/urm/urm.UU'`; then
  546.     echo shar: \"'vim/macros/urm/urm.UU'\" unpacked with wrong size!
  547.   else
  548.     echo shar: Uudecoding \"'vim/macros/urm/urm'\" \(630 characters\)
  549.     cat vim/macros/urm/urm.UU | uudecode
  550.     if test 630 -ne `wc -c <'vim/macros/urm/urm'`; then
  551.       echo shar: \"'vim/macros/urm/urm'\" uudecoded with wrong size!
  552.     else
  553.       rm vim/macros/urm/urm.UU
  554.     fi
  555.   fi
  556.   # end of 'vim/macros/urm/urm.UU'
  557. fi
  558. if test -f 'vim/poster' -a "${1}" != "-c" ; then 
  559.   echo shar: Will not clobber existing file \"'vim/poster'\"
  560. else
  561.   echo shar: Extracting \"'vim/poster'\" \(1584 characters\)
  562.   sed "s/^X//" >'vim/poster' <<'END_OF_FILE'
  563. XVim - Vi IMproved. A clone of the UNIX text editor Vi. Very useful for 
  564. Xediting programs and other plain ASCII text. Full Vi compatibility (except Q 
  565. Xcommand, you don't need it). Includes most Ex commands.
  566. X
  567. XExtra features above Vi: Multilevel undo, command line history, improved 
  568. Xcommand line editing, command typeahead display, command to display yank 
  569. Xbuffers, possibility to edit binary files, line wrapping can be switched off,
  570. Xfile name stack, can be adjusted to understand error messages from any
  571. Xcompiler, shows current file name in window title, on-line help, etc. 
  572. X
  573. XVersion 2.0, update to 1.27. Most important changes:
  574. X- 'wrap' option to switch line wrapping on/off
  575. X- filename completion is more like other programs and adjustable
  576. X- automatic detection of CR/LF line separator
  577. X- '-b' command line option to make editing binary files more easy
  578. X- added abbreviation
  579. X- :make command for quickly jumping to errors
  580. X- MSDOS version uses bios calls for screen output, ansi.sys not needed
  581. X- many small changes to make Vim more vi-compatible
  582. X
  583. XPortability: Runs on MSDOS, Amiga and several UNIX versions.
  584. X
  585. XDistribution:
  586. Xcomp.binaries.ibm.pc:    vim_dos.zip:    MSDOS binary and documentation
  587. X
  588. Xcomp.binaries.amiga:    vim_bin.lha:    Amiga binary and documentation
  589. X
  590. Xcomp.sources.misc:    shell archive with sources and documentation
  591. X
  592. XThe documentation is almost the same for all systems. For MSDOS CR-LF is used
  593. Xfor line separator. For Amiga .info files are included. For the shell archive
  594. Xsome files are uuencoded because of unprintable characters.
  595. X
  596. XVim is charityware. Read uganda.txt for details.
  597. END_OF_FILE
  598.   if test 1584 -ne `wc -c <'vim/poster'`; then
  599.     echo shar: \"'vim/poster'\" unpacked with wrong size!
  600.   fi
  601.   # end of 'vim/poster'
  602. fi
  603. if test -f 'vim/src/amiga.h' -a "${1}" != "-c" ; then 
  604.   echo shar: Will not clobber existing file \"'vim/src/amiga.h'\"
  605. else
  606.   echo shar: Extracting \"'vim/src/amiga.h'\" \(972 characters\)
  607.   sed "s/^X//" >'vim/src/amiga.h' <<'END_OF_FILE'
  608. X/* vi:ts=4:sw=4
  609. X *
  610. X * VIM - Vi IMproved        by Bram Moolenaar
  611. X *
  612. X * Read the file "credits.txt" for a list of people who contributed.
  613. X * Read the file "uganda.txt" for copying and usage conditions.
  614. X */
  615. X
  616. X/*
  617. X * Amiga Machine-dependent things
  618. X */
  619. X
  620. X/*
  621. X * Names for the EXRC, HELP and temporary files.
  622. X * Some of these may have been defined in the makefile.
  623. X */
  624. X
  625. X#ifndef SYSVIMRC_FILE
  626. X# define SYSVIMRC_FILE    "s:.vimrc"
  627. X#endif
  628. X
  629. X#ifndef SYSEXRC_FILE
  630. X# define SYSEXRC_FILE    "s:.exrc"
  631. X#endif
  632. X
  633. X#ifndef VIMRC_FILE
  634. X# define VIMRC_FILE        ".vimrc"
  635. X#endif
  636. X
  637. X#ifndef EXRC_FILE
  638. X# define EXRC_FILE        ".exrc"
  639. X#endif
  640. X
  641. X#ifndef VIM_HLP
  642. X# define VIM_HLP        "vim:vim.hlp"
  643. X#endif
  644. X
  645. X#ifndef DEF_DIR
  646. X# define DEF_DIR        "t:"
  647. X#endif
  648. X
  649. X#define TMPNAME1        "t:viXXXXXX"
  650. X#define TMPNAME2        "t:voXXXXXX"
  651. X#define TMPNAMELEN        12
  652. X
  653. X#ifndef MAXMEM
  654. X# define MAXMEM            256        /* use up to 256Kbyte for buffer */
  655. X#endif
  656. X#ifndef MAXMEMTOT
  657. X# define MAXMEMTOT        0        /* decide in set_init */
  658. X#endif
  659. X
  660. X#define BASENAMELEN        26        /* Amiga */
  661. END_OF_FILE
  662.   if test 972 -ne `wc -c <'vim/src/amiga.h'`; then
  663.     echo shar: \"'vim/src/amiga.h'\" unpacked with wrong size!
  664.   fi
  665.   # end of 'vim/src/amiga.h'
  666. fi
  667. if test -f 'vim/src/charset.c' -a "${1}" != "-c" ; then 
  668.   echo shar: Will not clobber existing file \"'vim/src/charset.c'\"
  669. else
  670.   echo shar: Extracting \"'vim/src/charset.c'\" \(1740 characters\)
  671.   sed "s/^X//" >'vim/src/charset.c' <<'END_OF_FILE'
  672. X/* vi:ts=4:sw=4
  673. X *
  674. X * VIM - Vi IMproved        by Bram Moolenaar
  675. X *
  676. X * Read the file "credits.txt" for a list of people who contributed.
  677. X * Read the file "uganda.txt" for copying and usage conditions.
  678. X */
  679. X
  680. X#include "vim.h"
  681. X#include "globals.h"
  682. X#include "proto.h"
  683. X#include "param.h"
  684. X
  685. X
  686. X    char_u *
  687. Xtranschar(c)
  688. X    int     c;
  689. X{
  690. X    static char_u buf[3];
  691. X
  692. X    if (c < ' ' || c == DEL)
  693. X    {
  694. X        if (c == NL)
  695. X            c = NUL;            /* we use newline in place of a NUL */
  696. X        buf[0] = '^';
  697. X        buf[1] = c ^ 0x40;        /* DEL displayed as ^? */
  698. X        buf[2] = NUL;
  699. X    }
  700. X    else if (c <= '~' || c > 0xa0 || p_gr)
  701. X    {
  702. X        buf[0] = c;
  703. X        buf[1] = NUL;
  704. X    }
  705. X    else
  706. X    {
  707. X        buf[0] = '~';
  708. X        buf[1] = c - 0x80 + '@';
  709. X        buf[2] = NUL;
  710. X    }
  711. X    return buf;
  712. X}
  713. X
  714. X/*
  715. X * return the number of characters 'c' will take on the screen
  716. X */
  717. X    int
  718. Xcharsize(c)
  719. X    int c;
  720. X{
  721. X    return ((c >= ' ' && (p_gr || c <= '~')) || c > 0xa0 ? 1 : 2);
  722. X}
  723. X
  724. X/*
  725. X * return the number of characters string 's' will take on the screen
  726. X */
  727. X    int
  728. Xstrsize(s)
  729. X    char_u *s;
  730. X{
  731. X    int    len = 0;
  732. X
  733. X    while (*s)
  734. X        len += charsize(*s++);
  735. X    return len;
  736. X}
  737. X
  738. X/*
  739. X * return the number of characters 'c' will take on the screen, taking
  740. X * into account the size of a tab
  741. X */
  742. X    int
  743. Xchartabsize(c, col)
  744. X    register int    c;
  745. X    long            col;
  746. X{
  747. X    if ((c >= ' ' && (c <= '~' || p_gr)) || c > 0xa0)
  748. X           return 1;
  749. X       else if (c == TAB && !curwin->w_p_list)
  750. X           return (int)(curbuf->b_p_ts - (col % curbuf->b_p_ts));
  751. X       else
  752. X        return 2;
  753. X}
  754. X
  755. X/*
  756. X * return TRUE if 'c' is an identifier character
  757. X */
  758. X    int
  759. Xisidchar(c)
  760. X    int c;
  761. X{
  762. X        return (
  763. X#ifdef __STDC__
  764. X                isalnum(c)
  765. X#else
  766. X                isalpha(c) || isdigit(c)
  767. X#endif
  768. X                || c == '_'
  769. X    /*
  770. X     * we also accept alhpa's with accents
  771. X     */
  772. X#ifdef MSDOS
  773. X                || (c >= 0x80 && c <= 0xa7) || (c >= 0xe0 && c <= 0xeb)
  774. X#else
  775. X                || (c >= 0xc0 && c <= 0xff)
  776. X#endif
  777. X                );
  778. X}
  779. END_OF_FILE
  780.   if test 1740 -ne `wc -c <'vim/src/charset.c'`; then
  781.     echo shar: \"'vim/src/charset.c'\" unpacked with wrong size!
  782.   fi
  783.   # end of 'vim/src/charset.c'
  784. fi
  785. if test -f 'vim/src/keymap.h' -a "${1}" != "-c" ; then 
  786.   echo shar: Will not clobber existing file \"'vim/src/keymap.h'\"
  787. else
  788.   echo shar: Extracting \"'vim/src/keymap.h'\" \(2098 characters\)
  789.   sed "s/^X//" >'vim/src/keymap.h' <<'END_OF_FILE'
  790. X/* vi:ts=4:sw=4
  791. X *
  792. X * VIM - Vi IMproved        by Bram Moolenaar
  793. X *
  794. X * Read the file "credits.txt" for a list of people who contributed.
  795. X * Read the file "uganda.txt" for copying and usage conditions.
  796. X */
  797. X
  798. X/*
  799. X * Keycode definitions for special keys
  800. X *
  801. X * On systems that have any of these keys, the routine 'inchar' in the
  802. X * machine-dependent code should return one of the codes here.
  803. X */
  804. X
  805. X/*
  806. X * On MSDOS we use other codes, because the codes 0x80 - 0xb0 are used
  807. X * for special characters. If this is changed also change the numbers in
  808. X * term.h and main.c.
  809. X */
  810. X#ifdef MSDOS
  811. X# define K_OFF 0x30
  812. X#else
  813. X# define K_OFF 0x00
  814. X#endif
  815. X
  816. X#define K_CCIRCM        0x1e    /* control circumflex */
  817. X
  818. X/*
  819. X * careful: the next entries must be in the same order as the termcap strings
  820. X * in term.h and the numbers must be consecutive (used by inchar()).
  821. X */
  822. X#define K_UARROW        (K_OFF + 0x80)
  823. X#define K_DARROW        (K_OFF + 0x81)
  824. X#define K_LARROW        (K_OFF + 0x82)
  825. X#define K_RARROW        (K_OFF + 0x83)
  826. X#define K_SUARROW        (K_OFF + 0x84)
  827. X#define K_SDARROW        (K_OFF + 0x85)
  828. X#define K_SLARROW        (K_OFF + 0x86)
  829. X#define K_SRARROW        (K_OFF + 0x87)
  830. X
  831. X#define K_F1            (K_OFF + 0x88)    /* function keys */
  832. X#define K_F2            (K_OFF + 0x89)
  833. X#define K_F3            (K_OFF + 0x8a)
  834. X#define K_F4            (K_OFF + 0x8b)
  835. X#define K_F5            (K_OFF + 0x8c)
  836. X#define K_F6            (K_OFF + 0x8d)
  837. X#define K_F7            (K_OFF + 0x8e)
  838. X#define K_F8            (K_OFF + 0x8f)
  839. X#define K_F9            (K_OFF + 0x90)
  840. X#define K_F10            (K_OFF + 0x91)
  841. X
  842. X#define K_SF1            (K_OFF + 0x92)    /* shifted function keys */
  843. X#define K_SF2            (K_OFF + 0x93)
  844. X#define K_SF3            (K_OFF + 0x94)
  845. X#define K_SF4            (K_OFF + 0x95)
  846. X#define K_SF5            (K_OFF + 0x96)
  847. X#define K_SF6            (K_OFF + 0x97)
  848. X#define K_SF7            (K_OFF + 0x98)
  849. X#define K_SF8            (K_OFF + 0x99)
  850. X#define K_SF9            (K_OFF + 0x9a)
  851. X#define K_SF10            (K_OFF + 0x9b)
  852. X
  853. X#define K_HELP            (K_OFF + 0x9c)
  854. X#define K_UNDO            (K_OFF + 0x9d)
  855. X
  856. X/*
  857. X * NULs cannot be in the input string, therefore CTRL-@ is replaced by K_ZERO.
  858. X * K_NUL is used for MSDOS extended keys (same value used in term.h).
  859. X */
  860. X#define K_NUL            (K_OFF + 0x9e)    /* for MSDOS: special key follows */
  861. X#define K_ZERO            (K_OFF + 0x9f)    /* replaces ^@ */
  862. END_OF_FILE
  863.   if test 2098 -ne `wc -c <'vim/src/keymap.h'`; then
  864.     echo shar: \"'vim/src/keymap.h'\" unpacked with wrong size!
  865.   fi
  866.   # end of 'vim/src/keymap.h'
  867. fi
  868. if test -f 'vim/src/macros.h' -a "${1}" != "-c" ; then 
  869.   echo shar: Will not clobber existing file \"'vim/src/macros.h'\"
  870. else
  871.   echo shar: Extracting \"'vim/src/macros.h'\" \(1239 characters\)
  872.   sed "s/^X//" >'vim/src/macros.h' <<'END_OF_FILE'
  873. X/* vi:ts=4:sw=4
  874. X *
  875. X * VIM - Vi IMproved        by Bram Moolenaar
  876. X *
  877. X * Read the file "credits.txt" for a list of people who contributed.
  878. X * Read the file "uganda.txt" for copying and usage conditions.
  879. X */
  880. X
  881. X/*
  882. X * macros.h: macro definitions for often used code
  883. X */
  884. X
  885. X/*
  886. X * pchar(lp, c) - put character 'c' at position 'lp'
  887. X */
  888. X#define pchar(lp, c) (*(ml_get_buf(curbuf, (lp).lnum, TRUE) + (lp).col) = (c))
  889. X
  890. X/*
  891. X * Position comparisons
  892. X */
  893. X#define lt(a, b) (((a).lnum != (b).lnum) \
  894. X                   ? ((a).lnum < (b).lnum) : ((a).col < (b).col))
  895. X
  896. X#define ltoreq(a, b) (((a).lnum != (b).lnum) \
  897. X                   ? ((a).lnum < (b).lnum) : ((a).col <= (b).col))
  898. X
  899. X#define equal(a, b) (((a).lnum == (b).lnum) && ((a).col == (b).col))
  900. X
  901. X/*
  902. X * lineempty() - return TRUE if the line is empty
  903. X */
  904. X#define lineempty(p) (*ml_get(p) == NUL)
  905. X
  906. X/*
  907. X * bufempty() - return TRUE if the file buffer is empty
  908. X */
  909. X#define bufempty() (curbuf->b_ml.ml_flags & ML_EMPTY)
  910. X
  911. X/*
  912. X * On some systems toupper()/tolower() only work on lower/uppercase characters
  913. X */
  914. X#if defined(sequent) || defined(DOMAIN) || !defined(__STDC__)
  915. X# define TO_UPPER(c)    (islower(c) ? toupper(c) : (c))
  916. X# define TO_LOWER(c)    (isupper(c) ? tolower(c) : (c))
  917. X#else
  918. X# define TO_UPPER        toupper
  919. X# define TO_LOWER        tolower
  920. X#endif
  921. END_OF_FILE
  922.   if test 1239 -ne `wc -c <'vim/src/macros.h'`; then
  923.     echo shar: \"'vim/src/macros.h'\" unpacked with wrong size!
  924.   fi
  925.   # end of 'vim/src/macros.h'
  926. fi
  927. if test -f 'vim/src/mkcmdtab.c' -a "${1}" != "-c" ; then 
  928.   echo shar: Will not clobber existing file \"'vim/src/mkcmdtab.c'\"
  929. else
  930.   echo shar: Extracting \"'vim/src/mkcmdtab.c'\" \(2079 characters\)
  931.   sed "s/^X//" >'vim/src/mkcmdtab.c' <<'END_OF_FILE'
  932. X/* vi:ts=4:sw=4
  933. X *
  934. X * VIM - Vi IMproved        by Bram Moolenaar
  935. X *
  936. X * Read the file "credits.txt" for a list of people who contributed.
  937. X * Read the file "uganda.txt" for copying and usage conditions.
  938. X */
  939. X
  940. X/*
  941. X * mkcmdtab.c: separate program that reads cmdtab.tab and produces cmdtab.h
  942. X *
  943. X *    call with: mkcmdtab cmdtab.tab cmdtab.h
  944. X */
  945. X
  946. X#include "vim.h"
  947. X
  948. X#if defined(UTS4)
  949. X    int
  950. X#else
  951. X    void
  952. X#endif
  953. Xmain(argc, argv)
  954. X    int        argc;
  955. X    char    **argv;
  956. X{
  957. X    register int    c;
  958. X    char            buffer[100];
  959. X    int                count;
  960. X    int                i;
  961. X    FILE            *ifp, *ofp;
  962. X
  963. X    if (argc != 3)
  964. X    {
  965. X        fprintf(stderr, "Usage: mkcmdtab cmdtab.tab cmdtab.h\n");
  966. X        exit(10);
  967. X    }
  968. X    ifp = fopen(argv[1], "r");
  969. X    if (ifp == NULL)
  970. X    {
  971. X        perror(argv[1]);
  972. X        exit(10);
  973. X    }
  974. X    ofp = fopen(argv[2], "w");
  975. X    if (ofp == NULL)
  976. X    {
  977. X        perror(argv[2]);
  978. X        exit(10);
  979. X    }
  980. X
  981. X    while ((c = getc(ifp)) != '|' && c != EOF)
  982. X        putc(c, ofp);
  983. X    fprintf(ofp, "THIS FILE IS AUTOMATICALLY PRODUCED - DO NOT EDIT");
  984. X    while ((c = getc(ifp)) != '|' && c != EOF)
  985. X        ;
  986. X    while ((c = getc(ifp)) != '|' && c != EOF)
  987. X        putc(c, ofp);
  988. X
  989. X    count = 0;
  990. X    while ((c = getc(ifp)) != '|' && c != EOF)
  991. X    {
  992. X        putc(c, ofp);
  993. X        while ((c = getc(ifp)) != '"' && c != EOF)
  994. X            putc(c, ofp);
  995. X        putc(c, ofp);
  996. X
  997. X        i = 0;
  998. X        while ((c = getc(ifp)) != '"' && c != EOF)
  999. X        {
  1000. X            putc(c, ofp);
  1001. X            buffer[i++] = c;
  1002. X        }
  1003. X        putc(c, ofp);
  1004. X        buffer[i] = 0;
  1005. X
  1006. X        while ((c = getc(ifp)) != '\n' && c != EOF)
  1007. X            putc(c, ofp);
  1008. X        putc(c, ofp);
  1009. X
  1010. X        switch (buffer[0])
  1011. X        {
  1012. X            case '@':    strcpy(buffer, "at");
  1013. X                        break;
  1014. X            case '!':    strcpy(buffer, "bang");
  1015. X                        break;
  1016. X            case '<':    strcpy(buffer, "lshift");
  1017. X                        break;
  1018. X            case '>':    strcpy(buffer, "rshift");
  1019. X                        break;
  1020. X            case '=':    strcpy(buffer, "equal");
  1021. X                        break;
  1022. X            case '&':    strcpy(buffer, "and");
  1023. X                        break;
  1024. X            case '~':    strcpy(buffer, "tilde");
  1025. X                        break;
  1026. X            case '#':    strcpy(buffer, "pound");
  1027. X                        break;
  1028. X        }
  1029. X                    
  1030. X        fprintf(ofp, "#define CMD_%s %d\n", buffer, count++);
  1031. X    }
  1032. X
  1033. X    fprintf(ofp, "#define CMD_SIZE %d\n", count);
  1034. X
  1035. X    while ((c = getc(ifp)) != '|' && c != EOF)
  1036. X        putc(c, ofp);
  1037. X
  1038. X    if (c != '|')
  1039. X    {
  1040. X        fprintf(stderr, "not enough |'s\n");
  1041. X        exit(1);
  1042. X    }
  1043. X    exit(0);
  1044. X}
  1045. END_OF_FILE
  1046.   if test 2079 -ne `wc -c <'vim/src/mkcmdtab.c'`; then
  1047.     echo shar: \"'vim/src/mkcmdtab.c'\" unpacked with wrong size!
  1048.   fi
  1049.   # end of 'vim/src/mkcmdtab.c'
  1050. fi
  1051. if test -f 'vim/src/msdos.h' -a "${1}" != "-c" ; then 
  1052.   echo shar: Will not clobber existing file \"'vim/src/msdos.h'\"
  1053. else
  1054.   echo shar: Extracting \"'vim/src/msdos.h'\" \(1318 characters\)
  1055.   sed "s/^X//" >'vim/src/msdos.h' <<'END_OF_FILE'
  1056. X/* vi:ts=4:sw=4
  1057. X *
  1058. X * VIM - Vi IMproved        by Bram Moolenaar
  1059. X *
  1060. X * Read the file "credits.txt" for a list of people who contributed.
  1061. X * Read the file "uganda.txt" for copying and usage conditions.
  1062. X */
  1063. X
  1064. X/*
  1065. X * MSDOS Machine-dependent things.
  1066. X */
  1067. X
  1068. X/*
  1069. X * Names for the EXRC, HELP and temporary files.
  1070. X * Some of these may have been defined in the makefile.
  1071. X */
  1072. X
  1073. X#ifndef SYSVIMRC_FILE
  1074. X# define SYSVIMRC_FILE    "$VIM\\_vimrc"
  1075. X#endif
  1076. X
  1077. X#ifndef SYSEXRC_FILE
  1078. X# define SYSEXRC_FILE    "$VIM\\_exrc"
  1079. X#endif
  1080. X
  1081. X#ifndef VIMRC_FILE
  1082. X# define VIMRC_FILE        "_vimrc"
  1083. X#endif
  1084. X
  1085. X#ifndef EXRC_FILE
  1086. X# define EXRC_FILE        "_exrc"
  1087. X#endif
  1088. X
  1089. X#ifndef VIM_HLP
  1090. X# define VIM_HLP        "$VIM\\vim.hlp"
  1091. X#endif
  1092. X
  1093. X#ifndef DEF_DIR
  1094. X# define DEF_DIR        "c:\\tmp"
  1095. X#endif
  1096. X
  1097. X#define TMPNAME1        "viXXXXXX"        /* put it in current dir */
  1098. X#define TMPNAME2        "voXXXXXX"        /*  is there a better place? */
  1099. X#define TMPNAMELEN        10
  1100. X
  1101. X#ifndef MAXMEM
  1102. X# define MAXMEM            256                /* use up to 256Kbyte for buffer */
  1103. X#endif
  1104. X#ifndef MAXMEMTOT
  1105. X# define MAXMEMTOT        0                /* decide in set_init */
  1106. X#endif
  1107. X
  1108. X#define BASENAMELEN        8                /* length of base of file name */
  1109. X
  1110. X/*
  1111. X * MSDOS Machine-dependent routines.
  1112. X */
  1113. X
  1114. X#ifdef remove
  1115. X# undef remove                   /* MSDOS remove()s when not readonly */
  1116. X#endif
  1117. X#define remove vim_remove
  1118. X
  1119. X/* use chdir() that also changes the default drive */
  1120. X#define chdir vim_chdir
  1121. END_OF_FILE
  1122.   if test 1318 -ne `wc -c <'vim/src/msdos.h'`; then
  1123.     echo shar: \"'vim/src/msdos.h'\" unpacked with wrong size!
  1124.   fi
  1125.   # end of 'vim/src/msdos.h'
  1126. fi
  1127. if test -f 'vim/src/ops.h' -a "${1}" != "-c" ; then 
  1128.   echo shar: Will not clobber existing file \"'vim/src/ops.h'\"
  1129. else
  1130.   echo shar: Extracting \"'vim/src/ops.h'\" \(1805 characters\)
  1131.   sed "s/^X//" >'vim/src/ops.h' <<'END_OF_FILE'
  1132. X/* vi:ts=4:sw=4
  1133. X *
  1134. X * VIM - Vi IMproved        by Bram Moolenaar
  1135. X *
  1136. X * Read the file "credits.txt" for a list of people who contributed.
  1137. X * Read the file "uganda.txt" for copying and usage conditions.
  1138. X */
  1139. X
  1140. X/*
  1141. X * ops.h: things shared between normal.c, cmdline.c and ops.c
  1142. X */
  1143. X
  1144. X/*
  1145. X * Operators
  1146. X */
  1147. X#define NOP     0                /* no pending operation */
  1148. X#define DELETE    1
  1149. X#define YANK    2
  1150. X#define CHANGE    3
  1151. X#define LSHIFT    4
  1152. X#define RSHIFT    5
  1153. X#define FILTER    6
  1154. X#define TILDE    7
  1155. X#define INDENT    8
  1156. X#define FORMAT    9
  1157. X#define COLON    10
  1158. X#define UPPER    11
  1159. X#define LOWER    12
  1160. X
  1161. X/*
  1162. X * operator characters; the order must correspond to the defines above
  1163. X */
  1164. XEXTERN char_u *opchars INIT(= (char_u *)"dyc<>!~=Q:Uu");
  1165. X
  1166. X/*
  1167. X * When a cursor motion command is made, it is marked as being a character or
  1168. X * line oriented motion. Then, if an operator is in effect, the operation
  1169. X * becomes character or line oriented accordingly.
  1170. X *
  1171. X * Character motions are marked as being inclusive or not. Most char. motions
  1172. X * are inclusive, but some (e.g. 'w') are not.
  1173. X *
  1174. X * Generally speaking, every command in normal() should either clear any pending
  1175. X * operator (with CLEAROP), or set the motion type variable.
  1176. X */
  1177. X
  1178. X/*
  1179. X * Motion types
  1180. X */
  1181. X#define MBAD    (-1)            /* 'bad' motion type marks unusable yank buf */
  1182. X#define MCHAR    0
  1183. X#define MLINE    1
  1184. X#define MBLOCK    2
  1185. X
  1186. XEXTERN int        operator INIT(= NOP);    /* current pending operator */
  1187. XEXTERN int        mtype;                    /* type of the current cursor motion */
  1188. XEXTERN int        mincl;                    /* true if char motion is inclusive */
  1189. XEXTERN colnr_t    startvcol;                /* start col for block mode operator */
  1190. XEXTERN colnr_t    endvcol;                /* end col for block mode operator */
  1191. XEXTERN long        nlines;                    /* lines between startop and endop + 1 */
  1192. XEXTERN int        yankbuffer INIT(= 0);    /* current yank buffer */
  1193. XEXTERN int        no_op;                    /* startop and endop the same */
  1194. END_OF_FILE
  1195.   if test 1805 -ne `wc -c <'vim/src/ops.h'`; then
  1196.     echo shar: \"'vim/src/ops.h'\" unpacked with wrong size!
  1197.   fi
  1198.   # end of 'vim/src/ops.h'
  1199. fi
  1200. if test -f 'vim/src/proto.h' -a "${1}" != "-c" ; then 
  1201.   echo shar: Will not clobber existing file \"'vim/src/proto.h'\"
  1202. else
  1203.   echo shar: Extracting \"'vim/src/proto.h'\" \(1573 characters\)
  1204.   sed "s/^X//" >'vim/src/proto.h' <<'END_OF_FILE'
  1205. X/* vi:ts=4:sw=4
  1206. X *
  1207. X * VIM - Vi IMproved        by Bram Moolenaar
  1208. X *
  1209. X * Read the file "credits.txt" for a list of people who contributed.
  1210. X * Read the file "uganda.txt" for copying and usage conditions.
  1211. X */
  1212. X
  1213. X/*
  1214. X * proto.h: include the (automatically generated) function prototypes
  1215. X *
  1216. X * the proto/xxx.pro files are automatically generated when using Manx/Aztec C.
  1217. X * For other compilers you will have to edit them.
  1218. X */
  1219. X
  1220. X#include "regexp.h"        /* for struct regexp */
  1221. X
  1222. X/*
  1223. X * Machine-dependent routines.
  1224. X */
  1225. X#ifdef AMIGA
  1226. X# include "proto/amiga.pro"
  1227. X#endif
  1228. X#ifdef UNIX
  1229. X# include "proto/unix.pro"
  1230. X#endif
  1231. X#ifdef MSDOS
  1232. X# include "proto/msdos.pro"
  1233. X#endif
  1234. X
  1235. X#include "proto/alloc.pro"
  1236. X#include "proto/buffer.pro"
  1237. X#include "proto/charset.pro"
  1238. X#include "proto/cmdcmds.pro"
  1239. X#include "proto/cmdline.pro"
  1240. X#include "proto/csearch.pro"
  1241. X#include "proto/digraph.pro"
  1242. X#include "proto/edit.pro"
  1243. X#include "proto/fileio.pro"
  1244. X#include "proto/getchar.pro"
  1245. X#include "proto/help.pro"
  1246. X#include "proto/linefunc.pro"
  1247. X#include "proto/main.pro"
  1248. X#include "proto/mark.pro"
  1249. X
  1250. X#ifndef MESSAGE
  1251. Xvoid smsg __PARMS((char_u *, ...));    /* cannot be produced automatically */
  1252. X#endif
  1253. X#include "proto/memfile.pro"
  1254. X#include "proto/memline.pro"
  1255. X#include "proto/message.pro"
  1256. X#include "proto/misccmds.pro"
  1257. X#include "proto/normal.pro"
  1258. X#include "proto/ops.pro"
  1259. X#include "proto/param.pro"
  1260. X#include "proto/quickfix.pro"
  1261. X#include "proto/regexp.pro"
  1262. X#include "proto/regsub.pro"
  1263. X#include "proto/screen.pro"
  1264. X#include "proto/search.pro"
  1265. X#include "proto/tag.pro"
  1266. X#include "proto/term.pro"
  1267. X#include "proto/undo.pro"
  1268. X#include "proto/window.pro"
  1269. END_OF_FILE
  1270.   if test 1573 -ne `wc -c <'vim/src/proto.h'`; then
  1271.     echo shar: \"'vim/src/proto.h'\" unpacked with wrong size!
  1272.   fi
  1273.   # end of 'vim/src/proto.h'
  1274. fi
  1275. if test -f 'vim/src/proto/amiga.pro' -a "${1}" != "-c" ; then 
  1276.   echo shar: Will not clobber existing file \"'vim/src/proto/amiga.pro'\"
  1277. else
  1278.   echo shar: Extracting \"'vim/src/proto/amiga.pro'\" \(1580 characters\)
  1279.   sed "s/^X//" >'vim/src/proto/amiga.pro' <<'END_OF_FILE'
  1280. X/* amiga.c */
  1281. Xvoid win_resize_on __PARMS((void));
  1282. Xvoid win_resize_off __PARMS((void));
  1283. Xvoid mch_write __PARMS((unsigned char *p, int len));
  1284. Xint GetChars __PARMS((unsigned char *buf, int maxlen, int time));
  1285. Xint mch_char_avail __PARMS((void));
  1286. Xvoid sleep __PARMS((int n));
  1287. Xlong mch_avail_mem __PARMS((int special));
  1288. Xvoid vim_delay __PARMS((void));
  1289. Xvoid mch_suspend __PARMS((void));
  1290. Xvoid mch_windinit __PARMS((void));
  1291. Xvoid check_win __PARMS((int argc, char **argv));
  1292. Xvoid fname_case __PARMS((unsigned char *name));
  1293. Xvoid mch_settitle __PARMS((unsigned char *title, unsigned char *icon));
  1294. Xvoid mch_restore_title __PARMS((int which));
  1295. Xint vim_dirname __PARMS((unsigned char *buf, int len));
  1296. Xint FullName __PARMS((unsigned char *fname, unsigned char *buf, int len));
  1297. Xint isFullName __PARMS((unsigned char *fname));
  1298. Xlong getperm __PARMS((unsigned char *name));
  1299. Xint setperm __PARMS((unsigned char *name, long perm));
  1300. Xint isdir __PARMS((unsigned char *name));
  1301. Xvoid mch_windexit __PARMS((int r));
  1302. Xvoid mch_settmode __PARMS((int raw));
  1303. Xint mch_screenmode __PARMS((unsigned char *arg));
  1304. Xint mch_get_winsize __PARMS((void));
  1305. Xvoid mch_set_winsize __PARMS((void));
  1306. Xint call_shell __PARMS((unsigned char *cmd, int filter, int cooked));
  1307. Xvoid breakcheck __PARMS((void));
  1308. Xlong Chk_Abort __PARMS((void));
  1309. Xint ExpandWildCards __PARMS((int num_pat, unsigned char **pat, int *num_file, unsigned char ***file, int files_only, int list_notfound));
  1310. Xvoid FreeWild __PARMS((int num, unsigned char **file));
  1311. Xint has_wildcard __PARMS((unsigned char *p));
  1312. Xunsigned char *vimgetenv __PARMS((unsigned char *var));
  1313. END_OF_FILE
  1314.   if test 1580 -ne `wc -c <'vim/src/proto/amiga.pro'`; then
  1315.     echo shar: \"'vim/src/proto/amiga.pro'\" unpacked with wrong size!
  1316.   fi
  1317.   # end of 'vim/src/proto/amiga.pro'
  1318. fi
  1319. if test -f 'vim/src/proto/getchar.pro' -a "${1}" != "-c" ; then 
  1320.   echo shar: Will not clobber existing file \"'vim/src/proto/getchar.pro'\"
  1321. else
  1322.   echo shar: Extracting \"'vim/src/proto/getchar.pro'\" \(1160 characters\)
  1323.   sed "s/^X//" >'vim/src/proto/getchar.pro' <<'END_OF_FILE'
  1324. X/* getchar.c */
  1325. Xunsigned char *get_recorded __PARMS((void));
  1326. Xunsigned char *get_inserted __PARMS((void));
  1327. Xint stuff_empty __PARMS((void));
  1328. Xvoid flush_buffers __PARMS((int typeahead));
  1329. Xvoid ResetRedobuff __PARMS((void));
  1330. Xvoid AppendToRedobuff __PARMS((unsigned char *s));
  1331. Xvoid AppendCharToRedobuff __PARMS((int c));
  1332. Xvoid AppendNumberToRedobuff __PARMS((long n));
  1333. Xvoid stuffReadbuff __PARMS((unsigned char *s));
  1334. Xvoid stuffcharReadbuff __PARMS((int c));
  1335. Xvoid stuffnumReadbuff __PARMS((long n));
  1336. Xvoid copy_redo __PARMS((void));
  1337. Xint start_redo __PARMS((long count));
  1338. Xint start_redo_ins __PARMS((void));
  1339. Xvoid set_redo_ins __PARMS((void));
  1340. Xvoid stop_redo_ins __PARMS((void));
  1341. Xint ins_typestr __PARMS((unsigned char *str, int noremap));
  1342. Xvoid del_typestr __PARMS((int len));
  1343. Xint openscript __PARMS((unsigned char *name));
  1344. Xvoid updatescript __PARMS((int c));
  1345. Xint vgetc __PARMS((void));
  1346. Xint vpeekc __PARMS((void));
  1347. Xint domap __PARMS((int maptype, unsigned char *keys, int mode));
  1348. Xint check_abbr __PARMS((int c, unsigned char *ptr, int col, int mincol));
  1349. Xint makemap __PARMS((struct __stdio *fd));
  1350. Xint putescstr __PARMS((struct __stdio *fd, unsigned char *str, int set));
  1351. END_OF_FILE
  1352.   if test 1160 -ne `wc -c <'vim/src/proto/getchar.pro'`; then
  1353.     echo shar: \"'vim/src/proto/getchar.pro'\" unpacked with wrong size!
  1354.   fi
  1355.   # end of 'vim/src/proto/getchar.pro'
  1356. fi
  1357. if test -f 'vim/src/proto/memfile.pro' -a "${1}" != "-c" ; then 
  1358.   echo shar: Will not clobber existing file \"'vim/src/proto/memfile.pro'\"
  1359. else
  1360.   echo shar: Extracting \"'vim/src/proto/memfile.pro'\" \(853 characters\)
  1361.   sed "s/^X//" >'vim/src/proto/memfile.pro' <<'END_OF_FILE'
  1362. X/* memfile.c */
  1363. Xstruct memfile *mf_open __PARMS((unsigned char *fname, int new, int fail_nofile));
  1364. Xint mf_open_file __PARMS((struct memfile *mfp, unsigned char *fname));
  1365. Xvoid mf_close __PARMS((struct memfile *mfp, int delete));
  1366. Xstruct block_hdr *mf_new __PARMS((struct memfile *mfp, int negative, int page_count));
  1367. Xstruct block_hdr *mf_get __PARMS((struct memfile *mfp, long nr, int page_count));
  1368. Xvoid mf_put __PARMS((struct memfile *mfp, struct block_hdr *hp, int dirty, int infile));
  1369. Xvoid mf_free __PARMS((struct memfile *mfp, struct block_hdr *hp));
  1370. Xint mf_sync __PARMS((struct memfile *mfp, int all, int check_char));
  1371. Xint mf_release_all __PARMS((void));
  1372. Xlong mf_trans_del __PARMS((struct memfile *mfp, long old));
  1373. Xvoid mf_fullname __PARMS((struct memfile *mfp));
  1374. Xint mf_need_trans __PARMS((struct memfile *mfp));
  1375. Xvoid mf_statistics __PARMS((void));
  1376. END_OF_FILE
  1377.   if test 853 -ne `wc -c <'vim/src/proto/memfile.pro'`; then
  1378.     echo shar: \"'vim/src/proto/memfile.pro'\" unpacked with wrong size!
  1379.   fi
  1380.   # end of 'vim/src/proto/memfile.pro'
  1381. fi
  1382. if test -f 'vim/src/proto/memline.pro' -a "${1}" != "-c" ; then 
  1383.   echo shar: Will not clobber existing file \"'vim/src/proto/memline.pro'\"
  1384. else
  1385.   echo shar: Extracting \"'vim/src/proto/memline.pro'\" \(959 characters\)
  1386.   sed "s/^X//" >'vim/src/proto/memline.pro' <<'END_OF_FILE'
  1387. X/* memline.c */
  1388. Xint ml_open __PARMS((void));
  1389. Xvoid ml_open_files __PARMS((void));
  1390. Xvoid ml_close __PARMS((struct buffer *buf));
  1391. Xvoid ml_close_all __PARMS((void));
  1392. Xvoid ml_timestamp __PARMS((struct buffer *buf));
  1393. Xvoid ml_recover __PARMS((void));
  1394. Xvoid ml_sync_all __PARMS((int check_file));
  1395. Xvoid ml_preserve __PARMS((struct buffer *buf, int message));
  1396. Xunsigned char *ml_get __PARMS((long lnum));
  1397. Xunsigned char *ml_get_pos __PARMS((struct fpos *pos));
  1398. Xunsigned char *ml_get_cursor __PARMS((void));
  1399. Xunsigned char *ml_get_buf __PARMS((struct buffer *buf, long lnum, int will_change));
  1400. Xint ml_line_alloced __PARMS((void));
  1401. Xint ml_append __PARMS((long lnum, unsigned char *line, unsigned int len, int newfile));
  1402. Xint ml_replace __PARMS((long lnum, unsigned char *line, int copy));
  1403. Xint ml_delete __PARMS((long lnum));
  1404. Xvoid ml_setmarked __PARMS((long lnum));
  1405. Xlong ml_firstmarked __PARMS((void));
  1406. Xint ml_has_mark __PARMS((long lnum));
  1407. Xvoid ml_clearmarked __PARMS((void));
  1408. END_OF_FILE
  1409.   if test 959 -ne `wc -c <'vim/src/proto/memline.pro'`; then
  1410.     echo shar: \"'vim/src/proto/memline.pro'\" unpacked with wrong size!
  1411.   fi
  1412.   # end of 'vim/src/proto/memline.pro'
  1413. fi
  1414. if test -f 'vim/src/proto/misccmds.pro' -a "${1}" != "-c" ; then 
  1415.   echo shar: Will not clobber existing file \"'vim/src/proto/misccmds.pro'\"
  1416. else
  1417.   echo shar: Extracting \"'vim/src/proto/misccmds.pro'\" \(1432 characters\)
  1418.   sed "s/^X//" >'vim/src/proto/misccmds.pro' <<'END_OF_FILE'
  1419. X/* misccmds.c */
  1420. Xint get_indent __PARMS((void));
  1421. Xvoid set_indent __PARMS((int size, int delete));
  1422. Xint Opencmd __PARMS((int dir, int redraw, int delspaces));
  1423. Xint plines __PARMS((long p));
  1424. Xint plines_win __PARMS((struct window *wp, long p));
  1425. Xint plines_m __PARMS((long first, long last));
  1426. Xint plines_m_win __PARMS((struct window *wp, long first, long last));
  1427. Xvoid inschar __PARMS((int c));
  1428. Xvoid insstr __PARMS((unsigned char *s));
  1429. Xint delchar __PARMS((int fixpos));
  1430. Xvoid dellines __PARMS((long nlines, int dowindow, int undo));
  1431. Xint gchar __PARMS((struct fpos *pos));
  1432. Xint gchar_cursor __PARMS((void));
  1433. Xvoid pchar_cursor __PARMS((int c));
  1434. Xint inindent __PARMS((void));
  1435. Xvoid skipspace __PARMS((unsigned char **pp));
  1436. Xvoid skiptospace __PARMS((unsigned char **pp));
  1437. Xvoid skiptodigit __PARMS((unsigned char **pp));
  1438. Xlong getdigits __PARMS((unsigned char **pp));
  1439. Xunsigned char *plural __PARMS((long n));
  1440. Xvoid set_Changed __PARMS((void));
  1441. Xvoid unset_Changed __PARMS((struct buffer *buf));
  1442. Xvoid change_warning __PARMS((void));
  1443. Xint ask_yesno __PARMS((unsigned char *str));
  1444. Xvoid msgmore __PARMS((long n));
  1445. Xvoid beep __PARMS((void));
  1446. Xvoid expand_env __PARMS((unsigned char *src, unsigned char *dst, int dstlen));
  1447. Xvoid home_replace __PARMS((unsigned char *src, unsigned char *dst, int dstlen));
  1448. Xint fullpathcmp __PARMS((unsigned char *s1, unsigned char *s2));
  1449. Xunsigned char *gettail __PARMS((unsigned char *fname));
  1450. Xint ispathsep __PARMS((int c));
  1451. END_OF_FILE
  1452.   if test 1432 -ne `wc -c <'vim/src/proto/misccmds.pro'`; then
  1453.     echo shar: \"'vim/src/proto/misccmds.pro'\" unpacked with wrong size!
  1454.   fi
  1455.   # end of 'vim/src/proto/misccmds.pro'
  1456. fi
  1457. if test -f 'vim/src/proto/msdos.pro' -a "${1}" != "-c" ; then 
  1458.   echo shar: Will not clobber existing file \"'vim/src/proto/msdos.pro'\"
  1459. else
  1460.   echo shar: Extracting \"'vim/src/proto/msdos.pro'\" \(1441 characters\)
  1461.   sed "s/^X//" >'vim/src/proto/msdos.pro' <<'END_OF_FILE'
  1462. X/* vi:ts=4:sw=4
  1463. X *
  1464. X * VIM - Vi IMproved        by Bram Moolenaar
  1465. X *
  1466. X * Read the file "credits.txt" for a list of people who contributed.
  1467. X * Read the file "uganda.txt" for copying and usage conditions.
  1468. X */
  1469. X
  1470. X/* prototypes from msdos.c */
  1471. Xlong    mch_avail_mem __ARGS((int));
  1472. Xvoid    vim_delay __ARGS((void));
  1473. Xint        vim_remove __ARGS((char_u *));
  1474. Xvoid    mch_write __ARGS((char_u *, int));
  1475. Xint     GetChars __ARGS((char_u *, int, int));
  1476. Xint        mch_char_avail __ARGS((void));
  1477. Xvoid    mch_suspend __ARGS((void));
  1478. Xvoid    mch_windinit __ARGS((void));
  1479. Xvoid    check_win __ARGS((int, char **));
  1480. Xvoid    fname_case __ARGS((char_u *));
  1481. Xvoid    mch_settitle __ARGS((char_u *, char_u *));
  1482. Xvoid    mch_restore_title __PARMS((int which));
  1483. Xint        vim_dirname __ARGS((char_u *, int));
  1484. Xint        FullName __ARGS((char_u *, char_u *, int));
  1485. Xint        isFullName __ARGS((char_u *));
  1486. Xlong    getperm __ARGS((char_u *));
  1487. Xint        setperm __ARGS((char_u *, long));
  1488. Xint        isdir __ARGS((char_u *));
  1489. Xvoid    mch_windexit __ARGS((int));
  1490. Xvoid    mch_settmode __ARGS((int));
  1491. Xint        mch_screenmode __ARGS((char_u *));
  1492. Xint        mch_get_winsize __ARGS((void));
  1493. Xvoid    set_window __ARGS((void));
  1494. Xvoid    mch_set_winsize __ARGS((void));
  1495. Xint        call_shell __ARGS((char_u *, int, int));
  1496. Xvoid    breakcheck __ARGS((void));
  1497. Xchar_u    *modname __ARGS((char_u *, char_u *));
  1498. Xint        has_wildcard __ARGS((char_u *));
  1499. Xint        ExpandWildCards __ARGS((int, char_u **, int *, char_u ***, int, int));
  1500. Xvoid    FreeWild __ARGS((int, char_u **));
  1501. Xint        vim_chdir __ARGS((char_u *));
  1502. END_OF_FILE
  1503.   if test 1441 -ne `wc -c <'vim/src/proto/msdos.pro'`; then
  1504.     echo shar: \"'vim/src/proto/msdos.pro'\" unpacked with wrong size!
  1505.   fi
  1506.   # end of 'vim/src/proto/msdos.pro'
  1507. fi
  1508. if test -f 'vim/src/proto/ops.pro' -a "${1}" != "-c" ; then 
  1509.   echo shar: Will not clobber existing file \"'vim/src/proto/ops.pro'\"
  1510. else
  1511.   echo shar: Extracting \"'vim/src/proto/ops.pro'\" \(886 characters\)
  1512.   sed "s/^X//" >'vim/src/proto/ops.pro' <<'END_OF_FILE'
  1513. X/* ops.c */
  1514. Xvoid doshift __PARMS((int op, int curs_top, int amount));
  1515. Xvoid shift_line __PARMS((int left, int round, int amount));
  1516. Xint is_yank_buffer __PARMS((int c, int write));
  1517. Xint dorecord __PARMS((int c));
  1518. Xint doexecbuf __PARMS((int c));
  1519. Xint insertbuf __PARMS((int c));
  1520. Xvoid dodelete __PARMS((void));
  1521. Xvoid dotilde __PARMS((void));
  1522. Xvoid swapchar __PARMS((struct fpos *pos));
  1523. Xvoid dochange __PARMS((void));
  1524. Xvoid init_yank __PARMS((void));
  1525. Xint doyank __PARMS((int deleting));
  1526. Xvoid doput __PARMS((int dir, long count, int fix_indent));
  1527. Xvoid dodis __PARMS((void));
  1528. Xvoid dis_msg __PARMS((unsigned char *p, int skip_esc));
  1529. Xvoid dodojoin __PARMS((long count, int insert_space, int redraw));
  1530. Xint dojoin __PARMS((int insert_space, int redraw));
  1531. Xvoid doformat __PARMS((void));
  1532. Xvoid startinsert __PARMS((int initstr, int startln, long count));
  1533. Xint doaddsub __PARMS((int command, long Prenum1));
  1534. END_OF_FILE
  1535.   if test 886 -ne `wc -c <'vim/src/proto/ops.pro'`; then
  1536.     echo shar: \"'vim/src/proto/ops.pro'\" unpacked with wrong size!
  1537.   fi
  1538.   # end of 'vim/src/proto/ops.pro'
  1539. fi
  1540. if test -f 'vim/src/proto/screen.pro' -a "${1}" != "-c" ; then 
  1541.   echo shar: Will not clobber existing file \"'vim/src/proto/screen.pro'\"
  1542. else
  1543.   echo shar: Extracting \"'vim/src/proto/screen.pro'\" \(1485 characters\)
  1544.   sed "s/^X//" >'vim/src/proto/screen.pro' <<'END_OF_FILE'
  1545. X/* screen.c */
  1546. Xvoid updateline __PARMS((void));
  1547. Xvoid updateScreen __PARMS((int type));
  1548. Xvoid win_update __PARMS((struct window *wp));
  1549. Xvoid status_redraw_all __PARMS((void));
  1550. Xvoid win_redr_status __PARMS((struct window *wp));
  1551. Xvoid screen_outchar __PARMS((int c, int row, int col));
  1552. Xvoid screen_msg __PARMS((unsigned char *msg, int row, int col));
  1553. Xvoid screen_start __PARMS((void));
  1554. Xint set_highlight __PARMS((int context));
  1555. Xvoid start_highlight __PARMS((void));
  1556. Xvoid stop_highlight __PARMS((void));
  1557. Xvoid screen_fill __PARMS((int start_row, int end_row, int start_col, int end_col, int c1, int c2));
  1558. Xvoid comp_Botline_all __PARMS((void));
  1559. Xvoid comp_Botline __PARMS((struct window *wp));
  1560. Xvoid screenclear __PARMS((void));
  1561. Xvoid check_cursor __PARMS((void));
  1562. Xvoid cursupdate __PARMS((void));
  1563. Xvoid curs_columns __PARMS((int scroll));
  1564. Xint getvcol __PARMS((struct window *wp, struct fpos *pos, int type));
  1565. Xvoid scrolldown __PARMS((long nlines));
  1566. Xvoid scrollup __PARMS((long nlines));
  1567. Xint win_ins_lines __PARMS((struct window *wp, int row, int nlines, int invalid, int mayclear));
  1568. Xint win_del_lines __PARMS((struct window *wp, int row, int nlines, int invalid, int mayclear));
  1569. Xvoid win_rest_invalid __PARMS((struct window *wp));
  1570. Xint screen_del_lines __PARMS((int off, int row, int nlines, int end));
  1571. Xvoid showmode __PARMS((void));
  1572. Xvoid delmode __PARMS((void));
  1573. Xvoid showruler __PARMS((int always));
  1574. Xvoid win_redr_ruler __PARMS((struct window *wp, int always));
  1575. Xint screen_valid __PARMS((void));
  1576. END_OF_FILE
  1577.   if test 1485 -ne `wc -c <'vim/src/proto/screen.pro'`; then
  1578.     echo shar: \"'vim/src/proto/screen.pro'\" unpacked with wrong size!
  1579.   fi
  1580.   # end of 'vim/src/proto/screen.pro'
  1581. fi
  1582. if test -f 'vim/src/proto/search.pro' -a "${1}" != "-c" ; then 
  1583.   echo shar: Will not clobber existing file \"'vim/src/proto/search.pro'\"
  1584. else
  1585.   echo shar: Extracting \"'vim/src/proto/search.pro'\" \(833 characters\)
  1586.   sed "s/^X//" >'vim/src/proto/search.pro' <<'END_OF_FILE'
  1587. X/* search.c */
  1588. Xstruct regexp *myregcomp __PARMS((unsigned char *pat, int sub_cmd, int which_pat));
  1589. Xint searchit __PARMS((struct fpos *pos, int dir, unsigned char *str, long count, int end, int message));
  1590. Xint dosearch __PARMS((int dirc, unsigned char *str, int reverse, long count, int echo, int message));
  1591. Xint searchc __PARMS((int c, int dir, int type, long count));
  1592. Xstruct fpos *showmatch __PARMS((int initc));
  1593. Xint findfunc __PARMS((int dir, int what, long count));
  1594. Xint findsent __PARMS((int dir, long count));
  1595. Xint findpar __PARMS((int dir, long count, int what, int both));
  1596. Xint startPS __PARMS((long lnum, int para, int both));
  1597. Xint fwd_word __PARMS((long count, int type, int eol));
  1598. Xint bck_word __PARMS((long count, int type));
  1599. Xint end_word __PARMS((long count, int type, int stop));
  1600. Xint skip_chars __PARMS((int class, int dir));
  1601. END_OF_FILE
  1602.   if test 833 -ne `wc -c <'vim/src/proto/search.pro'`; then
  1603.     echo shar: \"'vim/src/proto/search.pro'\" unpacked with wrong size!
  1604.   fi
  1605.   # end of 'vim/src/proto/search.pro'
  1606. fi
  1607. if test -f 'vim/src/proto/term.pro' -a "${1}" != "-c" ; then 
  1608.   echo shar: Will not clobber existing file \"'vim/src/proto/term.pro'\"
  1609. else
  1610.   echo shar: Extracting \"'vim/src/proto/term.pro'\" \(925 characters\)
  1611.   sed "s/^X//" >'vim/src/proto/term.pro' <<'END_OF_FILE'
  1612. X/* term.c */
  1613. Xvoid set_term __PARMS((unsigned char *term));
  1614. Xchar *tgoto __PARMS((char *cm, int x, int y));
  1615. Xvoid termcapinit __PARMS((unsigned char *term));
  1616. Xvoid flushbuf __PARMS((void));
  1617. Xvoid outchar __PARMS((unsigned int c));
  1618. Xvoid outstrn __PARMS((unsigned char *s));
  1619. Xvoid outstr __PARMS((unsigned char *s));
  1620. Xvoid windgoto __PARMS((int row, int col));
  1621. Xvoid setcursor __PARMS((void));
  1622. Xvoid ttest __PARMS((int pairs));
  1623. Xint inchar __PARMS((unsigned char *buf, int maxlen, int time));
  1624. Xint check_termcode __PARMS((unsigned char *buf));
  1625. Xvoid outnum __PARMS((long n));
  1626. Xvoid check_winsize __PARMS((void));
  1627. Xvoid set_winsize __PARMS((int width, int height, int mustset));
  1628. Xvoid settmode __PARMS((int raw));
  1629. Xvoid starttermcap __PARMS((void));
  1630. Xvoid stoptermcap __PARMS((void));
  1631. Xvoid cursor_on __PARMS((void));
  1632. Xvoid cursor_off __PARMS((void));
  1633. Xvoid scroll_region_set __PARMS((struct window *wp));
  1634. Xvoid scroll_region_reset __PARMS((void));
  1635. END_OF_FILE
  1636.   if test 925 -ne `wc -c <'vim/src/proto/term.pro'`; then
  1637.     echo shar: \"'vim/src/proto/term.pro'\" unpacked with wrong size!
  1638.   fi
  1639.   # end of 'vim/src/proto/term.pro'
  1640. fi
  1641. if test -f 'vim/src/proto/unix.pro' -a "${1}" != "-c" ; then 
  1642.   echo shar: Will not clobber existing file \"'vim/src/proto/unix.pro'\"
  1643. else
  1644.   echo shar: Extracting \"'vim/src/proto/unix.pro'\" \(1423 characters\)
  1645.   sed "s/^X//" >'vim/src/proto/unix.pro' <<'END_OF_FILE'
  1646. X/* vi:ts=4:sw=4
  1647. X *
  1648. X * VIM - Vi IMproved        by Bram Moolenaar
  1649. X *
  1650. X * Read the file "credits.txt" for a list of people who contributed.
  1651. X * Read the file "uganda.txt" for copying and usage conditions.
  1652. X */
  1653. X
  1654. X/*
  1655. X * functions in unix.c
  1656. X */
  1657. Xvoid    mch_write __ARGS((char_u *, int));
  1658. Xint     GetChars __ARGS((char_u *, int, int));
  1659. Xint        mch_char_avail __ARGS((void));
  1660. Xlong    mch_avail_mem __ARGS((int));
  1661. Xvoid    vim_delay __ARGS((void));
  1662. Xvoid    mch_suspend __ARGS((void));
  1663. Xvoid    mch_windinit __ARGS((void));
  1664. Xvoid    check_win __ARGS((int, char **));
  1665. Xvoid    fname_case __ARGS((char_u *));
  1666. Xvoid    mch_settitle __ARGS((char_u *, char_u *));
  1667. Xvoid    mch_restore_title __PARMS((int which));
  1668. Xint     vim_dirname __ARGS((char_u *, int));
  1669. Xint        FullName __ARGS((char_u *, char_u *, int));
  1670. Xint        isFullName __ARGS((char_u *));
  1671. Xlong    getperm __ARGS((char_u *));
  1672. Xint        setperm __ARGS((char_u *, int));
  1673. Xint        isdir __ARGS((char_u *));
  1674. Xvoid    mch_windexit __ARGS((int));
  1675. Xvoid    mch_settmode __ARGS((int));
  1676. Xint        mch_screenmode __ARGS((char_u *));
  1677. Xint        mch_get_winsize __ARGS((void));
  1678. Xvoid    mch_set_winsize __ARGS((void));
  1679. Xint        call_shell __ARGS((char_u *, int, int));
  1680. Xvoid    breakcheck __ARGS((void));
  1681. Xint        ExpandWildCards __ARGS((int, char_u **, int *, char_u ***, int, int));
  1682. Xvoid    FreeWild __ARGS((int, char_u **));
  1683. Xint        has_wildcard __ARGS((char_u *));
  1684. Xint        have_wildcard __ARGS((int, char_u **));
  1685. X#if defined(M_XENIX) || defined(UTS2)
  1686. Xint        rename __ARGS((char_u *, char_u *));
  1687. X#endif
  1688. END_OF_FILE
  1689.   if test 1423 -ne `wc -c <'vim/src/proto/unix.pro'`; then
  1690.     echo shar: \"'vim/src/proto/unix.pro'\" unpacked with wrong size!
  1691.   fi
  1692.   # end of 'vim/src/proto/unix.pro'
  1693. fi
  1694. if test -f 'vim/src/proto/window.pro' -a "${1}" != "-c" ; then 
  1695.   echo shar: Will not clobber existing file \"'vim/src/proto/window.pro'\"
  1696. else
  1697.   echo shar: Extracting \"'vim/src/proto/window.pro'\" \(869 characters\)
  1698.   sed "s/^X//" >'vim/src/proto/window.pro' <<'END_OF_FILE'
  1699. X/* window.c */
  1700. Xvoid do_window __PARMS((int nchar, long Prenum));
  1701. Xint win_split __PARMS((long new_height, int redraw));
  1702. Xint make_windows __PARMS((int count));
  1703. Xvoid win_equal __PARMS((struct window *next_curwin, int redraw));
  1704. Xvoid close_window __PARMS((int free_buf));
  1705. Xvoid close_others __PARMS((int message));
  1706. Xvoid win_init __PARMS((struct window *wp));
  1707. Xvoid win_enter __PARMS((struct window *wp, int undo_sync));
  1708. Xstruct window *win_alloc __PARMS((struct window *after));
  1709. Xvoid win_free __PARMS((struct window *wp));
  1710. Xint win_alloc_lsize __PARMS((struct window *wp));
  1711. Xvoid win_free_lsize __PARMS((struct window *wp));
  1712. Xvoid screen_new_rows __PARMS((void));
  1713. Xvoid win_setheight __PARMS((int height));
  1714. Xvoid win_comp_scroll __PARMS((struct window *wp));
  1715. Xvoid command_height __PARMS((void));
  1716. Xvoid last_status __PARMS((void));
  1717. Xunsigned char *file_name_at_cursor __PARMS((void));
  1718. END_OF_FILE
  1719.   if test 869 -ne `wc -c <'vim/src/proto/window.pro'`; then
  1720.     echo shar: \"'vim/src/proto/window.pro'\" unpacked with wrong size!
  1721.   fi
  1722.   # end of 'vim/src/proto/window.pro'
  1723. fi
  1724. if test -f 'vim/src/ptx_stdlib.h' -a "${1}" != "-c" ; then 
  1725.   echo shar: Will not clobber existing file \"'vim/src/ptx_stdlib.h'\"
  1726. else
  1727.   echo shar: Extracting \"'vim/src/ptx_stdlib.h'\" \(1035 characters\)
  1728.   sed "s/^X//" >'vim/src/ptx_stdlib.h' <<'END_OF_FILE'
  1729. X/* vi:ts=4:sw=4
  1730. X *
  1731. X * VIM - Vi IMproved        by Bram Moolenaar
  1732. X *
  1733. X * Read the file "credits.txt" for a list of people who contributed.
  1734. X * Read the file "uganda.txt" for copying and usage conditions.
  1735. X */
  1736. X
  1737. X/*
  1738. X * ptx_stdlib.h: declarations which are needed for sequent
  1739. X */
  1740. X
  1741. Xextern void free(void *);
  1742. X#ifdef SIZE_T /* sys/types.h */
  1743. Xextern void *malloc(size_t);
  1744. X#else
  1745. Xextern void *malloc(unsigned);
  1746. X#endif
  1747. X
  1748. X#ifndef _FCNTL_H_
  1749. Xextern int open(char *, int, ...);
  1750. X#endif
  1751. Xextern int close(int);
  1752. Xextern int read(int, char *, unsigned);
  1753. Xextern int write(int, char *, unsigned);
  1754. Xextern int ioctl(int, int, ...);
  1755. Xextern int unlink(char *);
  1756. X
  1757. Xextern char *getenv(char *);
  1758. X
  1759. X#ifdef _NFILE /* stdio.h */
  1760. Xextern int _filbuf(FILE *);
  1761. Xextern int _flsbuf(unsigned char, FILE *);
  1762. X#endif
  1763. X
  1764. X#ifdef _POLL_H_
  1765. Xextern int poll(struct pollfd[], unsigned long, int);
  1766. X#endif /* _POLL_H_ */
  1767. X
  1768. Xextern char *getcwd(char *, int);
  1769. X
  1770. Xextern int chdir(char *);
  1771. X
  1772. Xextern int atoi (char *);
  1773. Xextern long atol(char *);
  1774. Xextern long strtol(char *, char **, int);
  1775. X
  1776. Xextern int isatty(int);
  1777. END_OF_FILE
  1778.   if test 1035 -ne `wc -c <'vim/src/ptx_stdlib.h'`; then
  1779.     echo shar: \"'vim/src/ptx_stdlib.h'\" unpacked with wrong size!
  1780.   fi
  1781.   # end of 'vim/src/ptx_stdlib.h'
  1782. fi
  1783. if test -f 'vim/src/regexp.h' -a "${1}" != "-c" ; then 
  1784.   echo shar: Will not clobber existing file \"'vim/src/regexp.h'\"
  1785. else
  1786.   echo shar: Extracting \"'vim/src/regexp.h'\" \(1571 characters\)
  1787.   sed "s/^X//" >'vim/src/regexp.h' <<'END_OF_FILE'
  1788. X/* vi:ts=4:sw=4
  1789. X * NOTICE NOTICE NOTICE NOTICE NOTICE NOTICE NOTICE NOTICE NOTICE NOTICE
  1790. X *
  1791. X * This is NOT the original regular expression code as written by
  1792. X * Henry Spencer. This code has been modified specifically for use
  1793. X * with the VIM editor, and should not be used apart from compiling
  1794. X * VIM. If you want a good regular expression library, get the
  1795. X * original code. The copyright notice that follows is from the
  1796. X * original.
  1797. X *
  1798. X * NOTICE NOTICE NOTICE NOTICE NOTICE NOTICE NOTICE NOTICE NOTICE NOTICE
  1799. X *
  1800. X * Definitions etc. for regexp(3) routines.
  1801. X *
  1802. X * Caveat:    this is V8 regexp(3) [actually, a reimplementation thereof],
  1803. X * not the System V one.
  1804. X */
  1805. X
  1806. X#ifndef _REGEXP_H
  1807. X#define _REGEXP_H
  1808. X
  1809. X#define NSUBEXP  10
  1810. Xtypedef struct regexp {
  1811. X    char_u           *startp[NSUBEXP];
  1812. X    char_u           *endp[NSUBEXP];
  1813. X    char_u            regstart;    /* Internal use only. */
  1814. X    char_u            reganch;    /* Internal use only. */
  1815. X    char_u           *regmust;    /* Internal use only. */
  1816. X    int             regmlen;    /* Internal use only. */
  1817. X    char_u            program[1]; /* Unwarranted chumminess with compiler. */
  1818. X}                regexp;
  1819. X
  1820. X/* regexp.c */
  1821. Xregexp *regcomp __ARGS((char_u *));
  1822. Xint regexec __ARGS((regexp *, char_u *, int));
  1823. X/* int cstrncmp __ARGS((char_u *, char_u *, int)); */
  1824. Xchar_u *cstrchr __ARGS((char_u *, int));
  1825. X
  1826. X/* regsub.c */
  1827. Xint regsub __ARGS((regexp *, char_u *, char_u *, int, int));
  1828. X
  1829. X/* search.c */
  1830. Xextern void     regerror __ARGS((char_u *));
  1831. X
  1832. X#ifndef ORIGINAL
  1833. Xextern int        reg_ic;         /* set non-zero to ignore case in searches */
  1834. Xextern int        reg_magic;        /* set zero to disable magicness of .*[~& */
  1835. X#endif
  1836. X#endif    /* _REGEXP_H */
  1837. END_OF_FILE
  1838.   if test 1571 -ne `wc -c <'vim/src/regexp.h'`; then
  1839.     echo shar: \"'vim/src/regexp.h'\" unpacked with wrong size!
  1840.   fi
  1841.   # end of 'vim/src/regexp.h'
  1842. fi
  1843. if test -f 'vim/src/sun_stdlib.h' -a "${1}" != "-c" ; then 
  1844.   echo shar: Will not clobber existing file \"'vim/src/sun_stdlib.h'\"
  1845. else
  1846.   echo shar: Extracting \"'vim/src/sun_stdlib.h'\" \(1879 characters\)
  1847.   sed "s/^X//" >'vim/src/sun_stdlib.h' <<'END_OF_FILE'
  1848. X/* vi:ts=4:sw=4
  1849. X *
  1850. X * VIM - Vi IMproved        by Bram Moolenaar
  1851. X *
  1852. X * Read the file "credits.txt" for a list of people who contributed.
  1853. X * Read the file "uganda.txt" for copying and usage conditions.
  1854. X */
  1855. X
  1856. X/*
  1857. X * sun_stdlib.h: declararions used on a sun
  1858. X */
  1859. X
  1860. X#ifndef __stdlib_h
  1861. Xextern int atoi (char *);
  1862. Xextern long atol(char *);
  1863. Xextern void free(void *);
  1864. Xextern char *getenv(char *);
  1865. Xextern void *malloc(unsigned);
  1866. Xextern void *realloc(void *, unsigned);
  1867. Xextern void *calloc(unsigned, unsigned);
  1868. Xextern int read(int, char *, unsigned);
  1869. Xextern int write(int, char *, unsigned);
  1870. Xextern int unlink(char *);
  1871. X#endif
  1872. X
  1873. X#ifdef __sys_types_h
  1874. Xextern off_t lseek(int, off_t, int);
  1875. X
  1876. X# ifdef _sys_time_h
  1877. Xextern int select(int, fd_set *, fd_set *, fd_set *, struct timeval *);
  1878. X# endif _sys_time_h
  1879. X
  1880. X#else
  1881. Xextern long lseek(int, long, int);
  1882. X#endif
  1883. X
  1884. Xextern long tell(int);
  1885. Xextern void perror(char *);
  1886. X
  1887. X#include <fcntl.h>
  1888. X
  1889. Xextern int close(int);
  1890. X
  1891. X#ifdef FILE
  1892. Xextern int _filbuf(FILE *);
  1893. Xextern int _flsbuf(unsigned char, FILE *);
  1894. Xextern int fclose(FILE *);
  1895. Xextern int fprintf(FILE *, char *, ...);
  1896. Xextern int fscanf(FILE *, char *, ...);
  1897. Xextern int fseek(FILE *, long, int);
  1898. Xextern int fflush(FILE *);
  1899. Xextern int fread(char *, int, int, FILE *);
  1900. X#else
  1901. Xextern char *sprintf(char *, char *, ...);
  1902. X#endif
  1903. X
  1904. Xextern int printf(char *, ...);
  1905. X
  1906. Xextern int scanf(char *, ...);
  1907. Xextern int sscanf(char *, char *, ...);
  1908. X
  1909. Xextern int system(char *);
  1910. X
  1911. X#ifndef __sys_unistd_h
  1912. Xextern char *getcwd(char *, int);
  1913. Xextern int chdir(char *);
  1914. Xextern int getuid(void);
  1915. Xextern int getgid(void);
  1916. X#endif /* __sys_unistd_h */
  1917. X
  1918. Xextern long strtol(char * , char **, int);
  1919. X
  1920. Xextern char *memccpy(char *, char *, int, int);
  1921. Xextern char *memchr(char *, int, int);
  1922. Xextern char *memset(char *, int, int);
  1923. X
  1924. X#include <string.h>
  1925. Xextern int strcasecmp(char *, char *);
  1926. X
  1927. Xextern int toupper(int);
  1928. Xextern int tolower(int);
  1929. Xextern int isatty(int);
  1930. END_OF_FILE
  1931.   if test 1879 -ne `wc -c <'vim/src/sun_stdlib.h'`; then
  1932.     echo shar: \"'vim/src/sun_stdlib.h'\" unpacked with wrong size!
  1933.   fi
  1934.   # end of 'vim/src/sun_stdlib.h'
  1935. fi
  1936. if test -f 'vim/tutor/poster' -a "${1}" != "-c" ; then 
  1937.   echo shar: Will not clobber existing file \"'vim/tutor/poster'\"
  1938. else
  1939.   echo shar: Extracting \"'vim/tutor/poster'\" \(860 characters\)
  1940.   sed "s/^X//" >'vim/tutor/poster' <<'END_OF_FILE'
  1941. XArticle 3390 of alt.sources:
  1942. XXref: oce-rd1 comp.editors:3231 alt.sources:3390
  1943. XPath: oce-rd1!venlo!hp4nl!mcsun!uunet!zaphod.mps.ohio-state.edu!magnus.acs.ohio-state.edu!csn!pikes!slate!bware
  1944. XFrom: bware@slate.mines.colorado.edu (Ware Bob)
  1945. XNewsgroups: comp.editors,alt.sources
  1946. XSubject: hands on vi tutor
  1947. XKeywords: for new users
  1948. XMessage-ID: <1991Jul17.161355.15677@slate.mines.colorado.edu>
  1949. XDate: 17 Jul 91 16:13:55 GMT
  1950. XSender: bware@slate.mines.colorado.edu (Ware Bob)
  1951. XOrganization: Colorado School of Mines
  1952. XLines: 830
  1953. X
  1954. X
  1955. XI posted this a few weeks ago, but a number of people have munged 
  1956. Xtheir copy, so I am reposting it with better instructions.
  1957. X
  1958. XThis is a "hand-on" tutor to help new users learn the vi editor.
  1959. X
  1960. XBob Ware, Colorado School of Mines, Golden, Co 80401, USA
  1961. X(303) 273-3987
  1962. Xbware@mines.colorado.edu bware@slate.mines.colorado.edu bware@mines.bitnet
  1963. END_OF_FILE
  1964.   if test 860 -ne `wc -c <'vim/tutor/poster'`; then
  1965.     echo shar: \"'vim/tutor/poster'\" unpacked with wrong size!
  1966.   fi
  1967.   # end of 'vim/tutor/poster'
  1968. fi
  1969. echo shar: End of archive 25 \(of 26\).
  1970. cp /dev/null ark25isdone
  1971. MISSING=""
  1972. for I in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 ; do
  1973.     if test ! -f ark${I}isdone ; then
  1974.     MISSING="${MISSING} ${I}"
  1975.     fi
  1976. done
  1977. if test "${MISSING}" = "" ; then
  1978.     echo You have unpacked all 26 archives.
  1979.     rm -f ark[1-9]isdone ark[1-9][0-9]isdone
  1980. else
  1981.     echo You still must unpack the following archives:
  1982.     echo "        " ${MISSING}
  1983. fi
  1984. exit 0
  1985. exit 0 # Just in case...
  1986.