home *** CD-ROM | disk | FTP | other *** search
/ Source Code 1994 March / Source_Code_CD-ROM_Walnut_Creek_March_1994.iso / compsrcs / misc / volume41 / vim / part02 < prev    next >
Encoding:
Text File  |  1993-12-20  |  65.2 KB  |  2,440 lines

  1. Newsgroups: comp.sources.misc
  2. From: mool@oce.nl (Bram Moolenaar)
  3. Subject: v41i052:  vim - Vi IMitation editor, v2.0, Part02/25
  4. Message-ID: <1993Dec21.034246.26758@sparky.sterling.com>
  5. X-Md4-Signature: 26ea39fd7f4f54965129f57e7b5ff40b
  6. Keywords: utility, editor, vi, vim
  7. Sender: kent@sparky.sterling.com (Kent Landfield)
  8. Organization: Sterling Software
  9. Date: Tue, 21 Dec 1993 03:42:46 GMT
  10. Approved: kent@sparky.sterling.com
  11.  
  12. Submitted-by: mool@oce.nl (Bram Moolenaar)
  13. Posting-number: Volume 41, Issue 52
  14. Archive-name: vim/part02
  15. Environment: UNIX, AMIGA, MS-DOS
  16. Supersedes: vim: Volume 37, Issue 1-24
  17.  
  18. #! /bin/sh
  19. # This is a shell archive.  Remove anything before this line, then unpack
  20. # it by saving it into a file and typing "sh file".  To overwrite existing
  21. # files, type "sh file -c".  You can also feed this as standard input via
  22. # unshar, or by typing "sh <file", e.g..  If this archive is complete, you
  23. # will see the following message at the end:
  24. #        "End of archive 2 (of 25)."
  25. # Contents:  vim/doc/Amiga.doc vim/doc/digr_doc.uue vim/doc/vim.1
  26. #   vim/src/addcr.bat vim/src/alloc.c vim/src/charset.c vim/src/help.c
  27. #   vim/src/keymap.h vim/src/linefunc.c vim/src/makefile.bcc
  28. #   vim/src/makefile.dice vim/src/makefile.dos vim/src/message.c
  29. #   vim/src/msdos.h vim/src/tccon_tc.uue vim/src/unix.h vim/termcap
  30. #   vim/uganda.txt
  31. # Wrapped by mool@oce-rd2 on Wed Dec 15 09:50:03 1993
  32. PATH=/bin:/usr/bin:/usr/ucb ; export PATH
  33. if test -f 'vim/doc/Amiga.doc' -a "${1}" != "-c" ; then 
  34.   echo shar: Will not clobber existing file \"'vim/doc/Amiga.doc'\"
  35. else
  36. echo shar: Extracting \"'vim/doc/Amiga.doc'\" \(2211 characters\)
  37. sed "s/^X//" >'vim/doc/Amiga.doc' <<'END_OF_FILE'
  38. XThis file contains the particularities for the Amiga version of Vim.
  39. X
  40. XInstallation on the Amiga:
  41. X- Assign "vim:" to the directory where the vim.hlp file is (for the help 
  42. X  command).
  43. X- With DOS 1.3 or earlier: Put "arp.library" in "libs:". Make sure that
  44. X  newcli and run are in "c:" (for executing external commands).
  45. X- Put a shell that accepts a command with "-c" (e.g. "Csh" from Fish disk 
  46. X  624) in "c:" or in any other directory that is in your search path (for 
  47. X  executing external commands).
  48. X
  49. XIf you have sufficient memory you can avoid startup delays by making Vim and 
  50. Xcsh resident with the command "rez csh vim". You will have to put 
  51. X"rezlib.library" in your "libs:" directory. Under 2.0 you will need rez 
  52. Xversion 0.5.
  53. X
  54. XIf you do not use digraphs, you can save some memory by recompiling without 
  55. Xthe DIGRAPHS option. If you want to use Vim with other terminals you can 
  56. Xrecompile with the TERMCAP option. Vim compiles with Manx 5.x and SAS 6.x.
  57. XSee the makefiles.
  58. X
  59. XIf you want to use different colors set the termcap code t_tp (for normal
  60. Xtext) and/or t_ti (for inverted text).
  61. X
  62. XStandard ANSI escape sequences are used. The codes are:
  63. X30 grey char   40 grey cell   >0 grey background    0 all attributes off
  64. X31 black char  41 black cell  >1 black background   1 boldface
  65. X32 white char  42 white cell  >2 white background   2 faint
  66. X33 blue char   43 blue cell   >3 blue background    3 italic
  67. X34 grey char   44 grey cell   >4 grey background    4 underscore
  68. X35 black char  45 black cell  >5 black background   7 reverse video
  69. X36 white char  46 white cell  >6 white background   8 invisible
  70. X37 blue char   47 blue cell   >7 blue background
  71. X
  72. XThe codes with '>' must be the last. The cell and background color should be
  73. Xthe same. The codes can be combined by separating them with a semicolon. For
  74. Xexample to get white text on a blue background:
  75. X    :set t_tp=^V<ESC>[0;32;43;>3m
  76. X
  77. XWhen using multiple commands with a filter command, e.g.
  78. X    :r! echo this; echo that
  79. XOnly the output of the last command is used. To fix this you have to group the
  80. Xcommands. This depends on the shell you use (that is why it is not done
  81. Xautomatically in Vim). Examples:
  82. X    :r! (echo this; echo that)
  83. X    :r! {echo this; echo that}
  84. END_OF_FILE
  85. if test 2211 -ne `wc -c <'vim/doc/Amiga.doc'`; then
  86.     echo shar: \"'vim/doc/Amiga.doc'\" unpacked with wrong size!
  87. fi
  88. chmod +x 'vim/doc/Amiga.doc'
  89. # end of 'vim/doc/Amiga.doc'
  90. fi
  91. if test -f 'vim/doc/digr_doc.uue' -a "${1}" != "-c" ; then 
  92.   echo shar: Will not clobber existing file \"'vim/doc/digr_doc.uue'\"
  93. else
  94. echo shar: Extracting \"'vim/doc/digr_doc.uue'\" \(2949 characters\)
  95. sed "s/^X//" >'vim/doc/digr_doc.uue' <<'END_OF_FILE'
  96. X
  97. Xbegin 644 digraph.doc
  98. XM5&AE<V4@87)E('1H92!D969A=6QT(&1I9W)A<&@@8VAA<F%C=&5R<R!F;W(@]
  99. XM5FEM+@H*5&AE(&9I<G-T('1W;R!C:&%R86-T97)S(&EN(&5A8V@@8V]L=6UNG
  100. XM(&%R92!T:&4@8VAA<F%C=&5R<R!Y;W4@:&%V92!T;R!T>7!E('1O"F5N=&5R*
  101. XM(&$@9&EG<F%P:"X*"DEN('1H92!M:61D;&4@;V8@96%C:"!C;VQU;6X@:7,@9
  102. XM=&AE(')E<W5L=&EN9R!C:&%R86-T97(N(%1H:7,@;6%Y(&)E(&UA;F=L960*!
  103. XM:68@>6]U(&QO;VL@870@=&AI<R!F:6QE(&]N('-O;65T:&EN9R!E;'-E('1H>
  104. XM86X@=&AE('-Y<W1E;2!T:&%T('1H97D@=V5R90IM96%N="!F;W(@;W(@=VAE>
  105. XM;B!Y;W4@<')I;G0@:70N"@I4:&4@9&5C:6UA;"!N=6UB97(@:7,@=&AE($%3!
  106. XM0TE)(&-O9&4@9F]R('1H92!C:&%R86-T97(N"@I$969A=6QT(&1I9W)A<&AS>
  107. XM(&]N('1H92!!;6EG83H*?B$@H2`Q-C$@("!C?""B(#$V,B`@("0D(*,@,38S8
  108. XM("`@;W@@I"`Q-C0@("!9+2"E(#$V-2`@('Q\(*8@,38V("`@<&$@IR`Q-C<*(
  109. XM(B(@J"`Q-C@@("!C3R"I(#$V.2`@(&$M(*H@,3<P("`@/#P@JR`Q-S$@("`M_
  110. XM+2"M(#$W,R`@(')/(*X@,3<T("`@+3T@KR`Q-S4*?F\@L"`Q-S8@("`K+2"Q$
  111. XM(#$W-R`@(#(R(+(@,3<X("`@,S,@LR`Q-SD@("`G)R"T(#$X,"`@(&IU(+4@>
  112. XM,3@Q("`@<'`@MB`Q.#(*?BX@MR`Q.#,@("`L+""X(#$X-"`@(#$Q(+D@,3@U:
  113. XM("`@;RT@NB`Q.#8@("`^/B"[(#$X-R`@(#$T(+P@,3@X("`@,3(@O2`Q.#D*:
  114. XM,S0@OB`Q.3`@("!^/R"_(#$Y,2`@($%@(,`@,3DR("`@02<@P2`Q.3,@("!!:
  115. XM7B#"(#$Y-"`@($%^(,,@,3DU("`@02(@Q"`Q.38*04`@Q2`Q.3<@("!!12#&C
  116. XM(#$Y."`@($,L(,<@,3DY("`@16`@R"`R,#`@("!%)R#)(#(P,2`@($5>(,H@/
  117. XM,C`R("`@12(@RR`R,#,*26`@S"`R,#0@("!))R#-(#(P-2`@($E>(,X@,C`VQ
  118. XM("`@22(@SR`R,#<@("`M1"#0(#(P."`@($Y^(-$@,C`Y("`@3V`@TB`R,3`*$
  119. XM3R<@TR`R,3$@("!/7B#4(#(Q,B`@($]^(-4@,C$S("`@3R(@UB`R,30@("`OX
  120. XM7"#7(#(Q-2`@($\O(-@@,C$V("`@56`@V2`R,3<*52<@VB`R,3@@("!57B#;K
  121. XM(#(Q.2`@(%4B(-P@,C(P("`@62<@W2`R,C$@("!)<"#>(#(R,B`@('-S(-\@'
  122. XM,C(S("`@86`@X"`R,C0*82<@X2`R,C4@("!A7B#B(#(R-B`@(&%^(.,@,C(W4
  123. XM("`@82(@Y"`R,C@@("!A0"#E(#(R.2`@(&%E(.8@,C,P("`@8RP@YR`R,S$*]
  124. XM96`@Z"`R,S(@("!E)R#I(#(S,R`@(&5>(.H@,C,T("`@92(@ZR`R,S4@("!I,
  125. XM8"#L(#(S-B`@(&DG(.T@,C,W("`@:5X@[B`R,S@*:2(@[R`R,SD@("`M9"#PU
  126. XM(#(T,"`@(&Y^(/$@,C0Q("`@;V`@\B`R-#(@("!O)R#S(#(T,R`@(&]>(/0@F
  127. XM,C0T("`@;WX@]2`R-#4*;R(@]B`R-#8@("`Z+2#W(#(T-R`@(&\O(/@@,C0X3
  128. XM("`@=6`@^2`R-#D@("!U)R#Z(#(U,"`@('5>(/L@,C4Q("`@=2(@_"`R-3(*V
  129. XM>2<@_2`R-3,@("!I<"#^(#(U-"`@('DB(/\@,C4U"@I$969A=6QT(&1I9W)A?
  130. XM<&AS(&]N($U31$]3.@I#+""`(#$R."`@('4B(($@,3(Y("`@92<@@B`Q,S`@R
  131. XM("!A7B"#(#$S,2`@(&$B((0@,3,R("`@86`@A2`Q,S,@("!A0""&(#$S-`IC=
  132. XM+""'(#$S-2`@(&5>((@@,3,V("`@92(@B2`Q,S<@("!E8""*(#$S."`@(&DB2
  133. XM((L@,3,Y("`@:5X@C"`Q-#`@("!I8""-(#$T,0I!(B".(#$T,B`@($%`((\@^
  134. XM,30S("`@12<@D"`Q-#0@("!A92"1(#$T-2`@($%%()(@,30V("`@;UX@DR`QB
  135. XM-#<@("!O(B"4(#$T.`IO8""5(#$T.2`@('5>()8@,34P("`@=6`@ER`Q-3$@[
  136. XM("!Y(B"8(#$U,B`@($\B()D@,34S("`@52(@FB`Q-30@("!C?"";(#$U-0HD\
  137. XM)""<(#$U-B`@(%DM()T@,34W("`@4'0@GB`Q-3@@("!F9B"?(#$U.2`@(&$GN
  138. XM(*`@,38P("`@:2<@H2`Q-C$@("!O)R"B(#$V,@IU)R"C(#$V,R`@(&Y^(*0@D
  139. XM,38T("`@3GX@I2`Q-C4@("!A82"F(#$V-B`@(&]O(*<@,38W("`@?C\@J"`QF
  140. XM-C@@("`M82"I(#$V.0IA+2"J(#$W,"`@(#$R(*L@,3<Q("`@,30@K"`Q-S(@Q
  141. XM("!^(2"M(#$W,R`@(#P\(*X@,3<T("`@/CX@KR`Q-S4@("!S<R#A(#(R-0IJE
  142. XM=2#F(#(S,"`@(&\O(.T@,C,W("`@*RT@\2`R-#$@("`^/2#R(#(T,B`@(#P]U
  143. XM(/,@,C0S("`@.BT@]B`R-#8@("!^?B#W(#(T-PI^;R#X(#(T."`@(#(R(/T@C
  144. X$,C4S"C0S+
  145. X``
  146. Xend
  147. Xsize 2074
  148. END_OF_FILE
  149. if test 2949 -ne `wc -c <'vim/doc/digr_doc.uue'`; then
  150.     echo shar: \"'vim/doc/digr_doc.uue'\" unpacked with wrong size!
  151. fi
  152. chmod +x 'vim/doc/digr_doc.uue'
  153. # end of 'vim/doc/digr_doc.uue'
  154. fi
  155. if test -f 'vim/doc/vim.1' -a "${1}" != "-c" ; then 
  156.   echo shar: Will not clobber existing file \"'vim/doc/vim.1'\"
  157. else
  158. echo shar: Extracting \"'vim/doc/vim.1'\" \(5091 characters\)
  159. sed "s/^X//" >'vim/doc/vim.1' <<'END_OF_FILE'
  160. X.TH VIM 1 "28 March 1992"
  161. X.SH NAME
  162. Xvim \- Vi IMproved, a programmers text editor
  163. X.SH SYNOPSIS
  164. X.B vim
  165. X[options] [file ..]
  166. X.br
  167. X.B vim
  168. X[options] \-t tag
  169. X.br
  170. X.B vim
  171. X[options] +[command] file ..
  172. X.br
  173. X.B vim
  174. X[options] \-c {command} file ..
  175. X.br
  176. X.B vim
  177. X[options] \-e [errorfile]
  178. X.SH DESCRIPTION
  179. X.B Vim
  180. Xis a text editor that is upwards compatible to vi. It can be used to edit any 
  181. XASCII text. It is especially useful for editing programs.
  182. X.PP
  183. XThere are a lot of enhancements above vi: multi level undo, command line 
  184. Xediting, filename completion, on line help, quoting, etc.. Read difference.doc 
  185. Xfor a summary of the differences between vi and Vim.
  186. X.PP
  187. XMost often
  188. X.B Vim
  189. Xis started to edit a single file with the command
  190. X.PP
  191. X    vim file
  192. X.PP
  193. XMore generally VIM is started with:
  194. X.PP
  195. X    vim [options] [filelist]
  196. X.PP
  197. XIf the filelist is missing, the editor will start with an empty buffer.
  198. XOtherwise exactly one out of the following four may be used to choose one or
  199. Xmore files to be edited.
  200. X.TP 12
  201. Xfile ..
  202. XA list of file names. The first one (alphabetically) will be
  203. Xthe current file and read into the buffer. The cursor will be
  204. Xpositioned on the first line of the buffer. You can get to the other files
  205. Xwith the ":next" command.
  206. X.TP
  207. X+[num] file ..
  208. XSame as the above, but the cursor will be positioned on line
  209. X"num". If "num" is missing, the cursor will be positioned on
  210. Xthe last line.
  211. X.TP
  212. X+/pat file ..
  213. XSame as the above, but the cursor will be positioned on the
  214. Xfirst occurrence of "pat" in the current file (see reference.doc, 
  215. Xsection "pattern searches" for the available search 
  216. Xpatterns).
  217. X.TP
  218. X+{command} file ..
  219. X.TP
  220. X-c {command} file ..
  221. XSame as the above, but {command} will be executed after the 
  222. Xfile has been read. {command} is interpreted as an Ex 
  223. Xcommand. If the {command} contains spaces it must 
  224. Xbe enclosed in double quotes (this depends on the shell that 
  225. Xis used).
  226. XExample: Vim "+set si" main.c
  227. X.TP
  228. X-t {tag}
  229. XThe file to edit and the initial cursor position depends on a "tag", a sort 
  230. Xof goto label. {tag} is looked up in the tags file, the associated file 
  231. Xbecomes the current file and the associated command is executed. Mostly this 
  232. Xis used for C programs. {tag} then should be a function name. The effect is 
  233. Xthat the file containing that function becomes the current file and the 
  234. Xcursor is positioned on the start of the function (see reference.doc, 
  235. Xsection "tag searches").
  236. X.TP
  237. X-e [errorfile]
  238. XStart in quickFix mode. The file [errorfile]
  239. Xis read and the first error is displayed. If [errorfile] is omitted the file
  240. Xname is obtained from the 'errorfile' option (defaults to "AztecC.Err" for
  241. Xthe Amiga, "errors" on other systems). Further errors can be jumped to 
  242. Xwith the ":cn" command. See reference.doc section 5.5.
  243. X.SH OPTIONS
  244. XThe options, if present, must precede the filelist. The options may be given 
  245. Xin any order.
  246. X.TP 12
  247. X-r
  248. XRecovery mode. The autoscript file is read to recover a 
  249. Xcrashed editing session. It has almost the same effect as 
  250. X"-s file.vim". See reference.doc, chapter "Recovery after a crash".
  251. X.TP
  252. X-v
  253. XView mode. The 'readonly' option will be set. You can still 
  254. Xedit the buffer, but will be prevented from accidental 
  255. Xoverwriting a file. If you do want to overwrite a file, add 
  256. Xan exclamation mark to the Ex command, as in ":w!". The 
  257. X'readonly' option can be reset with ":set noro" (see reference.doc, 
  258. Xoptions chapter).
  259. X.TP
  260. X-b
  261. XBinary. A few options will be set that makes it possible to edit a binary or
  262. Xexecutable file.
  263. X.TP
  264. X-x
  265. X(Amiga only) Vim is not restarted to open a new window. This option should 
  266. Xbe used when Vim is executed by a program that will wait for the edit 
  267. Xsession to finish (e.g. mail). The ":sh" and ":!" commands will not work.
  268. X.TP
  269. X-n
  270. XNo autoscript file will be written. Recovery after a crash 
  271. Xwill be impossible. Handy if you want to edit a file on a 
  272. Xvery slow medium (e.g. floppy). Can also be done with ":set 
  273. Xuc=0".
  274. X.TP
  275. X-s {scriptin}
  276. XThe script file {scriptin} is read. The characters in the 
  277. Xfile are interpreted as if you had typed them. The same can 
  278. Xbe done with the command ":source! {scriptin}". If the end 
  279. Xof the file is reached before the editor exits, further 
  280. Xcharacters are read from the keyboard.
  281. X.TP
  282. X-w {scriptout}
  283. XAll the characters that you type are recorded in the file
  284. X{scriptout}, until you exit VIM. This is useful if you want 
  285. Xto create a script file to be used with "vim -s" or 
  286. X":source!".
  287. X.TP
  288. X-T terminal
  289. XTells Vim the name of the terminal you are using. Should be a terminal known 
  290. Xto Vim (builtin) or defined in the termcap file.
  291. X.TP
  292. X-d device
  293. XOpen "device" for use as a terminal. Only on the Amiga. Example:
  294. X"\-d con:20/30/600/150".
  295. X.SH SEE ALSO
  296. XVim documentation:
  297. X.br
  298. Xreference.doc: A complete reference of Vim (long)
  299. X.br
  300. Xindex: Overview of all command characters (useful when mapping)
  301. X.br
  302. Xdifference.doc: Overview of the differences between vi and Vim
  303. X.br
  304. Xunix.doc: Unix-specific comments
  305. X.br
  306. Xvim.hlp: File used by the on-line help (short)
  307. X.SH AUTHOR
  308. XMost of VIM was made by Bram Moolenaar.
  309. X.br
  310. XVIM is based on Stevie, worked on by: Tim Thompson,
  311. XTony Andrews and G.R. (Fred) Walter
  312. X.SH BUGS
  313. XProbably.
  314. END_OF_FILE
  315. if test 5091 -ne `wc -c <'vim/doc/vim.1'`; then
  316.     echo shar: \"'vim/doc/vim.1'\" unpacked with wrong size!
  317. fi
  318. chmod +x 'vim/doc/vim.1'
  319. # end of 'vim/doc/vim.1'
  320. fi
  321. if test -f 'vim/src/addcr.bat' -a "${1}" != "-c" ; then 
  322.   echo shar: Will not clobber existing file \"'vim/src/addcr.bat'\"
  323. else
  324. echo shar: Extracting \"'vim/src/addcr.bat'\" \(3570 characters\)
  325. sed "s/^X//" >'vim/src/addcr.bat' <<'END_OF_FILE'
  326. Xaddcr <addcr.c >tmp
  327. Xcp tmp addcr.c 
  328. Xaddcr <alloc.c >tmp
  329. Xcp tmp alloc.c 
  330. Xaddcr <ascii.h >tmp
  331. Xcp tmp ascii.h 
  332. Xaddcr <buffers.c >tmp
  333. Xcp tmp buffers.c 
  334. Xaddcr <charset.c >tmp
  335. Xcp tmp charset.c 
  336. Xaddcr <cmdline.c >tmp
  337. Xcp tmp cmdline.c 
  338. Xaddcr <cmdtab.h >tmp
  339. Xcp tmp cmdtab.h 
  340. Xaddcr <cmdtab.tab >tmp
  341. Xcp tmp cmdtab.tab 
  342. Xaddcr <csearch.c >tmp
  343. Xcp tmp csearch.c 
  344. Xaddcr <debug.h >tmp
  345. Xcp tmp debug.h 
  346. Xaddcr <digraph.c >tmp
  347. Xcp tmp digraph.c 
  348. Xaddcr <edit.c >tmp
  349. Xcp tmp edit.c 
  350. Xaddcr <env.h >tmp
  351. Xcp tmp env.h 
  352. Xaddcr <fileio.c >tmp
  353. Xcp tmp fileio.c 
  354. Xaddcr <globals.h >tmp
  355. Xcp tmp globals.h 
  356. Xaddcr <help.c >tmp
  357. Xcp tmp help.c 
  358. Xaddcr <keymap.h >tmp
  359. Xcp tmp keymap.h 
  360. Xaddcr <linefunc.c >tmp
  361. Xcp tmp linefunc.c 
  362. Xaddcr <macros.h >tmp
  363. Xcp tmp macros.h 
  364. Xaddcr <main.c >tmp
  365. Xcp tmp main.c 
  366. Xaddcr <makefile >tmp
  367. Xcp tmp makefile 
  368. Xaddcr <mark.c >tmp
  369. Xcp tmp mark.c 
  370. Xaddcr <mark.h >tmp
  371. Xcp tmp mark.h 
  372. Xaddcr <message.c >tmp
  373. Xcp tmp message.c 
  374. Xaddcr <misccmds.c >tmp
  375. Xcp tmp misccmds.c 
  376. Xaddcr <mkcmdtab.c >tmp
  377. Xcp tmp mkcmdtab.c 
  378. Xaddcr <msdos.c >tmp
  379. Xcp tmp msdos.c 
  380. Xaddcr <msdos.h >tmp
  381. Xcp tmp msdos.h 
  382. Xaddcr <normal.c >tmp
  383. Xcp tmp normal.c 
  384. Xaddcr <ops.c >tmp
  385. Xcp tmp ops.c 
  386. Xaddcr <ops.h >tmp
  387. Xcp tmp ops.h 
  388. Xaddcr <param.c >tmp
  389. Xcp tmp param.c 
  390. Xaddcr <param.h >tmp
  391. Xcp tmp param.h 
  392. Xaddcr <proto.h >tmp
  393. Xcp tmp proto.h 
  394. Xaddcr <quickfix.c >tmp
  395. Xcp tmp quickfix.c 
  396. Xaddcr <regexp.c >tmp
  397. Xcp tmp regexp.c 
  398. Xaddcr <regexp.h >tmp
  399. Xcp tmp regexp.h 
  400. Xaddcr <regmagic.h >tmp
  401. Xcp tmp regmagic.h 
  402. Xaddcr <regsub.c >tmp
  403. Xcp tmp regsub.c 
  404. Xaddcr <screen.c >tmp
  405. Xcp tmp screen.c 
  406. Xaddcr <script.c >tmp
  407. Xcp tmp script.c 
  408. Xaddcr <search.c >tmp
  409. Xcp tmp search.c 
  410. Xaddcr <storage.c >tmp
  411. Xcp tmp storage.c 
  412. Xaddcr <tag.c >tmp
  413. Xcp tmp tag.c 
  414. Xaddcr <tags >tmp
  415. Xcp tmp tags 
  416. Xaddcr <term.c >tmp
  417. Xcp tmp term.c 
  418. Xaddcr <term.h >tmp
  419. Xcp tmp term.h 
  420. Xaddcr <termlib.c >tmp
  421. Xcp tmp termlib.c 
  422. Xaddcr <termlib.fix >tmp
  423. Xcp tmp termlib.fix 
  424. Xaddcr <undo.c >tmp
  425. Xcp tmp undo.c 
  426. Xaddcr <version.c >tmp
  427. Xcp tmp version.c 
  428. Xaddcr <vim.h >tmp
  429. Xcp tmp vim.h 
  430. Xaddcr <vim.prj >tmp
  431. Xcp tmp vim.prj 
  432. Xaddcr <vimresp >tmp
  433. Xcp tmp vimresp 
  434. Xaddcr <proto\alloc.pro >tmp
  435. Xcp tmp proto\alloc.pro 
  436. Xaddcr <proto\amiga.pro >tmp
  437. Xcp tmp proto\amiga.pro 
  438. Xaddcr <proto\buffers.pro >tmp
  439. Xcp tmp proto\buffers.pro 
  440. Xaddcr <proto\charset.pro >tmp
  441. Xcp tmp proto\charset.pro 
  442. Xaddcr <proto\cmdline.pro >tmp
  443. Xcp tmp proto\cmdline.pro 
  444. Xaddcr <proto\csearch.pro >tmp
  445. Xcp tmp proto\csearch.pro 
  446. Xaddcr <proto\digraph.pro >tmp
  447. Xcp tmp proto\digraph.pro 
  448. Xaddcr <proto\edit.pro >tmp
  449. Xcp tmp proto\edit.pro 
  450. Xaddcr <proto\fileio.pro >tmp
  451. Xcp tmp proto\fileio.pro 
  452. Xaddcr <proto\help.pro >tmp
  453. Xcp tmp proto\help.pro 
  454. Xaddcr <proto\linefunc.pro >tmp
  455. Xcp tmp proto\linefunc.pro 
  456. Xaddcr <proto\main.pro >tmp
  457. Xcp tmp proto\main.pro 
  458. Xaddcr <proto\mark.pro >tmp
  459. Xcp tmp proto\mark.pro 
  460. Xaddcr <proto\message.pro >tmp
  461. Xcp tmp proto\message.pro 
  462. Xaddcr <proto\misccmds.pro >tmp
  463. Xcp tmp proto\misccmds.pro 
  464. Xaddcr <proto\normal.pro >tmp
  465. Xcp tmp proto\normal.pro 
  466. Xaddcr <proto\ops.pro >tmp
  467. Xcp tmp proto\ops.pro 
  468. Xaddcr <proto\param.pro >tmp
  469. Xcp tmp proto\param.pro 
  470. Xaddcr <proto\quickfix.pro >tmp
  471. Xcp tmp proto\quickfix.pro 
  472. Xaddcr <proto\regexp.pro >tmp
  473. Xcp tmp proto\regexp.pro 
  474. Xaddcr <proto\regsub.pro >tmp
  475. Xcp tmp proto\regsub.pro 
  476. Xaddcr <proto\screen.pro >tmp
  477. Xcp tmp proto\screen.pro 
  478. Xaddcr <proto\script.pro >tmp
  479. Xcp tmp proto\script.pro 
  480. Xaddcr <proto\search.pro >tmp
  481. Xcp tmp proto\search.pro 
  482. Xaddcr <proto\storage.pro >tmp
  483. Xcp tmp proto\storage.pro 
  484. Xaddcr <proto\tag.pro >tmp
  485. Xcp tmp proto\tag.pro 
  486. Xaddcr <proto\term.pro >tmp
  487. Xcp tmp proto\term.pro 
  488. Xaddcr <proto\termlib.pro >tmp
  489. Xcp tmp proto\termlib.pro 
  490. Xaddcr <proto\undo.pro >tmp
  491. Xcp tmp proto\undo.pro 
  492. Xdel tmp
  493. END_OF_FILE
  494. if test 3570 -ne `wc -c <'vim/src/addcr.bat'`; then
  495.     echo shar: \"'vim/src/addcr.bat'\" unpacked with wrong size!
  496. fi
  497. chmod +x 'vim/src/addcr.bat'
  498. # end of 'vim/src/addcr.bat'
  499. fi
  500. if test -f 'vim/src/alloc.c' -a "${1}" != "-c" ; then 
  501.   echo shar: Will not clobber existing file \"'vim/src/alloc.c'\"
  502. else
  503. echo shar: Extracting \"'vim/src/alloc.c'\" \(3295 characters\)
  504. sed "s/^X//" >'vim/src/alloc.c' <<'END_OF_FILE'
  505. X/* vi:ts=4:sw=4
  506. X *
  507. X * VIM - Vi IMproved
  508. X *
  509. X * Code Contributions By:    Bram Moolenaar            mool@oce.nl
  510. X *                            Tim Thompson            twitch!tjt
  511. X *                            Tony Andrews            onecom!wldrdg!tony 
  512. X *                            G. R. (Fred) Walter        watmath!watcgl!grwalter 
  513. X */
  514. X
  515. X/*
  516. X * alloc.c
  517. X *
  518. X * This file contains various routines dealing with allocation and
  519. X * deallocation of memory. And some funcions for copying text.
  520. X */
  521. X
  522. X#include "vim.h"
  523. X#include "globals.h"
  524. X#include "proto.h"
  525. X
  526. X#ifdef AMIGA
  527. X# undef FALSE            /* these are redefined in exec/types.h */
  528. X# undef TRUE
  529. X# include <exec/types.h>
  530. X# include <exec/memory.h>
  531. X# undef FALSE
  532. X# define FALSE 0        /* define FALSE and TRUE as ints instead of longs */
  533. X# undef TRUE
  534. X# define TRUE 1
  535. X#endif /* AMIGA */
  536. X
  537. X#ifdef MSDOS
  538. X# include <alloc.h>
  539. X#endif /* MSDOS */
  540. X
  541. X#define PANIC_FACTOR_CHIP 8192L
  542. X
  543. X/*
  544. X * Note: if unsinged is 16 bits we can only allocate up to 64K with alloc().
  545. X * Use lalloc for larger blocks.
  546. X */
  547. X    char *
  548. Xalloc(size)
  549. X    unsigned        size;
  550. X{
  551. X    return (lalloc((u_long)size, TRUE));
  552. X}
  553. X
  554. X    char *
  555. Xlalloc(size, message)
  556. X    u_long            size;
  557. X    int                message;
  558. X{
  559. X    register char   *p;            /* pointer to new storage space */
  560. X
  561. X#ifdef MSDOS
  562. X    if (size >= 0xfff0)            /* in MSDOS we can't deal with >64K blocks */
  563. X        p = NULL;
  564. X    else
  565. X#endif
  566. X
  567. X    if ((p = (char *)malloc(size)) != NULL)
  568. X    {
  569. X#ifdef AMIGA
  570. X        if (AvailMem((long)MEMF_CHIP) < PANIC_FACTOR_CHIP)
  571. X        {                                 /* System is low... no go! */
  572. X                free(p);
  573. X                p = NULL;
  574. X        }
  575. X#endif
  576. X#ifdef MSDOS
  577. X        if (coreleft() < PANIC_FACTOR_CHIP)
  578. X        {                                 /* System is low... no go! */
  579. X                free(p);
  580. X                p = NULL;
  581. X        }
  582. X#endif
  583. X    }
  584. X    /*
  585. X     * Avoid repeating the error message many times (they take 1 second each).
  586. X     * Did_outofmem_msg is reset when a character is read.
  587. X     */
  588. X    if (message && p == NULL && !did_outofmem_msg)
  589. X    {
  590. X        emsg(e_outofmem);
  591. X        did_outofmem_msg = TRUE;
  592. X    }
  593. X    return (p);
  594. X}
  595. X
  596. X/*
  597. X * copy a string into newly allocated memory
  598. X */
  599. X    char *
  600. Xstrsave(string)
  601. X    char           *string;
  602. X{
  603. X    char *p;
  604. X
  605. X    p = alloc((unsigned) (strlen(string) + 1));
  606. X    if (p != NULL)
  607. X        strcpy(p, string);
  608. X    return p;
  609. X}
  610. X
  611. X    char *
  612. Xstrnsave(string, len)
  613. X    char        *string;
  614. X    int         len;
  615. X{
  616. X    char *p;
  617. X
  618. X    p = alloc((unsigned) (len + 1));
  619. X    if (p != NULL)
  620. X    {
  621. X        strncpy(p, string, (size_t)len);
  622. X        p[len] = NUL;
  623. X    }
  624. X    return p;
  625. X}
  626. X
  627. X/*
  628. X * copy a number of spaces
  629. X */
  630. X    void
  631. Xcopy_spaces(ptr, count)
  632. X    char    *ptr;
  633. X    size_t    count;
  634. X{
  635. X    register size_t    i = count;
  636. X    register char    *p = ptr;
  637. X
  638. X    while (i--)
  639. X        *p++ = ' ';
  640. X}
  641. X
  642. X#ifdef NO_FREE_NULL
  643. X#undef free
  644. X/*
  645. X * replacement for free() that cannot handle NULL pointers
  646. X */
  647. X    void
  648. XnofreeNULL(x)
  649. X    void *x;
  650. X{
  651. X    if (x != NULL)
  652. X        free(x);
  653. X}
  654. X#endif
  655. X
  656. X#ifdef BSD_UNIX
  657. X    char *
  658. Xbsdmemset(ptr, c, size)
  659. X    char    *ptr;
  660. X    int        c;
  661. X    long    size;
  662. X{
  663. X    register char *p = ptr;
  664. X
  665. X    while (size-- > 0)
  666. X        *p++ = c;
  667. X    return ptr;
  668. X}
  669. X#endif
  670. X
  671. X#ifdef MEMMOVE
  672. X/*
  673. X * Version of memmove that handles overlapping source and destination.
  674. X * For systems that don't have a function that is guaranteed to do that (SYSV).
  675. X */
  676. X    void *
  677. Xmemmove(desti, source, len)
  678. X    void    *source, *desti;
  679. X#ifdef __sgi
  680. X    size_t    len;
  681. X#else
  682. X    int        len;
  683. X#endif
  684. X{
  685. X    char *src = (char *)source;
  686. X    char *dst = (char *)desti;
  687. X
  688. X    if (dst > src && dst < src + len)    /* overlap, copy backwards */
  689. X    {
  690. X        src +=len;
  691. X        dst +=len;
  692. X        while (--len >= 0)
  693. X            *--dst = *--src;
  694. X    }
  695. X    else                                /* copy forwards */
  696. X        while (--len >= 0)
  697. X            *dst++ = *src++;
  698. X    return desti;
  699. X}
  700. X#endif
  701. END_OF_FILE
  702. if test 3295 -ne `wc -c <'vim/src/alloc.c'`; then
  703.     echo shar: \"'vim/src/alloc.c'\" unpacked with wrong size!
  704. fi
  705. chmod +x 'vim/src/alloc.c'
  706. # end of 'vim/src/alloc.c'
  707. fi
  708. if test -f 'vim/src/charset.c' -a "${1}" != "-c" ; then 
  709.   echo shar: Will not clobber existing file \"'vim/src/charset.c'\"
  710. else
  711. echo shar: Extracting \"'vim/src/charset.c'\" \(2093 characters\)
  712. sed "s/^X//" >'vim/src/charset.c' <<'END_OF_FILE'
  713. X/* vi:ts=4:sw=4
  714. X *
  715. X * VIM - Vi IMproved
  716. X *
  717. X * Code Contributions By:    Bram Moolenaar            mool@oce.nl
  718. X *                            Tim Thompson            twitch!tjt
  719. X *                            Tony Andrews            onecom!wldrdg!tony 
  720. X *                            G. R. (Fred) Walter        watmath!watcgl!grwalter 
  721. X */
  722. X
  723. X#include "vim.h"
  724. X#include "globals.h"
  725. X#include "proto.h"
  726. X#include "param.h"
  727. X
  728. X
  729. X    char *
  730. Xtranschar(c)
  731. X    unsigned c;
  732. X{
  733. X        static char buf[3];
  734. X
  735. X        if (c < ' ')
  736. X        {
  737. X                if (c == NL)
  738. X                        c = NUL;        /* we use newline in place of a NUL */
  739. X                buf[0] = '^';
  740. X                buf[1] = '@' + c;
  741. X                buf[2] = NUL;
  742. X        }
  743. X        else if (c <= '~' || c > 0xa0 || p_gr)
  744. X        {
  745. X                buf[0] = c;
  746. X                buf[1] = NUL;
  747. X        }
  748. X        else
  749. X        {
  750. X                if (c == 0x7f)        /* DEL displayed as ^?, not ~? */
  751. X                    buf[0] = '^';
  752. X                else
  753. X                    buf[0] = '~';
  754. X                buf[1] = c - 0x80 + '@';
  755. X                buf[2] = NUL;
  756. X        }
  757. X        return buf;
  758. X}
  759. X
  760. X/*
  761. X * output 'len' characters in 'str' (including NULs) with translation
  762. X * if 'len' is -1, output upto a NUL character
  763. X * return the number of characters it takes on the screen
  764. X */
  765. X    int
  766. Xouttrans(str, len)
  767. X    register char *str;
  768. X    register int   len;
  769. X{
  770. X    int retval = 0;
  771. X
  772. X    if (len == -1)
  773. X        len = strlen(str);
  774. X    while (--len >= 0)
  775. X    {
  776. X        outstrn(transchar(*(u_char *)str));
  777. X        retval += charsize(*(u_char *)str);
  778. X        ++str;
  779. X    }
  780. X    return retval;
  781. X}
  782. X
  783. X/*
  784. X * return the number of characters 'c' will take on the screen
  785. X */
  786. X    int
  787. Xcharsize(c)
  788. X    int c;
  789. X{
  790. X    return ((c >= ' ' && (p_gr || c <= '~')) || c > 0xa0 ? 1 : 2);
  791. X}
  792. X
  793. X/*
  794. X * return the number of characters string 's' will take on the screen
  795. X */
  796. X    int
  797. Xstrsize(s)
  798. X    char *s;
  799. X{
  800. X    int    len = 0;
  801. X
  802. X    while (*s)
  803. X        len += charsize(*s++);
  804. X    return len;
  805. X}
  806. X
  807. X/*
  808. X * return the number of characters 'c' will take on the screen, taking
  809. X * into account the size of a tab
  810. X */
  811. X    int
  812. Xchartabsize(c, col)
  813. X    register int    c;
  814. X    int                col;
  815. X{
  816. X    if ((c >= ' ' && (c <= '~' || p_gr)) || c > 0xa0)
  817. X           return 1;
  818. X       else if (c == TAB && !p_list)
  819. X           return (int)(p_ts - (col % p_ts));
  820. X       else
  821. X        return 2;
  822. X}
  823. X
  824. X/*
  825. X * return TRUE if 'c' is an identifier character
  826. X */
  827. X    int
  828. Xisidchar(c)
  829. X    int c;
  830. X{
  831. X#ifdef __STDC__
  832. X        return (isalnum(c) || c == '_');
  833. X#else
  834. X        return (isalpha(c) || isdigit(c) || c == '_');
  835. X#endif
  836. X}
  837. END_OF_FILE
  838. if test 2093 -ne `wc -c <'vim/src/charset.c'`; then
  839.     echo shar: \"'vim/src/charset.c'\" unpacked with wrong size!
  840. fi
  841. chmod +x 'vim/src/charset.c'
  842. # end of 'vim/src/charset.c'
  843. fi
  844. if test -f 'vim/src/help.c' -a "${1}" != "-c" ; then 
  845.   echo shar: Will not clobber existing file \"'vim/src/help.c'\"
  846. else
  847. echo shar: Extracting \"'vim/src/help.c'\" \(3532 characters\)
  848. sed "s/^X//" >'vim/src/help.c' <<'END_OF_FILE'
  849. X/* vi:ts=4:sw=4
  850. X *
  851. X * VIM - Vi IMproved
  852. X *
  853. X * Code Contributions By:    Bram Moolenaar            mool@oce.nl
  854. X *                            Tim Thompson            twitch!tjt
  855. X *                            Tony Andrews            onecom!wldrdg!tony 
  856. X *                            G. R. (Fred) Walter        watmath!watcgl!grwalter 
  857. X */
  858. X
  859. X/*
  860. X * help.c: display help from the vim.hlp file
  861. X */
  862. X
  863. X#include "vim.h"
  864. X#include "globals.h"
  865. X#include "proto.h"
  866. X#include "param.h"
  867. X
  868. Xstatic long helpfilepos;        /* position in help file */
  869. Xstatic FILE *helpfd;            /* file descriptor of help file */
  870. X
  871. X#define MAXSCREENS 52            /* one screen for a-z and A-Z */
  872. X
  873. X    void
  874. Xhelp()
  875. X{
  876. X    int        c;
  877. X    int        eof;
  878. X    int        screens;
  879. X    int        i;
  880. X    long    filepos[MAXSCREENS];    /* seek position for each screen */
  881. X    int        screennr;            /* screen number; index == 0, 'c' == 1, 'd' == 2, etc */
  882. X#ifdef MSDOS
  883. X    char    *fnamep;
  884. X#endif
  885. X
  886. X/*
  887. X * try to open the file specified by the "helpfile" option
  888. X */
  889. X    if ((helpfd = fopen(p_hf, READBIN)) == NULL)
  890. X    {
  891. X#ifdef MSDOS
  892. X    /*
  893. X     * for MSDOS: try the DOS search path
  894. X     */
  895. X        fnamep = searchpath("vim.hlp");
  896. X        if (fnamep == NULL || (helpfd = fopen(fnamep, READBIN)) == NULL)
  897. X        {
  898. X            smsg("Sorry, help file \"%s\" and \"vim.hlp\" not found", p_hf);
  899. X            return;
  900. X        }
  901. X#else
  902. X        smsg("Sorry, help file \"%s\" not found", p_hf);
  903. X        return;
  904. X#endif
  905. X    }
  906. X    helpfilepos = 0;
  907. X    screennr = 0;
  908. X    for (i = 0; i < MAXSCREENS; ++i)
  909. X        filepos[i] = 0;
  910. X    State = HELP;
  911. X    for (;;)
  912. X    {
  913. X        screens = redrawhelp();                /* show one or more screens */
  914. X        eof = (screens < 0);
  915. X        if (!eof && screennr + screens < MAXSCREENS)
  916. X            filepos[screennr + screens] = ftell(helpfd);
  917. X
  918. X        if ((c = vgetc()) == '\n' || c == '\r' || c == Ctrl('C') || c == ESC)
  919. X            break;
  920. X
  921. X        if (c == ' ' ||
  922. X#ifdef MSDOS
  923. X                (c == K_NUL && vpeekc() == 'Q') ||    /* page down */
  924. X#endif
  925. X                c == Ctrl('F'))                        /* one screen forwards */
  926. X        {
  927. X            if (screennr < MAXSCREENS && !eof)
  928. X                ++screennr;
  929. X        }
  930. X        else if (c == 'a')                    /* go to first screen */
  931. X            screennr = 0;
  932. X        else if (c == 'b' ||
  933. X#ifdef MSDOS
  934. X                (c == K_NUL && vpeekc() == 'I') ||    /* page up */
  935. X#endif
  936. X                c == Ctrl('B'))                    /* go one screen backwards */
  937. X        {
  938. X            if (screennr > 0)
  939. X                --screennr;
  940. X        }
  941. X        else if (isalpha(c))                /* go to specified screen */
  942. X        {
  943. X            if (isupper(c))
  944. X                c = c - 'A' + 'z' + 1;        /* 'A' comes after 'z' */
  945. X            screennr = c - 'b';
  946. X        }
  947. X#ifdef MSDOS
  948. X        if (c == K_NUL)
  949. X            c = vgetc();
  950. X#endif
  951. X        for (i = screennr; i > 0; --i)
  952. X            if (filepos[i])
  953. X                break;
  954. X        fseek(helpfd, filepos[i], 0);
  955. X        while (i < screennr)
  956. X        {
  957. X            while ((c = getc(helpfd)) != '\f' && c != -1)
  958. X                ;
  959. X            if (c == -1)
  960. X                break;
  961. X            filepos[++i] = ftell(helpfd);    /* store the position just after the '\f' */
  962. X        }
  963. X        screennr = i;                        /* required when end of file reached */
  964. X        helpfilepos = filepos[screennr];
  965. X    }
  966. X    State = NORMAL;
  967. X    script_winsize_pp();
  968. X    fclose(helpfd);
  969. X    updateScreen(CLEAR);
  970. X}
  971. X
  972. X    int
  973. Xredrawhelp()
  974. X{
  975. X    int nextc;
  976. X    int col;
  977. X    int    line = 0;
  978. X    int    screens = 1;
  979. X
  980. X    fseek(helpfd, helpfilepos, 0);
  981. X    outstr(T_ED);
  982. X    windgoto(0,0);
  983. X    while ((nextc = getc(helpfd)) != -1 && (nextc != '\f' || line < Rows - 24))
  984. X    {
  985. X        if (nextc == Ctrl('B'))            /* begin of invert */
  986. X            outstr(T_TI);
  987. X        else if (nextc == Ctrl('E'))    /* end of invert */
  988. X            outstr(T_TP);
  989. X        else if (nextc == '\f')            /* start of next screen */
  990. X        {
  991. X            ++screens;
  992. X            outchar('\n');
  993. X            ++line;
  994. X        }
  995. X        else
  996. X        {
  997. X            outchar((char)nextc);
  998. X            if (nextc == '\n')
  999. X                ++line;
  1000. X        }
  1001. X    }
  1002. X    windgoto(0, (int)(Columns - strlen(Version) - 1));
  1003. X    outstrn(Version);
  1004. X    col = (int)Columns - 52;
  1005. X    if (col < 0)
  1006. X        col = 0;
  1007. X    windgoto((int)Rows - 1, col);
  1008. X    outstrn("<space = next; return = quit; a = index; b = back>");
  1009. X    return (nextc == -1 ? -1 : screens);
  1010. X}
  1011. END_OF_FILE
  1012. if test 3532 -ne `wc -c <'vim/src/help.c'`; then
  1013.     echo shar: \"'vim/src/help.c'\" unpacked with wrong size!
  1014. fi
  1015. chmod +x 'vim/src/help.c'
  1016. # end of 'vim/src/help.c'
  1017. fi
  1018. if test -f 'vim/src/keymap.h' -a "${1}" != "-c" ; then 
  1019.   echo shar: Will not clobber existing file \"'vim/src/keymap.h'\"
  1020. else
  1021. echo shar: Extracting \"'vim/src/keymap.h'\" \(2135 characters\)
  1022. sed "s/^X//" >'vim/src/keymap.h' <<'END_OF_FILE'
  1023. X/* vi:ts=4:sw=4
  1024. X *
  1025. X * VIM - Vi IMproved
  1026. X *
  1027. X * Code Contributions By:    Bram Moolenaar            mool@oce.nl
  1028. X *                            Tim Thompson            twitch!tjt
  1029. X *                            Tony Andrews            onecom!wldrdg!tony 
  1030. X *                            G. R. (Fred) Walter        watmath!watcgl!grwalter 
  1031. X */
  1032. X
  1033. X/*
  1034. X * Keycode definitions for special keys
  1035. X *
  1036. X * On systems that have any of these keys, the routine 'inchar' in the
  1037. X * machine-dependent code should return one of the codes here.
  1038. X */
  1039. X
  1040. X/*
  1041. X * On MSDOS we use other codes, because the codes 0x80 - 0xb0 are used
  1042. X * for special characters. If this is changed also change the numbers in
  1043. X * term.h and main.c.
  1044. X */
  1045. X#ifdef MSDOS
  1046. X# define K_OFF 0x30
  1047. X#else
  1048. X# define K_OFF 0x00
  1049. X#endif
  1050. X
  1051. X#define K_CCIRCM        0x1e    /* control circumflex */
  1052. X
  1053. X/*
  1054. X * careful: the next entries must be in the same order as the termcap strings
  1055. X * in term.h and the numbers must be consecutive (used by inchar()).
  1056. X */
  1057. X#define K_UARROW        (K_OFF + 0x80)
  1058. X#define K_DARROW        (K_OFF + 0x81)
  1059. X#define K_LARROW        (K_OFF + 0x82)
  1060. X#define K_RARROW        (K_OFF + 0x83)
  1061. X#define K_SUARROW        (K_OFF + 0x84)
  1062. X#define K_SDARROW        (K_OFF + 0x85)
  1063. X#define K_SLARROW        (K_OFF + 0x86)
  1064. X#define K_SRARROW        (K_OFF + 0x87)
  1065. X
  1066. X#define K_F1            (K_OFF + 0x88)    /* function keys */
  1067. X#define K_F2            (K_OFF + 0x89)
  1068. X#define K_F3            (K_OFF + 0x8a)
  1069. X#define K_F4            (K_OFF + 0x8b)
  1070. X#define K_F5            (K_OFF + 0x8c)
  1071. X#define K_F6            (K_OFF + 0x8d)
  1072. X#define K_F7            (K_OFF + 0x8e)
  1073. X#define K_F8            (K_OFF + 0x8f)
  1074. X#define K_F9            (K_OFF + 0x90)
  1075. X#define K_F10            (K_OFF + 0x91)
  1076. X
  1077. X#define K_SF1            (K_OFF + 0x92)    /* shifted function keys */
  1078. X#define K_SF2            (K_OFF + 0x93)
  1079. X#define K_SF3            (K_OFF + 0x94)
  1080. X#define K_SF4            (K_OFF + 0x95)
  1081. X#define K_SF5            (K_OFF + 0x96)
  1082. X#define K_SF6            (K_OFF + 0x97)
  1083. X#define K_SF7            (K_OFF + 0x98)
  1084. X#define K_SF8            (K_OFF + 0x99)
  1085. X#define K_SF9            (K_OFF + 0x9a)
  1086. X#define K_SF10            (K_OFF + 0x9b)
  1087. X
  1088. X#define K_HELP            (K_OFF + 0x9c)
  1089. X#define K_UNDO            (K_OFF + 0x9d)
  1090. X
  1091. X/*
  1092. X * NULs cannot be in the input string, therefore CTRL-@ is replaced by K_ZERO.
  1093. X * K_NUL is used for MSDOS extended keys (same value used in term.h).
  1094. X */
  1095. X#define K_NUL            (K_OFF + 0x9e)    /* for MSDOS: special key follows */
  1096. X#define K_ZERO            (K_OFF + 0x9f)    /* replaces ^@ */
  1097. END_OF_FILE
  1098. if test 2135 -ne `wc -c <'vim/src/keymap.h'`; then
  1099.     echo shar: \"'vim/src/keymap.h'\" unpacked with wrong size!
  1100. fi
  1101. chmod +x 'vim/src/keymap.h'
  1102. # end of 'vim/src/keymap.h'
  1103. fi
  1104. if test -f 'vim/src/linefunc.c' -a "${1}" != "-c" ; then 
  1105.   echo shar: Will not clobber existing file \"'vim/src/linefunc.c'\"
  1106. else
  1107. echo shar: Extracting \"'vim/src/linefunc.c'\" \(2618 characters\)
  1108. sed "s/^X//" >'vim/src/linefunc.c' <<'END_OF_FILE'
  1109. X/* vi:ts=4:sw=4
  1110. X *
  1111. X * VIM - Vi IMproved
  1112. X *
  1113. X * Code Contributions By:    Bram Moolenaar            mool@oce.nl
  1114. X *                            Tim Thompson            twitch!tjt
  1115. X *                            Tony Andrews            onecom!wldrdg!tony 
  1116. X *                            G. R. (Fred) Walter        watmath!watcgl!grwalter 
  1117. X */
  1118. X
  1119. X/*
  1120. X * linefunc.c: some functions to move to the next/previous line and
  1121. X *               to the next/previous character
  1122. X */
  1123. X
  1124. X#include "vim.h"
  1125. X#include "globals.h"
  1126. X#include "proto.h"
  1127. X
  1128. X/*
  1129. X * coladvance(col)
  1130. X *
  1131. X * Try to advance the Cursor to the specified column.
  1132. X */
  1133. X
  1134. X    void
  1135. Xcoladvance(wcol)
  1136. X    colnr_t         wcol;
  1137. X{
  1138. X    int                 index;
  1139. X    register u_char        *ptr;
  1140. X    register colnr_t    col;
  1141. X
  1142. X    ptr = (u_char *)nr2ptr(Curpos.lnum);
  1143. X
  1144. X    /* try to advance to the specified column */
  1145. X    index = -1;
  1146. X    col = 0;
  1147. X    while (col <= wcol && *ptr)
  1148. X    {
  1149. X        ++index;
  1150. X        /* Count a tab for what it's worth (if list mode not on) */
  1151. X        col += chartabsize(*ptr, col);
  1152. X        ++ptr;
  1153. X    }
  1154. X    if (index < 0)
  1155. X        Curpos.col = 0;
  1156. X    else
  1157. X        Curpos.col = index;
  1158. X}
  1159. X
  1160. X/*
  1161. X * inc(p)
  1162. X *
  1163. X * Increment the line pointer 'p' crossing line boundaries as necessary. Return
  1164. X * 1 when crossing a line, -1 when at end of file, 0 otherwise.
  1165. X */
  1166. X    int
  1167. Xinc(lp)
  1168. X    register FPOS  *lp;
  1169. X{
  1170. X    register char  *p = pos2ptr(lp);
  1171. X
  1172. X    if (*p != NUL)
  1173. X    {            /* still within line */
  1174. X        lp->col++;
  1175. X        return ((p[1] != NUL) ? 0 : 1);
  1176. X    }
  1177. X    if (lp->lnum != line_count)
  1178. X    {            /* there is a next line */
  1179. X        lp->col = 0;
  1180. X        lp->lnum++;
  1181. X        return 1;
  1182. X    }
  1183. X    return -1;
  1184. X}
  1185. X
  1186. X    int
  1187. XincCurpos()
  1188. X{
  1189. X    return inc(&Curpos);
  1190. X}
  1191. X
  1192. X/*
  1193. X * incl(lp): same as inc(), but skip the NUL at the end of non-empty lines
  1194. X */
  1195. X    int
  1196. Xincl(lp)
  1197. X    register FPOS *lp;
  1198. X{
  1199. X    register int r;
  1200. X
  1201. X    if ((r = inc(lp)) == 1 && lp->col)
  1202. X        r = inc(lp);
  1203. X    return r;
  1204. X}
  1205. X
  1206. X/*
  1207. X * dec(p)
  1208. X *
  1209. X * Decrement the line pointer 'p' crossing line boundaries as necessary. Return
  1210. X * 1 when crossing a line, -1 when at start of file, 0 otherwise.
  1211. X */
  1212. X    int
  1213. Xdec(lp)
  1214. X    register FPOS  *lp;
  1215. X{
  1216. X    if (lp->col > 0)
  1217. X    {            /* still within line */
  1218. X        lp->col--;
  1219. X        return 0;
  1220. X    }
  1221. X    if (lp->lnum > 1)
  1222. X    {            /* there is a prior line */
  1223. X        lp->lnum--;
  1224. X        lp->col = strlen(nr2ptr(lp->lnum));
  1225. X        return 1;
  1226. X    }
  1227. X    return -1;                    /* at start of file */
  1228. X}
  1229. X
  1230. X    int
  1231. XdecCurpos()
  1232. X{
  1233. X    return dec(&Curpos);
  1234. X}
  1235. X
  1236. X/*
  1237. X * decl(lp): same as dec(), but skip the NUL at the end of non-empty lines
  1238. X */
  1239. X    int
  1240. Xdecl(lp)
  1241. X        register FPOS *lp;
  1242. X{
  1243. X        register int r;
  1244. X
  1245. X        if ((r = dec(lp)) == 1 && lp->col)
  1246. X                r = dec(lp);
  1247. X        return r;
  1248. X}
  1249. X
  1250. X/*
  1251. X * make sure Curpos in on a valid character
  1252. X */
  1253. X    void
  1254. XadjustCurpos()
  1255. X{
  1256. X    int len;
  1257. X
  1258. X    if (Curpos.lnum == 0)
  1259. X        Curpos.lnum = 1;
  1260. X    if (Curpos.lnum > line_count)
  1261. X        Curpos.lnum = line_count;
  1262. X
  1263. X    len = strlen(nr2ptr(Curpos.lnum));
  1264. X    if (len == 0)
  1265. X        Curpos.col = 0;
  1266. X    else if (Curpos.col >= len)
  1267. X        Curpos.col = len - 1;
  1268. X}
  1269. END_OF_FILE
  1270. if test 2618 -ne `wc -c <'vim/src/linefunc.c'`; then
  1271.     echo shar: \"'vim/src/linefunc.c'\" unpacked with wrong size!
  1272. fi
  1273. chmod +x 'vim/src/linefunc.c'
  1274. # end of 'vim/src/linefunc.c'
  1275. fi
  1276. if test -f 'vim/src/makefile.bcc' -a "${1}" != "-c" ; then 
  1277.   echo shar: Will not clobber existing file \"'vim/src/makefile.bcc'\"
  1278. else
  1279. echo shar: Extracting \"'vim/src/makefile.bcc'\" \(3722 characters\)
  1280. sed "s/^X//" >'vim/src/makefile.bcc' <<'END_OF_FILE'
  1281. X#
  1282. X# Makefile for Borland C++ 2.0
  1283. X# Can also be used for Turbo C++
  1284. X#
  1285. X# The options are at the end of this file
  1286. X#
  1287. X
  1288. X.AUTODEPEND
  1289. X
  1290. X#        *Translator Definitions*
  1291. X#   use tcc for Turbo C++
  1292. XCC = bcc +VIM.CFG
  1293. X#CC = tcc +VIM.CFG
  1294. XTASM = TASM
  1295. XTLIB = tlib
  1296. XTLINK = tlink
  1297. X#
  1298. X# Adjust the paths for your environment
  1299. X#
  1300. XLIBPATH = E:\BORLANDC\LIB
  1301. XINCLUDEPATH = E:\BORLANDC\INCLUDE
  1302. X#        *Implicit Rules*
  1303. X.c.obj:
  1304. X  $(CC) -c {$< }
  1305. X.cpp.obj:
  1306. X  $(CC) -c {$< }
  1307. X#        *List Macros*
  1308. XEXE_dependencies =  \
  1309. X alloc.obj \
  1310. X buffers.obj \
  1311. X charset.obj \
  1312. X cmdline.obj \
  1313. X csearch.obj \
  1314. X digraph.obj \
  1315. X edit.obj \
  1316. X fileio.obj \
  1317. X help.obj \
  1318. X linefunc.obj \
  1319. X main.obj \
  1320. X mark.obj \
  1321. X message.obj \
  1322. X misccmds.obj \
  1323. X msdos.obj \
  1324. X normal.obj \
  1325. X ops.obj \
  1326. X param.obj \
  1327. X quickfix.obj \
  1328. X regexp.obj \
  1329. X regsub.obj \
  1330. X screen.obj \
  1331. X script.obj \
  1332. X search.obj \
  1333. X storage.obj \
  1334. X tag.obj \
  1335. X term.obj \
  1336. X undo.obj \
  1337. X version.obj
  1338. X#        *Explicit Rules*
  1339. X#  add /v for source degubbing
  1340. Xvim.exe: vim.cfg $(EXE_dependencies)
  1341. X  $(CC) -c version.c
  1342. X  $(TLINK) /x/c/L$(LIBPATH) @&&|
  1343. Xc0l.obj+
  1344. Xalloc.obj+
  1345. Xbuffers.obj+
  1346. Xcharset.obj+
  1347. Xcmdline.obj+
  1348. Xcsearch.obj+
  1349. Xdigraph.obj+
  1350. Xedit.obj+
  1351. Xfileio.obj+
  1352. Xhelp.obj+
  1353. Xlinefunc.obj+
  1354. Xmain.obj+
  1355. Xmark.obj+
  1356. Xmessage.obj+
  1357. Xmisccmds.obj+
  1358. Xmsdos.obj+
  1359. Xnormal.obj+
  1360. Xops.obj+
  1361. Xparam.obj+
  1362. Xquickfix.obj+
  1363. Xregexp.obj+
  1364. Xregsub.obj+
  1365. Xscreen.obj+
  1366. Xscript.obj+
  1367. Xsearch.obj+
  1368. Xstorage.obj+
  1369. Xtag.obj+
  1370. Xterm.obj+
  1371. Xundo.obj+
  1372. Xversion.obj
  1373. Xvim
  1374. X        # no map file
  1375. Xfp87.lib+
  1376. Xmathl.lib+
  1377. Xcl.lib
  1378. X|
  1379. X#        *Individual File Dependencies*
  1380. Xalloc.obj: alloc.c 
  1381. Xbuffers.obj: buffers.c 
  1382. Xcharset.obj: charset.c 
  1383. Xcmdline.obj: cmdline.c cmdtab.h
  1384. Xcmdtab.h: cmdtab.tab mkcmdtab.exe
  1385. X    mkcmdtab cmdtab.tab cmdtab.h
  1386. X
  1387. Xmkcmdtab.exe: mkcmdtab.obj
  1388. X    $(CC) -ml -omkcmdtab mkcmdtab.obj
  1389. X
  1390. Xmkcmdtab.obj: mkcmdtab.c
  1391. X    $(CC) $(CFLAGS) mkcmdtab.c
  1392. X
  1393. Xcsearch.obj: csearch.c 
  1394. Xdigraph.obj: digraph.c 
  1395. Xedit.obj: edit.c 
  1396. Xfileio.obj: fileio.c 
  1397. Xhelp.obj: help.c 
  1398. Xlinefunc.obj: linefunc.c 
  1399. Xmain.obj: main.c globals.h param.h
  1400. Xmark.obj: mark.c mark.h
  1401. Xmessage.obj: message.c 
  1402. Xmisccmds.obj: misccmds.c 
  1403. Xmsdos.obj: msdos.c 
  1404. Xnormal.obj: normal.c ops.h
  1405. Xops.obj: ops.c ops.h
  1406. Xparam.obj: param.c 
  1407. Xquickfix.obj: quickfix.c 
  1408. Xregexp.obj: regexp.c 
  1409. Xregsub.obj: regsub.c 
  1410. Xscreen.obj: screen.c 
  1411. Xscript.obj: script.c 
  1412. Xsearch.obj: search.c 
  1413. Xstorage.obj: storage.c 
  1414. Xtag.obj: tag.c mark.h
  1415. Xterm.obj: term.c term.h
  1416. Xundo.obj: undo.c 
  1417. Xversion.obj: version.c 
  1418. X#        *Compiler Configuration File*
  1419. X# The following compile options can be changed for better machines.
  1420. X#    replace -1- with -2 to produce code for a 80286 or higher
  1421. X#    replace -1- with -3 to produce code for a 80386 or higher
  1422. X#    add -v for source debugging
  1423. Xvim.cfg: makefile
  1424. X  copy &&|
  1425. X-ml
  1426. X-1-
  1427. X-f-
  1428. X-C
  1429. X-N
  1430. X-O
  1431. X-Z
  1432. X-k-
  1433. X-d
  1434. X-h
  1435. X-vi-
  1436. X-H=VIM.SYM
  1437. X-w-par
  1438. X-w-pro
  1439. X-weas
  1440. X-wpre
  1441. X-I$(INCLUDEPATH)
  1442. X-L$(LIBPATH)
  1443. X-DPC;MSDOS;DIGRAPHS
  1444. X| vim.cfg
  1445. X
  1446. X#
  1447. X# options:
  1448. X### -DDIGRAPHS        digraph support (at the cost of 1.6 Kbyte code)
  1449. X### -DNO_ARP        do not use arp.library, DOS 2.0 required
  1450. X### -DCOMPATIBLE    start in vi-compatible mode
  1451. X### -DNOBACKUP        default is no backup file
  1452. X### -DDEBUG        output a lot of debugging garbage
  1453. X### -DTERMCAP        include termcap file support
  1454. X### -DNO_BUILTIN_TCAPS    do not include builtin termcap entries
  1455. X###                (use only with -DTERMCAP)
  1456. X### -DSOME_BUILTIN_TCAPS include most useful builtin termcap entries
  1457. X###                (use only without -DNO_BUILTIN_TCAPS)
  1458. X### -DALL_BUILTIN_TCAPS    include all builtin termcap entries
  1459. X###                (use only without -DNO_BUILTIN_TCAPS)
  1460. X### -DVIMRC_FILE    name of the .vimrc file in current dir
  1461. X### -DEXRC_FILE        name of the .exrc file in current dir
  1462. X### -DSYSVIMRC_FILE    name of the global .vimrc file
  1463. X### -DSYSEXRC_FILE    name of the global .exrc file
  1464. X### -DDEFVIMRC_FILE    name of the system-wide .vimrc file
  1465. X### -DVIM_HLP        name of the help file
  1466. END_OF_FILE
  1467. if test 3722 -ne `wc -c <'vim/src/makefile.bcc'`; then
  1468.     echo shar: \"'vim/src/makefile.bcc'\" unpacked with wrong size!
  1469. fi
  1470. chmod +x 'vim/src/makefile.bcc'
  1471. # end of 'vim/src/makefile.bcc'
  1472. fi
  1473. if test -f 'vim/src/makefile.dice' -a "${1}" != "-c" ; then 
  1474.   echo shar: Will not clobber existing file \"'vim/src/makefile.dice'\"
  1475. else
  1476. echo shar: Extracting \"'vim/src/makefile.dice'\" \(3076 characters\)
  1477. sed "s/^X//" >'vim/src/makefile.dice' <<'END_OF_FILE'
  1478. X#
  1479. X# Makefile for VIM, using DICE 2.06.40 and 2.06.21
  1480. X#
  1481. X
  1482. X#>>>>> choose options:
  1483. X### -DDIGRAPHS        digraph support (at the cost of 1.6 Kbyte code)
  1484. X### -DNO_ARP        do not use arp.library, DOS 2.0 required
  1485. X### -DCOMPATIBLE    start in vi-compatible mode
  1486. X### -DNOBACKUP        default is no backup file
  1487. X### -DDEBUG        output a lot of debugging garbage
  1488. X### -DTERMCAP        include termcap file support
  1489. X### -DNO_BUILTIN_TCAPS    do not include builtin termcap entries
  1490. X###                (use only with -DTERMCAP)
  1491. X### -DSOME_BUILTIN_TCAPS include most useful builtin termcap entries
  1492. X###                (use only without -DNO_BUILTIN_TCAPS)
  1493. X### -DALL_BUILTIN_TCAPS    include all builtin termcap entries
  1494. X###                (use only without -DNO_BUILTIN_TCAPS)
  1495. XDEFINES = -DTERMCAP -DDIGRAPHS -DSOME_BUILTIN_TCAPS
  1496. X
  1497. X#>>>>> if TERMCAP is defined termlib.o has to be used
  1498. XTERMLIB = termlib.o
  1499. X#TERMLIB = 
  1500. X
  1501. X#>>>>> end of choices
  1502. X###########################################################################
  1503. X
  1504. XCFLAGS = -c -DAMIGA $(DEFINES)
  1505. X
  1506. XINCL = vim.syms
  1507. XPRE = -H${INCL}=vim.h
  1508. XLIBS = -lmanx -la
  1509. XCC = dcc
  1510. XLD = dcc
  1511. X
  1512. X.c.o:
  1513. X    ${CC} ${PRE} ${CFLAGS} $*.c -o $@
  1514. X
  1515. XOBJ =    alloc.o amiga.o buffers.o charset.o cmdline.o csearch.o digraph.o \
  1516. X    edit.o fileio.o help.o linefunc.o main.o mark.o message.o misccmds.o \
  1517. X    normal.o ops.o param.o quickfix.o regexp.o regsub.o screen.o \
  1518. X    script.o search.o storage.o tag.o undo.o $(TERMLIB)
  1519. X
  1520. X/Vim: $(OBJ) version.c
  1521. X    ${CC} $(CFLAGS) version.c -o version.o
  1522. X    ${LD} -o /Vim $(OBJ) version.o $(LIBS)
  1523. X
  1524. Xdebug: $(OBJ) version.c
  1525. X    ${CC} $(CFLAGS) version.c -o version.o
  1526. X    ${LD} -s -o /Vim $(OBJ) version.o $(LIBS)
  1527. X
  1528. Xctags:
  1529. X    csh -c ctags *.c *.h
  1530. X
  1531. X# can't use delete here, too many file names
  1532. Xclean:
  1533. X    csh -c rm -f $(OBJ) version.o mkcmdtab.o /Vim $(INCL) mkcmdtab
  1534. X
  1535. X$(INCL)  : vim.h globals.h keymap.h macros.h ascii.h term.h amiga.h
  1536. X    delete $(INCL)
  1537. X
  1538. X###########################################################################
  1539. X
  1540. Xalloc.o:    alloc.c  $(INCL)
  1541. X
  1542. Xamiga.o:    amiga.c  $(INCL) amiga.h
  1543. X
  1544. Xbuffers.o:    buffers.c  $(INCL)
  1545. X
  1546. Xcharset.o:    charset.c  $(INCL)
  1547. X
  1548. Xcmdline.o:    cmdline.c  $(INCL) cmdtab.h
  1549. X
  1550. Xcsearch.o:    csearch.c  $(INCL) regexp.h
  1551. X
  1552. Xdigraph.o: digraph.c    $(INCL)
  1553. X
  1554. Xedit.o: edit.c    $(INCL)
  1555. X
  1556. Xfileio.o:    fileio.c  $(INCL)
  1557. X
  1558. Xhelp.o: help.c    $(INCL)
  1559. X
  1560. Xlinefunc.o:    linefunc.c  $(INCL)
  1561. X
  1562. Xmain.o: main.c
  1563. X    ${CC} ${CFLAGS} main.c -o main.o
  1564. X
  1565. Xmark.o: mark.c    $(INCL) mark.h
  1566. X
  1567. Xmessage.o:    message.c  $(INCL)
  1568. X
  1569. Xmisccmds.o:    misccmds.c  $(INCL)
  1570. X
  1571. Xnormal.o:    normal.c  $(INCL) ops.h
  1572. X
  1573. Xops.o:    ops.c  $(INCL) ops.h
  1574. X
  1575. Xparam.o:    param.c  $(INCL)
  1576. X# Because of a bug in DC1 2.06.40, initialisation of unions does not
  1577. X# work correctly. dc1-21 is DC1 2.06.21 which does work.
  1578. X    rename dc1-21 dc1
  1579. X    ${CC} ${CFLAGS} param.c -o param.o
  1580. X    rename dc1 dc1-21
  1581. X
  1582. Xquickfix.o:    quickfix.c  $(INCL)
  1583. X
  1584. Xregexp.o:    regexp.c  $(INCL) regexp.h
  1585. X
  1586. Xregsub.o:    regsub.c  $(INCL) regexp.h
  1587. X
  1588. Xscreen.o:    screen.c  $(INCL)
  1589. X
  1590. Xscript.o:    script.c  $(INCL)
  1591. X
  1592. Xsearch.o:    search.c  $(INCL) regexp.h
  1593. X
  1594. Xtag.o:    tags.c  $(INCL) mark.h
  1595. X
  1596. Xtermlib.o:    termlib.c $(INCL)
  1597. X
  1598. Xstorage.o:    storage.c  $(INCL)
  1599. X
  1600. Xundo.o: undo.c    $(INCL)
  1601. X
  1602. Xcmdtab.h: cmdtab.tab mkcmdtab
  1603. X    mkcmdtab cmdtab.tab cmdtab.h
  1604. X
  1605. Xmkcmdtab: mkcmdtab.o
  1606. X    ${LD} -o mkcmdtab mkcmdtab.o
  1607. END_OF_FILE
  1608. if test 3076 -ne `wc -c <'vim/src/makefile.dice'`; then
  1609.     echo shar: \"'vim/src/makefile.dice'\" unpacked with wrong size!
  1610. fi
  1611. chmod +x 'vim/src/makefile.dice'
  1612. # end of 'vim/src/makefile.dice'
  1613. fi
  1614. if test -f 'vim/src/makefile.dos' -a "${1}" != "-c" ; then 
  1615.   echo shar: Will not clobber existing file \"'vim/src/makefile.dos'\"
  1616. else
  1617. echo shar: Extracting \"'vim/src/makefile.dos'\" \(3714 characters\)
  1618. sed "s/^X//" >'vim/src/makefile.dos' <<'END_OF_FILE'
  1619. X#
  1620. X# Makefile for VIM on MSDOS, using Turbo C
  1621. X#
  1622. X
  1623. X#>>>>> choose options:
  1624. X### -DDIGRAPHS        digraph support (at the cost of 1.6 Kbyte code)
  1625. X### -DCOMPATIBLE    start in vi-compatible mode
  1626. X### -DNOBACKUP        default is no backup file
  1627. X### -DDEBUG        output a lot of debugging garbage
  1628. X### -DTERMCAP        include termcap file support
  1629. X### -DNO_BUILTIN_TCAPS    do not include builtin termcap entries
  1630. X###                (use only with -DTERMCAP)
  1631. X### -DSOME_BUILTIN_TCAPS include most useful builtin termcap entries
  1632. X###                (use only without -DNO_BUILTIN_TCAPS)
  1633. X### -DALL_BUILTIN_TCAPS    include all builtin termcap entries
  1634. X###                (use only without -DNO_BUILTIN_TCAPS)
  1635. X### -DVIMRC_FILE    name of the .vimrc file in current dir
  1636. X### -DEXRC_FILE        name of the .exrc file in current dir
  1637. X### -DSYSVIMRC_FILE    name of the global .vimrc file
  1638. X### -DSYSEXRC_FILE    name of the global .exrc file
  1639. X### -DDEFVIMRC_FILE    name of the system-wide .vimrc file
  1640. X### -DVIM_HLP        name of the help file
  1641. XDEFINES = -DDIGRAPHS
  1642. X
  1643. X#>>>>> name of the compiler and linker, name of lib directory
  1644. XCC = tcc
  1645. XLINK = tlink
  1646. XLIB = c:\turboc\lib
  1647. X
  1648. X#>>>>> end of choices
  1649. X###########################################################################
  1650. X
  1651. XINCL = vim.h globals.h param.h keymap.h macros.h ascii.h term.h msdos.h
  1652. XCFLAGS = -c -ml -DMSDOS $(DEFINES)
  1653. X
  1654. XOBJ =    alloc.obj msdos.obj buffers.obj charset.obj cmdline.obj csearch.obj \
  1655. X    digraph.obj edit.obj fileio.obj help.obj linefunc.obj main.obj mark.obj \
  1656. X    message.obj misccmds.obj normal.obj ops.obj param.obj quickfix.obj \
  1657. X    regexp.obj regsub.obj screen.obj script.obj search.obj storage.obj \
  1658. X    tag.obj term.obj undo.obj
  1659. X
  1660. X..\vim: $(OBJ) version.c
  1661. X    $(CC) $(CFLAGS) version.c
  1662. X    $(LINK) /c /m $(LIB)\C0l @vimresp,..\vim,..\vim,$(LIB)\emu $(LIB)\Cl
  1663. X
  1664. Xctags:
  1665. X    command /c ctags *.c *.h
  1666. X
  1667. Xclean:
  1668. X    del $(OBJ) version.obj mkcmdtab.obj ..\vim mkcmdtab
  1669. X
  1670. Xaddcr:    addcr.c
  1671. X    $(CC) addcr.c
  1672. X    command /c addcr.bat
  1673. X
  1674. X###########################################################################
  1675. X
  1676. Xalloc.obj:    alloc.c  $(INCL)
  1677. X    $(CC) $(CFLAGS) alloc.c
  1678. X
  1679. Xmsdos.obj:    msdos.c  $(INCL) msdos.h
  1680. X    $(CC) $(CFLAGS) msdos.c
  1681. X
  1682. Xbuffers.obj:    buffers.c  $(INCL)
  1683. X    $(CC) $(CFLAGS) buffers.c
  1684. X
  1685. Xcharset.obj:    charset.c  $(INCL)
  1686. X    $(CC) $(CFLAGS) charset.c
  1687. X
  1688. Xcmdline.obj:    cmdline.c  $(INCL) cmdtab.h
  1689. X    $(CC) $(CFLAGS) cmdline.c
  1690. X
  1691. Xcsearch.obj:    csearch.c  $(INCL)
  1692. X    $(CC) $(CFLAGS) csearch.c
  1693. X
  1694. Xdigraph.obj:    digraph.c  $(INCL)
  1695. X    $(CC) $(CFLAGS) digraph.c
  1696. X
  1697. Xedit.obj:    edit.c  $(INCL)
  1698. X    $(CC) $(CFLAGS) edit.c
  1699. X
  1700. Xfileio.obj:    fileio.c  $(INCL)
  1701. X    $(CC) $(CFLAGS) fileio.c
  1702. X
  1703. Xhelp.obj:    help.c  $(INCL)
  1704. X    $(CC) $(CFLAGS) help.c
  1705. X
  1706. Xlinefunc.obj:    linefunc.c  $(INCL)
  1707. X    $(CC) $(CFLAGS) linefunc.c
  1708. X
  1709. Xmain.obj:    main.c  $(INCL)
  1710. X    $(CC) $(CFLAGS) main.c
  1711. X
  1712. Xmark.obj:    mark.c  $(INCL)
  1713. X    $(CC) $(CFLAGS) mark.c
  1714. X
  1715. Xmessage.obj:    message.c  $(INCL)
  1716. X    $(CC) $(CFLAGS) message.c
  1717. X
  1718. Xmisccmds.obj:    misccmds.c  $(INCL)
  1719. X    $(CC) $(CFLAGS) misccmds.c
  1720. X
  1721. Xnormal.obj:    normal.c  $(INCL) ops.h
  1722. X    $(CC) $(CFLAGS) normal.c
  1723. X
  1724. Xops.obj:    ops.c  $(INCL) ops.h
  1725. X    $(CC) $(CFLAGS) ops.c
  1726. X
  1727. Xparam.obj:    param.c  $(INCL)
  1728. X    $(CC) $(CFLAGS) param.c
  1729. X
  1730. Xquickfix.obj:    quickfix.c  $(INCL)
  1731. X    $(CC) $(CFLAGS) quickfix.c
  1732. X
  1733. Xregexp.obj:    regexp.c  $(INCL)
  1734. X    $(CC) $(CFLAGS) regexp.c
  1735. X
  1736. Xregsub.obj:    regsub.c  $(INCL)
  1737. X    $(CC) $(CFLAGS) regsub.c
  1738. X
  1739. Xscreen.obj:    screen.c  $(INCL)
  1740. X    $(CC) $(CFLAGS) screen.c
  1741. X
  1742. Xscript.obj:    script.c  $(INCL)
  1743. X    $(CC) $(CFLAGS) script.c
  1744. X
  1745. Xsearch.obj:    search.c  $(INCL)
  1746. X    $(CC) $(CFLAGS) search.c
  1747. X
  1748. Xstorage.obj:    storage.c  $(INCL)
  1749. X    $(CC) $(CFLAGS) storage.c
  1750. X
  1751. Xtag.obj:    tag.c  $(INCL)
  1752. X    $(CC) $(CFLAGS) tag.c
  1753. X
  1754. Xterm.obj:    term.c  $(INCL)
  1755. X    $(CC) $(CFLAGS) term.c
  1756. X
  1757. Xundo.obj:    undo.c  $(INCL)
  1758. X    $(CC) $(CFLAGS) undo.c
  1759. X
  1760. Xcmdtab.h: cmdtab.tab mkcmdtab.exe
  1761. X    mkcmdtab cmdtab.tab cmdtab.h
  1762. X
  1763. Xmkcmdtab.exe: mkcmdtab.obj
  1764. X    $(CC) -ml -omkcmdtab mkcmdtab.obj
  1765. X
  1766. Xmkcmdtab.obj: mkcmdtab.c
  1767. X    $(CC) $(CFLAGS) mkcmdtab.c
  1768. END_OF_FILE
  1769. if test 3714 -ne `wc -c <'vim/src/makefile.dos'`; then
  1770.     echo shar: \"'vim/src/makefile.dos'\" unpacked with wrong size!
  1771. fi
  1772. chmod +x 'vim/src/makefile.dos'
  1773. # end of 'vim/src/makefile.dos'
  1774. fi
  1775. if test -f 'vim/src/message.c' -a "${1}" != "-c" ; then 
  1776.   echo shar: Will not clobber existing file \"'vim/src/message.c'\"
  1777. else
  1778. echo shar: Extracting \"'vim/src/message.c'\" \(3525 characters\)
  1779. sed "s/^X//" >'vim/src/message.c' <<'END_OF_FILE'
  1780. X/* vi:ts=4:sw=4
  1781. X *
  1782. X * VIM - Vi IMproved
  1783. X *
  1784. X * Code Contributions By:    Bram Moolenaar            mool@oce.nl
  1785. X *                            Tim Thompson            twitch!tjt
  1786. X *                            Tony Andrews            onecom!wldrdg!tony 
  1787. X *                            G. R. (Fred) Walter        watmath!watcgl!grwalter 
  1788. X */
  1789. X
  1790. X/*
  1791. X * message.c: functions for displaying messages on the command line
  1792. X */
  1793. X
  1794. X#include "vim.h"
  1795. X#include "globals.h"
  1796. X#define MESSAGE
  1797. X#include "proto.h"
  1798. X#include "param.h"
  1799. X
  1800. Xstatic int msg_invert = FALSE;        /* message should be inverted */
  1801. X
  1802. X/*
  1803. X * msg(s) - displays the string 's' on the status line
  1804. X */
  1805. X    void
  1806. Xmsg(s)
  1807. X    char           *s;
  1808. X{
  1809. X    if (Columns == 0)    /* terminal not initialized */
  1810. X    {
  1811. X        fprintf(stderr, s);
  1812. X        fflush(stderr);
  1813. X        return;
  1814. X    }
  1815. X
  1816. X    start_msg();
  1817. X    if (msg_invert && T_TI)
  1818. X    {
  1819. X        outstr(T_TI);
  1820. X        char_count -= strlen(T_TI);
  1821. X    }
  1822. X    outtrans(s, -1);
  1823. X    if (msg_invert && T_TP)
  1824. X    {
  1825. X        outstr(T_TP);
  1826. X        msg_invert = FALSE;
  1827. X        char_count -= strlen(T_TP);
  1828. X    }
  1829. X    end_msg();
  1830. X}
  1831. X
  1832. X#ifndef PROTO        /* automatic prototype generation does not understand this */
  1833. X/* VARARGS */
  1834. X    void
  1835. Xsmsg(s, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10)
  1836. X    char        *s;
  1837. X    long        a1, a2, a3, a4, a5, a6, a7, a8, a9, a10;
  1838. X{
  1839. X    sprintf(IObuff, s, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10);
  1840. X    msg(IObuff);
  1841. X}
  1842. X#endif
  1843. X
  1844. X/*
  1845. X * emsg() - display an error message
  1846. X *
  1847. X * Rings the bell, if appropriate, and calls message() to do the real work
  1848. X */
  1849. X    void
  1850. Xemsg(s)
  1851. X    char           *s;
  1852. X{
  1853. X    if (p_eb)
  1854. X        beep();                    /* also includes flush_buffers() */
  1855. X    else
  1856. X        flush_buffers(FALSE);    /* flush internal buffers */
  1857. X    msg_invert = TRUE;
  1858. X    msg(s);
  1859. X    if (char_count < sc_col)    /* if wait_return not called */
  1860. X        sleep(1);                /* give the user a chance to read the message */
  1861. X}
  1862. X
  1863. X    void
  1864. Xemsg2(s, a1)
  1865. X    char *s, *a1;
  1866. X{
  1867. X    sprintf(IObuff, s, a1);
  1868. X    emsg(IObuff);
  1869. X}
  1870. X
  1871. Xextern int global_busy, global_wait;    /* shared with csearch.c, cmdline.c */
  1872. X
  1873. X    void
  1874. Xwait_return(redraw)
  1875. X    int        redraw;
  1876. X{
  1877. X    u_char            c;
  1878. X    int                oldState;
  1879. X    int                tmpState;
  1880. X
  1881. X        /* with the global command we only need one return at the end */
  1882. X    if (global_busy)
  1883. X    {
  1884. X        global_wait = 1;
  1885. X        starttermcap();
  1886. X        return;
  1887. X    }
  1888. X    oldState = State;
  1889. X    State = HITRETURN;
  1890. X    if (got_int)
  1891. X        outstrn("Interrupt: ");
  1892. X
  1893. X#ifdef ORG_HITRETURN
  1894. X    outstrn("Press RETURN to continue");
  1895. X    do {
  1896. X        c = vgetc();
  1897. X    } while (strchr("\r\n: ", c) == NULL);
  1898. X    if (c == ':')                     /* this can vi too (but not always!) */
  1899. X        stuffcharReadbuff(c);
  1900. X#else
  1901. X    outstrn("Press RETURN or enter command to continue");
  1902. X    c = vgetc();
  1903. X    breakcheck();
  1904. X    if (strchr("\r\n ", c) == NULL)
  1905. X        stuffcharReadbuff(c);
  1906. X#endif
  1907. X
  1908. X    if (!termcap_active)            /* start termcap before redrawing */
  1909. X        starttermcap();
  1910. X
  1911. X/*
  1912. X * If the window size changed set_winsize() will redraw the screen.
  1913. X * Otherwise the screen is only redrawn if 'redraw' is set.
  1914. X */
  1915. X    tmpState = State;
  1916. X    State = oldState;                /* restore State before set_winsize */
  1917. X    if (tmpState == SETWSIZE)        /* got resize event while in vgetc() */
  1918. X        set_winsize(0, 0, FALSE);
  1919. X    else if (redraw)
  1920. X        updateScreen(CLEAR);
  1921. X
  1922. X    script_winsize_pp();
  1923. X}
  1924. X
  1925. X    void
  1926. Xstart_msg()
  1927. X{
  1928. X    gotocmdline(TRUE, NUL);
  1929. X    char_count = 0;
  1930. X}
  1931. X
  1932. X    void
  1933. Xend_msg()
  1934. X{
  1935. X    /*
  1936. X     * if the string is larger than the window,
  1937. X     * or the ruler option is set and we run into it,
  1938. X     * we have to redraw the window.
  1939. X     * Do not do this if we are abandoning the file.
  1940. X     */
  1941. X    if (!exiting && char_count >= sc_col)
  1942. X    {
  1943. X        outchar('\n');
  1944. X        wait_return(TRUE);
  1945. X    }
  1946. X    else
  1947. X        flushbuf();
  1948. X}
  1949. X
  1950. X    void
  1951. Xcheck_msg()
  1952. X{
  1953. X    /*
  1954. X     * if the string is larger than the window,
  1955. X     * or the ruler option is set and we run into it,
  1956. X     * we have to redraw the window later.
  1957. X     */
  1958. X    if (char_count >= sc_col)
  1959. X        must_redraw = CLEAR;
  1960. X    cmdoffset = char_count / Columns;
  1961. X}
  1962. END_OF_FILE
  1963. if test 3525 -ne `wc -c <'vim/src/message.c'`; then
  1964.     echo shar: \"'vim/src/message.c'\" unpacked with wrong size!
  1965. fi
  1966. chmod +x 'vim/src/message.c'
  1967. # end of 'vim/src/message.c'
  1968. fi
  1969. if test -f 'vim/src/msdos.h' -a "${1}" != "-c" ; then 
  1970.   echo shar: Will not clobber existing file \"'vim/src/msdos.h'\"
  1971. else
  1972. echo shar: Extracting \"'vim/src/msdos.h'\" \(2144 characters\)
  1973. sed "s/^X//" >'vim/src/msdos.h' <<'END_OF_FILE'
  1974. X/* vi:ts=8:sw=4
  1975. X *
  1976. X * VIM - Vi IMproved
  1977. X *
  1978. X * Code Contributions By:    Bram Moolenaar        mool@oce.nl
  1979. X *                Tim Thompson        twitch!tjt
  1980. X *                Tony Andrews        onecom!wldrdg!tony
  1981. X *                G. R. (Fred) Walter    watmath!watcgl!grwalter
  1982. X */
  1983. X
  1984. X/*
  1985. X * MSDOS Machine-dependent filenames.
  1986. X */
  1987. X#ifdef SYSEXRC_FILE
  1988. X# undef SYSEXRC_FILE
  1989. X# undef SYSVIMRC_FILE
  1990. X#endif /* SYSEXRC_FILE */
  1991. X#define SYSEXRC_FILE "$VIM\\_exrc"
  1992. X#define SYSVIMRC_FILE "$VIM\\_vimrc"
  1993. X
  1994. X#ifdef EXRC_FILE
  1995. X# undef EXRC_FILE
  1996. X# undef VIMRC_FILE
  1997. X#endif /* EXRC_FILE */
  1998. X#define EXRC_FILE "_exrc"
  1999. X#define VIMRC_FILE "_vimrc"
  2000. X
  2001. X#ifdef VIM_HLP
  2002. X# undef VIM_HLP
  2003. X#endif /* VIM_HLP */
  2004. X#define VIM_HLP "$VIM\\vim.hlp"
  2005. X
  2006. X#ifdef TMPNAME1
  2007. X# undef TMPNAME1
  2008. X# undef TMPNAME2
  2009. X# undef TMPNAMELEN
  2010. X#endif /* TMPNAME1 */
  2011. X#define TMPNAME1 "viXXXXXX"        /* put it in current dir */
  2012. X#define TMPNAME2 "voXXXXXX"        /*  is there a better place? */
  2013. X#define TMPNAMELEN    10
  2014. X
  2015. X/*
  2016. X * MSDOS Machine-dependent routines.
  2017. X */
  2018. X
  2019. X#ifdef remove
  2020. X# undef remove                   /* MSDOS remove()s when not readonly */
  2021. X#endif
  2022. X#define remove vim_remove
  2023. X
  2024. X/* use chdir() that also changes the default drive */
  2025. X#define chdir vim_chdir
  2026. X
  2027. X/* msdos.c */
  2028. Xvoid    vim_delay __ARGS((void));
  2029. Xint    vim_remove __ARGS((char *));
  2030. Xvoid    flushbuf __ARGS((void));
  2031. Xvoid    outchar __ARGS((unsigned));
  2032. Xvoid    outstr __ARGS((char *));
  2033. Xint     GetChars __ARGS((char *, int, int));
  2034. Xvoid    mch_suspend __ARGS((void));
  2035. Xvoid    mch_windinit __ARGS((void));
  2036. Xvoid    check_win __ARGS((int, char **));
  2037. Xvoid    fname_case __ARGS((char *));
  2038. Xvoid    settitle __ARGS((char *));
  2039. Xvoid    resettitle __ARGS((void));
  2040. Xint    dirname __ARGS((char *, int));
  2041. Xint    FullName __ARGS((char *, char *, int));
  2042. Xlong    getperm __ARGS((char *));
  2043. Xint    setperm __ARGS((char *, long));
  2044. Xint    isdir __ARGS((char *));
  2045. Xvoid    mch_windexit __ARGS((int));
  2046. Xvoid    mch_settmode __ARGS((int));
  2047. Xint    mch_get_winsize __ARGS((void));
  2048. Xvoid    mch_set_winsize __ARGS((void));
  2049. Xint    call_shell __ARGS((char *, int, int));
  2050. Xvoid    breakcheck __ARGS((void));
  2051. Xchar    *modname __ARGS((char *, char *));
  2052. Xint    has_wildcard __ARGS((char *));
  2053. Xint    ExpandWildCards __ARGS((int, char **, int *, char ***, int, int));
  2054. Xvoid    FreeWild __ARGS((int, char **));
  2055. Xvoid    set_window __ARGS((void));
  2056. END_OF_FILE
  2057. if test 2144 -ne `wc -c <'vim/src/msdos.h'`; then
  2058.     echo shar: \"'vim/src/msdos.h'\" unpacked with wrong size!
  2059. fi
  2060. chmod +x 'vim/src/msdos.h'
  2061. # end of 'vim/src/msdos.h'
  2062. fi
  2063. if test -f 'vim/src/tccon_tc.uue' -a "${1}" != "-c" ; then 
  2064.   echo shar: Will not clobber existing file \"'vim/src/tccon_tc.uue'\"
  2065. else
  2066. echo shar: Extracting \"'vim/src/tccon_tc.uue'\" \(2410 characters\)
  2067. sed "s/^X//" >'vim/src/tccon_tc.uue' <<'END_OF_FILE'
  2068. X
  2069. Xbegin 644 tcconfig.tc
  2070. XM5'5R8F\@0R!#;VYF:6=U<F%T:6]N($9I;&4@&@`!#1(7`1H``@$!``(````";
  2071. XM``(``0`#``(``@`$``$```4``0``!@`!```(``$`!`D``@````T``@`!``X`2
  2072. XM`@```!$``0`($@`"````$P`"`!D`%``"````%0`"``$`%@`"````%P`"``$`^
  2073. XM&``"``$`9``!``%E``$``68``0`!9P`!``%H``$``6D``0`!:@`!``%K``$`F
  2074. XM`6P``0`!;0`!``%N``$``6\``0`!<``!``%Q``$``7(``0`!<P`!``%T``$`"
  2075. XM`74``0`!=@`!``%W``$``7@``0`!>0`!``%Z``$``7L``0``?``!``%]``$`2
  2076. XM`7X``0``?P`!``&```$``8(``0``A``!``&%``$``<@``0``R0`!``#*``$`Q
  2077. XM`<L``0``S``!``#-``$``,X``0`!SP`!``#0``$`&=$``0!DT@`!`"#5``$`Q
  2078. XM`-<``0``V``!``#9``$``=H``0`!VP`!``#<``$``=T``0`!W@`!``#?``$``
  2079. XM`.```0``X0`!``#B``$``2P!1```````````````````````````````````8
  2080. XM`````````````````````````````````````````````````````````"T!N
  2081. XM@`!$.EQ40UQ)3D-,541%````````````````````````````````````````1
  2082. XM`````````````````````````````````````````````````````````````
  2083. XM`````````````````````````````````````````````````````"X!@`!$S
  2084. XM.EQ40UQ,24(`````````````````````````````````````````````````@
  2085. XM`````````````````````````````````````````````````````````````
  2086. XM`````````````````````````````````````````````````"\!4`!624TN:
  2087. XM4%)*````````````````````````````````````````````````````````L
  2088. XM`````````````````````````````````````````#`!!``S,@``,0$%`#(UX
  2089. XM````,@$%`#$P,```,P%_`$U31$]3.U=)3$1?0T%21%,`````````````````Y
  2090. XM`````````````````````````````````````````````````````````````
  2091. XM`````````````````````````````````````````````````````````````
  2092. XM```````````T`1X`*@``````````````````````````````````````-0$>1
  2093. XM`"H``````````````````````````````````````#8!'@`J````````````I
  2094. XM```````````````````````````W`1X`*@```````````````````````````
  2095. XM````````````.`$>`"H``````````````````````````````````````#D![
  2096. XM'@`J```````````````````````````````````````Z`1X`*@``````````+
  2097. XM````````````````````````````.P$>`"H`````````````````````````$
  2098. XM`````````````#P!'@`J```````````````````````````````````````]"
  2099. XM`8``````````````````````````````````````````````````````````!
  2100. XM`````````````````````````````````````````````````````````````
  2101. XM```````````````````````````````````````````````````````^`00`#
  2102. XM.````#\!4```````````````````````````````````````````````````(
  2103. XM`````````````````````````````````````````````````````````$`!!
  2104. XM1`!$.EQ40P``````````````````````````````````````````````````U
  2105. XM`````````````````````````````````$$!4```````````````````````2
  2106. XM`````````````````````````````````````````````````````````````
  2107. X9`````````````````````````/__`@`:````:
  2108. X``
  2109. Xend
  2110. Xsize 1690
  2111. END_OF_FILE
  2112. if test 2410 -ne `wc -c <'vim/src/tccon_tc.uue'`; then
  2113.     echo shar: \"'vim/src/tccon_tc.uue'\" unpacked with wrong size!
  2114. fi
  2115. chmod +x 'vim/src/tccon_tc.uue'
  2116. # end of 'vim/src/tccon_tc.uue'
  2117. fi
  2118. if test -f 'vim/src/unix.h' -a "${1}" != "-c" ; then 
  2119.   echo shar: Will not clobber existing file \"'vim/src/unix.h'\"
  2120. else
  2121. echo shar: Extracting \"'vim/src/unix.h'\" \(2448 characters\)
  2122. sed "s/^X//" >'vim/src/unix.h' <<'END_OF_FILE'
  2123. X/* vi:ts=4:sw=4
  2124. X *
  2125. X * VIM - Vi IMproved
  2126. X *
  2127. X * Code Contributions By:    Bram Moolenaar            mool@oce.nl
  2128. X *                            Tim Thompson            twitch!tjt
  2129. X *                            Tony Andrews            onecom!wldrdg!tony 
  2130. X *                            G. R. (Fred) Walter        watmath!watcgl!grwalter 
  2131. X */
  2132. X
  2133. X/*
  2134. X * Unix system-dependent filenames
  2135. X */
  2136. X#define BACKUPDIR "$HOME"
  2137. X
  2138. X#ifdef TMPNAME1
  2139. X# undef TMPNAME1
  2140. X# undef TMPNAME2
  2141. X# undef TMPNAMELEN
  2142. X#endif /* TMPNAME1 */
  2143. X#define TMPNAME1 "/tmp/viXXXXXX"
  2144. X#define TMPNAME2 "/tmp/voXXXXXX"
  2145. X#define TMPNAMELEN    15
  2146. X
  2147. X#ifdef MAX_COLUMNS
  2148. X# undef MAX_COLUMNS
  2149. X#endif /* MAX_COLUMNS */
  2150. X#define MAX_COLUMNS 1024
  2151. X
  2152. X#define stricmp vim_stricmp
  2153. X
  2154. Xvoid    flushbuf __ARGS((void));
  2155. Xvoid    outchar __ARGS((unsigned));
  2156. Xvoid    outstr __ARGS((char *));
  2157. Xvoid    mch_write __ARGS((char *, int));
  2158. Xint     GetChars __ARGS((char *, int, int));
  2159. Xvoid    vim_delay __ARGS((void));
  2160. Xvoid    mch_suspend __ARGS((void));
  2161. Xvoid    mch_windinit __ARGS((void));
  2162. Xvoid    check_win __ARGS((int, char **));
  2163. Xvoid    fname_case __ARGS((char *));
  2164. Xvoid    settitle __ARGS((char *));
  2165. Xvoid    resettitle __ARGS((void));
  2166. Xvoid    mch_settmode __ARGS((int));
  2167. Xint     dirname __ARGS((char *, int));
  2168. Xint        FullName __ARGS((char *, char *, int));
  2169. Xlong    getperm __ARGS((char *));
  2170. Xint        setperm __ARGS((char *, int));
  2171. Xint        isdir __ARGS((char *));
  2172. Xvoid    mch_windexit __ARGS((int));
  2173. Xint        mch_get_winsize __ARGS((void));
  2174. Xvoid    mch_set_winsize __ARGS((void));
  2175. Xint        call_shell __ARGS((char *, int, int));
  2176. Xvoid    breakcheck __ARGS((void));
  2177. X#ifdef SCO
  2178. Xint        chmod __ARGS((const char *, mode_t));
  2179. X#endif
  2180. X#if !defined(linux) && !defined(__NeXT) && !defined(M_UNIX) && !defined(ISC) && !defined(USL)
  2181. Xint        remove __ARGS((const char *));
  2182. X/*
  2183. X * If you get an error message on "const" in the lines above, try
  2184. X * adding "-Dconst=" to the options in the makefile.
  2185. X */
  2186. X
  2187. X/* generic functions, not in unix.c */
  2188. X# if !defined(SCO) && !defined(SOLARIS)
  2189. Xvoid    sleep __ARGS((int));
  2190. X# endif
  2191. Xint        rename __ARGS((const char *, const char *));
  2192. X#endif
  2193. X
  2194. Xint        stricmp __ARGS((char *, char *));
  2195. X
  2196. Xint        has_wildcard __ARGS((char *));
  2197. Xint        have_wildcard __ARGS((int, char **));
  2198. Xint        ExpandWildCards __ARGS((int, char **, int *, char ***, int, int));
  2199. Xvoid    FreeWild __ARGS((int, char **));
  2200. X
  2201. X/* memmove is not present on all systems, use our own version or bcopy */
  2202. X#if !defined(SCO) && !defined(SOLARIS) && !defined(AIX) && !defined(UTS4) && !defined(USL)
  2203. X# ifdef SYSV_UNIX
  2204. X#   define MEMMOVE
  2205. Xvoid *memmove __ARGS((void *, void *, int));
  2206. X# else
  2207. X#  define memmove(to, from, len) bcopy(from, to, len)
  2208. X# endif
  2209. X#endif
  2210. END_OF_FILE
  2211. if test 2448 -ne `wc -c <'vim/src/unix.h'`; then
  2212.     echo shar: \"'vim/src/unix.h'\" unpacked with wrong size!
  2213. fi
  2214. chmod +x 'vim/src/unix.h'
  2215. # end of 'vim/src/unix.h'
  2216. fi
  2217. if test -f 'vim/termcap' -a "${1}" != "-c" ; then 
  2218.   echo shar: Will not clobber existing file \"'vim/termcap'\"
  2219. else
  2220. echo shar: Extracting \"'vim/termcap'\" \(2694 characters\)
  2221. sed "s/^X//" >'vim/termcap' <<'END_OF_FILE'
  2222. X#
  2223. X#    Demonstration of a termcap file
  2224. X#
  2225. Xsx|ansi|any ansi terminal with pessimistic assumptions:\
  2226. X    :co#80:li#24:cl=50\E[;H\E[2J:bs:am:cm=\E[%i%d;%dH:\
  2227. X    :nd=\E[C:up=\E[A:ce=\E[K:ho=\E[H:pt:
  2228. XMu|sun|Sun Microsystems Workstation console:\
  2229. X    :am:bs:km:mi:ms:pt:li#34:co#80:cl=^L:cm=\E[%i%d;%dH:\
  2230. X    :ce=\E[K:cd=\E[J:\
  2231. X    :so=\E[7m:se=\E[m:us=\E[4m:ue=\E[m:rs=\E[s:\
  2232. X    :md=\E[1m:mr=\E[7m:me=\E[m:\
  2233. X    :al=\E[L:dl=\E[M:im=:ei=:ic=\E[@:dc=\E[P:\
  2234. X    :AL=\E[%dL:DL=\E[%dM:IC=\E[%d@:DC=\E[%dP:\
  2235. X    :up=\E[A:nd=\E[C:ku=\E[A:kd=\E[B:kr=\E[C:kl=\E[D:\
  2236. X    :k1=\E[224z:k2=\E[225z:k3=\E[226z:k4=\E[227z:k5=\E[228z:\
  2237. X    :k6=\E[229z:k7=\E[230z:k8=\E[231z:k9=\E[232z:
  2238. XM-|sun-e|sun-nic|sune|Sun Microsystems Workstation without insert character:\
  2239. X    :ic@:im@:ei@:tc=sun:
  2240. XMu|sun-s|Sun Microsystems Workstation window with status line:\
  2241. X    :hs:ts=\E]l:fs=\E\\:ds=\E]l\E\\:tc=sun:
  2242. XMu|sun-e-s|sun-s-e|Sun Microsystems Workstation with status hacked for emacs:\
  2243. X    :hs:ts=\E]l:fs=\E\\:ds=\E]l\E\\:tc=sun-e:
  2244. XM0|sun-48|Sun 48-line window:\
  2245. X    :li#48:co#80:tc=sun:
  2246. XM1|sun-34|Sun 34-line window:\
  2247. X    :li#34:co#80:tc=sun:
  2248. XM2|sun-24|Sun 24-line window:\
  2249. X    :li#24:co#80:tc=sun:
  2250. XM3|sun-17|Sun 17-line window:\
  2251. X    :li#17:co#80:tc=sun:
  2252. Xv9|925a|tvi925a|TeleVideo Model 925:\
  2253. X    :al=\EE:am:bs:bt=\EI:bw:cd=\EY:ce=\ET:cl=^Z:cm=\E=%+ %+ :co#80:dc=\EW:\
  2254. X    :dl=\ER:do=^V:ei=:ic=\EQ:if=/usr/share/lib/tabset/std:im=:kb=^H:kd=^V:\
  2255. X    :kh=^^:kl=^H:kn#12:kr=^L:ku=^K:li#24:nd=^L:pt:se=\EG0:sg#1:so=\EG4:\
  2256. X    :ue=\EG0:ug#1:ul:up=^K:us=\EG8:is=\El\
  2257. X    :vb=\Eb\200\200\200\200\200\200\200\200\200\200\200\200\200\200\Ed:\
  2258. X    :ve=\E.4:vs=\E.2:
  2259. Xd0|vt100|vt100-am|vt100am|dec vt100:\
  2260. X    :do=^J:co#80:li#24:cl=50\E[;H\E[2J:sf=5\ED:\
  2261. X    :le=^H:bs:am:cm=5\E[%i%d;%dH:nd=2\E[C:up=2\E[A:\
  2262. X    :ce=3\E[K:cd=50\E[J:so=2\E[7m:se=2\E[m:us=2\E[4m:ue=2\E[m:\
  2263. X    :md=2\E[1m:mr=2\E[7m:mb=2\E[5m:me=2\E[m:is=\E[1;24r\E[24;1H:\
  2264. X    :rf=/usr/share/lib/tabset/vt100:\
  2265. X    :rs=\E>\E[?3l\E[?4l\E[?5l\E[?7h\E[?8h:ks=\E[?1h\E=:ke=\E[?1l\E>:\
  2266. X    :ku=\EOA:kd=\EOB:kr=\EOC:kl=\EOD:kb=^H:\
  2267. X    :ho=\E[H:k1=\EOP:k2=\EOQ:k3=\EOR:k4=\EOS:pt:sr=5\EM:vt#3:xn:\
  2268. X    :sc=\E7:rc=\E8:cs=\E[%i%d;%dr:
  2269. X# Amiga termcap by Bram Moolenaar
  2270. XAA|amiga|Amiga ANSI:\
  2271. X    :co#80:li#25:am:do=\E[B:ce=\E[K:cd=\E[J:\
  2272. X    :cl=\014:ku=\233A:kd=\233B:kl=\233D:kr=\233C:kb=^H:\
  2273. X    :#4=\233 A:%i=\233 @:%1=\233?~:\
  2274. X    :k1=\2330~:k2=\2331~:k3=\2332~:k4=\2333~:k5=\2334~:\
  2275. X    :k6=\2335~:k7=\2336~:k8=\2337~:k9=\2338~:k;=\2339~:\
  2276. X    :F1=\23310~:F2=\23311~:F3=\23312~:F4=\23313~:F5=\23314~:\
  2277. X    :F6=\23315~:F7=\23316~:F8=\23317~:F9=\23318~:FA=\23319~:\
  2278. X    :al=\E[L:AL=\E[%dL:dl=\E[M:DL=\E[%dM:le=^H:cm=\E[%i%d;%dH:\
  2279. X    :nd=\E[C:RI=\E[%dC:up=\E[A:\
  2280. X    :ce=\E[K:ho=\E[H:dc=\E[P:ic=\E[@:vi=\E[0 p:ve=\E[1 p:\
  2281. X    :so=\E[2m:se=\E[m:us=\E[4m:ue=\E[m:mr=\E[7m:mb=\E[7;2m:me=\E[m:
  2282. X#
  2283. X# END OF TERMCAP
  2284. X#
  2285. END_OF_FILE
  2286. if test 2694 -ne `wc -c <'vim/termcap'`; then
  2287.     echo shar: \"'vim/termcap'\" unpacked with wrong size!
  2288. fi
  2289. chmod +x 'vim/termcap'
  2290. # end of 'vim/termcap'
  2291. fi
  2292. if test -f 'vim/uganda.txt' -a "${1}" != "-c" ; then 
  2293.   echo shar: Will not clobber existing file \"'vim/uganda.txt'\"
  2294. else
  2295. echo shar: Extracting \"'vim/uganda.txt'\" \(3078 characters\)
  2296. sed "s/^X//" >'vim/uganda.txt' <<'END_OF_FILE'
  2297. XVim is public domain. If you are happy with Vim and want to express that,
  2298. Xdon't send me money. I don't need it. But I know a place where they do need
  2299. Xyour money. Please read on.
  2300. X
  2301. XSummer 1993 I spent one month in Uganda with a Dutch team. What I experienced
  2302. Xthere was very impressive. Together with local people we built a nursery
  2303. Xschool in Kibale. In only three weeks from nothing to a roofed building!
  2304. X
  2305. XKibale is a small town in the south of Uganda. It is an area that is suffering
  2306. Xfrom AIDS very badly. About 30% of the adults are infected. Because parents
  2307. Xdie, there are many orphans. They need a lot of help. The Kibale children
  2308. Xcentre is working hard to provide the needy with food, medical care and
  2309. Xeducation. Food and medical care to keep them healthy now, and education so
  2310. Xthat they can take care of themselves in the future. This is the best charity
  2311. Xprogram I have ever encountered.
  2312. X
  2313. XThe key to solving the problems in this area is education. This has been
  2314. Xneglected in the past years with president Idi Amin and the following civil
  2315. Xwars. The people have to learn how to take care of themselves and how to avoid
  2316. Xinfections. There is also help for people who are ill, but the primary goal
  2317. Xis to prevent people from getting ill.
  2318. X
  2319. XI was impressed by the progress that is being made there. The work is very
  2320. Xwell organized. Every dollar is spent on something useful. Our team brought
  2321. Xabout $2000. For that money we were able to built most of a two classroom
  2322. Xnursery school. They have further plans to build a primary school and houses
  2323. Xfor the teachers. They also need money for books and other teaching materials.
  2324. X
  2325. XIf you want to support the Kibale children centre, please send a contribution.
  2326. X
  2327. XHow do you know that the money will be spent right? First of all you have my
  2328. Xpersonal guarantee as the author of Vim. Further the project is co-sponsored
  2329. Xand inspected by World Vision and International Child Care Fund. I will visit
  2330. Xthe project a second time in January 1994. Friends of mine will go there in
  2331. Xthe summer of 1994. So I keep informed about what is happening there.
  2332. X
  2333. XIf you have any further questions, send me e-mail: mool@oce.nl.
  2334. X
  2335. XThe director of the project is:
  2336. XSekaran Vellasamy
  2337. Xp.o. box 1658
  2338. XMasaka, Uganda, East Africa
  2339. X
  2340. XTransfering money from Holland:
  2341. XUse one of my accounts:
  2342. XRabobank Venlo, nr. 3765.05.117
  2343. XPostbank, nr. 1644503
  2344. X
  2345. XTransfering money from Europe:
  2346. XTo avoid banking costs the best thing is to send me a Eurocheque. But any
  2347. Xother method should work.
  2348. X
  2349. XTransfering money from USA:
  2350. XSend me a check that can be cashed in Holland. Any "standard" banking check
  2351. Xshould be OK. Please consider adding $10 for banking costs.
  2352. X
  2353. XMy address: Bram Moolenaar   
  2354. X            Clematisstraat 30
  2355. X            5925 BE  Venlo   
  2356. X            The Netherlands. 
  2357. X
  2358. XOr you can transfer the money directly to the director of the project.
  2359. XI don't know how well this works and what the costs are.
  2360. X
  2361. XGold Trust Bank LTD - Kampala
  2362. Xa/c no. 36059709
  2363. XCitibank, N.A.
  2364. XGlobal Clearance Services
  2365. X111 Wall Street 16th floor
  2366. XNew York 10043
  2367. XU.S.A.
  2368. XBeneficiary Mr. Sekaran Vellasamy a/c no. 2100
  2369. END_OF_FILE
  2370. if test 3078 -ne `wc -c <'vim/uganda.txt'`; then
  2371.     echo shar: \"'vim/uganda.txt'\" unpacked with wrong size!
  2372. fi
  2373. chmod +x 'vim/uganda.txt'
  2374. # end of 'vim/uganda.txt'
  2375. fi
  2376. echo shar: End of archive 2 \(of 25\).
  2377. cp /dev/null ark2isdone
  2378. MISSING=""
  2379. 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 ; do
  2380.     if test ! -f ark${I}isdone ; then
  2381.     MISSING="${MISSING} ${I}"
  2382.     fi
  2383. done
  2384. if test "${MISSING}" = "" ; then
  2385.     echo You have unpacked all 25 archives.
  2386.     rm -f ark[1-9]isdone ark[1-9][0-9]isdone
  2387. else
  2388.     echo You still need to unpack the following archives:
  2389.     echo "        " ${MISSING}
  2390. fi
  2391. ##  End of shell archive.
  2392. exit 0
  2393.  
  2394. ===============================================================================
  2395. Bram Moolenaar                             | DISCLAIMER:  This  note  does  not
  2396. Oce Nederland B.V., Research & Development | necessarily represent the position
  2397. p.o. box 101, 5900 MA  Venlo               | of  Oce-Nederland  B.V.  Therefore
  2398. The Netherlands        phone +31 77 594077 | no liability or responsibility for
  2399. UUCP: mool@oce.nl        fax +31 77 595473 | whatever will be accepted.
  2400.  
  2401. exit 0 # Just in case...
  2402.