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

  1. From: mool@oce.nl (Bram Moolenaar)
  2. Newsgroups: comp.sources.misc
  3. Subject: v44i041:  vim - Vi IMproved editor, v3.0, Part22/26
  4. Date: 18 Aug 1994 14:03:38 -0500
  5. Organization: Sterling Software
  6. Sender: kent@sparky.sterling.com
  7. Approved: kent@sparky.sterling.com
  8. Message-ID: <330baa$e8a@sparky.sterling.com>
  9. X-Md4-Signature: 254dc41cb343615556e26666c40f9dd6
  10.  
  11. Submitted-by: mool@oce.nl (Bram Moolenaar)
  12. Posting-number: Volume 44, Issue 41
  13. Archive-name: vim/part22
  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/.exrc vim/doc/index vim/src/cmdcmds.c vim/src/cmdtab.h
  22. #   vim/src/digraph.c.UU vim/src/makefile.nt vim/src/tag.c
  23. # Wrapped by kent@sparky on Mon Aug 15 21:44:13 1994
  24. PATH=/bin:/usr/bin:/usr/ucb:/usr/local/bin:/usr/lbin:$PATH ; export PATH
  25. echo If this archive is complete, you will see the following message:
  26. echo '          "shar: End of archive 22 (of 26)."'
  27. if test -f 'vim/.exrc' -a "${1}" != "-c" ; then 
  28.   echo shar: Will not clobber existing file \"'vim/.exrc'\"
  29. else
  30.   echo shar: Extracting \"'vim/.exrc'\" \(30 characters\)
  31.   sed "s/^X//" >'vim/.exrc' <<'END_OF_FILE'
  32. Xset ai bs=2 shell=csh nojs ru
  33. END_OF_FILE
  34.   if test 30 -ne `wc -c <'vim/.exrc'`; then
  35.     echo shar: \"'vim/.exrc'\" unpacked with wrong size!
  36.   fi
  37.   # end of 'vim/.exrc'
  38. fi
  39. if test -f 'vim/doc/index' -a "${1}" != "-c" ; then 
  40.   echo shar: Will not clobber existing file \"'vim/doc/index'\"
  41. else
  42.   echo shar: Extracting \"'vim/doc/index'\" \(12449 characters\)
  43.   sed "s/^X//" >'vim/doc/index' <<'END_OF_FILE'
  44. Xindex of vim commands for
  45. X 1. insert mode
  46. X 2. VI commands (normal mode)
  47. X 3. command line editing
  48. X 4. EX commands
  49. X
  50. X(for an overview of options see the end of reference.doc)
  51. X
  52. X1. INSERT MODE
  53. X==============
  54. X
  55. Xchar        action
  56. X-----------------------------------------------------------------------
  57. X^@        insert previously inserted text and stop insert {vi: up to 128
  58. X        chars}
  59. X^A        insert previously inserted text {not in Vi}
  60. X^B        toggle 'revins' option.
  61. X^C        quit insert mode, without checking for abbreviation.
  62. X^D        delete one shiftwidth of indent in the current line {vi: 
  63. X        only after auto-indent}
  64. X        when preceded with <0> or <^>, delete all indent, with <^>
  65. X        restore it in the next line
  66. X^E        insert the character which is below the cursor
  67. X^H <BS>        delete character before the cursor {vi: does not cross lines,
  68. X        does not delete autoindents}
  69. X^J <LF>        begin new line
  70. X^K {char1} {char2} enter digraph (only when compiled with it) {vi: no digraphs}
  71. X^M <CR>        begin new line
  72. X^N        find next match for keyword in front of the cursor
  73. X^O        execute a single command and return to insert mode
  74. X^P        find previous match for keyword in front of the cursor
  75. X^R <0-9a-z"%:>    insert contents of register <0-9a-z"%:> {not in vi}
  76. X^T        insert one shiftwidth of indent in current line {vi: only in 
  77. X        autoindent}
  78. X^U        delete all entered characters in the current line
  79. X^V        insert next non-digit literally, insert three digit decimal 
  80. X        number as a single byte.
  81. X^W        delete word before the cursor
  82. X^Y        insert the character which is above the cursor
  83. X^[ <ESC>    end insert mode
  84. X<DEL>        same as ^H <BS>
  85. X<C_UP>        cursor one line up
  86. X<C_DOWN>    cursor one line down
  87. X<C_LEFT>    cursor one character left
  88. X<C_RIGHT>    cursor one character right
  89. X<SC_UP>        one screenfull backward
  90. X<SC_DOWN>    one screenfull forward
  91. X<SC_LEFT>    cursor one word left
  92. X<SC_RIGHT>    cursor one word right
  93. X{char1}<BS>{char2} enter digraph (only when compiled with it and 'digraph' 
  94. X        option set) {vi: no digraphs}
  95. X
  96. X
  97. X2. VI COMMANDS
  98. X==============
  99. X
  100. XCHAR means non-blank char
  101. XWORD means sequences of non-blank chars
  102. XN is number entered before the command
  103. X<move> is a cursor movement command
  104. XNmove is the text that is moved over with a cursor movement command
  105. XSECTION is a section that possibly starts with '}' instead of '{'
  106. X
  107. Xnote: 1 = cursor movement command; 2 = can be undone/redone
  108. X
  109. Xchar        note    vim normal mode (vi: what the unix vi does)
  110. X------------------------------------------------------------------------------
  111. X^@            error
  112. X^A        2    add N to number at/after cursor {vi: no ^A}
  113. X^B        1    scroll N screens Backwards
  114. X^C            interrupt current (search) command
  115. X^D            scroll Down N lines (default: half a screen)
  116. X^E            scroll N lines upwards (N lines Extra)
  117. X^F        1    scroll N screens Forward
  118. X^G            display current file name and position
  119. X^H <BS>        1    cursor N chars to the left
  120. X^I <TAB>    1    go to N newer entry in jump list
  121. X^J <LF>        1    cursor N lines downward
  122. X^K            error
  123. X^L            redraw screen
  124. X^M <CR>        1    cursor to the first CHAR N lines lower
  125. X^N        1    cursor N lines downward
  126. X^O        1    go to N older entry in jump list
  127. X^P        1    cursor N lines upward
  128. X^Q            error (used for xon/xoff)
  129. X^R        2    redo changes which were undone with 'u' (vi: retype
  130. X            the screen)
  131. X^S            error (used for xon/xoff)
  132. X^T            jump to N older Tag in tag list
  133. X^U            scroll N lines Upwards (default: half a screen)
  134. X^V            start blockwise Visual (vi: no Visual)
  135. X^W            window commands, followed by another character (vi: not)
  136. X^X        2    subtract N from number at/after cursor {vi: no ^X}
  137. X^Y            scroll N lines downwards
  138. X^Z            suspend program (or start new shell)
  139. X^[ <ESC>        error
  140. X^\            error
  141. X^]            :ta to ident under cursor
  142. X^^            edit Nth alternate file (equivalent to :e #N)
  143. X^_            error
  144. X
  145. X<SPACE>        1    cursor N chars to the right
  146. X!<move><filter>        filter Nmove text through the "filter" command
  147. X!!<filter>        filter N lines through the "filter" command
  148. X"<a-zA-Z0-9.>        use buffer <a-zA-Z0-9.> for next delete, yank or put
  149. X            (upper case to append)(<.> only works for put)
  150. X#        1    search backward for the Nth occurrence of the ident under
  151. X            the cursor {not in vi}
  152. X$        1    cursor to the end of line N from the cursor
  153. X%        1    find the next (curly/square) bracket on this line and go
  154. X            to its match. With count: go to N percentage in the file.
  155. X&        2    repeat last :s
  156. X'<a-zA-Z>    1    cursor to the first CHAR on the line with mark <a-zA-Z>
  157. X'[        1    cursor to the first CHAR on the line of the start of 
  158. X            last operated text or start of putted text
  159. X']        1    cursor to the first CHAR on the line of the end of 
  160. X            last operated text or end of putted text
  161. X''        1    cursor to the first CHAR of the line where the cursor was
  162. X            before the latest jump.
  163. X(        1    cursor N sentences backward
  164. X)        1    cursor N sentences forward
  165. X*        1    search forward for the Nth occurrence of the ident under
  166. X            the cursor {not in vi}
  167. X+        1    cursor to the first CHAR N lines lower
  168. X,        1    repeat latest f, t, F or T in opposite direction N times
  169. X-        1    cursor to the first CHAR N lines higher
  170. X.        2    repeat last change with count replaced by N
  171. X/<pattern>    1    search forward for the Nth occurrence of <pattern>
  172. X0        1    cursor to the first char of the line
  173. X1            prepend to command to give a count
  174. X2            "
  175. X3            "
  176. X4            "
  177. X5            "
  178. X6            "
  179. X7            "
  180. X8            "
  181. X9            "
  182. X:            Ex command (see below)        
  183. X;        1    repeat latest f, t, F or T N times
  184. X<<move>        2    shift the Nmove lines one shiftwidth leftwards
  185. X<<        2    shift N lines one shiftwidth leftwards
  186. X=<move>        2    filter Nmove lines through "indent" (vi: when option
  187. X            'lisp' is set autoindent Nmove lines)
  188. X==        2    filter N lines through "indent"
  189. X><move>        2    shift Nmove lines one shiftwidth rightwards
  190. X>>        2    shift N lines one shiftwidth rightwards
  191. X?<pattern>    1    search backward for the Nth previous occurrence of
  192. X            <pattern>
  193. X@<a-z>        2    execute the contents of named buffer <a-z> N times
  194. X@@        2    repeat the previous @<a-z> N times
  195. XA        2    append text at the end of the line N times
  196. XB        1    cursor N WORDS backward
  197. X<"x>C        2    change from the cursor position to the end of the line,
  198. X            and N-1 more lines [into buffer x]; synonym for c$
  199. X<"x>D        2    delete the characters under the cursor until the end of
  200. X            the line and N-1 more lines [into buffer x]; synonym for d$
  201. XE        1    cursor forward to the end of WORD N
  202. XF<char>            cursor to the Nth occurrence of <char> to the left
  203. XG        1    cursor to line N, default last line
  204. XH        1    cursor to line N from top of screen
  205. XI        2    insert text before the first CHAR on the line N times
  206. XJ        2    Join N lines; default is 2
  207. XK            lookup Keyword under the cursor with 'keywordprg'
  208. XL        1    cursor to line N from bottom of screen
  209. XM        1    cursor to middle line of screen
  210. XN        1    repeat the latest '/' or '?' N times in opposite
  211. X            direction
  212. XO        2    begin a new line above the cursor and insert text, repeat
  213. X            N times (vi: blank N screen lines)
  214. X<"x>P        2    put the text [from buffer x] before the cursor N times
  215. XV            start Visual mode on lines (vi: go to Ex mode)
  216. XR        2    enter replace mode: overtype existing characters, repeat the
  217. X            entered text N-1 times
  218. X<"x>S        2    delete N lines [into buffer x] and start insert; synonym
  219. X            for ^cc or 0cc, depending on autoindent
  220. XT<char>        1    cursor till after Nth occurrence of <char> to the left
  221. XU        2    undo all latest changes on one line (vi: while not moved
  222. X            off of it)
  223. X            While in Visual mode: make uppercase
  224. XQ<move>        2    Join N lines and re-format them
  225. XW        1    cursor N WORDS forward
  226. X<"x>X        2    delete N characters before the cursor [into buffer x]
  227. X<"x>Y            yank N lines [into buffer x]; synonym for yy
  228. XZZ            store current file, if modified, and exit        
  229. X[[        1    cursor N sections backward
  230. X[]        1    cursor N SECTIONS backward
  231. X[{        1    cursor N times back to unmatched '{' (vi: not)
  232. X[(        1    cursor N times back to unmatched '(' (vi: not)
  233. X[f            edit file name under the cursor
  234. X[p        2    like "p", but adjust indent to current line
  235. X\            error
  236. X]]        1    cursor N sections forward
  237. X][        1    cursor N SECTIONS forward
  238. X]}        1    cursor N times forward to unmatched '}' (vi: not)
  239. X])        1    cursor N times forward to unmatched ')' (vi: not)
  240. X]f            edit file name under the cursor
  241. X]p        2    like "P", but adjust indent to current line
  242. X^        1    cursor to the first CHAR of the line
  243. X_        1    cursor to the first CHAR N - 1 lines lower
  244. X`<a-zA-Z>    1    cursor to the mark <a-zA-Z>
  245. X`[        1    cursor to the start of last operated text or start of 
  246. X            putted text
  247. X`]        1    cursor to the end of last operated text or end of 
  248. X            putted text
  249. X``        1    cursor to the position before latest jump
  250. Xa        2    append text after the cursor N times
  251. Xb        1    cursor N words backward
  252. X<"x>c<move>    2    delete Nmove text [into buffer x] and start insert
  253. X<"x>cc        2    delete N lines [into buffer x] and start insert
  254. X<"x>d<move>    2    delete Nmove text [into buffer x]
  255. X<"x>dd        2    delete N lines [into buffer x]
  256. Xe        1    cursor forward to the end of word N
  257. Xf<char>        1    cursor to Nth occurrence of <char> to the right
  258. Xgs            goto sleep for N seconds (default 1) (vi: not)
  259. Xgf            edit file name under the cursor
  260. Xh        1    cursor N chars to the left
  261. Xi        2    insert text before the cursor N times
  262. Xj        1    cursor N lines downward
  263. Xk        1    cursor N lines upward
  264. Xl        1    cursor N chars to the right
  265. Xm<a-z>            set mark <a-z> at cursor position        
  266. Xn        1    repeat the latest '/' or '?' N times
  267. Xo        2    begin a new line below the cursor and insert text, repeat
  268. X            N times (vi: blank N screen lines)
  269. X            While Visual: cursor moves other end
  270. X<"x>p        2    put the text [from buffer x] after the cursor N times
  271. Xv            start Visual mode with characters (vi: no Visual)
  272. Xr<char>        2    replace N chars by <char>
  273. X<"x>s        2    (substitute) delete N characters [into buffer x] and
  274. X            start insert
  275. Xt<char>        1    cursor till before Nth occurrence of <char> to the right
  276. Xu        2    undo changes (vi: only one level)
  277. X            With Visual: make lowercase (vi: no Visual)
  278. Xq<a-zA-Z>        record typed characters into named buffer <a-zA-Z>
  279. X            (upper case to append)
  280. Xq            stops recording (vi: no recording)
  281. Xw        1    cursor N words forward
  282. X<"x>x        2    delete N characters under and after the cursor [into
  283. X            buffer x]
  284. X<"x>y<move>        yank Nmove text [into buffer x]
  285. X<"x>yy            yank N lines [into buffer x]
  286. Xz<CR>            redraw, cursor line to top of window, first non-blank
  287. Xz.            redraw, cursor line to center of window, first non-blank
  288. Xz-            redraw, cursor line at bottom of window, first non-blank
  289. Xzb            redraw, cursor line at bottom of window
  290. Xzt            redraw, cursor line at top of window
  291. Xzz            redraw, cursor line at center of window
  292. X{        1    cursor N paragraphs backward
  293. X|        1    cursor to column N
  294. X}        1    cursor N paragraphs forward
  295. X~        2    option notildeop: switch case of N characters under
  296. X            cursor and move the cursor N characters to the right
  297. X            (vi: no count)
  298. X~<move>            option tildeop: switch case of Nmove text (vi: no tildeop
  299. X            option)
  300. X<DEL>            when entering a number: remove the last digit
  301. X<HELP>            show the file vim:vim.hlp page by page (vi: no help)
  302. X<C_UP>        1    move cursor N lines upwards
  303. X<C_DOWN>    1    move cursor N lines downwards
  304. X<C_LEFT>    1    move cursor N chars to the left
  305. X<C_RIGHT>    1    move cursor N chars to the right
  306. X<SC_UP>        1    scroll N screens Backwards (same as ^B)
  307. X<SC_DOWN>    1    scroll N screens Forwards (same as ^F)
  308. X<SC_LEFT>    1    cursor N words backward (same as b)
  309. X<SC_RIGHT>    1    cursor N words forward (same as w)
  310. X
  311. X
  312. X3. command line editing
  313. X=======================
  314. X
  315. XGet to the command line with the ':', '!', '/' or '?' commands.
  316. XNormal characters are inserted at the current cursor position.
  317. X(vi: can only alter last character in the line)
  318. X
  319. X^A        do filename completion on the pattern in front of the cursor
  320. X        and insert all matches
  321. X^B        cursor to begin of command line
  322. X^D        list filenames that match the pattern in front of the cursor
  323. X^E        cursor to end of command line
  324. X^H        delete the character in front of the cursor
  325. X^L        do filename completion on the pattern in front of the cursor
  326. X        and insert the longest common part
  327. X^N        after an <ESC> with multiple matches: go to next match
  328. X        otherwise: same as <C_DOWN>
  329. X^P        after an <ESC> with multiple matches: go to previous match
  330. X        otherwise: same as <C_UP>
  331. X^U        remove all characters
  332. X^V        insert next non-digit literally, insert three digit decimal 
  333. X        number as a single byte. {Vi: type the CTRL-V twice to get one}
  334. X^W        delete the word in front of the cursor
  335. X'wildchar' option (default <TAB>)
  336. X        do filename completion on the pattern in front of the cursor
  337. X<DEL>        delete the character under the cursor
  338. X<C_UP>        recall previous command line from history
  339. X<C_DOWN>    recall next command line from history
  340. X<C_LEFT>    cursor left
  341. X<C_RIGHT>    cursor right
  342. X<SC_LEFT>    cursor one word left
  343. X<SC_RIGHT>    cursor one word right
  344. X<SC_UP>        recall previous command line that matches pattern in front of
  345. X        the cursor
  346. X<SC_DOWN>    recall next command line that matches pattern in front of the
  347. X        cursor
  348. X
  349. X
  350. X4. EX commands
  351. X==============
  352. X
  353. XFor an index of EX commands, type CTRL-D at the ex command prompt.
  354. XOr look in "src/cmdtab.tab".
  355. X
  356. END_OF_FILE
  357.   if test 12449 -ne `wc -c <'vim/doc/index'`; then
  358.     echo shar: \"'vim/doc/index'\" unpacked with wrong size!
  359.   fi
  360.   # end of 'vim/doc/index'
  361. fi
  362. if test -f 'vim/src/cmdcmds.c' -a "${1}" != "-c" ; then 
  363.   echo shar: Will not clobber existing file \"'vim/src/cmdcmds.c'\"
  364. else
  365.   echo shar: Extracting \"'vim/src/cmdcmds.c'\" \(11550 characters\)
  366.   sed "s/^X//" >'vim/src/cmdcmds.c' <<'END_OF_FILE'
  367. X/* vi:ts=4:sw=4
  368. X *
  369. X * VIM - Vi IMproved        by Bram Moolenaar
  370. X *
  371. X * Read the file "credits.txt" for a list of people who contributed.
  372. X * Read the file "uganda.txt" for copying and usage conditions.
  373. X */
  374. X
  375. X/*
  376. X * cmdcmds.c: functions for command line commands
  377. X */
  378. X
  379. X#include "vim.h"
  380. X#include "globals.h"
  381. X#include "proto.h"
  382. X#include "param.h"
  383. X
  384. X#if defined(LATTICE) || defined(NT)
  385. X# define mktemp(a)    tmpnam(a)
  386. X#endif
  387. X
  388. Xextern char        *mktemp __ARGS((char *));
  389. X
  390. X/*
  391. X * align text:
  392. X * type = -1  left aligned
  393. X * type = 0   centered
  394. X * type = 1   right aligned
  395. X */
  396. X    void
  397. Xdo_align(start, end, width, type)
  398. X    linenr_t    start;
  399. X    linenr_t    end;
  400. X    int            width;
  401. X    int            type;
  402. X{
  403. X    FPOS    pos;
  404. X    int        len;
  405. X    int        indent = 0;
  406. X
  407. X    pos = curwin->w_cursor;
  408. X    if (type == -1)        /* left align: width is used for new indent */
  409. X    {
  410. X        if (width >= 0)
  411. X            indent = width;
  412. X    }
  413. X    else
  414. X    {
  415. X        /*
  416. X         * if 'textwidth' set, use it
  417. X         * else if 'wrapmargin' set, use it
  418. X         * if invalid value, use 80
  419. X         */
  420. X        if (width <= 0)
  421. X            width = curbuf->b_p_tw;
  422. X        if (width == 0 && curbuf->b_p_wm > 0)
  423. X            width = Columns - curbuf->b_p_wm;
  424. X        if (width <= 0)
  425. X            width = 80;
  426. X    }
  427. X
  428. X    if (!u_save((linenr_t)(start - 1), (linenr_t)(end + 1)))
  429. X        return;
  430. X    for (curwin->w_cursor.lnum = start; curwin->w_cursor.lnum <= end; ++curwin->w_cursor.lnum)
  431. X    {
  432. X        set_indent(indent, TRUE);                /* remove existing indent */
  433. X        if (type == -1)                            /* left align */
  434. X            continue;
  435. X        len = strsize(ml_get(curwin->w_cursor.lnum));        /* get line lenght */
  436. X        if (len < width)
  437. X            switch (type)
  438. X            {
  439. X            case 0:        set_indent((width - len) / 2, FALSE);    /* center */
  440. X                        break;
  441. X            case 1:        set_indent(width - len, FALSE);            /* right */
  442. X                        break;
  443. X            }
  444. X    }
  445. X    curwin->w_cursor = pos;
  446. X    beginline(TRUE);
  447. X    updateScreen(NOT_VALID);
  448. X}
  449. X
  450. X/*
  451. X * :move command - move lines line1-line2 to line n
  452. X *
  453. X * return FAIL for failure, OK otherwise
  454. X */
  455. X    int
  456. Xdo_move(line1, line2, n)
  457. X    linenr_t    line1;
  458. X    linenr_t    line2;
  459. X    linenr_t    n;
  460. X{
  461. X    char_u        *q;
  462. X    int            has_mark;
  463. X
  464. X    if (n >= line1 && n < line2 && line2 > line1)
  465. X    {
  466. X        EMSG("Move lines into themselves");
  467. X        return FAIL;
  468. X    }
  469. X
  470. X    /*
  471. X     * adjust line marks (global marks done below)
  472. X     * if the lines are moved down, the marks in the moved lines
  473. X     * move down and the marks in the lines between the old and
  474. X     * new position move up.
  475. X     * If the lines are moved up it is just the other way round
  476. X     */
  477. X    if (n >= line2)            /* move down */
  478. X    {
  479. X        mark_adjust(line1, line2, n - line2);
  480. X        mark_adjust(line2 + 1, n,  -(line2 - line1 + 1));
  481. X    }
  482. X    else                    /* move up */
  483. X    {
  484. X        mark_adjust(line1, line2, -(line1 - n - 1));
  485. X        mark_adjust(n + 1, line1 - 1, line2 - line1 + 1);
  486. X    }
  487. X
  488. X    if (n >= line1)
  489. X    {
  490. X        --n;
  491. X        curwin->w_cursor.lnum = n - (line2 - line1) + 1;
  492. X    }
  493. X    else
  494. X        curwin->w_cursor.lnum = n + 1;
  495. X    while (line1 <= line2)
  496. X    {
  497. X            /* this undo is not efficient, but it works */
  498. X        u_save(line1 - 1, line1 + 1);
  499. X        q = strsave(ml_get(line1));
  500. X        if (q != NULL)
  501. X        {
  502. X            /*
  503. X             * marks from global command go with the line
  504. X             */
  505. X            has_mark = ml_has_mark(line1);
  506. X            ml_delete(line1);
  507. X            u_save(n, n + 1);
  508. X            ml_append(n, q, (colnr_t)0, FALSE);
  509. X            free(q);
  510. X            if (has_mark)
  511. X                ml_setmarked(n + 1);
  512. X        }
  513. X        if (n < line1)
  514. X        {
  515. X            ++n;
  516. X            ++line1;
  517. X        }
  518. X        else
  519. X            --line2;
  520. X    }
  521. X    CHANGED;
  522. X    return OK;
  523. X}
  524. X
  525. X/*
  526. X * :copy command - copy lines line1-line2 to line n
  527. X */
  528. X    void
  529. Xdo_copy(line1, line2, n)
  530. X    linenr_t    line1;
  531. X    linenr_t    line2;
  532. X    linenr_t    n;
  533. X{
  534. X    linenr_t        lnum;
  535. X    char_u            *p;
  536. X
  537. X    mark_adjust(n + 1, MAXLNUM, line2 - line1 + 1);
  538. X
  539. X    /*
  540. X     * there are three situations:
  541. X     * 1. destination is above line1
  542. X     * 2. destination is between line1 and line2
  543. X     * 3. destination is below line2
  544. X     *
  545. X     * n = destination (when starting)
  546. X     * curwin->w_cursor.lnum = destination (while copying)
  547. X     * line1 = start of source (while copying)
  548. X     * line2 = end of source (while copying)
  549. X     */
  550. X    u_save(n, n + 1);
  551. X    curwin->w_cursor.lnum = n;
  552. X    lnum = line2 - line1 + 1;
  553. X    while (line1 <= line2)
  554. X    {
  555. X        /* need to use strsave() because the line will be unlocked
  556. X            within ml_append */
  557. X        p = strsave(ml_get(line1));
  558. X        if (p != NULL)
  559. X        {
  560. X            ml_append(curwin->w_cursor.lnum, p, (colnr_t)0, FALSE);
  561. X            free(p);
  562. X        }
  563. X                /* situation 2: skip already copied lines */
  564. X        if (line1 == n)
  565. X            line1 = curwin->w_cursor.lnum;
  566. X        ++line1;
  567. X        if (curwin->w_cursor.lnum < line1)
  568. X            ++line1;
  569. X        if (curwin->w_cursor.lnum < line2)
  570. X            ++line2;
  571. X        ++curwin->w_cursor.lnum;
  572. X    }
  573. X    CHANGED;
  574. X    msgmore((long)lnum);
  575. X}
  576. X
  577. X/*
  578. X * handle the :! command.
  579. X * We replace the extra bangs by the previously entered command and remember
  580. X * the command.
  581. X */
  582. X    void
  583. Xdobang(addr_count, line1, line2, forceit, arg)
  584. X    int            addr_count;
  585. X    linenr_t    line1, line2;
  586. X    int            forceit;
  587. X    char_u        *arg;
  588. X{
  589. X    static    char_u    *prevcmd = NULL;        /* the previous command */
  590. X    char_u            *t;
  591. X    char_u            *trailarg;
  592. X    int             len;
  593. X
  594. X    /*
  595. X     * Disallow shell commands from .exrc and .vimrc in current directory for
  596. X     * security reasons.
  597. X     */
  598. X    if (secure)
  599. X    {
  600. X        secure = 2;
  601. X        emsg(e_curdir);
  602. X        return;
  603. X    }
  604. X    len = STRLEN(arg) + 1;
  605. X
  606. X    autowrite_all();
  607. X    /*
  608. X     * try to find an embedded bang, like in :!<cmd> ! [args]
  609. X     * (:!! is indicated by the 'forceit' variable)
  610. X     */
  611. X    trailarg = arg;
  612. X    skiptospace(&trailarg);
  613. X    skipspace(&trailarg);
  614. X    if (*trailarg == '!')
  615. X        *trailarg++ = NUL;
  616. X    else
  617. X        trailarg = NULL;
  618. X
  619. X    if (forceit || trailarg != NULL)            /* use the previous command */
  620. X    {
  621. X        if (prevcmd == NULL)
  622. X        {
  623. X            emsg(e_noprev);
  624. X            return;
  625. X        }
  626. X        len += STRLEN(prevcmd) * (trailarg != NULL && forceit ? 2 : 1);
  627. X    }
  628. X
  629. X    if (len > CMDBUFFSIZE)
  630. X    {
  631. X        emsg(e_toolong);
  632. X        return;
  633. X    }
  634. X    if ((t = alloc(len)) == NULL)
  635. X        return;
  636. X    *t = NUL;
  637. X    if (forceit)
  638. X        STRCPY(t, prevcmd);
  639. X    STRCAT(t, arg);
  640. X    if (trailarg != NULL)
  641. X    {
  642. X        STRCAT(t, prevcmd);
  643. X        STRCAT(t, trailarg);
  644. X    }
  645. X    free(prevcmd);
  646. X    prevcmd = t;
  647. X
  648. X    if (bangredo)            /* put cmd in redo buffer for ! command */
  649. X    {
  650. X        AppendToRedobuff(prevcmd);
  651. X        AppendToRedobuff((char_u *)"\n");
  652. X        bangredo = FALSE;
  653. X    }
  654. X        /* echo the command */
  655. X    msg_start();
  656. X    msg_outchar(':');
  657. X    if (addr_count)                        /* :range! */
  658. X    {
  659. X        msg_outnum((long)line1);
  660. X        msg_outchar(',');
  661. X        msg_outnum((long)line2);
  662. X    }
  663. X    msg_outchar('!');
  664. X    msg_outtrans(prevcmd, -1);
  665. X    msg_ceol();
  666. X
  667. X    if (addr_count == 0)                /* :! */
  668. X        doshell(prevcmd); 
  669. X    else                                /* :range! */
  670. X        dofilter(line1, line2, prevcmd, TRUE, TRUE);
  671. X}
  672. X
  673. X/*
  674. X * call a shell to execute a command
  675. X */
  676. X    void
  677. Xdoshell(cmd)
  678. X    char_u    *cmd;
  679. X{
  680. X    BUF        *buf;
  681. X
  682. X    /*
  683. X     * Disallow shell commands from .exrc and .vimrc in current directory for
  684. X     * security reasons.
  685. X     */
  686. X    if (secure)
  687. X    {
  688. X        secure = 2;
  689. X        emsg(e_curdir);
  690. X        msg_end();
  691. X        return;
  692. X    }
  693. X    stoptermcap();
  694. X    msg_outchar('\n');                    /* may shift screen one line up */
  695. X
  696. X        /* warning message before calling the shell */
  697. X    if (p_warn)
  698. X        for (buf = firstbuf; buf; buf = buf->b_next)
  699. X            if (buf->b_changed)
  700. X            {
  701. X                msg_outstr((char_u *)"[No write since last change]\n");
  702. X                break;
  703. X            }
  704. X
  705. X    windgoto((int)Rows - 1, 0);
  706. X    cursor_on();
  707. X    (void)call_shell(cmd, 0, TRUE);
  708. X
  709. X#ifdef AMIGA
  710. X    wait_return(term_console ? -1 : TRUE);        /* see below */
  711. X#else
  712. X    wait_return(TRUE);                /* includes starttermcap() */
  713. X#endif
  714. X
  715. X    /*
  716. X     * In an Amiga window redrawing is caused by asking the window size.
  717. X     * If we got an interrupt this will not work. The chance that the window
  718. X     * size is wrong is very small, but we need to redraw the screen.
  719. X     * Don't do this if ':' hit in wait_return().
  720. X     * THIS IS UGLY but it save an extra redraw.
  721. X     */
  722. X#ifdef AMIGA
  723. X    if (skip_redraw)                /* ':' hit in wait_return() */
  724. X        must_redraw = CLEAR;
  725. X    else if (term_console)
  726. X    {
  727. X        OUTSTR("\033[0 q");         /* get window size */
  728. X        if (got_int)
  729. X            must_redraw = CLEAR;    /* if got_int is TRUE we have to redraw */
  730. X        else
  731. X            must_redraw = 0;        /* no extra redraw needed */
  732. X    }
  733. X#endif /* AMIGA */
  734. X}
  735. X
  736. X/*
  737. X * dofilter: filter lines through a command given by the user
  738. X *
  739. X * We use temp files and the call_shell() routine here. This would normally
  740. X * be done using pipes on a UNIX machine, but this is more portable to
  741. X * the machines we usually run on. The call_shell() routine needs to be able
  742. X * to deal with redirection somehow, and should handle things like looking
  743. X * at the PATH env. variable, and adding reasonable extensions to the
  744. X * command name given by the user. All reasonable versions of call_shell()
  745. X * do this.
  746. X * We use input redirection if do_in is TRUE.
  747. X * We use output redirection if do_out is TRUE.
  748. X */
  749. X    void
  750. Xdofilter(line1, line2, buff, do_in, do_out)
  751. X    linenr_t    line1, line2;
  752. X    char_u        *buff;
  753. X    int            do_in, do_out;
  754. X{
  755. X#ifdef LATTICE
  756. X    char_u        itmp[L_tmpnam];        /* use tmpnam() */
  757. X    char_u        otmp[L_tmpnam];
  758. X#else
  759. X    char_u        itmp[TMPNAMELEN];
  760. X    char_u        otmp[TMPNAMELEN];
  761. X#endif
  762. X    linenr_t     linecount;
  763. X
  764. X    /*
  765. X     * Disallow shell commands from .exrc and .vimrc in current directory for
  766. X     * security reasons.
  767. X     */
  768. X    if (secure)
  769. X    {
  770. X        secure = 2;
  771. X        emsg(e_curdir);
  772. X        return;
  773. X    }
  774. X    if (*buff == NUL)        /* no filter command */
  775. X        return;
  776. X    linecount = line2 - line1 + 1;
  777. X    curwin->w_cursor.lnum = line1;
  778. X    curwin->w_cursor.col = 0;
  779. X    /* cursupdate(); */
  780. X
  781. X    /*
  782. X     * 1. Form temp file names
  783. X     * 2. Write the lines to a temp file
  784. X     * 3. Run the filter command on the temp file
  785. X     * 4. Read the output of the command into the buffer
  786. X     * 5. Delete the original lines to be filtered
  787. X     * 6. Remove the temp files
  788. X     */
  789. X
  790. X#ifndef LATTICE
  791. X    /* for lattice we use tmpnam(), which will make its own name */
  792. X    STRCPY(itmp, TMPNAME1);
  793. X    STRCPY(otmp, TMPNAME2);
  794. X#endif
  795. X
  796. X    if ((do_in && *mktemp((char *)itmp) == NUL) || (do_out && *mktemp((char *)otmp) == NUL))
  797. X    {
  798. X        emsg(e_notmp);
  799. X        return;
  800. X    }
  801. X
  802. X/*
  803. X * ! command will be overwritten by next mesages
  804. X * This is a trade off between showing the command and not scrolling the
  805. X * text one line up (problem on slow terminals).
  806. X */
  807. X    must_redraw = CLEAR;        /* screen has been shifted up one line */
  808. X    ++no_wait_return;            /* don't call wait_return() while busy */
  809. X    if (do_in && buf_write(curbuf, itmp, NULL, line1, line2, FALSE, 0, FALSE) == FAIL)
  810. X    {
  811. X        msg_outchar('\n');                    /* keep message from writeit() */
  812. X        --no_wait_return;
  813. X        (void)emsg2(e_notcreate, itmp);        /* will call wait_return */
  814. X        return;
  815. X    }
  816. X    if (!do_out)
  817. X        outchar('\n');
  818. X
  819. X#if defined(UNIX) && !defined(ARCHIE)
  820. X/*
  821. X * put braces around the command (for concatenated commands)
  822. X */
  823. X     sprintf((char *)IObuff, "(%s)", (char *)buff);
  824. X    if (do_in)
  825. X    {
  826. X        STRCAT(IObuff, " < ");
  827. X        STRCAT(IObuff, itmp);
  828. X    }
  829. X    if (do_out)
  830. X    {
  831. X        STRCAT(IObuff, " > ");
  832. X        STRCAT(IObuff, otmp);
  833. X    }
  834. X#else
  835. X/*
  836. X * for shells that don't understand braces around commands, at least allow
  837. X * the use of commands in a pipe.
  838. X */
  839. X    STRCPY(IObuff, buff);
  840. X    if (do_in)
  841. X    {
  842. X        char_u        *p;
  843. X    /*
  844. X     * If there is a pipe, we have to put the '<' in front of it
  845. X     */
  846. X        p = STRCHR(IObuff, '|');
  847. X        if (p)
  848. X            *p = NUL;
  849. X        STRCAT(IObuff, " < ");
  850. X        STRCAT(IObuff, itmp);
  851. X        p = STRCHR(buff, '|');
  852. X        if (p)
  853. X            STRCAT(IObuff, p);
  854. X    }
  855. X    if (do_out)
  856. X    {
  857. X        STRCAT(IObuff, " > ");
  858. X        STRCAT(IObuff, otmp);
  859. X    }
  860. X#endif
  861. X
  862. X    windgoto((int)Rows - 1, 0);
  863. X    cursor_on();
  864. X            /* errors are ignored, so you can see the error
  865. X               messages from the command; use 'u' to fix the text */
  866. X    (void)call_shell(IObuff, 1, FALSE);
  867. X
  868. X    if (do_out)
  869. X    {
  870. X        if (!u_save((linenr_t)(line2), (linenr_t)(line2 + 1)))
  871. X        {
  872. X            linecount = 0;
  873. X            goto error;
  874. X        }
  875. X        if (readfile(otmp, NULL, line2, FALSE, (linenr_t)0, MAXLNUM) == FAIL)
  876. X        {
  877. X            outchar('\n');
  878. X            emsg2(e_notread, otmp);
  879. X            linecount = 0;
  880. X            goto error;
  881. X        }
  882. X
  883. X        if (do_in)
  884. X        {
  885. X            curwin->w_cursor.lnum = line1;
  886. X            dellines(linecount, TRUE, TRUE);
  887. X        }
  888. X        --no_wait_return;
  889. X    }
  890. X    else
  891. X    {
  892. Xerror:
  893. X        --no_wait_return;
  894. X        wait_return(FALSE);
  895. X    }
  896. X    updateScreen(CLEAR);        /* do this before messages below */
  897. X
  898. X    if (linecount > p_report)
  899. X    {
  900. X        if (!do_in && do_out)
  901. X            msgmore(linecount);
  902. X        else
  903. X            smsg((char_u *)"%ld lines filtered", (long)linecount);
  904. X    }
  905. X    remove((char *)itmp);
  906. X    remove((char *)otmp);
  907. X}
  908. END_OF_FILE
  909.   if test 11550 -ne `wc -c <'vim/src/cmdcmds.c'`; then
  910.     echo shar: \"'vim/src/cmdcmds.c'\" unpacked with wrong size!
  911.   fi
  912.   # end of 'vim/src/cmdcmds.c'
  913. fi
  914. if test -f 'vim/src/cmdtab.h' -a "${1}" != "-c" ; then 
  915.   echo shar: Will not clobber existing file \"'vim/src/cmdtab.h'\"
  916. else
  917.   echo shar: Extracting \"'vim/src/cmdtab.h'\" \(11638 characters\)
  918.   sed "s/^X//" >'vim/src/cmdtab.h' <<'END_OF_FILE'
  919. X/* vi:ts=4
  920. X *
  921. X * VIM - Vi IMproved
  922. X *
  923. X * Code Contributions By:    Bram Moolenaar            mool@oce.nl
  924. X *                            Tim Thompson            twitch!tjt
  925. X *                            Tony Andrews            onecom!wldrdg!tony 
  926. X *                            G. R. (Fred) Walter        watmath!watcgl!grwalter 
  927. X */
  928. X
  929. X/*
  930. X * THIS FILE IS AUTOMATICALLY PRODUCED - DO NOT EDIT
  931. X */
  932. X
  933. X#define RANGE    0x01            /* allow a linespecs */
  934. X#define BANG    0x02            /* allow a ! after the command name */
  935. X#define EXTRA    0x04            /* allow extra args after command name */
  936. X#define XFILE    0x08            /* expand wildcards in extra part */
  937. X#define NOSPC    0x10            /* no spaces allowed in the extra part */
  938. X#define    DFLALL    0x20            /* default file range is 1,$ */
  939. X#define NODFL    0x40            /* do not default to the current file name */
  940. X#define NEEDARG    0x80            /* argument required */
  941. X#define TRLBAR    0x100            /* check for trailing vertical bar */
  942. X#define REGSTR    0x200            /* allow "x for register designation */
  943. X#define COUNT    0x400            /* allow count in argument, after command */
  944. X#define NOTRLCOM 0x800            /* no trailing comment allowed */
  945. X#define ZEROR    0x1000            /* zero line number allowed */
  946. X#define USECTRLV 0x2000            /* do not remove CTRL-V from argument */
  947. X#define NOTADR    0x4000            /* number before command is not an address */
  948. X#define FILES    (XFILE + EXTRA)    /* multiple extra files allowed */
  949. X#define WORD1    (EXTRA + NOSPC)    /* one extra word allowed */
  950. X#define FILE1    (FILES + NOSPC)    /* 1 file allowed, defaults to current file */
  951. X#define NAMEDF    (FILE1 + NODFL)    /* 1 file allowed, defaults to "" */
  952. X#define NAMEDFS    (FILES + NODFL)    /* multiple files allowed, default is "" */
  953. X
  954. X/*
  955. X * This array maps ex command names to command codes. The order in which
  956. X * command names are listed below is significant -- ambiguous abbreviations
  957. X * are always resolved to be the first possible match (e.g. "r" is taken
  958. X * to mean "read", not "rewind", because "read" comes before "rewind").
  959. X * Not supported commands are included to avoid ambiguities.
  960. X */
  961. Xstatic struct
  962. X{
  963. X    char_u    *cmd_name;    /* name of the command */
  964. X    short     cmd_argt;    /* command line arguments permitted/needed/used */
  965. X} cmdnames[] =
  966. X{
  967. X    {(char_u *)"append",        BANG+RANGE+TRLBAR},            /* not supported */
  968. X#define CMD_append 0
  969. X    {(char_u *)"all",            TRLBAR},
  970. X#define CMD_all 1
  971. X    {(char_u *)"abbreviate",    EXTRA+TRLBAR+NOTRLCOM+USECTRLV},
  972. X#define CMD_abbreviate 2
  973. X    {(char_u *)"args",            RANGE+NOTADR+BANG+NAMEDFS},
  974. X#define CMD_args 3
  975. X    {(char_u *)"argument",        BANG+RANGE+NOTADR+COUNT+EXTRA},
  976. X#define CMD_argument 4
  977. X    {(char_u *)"buffer",        RANGE+NOTADR+COUNT+TRLBAR},
  978. X#define CMD_buffer 5
  979. X    {(char_u *)"ball",            TRLBAR},
  980. X#define CMD_ball 6
  981. X    {(char_u *)"buffers",        TRLBAR},
  982. X#define CMD_buffers 7
  983. X    {(char_u *)"bdelete",        BANG+RANGE+NOTADR+COUNT+EXTRA+TRLBAR},
  984. X#define CMD_bdelete 8
  985. X    {(char_u *)"bunload",        BANG+RANGE+NOTADR+COUNT+EXTRA+TRLBAR},
  986. X#define CMD_bunload 9
  987. X    {(char_u *)"bmodified",        RANGE+NOTADR+COUNT+TRLBAR},
  988. X#define CMD_bmodified 10
  989. X    {(char_u *)"bnext",            RANGE+NOTADR+COUNT+TRLBAR},
  990. X#define CMD_bnext 11
  991. X    {(char_u *)"bNext",            RANGE+NOTADR+COUNT+TRLBAR},
  992. X#define CMD_bNext 12
  993. X    {(char_u *)"bprevious",        RANGE+NOTADR+COUNT+TRLBAR},
  994. X#define CMD_bprevious 13
  995. X    {(char_u *)"brewind",        RANGE+TRLBAR},
  996. X#define CMD_brewind 14
  997. X    {(char_u *)"blast",            RANGE+TRLBAR},
  998. X#define CMD_blast 15
  999. X    {(char_u *)"change",        BANG+RANGE+COUNT+TRLBAR},    /* not supported */
  1000. X#define CMD_change 16
  1001. X    {(char_u *)"cabbrev",        EXTRA+TRLBAR+NOTRLCOM+USECTRLV},
  1002. X#define CMD_cabbrev 17
  1003. X    {(char_u *)"cc",            TRLBAR+WORD1+BANG},
  1004. X#define CMD_cc 18
  1005. X    {(char_u *)"cd",            NAMEDF+TRLBAR},
  1006. X#define CMD_cd 19
  1007. X    {(char_u *)"center",        TRLBAR+RANGE+EXTRA},
  1008. X#define CMD_center 20
  1009. X    {(char_u *)"cf",            TRLBAR+FILE1+BANG},
  1010. X#define CMD_cf 21
  1011. X    {(char_u *)"chdir",            NAMEDF+TRLBAR},
  1012. X#define CMD_chdir 22
  1013. X    {(char_u *)"cl",            TRLBAR},
  1014. X#define CMD_cl 23
  1015. X    {(char_u *)"close",            BANG+TRLBAR},
  1016. X#define CMD_close 24
  1017. X    {(char_u *)"cmap",            BANG+EXTRA+TRLBAR+NOTRLCOM+USECTRLV},
  1018. X#define CMD_cmap 25
  1019. X    {(char_u *)"cn",            TRLBAR+WORD1+BANG},
  1020. X#define CMD_cn 26
  1021. X    {(char_u *)"cnoremap",        BANG+EXTRA+TRLBAR+NOTRLCOM+USECTRLV},
  1022. X#define CMD_cnoremap 27
  1023. X    {(char_u *)"cnoreabbrev",    EXTRA+TRLBAR+NOTRLCOM+USECTRLV},
  1024. X#define CMD_cnoreabbrev 28
  1025. X    {(char_u *)"copy",            RANGE+EXTRA+TRLBAR},
  1026. X#define CMD_copy 29
  1027. X    {(char_u *)"cp",            TRLBAR+WORD1+BANG},
  1028. X#define CMD_cp 30
  1029. X    {(char_u *)"cq",            TRLBAR+BANG},
  1030. X#define CMD_cq 31
  1031. X    {(char_u *)"cunmap",        BANG+EXTRA+TRLBAR+USECTRLV},
  1032. X#define CMD_cunmap 32
  1033. X    {(char_u *)"cunabbrev",        EXTRA+TRLBAR+USECTRLV},
  1034. X#define CMD_cunabbrev 33
  1035. X    {(char_u *)"delete",        RANGE+REGSTR+COUNT+TRLBAR},
  1036. X#define CMD_delete 34
  1037. X    {(char_u *)"display",        TRLBAR},
  1038. X#define CMD_display 35
  1039. X    {(char_u *)"digraphs",        EXTRA+TRLBAR},
  1040. X#define CMD_digraphs 36
  1041. X    {(char_u *)"edit",            BANG+FILE1},
  1042. X#define CMD_edit 37
  1043. X    {(char_u *)"ex",            BANG+FILE1},
  1044. X#define CMD_ex 38
  1045. X    {(char_u *)"exit",            BANG+FILE1+DFLALL+TRLBAR},
  1046. X#define CMD_exit 39
  1047. X    {(char_u *)"file",            FILE1+TRLBAR},
  1048. X#define CMD_file 40
  1049. X    {(char_u *)"files",            TRLBAR},
  1050. X#define CMD_files 41
  1051. X    {(char_u *)"global",        RANGE+BANG+EXTRA+DFLALL},
  1052. X#define CMD_global 42
  1053. X    {(char_u *)"help",            TRLBAR},
  1054. X#define CMD_help 43
  1055. X    {(char_u *)"insert",        BANG+RANGE+TRLBAR},            /* not supported */
  1056. X#define CMD_insert 44
  1057. X    {(char_u *)"iabbrev",        EXTRA+TRLBAR+NOTRLCOM+USECTRLV},
  1058. X#define CMD_iabbrev 45
  1059. X    {(char_u *)"imap",            BANG+EXTRA+TRLBAR+NOTRLCOM+USECTRLV},
  1060. X#define CMD_imap 46
  1061. X    {(char_u *)"inoremap",        BANG+EXTRA+TRLBAR+NOTRLCOM+USECTRLV},
  1062. X#define CMD_inoremap 47
  1063. X    {(char_u *)"inoreabbrev",    EXTRA+TRLBAR+NOTRLCOM+USECTRLV},
  1064. X#define CMD_inoreabbrev 48
  1065. X    {(char_u *)"iunmap",        BANG+EXTRA+TRLBAR+USECTRLV},
  1066. X#define CMD_iunmap 49
  1067. X    {(char_u *)"iunabbrev",        EXTRA+TRLBAR+USECTRLV},
  1068. X#define CMD_iunabbrev 50
  1069. X    {(char_u *)"join",            RANGE+COUNT+TRLBAR},
  1070. X#define CMD_join 51
  1071. X    {(char_u *)"jumps",            TRLBAR},
  1072. X#define CMD_jumps 52
  1073. X    {(char_u *)"k",                RANGE+WORD1+TRLBAR},
  1074. X#define CMD_k 53
  1075. X    {(char_u *)"list",            RANGE+COUNT+TRLBAR},
  1076. X#define CMD_list 54
  1077. X    {(char_u *)"last",            EXTRA+BANG},
  1078. X#define CMD_last 55
  1079. X    {(char_u *)"left",            TRLBAR+RANGE+EXTRA},
  1080. X#define CMD_left 56
  1081. X    {(char_u *)"move",            RANGE+EXTRA+TRLBAR},
  1082. X#define CMD_move 57
  1083. X    {(char_u *)"mark",            RANGE+WORD1+TRLBAR},
  1084. X#define CMD_mark 58
  1085. X    {(char_u *)"marks",            TRLBAR},
  1086. X#define CMD_marks 59
  1087. X    {(char_u *)"map",            BANG+EXTRA+TRLBAR+NOTRLCOM+USECTRLV},
  1088. X#define CMD_map 60
  1089. X    {(char_u *)"make",            NEEDARG+EXTRA+TRLBAR+XFILE},
  1090. X#define CMD_make 61
  1091. X    {(char_u *)"mkexrc",        BANG+FILE1+TRLBAR},
  1092. X#define CMD_mkexrc 62
  1093. X    {(char_u *)"mkvimrc",        BANG+FILE1+TRLBAR},
  1094. X#define CMD_mkvimrc 63
  1095. X    {(char_u *)"mfstat",        TRLBAR},                /* for debugging */
  1096. X#define CMD_mfstat 64
  1097. X    {(char_u *)"mode",            WORD1+TRLBAR},
  1098. X#define CMD_mode 65
  1099. X    {(char_u *)"next",            RANGE+NOTADR+BANG+NAMEDFS},
  1100. X#define CMD_next 66
  1101. X    {(char_u *)"new",            BANG+FILE1+RANGE+NOTADR},
  1102. X#define CMD_new 67
  1103. X    {(char_u *)"number",        RANGE+COUNT+TRLBAR},
  1104. X#define CMD_number 68
  1105. X    {(char_u *)"#",                RANGE+COUNT+TRLBAR},
  1106. X#define CMD_pound 69
  1107. X    {(char_u *)"noremap",        BANG+EXTRA+TRLBAR+NOTRLCOM+USECTRLV},
  1108. X#define CMD_noremap 70
  1109. X    {(char_u *)"noreabbrev",    EXTRA+TRLBAR+NOTRLCOM+USECTRLV},
  1110. X#define CMD_noreabbrev 71
  1111. X    {(char_u *)"Next",            EXTRA+RANGE+NOTADR+COUNT+BANG},
  1112. X#define CMD_Next 72
  1113. X    {(char_u *)"only",            BANG+TRLBAR},
  1114. X#define CMD_only 73
  1115. X    {(char_u *)"print",            RANGE+COUNT+TRLBAR},
  1116. X#define CMD_print 74
  1117. X    {(char_u *)"pop",            RANGE+NOTADR+COUNT+TRLBAR+ZEROR},
  1118. X#define CMD_pop 75
  1119. X    {(char_u *)"put",            RANGE+BANG+REGSTR+TRLBAR},
  1120. X#define CMD_put 76
  1121. X    {(char_u *)"preserve",        TRLBAR},
  1122. X#define CMD_preserve 77
  1123. X    {(char_u *)"previous",        EXTRA+RANGE+NOTADR+COUNT+BANG},
  1124. X#define CMD_previous 78
  1125. X    {(char_u *)"pwd",            TRLBAR},
  1126. X#define CMD_pwd 79
  1127. X    {(char_u *)"quit",            BANG+TRLBAR},
  1128. X#define CMD_quit 80
  1129. X    {(char_u *)"qall",            BANG+TRLBAR},
  1130. X#define CMD_qall 81
  1131. X    {(char_u *)"read",            RANGE+NAMEDF+TRLBAR+ZEROR},
  1132. X#define CMD_read 82
  1133. X    {(char_u *)"rewind",        EXTRA+BANG},
  1134. X#define CMD_rewind 83
  1135. X    {(char_u *)"recover",        FILE1+TRLBAR},                /* not supported */
  1136. X#define CMD_recover 84
  1137. X    {(char_u *)"redo",            TRLBAR},
  1138. X#define CMD_redo 85
  1139. X    {(char_u *)"right",            TRLBAR+RANGE+EXTRA},
  1140. X#define CMD_right 86
  1141. X    {(char_u *)"resize",        TRLBAR+WORD1},
  1142. X#define CMD_resize 87
  1143. X    {(char_u *)"substitute",    RANGE+EXTRA},
  1144. X#define CMD_substitute 88
  1145. X    {(char_u *)"sargument",        BANG+RANGE+NOTADR+COUNT+EXTRA},
  1146. X#define CMD_sargument 89
  1147. X    {(char_u *)"sall",            TRLBAR},
  1148. X#define CMD_sall 90
  1149. X    {(char_u *)"sbuffer",        RANGE+NOTADR+COUNT+TRLBAR},
  1150. X#define CMD_sbuffer 91
  1151. X    {(char_u *)"sball",            TRLBAR},
  1152. X#define CMD_sball 92
  1153. X    {(char_u *)"sbmodified",    RANGE+NOTADR+COUNT+TRLBAR},
  1154. X#define CMD_sbmodified 93
  1155. X    {(char_u *)"sbnext",        RANGE+NOTADR+COUNT+TRLBAR},
  1156. X#define CMD_sbnext 94
  1157. X    {(char_u *)"sbNext",        RANGE+NOTADR+COUNT+TRLBAR},
  1158. X#define CMD_sbNext 95
  1159. X    {(char_u *)"sbprevious",    RANGE+NOTADR+COUNT+TRLBAR},
  1160. X#define CMD_sbprevious 96
  1161. X    {(char_u *)"sbrewind",        TRLBAR},
  1162. X#define CMD_sbrewind 97
  1163. X    {(char_u *)"sblast",        TRLBAR},
  1164. X#define CMD_sblast 98
  1165. X    {(char_u *)"suspend",        TRLBAR+BANG},
  1166. X#define CMD_suspend 99
  1167. X    {(char_u *)"set",            EXTRA+TRLBAR},
  1168. X#define CMD_set 100
  1169. X    {(char_u *)"setkeymap",        NAMEDF+TRLBAR},
  1170. X#define CMD_setkeymap 101
  1171. X    {(char_u *)"shell",            TRLBAR},
  1172. X#define CMD_shell 102
  1173. X    {(char_u *)"sleep",            RANGE+COUNT+NOTADR+TRLBAR},
  1174. X#define CMD_sleep 103
  1175. X    {(char_u *)"source",        NAMEDF+NEEDARG+TRLBAR},
  1176. X#define CMD_source 104
  1177. X    {(char_u *)"split",            BANG+FILE1+RANGE+NOTADR},
  1178. X#define CMD_split 105
  1179. X    {(char_u *)"snext",            RANGE+NOTADR+BANG+NAMEDFS},
  1180. X#define CMD_snext 106
  1181. X    {(char_u *)"sNext",            EXTRA+RANGE+NOTADR+COUNT+BANG},
  1182. X#define CMD_sNext 107
  1183. X    {(char_u *)"sprevious",        EXTRA+RANGE+NOTADR+COUNT+BANG},
  1184. X#define CMD_sprevious 108
  1185. X    {(char_u *)"srewind",        EXTRA+BANG},
  1186. X#define CMD_srewind 109
  1187. X    {(char_u *)"slast",            EXTRA+BANG},
  1188. X#define CMD_slast 110
  1189. X    {(char_u *)"stop",            TRLBAR+BANG},
  1190. X#define CMD_stop 111
  1191. X    {(char_u *)"sunhide",        TRLBAR},
  1192. X#define CMD_sunhide 112
  1193. X    {(char_u *)"swapname",        TRLBAR},
  1194. X#define CMD_swapname 113
  1195. X    {(char_u *)"t",                RANGE+EXTRA+TRLBAR},
  1196. X#define CMD_t 114
  1197. X    {(char_u *)"tag",            RANGE+NOTADR+COUNT+BANG+WORD1+TRLBAR+ZEROR},
  1198. X#define CMD_tag 115
  1199. X    {(char_u *)"tags",            TRLBAR},
  1200. X#define CMD_tags 116
  1201. X    {(char_u *)"unabbreviate",    EXTRA+TRLBAR+USECTRLV},
  1202. X#define CMD_unabbreviate 117
  1203. X    {(char_u *)"undo",            TRLBAR},
  1204. X#define CMD_undo 118
  1205. X    {(char_u *)"unhide",        TRLBAR},
  1206. X#define CMD_unhide 119
  1207. X    {(char_u *)"unmap",            BANG+EXTRA+TRLBAR+USECTRLV},
  1208. X#define CMD_unmap 120
  1209. X    {(char_u *)"vglobal",        RANGE+EXTRA+DFLALL},
  1210. X#define CMD_vglobal 121
  1211. X    {(char_u *)"version",        TRLBAR},
  1212. X#define CMD_version 122
  1213. X    {(char_u *)"visual",        RANGE+BANG+FILE1},
  1214. X#define CMD_visual 123
  1215. X    {(char_u *)"write",            RANGE+BANG+FILE1+DFLALL+TRLBAR},
  1216. X#define CMD_write 124
  1217. X    {(char_u *)"wnext",            RANGE+NOTADR+BANG+FILE1+TRLBAR},
  1218. X#define CMD_wnext 125
  1219. X    {(char_u *)"wNext",            RANGE+NOTADR+BANG+FILE1+TRLBAR},
  1220. X#define CMD_wNext 126
  1221. X    {(char_u *)"wprevious",        RANGE+NOTADR+BANG+FILE1+TRLBAR},
  1222. X#define CMD_wprevious 127
  1223. X    {(char_u *)"winsize",        EXTRA+NEEDARG+TRLBAR},
  1224. X#define CMD_winsize 128
  1225. X    {(char_u *)"wq",            BANG+FILE1+DFLALL+TRLBAR},
  1226. X#define CMD_wq 129
  1227. X    {(char_u *)"wall",            BANG+TRLBAR},
  1228. X#define CMD_wall 130
  1229. X    {(char_u *)"wqall",            BANG+FILE1+DFLALL+TRLBAR},
  1230. X#define CMD_wqall 131
  1231. X    {(char_u *)"xit",            BANG+FILE1+DFLALL+TRLBAR},
  1232. X#define CMD_xit 132
  1233. X    {(char_u *)"xall",            BANG+TRLBAR},
  1234. X#define CMD_xall 133
  1235. X    {(char_u *)"yank",            RANGE+REGSTR+COUNT+TRLBAR},
  1236. X#define CMD_yank 134
  1237. X    {(char_u *)"z",                RANGE+COUNT+TRLBAR},        /* not supported */
  1238. X#define CMD_z 135
  1239. X    {(char_u *)"@",                RANGE+EXTRA+TRLBAR},
  1240. X#define CMD_at 136
  1241. X    {(char_u *)"!",                RANGE+NAMEDFS},
  1242. X#define CMD_bang 137
  1243. X    {(char_u *)"<",                RANGE+COUNT+TRLBAR},
  1244. X#define CMD_lshift 138
  1245. X    {(char_u *)">",                RANGE+COUNT+TRLBAR},
  1246. X#define CMD_rshift 139
  1247. X    {(char_u *)"=",                RANGE+TRLBAR},
  1248. X#define CMD_equal 140
  1249. X    {(char_u *)"&",                RANGE+EXTRA},
  1250. X#define CMD_and 141
  1251. X    {(char_u *)"~",                RANGE+EXTRA}
  1252. X#define CMD_tilde 142
  1253. X#define CMD_SIZE 143
  1254. X
  1255. X};
  1256. END_OF_FILE
  1257.   if test 11638 -ne `wc -c <'vim/src/cmdtab.h'`; then
  1258.     echo shar: \"'vim/src/cmdtab.h'\" unpacked with wrong size!
  1259.   fi
  1260.   # end of 'vim/src/cmdtab.h'
  1261. fi
  1262. if test -f 'vim/src/digraph.c.UU' -a "${1}" != "-c" ; then 
  1263.   echo shar: Will not clobber existing file \"'vim/src/digraph.c.UU'\"
  1264. else
  1265.   echo shar: Extracting \"'vim/src/digraph.c.UU'\" \(11504 characters\)
  1266.   sed "s/^X//" >'vim/src/digraph.c.UU' <<'END_OF_FILE'
  1267. Xbegin 644 vim/src/digraph.c
  1268. XM+RH@=FDZ=',]-#IS=STT"B J"B J(%9)32 M(%9I($E-<')O=F5D"0EB>2!"
  1269. XM<F%M($UO;VQE;F%A<@H@*@H@*B!296%D('1H92!F:6QE(")C<F5D:71S+G1X
  1270. XM="(@9F]R(&$@;&ES="!O9B!P96]P;&4@=VAO(&-O;G1R:6)U=&5D+@H@*B!2
  1271. XM96%D('1H92!F:6QE(")U9V%N9&$N='AT(B!F;W(@8V]P>6EN9R!A;F0@=7-A
  1272. XM9V4@8V]N9&ET:6]N<RX*("HO"@HC:69D968@1$E'4D%02%,*+RH*("H@9&EG
  1273. XM<F%P:"YC.B!C;V1E(&9O<B!D:6=R87!H<PH@*B\*"B-I;F-L=61E(")V:6TN
  1274. XM:"(*(VEN8VQU9&4@(F=L;V)A;',N:"(*(VEN8VQU9&4@(G!R;W1O+F@B"B-I
  1275. XM;F-L=61E(")P87)A;2YH(@H*<W1A=&EC('9O:60@<')I;G1D:6=R87!H(%]?
  1276. XM05)'4R@H8VAA<E]U("HI*3L*"F-H87)?=0DH*F1I9W)A<&AN97<I6S-=.PD)
  1277. XM"2\J('!O:6YT97(@=&\@861D960@9&EG<F%P:',@*B\*:6YT"0ED:6=R87!H
  1278. XM8V]U;G0@/2 P.PD)"2\J(&YU;6)E<B!O9B!A9&1E9"!D:6=R87!H<R J+PH*
  1279. XM(VEF9&5F($U31$]3"F-H87)?=0ED:6=R87!H9&5F875L=%M=6S-=(#T@"0DO
  1280. XM*B!S=&%N9&%R9"!-4T1/4R!D:6=R87!H<R J+PH)(" @>WLG0R<L("<L)RP@
  1281. XM,3(X?2P)+RH@@" J+PH)"7LG=2<L("<B)RP@,3(Y?2P)+RH@@2 J+PH)"7LG
  1282. XM92<L("=<)R<L(#$S,'TL"2\J(((@*B\*"0E[)V$G+" G7B<L(#$S,7TL"2\J
  1283. XM((,@*B\*"0E[)V$G+" G(B<L(#$S,GTL"2\J((0@*B\*"0E[)V$G+" G8"<L
  1284. XM(#$S,WTL"2\J((4@*B\*"0E[)V$G+" G0"<L(#$S-'TL"2\J((8@*B\*"0E[
  1285. XM)V,G+" G+"<L(#$S-7TL"2\J('Y'("A305,@0R!C86XG="!H86YD;&4@=&AE
  1286. XM(')E86P@8VAA<BD@*B\*"0E[)V4G+" G7B<L(#$S-GTL"2\J('Y(("A305,@
  1287. XM0R!C86XG="!H86YD;&4@=&AE(')E86P@8VAA<BD@*B\*"0E[)V4G+" G(B<L
  1288. XM(#$S-WTL"2\J((D@*B\*"0E[)V4G+" G8"<L(#$S.'TL"2\J((H@*B\*"0E[
  1289. XM)VDG+" G(B<L(#$S.7TL"2\J((L@*B\*"0E[)VDG+" G7B<L(#$T,'TL"2\J
  1290. XM((P@*B\*"0E[)VDG+" G8"<L(#$T,7TL"2\J((T@*B\*"0E[)T$G+" G(B<L
  1291. XM(#$T,GTL"2\J((X@*B\*"0E[)T$G+" G0"<L(#$T,WTL"2\J((\@*B\*"0E[
  1292. XM)T4G+" G7"<G+" Q-#1]+ DO*B"0("HO"@D)>R=A)RP@)V4G+" Q-#5]+ DO
  1293. XM*B"1("HO"@D)>R=!)RP@)T4G+" Q-#9]+ DO*B"2("HO"@D)>R=O)RP@)UXG
  1294. XM+" Q-#=]+ DO*B"3("HO"@D)>R=O)RP@)R(G+" Q-#A]+ DO*B"4("HO"@D)
  1295. XM>R=O)RP@)V G+" Q-#E]+ DO*B"5("HO"@D)>R=U)RP@)UXG+" Q-3!]+ DO
  1296. XM*B"6("HO"@D)>R=U)RP@)V G+" Q-3%]+ DO*B"7("HO"@D)>R=Y)RP@)R(G
  1297. XM+" Q-3)]+ DO*B"8("HO"@D)>R=/)RP@)R(G+" Q-3-]+ DO*B"9("HO"@D)
  1298. XM>R=5)RP@)R(G+" Q-31]+ DO*B":("HO"@D@(" @>R=C)RP@)WPG+" Q-35]
  1299. XM+ DO*B";("HO"@D@(" @>R<D)RP@)R0G+" Q-39]+ DO*B"<("HO"@D@(" @
  1300. XM>R=9)RP@)RTG+" Q-3=]+ DO*B!^72 H4T%3($,@8V%N)W0@:&%N9&QE('1H
  1301. XM92!R96%L(&-H87(I("HO"@D@(" @>R=0)RP@)W0G+" Q-3A]+ DO*B">("HO
  1302. XM"@D@(" @>R=F)RP@)V8G+" Q-3E]+ DO*B"?("HO"@D)>R=A)RP@)UPG)RP@
  1303. XM,38P?2P)+RH@H" J+PH)"7LG:2<L("=<)R<L(#$V,7TL"2\J(*$@*B\*"0E[
  1304. XM)V\G+" G7"<G+" Q-C)]+ DO*B"B("HO"@D)>R=U)RP@)UPG)RP@,38S?2P)
  1305. XM+RH@>'@@*%-!4R!#(&-A;B=T(&AA;F1L92!T:&4@<F5A;"!C:&%R*2 J+PH)
  1306. XM"7LG;B<L("=^)RP@,38T?2P)+RH@I" J+PH)"7LG3B<L("=^)RP@,38U?2P)
  1307. XM+RH@I2 J+PH)"7LG82<L("=A)RP@,38V?2P)+RH@IB J+PH)"7LG;R<L("=O
  1308. XM)RP@,38W?2P)+RH@IR J+PH)"7LG?B<L("<_)RP@,38X?2P)+RH@J" J+PH)
  1309. XM"7LG+2<L("=A)RP@,38Y?2P)+RH@J2 J+PH)"7LG82<L("<M)RP@,3<P?2P)
  1310. XM+RH@JB J+PH)"7LG,2<L("<R)RP@,3<Q?2P)+RH@JR J+PH)"7LG,2<L("<T
  1311. XM)RP@,3<R?2P)+RH@K" J+PH)"7LG?B<L("<A)RP@,3<S?2P)+RH@K2 J+PH)
  1312. XM"7LG/"<L("<\)RP@,3<T?2P)+RH@KB J+PH)"7LG/B<L("<^)RP@,3<U?2P)
  1313. XM+RH@KR J+PH*"0E[)W,G+" G<R<L(#(R-7TL"2\J(.$@*B\*"0E[)VHG+" G
  1314. XM=2<L(#(S,'TL"2\J(.8@*B\*"0E[)V\G+" G+R<L(#(S-WTL"2\J(.T@*B\*
  1315. XM"0E[)RLG+" G+2<L(#(T,7TL"2\J(/$@*B\*"0E[)SXG+" G/2<L(#(T,GTL
  1316. XM"2\J(/(@*B\*"0E[)SPG+" G/2<L(#(T,WTL"2\J(/,@*B\*"0E[)SHG+" G
  1317. XM+2<L(#(T-GTL"2\J(/8@*B\*"0E[)WXG+" G?B<L(#(T-WTL"2\J(/<@*B\*
  1318. XM"0E[)WXG+" G;R<L(#(T.'TL"2\J(/@@*B\*"0E[)S(G+" G,B<L(#(U,WTL
  1319. XM"2\J(/T@*B\*"0E[3E5,+"!.54PL($Y53'T*"0E].PH*(V5L<V4)+RH@35-$
  1320. XM3U,@*B\*"F-H87)?=0ED:6=R87!H9&5F875L=%M=6S-=(#T@"0DO*B!S=&%N
  1321. XM9&%R9"!)4T\@9&EG<F%P:',@*B\*"2 @('M[)WXG+" G(2<L(#$V,7TL"2\J
  1322. XM(*$@*B\*"2 @("![)V,G+" G?"<L(#$V,GTL"2\J(*(@*B\*"2 @("![)R0G
  1323. XM+" G)"<L(#$V,WTL"2\J(*,@*B\*"2 @("![)V\G+" G>"<L(#$V-'TL"2\J
  1324. XM(*0@*B\*"2 @("![)UDG+" G+2<L(#$V-7TL"2\J(*4@*B\*"2 @("![)WPG
  1325. XM+" G?"<L(#$V-GTL"2\J(*8@*B\*"2 @("![)W G+" G82<L(#$V-WTL"2\J
  1326. XM(*<@*B\*"2 @("![)R(G+" G(B<L(#$V.'TL"2\J(*@@*B\*"2 @("![)V,G
  1327. XM+" G3R<L(#$V.7TL"2\J(*D@*B\*"0E[)V$G+" G+2<L(#$W,'TL"2\J(*H@
  1328. XM*B\*"0E[)SPG+" G/"<L(#$W,7TL"2\J(*L@*B\*"0E[)RTG+" G+"<L(#$W
  1329. XM,GTL"2\J(*P@*B\*"0E[)RTG+" G+2<L(#$W,WTL"2\J(*T@*B\*"0E[)W(G
  1330. XM+" G3R<L(#$W-'TL"2\J(*X@*B\*"0E[)RTG+" G/2<L(#$W-7TL"2\J(*\@
  1331. XM*B\*"0E[)WXG+" G;R<L(#$W-GTL"2\J(+ @*B\*"0E[)RLG+" G+2<L(#$W
  1332. XM-WTL"2\J(+$@*B\*"0E[)S(G+" G,B<L(#$W.'TL"2\J(+(@*B\*"0E[)S,G
  1333. XM+" G,R<L(#$W.7TL"2\J(+,@*B\*"0E[)UPG)RP@)UPG)RP@,3@P?2P)+RH@
  1334. XMM" J+PH)"7LG:B<L("=U)RP@,3@Q?2P)+RH@M2 J+PH)"7LG<"<L("=P)RP@
  1335. XM,3@R?2P)+RH@MB J+PH)"7LG?B<L("<N)RP@,3@S?2P)+RH@MR J+PH)"7LG
  1336. XM+"<L("<L)RP@,3@T?2P)+RH@N" J+PH)"7LG,2<L("<Q)RP@,3@U?2P)+RH@
  1337. XMN2 J+PH)"7LG;R<L("<M)RP@,3@V?2P)+RH@NB J+PH)"7LG/B<L("<^)RP@
  1338. XM,3@W?2P)+RH@NR J+PH)"7LG,2<L("<T)RP@,3@X?2P)+RH@O" J+PH)"7LG
  1339. XM,2<L("<R)RP@,3@Y?2P)+RH@O2 J+PH)"7LG,R<L("<T)RP@,3DP?2P)+RH@
  1340. XMOB J+PH)"7LG?B<L("<_)RP@,3DQ?2P)+RH@OR J+PH)"7LG02<L("=@)RP@
  1341. XM,3DR?2P)+RH@P" J+PH)"7LG02<L("=<)R<L(#$Y,WTL"2\J(,$@*B\*"0E[
  1342. XM)T$G+" G7B<L(#$Y-'TL"2\J(,(@*B\*"0E[)T$G+" G?B<L(#$Y-7TL"2\J
  1343. XM(,,@*B\*"0E[)T$G+" G(B<L(#$Y-GTL"2\J(,0@*B\*"0E[)T$G+" G0"<L
  1344. XM(#$Y-WTL"2\J(,4@*B\*"0E[)T$G+" G12<L(#$Y.'TL"2\J(,8@*B\*"0E[
  1345. XM)T,G+" G+"<L(#$Y.7TL"2\J(,<@*B\*"0E[)T4G+" G8"<L(#(P,'TL"2\J
  1346. XM(,@@*B\*"0E[)T4G+" G7"<G+" R,#%]+ DO*B#)("HO"@D)>R=%)RP@)UXG
  1347. XM+" R,#)]+ DO*B#*("HO"@D)>R=%)RP@)R(G+" R,#-]+ DO*B#+("HO"@D)
  1348. XM>R=))RP@)V G+" R,#1]+ DO*B#,("HO"@D)>R=))RP@)UPG)RP@,C U?2P)
  1349. XM+RH@S2 J+PH)"7LG22<L("=>)RP@,C V?2P)+RH@SB J+PH)"7LG22<L("<B
  1350. XM)RP@,C W?2P)+RH@SR J+PH)"7LG1"<L("<M)RP@,C X?2P)+RH@T" J+PH)
  1351. XM"7LG3B<L("=^)RP@,C Y?2P)+RH@T2 J+PH)"7LG3R<L("=@)RP@,C$P?2P)
  1352. XM+RH@TB J+PH)"7LG3R<L("=<)R<L(#(Q,7TL"2\J(-,@*B\*"0E[)T\G+" G
  1353. XM7B<L(#(Q,GTL"2\J(-0@*B\*"0E[)T\G+" G?B<L(#(Q,WTL"2\J(-4@*B\*
  1354. XM"0E[)T\G+" G(B<L(#(Q-'TL"2\J(-8@*B\*"0E[)R\G+" G7%PG+" R,35]
  1355. XM+ DO*B#7("HO"@D)>R=/)RP@)R\G+" R,39]+ DO*B#8("HO"@D)>R=5)RP@
  1356. XM)V G+" R,3=]+ DO*B#9("HO"@D)>R=5)RP@)UPG)RP@,C$X?2P)+RH@VB J
  1357. XM+PH)"7LG52<L("=>)RP@,C$Y?2P)+RH@VR J+PH)"7LG52<L("<B)RP@,C(P
  1358. XM?2P)+RH@W" J+PH)"7LG62<L("=<)R<L(#(R,7TL"2\J(-T@*B\*"0E[)TDG
  1359. XM+" G<"<L(#(R,GTL"2\J(-X@*B\*"0E[)W,G+" G<R<L(#(R,WTL"2\J(-\@
  1360. XM*B\*"0E[)V$G+" G8"<L(#(R-'TL"2\J(. @*B\*"0E[)V$G+" G7"<G+" R
  1361. XM,C5]+ DO*B#A("HO"@D)>R=A)RP@)UXG+" R,C9]+ DO*B#B("HO"@D)>R=A
  1362. XM)RP@)WXG+" R,C=]+ DO*B#C("HO"@D)>R=A)RP@)R(G+" R,CA]+ DO*B#D
  1363. XM("HO"@D)>R=A)RP@)T G+" R,CE]+ DO*B#E("HO"@D)>R=A)RP@)V4G+" R
  1364. XM,S!]+ DO*B#F("HO"@D)>R=C)RP@)RPG+" R,S%]+ DO*B#G("HO"@D)>R=E
  1365. XM)RP@)V G+" R,S)]+ DO*B#H("HO"@D)>R=E)RP@)UPG)RP@,C,S?2P)+RH@
  1366. XMZ2 J+PH)"7LG92<L("=>)RP@,C,T?2P)+RH@ZB J+PH)"7LG92<L("<B)RP@
  1367. XM,C,U?2P)+RH@ZR J+PH)"7LG:2<L("=@)RP@,C,V?2P)+RH@[" J+PH)"7LG
  1368. XM:2<L("=<)R<L(#(S-WTL"2\J(.T@*B\*"0E[)VDG+" G7B<L(#(S.'TL"2\J
  1369. XM(.X@*B\*"0E[)VDG+" G(B<L(#(S.7TL"2\J(.\@*B\*"0E[)V0G+" G+2<L
  1370. XM(#(T,'TL"2\J(/ @*B\*"0E[)VXG+" G?B<L(#(T,7TL"2\J(/$@*B\*"0E[
  1371. XM)V\G+" G8"<L(#(T,GTL"2\J(/(@*B\*"0E[)V\G+" G7"<G+" R-#-]+ DO
  1372. XM*B#S("HO"@D)>R=O)RP@)UXG+" R-#1]+ DO*B#T("HO"@D)>R=O)RP@)WXG
  1373. XM+" R-#5]+ DO*B#U("HO"@D)>R=O)RP@)R(G+" R-#9]+ DO*B#V("HO"@D)
  1374. XM>R<Z)RP@)RTG+" R-#=]+ DO*B#W("HO"@D)>R=O)RP@)R\G+" R-#A]+ DO
  1375. XM*B#X("HO"@D)>R=U)RP@)V G+" R-#E]+ DO*B#Y("HO"@D)>R=U)RP@)UPG
  1376. XM)RP@,C4P?2P)+RH@^B J+PH)"7LG=2<L("=>)RP@,C4Q?2P)+RH@^R J+PH)
  1377. XM"7LG=2<L("<B)RP@,C4R?2P)+RH@_" J+PH)"7LG>2<L("=<)R<L(#(U,WTL
  1378. XM"2\J(/T@*B\*"0E[)VDG+" G<"<L(#(U-'TL"2\J(/X@*B\*"0E[)WDG+" G
  1379. XM(B<L(#(U-7TL"2\J(/\@*B\*"0E[3E5,+"!.54PL($Y53'T*"0E].PHC96YD
  1380. XM:68)+RH@35-$3U,@*B\*( HO*@H@*B!H86YD;&4@9&EG<F%P:',@869T97(@
  1381. XM='EP:6YG(&$@8VAA<F%C=&5R"B J+PH):6YT"F1O9&EG<F%P:"AC*0H):6YT
  1382. XM"0EC.PI["@ES=&%T:6,@:6YT"6)A8VMS<&%C960["0DO*B!C:&%R86-T97(@
  1383. XM8F5F;W)E($)3("HO"@ES=&%T:6,@:6YT"6QA<W1C:&%R.PD)+RH@;&%S="!T
  1384. XM>7!E9"!C:&%R86-T97(@*B\*"@EI9B H8R ]/2 M,2D)"0D)+RH@:6YI="!V
  1385. XM86QU97,@*B\*"7L*"0EB86-K<W!A8V5D(#T@+3$["@E]"@EE;'-E(&EF("AP
  1386. XM7V1G*0H)>PH)"6EF("AB86-K<W!A8V5D(#X](# I"@D)"6,@/2!G971D:6=R
  1387. XM87!H*&)A8VMS<&%C960L(&,L($9!3%-%*3L*"0EB86-K<W!A8V5D(#T@+3$[
  1388. XM"@D):68@*&,@/3T@0E,@)B8@;&%S=&-H87(@/CT@,"D*"0D)8F%C:W-P86-E
  1389. XM9" ](&QA<W1C:&%R.PH)?0H);&%S=&-H87(@/2!C.PH)<F5T=7)N(&,["GT*
  1390. XM"B\J"B J(&QO;VMU<"!T:&4@<&%I<B!C:&%R,2P@8VAA<C(@:6X@=&AE(&1I
  1391. XM9W)A<&@@=&%B;&5S"B J(&EF(&YO(&UA=&-H+"!R971U<FX@8VAA<C(*("HO
  1392. XM"@EI;G0*9V5T9&EG<F%P:"AC:&%R,2P@8VAA<C(L(&UE=&$I"@EI;G0)8VAA
  1393. XM<C$["@EI;G0)8VAA<C(["@EI;G0);65T83L*>PH):6YT"0EI.PH):6YT"0ER
  1394. XM971V86P["@H)<F5T=F%L(#T@,#L*"69O<B H:2 ](# [(#L@*RMI*0D)"2\J
  1395. XM('-E87)C:"!A9&1E9"!D:6=R87!H<R!F:7)S=" J+PH)>PH)"6EF("AI(#T]
  1396. XM(&1I9W)A<&AC;W5N="D)+RH@96YD(&]F(&%D9&5D('1A8FQE+"!S96%R8V@@
  1397. XM9&5F875L=',@*B\*"0E["@D)"69O<B H:2 ](# [(&1I9W)A<&AD969A=6QT
  1398. XM6VE=6S!=("$](# [("LK:2D*"0D)"6EF("AD:6=R87!H9&5F875L=%MI75LP
  1399. XM72 ]/2!C:&%R,2 F)B!D:6=R87!H9&5F875L=%MI75LQ72 ]/2!C:&%R,BD*
  1400. XM"0D)"7L*"0D)"0ER971V86P@/2!D:6=R87!H9&5F875L=%MI75LR73L*"0D)
  1401. XM"0EB<F5A:SL*"0D)"7T*"0D)8G)E86L["@D)?0H)"6EF("AD:6=R87!H;F5W
  1402. XM6VE=6S!=(#T](&-H87(Q("8F(&1I9W)A<&AN97=;:5U;,5T@/3T@8VAA<C(I
  1403. XM"@D)>PH)"0ER971V86P@/2!D:6=R87!H;F5W6VE=6S)=.PH)"0EB<F5A:SL*
  1404. XM"0E]"@E]"@H):68@*')E='9A;" ]/2 P*0D)"2\J(&1I9W)A<&@@9&5L971E
  1405. XM9"!O<B!N;W0@9F]U;F0@*B\*"7L*"0EI9B H8VAA<C$@/3T@)R G("8F(&UE
  1406. XM=&$I"0DO*B \<W!A8V4^(#QC:&%R/B M+3X@;65T82UC:&%R("HO"@D)"7)E
  1407. XM='5R;B H8VAA<C(@?" P>#@P*3L*"0ER971U<FX@8VAA<C(["@E]"@ER971U
  1408. XM<FX@<F5T=F%L.PI]"@HO*@H@*B!P=70@=&AE(&1I9W)A<&AS(&EN('1H92!A
  1409. XM<F=U;65N="!S=')I;F<@:6X@=&AE(&1I9W)A<&@@=&%B;&4*("H@9F]R;6%T
  1410. XM.B![8S%]>V,R?2!C:&%R('MC,7U[8S)](&-H87(@+BXN"B J+PH)=F]I9 IP
  1411. XM=71D:6=R87!H*'-T<BD*"6-H87)?=2 J<W1R.PI["@EI;G0)"6-H87(Q+"!C
  1412. XM:&%R,BP@;CL*"6-H87)?=0DH*FYE=W1A8BE;,UT["@EI;G0)"6D["@H)=VAI
  1413. XM;&4@*"IS='(I"@E["@D)<VMI<'-P86-E*"9S='(I.PH)"6EF("@H8VAA<C$@
  1414. XM/2 J<W1R*RLI(#T](# @?'P@*&-H87(R(#T@*G-T<BLK*2 ]/2 P*0H)"0ER
  1415. XM971U<FX["@D):68@*&-H87(Q(#T]($530R!\?"!C:&%R,B ]/2!%4T,I"@D)
  1416. XM>PH)"0E%35-'*")%<V-A<&4@;F]T(&%L;&]W960@:6X@9&EG<F%P:"(I.PH)
  1417. XM"0ER971U<FX["@D)?0H)"7-K:7!S<&%C92@F<W1R*3L*"0EI9B H(6ES9&EG
  1418. XM:70H*G-T<BDI"@D)>PH)"0EE;7-G*&5?;G5M8F5R*3L*"0D)<F5T=7)N.PH)
  1419. XM"7T*"0EN(#T@9V5T9&EG:71S*"9S='(I.PH)"6EF("AD:6=R87!H;F5W*0D)
  1420. XM+RH@<V5A<F-H('1H92!T86)L92!F;W(@97AI<W1I;F<@96YT<GD@*B\*"0E[
  1421. XM"@D)"69O<B H:2 ](# [(&D@/"!D:6=R87!H8V]U;G0[("LK:2D*"0D)"6EF
  1422. XM("AD:6=R87!H;F5W6VE=6S!=(#T](&-H87(Q("8F(&1I9W)A<&AN97=;:5U;
  1423. XM,5T@/3T@8VAA<C(I"@D)"0E["@D)"0D)9&EG<F%P:&YE=UMI75LR72 ](&X[
  1424. XM"@D)"0D)8G)E86L["@D)"0E]"@D)"6EF("AI(#P@9&EG<F%P:&-O=6YT*0H)
  1425. XM"0D)8V]N=&EN=64["@D)?0H)"6YE=W1A8B ]("AC:&%R7W4@*"HI6S-=*6%L
  1426. XM;&]C*&1I9W)A<&AC;W5N=" J(#,@*R S*3L*"0EI9B H;F5W=&%B*0H)"7L*
  1427. XM"0D);65M;6]V92@H8VAA<B J*6YE=W1A8BP@*&-H87(@*BED:6=R87!H;F5W
  1428. XM+" H<VEZ95]T*2AD:6=R87!H8V]U;G0@*B S*2D["@D)"69R964H9&EG<F%P
  1429. XM:&YE=RD["@D)"61I9W)A<&AN97<@/2!N97=T86(["@D)"61I9W)A<&AN97=;
  1430. XM9&EG<F%P:&-O=6YT75LP72 ](&-H87(Q.PH)"0ED:6=R87!H;F5W6V1I9W)A
  1431. XM<&AC;W5N=%U;,5T@/2!C:&%R,CL*"0D)9&EG<F%P:&YE=UMD:6=R87!H8V]U
  1432. XM;G1=6S)=(#T@;CL*"0D)*RMD:6=R87!H8V]U;G0["@D)?0H)?0I]"@H)=F]I
  1433. XM9 IL:7-T9&EG<F%P:',H*0I["@EI;G0)"6D["@H)<')I;G1D:6=R87!H*$Y5
  1434. XM3$PI.PH);7-G7W-T87)T*"D["@EM<V=?;W5T8VAA<B@G7&XG*3L*"69O<B H
  1435. XM:2 ](# [(&1I9W)A<&AD969A=6QT6VE=6S!=("8F("%G;W1?:6YT.R K*VDI
  1436. XM"@E["@D):68@*&=E=&1I9W)A<&@H9&EG<F%P:&1E9F%U;'1;:5U;,%TL(&1I
  1437. XM9W)A<&AD969A=6QT6VE=6S%=+"!&04Q312D@/3T@9&EG<F%P:&1E9F%U;'1;
  1438. XM:5U;,ETI"@D)"7!R:6YT9&EG<F%P:"AD:6=R87!H9&5F875L=%MI72D["@D)
  1439. XM8G)E86MC:&5C:R@I.PH)?0H)9F]R("AI(#T@,#L@:2 \(&1I9W)A<&AC;W5N
  1440. XM=" F)B A9V]T7VEN=#L@*RMI*0H)>PH)"7!R:6YT9&EG<F%P:"AD:6=R87!H
  1441. XM;F5W6VE=*3L*"0EB<F5A:V-H96-K*"D["@E]"@EM<V=?;W5T8VAA<B@G7&XG
  1442. XM*3L*"7=A:71?<F5T=7)N*%12544I.PD)+RH@8VQE87(@<V-R965N+"!B96-A
  1443. XM=7-E('-O;64@9&EG<F%P:',@;6%Y(&)E('=R;VYG+ H)"0D)"0D)("H@:6X@
  1444. XM=VAI8V@@8V%S92!W92!M97-S960@=7 @3F5X=%-C<F5E;B J+PI]"@H)<W1A
  1445. XM=&EC('9O:60*<')I;G1D:6=R87!H*' I"@EC:&%R7W4@*G ["GL*"6-H87)?
  1446. XM=0D)8G5F6SE=.PH)<W1A=&EC(&EN= EL96X["@H):68@*' @/3T@3E5,3"D*
  1447. XM"0EL96X@/2 P.PH)96QS92!I9B H<%LR72 A/2 P*0H)>PH)"6EF("AL96X@
  1448. XM/B!#;VQU;6YS("T@,3$I"@D)>PH)"0EM<V=?;W5T8VAA<B@G7&XG*3L*"0D)
  1449. XM;&5N(#T@,#L*"0E]"@D):68@*&QE;BD*"0D);7-G7V]U='-T<B@H8VAA<E]U
  1450. XM("HI(B @("(I.PH)"7-P<FEN=&8H*&-H87(@*BEB=68L("(E8R5C("5C("4S
  1451. XM9"(L('!;,%TL('!;,5TL('!;,ETL('!;,ETI.PH)"6US9U]O=71S='(H8G5F
  1452. XL*3L*"0EL96X@*ST@,3$["@E]"GT*"B-E;F1I9B O*B!$24=205!(4R J+PIF
  1453. Xend
  1454. END_OF_FILE
  1455.   if test 11504 -ne `wc -c <'vim/src/digraph.c.UU'`; then
  1456.     echo shar: \"'vim/src/digraph.c.UU'\" unpacked with wrong size!
  1457.   else
  1458.     echo shar: Uudecoding \"'vim/src/digraph.c'\" \(8324 characters\)
  1459.     cat vim/src/digraph.c.UU | uudecode
  1460.     if test 8324 -ne `wc -c <'vim/src/digraph.c'`; then
  1461.       echo shar: \"'vim/src/digraph.c'\" uudecoded with wrong size!
  1462.     else
  1463.       rm vim/src/digraph.c.UU
  1464.     fi
  1465.   fi
  1466.   # end of 'vim/src/digraph.c.UU'
  1467. fi
  1468. if test -f 'vim/src/makefile.nt' -a "${1}" != "-c" ; then 
  1469.   echo shar: Will not clobber existing file \"'vim/src/makefile.nt'\"
  1470. else
  1471.   echo shar: Extracting \"'vim/src/makefile.nt'\" \(5138 characters\)
  1472.   sed "s/^X//" >'vim/src/makefile.nt' <<'END_OF_FILE'
  1473. X!include <ntwin32.mak>
  1474. X#
  1475. X# Makefile for VIM on WINNT, using MS SDK
  1476. X#
  1477. X
  1478. X#>>>>> choose options:
  1479. X### -DDIGRAPHS        digraph support (at the cost of 1.6 Kbyte code)
  1480. X### -DCOMPATIBLE    start in vi-compatible mode
  1481. X### -DNOBACKUP        default is no backup file
  1482. X### -DDEBUG        output a lot of debugging garbage
  1483. X### -DTERMCAP        include termcap file support
  1484. X### -DNO_BUILTIN_TCAPS    do not include builtin termcap entries
  1485. X###                (use only with -DTERMCAP)
  1486. X### -DSOME_BUILTIN_TCAPS include most useful builtin termcap entries
  1487. X###                (use only without -DNO_BUILTIN_TCAPS)
  1488. X### -DALL_BUILTIN_TCAPS    include all builtin termcap entries
  1489. X###                (use only without -DNO_BUILTIN_TCAPS)
  1490. X### -DVIMRC_FILE    name of the .vimrc file in current dir
  1491. X### -DEXRC_FILE        name of the .exrc file in current dir
  1492. X### -DSYSVIMRC_FILE    name of the global .vimrc file
  1493. X### -DSYSEXRC_FILE    name of the global .exrc file
  1494. X### -DDEFVIMRC_FILE    name of the system-wide .vimrc file
  1495. X### -DVIM_HLP        name of the help file
  1496. X### -DWEBB_COMPLETE    include Webb's code for command line completion
  1497. X### -DWEBB_KEYWORD_COMPL include Webb's code for keyword completion
  1498. X### -DNOTITLE        'title' option off by default
  1499. XDEFINES = -DDIGRAPHS -DWEBB_COMPLETE -DWEBB_KEYWORD_COMPL
  1500. X
  1501. X#>>>>> name of the compiler and linker, name of lib directory
  1502. XCC = cl
  1503. XLINK = cl /ML /Fe$@ /Zi
  1504. XLIB = c:\mstools\lib
  1505. X
  1506. X#CFLAGS = -c -DMSDOS -DNT $(DEFINES) /Zi
  1507. XCFLAGS = -c -DMSDOS -DNT $(DEFINES) /Ox
  1508. X
  1509. X
  1510. X#>>>>> end of choices
  1511. X###########################################################################
  1512. X
  1513. XINCL = vim.h globals.h param.h keymap.h macros.h ascii.h term.h msdos.h structs.h
  1514. X
  1515. XOBJ =    obj/alloc.obj obj/winnt.obj obj/buffer.obj obj/charset.obj obj/cmdcmds.obj obj/cmdline.obj \
  1516. X    obj/csearch.obj obj/digraph.obj obj/edit.obj obj/fileio.obj obj/getchar.obj obj/help.obj \
  1517. X    obj/linefunc.obj obj/main.obj obj/mark.obj obj/memfile.obj obj/memline.obj obj/message.obj obj/misccmds.obj \
  1518. X    obj/normal.obj obj/ops.obj obj/param.obj obj/quickfix.obj obj/regexp.obj \
  1519. X    obj/regsub.obj obj/screen.obj obj/search.obj \
  1520. X    obj/tag.obj obj/term.obj obj/undo.obj obj/window.obj $(TERMLIB)
  1521. X
  1522. X..\vim: $(OBJ) version.obj
  1523. X    $(link) $(linkdebug) $(conflags) -out:$*.exe $** $(conlibs) \
  1524. X        user32.lib
  1525. X        del version.obj
  1526. X
  1527. Xctags:
  1528. X    command /c ctags *.c *.h
  1529. X
  1530. Xclean:
  1531. X    del $(OBJ) version.obj mkcmdtab.obj ..\vim mkcmdtab cmdtab.h
  1532. X
  1533. Xaddcr:    addcr.c
  1534. X    $(CC) addcr.c
  1535. X    command /c addcr.bat
  1536. X
  1537. X###########################################################################
  1538. X
  1539. Xobj/alloc.obj:    alloc.c  $(INCL)
  1540. X    $(CC) $(CFLAGS) alloc.c /Foobj/alloc.obj
  1541. X
  1542. Xobj/winnt.obj:    msdos.c  $(INCL) msdos.h
  1543. X    $(CC) $(CFLAGS) winnt.c /Foobj/winnt.obj
  1544. X
  1545. Xobj/buffer.obj:    buffer.c  $(INCL)
  1546. X    $(CC) $(CFLAGS) buffer.c /Foobj/buffer.obj
  1547. X
  1548. Xobj/charset.obj:    charset.c  $(INCL)
  1549. X    $(CC) $(CFLAGS) charset.c /Foobj/charset.obj
  1550. X
  1551. Xobj/cmdcmds.obj:    cmdcmds.c  $(INCL)
  1552. X    $(CC) $(CFLAGS) cmdcmds.c /Foobj/cmdcmds.obj
  1553. X
  1554. Xobj/cmdline.obj:    cmdline.c  $(INCL) cmdtab.h
  1555. X    $(CC) $(CFLAGS) cmdline.c /Foobj/cmdline.obj
  1556. X
  1557. Xobj/csearch.obj:    csearch.c  $(INCL)
  1558. X    $(CC) $(CFLAGS) csearch.c /Foobj/csearch.obj
  1559. X
  1560. Xobj/digraph.obj:    digraph.c  $(INCL)
  1561. X    $(CC) $(CFLAGS) digraph.c /Foobj/digraph.obj
  1562. X
  1563. Xobj/edit.obj:    edit.c  $(INCL)
  1564. X    $(CC) $(CFLAGS) edit.c /Foobj/edit.obj
  1565. X
  1566. Xobj/fileio.obj:    fileio.c  $(INCL)
  1567. X    $(CC) $(CFLAGS) fileio.c /Foobj/fileio.obj
  1568. X
  1569. Xobj/getchar.obj:    getchar.c  $(INCL)
  1570. X    $(CC) $(CFLAGS) getchar.c /Foobj/getchar.obj
  1571. X
  1572. Xobj/help.obj:    help.c  $(INCL)
  1573. X    $(CC) $(CFLAGS) help.c /Foobj/help.obj
  1574. X
  1575. Xobj/linefunc.obj:    linefunc.c  $(INCL)
  1576. X    $(CC) $(CFLAGS) linefunc.c /Foobj/linefunc.obj
  1577. X
  1578. Xobj/main.obj:    main.c  $(INCL)
  1579. X    $(CC) $(CFLAGS) main.c /Foobj/main.obj
  1580. X
  1581. Xobj/mark.obj:    mark.c  $(INCL)
  1582. X    $(CC) $(CFLAGS) mark.c /Foobj/mark.obj
  1583. X
  1584. Xobj/memfile.obj:    memfile.c  $(INCL)
  1585. X    $(CC) $(CFLAGS) memfile.c /Foobj/memfile.obj
  1586. X
  1587. Xobj/memline.obj:    memline.c  $(INCL)
  1588. X    $(CC) $(CFLAGS) memline.c /Foobj/memline.obj
  1589. X
  1590. Xobj/message.obj:    message.c  $(INCL)
  1591. X    $(CC) $(CFLAGS) message.c /Foobj/message.obj
  1592. X
  1593. Xobj/misccmds.obj:    misccmds.c  $(INCL)
  1594. X    $(CC) $(CFLAGS) misccmds.c /Foobj/misccmds.obj
  1595. X
  1596. Xobj/normal.obj:    normal.c  $(INCL) ops.h
  1597. X    $(CC) $(CFLAGS) normal.c /Foobj/normal.obj
  1598. X
  1599. Xobj/ops.obj:    ops.c  $(INCL) ops.h
  1600. X    $(CC) $(CFLAGS) ops.c /Foobj/ops.obj
  1601. X
  1602. Xobj/param.obj:    param.c  $(INCL)
  1603. X    $(CC) $(CFLAGS) param.c /Foobj/param.obj
  1604. X
  1605. Xobj/quickfix.obj:    quickfix.c  $(INCL)
  1606. X    $(CC) $(CFLAGS) quickfix.c /Foobj/quickfix.obj
  1607. X
  1608. Xobj/regexp.obj:    regexp.c  $(INCL)
  1609. X    $(CC) $(CFLAGS) regexp.c /Foobj/regexp.obj
  1610. X
  1611. Xobj/regsub.obj:    regsub.c  $(INCL)
  1612. X    $(CC) $(CFLAGS) regsub.c /Foobj/regsub.obj
  1613. X
  1614. Xobj/screen.obj:    screen.c  $(INCL)
  1615. X    $(CC) $(CFLAGS) screen.c /Foobj/screen.obj
  1616. X
  1617. Xobj/search.obj:    search.c  $(INCL)
  1618. X    $(CC) $(CFLAGS) search.c /Foobj/search.obj
  1619. X
  1620. Xobj/tag.obj:    tag.c  $(INCL)
  1621. X    $(CC) $(CFLAGS) tag.c /Foobj/tag.obj
  1622. X
  1623. Xobj/term.obj:    term.c  $(INCL)
  1624. X    $(CC) $(CFLAGS) term.c /Foobj/term.obj
  1625. X
  1626. Xobj/undo.obj:    undo.c  $(INCL)
  1627. X    $(CC) $(CFLAGS) undo.c /Foobj/undo.obj
  1628. X
  1629. Xobj/window.obj:    window.c  $(INCL)
  1630. X    $(CC) $(CFLAGS) window.c /Foobj/window.obj
  1631. X
  1632. Xcmdtab.h: cmdtab.tab mkcmdtab.exe
  1633. X    mkcmdtab cmdtab.tab cmdtab.h
  1634. X
  1635. Xmkcmdtab.exe: obj/mkcmdtab.obj
  1636. X    $(link) $(linkdebug) $(conflags) -out:$*.exe $** $(conlibs) \
  1637. X        user32.lib
  1638. X
  1639. Xobj/mkcmdtab.obj: mkcmdtab.c
  1640. X    $(CC) $(CFLAGS) mkcmdtab.c /Foobj/mkcmdtab.obj
  1641. END_OF_FILE
  1642.   if test 5138 -ne `wc -c <'vim/src/makefile.nt'`; then
  1643.     echo shar: \"'vim/src/makefile.nt'\" unpacked with wrong size!
  1644.   fi
  1645.   # end of 'vim/src/makefile.nt'
  1646. fi
  1647. if test -f 'vim/src/tag.c' -a "${1}" != "-c" ; then 
  1648.   echo shar: Will not clobber existing file \"'vim/src/tag.c'\"
  1649. else
  1650.   echo shar: Extracting \"'vim/src/tag.c'\" \(11552 characters\)
  1651.   sed "s/^X//" >'vim/src/tag.c' <<'END_OF_FILE'
  1652. X/* vi:ts=4:sw=4
  1653. X *
  1654. X * VIM - Vi IMproved        by Bram Moolenaar
  1655. X *
  1656. X * Read the file "credits.txt" for a list of people who contributed.
  1657. X * Read the file "uganda.txt" for copying and usage conditions.
  1658. X */
  1659. X
  1660. X/*
  1661. X * Code to handle tags and the tag stack
  1662. X */
  1663. X
  1664. X#include "vim.h"
  1665. X#include "globals.h"
  1666. X#include "proto.h"
  1667. X#include "param.h"
  1668. X
  1669. Xstatic int findtag __ARGS((char_u *));
  1670. Xstatic char_u *bottommsg = (char_u *)"at bottom of tag stack";
  1671. Xstatic char_u *topmsg = (char_u *)"at top of tag stack";
  1672. X
  1673. X/*
  1674. X * Jump to tag; handling of tag stack
  1675. X *
  1676. X * *tag != NUL (:tag): jump to new tag, add to tag stack
  1677. X * type == 1 (:pop) || type == 2 (CTRL-T): jump to old position
  1678. X * type == 0 (:tag): jump to old tag
  1679. X */
  1680. X    void
  1681. Xdotag(tag, type, count)
  1682. X    char_u    *tag;
  1683. X    int        type;
  1684. X    int        count;
  1685. X{
  1686. X    int             i;
  1687. X    struct taggy    *tagstack = curwin->w_tagstack;
  1688. X    int                tagstackidx = curwin->w_tagstackidx;
  1689. X    int                tagstacklen = curwin->w_tagstacklen;
  1690. X
  1691. X    if (*tag != NUL)                        /* new pattern, add to the stack */
  1692. X    {
  1693. X        /*
  1694. X         * if last used entry is not at the top, delete all tag stack entries
  1695. X         * above it.
  1696. X         */
  1697. X        while (tagstackidx < tagstacklen)
  1698. X            free(tagstack[--tagstacklen].tagname);
  1699. X
  1700. X                /* if tagstack is full: remove oldest entry */
  1701. X        if (++tagstacklen > TAGSTACKSIZE)
  1702. X        {
  1703. X            tagstacklen = TAGSTACKSIZE;
  1704. X            free(tagstack[0].tagname);
  1705. X            for (i = 1; i < tagstacklen; ++i)
  1706. X                tagstack[i - 1] = tagstack[i];
  1707. X            --tagstackidx;
  1708. X        }
  1709. X    /*
  1710. X     * put the tag name in the tag stack
  1711. X     * the position is added below
  1712. X     */
  1713. X        tagstack[tagstackidx].tagname = strsave(tag);
  1714. X    }
  1715. X    else if (tagstacklen == 0)                    /* empty stack */
  1716. X    {
  1717. X        EMSG("tag stack empty");
  1718. X        goto end_dotag;
  1719. X    }
  1720. X    else if (type)                                /* go to older position */
  1721. X    {
  1722. X        if ((tagstackidx -= count) < 0)
  1723. X        {
  1724. X            emsg(bottommsg);
  1725. X            if (tagstackidx + count == 0)
  1726. X            {
  1727. X                /* We did ^T (or <num>^T) from the bottom of the stack */
  1728. X                tagstackidx = 0;
  1729. X                goto end_dotag;
  1730. X            }
  1731. X            /* We weren't at the bottom of the stack, so jump all the way to
  1732. X             * the bottom.
  1733. X             */
  1734. X            tagstackidx = 0;
  1735. X        }
  1736. X        else if (tagstackidx >= tagstacklen)    /* must have been count == 0 */
  1737. X        {
  1738. X            emsg(topmsg);
  1739. X            goto end_dotag;
  1740. X        }
  1741. X        if (tagstack[tagstackidx].fmark.fnum != curbuf->b_fnum)    /* jump to other file */
  1742. X        {
  1743. X            if (buflist_getfile(tagstack[tagstackidx].fmark.fnum, tagstack[tagstackidx].fmark.mark.lnum, TRUE) == FAIL)
  1744. X            {
  1745. X                /* emsg(e_notopen); */
  1746. X                goto end_dotag;
  1747. X            }
  1748. X        }
  1749. X        else
  1750. X            curwin->w_cursor.lnum = tagstack[tagstackidx].fmark.mark.lnum;
  1751. X        curwin->w_cursor.col = tagstack[tagstackidx].fmark.mark.col;
  1752. X        curwin->w_set_curswant = TRUE;
  1753. X        goto end_dotag;
  1754. X    }
  1755. X    else                                    /* go to newer pattern */
  1756. X    {
  1757. X        if ((tagstackidx += count - 1) >= tagstacklen)
  1758. X        {
  1759. X            tagstackidx = tagstacklen - 1;
  1760. X            emsg(topmsg);
  1761. X        }
  1762. X        else if (tagstackidx < 0)            /* must have been count == 0 */
  1763. X        {
  1764. X            emsg(bottommsg);
  1765. X            tagstackidx = 0;
  1766. X            goto end_dotag;
  1767. X        }
  1768. X    }
  1769. X    /*
  1770. X     * For :tag [arg], remember position before the jump
  1771. X     */
  1772. X    if (type == 0)
  1773. X    {
  1774. X        tagstack[tagstackidx].fmark.mark = curwin->w_cursor;
  1775. X        tagstack[tagstackidx].fmark.fnum = curbuf->b_fnum;
  1776. X    }
  1777. X    if (findtag(tagstack[tagstackidx].tagname) > 0)
  1778. X        ++tagstackidx;
  1779. X
  1780. Xend_dotag:
  1781. X    curwin->w_tagstackidx = tagstackidx;
  1782. X    curwin->w_tagstacklen = tagstacklen;
  1783. X}
  1784. X
  1785. X/*
  1786. X * Print the tag stack
  1787. X */
  1788. X    void
  1789. Xdotags()
  1790. X{
  1791. X    int                i;
  1792. X    char_u            *name;
  1793. X    struct taggy    *tagstack = curwin->w_tagstack;
  1794. X    int                tagstackidx = curwin->w_tagstackidx;
  1795. X    int                tagstacklen = curwin->w_tagstacklen;
  1796. X
  1797. X    gotocmdline(TRUE, NUL);
  1798. X    msg_outstr((char_u *)"\n  # TO tag      FROM line in file\n");
  1799. X    for (i = 0; i < tagstacklen; ++i)
  1800. X    {
  1801. X        if (tagstack[i].tagname != NULL)
  1802. X        {
  1803. X            name = fm_getname(&(tagstack[i].fmark));
  1804. X            if (name == NULL)        /* file name not available */
  1805. X                continue;
  1806. X
  1807. X            sprintf((char *)IObuff, "%c%2d %-15s %4ld  %s\n",
  1808. X                i == tagstackidx ? '>' : ' ',
  1809. X                i + 1,
  1810. X                tagstack[i].tagname,
  1811. X                tagstack[i].fmark.mark.lnum,
  1812. X                name);
  1813. X            msg_outstr(IObuff);
  1814. X        }
  1815. X        flushbuf();                    /* show one line at a time */
  1816. X    }
  1817. X    if (tagstackidx == tagstacklen)        /* idx at top of stack */
  1818. X        msg_outstr((char_u *)">\n");
  1819. X    wait_return(FALSE);
  1820. X}
  1821. X
  1822. X/*
  1823. X * findtag(tag) - goto tag
  1824. X *   return 0 for failure, 1 for success
  1825. X */
  1826. X    static int
  1827. Xfindtag(tag)
  1828. X    char_u           *tag;
  1829. X{
  1830. X    FILE       *tp;
  1831. X    char_u        lbuf[LSIZE];
  1832. X    char_u        pbuf[LSIZE];            /* search pattern buffer */
  1833. X    char_u       *fname, *str;
  1834. X    int            cmplen;
  1835. X    char_u        *m = (char_u *)"No tags file";
  1836. X    char_u        *marg = NULL;
  1837. X    register char_u    *p;
  1838. X    char_u        *p2;
  1839. X    char_u        *np;                    /* pointer into file name string */
  1840. X    char_u        sbuf[CMDBUFFSIZE + 1];    /* tag file name */
  1841. X    int            i;
  1842. X    int            save_secure;
  1843. X    int            save_p_ws;
  1844. X
  1845. X    if (tag == NULL)        /* out of memory condition */
  1846. X        return 0;
  1847. X
  1848. X    if ((cmplen = p_tl) == 0)
  1849. X        cmplen = 999;
  1850. X
  1851. X    /* get stack of tag file names from tags option */
  1852. X    for (np = p_tags; *np; )
  1853. X    {
  1854. X        for (i = 0; i < CMDBUFFSIZE && *np; ++i)    /* copy next file name into lbuf */
  1855. X        {
  1856. X            if (*np == ' ')
  1857. X            {
  1858. X                ++np;
  1859. X                break;
  1860. X            }
  1861. X            sbuf[i] = *np++;
  1862. X        }
  1863. X        sbuf[i] = 0;
  1864. X        if ((tp = fopen((char *)sbuf, "r")) == NULL)
  1865. X            continue;
  1866. X        reg_ic = p_ic;                                        /* for cstrncmp() */
  1867. X        while (fgets((char *)lbuf, LSIZE, tp) != NULL)
  1868. X        {
  1869. X            m = (char_u *)"Format error in tags file %s";    /* default error message */
  1870. X            marg = sbuf;
  1871. X
  1872. X        /* find start of file name, after first white space */
  1873. X            fname = lbuf;
  1874. X            skiptospace(&fname);    /* skip tag */
  1875. X            if (*fname == NUL)
  1876. X                goto erret;
  1877. X            *fname++ = '\0';
  1878. X
  1879. X            if (cstrncmp(lbuf, tag, cmplen) == 0)    /* Tag found */
  1880. X            {
  1881. X                fclose(tp);
  1882. X                skipspace(&fname);
  1883. X
  1884. X            /* find start of search command, after second white space */
  1885. X                str = fname;
  1886. X                skiptospace(&str);
  1887. X                if (*str == NUL)
  1888. X                    goto erret;
  1889. X                *str++ = '\0';
  1890. X                skipspace(&str);
  1891. X
  1892. X                /*
  1893. X                 * If the command is a string like "/^function fname"
  1894. X                 * scan through the search string. If we see a magic
  1895. X                 * char, we have to quote it. This lets us use "real"
  1896. X                 * implementations of ctags.
  1897. X                 */
  1898. X                if (*str == '/' || *str == '?')
  1899. X                {
  1900. X                    p = pbuf;
  1901. X                    *p++ = *str++;            /* copy the '/' or '?' */
  1902. X                    if (*str == '^')
  1903. X                        *p++ = *str++;            /* copy the '^' */
  1904. X
  1905. X                    while (*str)
  1906. X                    {
  1907. X                        switch (*str)
  1908. X                        {
  1909. X                        case '\\':    if (str[1] == '(')    /* remove '\' before '(' */
  1910. X                                        ++str;
  1911. X                                    else
  1912. X                                        *p++ = *str++;
  1913. X                                    break;
  1914. X
  1915. X                        case '\r':
  1916. X                        case '\n':    *str = pbuf[0];    /* copy '/' or '?' */
  1917. X                                    str[1] = NUL;    /* delete NL after CR */
  1918. X                                    break;
  1919. X
  1920. X                                    /*
  1921. X                                     * if string ends in search character: skip it
  1922. X                                     * else escape it with '\'
  1923. X                                     */
  1924. X                        case '/':
  1925. X                        case '?':    if (*str != pbuf[0])    /* not the search char */
  1926. X                                        break;
  1927. X                                                            /* last char */
  1928. X                                    if (str[1] == '\n' || str[1] == '\r')
  1929. X                                    {
  1930. X                                        ++str;
  1931. X                                        continue;
  1932. X                                    }
  1933. X                        case '[':
  1934. X                                    if (!p_magic)
  1935. X                                        break;
  1936. X                        case '^':
  1937. X                        case '*':
  1938. X                        case '.':    *p++ = '\\';
  1939. X                                    break;
  1940. X                        }
  1941. X                        *p++ = *str++;
  1942. X                    }
  1943. X                }
  1944. X                else        /* not a search command, just copy it */
  1945. X                    for (p = pbuf; *str && *str != '\n'; )
  1946. X                        *p++ = *str++;
  1947. X                *p = NUL;
  1948. X
  1949. X                /*
  1950. X                 * expand filename (for environment variables)
  1951. X                 */
  1952. X                if ((p = ExpandOne((char_u *)fname, 1, -1)) != NULL)
  1953. X                    fname = p;
  1954. X                /*
  1955. X                 * if 'tagrelative' option set, may change file name
  1956. X                 */
  1957. X                if (p_tr && !isFullName(fname) && (p2 = gettail(sbuf)) != sbuf)
  1958. X                {
  1959. X                    STRNCPY(p2, fname, CMDBUFFSIZE - (p2 - sbuf));
  1960. X                    fname = sbuf;
  1961. X                }
  1962. X                /*
  1963. X                 * check if file for tag exists before abandoning current file
  1964. X                 */
  1965. X                if (getperm(fname) < 0)
  1966. X                {
  1967. X                    m = (char_u *)"File \"%s\" does not exist";
  1968. X                    marg = fname;
  1969. X                    goto erret;
  1970. X                }
  1971. X
  1972. X                RedrawingDisabled = TRUE;
  1973. X                /*
  1974. X                 * if it was a CTRL-W CTRL-] command split window now
  1975. X                 */
  1976. X                if (postponed_split)
  1977. X                    win_split(0L, FALSE);
  1978. X                i = getfile(fname, NULL, TRUE, (linenr_t)0);
  1979. X                if (p)
  1980. X                    free(p);
  1981. X                if (i <= 0)
  1982. X                {
  1983. X                    curwin->w_set_curswant = TRUE;
  1984. X                    postponed_split = FALSE;
  1985. X
  1986. X                    RedrawingDisabled = FALSE;
  1987. X                    save_secure = secure;
  1988. X                    secure = 1;
  1989. X                    tag_busy = TRUE;            /* don't set marks for this search */
  1990. X                    keep_old_search_pattern = TRUE;
  1991. X
  1992. X                    /*
  1993. X                     * if the command is a search, try here
  1994. X                     *
  1995. X                     * Rather than starting at line one, just turn wrap-scan
  1996. X                     * on temporarily, this ensures that tags on line 1 will
  1997. X                     * be found, and makes sure our guess searches search the
  1998. X                     * whole file when repeated -- webb.
  1999. X                     */
  2000. X                    if (pbuf[0] == '/' || pbuf[0] == '?')
  2001. X                    {
  2002. X                        save_p_ws = p_ws;
  2003. X                        p_ws = TRUE;        /* Switch wrap-scan on temporarily */
  2004. X                        if (!dosearch(pbuf[0], pbuf + 1, FALSE, (long)1, FALSE, FALSE))
  2005. X                        {
  2006. X                            register int notfound = FALSE;
  2007. X
  2008. X                            /*
  2009. X                             * Failed to find pattern, take a guess:
  2010. X                             */
  2011. X                            sprintf((char *)pbuf, "^%s(", lbuf);
  2012. X                            if (!dosearch('/', pbuf, FALSE, (long)1, FALSE, FALSE))
  2013. X                            {
  2014. X                                /* Guess again: */
  2015. X                                sprintf((char *)pbuf, "^[#a-zA-Z_].*%s(", lbuf);
  2016. X                                if (!dosearch('/', pbuf, FALSE, (long)1, FALSE, FALSE))
  2017. X                                    notfound = TRUE;
  2018. X                            }
  2019. X                            if (notfound)
  2020. X                                EMSG("Can't find tag pattern");
  2021. X                            else
  2022. X                            {
  2023. X                                MSG("Couldn't find tag, just guessing!");
  2024. X                                sleep(1);
  2025. X                            }
  2026. X                        }
  2027. X                        p_ws = save_p_ws;
  2028. X                    }
  2029. X                    else
  2030. X                    {
  2031. X                        curwin->w_cursor.lnum = 1;    /* start command in line 1 */
  2032. X                        docmdline(pbuf);
  2033. X                    }
  2034. X
  2035. X                    tag_busy = FALSE;
  2036. X                    keep_old_search_pattern = FALSE;
  2037. X                    if (secure == 2)            /* done something that is not allowed */
  2038. X                        wait_return(TRUE);
  2039. X                    secure = save_secure;
  2040. X
  2041. X                        /* print the file message after redraw */
  2042. X                    if (p_im && i == -1)
  2043. X                        stuffReadbuff((char_u *)"\033\007i");    /* ESC CTRL-G i */
  2044. X                    else
  2045. X                        stuffcharReadbuff('\007');        /* CTRL-G */
  2046. X                    return 1;
  2047. X                }
  2048. X                RedrawingDisabled = FALSE;
  2049. X                if (postponed_split)            /* close the window */
  2050. X                {
  2051. X                    close_window(FALSE);
  2052. X                    postponed_split = FALSE;
  2053. X                }
  2054. X                return 0;
  2055. X            }
  2056. X        }
  2057. X        m = NULL;
  2058. X
  2059. Xerret:
  2060. X        fclose(tp);
  2061. X        if (m)
  2062. X            emsg2(m, marg);
  2063. X    }
  2064. X    if (m == NULL)
  2065. X        EMSG("tag not found");
  2066. X    else if (marg == NULL)
  2067. X        emsg(m);
  2068. X    return 0;
  2069. X}
  2070. X
  2071. X#ifdef WEBB_COMPLETE
  2072. X    int
  2073. XExpandTags(prog, num_file, file)
  2074. X    regexp *prog;
  2075. X    int *num_file;
  2076. X    char_u ***file;
  2077. X{
  2078. X    char_u    **matches, **new_matches;
  2079. X    char_u    tag_file[CMDBUFFSIZE + 1];
  2080. X    char_u    line[LSIZE];
  2081. X    char_u    *np;
  2082. X    char_u    *p;
  2083. X    int        limit = 100;
  2084. X    int        index;
  2085. X    int        i;
  2086. X    int        lnum;
  2087. X    FILE    *fp;
  2088. X
  2089. X    matches = (char_u **) alloc((unsigned)(limit * sizeof(char_u *)));
  2090. X    if (matches == NULL)
  2091. X        return FAIL;
  2092. X    index = 0;
  2093. X    for (np = p_tags; *np; )
  2094. X    {
  2095. X        for (i = 0; i < CMDBUFFSIZE && *np && *np != ' '; i++)
  2096. X            tag_file[i] = *np++;
  2097. X        tag_file[i] = NUL;
  2098. X        skipspace(&np);
  2099. X        if ((fp = fopen((char *)tag_file, "r")) == NULL)
  2100. X            continue;
  2101. X        lnum = 0;
  2102. X        while (!vim_fgets(line, LSIZE, fp, &lnum))
  2103. X        {
  2104. X            if (regexec(prog, line, TRUE))
  2105. X            {
  2106. X                p = line;
  2107. X                skiptospace(&p);
  2108. X                *p = NUL;
  2109. X                if (index == limit)
  2110. X                {
  2111. X                    limit *= 2;
  2112. X                    new_matches = (char_u **) alloc((unsigned)(limit * sizeof(char_u *)));
  2113. X                    if (new_matches == NULL)
  2114. X                    {
  2115. X                        /* We'll miss some matches, oh well */
  2116. X                        *file = matches;
  2117. X                        *num_file = index;
  2118. X                        return OK;
  2119. X                    }
  2120. X                    for (i = 0; i < index; i++)
  2121. X                        new_matches[i] = matches[i];
  2122. X                    free(matches);
  2123. X                    matches = new_matches;
  2124. X                }
  2125. X                matches[index++] = strsave(line);
  2126. X            }
  2127. X        }
  2128. X    }
  2129. X    if (index > 0)
  2130. X    {
  2131. X        new_matches = *file = (char_u **) alloc((unsigned)(index * sizeof(char_u *)));
  2132. X        if (new_matches == NULL)
  2133. X        {
  2134. X            *file = matches;
  2135. X            *num_file = index;
  2136. X            return OK;
  2137. X        }
  2138. X        for (i = 0; i < index; i++)
  2139. X            new_matches[i] = matches[i];
  2140. X    }
  2141. X    free(matches);
  2142. X    *num_file = index;
  2143. X    return OK;
  2144. X}
  2145. X#endif /* WEBB_COMPLETE */
  2146. END_OF_FILE
  2147.   if test 11552 -ne `wc -c <'vim/src/tag.c'`; then
  2148.     echo shar: \"'vim/src/tag.c'\" unpacked with wrong size!
  2149.   fi
  2150.   # end of 'vim/src/tag.c'
  2151. fi
  2152. echo shar: End of archive 22 \(of 26\).
  2153. cp /dev/null ark22isdone
  2154. MISSING=""
  2155. 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
  2156.     if test ! -f ark${I}isdone ; then
  2157.     MISSING="${MISSING} ${I}"
  2158.     fi
  2159. done
  2160. if test "${MISSING}" = "" ; then
  2161.     echo You have unpacked all 26 archives.
  2162.     rm -f ark[1-9]isdone ark[1-9][0-9]isdone
  2163. else
  2164.     echo You still must unpack the following archives:
  2165.     echo "        " ${MISSING}
  2166. fi
  2167. exit 0
  2168. exit 0 # Just in case...
  2169.