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

  1. From: mool@oce.nl (Bram Moolenaar)
  2. Newsgroups: comp.sources.misc
  3. Subject: v44i043:  vim - Vi IMproved editor, v3.0, Part24/26
  4. Date: 18 Aug 1994 14:04:00 -0500
  5. Organization: Sterling Software
  6. Sender: kent@sparky.sterling.com
  7. Approved: kent@sparky.sterling.com
  8. Message-ID: <330bb0$e95@sparky.sterling.com>
  9. X-Md4-Signature: 5e953e87198119911a34e710eff73f40
  10.  
  11. Submitted-by: mool@oce.nl (Bram Moolenaar)
  12. Posting-number: Volume 44, Issue 43
  13. Archive-name: vim/part24
  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/doc/Amiga.doc vim/doc/msdos.doc vim/src/alloc.c
  22. #   vim/src/arp_proto.h vim/src/cmdtab.tab vim/src/help.c
  23. #   vim/src/linefunc.c vim/src/makefile.archie vim/src/makefile.bcc
  24. #   vim/src/makefile.dice vim/src/param.h vim/src/unix.h vim/termcap
  25. # Wrapped by kent@sparky on Mon Aug 15 21:44:15 1994
  26. PATH=/bin:/usr/bin:/usr/ucb:/usr/local/bin:/usr/lbin:$PATH ; export PATH
  27. echo If this archive is complete, you will see the following message:
  28. echo '          "shar: End of archive 24 (of 26)."'
  29. if test -f 'vim/doc/Amiga.doc' -a "${1}" != "-c" ; then 
  30.   echo shar: Will not clobber existing file \"'vim/doc/Amiga.doc'\"
  31. else
  32.   echo shar: Extracting \"'vim/doc/Amiga.doc'\" \(2310 characters\)
  33.   sed "s/^X//" >'vim/doc/Amiga.doc' <<'END_OF_FILE'
  34. XThis file contains the particularities for the Amiga version of Vim.
  35. X
  36. XInstallation on the Amiga:
  37. X- Assign "vim:" to the directory where the vim.hlp file is (for the help 
  38. X  command).
  39. X- With DOS 1.3 or earlier: Put "arp.library" in "libs:". Make sure that
  40. X  newcli and run are in "c:" (for executing external commands).
  41. X- Put a shell that accepts a command with "-c" (e.g. "Csh" from Fish disk 
  42. X  624) in "c:" or in any other directory that is in your search path (for 
  43. X  executing external commands).
  44. X
  45. XIf you have sufficient memory you can avoid startup delays by making Vim and 
  46. Xcsh resident with the command "rez csh vim". You will have to put 
  47. X"rezlib.library" in your "libs:" directory. Under 2.0 you will need rez 
  48. Xversion 0.5.
  49. X
  50. XIf you do not use digraphs, you can save some memory by recompiling without 
  51. Xthe DIGRAPHS option. If you want to use Vim with other terminals you can 
  52. Xrecompile with the TERMCAP option. Vim compiles with Manx 5.x and SAS 6.x.
  53. XSee the makefiles.
  54. X
  55. XIf you want to use different colors set the termcap codes:
  56. X    t_ti (for inverted text)
  57. X    t_tb (for bold text)
  58. X    t_tp (for normal text after t_ti and t_tb)
  59. X    t_so (for standout mode)
  60. X    t_se (for normal text after t_so)
  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 2310 -ne `wc -c <'vim/doc/Amiga.doc'`; then
  86.     echo shar: \"'vim/doc/Amiga.doc'\" unpacked with wrong size!
  87.   fi
  88.   # end of 'vim/doc/Amiga.doc'
  89. fi
  90. if test -f 'vim/doc/msdos.doc' -a "${1}" != "-c" ; then 
  91.   echo shar: Will not clobber existing file \"'vim/doc/msdos.doc'\"
  92. else
  93.   echo shar: Extracting \"'vim/doc/msdos.doc'\" \(7386 characters\)
  94.   sed "s/^X//" >'vim/doc/msdos.doc' <<'END_OF_FILE'
  95. XThis file contains the particularities for the MSDOS version of Vim.
  96. X
  97. XKnown problem: When using smartdrive with write-behind caching, it is
  98. Xpossible that Vim will try to create a swap file on a read-only file system
  99. X(e.g. write protected floppy). You will then be given the message
  100. X    "A serious disk error has occurred .., Retry (r)? "
  101. XThere is nothing you can do but unprotecting the floppy or switch off the
  102. Xcomputer. Even CTRL-ALT-DEL will not get you out of this. This is really a
  103. Xproblem of smartdrive, not Vim. Smartdrive works fine otherwise. If this
  104. Xbothers you don't use the write-behind caching.
  105. X
  106. XThe default output method for the screen is to use bios calls. This will work
  107. Xright away on most systems. You do not need ansi.sys. You can use ":mode" to
  108. Xset the current screen mode. See reference.doc, section 20.3.
  109. X
  110. XYou can set the color used in vim with five termcap options:
  111. X
  112. X    ":set t_ti=^V^[\|xxm"        start of invert mode
  113. X    ":set t_tb=^V^[\|xxm"        start of bold mode
  114. X    ":set t_tp=^V^[\|xxm"        back to normal text
  115. X
  116. X    ":set t_so=^V^[\|xxm"        start of standout mode
  117. X    ":set t_se=^V^[\|xxm"        back to normal text
  118. X
  119. XWhich of the three modes is used for which action depends on the 'highlight'
  120. X('hl') option. See reference.doc.
  121. X
  122. X^V is CTRL-V
  123. X^[ is ESC
  124. Xxx must be replaced by a decimal code: The foreground color number and
  125. X   background color number added together:
  126. X
  127. XCOLOR        FOREGROUND    BACKGROUND
  128. Xblack            0            0
  129. Xblue            1           16
  130. Xgreen            2           32
  131. Xcyan            3           48
  132. Xred            4           64
  133. Xmagenta            5           80
  134. Xbrown            6           96
  135. Xlighgray        7          112
  136. Xdarkgray        8
  137. Xlightblue        9
  138. Xlightgreen       10
  139. Xlighcyan       11
  140. Xlightred       12
  141. Xlighmagenta       13
  142. Xyellow           14
  143. Xwhite           15
  144. Xblink               128
  145. X
  146. XWhen you use 0, the color is reset to the one used when you started Vim. This
  147. Xis the default for t_tp. The default for t_ti is black on grey, 0 + 112 = 112.
  148. XThe default for t_tb is white on cyan, 15 + 48 = 63. The default for t_so is
  149. Xwhite on blue, 15 + 16 = 31. These colors where choosen, because the also look
  150. Xgood when using an inverted display. But you can change them as you like.
  151. X
  152. XThe termcap codes that are translated into bios calls are:
  153. X    ESC |J        clear screen
  154. X    ESC |K        clear to end of line
  155. X    ESC |L        insert line
  156. X    ESC |M        delete line
  157. X    ESC |row;colH    position cursor
  158. X    ESC |attrm    set character attribute
  159. X
  160. XIf you set these with the ":set" command, don't forget to put a backslash
  161. Xbefore the '|', otherwise it will be recognized as the end of the command.
  162. X
  163. XIf you want to use another output method (e.g. when using a terminal on a COM
  164. Xport), set the terminal name to "pcansi". You can change the termcap options
  165. Xwhen needed (see chapter 20 of reference.doc). Note that the normal IBM
  166. Xansi.sys does not support all the codes of the builtin pcansi terminal. If
  167. Xyou use ansi.sys you will need to delete the termcap entries t_il and t_dl
  168. Xwith
  169. X    ":set t_il= t_dl=".
  170. XOtherwise the screen will not be updated correctly. It is better to use
  171. Xnansi.sys, nnansi.sys or the like instead of ansi.sys.
  172. X
  173. XIf you want to use Vim on a terminal connected to a COM: port, reset the
  174. X'bioskey' option. Otherwise the commands will be read from the PC keyboard.
  175. XCTRL-C and CTRL-P may not work correctly with 'bioskey' reset.
  176. X
  177. XIf the "tx" (textmode) option is set (which is the default), Vim will accept a 
  178. Xsingle <LF> or a <CR><LF> pair for end-of-line. When writing a file Vim will 
  179. Xuse <CR><LF>. Thus if you edit a file and write it, <LF> is replaced with 
  180. X<CR><LF>. If the "tx" option is not set the single <LF> will be used for
  181. Xend-of-line. A <CR> will be shown as ^M. You can use Vim to replace <LF> by
  182. X<CR><LF> by reading in any mode and writing in text mode. You can use Vim to
  183. Xreplace <CR><LF> by <LF> by reading in text mode and writing in non-text
  184. Xmode. 'textmode' is set automatically when 'textauto' is on (which is the
  185. Xdefault), so you don't really have to worry about what you are doing.
  186. X
  187. XIf you want to edit a script file or a binary file you should reset the
  188. X'textmode' and 'textauto' options before loading the file. Script files
  189. Xcontain single <LF> characters which would be replaced by <CR><LF>. You can
  190. Xdo this by starting Vim with the "-b" (binary) option.
  191. X
  192. XThe default help filename is "$VIM\vim.hlp". If the environment variable $VIM 
  193. Xis not defined or the file is not found, the DOS search path is used to 
  194. Xsearch for the file "vim.hlp". If you do not want to put "vim.hlp" in your 
  195. Xsearch path, use the command ":set helpfile=pathname" to tell Vim where the 
  196. Xhelp file is.
  197. X
  198. XThe ":cd" command recognizes the drive specifier and changes the current
  199. Xdrive. Use ":cd c:" to make drive C the active drive. Use ":cd d:\dos" to go
  200. Xto the directory "dos" in the root of drive D.
  201. X
  202. XThe files "_vimrc" and "_exrc" are used instead of ".vimrc" and ".exrc".
  203. XThe files "$VIM\_vimrc" and "$VIM\_exrc" are used instead of "s:.vimrc" and 
  204. X"s:.exrc". To use the file "c:\_vimrc" use the command "set vim=c:".
  205. X
  206. XUse CTRL-break instead of CTRL-C to interrupt searches. The CTRL-C is not
  207. Xdetected until a key is read.
  208. X
  209. XUse CTRL-arrow-left and CTRL-arrow-right instead of SHIFT-arrow-left and 
  210. XSHIFT-arrow-right. The arrow-up and arrow-down cannot be used with SHIFT or 
  211. XCTRL.
  212. X
  213. XTemporary files (for filtering) are put in the current directory.
  214. X
  215. XThe default for the sh (shell) option is "command". If COMSPEC is defined it
  216. Xis used instead. External commands are started with "command /c
  217. X<command_name>". Typing CTRL-Z starts a new command shell. Return to Vim with
  218. X"exit".
  219. X
  220. XMS-DOS allows for only one filename extention. Therefore, in the original 
  221. Xfilename the '.' is replaced by a '_', the name is truncated to 8 characters 
  222. Xand the new extention ".vim" or ".bak" is appended. Two examples: "test.c" 
  223. Xbecomes "test_c.bak", "ditiseen.tst" becomes "ditiseen.bak". The 'shortname' 
  224. Xoption is not available.
  225. X
  226. XThe MS-DOS binary was compiled with Borland-C++ version 3.1, using
  227. Xmakefile.bcc. Other compilers should also work. Use makefile.dos for Turbo-C
  228. X2.0. Use makefile.bcc for other Borland compilers, also Turbo-C++ 3.0 (with
  229. Xsmall changes). If you get all kinds of strange error messages when compiling,
  230. Xyou have to add <CR> characters at the end of each line. This can be done with
  231. Xthe addcr program: "make addcr". This will compile addcr.c to addcr.exe and
  232. Xexecute the addcr.bat file. Sometimes this fails. Then execute the addcr.bat
  233. Xfile from the DOS prompt.
  234. X
  235. XThe "spawno" library by Ralf Brown was used in order to free memory when Vim
  236. Xstarts a shell or other external command. Only about 200 bytes are taken from
  237. Xconventional memory. When recompiling get the spawno library from Simtel,
  238. Xdirectory "msdos/c". It is called something like "spwno413.zip". Or remove the
  239. Xlibrary from the makefile.
  240. X
  241. XA swap file is used to store most of the text. You should be able to edit very
  242. Xlarge files. However, memory is used for undo and other things. If you delete
  243. Xa lot of text you can still run out of memory.
  244. X
  245. XIf Vim gives an "Out of memory" warning you should stop editing. Result of
  246. Xfurther editing actions is unpredictable. Setting 'undolevels' to 0 saves some
  247. Xmemory. Running the maze macros on a big maze is guaranteed to run out of
  248. Xmemory, because each change is remembered for undo. In this case set
  249. X'undolevels' to a negative number. This will switch off undo completely. In a
  250. Xfuture release extended memory will be used to avoid these problems.
  251. X
  252. XThe *.info files are for the Amiga. You don't need them with MSDOS.
  253. END_OF_FILE
  254.   if test 7386 -ne `wc -c <'vim/doc/msdos.doc'`; then
  255.     echo shar: \"'vim/doc/msdos.doc'\" unpacked with wrong size!
  256.   fi
  257.   # end of 'vim/doc/msdos.doc'
  258. fi
  259. if test -f 'vim/src/alloc.c' -a "${1}" != "-c" ; then 
  260.   echo shar: Will not clobber existing file \"'vim/src/alloc.c'\"
  261. else
  262.   echo shar: Extracting \"'vim/src/alloc.c'\" \(4132 characters\)
  263.   sed "s/^X//" >'vim/src/alloc.c' <<'END_OF_FILE'
  264. X/* vi:ts=4:sw=4
  265. X *
  266. X * VIM - Vi IMproved        by Bram Moolenaar
  267. X *
  268. X * Read the file "credits.txt" for a list of people who contributed.
  269. X * Read the file "uganda.txt" for copying and usage conditions.
  270. X */
  271. X
  272. X/*
  273. X * alloc.c
  274. X *
  275. X * This file contains various routines dealing with allocation and
  276. X * deallocation of memory. And some funcions for copying text.
  277. X */
  278. X
  279. X#include "vim.h"
  280. X#include "globals.h"
  281. X#include "proto.h"
  282. X
  283. X/*
  284. X * Some memory is reserved for error messages and for being able to
  285. X * call mf_release_all(), which needs some memory for mf_trans_add().
  286. X */
  287. X#define KEEP_ROOM 8192L
  288. X
  289. X/*
  290. X * Note: if unsinged is 16 bits we can only allocate up to 64K with alloc().
  291. X * Use lalloc for larger blocks.
  292. X */
  293. X    char_u *
  294. Xalloc(size)
  295. X    unsigned        size;
  296. X{
  297. X    return (lalloc((long_u)size, TRUE));
  298. X}
  299. X
  300. X    char_u *
  301. Xlalloc(size, message)
  302. X    long_u            size;
  303. X    int                message;
  304. X{
  305. X    register char_u   *p;            /* pointer to new storage space */
  306. X    static int    releasing = FALSE;    /* don't do mf_release_all() recursive */
  307. X    int            try_again;
  308. X
  309. X#ifdef MSDOS
  310. X    if (size >= 0xfff0)            /* in MSDOS we can't deal with >64K blocks */
  311. X        p = NULL;
  312. X    else
  313. X#endif
  314. X
  315. X    /*
  316. X     * If out of memory, try to release some memfile blocks.
  317. X     * If some blocks are released call malloc again.
  318. X     */
  319. X    for (;;)
  320. X    {
  321. X        if ((p = (char_u *)malloc(size)) != NULL)
  322. X        {
  323. X            if (mch_avail_mem(TRUE) < KEEP_ROOM && !releasing)
  324. X            {                                 /* System is low... no go! */
  325. X                    free((char *)p);
  326. X                    p = NULL;
  327. X            }
  328. X        }
  329. X    /*
  330. X     * Remember that mf_release_all() is being called to avoid an endless loop,
  331. X     * because mf_release_all() may call alloc() recursively.
  332. X     */
  333. X        if (p != NULL || releasing)
  334. X            break;
  335. X        releasing = TRUE;
  336. X        try_again = mf_release_all();
  337. X        releasing = FALSE;
  338. X        if (!try_again)
  339. X            break;
  340. X    }
  341. X
  342. X    /*
  343. X     * Avoid repeating the error message many times (they take 1 second each).
  344. X     * Did_outofmem_msg is reset when a character is read.
  345. X     */
  346. X    if (message && p == NULL && !did_outofmem_msg)
  347. X    {
  348. X        emsg(e_outofmem);
  349. X        did_outofmem_msg = TRUE;
  350. X    }
  351. X    return (p);
  352. X}
  353. X
  354. X/*
  355. X * copy a string into newly allocated memory
  356. X */
  357. X    char_u *
  358. Xstrsave(string)
  359. X    char_u           *string;
  360. X{
  361. X    char_u *p;
  362. X
  363. X    p = alloc((unsigned) (STRLEN(string) + 1));
  364. X    if (p != NULL)
  365. X        STRCPY(p, string);
  366. X    return p;
  367. X}
  368. X
  369. X    char_u *
  370. Xstrnsave(string, len)
  371. X    char_u        *string;
  372. X    int         len;
  373. X{
  374. X    char_u *p;
  375. X
  376. X    p = alloc((unsigned) (len + 1));
  377. X    if (p != NULL)
  378. X    {
  379. X        STRNCPY(p, string, (size_t)len);
  380. X        p[len] = NUL;
  381. X    }
  382. X    return p;
  383. X}
  384. X
  385. X/*
  386. X * copy a number of spaces
  387. X */
  388. X    void
  389. Xcopy_spaces(ptr, count)
  390. X    char_u    *ptr;
  391. X    size_t    count;
  392. X{
  393. X    register size_t    i = count;
  394. X    register char_u    *p = ptr;
  395. X
  396. X    while (i--)
  397. X        *p++ = ' ';
  398. X}
  399. X
  400. X/*
  401. X * delete spaces at the end of the string
  402. X */
  403. X    void
  404. Xdel_spaces(ptr)
  405. X    char_u *ptr;
  406. X{
  407. X    char_u    *q;
  408. X
  409. X    q = ptr + STRLEN(ptr);
  410. X    while (--q > ptr && isspace(q[0]) && q[-1] != '\\' && q[-1] != Ctrl('V'))
  411. X        *q = NUL;
  412. X}
  413. X
  414. X#ifdef NO_FREE_NULL
  415. X#undef free
  416. X/*
  417. X * replacement for free() that cannot handle NULL pointers
  418. X */
  419. X    void
  420. XnofreeNULL(x)
  421. X    void *x;
  422. X{
  423. X    if (x != NULL)
  424. X        free(x);
  425. X}
  426. X#endif
  427. X
  428. X#ifdef BSD_UNIX
  429. X    char *
  430. Xbsdmemset(ptr, c, size)
  431. X    char    *ptr;
  432. X    int        c;
  433. X    long    size;
  434. X{
  435. X    register char *p = ptr;
  436. X
  437. X    while (size-- > 0)
  438. X        *p++ = c;
  439. X    return ptr;
  440. X}
  441. X#endif
  442. X
  443. X#ifdef MEMMOVE
  444. X/*
  445. X * Version of memmove that handles overlapping source and destination.
  446. X * For systems that don't have a function that is guaranteed to do that (SYSV).
  447. X */
  448. X    void *
  449. X#ifdef __sgi
  450. Xmemmove(desti, source, len)
  451. X    void    *source, *desti;
  452. X    size_t    len;
  453. X#else
  454. Xmemmove(desti, source, len)
  455. X    void    *source, *desti;
  456. X    int        len;
  457. X#endif
  458. X{
  459. X    char    *src = (char *)source;
  460. X    char    *dst = (char *)desti;
  461. X
  462. X    if (dst > src && dst < src + len)    /* overlap, copy backwards */
  463. X    {
  464. X        src +=len;
  465. X        dst +=len;
  466. X        while (len-- > 0)
  467. X            *--dst = *--src;
  468. X    }
  469. X    else                                /* copy forwards */
  470. X        while (len-- > 0)
  471. X            *dst++ = *src++;
  472. X    return desti;
  473. X}
  474. X#endif
  475. X
  476. X/*
  477. X * compare two strings, ignoring case
  478. X * return 0 for match, 1 for difference
  479. X */
  480. X    int
  481. Xvim_strnicmp(s1, s2, len)
  482. X    char_u    *s1;
  483. X    char_u    *s2;
  484. X    size_t    len;
  485. X{
  486. X    while (len)
  487. X    {
  488. X        if (TO_UPPER(*s1) != TO_UPPER(*s2))
  489. X            return 1;                        /* this character different */
  490. X        if (*s1 == NUL)
  491. X            return 0;                        /* strings match until NUL */
  492. X        ++s1;
  493. X        ++s2;
  494. X        --len;
  495. X    }
  496. X    return 0;                                /* strings match */
  497. X}
  498. END_OF_FILE
  499.   if test 4132 -ne `wc -c <'vim/src/alloc.c'`; then
  500.     echo shar: \"'vim/src/alloc.c'\" unpacked with wrong size!
  501.   fi
  502.   # end of 'vim/src/alloc.c'
  503. fi
  504. if test -f 'vim/src/arp_proto.h' -a "${1}" != "-c" ; then 
  505.   echo shar: Will not clobber existing file \"'vim/src/arp_proto.h'\"
  506. else
  507.   echo shar: Extracting \"'vim/src/arp_proto.h'\" \(6655 characters\)
  508.   sed "s/^X//" >'vim/src/arp_proto.h' <<'END_OF_FILE'
  509. X#ifndef    PROTO_ARP_H
  510. X#define    PROTO_ARP_H    1
  511. X
  512. X/*
  513. X ************************************************************************
  514. X *    The arp copies of the dos.library calls...            *
  515. X ************************************************************************
  516. X */
  517. X
  518. X/* Only include these if you can use ARP.library without dos.library... */
  519. X#ifdef    DO_ARP_COPIES
  520. X#pragma    amicall(ArpBase, 0x1E, Open(d1, d2))
  521. X#pragma    amicall(ArpBase, 0x24, Close(d1))
  522. X#pragma    amicall(ArpBase, 0x2A, Read(d1, d2, d3))
  523. X#pragma    amicall(ArpBase, 0x30, Write(d1, d2, d3))
  524. X#pragma    amicall(ArpBase, 0x36, Input())
  525. X#pragma    amicall(ArpBase, 0x3C, Output())
  526. X#pragma    amicall(ArpBase, 0x42, Seek(d1, d2, d3))
  527. X#pragma    amicall(ArpBase, 0x48, DeleteFile(d1))
  528. X#pragma    amicall(ArpBase, 0x4E, Rename(d1, d2))
  529. X#pragma    amicall(ArpBase, 0x54, Lock(d1, d2))
  530. X#pragma    amicall(ArpBase, 0x5A, UnLock(d1))
  531. X#pragma    amicall(ArpBase, 0x60, DupLock(d1))
  532. X#pragma    amicall(ArpBase, 0x66, Examine(d1, d2))
  533. X#pragma    amicall(ArpBase, 0x6C, ExNext(d1, d2))
  534. X#pragma    amicall(ArpBase, 0x72, Info(d1, d2))
  535. X#pragma    amicall(ArpBase, 0x78, CreateDir(d1))
  536. X#pragma    amicall(ArpBase, 0x7E, CurrentDir(d1))
  537. X#pragma    amicall(ArpBase, 0x84, IoErr())
  538. X#pragma    amicall(ArpBase, 0x8A, CreateProc(d1, d2, d3, d4))
  539. X#pragma    amicall(ArpBase, 0x90, Exit(d1))
  540. X#pragma    amicall(ArpBase, 0x96, LoadSeg(d1))
  541. X#pragma    amicall(ArpBase, 0x9C, UnLoadSeg(d1))
  542. X#pragma    amicall(ArpBase, 0xAE, DeviceProc(d1))
  543. X#pragma    amicall(ArpBase, 0xB4, SetComment(d1, d2))
  544. X#pragma    amicall(ArpBase, 0xBA, SetProtection(d1, d2))
  545. X#pragma    amicall(ArpBase, 0xC0, DateStamp(d1))
  546. X#pragma    amicall(ArpBase, 0xC6, Delay(d1))
  547. X#pragma    amicall(ArpBase, 0xCC, WaitForChar(d1, d2))
  548. X#pragma    amicall(ArpBase, 0xD2, ParentDir(d1))
  549. X#pragma    amicall(ArpBase, 0xD8, IsInteractive(d1))
  550. X#pragma    amicall(ArpBase, 0xDE, Execute(d1, d2, d3))
  551. X#endif
  552. X
  553. X/*
  554. X ************************************************************************
  555. X *    Stuff only in arp.library                    *
  556. X ************************************************************************
  557. X */
  558. X/*    amicall(ArpBase, 0x0E4, Printf(a0, a1))    This does not work without glue */
  559. X/*    amicall(ArpBase, 0x0EA, FPrintf(d0, a0, a1))    This does not work without glue */
  560. X#pragma    amicall(ArpBase, 0x0F0, Puts(a1))
  561. X#pragma    amicall(ArpBase, 0x0F6, Readline(a0))
  562. X#pragma    amicall(ArpBase, 0x0FC, GADS(a0, d0, a1, a2, a3))
  563. X#pragma    amicall(ArpBase, 0x102, Atol(a0))
  564. X#pragma    amicall(ArpBase, 0x108, EscapeString(a0))
  565. X#pragma    amicall(ArpBase, 0x10E, CheckAbort(a1))
  566. X#pragma    amicall(ArpBase, 0x114, CheckBreak(d1, a1))
  567. X#pragma    amicall(ArpBase, 0x11A, Getenv(a0, a1, d0))
  568. X#pragma    amicall(ArpBase, 0x120, Setenv(a0, a1))
  569. X#pragma    amicall(ArpBase, 0x126, FileRequest(a0))
  570. X#pragma    amicall(ArpBase, 0x12C, CloseWindowSafely(a0, a1))
  571. X#pragma    amicall(ArpBase, 0x132, CreatePort(a0, d0))
  572. X#pragma    amicall(ArpBase, 0x138, DeletePort(a1))
  573. X#pragma    amicall(ArpBase, 0x13E, SendPacket(d0, a0, a1))
  574. X#pragma    amicall(ArpBase, 0x144, InitStdPacket(d0, a0, a1, a2))
  575. X#pragma    amicall(ArpBase, 0x14A, PathName(d0, a0, d1))
  576. X#pragma    amicall(ArpBase, 0x150, Assign(a0, a1))
  577. X#pragma    amicall(ArpBase, 0x156, DosAllocMem(d0))
  578. X#pragma    amicall(ArpBase, 0x15C, DosFreeMem(a1))
  579. X#pragma    amicall(ArpBase, 0x162, BtoCStr(a0, d0, d1))
  580. X#pragma    amicall(ArpBase, 0x168, CtoBStr(a0, d0, d1))
  581. X#pragma    amicall(ArpBase, 0x16E, GetDevInfo(a2))
  582. X#pragma    amicall(ArpBase, 0x174, FreeTaskResList())
  583. X#pragma    amicall(ArpBase, 0x17A, ArpExit(d0, d2))
  584. X#pragma    amicall(ArpBase, 0x180, ArpAlloc(d0))
  585. X/*    amicall(ArpBase, 0x186, ArpAllocMem(d0, d1))    Secondary result - IoErr() */
  586. X/*    amicall(ArpBase, 0x18C, ArpOpen(d1, d2))    Secondary result - IoErr() */
  587. X/*    amicall(ArpBase, 0x192, ArpDupLock(d1))        Secondary result - IoErr() */
  588. X/*    amicall(ArpBase, 0x198, ArpLock(d1, d2))    Secondary result - IoErr() */
  589. X/*    amicall(ArpBase, 0x19E, RListAlloc(a0, d0))    Secondary result - IoErr() */
  590. X#pragma    amicall(ArpBase, 0x1A4, FindCLI(d0))
  591. X#pragma    amicall(ArpBase, 0x1AA, QSort(a0, d0, d1, a1))
  592. X
  593. X#pragma    amicall(ArpBase, 0x1B0, PatternMatch(a0, a1))
  594. X#pragma    amicall(ArpBase, 0x1B6, FindFirst(d0, a0))
  595. X#pragma    amicall(ArpBase, 0x1BC, FindNext(a0))
  596. X#pragma    amicall(ArpBase, 0x1C2, FreeAnchorChain(a0))
  597. X
  598. X#pragma    amicall(ArpBase, 0x1C8, CompareLock(d0, d1))
  599. X
  600. X#pragma    amicall(ArpBase, 0x1CE, FindTaskResList())
  601. X#pragma    amicall(ArpBase, 0x1D4, CreateTaskResList())
  602. X#pragma    amicall(ArpBase, 0x1DA, FreeResList(a1))
  603. X#pragma    amicall(ArpBase, 0x1E0, FreeTrackedItem(a1))
  604. X/*    amicall(ArpBase, 0x1E6, GetTracker())    Stores the ID in the tracker */
  605. X
  606. X#pragma    amicall(ArpBase, 0x1EC, GetAccess(a1))
  607. X#pragma    amicall(ArpBase, 0x1F2, FreeAccess(a1))
  608. X
  609. X#pragma    amicall(ArpBase, 0x1F8, FreeDAList(a1))
  610. X#pragma    amicall(ArpBase, 0x1FE, AddDANode(a0, a1, d0, d1))
  611. X#pragma    amicall(ArpBase, 0x204, AddDADevs(a0, d0))
  612. X
  613. X#pragma    amicall(ArpBase, 0x20A, Strcmp(a0, a1))
  614. X#pragma    amicall(ArpBase, 0x210, Strncmp(a0, a1, d0))
  615. X#pragma    amicall(ArpBase, 0x216, Toupper(d0))
  616. X#pragma    amicall(ArpBase, 0x21C, SyncRun(a0, a1, d0, d1))
  617. X
  618. X/*
  619. X ************************************************************************
  620. X *    Added V32 of arp.library                    *
  621. X *    Note that SpawnShell is ASyncRun but was added at V39 of arp...    *
  622. X ************************************************************************
  623. X */
  624. X#pragma    amicall(ArpBase, 0x222, ASyncRun(a0, a1, a2))
  625. X#pragma    amicall(ArpBase, 0x222, SpawnShell(a0, a1, a2))
  626. X#pragma    amicall(ArpBase, 0x228, LoadPrg(d1))
  627. X#pragma    amicall(ArpBase, 0x22E, PreParse(a0, a1))
  628. X
  629. X/*
  630. X ************************************************************************
  631. X *    Added V33 of arp.library                    *
  632. X ************************************************************************
  633. X */
  634. X#pragma    amicall(ArpBase, 0x234, StamptoStr(a0))
  635. X#pragma    amicall(ArpBase, 0x23A, StrtoStamp(a0))
  636. X
  637. X#pragma    amicall(ArpBase, 0x240, ObtainResidentPrg(a0))
  638. X#pragma    amicall(ArpBase, 0x246, AddResidentPrg(d1, a0))
  639. X#pragma    amicall(ArpBase, 0x24C, RemResidentPrg(a0))
  640. X#pragma    amicall(ArpBase, 0x252, UnLoadPrg(d1))
  641. X#pragma    amicall(ArpBase, 0x258, LMult(d0, d1))
  642. X#pragma    amicall(ArpBase, 0x25E, LDiv(d0, d1))
  643. X#pragma    amicall(ArpBase, 0x264, LMod(d0, d1))
  644. X
  645. X#pragma    amicall(ArpBase, 0x26A, CheckSumPrg(d1))
  646. X#pragma    amicall(ArpBase, 0x270, TackOn(a0, a1))
  647. X#pragma    amicall(ArpBase, 0x276, BaseName(a0))
  648. X#pragma    amicall(ArpBase, 0x27C, ReleaseResidentPrg(d1))
  649. X
  650. X/*
  651. X ************************************************************************
  652. X *    Added V36 of arp.library                    *
  653. X ************************************************************************
  654. X */
  655. X/*    amicall(ArpBase, 0x282, SPrintf(d0, a0, a1))    This does not work without glue */
  656. X#pragma    amicall(ArpBase, 0x288, GetKeywordIndex(a0, a1))
  657. X/*    amicall(ArpBase, 0x28E, ArpOpenLibrary(a1, d0))    Secondary result - IoErr() */
  658. X#pragma    amicall(ArpBase, 0x294, ArpAllocFreq())
  659. X
  660. X#endif
  661. END_OF_FILE
  662.   if test 6655 -ne `wc -c <'vim/src/arp_proto.h'`; then
  663.     echo shar: \"'vim/src/arp_proto.h'\" unpacked with wrong size!
  664.   fi
  665.   # end of 'vim/src/arp_proto.h'
  666. fi
  667. if test -f 'vim/src/cmdtab.tab' -a "${1}" != "-c" ; then 
  668.   echo shar: Will not clobber existing file \"'vim/src/cmdtab.tab'\"
  669. else
  670.   echo shar: Extracting \"'vim/src/cmdtab.tab'\" \(8606 characters\)
  671.   sed "s/^X//" >'vim/src/cmdtab.tab' <<'END_OF_FILE'
  672. X/* vi:ts=4
  673. X *
  674. X * VIM - Vi IMproved
  675. X *
  676. X * Code Contributions By:    Bram Moolenaar            mool@oce.nl
  677. X *                            Tim Thompson            twitch!tjt
  678. X *                            Tony Andrews            onecom!wldrdg!tony 
  679. X *                            G. R. (Fred) Walter        watmath!watcgl!grwalter 
  680. X */
  681. X
  682. X/*
  683. X * |This file is read by mkcmdtab to produce cmdtab.h.
  684. X *
  685. X * The bars are used to recognize file positions. Do not insert/delete them.|
  686. X */
  687. X
  688. X#define RANGE    0x01            /* allow a linespecs */
  689. X#define BANG    0x02            /* allow a ! after the command name */
  690. X#define EXTRA    0x04            /* allow extra args after command name */
  691. X#define XFILE    0x08            /* expand wildcards in extra part */
  692. X#define NOSPC    0x10            /* no spaces allowed in the extra part */
  693. X#define    DFLALL    0x20            /* default file range is 1,$ */
  694. X#define NODFL    0x40            /* do not default to the current file name */
  695. X#define NEEDARG    0x80            /* argument required */
  696. X#define TRLBAR    0x100            /* check for trailing vertical bar */
  697. X#define REGSTR    0x200            /* allow "x for register designation */
  698. X#define COUNT    0x400            /* allow count in argument, after command */
  699. X#define NOTRLCOM 0x800            /* no trailing comment allowed */
  700. X#define ZEROR    0x1000            /* zero line number allowed */
  701. X#define USECTRLV 0x2000            /* do not remove CTRL-V from argument */
  702. X#define NOTADR    0x4000            /* number before command is not an address */
  703. X#define FILES    (XFILE + EXTRA)    /* multiple extra files allowed */
  704. X#define WORD1    (EXTRA + NOSPC)    /* one extra word allowed */
  705. X#define FILE1    (FILES + NOSPC)    /* 1 file allowed, defaults to current file */
  706. X#define NAMEDF    (FILE1 + NODFL)    /* 1 file allowed, defaults to "" */
  707. X#define NAMEDFS    (FILES + NODFL)    /* multiple files allowed, default is "" */
  708. X
  709. X/*
  710. X * This array maps ex command names to command codes. The order in which
  711. X * command names are listed below is significant -- ambiguous abbreviations
  712. X * are always resolved to be the first possible match (e.g. "r" is taken
  713. X * to mean "read", not "rewind", because "read" comes before "rewind").
  714. X * Not supported commands are included to avoid ambiguities.
  715. X */
  716. Xstatic struct
  717. X{
  718. X    char_u    *cmd_name;    /* name of the command */
  719. X    short     cmd_argt;    /* command line arguments permitted/needed/used */
  720. X} cmdnames[] =
  721. X{
  722. X|    {(char_u *)"append",        BANG+RANGE+TRLBAR},            /* not supported */
  723. X    {(char_u *)"all",            TRLBAR},
  724. X    {(char_u *)"abbreviate",    EXTRA+TRLBAR+NOTRLCOM+USECTRLV},
  725. X    {(char_u *)"args",            RANGE+NOTADR+BANG+NAMEDFS},
  726. X    {(char_u *)"argument",        BANG+RANGE+NOTADR+COUNT+EXTRA},
  727. X    {(char_u *)"buffer",        RANGE+NOTADR+COUNT+TRLBAR},
  728. X    {(char_u *)"ball",            TRLBAR},
  729. X    {(char_u *)"buffers",        TRLBAR},
  730. X    {(char_u *)"bdelete",        BANG+RANGE+NOTADR+COUNT+EXTRA+TRLBAR},
  731. X    {(char_u *)"bunload",        BANG+RANGE+NOTADR+COUNT+EXTRA+TRLBAR},
  732. X    {(char_u *)"bmodified",        RANGE+NOTADR+COUNT+TRLBAR},
  733. X    {(char_u *)"bnext",            RANGE+NOTADR+COUNT+TRLBAR},
  734. X    {(char_u *)"bNext",            RANGE+NOTADR+COUNT+TRLBAR},
  735. X    {(char_u *)"bprevious",        RANGE+NOTADR+COUNT+TRLBAR},
  736. X    {(char_u *)"brewind",        RANGE+TRLBAR},
  737. X    {(char_u *)"blast",            RANGE+TRLBAR},
  738. X    {(char_u *)"change",        BANG+RANGE+COUNT+TRLBAR},    /* not supported */
  739. X    {(char_u *)"cabbrev",        EXTRA+TRLBAR+NOTRLCOM+USECTRLV},
  740. X    {(char_u *)"cc",            TRLBAR+WORD1+BANG},
  741. X    {(char_u *)"cd",            NAMEDF+TRLBAR},
  742. X    {(char_u *)"center",        TRLBAR+RANGE+EXTRA},
  743. X    {(char_u *)"cf",            TRLBAR+FILE1+BANG},
  744. X    {(char_u *)"chdir",            NAMEDF+TRLBAR},
  745. X    {(char_u *)"cl",            TRLBAR},
  746. X    {(char_u *)"close",            BANG+TRLBAR},
  747. X    {(char_u *)"cmap",            BANG+EXTRA+TRLBAR+NOTRLCOM+USECTRLV},
  748. X    {(char_u *)"cn",            TRLBAR+WORD1+BANG},
  749. X    {(char_u *)"cnoremap",        BANG+EXTRA+TRLBAR+NOTRLCOM+USECTRLV},
  750. X    {(char_u *)"cnoreabbrev",    EXTRA+TRLBAR+NOTRLCOM+USECTRLV},
  751. X    {(char_u *)"copy",            RANGE+EXTRA+TRLBAR},
  752. X    {(char_u *)"cp",            TRLBAR+WORD1+BANG},
  753. X    {(char_u *)"cq",            TRLBAR+BANG},
  754. X    {(char_u *)"cunmap",        BANG+EXTRA+TRLBAR+USECTRLV},
  755. X    {(char_u *)"cunabbrev",        EXTRA+TRLBAR+USECTRLV},
  756. X    {(char_u *)"delete",        RANGE+REGSTR+COUNT+TRLBAR},
  757. X    {(char_u *)"display",        TRLBAR},
  758. X    {(char_u *)"digraphs",        EXTRA+TRLBAR},
  759. X    {(char_u *)"edit",            BANG+FILE1},
  760. X    {(char_u *)"ex",            BANG+FILE1},
  761. X    {(char_u *)"exit",            BANG+FILE1+DFLALL+TRLBAR},
  762. X    {(char_u *)"file",            FILE1+TRLBAR},
  763. X    {(char_u *)"files",            TRLBAR},
  764. X    {(char_u *)"global",        RANGE+BANG+EXTRA+DFLALL},
  765. X    {(char_u *)"help",            TRLBAR},
  766. X    {(char_u *)"insert",        BANG+RANGE+TRLBAR},            /* not supported */
  767. X    {(char_u *)"iabbrev",        EXTRA+TRLBAR+NOTRLCOM+USECTRLV},
  768. X    {(char_u *)"imap",            BANG+EXTRA+TRLBAR+NOTRLCOM+USECTRLV},
  769. X    {(char_u *)"inoremap",        BANG+EXTRA+TRLBAR+NOTRLCOM+USECTRLV},
  770. X    {(char_u *)"inoreabbrev",    EXTRA+TRLBAR+NOTRLCOM+USECTRLV},
  771. X    {(char_u *)"iunmap",        BANG+EXTRA+TRLBAR+USECTRLV},
  772. X    {(char_u *)"iunabbrev",        EXTRA+TRLBAR+USECTRLV},
  773. X    {(char_u *)"join",            RANGE+COUNT+TRLBAR},
  774. X    {(char_u *)"jumps",            TRLBAR},
  775. X    {(char_u *)"k",                RANGE+WORD1+TRLBAR},
  776. X    {(char_u *)"list",            RANGE+COUNT+TRLBAR},
  777. X    {(char_u *)"last",            EXTRA+BANG},
  778. X    {(char_u *)"left",            TRLBAR+RANGE+EXTRA},
  779. X    {(char_u *)"move",            RANGE+EXTRA+TRLBAR},
  780. X    {(char_u *)"mark",            RANGE+WORD1+TRLBAR},
  781. X    {(char_u *)"marks",            TRLBAR},
  782. X    {(char_u *)"map",            BANG+EXTRA+TRLBAR+NOTRLCOM+USECTRLV},
  783. X    {(char_u *)"make",            NEEDARG+EXTRA+TRLBAR+XFILE},
  784. X    {(char_u *)"mkexrc",        BANG+FILE1+TRLBAR},
  785. X    {(char_u *)"mkvimrc",        BANG+FILE1+TRLBAR},
  786. X    {(char_u *)"mfstat",        TRLBAR},                /* for debugging */
  787. X    {(char_u *)"mode",            WORD1+TRLBAR},
  788. X    {(char_u *)"next",            RANGE+NOTADR+BANG+NAMEDFS},
  789. X    {(char_u *)"new",            BANG+FILE1+RANGE+NOTADR},
  790. X    {(char_u *)"number",        RANGE+COUNT+TRLBAR},
  791. X    {(char_u *)"#",                RANGE+COUNT+TRLBAR},
  792. X    {(char_u *)"noremap",        BANG+EXTRA+TRLBAR+NOTRLCOM+USECTRLV},
  793. X    {(char_u *)"noreabbrev",    EXTRA+TRLBAR+NOTRLCOM+USECTRLV},
  794. X    {(char_u *)"Next",            EXTRA+RANGE+NOTADR+COUNT+BANG},
  795. X    {(char_u *)"only",            BANG+TRLBAR},
  796. X    {(char_u *)"print",            RANGE+COUNT+TRLBAR},
  797. X    {(char_u *)"pop",            RANGE+NOTADR+COUNT+TRLBAR+ZEROR},
  798. X    {(char_u *)"put",            RANGE+BANG+REGSTR+TRLBAR},
  799. X    {(char_u *)"preserve",        TRLBAR},
  800. X    {(char_u *)"previous",        EXTRA+RANGE+NOTADR+COUNT+BANG},
  801. X    {(char_u *)"pwd",            TRLBAR},
  802. X    {(char_u *)"quit",            BANG+TRLBAR},
  803. X    {(char_u *)"qall",            BANG+TRLBAR},
  804. X    {(char_u *)"read",            RANGE+NAMEDF+TRLBAR+ZEROR},
  805. X    {(char_u *)"rewind",        EXTRA+BANG},
  806. X    {(char_u *)"recover",        FILE1+TRLBAR},                /* not supported */
  807. X    {(char_u *)"redo",            TRLBAR},
  808. X    {(char_u *)"right",            TRLBAR+RANGE+EXTRA},
  809. X    {(char_u *)"resize",        TRLBAR+WORD1},
  810. X    {(char_u *)"substitute",    RANGE+EXTRA},
  811. X    {(char_u *)"sargument",        BANG+RANGE+NOTADR+COUNT+EXTRA},
  812. X    {(char_u *)"sall",            TRLBAR},
  813. X    {(char_u *)"sbuffer",        RANGE+NOTADR+COUNT+TRLBAR},
  814. X    {(char_u *)"sball",            TRLBAR},
  815. X    {(char_u *)"sbmodified",    RANGE+NOTADR+COUNT+TRLBAR},
  816. X    {(char_u *)"sbnext",        RANGE+NOTADR+COUNT+TRLBAR},
  817. X    {(char_u *)"sbNext",        RANGE+NOTADR+COUNT+TRLBAR},
  818. X    {(char_u *)"sbprevious",    RANGE+NOTADR+COUNT+TRLBAR},
  819. X    {(char_u *)"sbrewind",        TRLBAR},
  820. X    {(char_u *)"sblast",        TRLBAR},
  821. X    {(char_u *)"suspend",        TRLBAR+BANG},
  822. X    {(char_u *)"set",            EXTRA+TRLBAR},
  823. X    {(char_u *)"setkeymap",        NAMEDF+TRLBAR},
  824. X    {(char_u *)"shell",            TRLBAR},
  825. X    {(char_u *)"sleep",            RANGE+COUNT+NOTADR+TRLBAR},
  826. X    {(char_u *)"source",        NAMEDF+NEEDARG+TRLBAR},
  827. X    {(char_u *)"split",            BANG+FILE1+RANGE+NOTADR},
  828. X    {(char_u *)"snext",            RANGE+NOTADR+BANG+NAMEDFS},
  829. X    {(char_u *)"sNext",            EXTRA+RANGE+NOTADR+COUNT+BANG},
  830. X    {(char_u *)"sprevious",        EXTRA+RANGE+NOTADR+COUNT+BANG},
  831. X    {(char_u *)"srewind",        EXTRA+BANG},
  832. X    {(char_u *)"slast",            EXTRA+BANG},
  833. X    {(char_u *)"stop",            TRLBAR+BANG},
  834. X    {(char_u *)"sunhide",        TRLBAR},
  835. X    {(char_u *)"swapname",        TRLBAR},
  836. X    {(char_u *)"t",                RANGE+EXTRA+TRLBAR},
  837. X    {(char_u *)"tag",            RANGE+NOTADR+COUNT+BANG+WORD1+TRLBAR+ZEROR},
  838. X    {(char_u *)"tags",            TRLBAR},
  839. X    {(char_u *)"unabbreviate",    EXTRA+TRLBAR+USECTRLV},
  840. X    {(char_u *)"undo",            TRLBAR},
  841. X    {(char_u *)"unhide",        TRLBAR},
  842. X    {(char_u *)"unmap",            BANG+EXTRA+TRLBAR+USECTRLV},
  843. X    {(char_u *)"vglobal",        RANGE+EXTRA+DFLALL},
  844. X    {(char_u *)"version",        TRLBAR},
  845. X    {(char_u *)"visual",        RANGE+BANG+FILE1},
  846. X    {(char_u *)"write",            RANGE+BANG+FILE1+DFLALL+TRLBAR},
  847. X    {(char_u *)"wnext",            RANGE+NOTADR+BANG+FILE1+TRLBAR},
  848. X    {(char_u *)"wNext",            RANGE+NOTADR+BANG+FILE1+TRLBAR},
  849. X    {(char_u *)"wprevious",        RANGE+NOTADR+BANG+FILE1+TRLBAR},
  850. X    {(char_u *)"winsize",        EXTRA+NEEDARG+TRLBAR},
  851. X    {(char_u *)"wq",            BANG+FILE1+DFLALL+TRLBAR},
  852. X    {(char_u *)"wall",            BANG+TRLBAR},
  853. X    {(char_u *)"wqall",            BANG+FILE1+DFLALL+TRLBAR},
  854. X    {(char_u *)"xit",            BANG+FILE1+DFLALL+TRLBAR},
  855. X    {(char_u *)"xall",            BANG+TRLBAR},
  856. X    {(char_u *)"yank",            RANGE+REGSTR+COUNT+TRLBAR},
  857. X    {(char_u *)"z",                RANGE+COUNT+TRLBAR},        /* not supported */
  858. X    {(char_u *)"@",                RANGE+EXTRA+TRLBAR},
  859. X    {(char_u *)"!",                RANGE+NAMEDFS},
  860. X    {(char_u *)"<",                RANGE+COUNT+TRLBAR},
  861. X    {(char_u *)">",                RANGE+COUNT+TRLBAR},
  862. X    {(char_u *)"=",                RANGE+TRLBAR},
  863. X    {(char_u *)"&",                RANGE+EXTRA},
  864. X    {(char_u *)"~",                RANGE+EXTRA}
  865. X|
  866. X};
  867. X|
  868. END_OF_FILE
  869.   if test 8606 -ne `wc -c <'vim/src/cmdtab.tab'`; then
  870.     echo shar: \"'vim/src/cmdtab.tab'\" unpacked with wrong size!
  871.   fi
  872.   # end of 'vim/src/cmdtab.tab'
  873. fi
  874. if test -f 'vim/src/help.c' -a "${1}" != "-c" ; then 
  875.   echo shar: Will not clobber existing file \"'vim/src/help.c'\"
  876. else
  877.   echo shar: Extracting \"'vim/src/help.c'\" \(3737 characters\)
  878.   sed "s/^X//" >'vim/src/help.c' <<'END_OF_FILE'
  879. X/* vi:ts=4:sw=4
  880. X *
  881. X * VIM - Vi IMproved        by Bram Moolenaar
  882. X *
  883. X * Read the file "credits.txt" for a list of people who contributed.
  884. X * Read the file "uganda.txt" for copying and usage conditions.
  885. X */
  886. X
  887. X/*
  888. X * help.c: display help from the vim.hlp file
  889. X */
  890. X
  891. X#include "vim.h"
  892. X#include "globals.h"
  893. X#include "proto.h"
  894. X#include "param.h"
  895. X
  896. Xstatic long helpfilepos;        /* position in help file */
  897. Xstatic FILE *helpfd;            /* file descriptor of help file */
  898. X
  899. X#define MAXSCREENS 52            /* one screen for a-z and A-Z */
  900. X
  901. X    void
  902. Xhelp()
  903. X{
  904. X    int        c;
  905. X    int        eof;
  906. X    int        screens;
  907. X    int        i;
  908. X    long    filepos[MAXSCREENS];    /* seek position for each screen */
  909. X    int        screennr;            /* screen number; index == 0, 'c' == 1, 'd' == 2, etc */
  910. X#if defined(MSDOS) && !defined(NT)
  911. X    char_u    *fnamep;
  912. X#endif
  913. X
  914. X/*
  915. X * try to open the file specified by the "helpfile" option
  916. X */
  917. X    if ((helpfd = fopen((char *)p_hf, READBIN)) == NULL)
  918. X    {
  919. X#if defined(MSDOS) && !defined(NT)
  920. X    /*
  921. X     * for MSDOS: try the DOS search path
  922. X     */
  923. X        fnamep = searchpath("vim.hlp");
  924. X        if (fnamep == NULL || (helpfd = fopen((char *)fnamep, READBIN)) == NULL)
  925. X        {
  926. X            smsg((char_u *)"Sorry, help file \"%s\" and \"vim.hlp\" not found", p_hf);
  927. X            return;
  928. X        }
  929. X#else
  930. X        smsg((char_u *)"Sorry, help file \"%s\" not found", p_hf);
  931. X        return;
  932. X#endif
  933. X    }
  934. X    helpfilepos = 0;
  935. X    screennr = 0;
  936. X    for (i = 0; i < MAXSCREENS; ++i)
  937. X        filepos[i] = 0;
  938. X    State = HELP;
  939. X    for (;;)
  940. X    {
  941. X        screens = redrawhelp();                /* show one or more screens */
  942. X        eof = (screens < 0);
  943. X        if (!eof && screennr + screens < MAXSCREENS)
  944. X            filepos[screennr + screens] = ftell(helpfd);
  945. X
  946. X        if ((c = vgetc()) == '\n' || c == '\r' || c == Ctrl('C') || c == ESC)
  947. X            break;
  948. X
  949. X        if (c == ' ' ||
  950. X#ifdef MSDOS
  951. X                (c == K_NUL && vpeekc() == 'Q') ||    /* page down */
  952. X#endif
  953. X                c == Ctrl('F'))                        /* one screen forwards */
  954. X        {
  955. X            if (screennr < MAXSCREENS && !eof)
  956. X                ++screennr;
  957. X        }
  958. X        else if (c == 'a')                    /* go to first screen */
  959. X            screennr = 0;
  960. X        else if (c == 'b' ||
  961. X#ifdef MSDOS
  962. X                (c == K_NUL && vpeekc() == 'I') ||    /* page up */
  963. X#endif
  964. X                c == Ctrl('B'))                    /* go one screen backwards */
  965. X        {
  966. X            if (screennr > 0)
  967. X                --screennr;
  968. X        }
  969. X        else if (isalpha(c))                /* go to specified screen */
  970. X        {
  971. X            if (isupper(c))
  972. X                c = c - 'A' + 'z' + 1;        /* 'A' comes after 'z' */
  973. X            screennr = c - 'b';
  974. X        }
  975. X#ifdef MSDOS
  976. X        if (c == K_NUL)
  977. X            c = vgetc();
  978. X#endif
  979. X        for (i = screennr; i > 0; --i)
  980. X            if (filepos[i])
  981. X                break;
  982. X        fseek(helpfd, filepos[i], 0);
  983. X        while (i < screennr)
  984. X        {
  985. X            while ((c = getc(helpfd)) != '\f' && c != -1)
  986. X                ;
  987. X            if (c == -1)
  988. X                break;
  989. X            filepos[++i] = ftell(helpfd);    /* store the position just after the '\f' */
  990. X        }
  991. X        screennr = i;                        /* required when end of file reached */
  992. X        helpfilepos = filepos[screennr];
  993. X    }
  994. X    State = NORMAL;
  995. X    fclose(helpfd);
  996. X    updateScreen(CLEAR);
  997. X}
  998. X
  999. X/*
  1000. X * redraw the help info for the current position in the help file
  1001. X *
  1002. X * return the number of screens displayed, or -1 if end of file reached
  1003. X */
  1004. X    int
  1005. Xredrawhelp()
  1006. X{
  1007. X    int nextc;
  1008. X    int col;
  1009. X    int    line = 0;
  1010. X    int    screens = 1;
  1011. X
  1012. X    fseek(helpfd, helpfilepos, 0);
  1013. X    outstr(T_ED);
  1014. X    (void)set_highlight('h');
  1015. X    windgoto(0,0);
  1016. X    while ((nextc = getc(helpfd)) != -1 && (nextc != '\f' || line < Rows - 24))
  1017. X    {
  1018. X        if (nextc == Ctrl('B'))            /* begin of standout */
  1019. X            start_highlight();
  1020. X        else if (nextc == Ctrl('E'))    /* end of standout */
  1021. X            stop_highlight();
  1022. X        else if (nextc == '\f')            /* start of next screen */
  1023. X        {
  1024. X            ++screens;
  1025. X            outchar('\n');
  1026. X            ++line;
  1027. X        }
  1028. X        else
  1029. X        {
  1030. X            outchar(nextc);
  1031. X            if (nextc == '\n')
  1032. X                ++line;
  1033. X        }
  1034. X    }
  1035. X    windgoto(0, (int)(Columns - STRLEN(Version) - 1));
  1036. X    outstrn(Version);
  1037. X    col = (int)Columns - 52;
  1038. X    if (col < 0)
  1039. X        col = 0;
  1040. X    windgoto((int)Rows - 1, col);
  1041. X    OUTSTRN("<space = next; return = quit; a = index; b = back>");
  1042. X    return (nextc == -1 ? -1 : screens);
  1043. X}
  1044. END_OF_FILE
  1045.   if test 3737 -ne `wc -c <'vim/src/help.c'`; then
  1046.     echo shar: \"'vim/src/help.c'\" unpacked with wrong size!
  1047.   fi
  1048.   # end of 'vim/src/help.c'
  1049. fi
  1050. if test -f 'vim/src/linefunc.c' -a "${1}" != "-c" ; then 
  1051.   echo shar: Will not clobber existing file \"'vim/src/linefunc.c'\"
  1052. else
  1053.   echo shar: Extracting \"'vim/src/linefunc.c'\" \(2906 characters\)
  1054.   sed "s/^X//" >'vim/src/linefunc.c' <<'END_OF_FILE'
  1055. X/* vi:ts=4:sw=4
  1056. X *
  1057. X * VIM - Vi IMproved        by Bram Moolenaar
  1058. X *
  1059. X * Read the file "credits.txt" for a list of people who contributed.
  1060. X * Read the file "uganda.txt" for copying and usage conditions.
  1061. X */
  1062. X
  1063. X/*
  1064. X * linefunc.c: some functions to move to the next/previous line and
  1065. X *               to the next/previous character
  1066. X */
  1067. X
  1068. X#include "vim.h"
  1069. X#include "globals.h"
  1070. X#include "proto.h"
  1071. X
  1072. X/*
  1073. X * coladvance(col)
  1074. X *
  1075. X * Try to advance the Cursor to the specified column.
  1076. X */
  1077. X
  1078. X    void
  1079. Xcoladvance(wcol)
  1080. X    colnr_t         wcol;
  1081. X{
  1082. X    int                 index;
  1083. X    register char_u        *ptr;
  1084. X    register colnr_t    col;
  1085. X
  1086. X    ptr = ml_get(curwin->w_cursor.lnum);
  1087. X
  1088. X    /* try to advance to the specified column */
  1089. X    index = -1;
  1090. X    col = 0;
  1091. X    while (col <= wcol && *ptr)
  1092. X    {
  1093. X        ++index;
  1094. X        /* Count a tab for what it's worth (if list mode not on) */
  1095. X        col += chartabsize(*ptr, (long)col);
  1096. X        ++ptr;
  1097. X    }
  1098. X    /*
  1099. X     * in insert mode it is allowed to be one char beyond the end of the line
  1100. X     */
  1101. X    if ((State & INSERT) && col <= wcol)
  1102. X        ++index;
  1103. X    if (index < 0)
  1104. X        curwin->w_cursor.col = 0;
  1105. X    else
  1106. X        curwin->w_cursor.col = index;
  1107. X}
  1108. X
  1109. X/*
  1110. X * inc(p)
  1111. X *
  1112. X * Increment the line pointer 'p' crossing line boundaries as necessary.
  1113. X * Return 1 when crossing a line, -1 when at end of file, 0 otherwise.
  1114. X */
  1115. X    int
  1116. Xinc_cursor()
  1117. X{
  1118. X    return inc(&curwin->w_cursor);
  1119. X}
  1120. X
  1121. X    int
  1122. Xinc(lp)
  1123. X    register FPOS  *lp;
  1124. X{
  1125. X    register char_u  *p = ml_get_pos(lp);
  1126. X
  1127. X    if (*p != NUL)
  1128. X    {            /* still within line */
  1129. X        lp->col++;
  1130. X        return ((p[1] != NUL) ? 0 : 1);
  1131. X    }
  1132. X    if (lp->lnum != curbuf->b_ml.ml_line_count)
  1133. X    {            /* there is a next line */
  1134. X        lp->col = 0;
  1135. X        lp->lnum++;
  1136. X        return 1;
  1137. X    }
  1138. X    return -1;
  1139. X}
  1140. X
  1141. X/*
  1142. X * incl(lp): same as inc(), but skip the NUL at the end of non-empty lines
  1143. X */
  1144. X    int
  1145. Xincl(lp)
  1146. X    register FPOS *lp;
  1147. X{
  1148. X    register int r;
  1149. X
  1150. X    if ((r = inc(lp)) == 1 && lp->col)
  1151. X        r = inc(lp);
  1152. X    return r;
  1153. X}
  1154. X
  1155. X/*
  1156. X * dec(p)
  1157. X *
  1158. X * Decrement the line pointer 'p' crossing line boundaries as necessary.
  1159. X * Return 1 when crossing a line, -1 when at start of file, 0 otherwise.
  1160. X */
  1161. X    int
  1162. Xdec_cursor()
  1163. X{
  1164. X    return dec(&curwin->w_cursor);
  1165. X}
  1166. X
  1167. X    int
  1168. Xdec(lp)
  1169. X    register FPOS  *lp;
  1170. X{
  1171. X    if (lp->col > 0)
  1172. X    {            /* still within line */
  1173. X        lp->col--;
  1174. X        return 0;
  1175. X    }
  1176. X    if (lp->lnum > 1)
  1177. X    {            /* there is a prior line */
  1178. X        lp->lnum--;
  1179. X        lp->col = STRLEN(ml_get(lp->lnum));
  1180. X        return 1;
  1181. X    }
  1182. X    return -1;                    /* at start of file */
  1183. X}
  1184. X
  1185. X/*
  1186. X * decl(lp): same as dec(), but skip the NUL at the end of non-empty lines
  1187. X */
  1188. X    int
  1189. Xdecl(lp)
  1190. X        register FPOS *lp;
  1191. X{
  1192. X        register int r;
  1193. X
  1194. X        if ((r = dec(lp)) == 1 && lp->col)
  1195. X                r = dec(lp);
  1196. X        return r;
  1197. X}
  1198. X
  1199. X/*
  1200. X * make sure curwin->w_cursor in on a valid character
  1201. X */
  1202. X    void
  1203. Xadjust_cursor()
  1204. X{
  1205. X    int len;
  1206. X
  1207. X    if (curwin->w_cursor.lnum == 0)
  1208. X        curwin->w_cursor.lnum = 1;
  1209. X    if (curwin->w_cursor.lnum > curbuf->b_ml.ml_line_count)
  1210. X        curwin->w_cursor.lnum = curbuf->b_ml.ml_line_count;
  1211. X
  1212. X    len = STRLEN(ml_get(curwin->w_cursor.lnum));
  1213. X    if (len == 0)
  1214. X        curwin->w_cursor.col = 0;
  1215. X    else if (curwin->w_cursor.col >= len)
  1216. X        curwin->w_cursor.col = len - 1;
  1217. X}
  1218. END_OF_FILE
  1219.   if test 2906 -ne `wc -c <'vim/src/linefunc.c'`; then
  1220.     echo shar: \"'vim/src/linefunc.c'\" unpacked with wrong size!
  1221.   fi
  1222.   # end of 'vim/src/linefunc.c'
  1223. fi
  1224. if test -f 'vim/src/makefile.archie' -a "${1}" != "-c" ; then 
  1225.   echo shar: Will not clobber existing file \"'vim/src/makefile.archie'\"
  1226. else
  1227.   echo shar: Extracting \"'vim/src/makefile.archie'\" \(2888 characters\)
  1228.   sed "s/^X//" >'vim/src/makefile.archie' <<'END_OF_FILE'
  1229. X#
  1230. X# Makefile for Vim on Acorn Archimedes, using gcc and UnixLib
  1231. X#
  1232. X
  1233. XMACHINE = -DARCHIE
  1234. X
  1235. X### gcc on the Arc.
  1236. XCC=gcc
  1237. X
  1238. X### Name of target
  1239. XTARGET = vim
  1240. X
  1241. X# To keep the command line down, all the defs have gone into
  1242. X# the macro file "defs"
  1243. XDEFS = -include defs -O2
  1244. X
  1245. X#>>>>> link with termlib or termcap only if TERMCAP is defined
  1246. X### default
  1247. XLIBS =
  1248. X
  1249. X#>>>>> end of choices
  1250. X###########################################################################
  1251. X
  1252. XCFLAGS = -c $(MACHINE) $(DEFS)
  1253. X
  1254. XINCL = h.vim h.globals h.param h.keymap h.macros h.ascii h.term h.unix h.debug
  1255. X
  1256. XOBJ =    o.alloc o.archie o.buffer o.charset o.cmdcmds o.cmdline o.csearch o.digraph \
  1257. X    o.edit o.fileio o.getchar o.help o.linefunc o.main o.mark o.memfile o.memline o.message o.misccmds \
  1258. X    o.normal o.ops o.param o.quickfix o.regexp o.regsub o.screen \
  1259. X    o.search o.tag o.term o.undo o.window
  1260. X
  1261. X$(TARGET): $(OBJ) c.version
  1262. X    $(CC) $(CFLAGS) version.c
  1263. X    rename o.mkcmdtab tempfile
  1264. X    $(CC) -o $(TARGET) o.* $(LIBS)
  1265. X    rename tempfile o.mkcmdtab
  1266. X
  1267. X###########################################################################
  1268. X
  1269. Xo.alloc:    c.alloc  $(INCL)
  1270. X    $(CC) $(CFLAGS) alloc.c
  1271. X
  1272. Xo.archie:    c.archie  $(INCL) h.archie
  1273. X    $(CC) $(CFLAGS) archie.c
  1274. X
  1275. Xo.buffer:    c.buffer  $(INCL)
  1276. X    $(CC) $(CFLAGS) buffer.c
  1277. X
  1278. Xo.charset:    c.charset  $(INCL)
  1279. X    $(CC) $(CFLAGS) charset.c
  1280. X
  1281. Xo.cmdcmds:    c.cmdcmds  $(INCL)
  1282. X    $(CC) $(CFLAGS) cmdcmds.c
  1283. X
  1284. Xo.cmdline:    c.cmdline  $(INCL) h.cmdtab
  1285. X    $(CC) $(CFLAGS) cmdline.c
  1286. X
  1287. Xo.csearch:    c.csearch  $(INCL)
  1288. X    $(CC) $(CFLAGS) csearch.c
  1289. X
  1290. Xo.digraph:    c.digraph  $(INCL)
  1291. X    $(CC) $(CFLAGS) digraph.c
  1292. X
  1293. Xo.edit:    c.edit  $(INCL)
  1294. X    $(CC) $(CFLAGS) edit.c
  1295. X
  1296. Xo.fileio:    c.fileio  $(INCL)
  1297. X    $(CC) $(CFLAGS) fileio.c
  1298. X
  1299. Xo.getchar:    c.getchar  $(INCL)
  1300. X    $(CC) $(CFLAGS) getchar.c
  1301. X
  1302. Xo.help:    c.help  $(INCL)
  1303. X    $(CC) $(CFLAGS) help.c
  1304. X
  1305. Xo.linefunc:    c.linefunc  $(INCL)
  1306. X    $(CC) $(CFLAGS) linefunc.c
  1307. X
  1308. Xo.main:    c.main  $(INCL)
  1309. X    $(CC) $(CFLAGS) main.c
  1310. X
  1311. Xo.mark:    c.mark  $(INCL)
  1312. X    $(CC) $(CFLAGS) mark.c
  1313. X
  1314. Xo.memfile:    c.memfile  $(INCL)
  1315. X    $(CC) $(CFLAGS) memfile.c
  1316. X
  1317. Xo.memline:    c.memline  $(INCL)
  1318. X    $(CC) $(CFLAGS) memline.c
  1319. X
  1320. Xo.message:    c.message  $(INCL)
  1321. X    $(CC) $(CFLAGS) message.c
  1322. X
  1323. Xo.misccmds:    c.misccmds  $(INCL)
  1324. X    $(CC) $(CFLAGS) misccmds.c
  1325. X
  1326. Xo.normal:    c.normal  $(INCL) h.ops
  1327. X    $(CC) $(CFLAGS) normal.c
  1328. X
  1329. Xo.ops:    c.ops  $(INCL) h.ops
  1330. X    $(CC) $(CFLAGS) ops.c
  1331. X
  1332. Xo.param:    c.param  $(INCL)
  1333. X    $(CC) $(CFLAGS) param.c
  1334. X
  1335. Xo.quickfix:    c.quickfix  $(INCL)
  1336. X    $(CC) $(CFLAGS) quickfix.c
  1337. X
  1338. Xo.regexp:    c.regexp  $(INCL)
  1339. X    $(CC) $(CFLAGS) regexp.c
  1340. X
  1341. Xo.regsub:    c.regsub  $(INCL)
  1342. X    $(CC) $(CFLAGS) regsub.c
  1343. X
  1344. Xo.screen:    c.screen  $(INCL)
  1345. X    $(CC) $(CFLAGS) screen.c
  1346. X
  1347. Xo.search:    c.search  $(INCL)
  1348. X    $(CC) $(CFLAGS) search.c
  1349. X
  1350. Xo.tag:    c.tag  $(INCL)
  1351. X    $(CC) $(CFLAGS) tag.c
  1352. X
  1353. Xo.term:    c.term  $(INCL)
  1354. X    $(CC) $(CFLAGS) term.c
  1355. X
  1356. Xo.undo:    c.undo  $(INCL)
  1357. X    $(CC) $(CFLAGS) undo.c
  1358. X
  1359. Xo.window:    c.window  $(INCL)
  1360. X    $(CC) $(CFLAGS) window.c
  1361. X
  1362. Xh.cmdtab: cmdtab mkcmdtab
  1363. X    mkcmdtab cmdtab h.cmdtab
  1364. X
  1365. Xmkcmdtab: o.mkcmdtab
  1366. X    $(CC) -o mkcmdtab mkcmdtab.o
  1367. END_OF_FILE
  1368.   if test 2888 -ne `wc -c <'vim/src/makefile.archie'`; then
  1369.     echo shar: \"'vim/src/makefile.archie'\" unpacked with wrong size!
  1370.   fi
  1371.   # end of 'vim/src/makefile.archie'
  1372. fi
  1373. if test -f 'vim/src/makefile.bcc' -a "${1}" != "-c" ; then 
  1374.   echo shar: Will not clobber existing file \"'vim/src/makefile.bcc'\"
  1375. else
  1376.   echo shar: Extracting \"'vim/src/makefile.bcc'\" \(4338 characters\)
  1377.   sed "s/^X//" >'vim/src/makefile.bcc' <<'END_OF_FILE'
  1378. X#
  1379. X# Makefile for Borland C++ 2.0
  1380. X# Can also be used for Turbo C++
  1381. X#
  1382. X# The options are at the end of this file
  1383. X#
  1384. X
  1385. X.AUTODEPEND
  1386. X
  1387. X#        *Translator Definitions*
  1388. X#   use tcc for Turbo C++
  1389. XCC = bcc +VIM.CFG
  1390. X#CC = tcc +VIM.CFG
  1391. XTASM = TASM
  1392. XTLIB = tlib
  1393. XTLINK = tlink
  1394. X#
  1395. X# Adjust the paths for your environment
  1396. X# use the first two if you don't have the spawno library
  1397. X#    then also remove the SPAWNO define further down and the line
  1398. X#    with spawnl.lib
  1399. X#
  1400. X#LIBPATH = C:\BORLANDC\LIB
  1401. X#INCLUDEPATH = C:\BORLANDC\INCLUDE
  1402. XLIBPATH = C:\BORLANDC\LIB;C:\CC\SPAWN
  1403. XINCLUDEPATH = C:\BORLANDC\INCLUDE;C:\CC\SPAWN
  1404. X#        *Implicit Rules*
  1405. X#
  1406. X# use -v for debugging
  1407. X#
  1408. X.c.obj:
  1409. X  $(CC) -c {$< }
  1410. X#  $(CC) -c -v {$< }
  1411. X#        *List Macros*
  1412. XEXE_dependencies =  \
  1413. X alloc.obj \
  1414. X buffer.obj \
  1415. X charset.obj \
  1416. X cmdcmds.obj \
  1417. X cmdline.obj \
  1418. X csearch.obj \
  1419. X digraph.obj \
  1420. X edit.obj \
  1421. X fileio.obj \
  1422. X getchar.obj \
  1423. X help.obj \
  1424. X linefunc.obj \
  1425. X main.obj \
  1426. X mark.obj \
  1427. X memfile.obj \
  1428. X memline.obj \
  1429. X message.obj \
  1430. X misccmds.obj \
  1431. X msdos.obj \
  1432. X normal.obj \
  1433. X ops.obj \
  1434. X param.obj \
  1435. X quickfix.obj \
  1436. X regexp.obj \
  1437. X regsub.obj \
  1438. X screen.obj \
  1439. X search.obj \
  1440. X tag.obj \
  1441. X term.obj \
  1442. X undo.obj \
  1443. X window.obj \
  1444. X version.obj
  1445. X#        *Explicit Rules*
  1446. X#  add /v to TLINK for degubbing
  1447. Xvim.exe: vim.cfg $(EXE_dependencies)
  1448. X  $(CC) -c version.c
  1449. X  $(TLINK) /x/c/L$(LIBPATH) @&&|
  1450. Xc0l.obj+
  1451. Xalloc.obj+
  1452. Xbuffer.obj+
  1453. Xcharset.obj+
  1454. Xcmdcmds.obj+
  1455. Xcmdline.obj+
  1456. Xcsearch.obj+
  1457. Xdigraph.obj+
  1458. Xedit.obj+
  1459. Xfileio.obj+
  1460. Xgetchar.obj+
  1461. Xhelp.obj+
  1462. Xlinefunc.obj+
  1463. Xmain.obj+
  1464. Xmark.obj+
  1465. Xmemfile.obj+
  1466. Xmemline.obj+
  1467. Xmessage.obj+
  1468. Xmisccmds.obj+
  1469. Xmsdos.obj+
  1470. Xnormal.obj+
  1471. Xops.obj+
  1472. Xparam.obj+
  1473. Xquickfix.obj+
  1474. Xregexp.obj+
  1475. Xregsub.obj+
  1476. Xscreen.obj+
  1477. Xsearch.obj+
  1478. Xtag.obj+
  1479. Xterm.obj+
  1480. Xundo.obj+
  1481. Xwindow.obj+
  1482. Xversion.obj
  1483. Xvim
  1484. X        # no map file
  1485. Xfp87.lib+
  1486. Xmathl.lib+
  1487. Xspawnl.lib+
  1488. Xcl.lib
  1489. X|
  1490. X#        *Individual File Dependencies*
  1491. Xalloc.obj: alloc.c 
  1492. Xbuffer.obj: buffer.c 
  1493. Xcharset.obj: charset.c 
  1494. Xcmdcmds.obj: cmdcmds.c
  1495. Xcmdline.obj: cmdline.c cmdtab.h
  1496. Xcmdtab.h: cmdtab.tab mkcmdtab.exe
  1497. X    mkcmdtab cmdtab.tab cmdtab.h
  1498. X
  1499. Xmkcmdtab.exe: mkcmdtab.obj
  1500. X    $(CC) -ml -omkcmdtab mkcmdtab.obj
  1501. X
  1502. Xmkcmdtab.obj: mkcmdtab.c
  1503. X    $(CC) $(CFLAGS) mkcmdtab.c
  1504. X
  1505. Xcsearch.obj: csearch.c 
  1506. Xdigraph.obj: digraph.c 
  1507. Xedit.obj: edit.c 
  1508. Xfileio.obj: fileio.c 
  1509. X
  1510. Xgetchar.obj: getchar.c 
  1511. X
  1512. Xhelp.obj: help.c 
  1513. Xlinefunc.obj: linefunc.c 
  1514. Xmain.obj: main.c globals.h param.h
  1515. Xmark.obj: mark.c
  1516. Xmemfile.obj: memfile.c 
  1517. X
  1518. Xmemline.obj: memline.c 
  1519. X
  1520. Xmessage.obj: message.c 
  1521. Xmisccmds.obj: misccmds.c 
  1522. Xmsdos.obj: msdos.c 
  1523. Xnormal.obj: normal.c ops.h
  1524. Xops.obj: ops.c ops.h
  1525. Xparam.obj: param.c 
  1526. Xquickfix.obj: quickfix.c 
  1527. Xregexp.obj: regexp.c 
  1528. Xregsub.obj: regsub.c 
  1529. Xscreen.obj: screen.c 
  1530. Xsearch.obj: search.c 
  1531. Xtag.obj: tag.c
  1532. Xterm.obj: term.c term.h
  1533. Xundo.obj: undo.c 
  1534. X
  1535. Xwindow.obj: window.c 
  1536. Xversion.obj: version.c 
  1537. X#        *Compiler Configuration File*
  1538. X# The following compile options can be changed for better machines.
  1539. X#    replace -1- with -2 to produce code for a 80286 or higher
  1540. X#    replace -1- with -3 to produce code for a 80386 or higher
  1541. X#    add -v for source debugging
  1542. Xvim.cfg: makefile
  1543. X  copy &&|
  1544. X-ml
  1545. X-1-
  1546. X-f-
  1547. X-C
  1548. X-N
  1549. X-O
  1550. X-Z
  1551. X-k-
  1552. X-d
  1553. X-h
  1554. X-vi-
  1555. X-H=VIM.SYM
  1556. X-w-par
  1557. X-w-pro
  1558. X-weas
  1559. X-wpre
  1560. X-I$(INCLUDEPATH)
  1561. X-L$(LIBPATH)
  1562. X-DPC;MSDOS;SPAWNO;DIGRAPHS;WEBB_COMPLETE;WEBB_KEYWORD_COMPL
  1563. X| vim.cfg
  1564. X
  1565. X#
  1566. X# options:
  1567. X### -DDIGRAPHS        digraph support (at the cost of 1.6 Kbyte code)
  1568. X### -DNO_ARP        do not use arp.library, DOS 2.0 required
  1569. X### -DCOMPATIBLE    start in vi-compatible mode
  1570. X### -DNOBACKUP        default is no backup file
  1571. X### -DDEBUG        output a lot of debugging garbage
  1572. X### -DTERMCAP        include termcap file support
  1573. X### -DNO_BUILTIN_TCAPS    do not include builtin termcap entries
  1574. X###                (use only with -DTERMCAP)
  1575. X### -DSOME_BUILTIN_TCAPS include most useful builtin termcap entries
  1576. X###                (use only without -DNO_BUILTIN_TCAPS)
  1577. X### -DALL_BUILTIN_TCAPS    include all builtin termcap entries
  1578. X###                (use only without -DNO_BUILTIN_TCAPS)
  1579. X### -DVIMRC_FILE    name of the .vimrc file in current dir
  1580. X### -DEXRC_FILE        name of the .exrc file in current dir
  1581. X### -DSYSVIMRC_FILE    name of the global .vimrc file
  1582. X### -DSYSEXRC_FILE    name of the global .exrc file
  1583. X### -DDEFVIMRC_FILE    name of the system-wide .vimrc file
  1584. X### -DVIM_HLP        name of the help file
  1585. X### -DWEBB_COMPLETE    include Webb's code for command line completion
  1586. X### -DWEBB_KEYWORD_COMPL include Webb's code for keyword completion
  1587. X### -DNOTITLE        'title' option off by default
  1588. END_OF_FILE
  1589.   if test 4338 -ne `wc -c <'vim/src/makefile.bcc'`; then
  1590.     echo shar: \"'vim/src/makefile.bcc'\" unpacked with wrong size!
  1591.   fi
  1592.   # end of 'vim/src/makefile.bcc'
  1593. fi
  1594. if test -f 'vim/src/makefile.dice' -a "${1}" != "-c" ; then 
  1595.   echo shar: Will not clobber existing file \"'vim/src/makefile.dice'\"
  1596. else
  1597.   echo shar: Extracting \"'vim/src/makefile.dice'\" \(3750 characters\)
  1598.   sed "s/^X//" >'vim/src/makefile.dice' <<'END_OF_FILE'
  1599. X#
  1600. X# Makefile for VIM, using DICE 2.06.40 and 2.06.21
  1601. X#
  1602. X# LAST CHANGES NOT TESTED
  1603. X#
  1604. X
  1605. X#>>>>> choose options:
  1606. X### -DDIGRAPHS        digraph support (at the cost of 1.6 Kbyte code)
  1607. X### -DNO_ARP        do not use arp.library, DOS 2.0 required
  1608. X### -DCOMPATIBLE    start in vi-compatible mode
  1609. X### -DNOBACKUP        default is no backup file
  1610. X### -DDEBUG        output a lot of debugging garbage
  1611. X### -DTERMCAP        include termcap file support
  1612. X### -DNO_BUILTIN_TCAPS    do not include builtin termcap entries
  1613. X###                (use only with -DTERMCAP)
  1614. X### -DSOME_BUILTIN_TCAPS include most useful builtin termcap entries
  1615. X###                (use only without -DNO_BUILTIN_TCAPS)
  1616. X### -DALL_BUILTIN_TCAPS    include all builtin termcap entries
  1617. X###                (use only without -DNO_BUILTIN_TCAPS)
  1618. X### -DWEBB_COMPLETE    include Webb's code for command line completion
  1619. X### -DWEBB_KEYWORD_COMPL include Webb's code for keyword completion
  1620. X### -DNOTITLE        'title' option off by default
  1621. XDEFINES = -DTERMCAP -DDIGRAPHS -DSOME_BUILTIN_TCAPS \
  1622. X        -DWEBB_COMPLETE -DWEBB_KEYWORD_COMPL
  1623. X
  1624. X#>>>>> if TERMCAP is defined obj/termlib.o has to be used
  1625. XTERMLIB = obj/termlib.o
  1626. X#TERMLIB = 
  1627. X
  1628. X#>>>>> end of choices
  1629. X###########################################################################
  1630. X
  1631. XCFLAGS = -c -DAMIGA $(DEFINES)
  1632. X
  1633. XINCL = vim.syms
  1634. XPRE = -H${INCL}=vim.h
  1635. XLIBS = -lmanx -la
  1636. XCC = dcc
  1637. XLD = dcc
  1638. X
  1639. X.c.o:
  1640. X    ${CC} ${PRE} ${CFLAGS} $*.c -o $@
  1641. X
  1642. XOBJ =    obj/alloc.o obj/amiga.o obj/buffer.o obj/charset.o obj/cmdcmds.o obj/cmdline.o \
  1643. X    obj/csearch.o obj/digraph.o obj/edit.o obj/fileio.o obj/getchar.o obj/help.o \
  1644. X    obj/linefunc.o obj/main.o obj/mark.o obj/memfile.o obj/memline.o obj/message.o obj/misccmds.o \
  1645. X    obj/normal.o obj/ops.o obj/param.o obj/quickfix.o obj/regexp.o \
  1646. X    obj/regsub.o obj/screen.o obj/search.o \
  1647. X    obj/tag.o obj/term.o obj/undo.o obj/window.o $(TERMLIB)
  1648. X
  1649. X/Vim: $(OBJ) version.c
  1650. X    ${CC} $(CFLAGS) version.c -o obj/version.o
  1651. X    ${LD} -o /Vim $(OBJ) obj/version.o $(LIBS)
  1652. X
  1653. Xdebug: $(OBJ) version.c
  1654. X    ${CC} $(CFLAGS) version.c -o obj/version.o
  1655. X    ${LD} -s -o /Vim $(OBJ) obj/version.o $(LIBS)
  1656. X
  1657. Xctags:
  1658. X    csh -c ctags *.c *.h
  1659. X
  1660. X# can't use delete here, too many file names
  1661. Xclean:
  1662. X    csh -c rm -f $(OBJ) obj/version.o obj/mkcmdtab.o /Vim $(INCL) mkcmdtab cmdtab.h
  1663. X
  1664. X$(INCL)  : vim.h globals.h keymap.h macros.h ascii.h term.h amiga.h structs.h
  1665. X    delete $(INCL)
  1666. X
  1667. X###########################################################################
  1668. X
  1669. Xobj/alloc.o:    alloc.c  $(INCL)
  1670. X
  1671. Xobj/amiga.o:    amiga.c  $(INCL) amiga.h
  1672. X
  1673. Xobj/buffer.o:    buffer.c  $(INCL)
  1674. X
  1675. Xobj/charset.o:    charset.c  $(INCL)
  1676. X
  1677. Xobj/cmdcmds.o:    cmdcmds.c  $(INCL)
  1678. X
  1679. Xobj/cmdline.o:    cmdline.c  $(INCL) cmdtab.h
  1680. X
  1681. Xobj/csearch.o:    csearch.c  $(INCL) regexp.h
  1682. X
  1683. Xobj/digraph.o: digraph.c    $(INCL)
  1684. X
  1685. Xobj/edit.o: edit.c    $(INCL)
  1686. X
  1687. Xobj/fileio.o:    fileio.c  $(INCL)
  1688. X
  1689. Xobj/getchar.o: getchar.c    $(INCL)
  1690. X
  1691. Xobj/help.o: help.c    $(INCL)
  1692. X
  1693. Xobj/linefunc.o:    linefunc.c  $(INCL)
  1694. X
  1695. Xobj/main.o: main.c
  1696. X    ${CC} ${CFLAGS} main.c -o main.o
  1697. X
  1698. Xobj/mark.o: mark.c    $(INCL)
  1699. X
  1700. Xobj/memfile.o:    memfile.c  $(INCL)
  1701. X
  1702. Xobj/memline.o:    memline.c  $(INCL)
  1703. X
  1704. Xobj/message.o:    message.c  $(INCL)
  1705. X
  1706. Xobj/misccmds.o:    misccmds.c  $(INCL)
  1707. X
  1708. Xobj/normal.o:    normal.c  $(INCL) ops.h
  1709. X
  1710. Xobj/ops.o:    ops.c  $(INCL) ops.h
  1711. X
  1712. Xobj/param.o:    param.c  $(INCL)
  1713. X# Because of a bug in DC1 2.06.40, initialisation of unions does not
  1714. X# work correctly. dc1-21 is DC1 2.06.21 which does work.
  1715. X    rename dc1-21 dc1
  1716. X    ${CC} ${CFLAGS} param.c -o param.o
  1717. X    rename dc1 dc1-21
  1718. X
  1719. Xobj/quickfix.o:    quickfix.c  $(INCL)
  1720. X
  1721. Xobj/regexp.o:    regexp.c  $(INCL) regexp.h
  1722. X
  1723. Xobj/regsub.o:    regsub.c  $(INCL) regexp.h
  1724. X
  1725. Xobj/screen.o:    screen.c  $(INCL)
  1726. X
  1727. Xobj/search.o:    search.c  $(INCL) regexp.h
  1728. X
  1729. Xobj/tag.o:    tags.c  $(INCL)
  1730. X
  1731. Xobj/termlib.o:    termlib.c $(INCL)
  1732. X
  1733. Xobj/undo.o: undo.c    $(INCL)
  1734. X
  1735. Xobj/window.o: window.c    $(INCL)
  1736. X
  1737. Xcmdtab.h: cmdtab.tab mkcmdtab
  1738. X    mkcmdtab cmdtab.tab cmdtab.h
  1739. X
  1740. Xmkcmdtab: obj/mkcmdtab.o
  1741. X    ${LD} -o mkcmdtab obj/mkcmdtab.o
  1742. END_OF_FILE
  1743.   if test 3750 -ne `wc -c <'vim/src/makefile.dice'`; then
  1744.     echo shar: \"'vim/src/makefile.dice'\" unpacked with wrong size!
  1745.   fi
  1746.   # end of 'vim/src/makefile.dice'
  1747. fi
  1748. if test -f 'vim/src/param.h' -a "${1}" != "-c" ; then 
  1749.   echo shar: Will not clobber existing file \"'vim/src/param.h'\"
  1750. else
  1751.   echo shar: Extracting \"'vim/src/param.h'\" \(8458 characters\)
  1752.   sed "s/^X//" >'vim/src/param.h' <<'END_OF_FILE'
  1753. X/* vi:ts=4:sw=4
  1754. X *
  1755. X * VIM - Vi IMproved        by Bram Moolenaar
  1756. X *
  1757. X * Read the file "credits.txt" for a list of people who contributed.
  1758. X * Read the file "uganda.txt" for copying and usage conditions.
  1759. X */
  1760. X
  1761. X/*
  1762. X * param.h: definition of global variables for settable parameters
  1763. X *
  1764. X * EXTERN is only defined in main.c (and vim.h)
  1765. X */
  1766. X
  1767. X#ifndef EXTERN
  1768. X# define EXTERN extern
  1769. X# define INIT(x)
  1770. X#else
  1771. X# ifndef INIT
  1772. X#  define INIT(x) x
  1773. X# endif
  1774. X#endif
  1775. X
  1776. X/*
  1777. X * The following are actual variabables for the parameters
  1778. X */
  1779. X
  1780. XEXTERN int    p_aw    INIT(= FALSE);        /* auto-write */
  1781. XEXTERN long    p_bs    INIT(= 0);            /* backspace over newlines in insert mode */
  1782. X#if defined(COMPATIBLE) || defined(NOBACKUP)
  1783. XEXTERN int    p_bk    INIT(= FALSE);        /* make backups when writing out files */
  1784. X#else
  1785. XEXTERN int    p_bk    INIT(= TRUE);        /* make backups when writing out files */
  1786. X#endif
  1787. X#ifdef MSDOS
  1788. XEXTERN int    p_biosk    INIT(= TRUE);        /* Use bioskey() instead of kbhit() */
  1789. X#endif
  1790. X#ifdef UNIX
  1791. XEXTERN char_u *p_bdir    INIT(= (char_u *)BACKUPDIR);    /* directory for backups */
  1792. X#endif
  1793. XEXTERN long    p_ch    INIT(= 1L);            /* command line height */
  1794. XEXTERN int    p_cp    INIT(= FALSE);        /* vi-compatible */
  1795. X#ifdef DIGRAPHS
  1796. XEXTERN int    p_dg    INIT(= FALSE);        /* enable digraphs */
  1797. X#endif /* DIGRAPHS */
  1798. XEXTERN char_u *p_dir    INIT(= (char_u *)DEF_DIR);    /* directory for swap file */
  1799. XEXTERN char_u *p_ep    INIT(= (char_u *)"indent");    /* program name for '=' command */
  1800. XEXTERN int    p_ea    INIT(= TRUE);        /* make windows equal height */
  1801. XEXTERN int    p_ed    INIT(= FALSE);        /* :s is ed compatible */
  1802. XEXTERN int    p_eb    INIT(= FALSE);        /* ring bell for errors */
  1803. X#ifdef AMIGA
  1804. XEXTERN char_u *p_ef    INIT(= (char_u *)"AztecC.Err");    /* name of errorfile */
  1805. X#else
  1806. XEXTERN char_u *p_ef    INIT(= (char_u *)"errors");            /* name of errorfile */
  1807. X#endif
  1808. X#ifdef AMIGA
  1809. XEXTERN char_u *p_efm    INIT(= (char_u *)"%f>%l:%c:%t:%n:%m");/* error format */
  1810. X#else
  1811. X# ifdef ARCHIE
  1812. XEXTERN char_u *p_efm    INIT(= (char_u *)"%f:%l:%m");    /* error format */
  1813. X# else
  1814. XEXTERN char_u *p_efm    INIT(= (char_u *)"\"%f\",%*[^0123456789]%l: %m");    /* error format */
  1815. X# endif
  1816. X#endif
  1817. X#ifdef COMPATIBLE
  1818. XEXTERN int    p_ek    INIT(= FALSE);        /* function keys with ESC in insert mode */
  1819. X#else
  1820. XEXTERN int    p_ek    INIT(= TRUE);        /* function keys with ESC in insert mode */
  1821. X#endif
  1822. XEXTERN int    p_exrc    INIT(= FALSE);        /* read .exrc in current dir */
  1823. XEXTERN char_u *p_fp    INIT(= (char_u *)"");            /* name of format program */
  1824. XEXTERN int    p_gd    INIT(= FALSE);        /* /g is default for :s */
  1825. X#ifdef MSDOS
  1826. XEXTERN int    p_gr    INIT(= TRUE);        /* display graphic characters */
  1827. X#else
  1828. XEXTERN int    p_gr    INIT(= FALSE);        /* display graphic characters */
  1829. X#endif
  1830. XEXTERN int    p_icon    INIT(= FALSE);        /* put file name in icon if possible */
  1831. XEXTERN long p_hi    INIT(= 20);            /* command line history size */
  1832. XEXTERN char_u *p_hf    INIT(= (char_u *)VIM_HLP);    /* name of help file */
  1833. XEXTERN int    p_hid    INIT(= FALSE);        /* buffers can be hidden */
  1834. XEXTERN char_u *p_hl    INIT(= (char_u *)"db,es,hs,rs,vi,si");
  1835. X                                        /* which highlight mode to use */
  1836. XEXTERN int    p_ic    INIT(= FALSE);        /* ignore case in searches */
  1837. XEXTERN int    p_im    INIT(= FALSE);        /* start editing in input mode */
  1838. XEXTERN int    p_wi    INIT(= FALSE);        /* inversion of text is weird */
  1839. XEXTERN char_u *p_kp    INIT(= (char_u *)"ref");        /* keyword program */
  1840. XEXTERN int    p_js    INIT(= TRUE);        /* use two spaces after period with Join */
  1841. XEXTERN long    p_ls    INIT(= 1);            /* last window has status line */
  1842. XEXTERN int    p_magic INIT(= TRUE);        /* use some characters for reg exp */
  1843. XEXTERN char_u *p_mp    INIT(= (char_u *)"make");        /* program for :make command */
  1844. XEXTERN long p_mm    INIT(= MAXMEM);        /* maximal amount of memory for buffer */
  1845. XEXTERN long p_mmt    INIT(= MAXMEMTOT);    /* maximal amount of memory for Vim */
  1846. XEXTERN long p_mls    INIT(= 5);            /* number of mode lines */
  1847. X#ifdef COMPATIBLE
  1848. XEXTERN int    p_more    INIT(= FALSE);        /* wait when screen full when listing */
  1849. X#else
  1850. XEXTERN int    p_more    INIT(= TRUE);        /* wait when screen full when listing */
  1851. X#endif
  1852. XEXTERN int    p_nb    INIT(= FALSE);        /* screen output not buffered (for testing) */
  1853. XEXTERN int    p_paste    INIT(= FALSE);        /* paste mode */
  1854. X#ifdef AMIGA
  1855. XEXTERN char_u *p_path    INIT(= (char_u *)".");    /* path for "]f" and "^Wf" */
  1856. X#else
  1857. X# ifdef MSDOS
  1858. XEXTERN char_u *p_path    INIT(= (char_u *)".");    /* path for "]f" and "^Wf" */
  1859. X# else
  1860. XEXTERN char_u *p_path    INIT(= (char_u *)". /usr/include");    /* path for "]f" and "^Wf" */
  1861. X# endif
  1862. X#endif
  1863. XEXTERN char_u *p_pm INIT(= (char_u *)"");  /* patchmode file suffix */
  1864. XEXTERN char_u *p_para    INIT(= (char_u *)"IPLPPPQPP LIpplpipbp");        /* paragraphs */
  1865. XEXTERN int    p_remap    INIT(= TRUE);        /* remap */
  1866. XEXTERN long    p_report    INIT(= 2);        /* minimum number of lines for report */
  1867. XEXTERN int    p_ru    INIT(= FALSE);        /* show column/line number */
  1868. XEXTERN int    p_ri    INIT(= FALSE);        /* reverse direction of insert */
  1869. XEXTERN int    p_secure    INIT(= FALSE);    /* do .exrc and .vimrc in secure mode */
  1870. XEXTERN long    p_sj    INIT(= 1);            /* scroll jump size */
  1871. XEXTERN char_u *p_sections    INIT(= (char_u *)"SHNHH HUnhsh");        /* sections */
  1872. X#ifdef MSDOS
  1873. XEXTERN char_u *p_sh     INIT(= (char_u *)"command");        /* name of shell to use */
  1874. X#else
  1875. X# ifdef ARCHIE
  1876. XEXTERN char_u *p_sh     INIT(= (char_u *)"gos");    /* name of shell to use */
  1877. X# else
  1878. XEXTERN char_u *p_sh     INIT(= (char_u *)"sh");        /* name of shell to use */
  1879. X# endif
  1880. X#endif
  1881. X#ifdef UNIX
  1882. X# ifdef ARCHIE
  1883. XEXTERN char_u *p_sp    INIT(= (char_u *)"2>");        /* string for output of make */
  1884. X# else
  1885. XEXTERN char_u *p_sp    INIT(= (char_u *)"| tee");    /* string for output of make */
  1886. X# endif
  1887. X#else
  1888. XEXTERN char_u *p_sp    INIT(= (char_u *)">");        /* string for output of make */
  1889. X#endif
  1890. XEXTERN long    p_ss    INIT(= 0);            /* sideways scrolling offset */
  1891. XEXTERN long    p_st    INIT(= 0);            /* type of shell */
  1892. XEXTERN int    p_sr    INIT(= FALSE);        /* shift round off (for < and >) */
  1893. XEXTERN int    p_sb    INIT(= FALSE);        /* split window backwards */
  1894. X#if defined(COMPATIBLE) || defined(UNIX)
  1895. XEXTERN int    p_sc    INIT(= FALSE);        /* show command in status line */
  1896. X#else
  1897. XEXTERN int    p_sc    INIT(= TRUE);        /* show command in status line */
  1898. X#endif
  1899. XEXTERN int    p_sm    INIT(= FALSE);        /* showmatch */
  1900. X#if defined(COMPATIBLE)
  1901. XEXTERN int    p_smd    INIT(= FALSE);        /* show mode */
  1902. X#else
  1903. XEXTERN int    p_smd    INIT(= TRUE);        /* show mode */
  1904. X#endif
  1905. XEXTERN int    p_sta    INIT(= FALSE);        /* smart-tab for expand-tab */
  1906. XEXTERN char_u *p_su    INIT(= (char_u *)".bak.o.h.info.swp");    /* suffixes for wildcard expansion */
  1907. XEXTERN long p_tl    INIT(= 0);            /* used tag length */
  1908. XEXTERN char_u *p_tags    INIT(= (char_u *)"tags");        /* tags search path */
  1909. X#if defined(COMPATIBLE)
  1910. XEXTERN int    p_ta    INIT(= FALSE);        /* auto textmode detection */
  1911. X#else
  1912. XEXTERN int    p_ta    INIT(= TRUE);        /* auto textmode detection */
  1913. X#endif
  1914. XEXTERN int    p_terse    INIT(= FALSE);        /* terse messages */
  1915. XEXTERN int    p_tf    INIT(= FALSE);        /* terminal fast I/O */
  1916. XEXTERN int    p_to    INIT(= FALSE);        /* tilde is an operator */
  1917. X#if defined(COMPATIBLE)
  1918. XEXTERN int    p_tr    INIT(= FALSE);        /* tag file name is relative */
  1919. X#else
  1920. XEXTERN int    p_tr    INIT(= TRUE);        /* tag file name is relative */
  1921. X#endif
  1922. XEXTERN int    p_timeout    INIT(= TRUE);    /* mappings entered within one second */
  1923. XEXTERN long p_tm    INIT(= 1000);        /* timeoutlen (msec) */
  1924. X#ifdef NOTITLE
  1925. XEXTERN int    p_title    INIT(= FALSE);        /* set window title if possible */
  1926. X#else
  1927. XEXTERN int    p_title    INIT(= TRUE);        /* set window title if possible */
  1928. X#endif
  1929. XEXTERN int    p_ttimeout    INIT(= FALSE);    /* key codes entered within one second */
  1930. X#ifdef COMPATIBLE
  1931. XEXTERN long p_ul    INIT(= 0);            /* number of Undo Levels */
  1932. XEXTERN long p_uc    INIT(= 0);            /* update count for swap file */
  1933. X#else
  1934. XEXTERN long p_ul    INIT(= 100);        /* number of Undo Levels */
  1935. XEXTERN long p_uc    INIT(= 200);        /* update count for swap file */
  1936. X#endif
  1937. XEXTERN long p_ut    INIT(= 4000);        /* update time for swap file */
  1938. XEXTERN int    p_vb    INIT(= FALSE);        /* visual bell only (no beep) */
  1939. XEXTERN int    p_warn    INIT(= TRUE);        /* warn for changes at shell command */
  1940. XEXTERN int    p_ws    INIT(= TRUE);        /* wrap scan */
  1941. X#ifdef COMPATIBLE
  1942. XEXTERN long    p_ww    INIT(= 0);            /* which keys wrap to next/prev line */
  1943. X#else
  1944. XEXTERN long    p_ww    INIT(= 3);            /* which keys wrap to next/prev line */
  1945. X#endif
  1946. X#ifdef COMPATIBLE
  1947. XEXTERN long    p_wc    INIT(= Ctrl('E'));    /* character for wildcard exapansion */
  1948. X#else
  1949. XEXTERN long    p_wc    INIT(= TAB);        /* character for wildcard exapansion */
  1950. X#endif
  1951. XEXTERN long    p_wh    INIT(= 0);            /* desired window height */
  1952. XEXTERN int    p_wa    INIT(= FALSE);        /* write any */
  1953. X#if defined(COMPATIBLE) || defined(NOBACKUP)
  1954. XEXTERN int    p_wb    INIT(= FALSE);        /* write backup files */
  1955. X#else
  1956. XEXTERN int    p_wb    INIT(= TRUE);        /* write backup files */
  1957. X#endif
  1958. XEXTERN int    p_ye    INIT(= FALSE);        /* Y yanks to end of line */
  1959. END_OF_FILE
  1960.   if test 8458 -ne `wc -c <'vim/src/param.h'`; then
  1961.     echo shar: \"'vim/src/param.h'\" unpacked with wrong size!
  1962.   fi
  1963.   # end of 'vim/src/param.h'
  1964. fi
  1965. if test -f 'vim/src/unix.h' -a "${1}" != "-c" ; then 
  1966.   echo shar: Will not clobber existing file \"'vim/src/unix.h'\"
  1967. else
  1968.   echo shar: Extracting \"'vim/src/unix.h'\" \(3085 characters\)
  1969.   sed "s/^X//" >'vim/src/unix.h' <<'END_OF_FILE'
  1970. X/* vi:ts=4:sw=4
  1971. X *
  1972. X * VIM - Vi IMproved        by Bram Moolenaar
  1973. X *
  1974. X * Read the file "credits.txt" for a list of people who contributed.
  1975. X * Read the file "uganda.txt" for copying and usage conditions.
  1976. X */
  1977. X
  1978. X/*
  1979. X * Unix system-dependent filenames
  1980. X */
  1981. X
  1982. X#ifndef SYSEXRC_FILE
  1983. X# define SYSEXRC_FILE    "$HOME/.exrc"
  1984. X#endif
  1985. X
  1986. X#ifndef SYSVIMRC_FILE
  1987. X# define SYSVIMRC_FILE    "$HOME/.vimrc"
  1988. X#endif
  1989. X
  1990. X#ifndef EXRC_FILE
  1991. X# define EXRC_FILE        ".exrc"
  1992. X#endif
  1993. X
  1994. X#ifndef VIMRC_FILE
  1995. X# define VIMRC_FILE        ".vimrc"
  1996. X#endif
  1997. X
  1998. X#ifndef DEFVIMRC_FILE
  1999. X# define DEFVIMRC_FILE    "/usr/local/etc/vimrc"
  2000. X#endif
  2001. X
  2002. X#ifndef VIM_HLP
  2003. X# define VIM_HLP        "/usr/local/lib/vim.hlp"
  2004. X#endif
  2005. X
  2006. X#ifndef BACKUPDIR
  2007. X# define BACKUPDIR        "$HOME"
  2008. X#endif
  2009. X
  2010. X#ifndef DEF_DIR
  2011. X# define DEF_DIR        "/tmp"
  2012. X#endif
  2013. X
  2014. X#define TMPNAME1        "/tmp/viXXXXXX"
  2015. X#define TMPNAME2        "/tmp/voXXXXXX"
  2016. X#define TMPNAMELEN        15
  2017. X
  2018. X#ifndef MAXMEM
  2019. X# define MAXMEM            512            /* use up to 512Kbyte for buffer */
  2020. X#endif
  2021. X#ifndef MAXMEMTOT
  2022. X# define MAXMEMTOT        2048        /* use up to 2048Kbyte for Vim */
  2023. X#endif
  2024. X
  2025. X#define BASENAMELEN        (MAXNAMLEN - 5)
  2026. X
  2027. X#define stricmp vim_stricmp
  2028. X
  2029. X/*
  2030. X * prototypes for functions not in unix.c
  2031. X */
  2032. X#ifdef SCO
  2033. Xint        chmod __ARGS((const char *, mode_t));
  2034. X#endif
  2035. X#if !defined(linux) && !defined(__NeXT) && !defined(M_UNIX) && !defined(ISC) && !defined(USL) && !defined(SOLARIS)
  2036. Xint        remove __ARGS((const char *));
  2037. X/*
  2038. X * If you get an error message on "const" in the lines above, try
  2039. X * adding "-Dconst=" to the options in the makefile.
  2040. X */
  2041. X
  2042. X# if 0        /* should be in unistd.h */
  2043. Xvoid    sleep __ARGS((int));
  2044. X# endif
  2045. X
  2046. Xint        rename __ARGS((const char *, const char *));
  2047. X#endif
  2048. X
  2049. Xint        stricmp __ARGS((char *, char *));
  2050. X
  2051. X/* memmove is not present on all systems, use our own version or bcopy */
  2052. X#if !defined(SCO) && !defined(SOLARIS) && !defined(AIX) && !defined(UTS4) && !defined(USL) && !defined(MIPS) && !defined(__NetBSD__) && !defined(__FreeBSD__) && !defined(linux) && !defined(UNISYS)
  2053. X# ifdef SYSV_UNIX
  2054. X#   define MEMMOVE
  2055. Xvoid *memmove __ARGS((void *, void *, int));
  2056. X# else
  2057. X#  define memmove(to, from, len) bcopy(from, to, len)
  2058. X#  if !(defined(hpux) && defined(__STDC__))
  2059. X#   ifdef linux
  2060. Xextern void bcopy __ARGS((const void *, void *, int));
  2061. X#   else
  2062. Xextern void bcopy __ARGS((char *, char *, int));
  2063. X#   endif
  2064. X#  endif
  2065. X# endif
  2066. X#endif
  2067. X
  2068. X#if defined(BSD_UNIX) && !defined(__STDC__)
  2069. X# define strchr(ptr, c)            index((ptr), (c))
  2070. X# define strrchr(ptr, c)        rindex((ptr), (c))
  2071. X#endif
  2072. X
  2073. X#ifdef BSD_UNIX
  2074. X# define memset(ptr, c, size)    bsdmemset((ptr), (c), (size))
  2075. Xchar *bsdmemset __ARGS((char *, int, long));
  2076. X#endif
  2077. X
  2078. X/*
  2079. X * Most unixes don't have these in include files.
  2080. X * If you get a "redefined" error, delete the offending line.
  2081. X */
  2082. X#if !defined(__NetBSD__) && !defined(__FreeBSD__)
  2083. X  extern int    ioctl __ARGS((int, int, ...));
  2084. X#endif
  2085. Xextern int    fsync __ARGS((int));
  2086. Xextern char *getwd __ARGS((char *));
  2087. X#if !defined(__NetBSD__) && !defined(__FreeBSD__)
  2088. X# ifdef linux
  2089. X   extern void bzero __ARGS((void *, int));
  2090. X# else
  2091. X   extern void bzero __ARGS((char *, int));
  2092. X# endif
  2093. X#endif
  2094. X#if defined(system_that_does_not_have_access_in_an_include_file)
  2095. Xextern int access __ARGS((char *, int));
  2096. X#endif
  2097. END_OF_FILE
  2098.   if test 3085 -ne `wc -c <'vim/src/unix.h'`; then
  2099.     echo shar: \"'vim/src/unix.h'\" unpacked with wrong size!
  2100.   fi
  2101.   # end of 'vim/src/unix.h'
  2102. fi
  2103. if test -f 'vim/termcap' -a "${1}" != "-c" ; then 
  2104.   echo shar: Will not clobber existing file \"'vim/termcap'\"
  2105. else
  2106.   echo shar: Extracting \"'vim/termcap'\" \(2694 characters\)
  2107.   sed "s/^X//" >'vim/termcap' <<'END_OF_FILE'
  2108. X#
  2109. X#    Demonstration of a termcap file
  2110. X#
  2111. Xsx|ansi|any ansi terminal with pessimistic assumptions:\
  2112. X    :co#80:li#24:cl=50\E[;H\E[2J:bs:am:cm=\E[%i%d;%dH:\
  2113. X    :nd=\E[C:up=\E[A:ce=\E[K:ho=\E[H:pt:
  2114. XMu|sun|Sun Microsystems Workstation console:\
  2115. X    :am:bs:km:mi:ms:pt:li#34:co#80:cl=^L:cm=\E[%i%d;%dH:\
  2116. X    :ce=\E[K:cd=\E[J:\
  2117. X    :so=\E[7m:se=\E[m:us=\E[4m:ue=\E[m:rs=\E[s:\
  2118. X    :md=\E[1m:mr=\E[7m:me=\E[m:\
  2119. X    :al=\E[L:dl=\E[M:im=:ei=:ic=\E[@:dc=\E[P:\
  2120. X    :AL=\E[%dL:DL=\E[%dM:IC=\E[%d@:DC=\E[%dP:\
  2121. X    :up=\E[A:nd=\E[C:ku=\E[A:kd=\E[B:kr=\E[C:kl=\E[D:\
  2122. X    :k1=\E[224z:k2=\E[225z:k3=\E[226z:k4=\E[227z:k5=\E[228z:\
  2123. X    :k6=\E[229z:k7=\E[230z:k8=\E[231z:k9=\E[232z:
  2124. XM-|sun-e|sun-nic|sune|Sun Microsystems Workstation without insert character:\
  2125. X    :ic@:im@:ei@:tc=sun:
  2126. XMu|sun-s|Sun Microsystems Workstation window with status line:\
  2127. X    :hs:ts=\E]l:fs=\E\\:ds=\E]l\E\\:tc=sun:
  2128. XMu|sun-e-s|sun-s-e|Sun Microsystems Workstation with status hacked for emacs:\
  2129. X    :hs:ts=\E]l:fs=\E\\:ds=\E]l\E\\:tc=sun-e:
  2130. XM0|sun-48|Sun 48-line window:\
  2131. X    :li#48:co#80:tc=sun:
  2132. XM1|sun-34|Sun 34-line window:\
  2133. X    :li#34:co#80:tc=sun:
  2134. XM2|sun-24|Sun 24-line window:\
  2135. X    :li#24:co#80:tc=sun:
  2136. XM3|sun-17|Sun 17-line window:\
  2137. X    :li#17:co#80:tc=sun:
  2138. Xv9|925a|tvi925a|TeleVideo Model 925:\
  2139. X    :al=\EE:am:bs:bt=\EI:bw:cd=\EY:ce=\ET:cl=^Z:cm=\E=%+ %+ :co#80:dc=\EW:\
  2140. X    :dl=\ER:do=^V:ei=:ic=\EQ:if=/usr/share/lib/tabset/std:im=:kb=^H:kd=^V:\
  2141. X    :kh=^^:kl=^H:kn#12:kr=^L:ku=^K:li#24:nd=^L:pt:se=\EG0:sg#1:so=\EG4:\
  2142. X    :ue=\EG0:ug#1:ul:up=^K:us=\EG8:is=\El\
  2143. X    :vb=\Eb\200\200\200\200\200\200\200\200\200\200\200\200\200\200\Ed:\
  2144. X    :ve=\E.4:vs=\E.2:
  2145. Xd0|vt100|vt100-am|vt100am|dec vt100:\
  2146. X    :do=^J:co#80:li#24:cl=50\E[;H\E[2J:sf=5\ED:\
  2147. X    :le=^H:bs:am:cm=5\E[%i%d;%dH:nd=2\E[C:up=2\E[A:\
  2148. 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:\
  2149. X    :md=2\E[1m:mr=2\E[7m:mb=2\E[5m:me=2\E[m:is=\E[1;24r\E[24;1H:\
  2150. X    :rf=/usr/share/lib/tabset/vt100:\
  2151. X    :rs=\E>\E[?3l\E[?4l\E[?5l\E[?7h\E[?8h:ks=\E[?1h\E=:ke=\E[?1l\E>:\
  2152. X    :ku=\EOA:kd=\EOB:kr=\EOC:kl=\EOD:kb=^H:\
  2153. X    :ho=\E[H:k1=\EOP:k2=\EOQ:k3=\EOR:k4=\EOS:pt:sr=5\EM:vt#3:xn:\
  2154. X    :sc=\E7:rc=\E8:cs=\E[%i%d;%dr:
  2155. X# Amiga termcap by Bram Moolenaar
  2156. XAA|amiga|Amiga ANSI:\
  2157. X    :co#80:li#25:am:do=\E[B:ce=\E[K:cd=\E[J:\
  2158. X    :cl=\014:ku=\233A:kd=\233B:kl=\233D:kr=\233C:kb=^H:\
  2159. X    :#4=\233 A:%i=\233 @:%1=\233?~:\
  2160. X    :k1=\2330~:k2=\2331~:k3=\2332~:k4=\2333~:k5=\2334~:\
  2161. X    :k6=\2335~:k7=\2336~:k8=\2337~:k9=\2338~:k;=\2339~:\
  2162. X    :F1=\23310~:F2=\23311~:F3=\23312~:F4=\23313~:F5=\23314~:\
  2163. X    :F6=\23315~:F7=\23316~:F8=\23317~:F9=\23318~:FA=\23319~:\
  2164. X    :al=\E[L:AL=\E[%dL:dl=\E[M:DL=\E[%dM:le=^H:cm=\E[%i%d;%dH:\
  2165. X    :nd=\E[C:RI=\E[%dC:up=\E[A:\
  2166. X    :ce=\E[K:ho=\E[H:dc=\E[P:ic=\E[@:vi=\E[0 p:ve=\E[1 p:\
  2167. X    :so=\E[2m:se=\E[m:us=\E[4m:ue=\E[m:mr=\E[7m:mb=\E[7;2m:me=\E[m:
  2168. X#
  2169. X# END OF TERMCAP
  2170. X#
  2171. END_OF_FILE
  2172.   if test 2694 -ne `wc -c <'vim/termcap'`; then
  2173.     echo shar: \"'vim/termcap'\" unpacked with wrong size!
  2174.   fi
  2175.   # end of 'vim/termcap'
  2176. fi
  2177. echo shar: End of archive 24 \(of 26\).
  2178. cp /dev/null ark24isdone
  2179. MISSING=""
  2180. 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
  2181.     if test ! -f ark${I}isdone ; then
  2182.     MISSING="${MISSING} ${I}"
  2183.     fi
  2184. done
  2185. if test "${MISSING}" = "" ; then
  2186.     echo You have unpacked all 26 archives.
  2187.     rm -f ark[1-9]isdone ark[1-9][0-9]isdone
  2188. else
  2189.     echo You still must unpack the following archives:
  2190.     echo "        " ${MISSING}
  2191. fi
  2192. exit 0
  2193. exit 0 # Just in case...
  2194.