home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 January / usenetsourcesnewsgroupsinfomagicjanuary1994.iso / sources / misc / volume41 / vim / part07 < prev    next >
Encoding:
Text File  |  1993-12-20  |  52.9 KB  |  1,510 lines

  1. Newsgroups: comp.sources.misc
  2. From: mool@oce.nl (Bram Moolenaar)
  3. Subject: v41i057:  vim - Vi IMitation editor, v2.0, Part07/25
  4. Message-ID: <1993Dec21.034510.27449@sparky.sterling.com>
  5. X-Md4-Signature: 833443fade2b4b530fd2e93ce0049e49
  6. Keywords: utility, editor, vi, vim
  7. Sender: kent@sparky.sterling.com (Kent Landfield)
  8. Organization: Sterling Software
  9. Date: Tue, 21 Dec 1993 03:45:10 GMT
  10. Approved: kent@sparky.sterling.com
  11.  
  12. Submitted-by: mool@oce.nl (Bram Moolenaar)
  13. Posting-number: Volume 41, Issue 57
  14. Archive-name: vim/part07
  15. Environment: UNIX, AMIGA, MS-DOS
  16. Supersedes: vim: Volume 37, Issue 1-24
  17.  
  18. #! /bin/sh
  19. # This is a shell archive.  Remove anything before this line, then unpack
  20. # it by saving it into a file and typing "sh file".  To overwrite existing
  21. # files, type "sh file -c".  You can also feed this as standard input via
  22. # unshar, or by typing "sh <file", e.g..  If this archive is complete, you
  23. # will see the following message at the end:
  24. #        "End of archive 7 (of 25)."
  25. # Contents:  vim/macros/maze/maze_mac.uue vim/src/misccmds.c
  26. #   vim/src/version.c
  27. # Wrapped by mool@oce-rd2 on Wed Dec 15 09:50:05 1993
  28. PATH=/bin:/usr/bin:/usr/ucb ; export PATH
  29. if test -f 'vim/macros/maze/maze_mac.uue' -a "${1}" != "-c" ; then 
  30.   echo shar: Will not clobber existing file \"'vim/macros/maze/maze_mac.uue'\"
  31. else
  32. echo shar: Extracting \"'vim/macros/maze/maze_mac.uue'\" \(17071 characters\)
  33. sed "s/^X//" >'vim/macros/maze/maze_mac.uue' <<'END_OF_FILE'
  34. X
  35. Xbegin 644 maze_mac
  36. XM(B!4:&5S92!M86-R;W,@)W-O;'9E)R!A;GD@;6%Z92!P<F]D=6-E9"!B>2!TQ
  37. XM:&4@82UM87IE+6EN9R!M87IE+F,@<')O9W)A;2X*(B`*(B!&:7)S="P@82!B&
  38. XM:70@;V8@;6%Z92!T:&5O<GDN"B(@268@>6]U('=E<F4@<'5T(&EN=&\@82!MT
  39. XM87IE+"!A(&=U87)A;G1E960@;65T:&]D(&]F(&9I;F1I;F<@>6]U<B!W87D*L
  40. XM(B!O=70@;V8@=&AE(&UA>F4@:7,@=&\@<'5T('EO=7(@;&5F="!H86YD(&]NG
  41. XM=&\@82!W86QL(&%N9"!J=7-T(&ME97`@=V%L:VEN9RP*(B!N979E<B!T86MI@
  42. XM;F<@>6]U<B!H86YD(&]F9B!T:&4@=V%L;"X@5&AI<R!T96-H;FEQ=64@:7,@S
  43. XM;VYL>2!G=6%R86YT965D('1O"B(@=V]R:R!I9B!T:&4@;6%Z92!D;V5S(&YOY
  44. XM="!H879E(&%N>2`G:7-L86YD<R<L(&]R(&EF('1H92`G97AI="<@:7,@;VX@Z
  45. XM=&AE"B(@<V%M92!I<VQA;F0@87,@>6]U<B!S=&%R=&EN9R!P;VEN="X@5&AEV
  46. XM<V4@8V]N9&ET:6]N<R!H;VQD(&9O<B!T:&4@;6%Z97,*(B!U;F1E<B!C;VYS^
  47. XM:61E<F%T:6]N+@HB(`HB($%S<W5M:6YG('1H870@=&AE(&UA>F4@:7,@;6%D9
  48. XM92!U<"!O9B!H;W)I>F]N=&%L(&%N9"!V97)T:6-A;"!W86QL<R!S<&%C960*S
  49. XM(B!O;F4@<W1E<"!A<&%R="!A;F0@=&AA="!Y;W4@8V%N(&UO=F4@96ET:&5R#
  50. XM(&YO<G1H+"!S;W5T:"P@96%S="!O<B!W97-T+`HB('1H96X@>6]U(&-A;B!A>
  51. XM=71O;6%T92!T:&ES('!R;V-E9'5R92!B>2!C87)R>6EN9R!O=70@=&AE(&9O(
  52. XM;&QO=VEN9R!S=&5P<RX*(B`*(B`Q+B!0=70@>6]U<G-E;&8@<V]M97=H97)E1
  53. XM(&EN('1H92!M87IE(&YE87(@82!W86QL+@HB(#(N($-H96-K(&EF('EO=2!H(
  54. XM879E(&$@=V%L;"!O;B!Y;W5R(&QE9G0N($EF('-O+"!G;R!T;R!S=&5P(#0N&
  55. XM"B(@,RX@5&AE<F4@:7,@;F\@=V%L;"!O;B!Y;W5R(&QE9G0L('-O('1U<FX@\
  56. XM;VX@=&AE('-P;W0@=&\@>6]U<B!L969T(&%N9"!S=&5P"B(@("`@9F]R=V%R-
  57. XM9"!B>2!O;F4@<W1E<"!A;F0@<F5P96%T('-T97`@,BX*(B`T+B!#:&5C:R!WP
  58. XM:&%T(&ES(&1I<F5C=&QY(&EN(&9R;VYT(&]F('EO=2X@268@:70@:7,@82!WY
  59. XM86QL+"!T=7)N(&]N('1H90HB("`@('-P;W0@=&\@>6]U<B!R:6=H="!B>2`YB
  60. XM,"!D96=R965S(&%N9"!R97!E870@<W1E<"`T+@HB(#4N(%1H97)E(&ES(&YO!
  61. XM('=A;&P@:6X@9G)O;G0@;V8@>6]U+"!S;R!S=&5P(&9O<G=A<F0@;VYE('-T*
  62. XM97`@86YD"B(@("`@9V\@=&\@<W1E<"`R+@HB(`HB($EN('1H:7,@=V%Y('EOI
  63. XM=2!W:6QL(&-O=F5R(&%L;"!T:&4@8V]R<FED;W)S(&]F('1H92!M87IE("AU=
  64. XM;G1I;"!Y;W4@9V5T(&)A8VL*(B!T;R!W:&5R92!Y;W4@<W1A<G1E9"!F<F]M7
  65. XM+"!I9B!Y;W4@9&\@;F]T('-T;W`I+@HB(`HB($)Y(&5X86UI;FEN9R!A(&UA;
  66. XM>F4@<')O9'5C960@8GD@=&AE(&UA>F4N8R!P<F]G<F%M('EO=2!W:6QL('-ET
  67. XM92!T:&%T(`HB(&5A8V@@<W%U87)E(&]F('1H92!M87IE(&ES(&]N92!C:&%RC
  68. XM86-T97(@:&EG:"!A;F0@='=O(&-H87)A8W1E<G,@=VED92X*(B!4;R!G;R!NF
  69. XM;W)T:"!O<B!S;W5T:"P@>6]U(&UO=F4@8GD@82!O;F4@8VAA<F%C=&5R('-T#
  70. XM97`L(&)U="!T;R!M;W9E(&5A<W0@;W(*(B!W97-T('EO=2!M;W9E(&)Y(&$@3
  71. XM='=O(&-H87)A8W1E<B!S=&5P+B!!;'-O(&YO=&4@=&AA="!I;B!A;GD@<&]S8
  72. XM:71I;VX*(B!T:&5R92!A<F4@9F]U<B!P;&%C97,@=VAE<F4@=V%L;',@8V]UX
  73. XM;&0@8F4@<'5T("T@=&\@=&AE(&YO<G1H+"!T;R!T:&4@<V]U=&@L"B(@=&\@*
  74. XM=&AE(&5A<W0@86YD('1O('1H92!W97-T+@HB($$@=V%L;"!E>&ES=',@=&\@6
  75. XM=&AE(&YO<G1H(&]F('EO=2!I9B!T:&4@8VAA<F%C=&5R('1O('1H92!N;W)TB
  76. XM:"!O9@HB('EO=2!I<R!A(%\@*&]T:&5R=VES92!I="!I<R!A('-P86-E*2X*K
  77. XM(B!!('=A;&P@97AI<W1S('1O('1H92!E87-T(&]F('EO=2!I9B!T:&4@8VAA2
  78. XM<F%C=&5R('1O('1H92!E87-T(&]F('EO=0HB(&ES(&$@?"`H;W1H97)W:7-E+
  79. XM(&ET(&ES(&$@+BDN"B(@02!W86QL(&5X:7-T<R!T;R!T:&4@=V5S="!O9B!Y1
  80. XM;W4@:68@=&AE(&-H87)A8W1E<B!T;R!T:&4@=V5S="!O9B!Y;W4*(B!I<R!AC
  81. XM('P@*&]T:&5R=VES92!I="!I<R!A("XI+@HB($$@=V%L;"!E>&ES=',@=&\@=
  82. XM=&AE('-O=71H(&]F('EO=2!I9B!T:&4@8VAA<F%C=&5R('=H97)E('EO=2!A<
  83. XM<F4*(B!I<R!A(%\@*&]T:&5R=VES92!I="!I<R!A('-P86-E*2X*(B`*(B!.$
  84. XM;W1E('1H92!D:69F97)E;F-E(&9O<B!D:7)E8W1I;VX@<V]U=&@L('=H97)E6
  85. XM('=E(&UU<W0@97AA;6EN92!T:&4@8VAA<F%C=&5R"B(@=VAE<F4@=&AE(&-U:
  86. XM<G-O<B!I<R!R871H97(@=&AA;B!A;B!A9&IA8V5N="!C96QL+@HB(`HB($EFQ
  87. XM('EO=2!W97)E(&EM<&QE;65N=&EN9R!T:&4@86)O=F4@<')O8V5D=7)E(&ESL
  88. XM(&$@;F]R;6%L(&-O;7!U=&5R(&QA;F=U86=E"B(@>6]U(&-O=6QD('5S92!AK
  89. XM(&QO;W`@=VET:"!I9B!S=&%T96UE;G1S(&%N9"!C;VYT:6YU92!S=&%T96UEX
  90. XM;G1S+"`*(B!(;W=E=F5R+"!T:&5S92!C;VYS=')U8W1S(&%R92!N;W0@879A+
  91. XM:6QA8FQE(&EN('9I(&UA8W)O<R!S;R!)(&AA=F4@=7-E9`HB(&$@<W1A=&4@2
  92. XM;6%C:&EN92!W:71H(#@@<W1A=&5S+B!%86-H('-T871E('-I9VYI9FEE<R!TR
  93. XM:&4@9&ER96-T:6]N('EO=0HB(&%R92!G;VEN9R!I;B!A;F0@=VAE=&AE<B!O3
  94. XM<B!N;W0@>6]U(&AA=F4@8VAE8VME9"!I9B!T:&5R92!I<R!A('=A;&P@;VX*&
  95. XM(B!Y;W5R(&QE9G0N"B(@"B(@5&AE('1R86YS:71I;VX@9G)O;2!S=&%T92!T7
  96. XM;R!S=&%T92!A;F0@=&AE(&%C=&EO;G,@=&%K96X@;VX@96%C:"!T<F%N<VET[
  97. XM:6]N"B(@87)E(&=I=F5N(&EN('1H92!S=&%T92!T86)L92!B96QO=RX*(B!4+
  98. XM:&4@;F%M97,@;V8@=&AE('-T871E<R!A<F4@3C$L($XR+"!3,2P@4S(L($4QQ
  99. XM+"!%,BP@5S$L(%<R+"!W:&5R92!E86-H(&QE='1E<@HB('-T86YD<R!F;W(@4
  100. XM82!D:7)E8W1I;VX@;V8@=&AE(&-O;7!A<W,L('1H92!N=6UB97(@,2!I;F1IY
  101. XM8V%T97,@=&AA="!T:&4@=V4*(B!H879E(&YO="!Y970@8VAE8VME9"!T;R!S.
  102. XM964@:68@=&AE<F4@:7,@82!W86QL(&]N(&]U<B!L969T(&%N9"!T:&4@;G5M@
  103. XM8F5R(#(*(B!I;F1I8V%T97,@=&AA="!W92!H879E(&-H96-K960@86YD('1H2
  104. XM97)E(&ES(&$@=V%L;"!O;B!O=7(@;&5F="X*(B`*(B!&;W(@96%C:"!S=&%T!
  105. XM92!W92!M=7-T(&-O;G-I9&5R('1H92!E>&ES=&5N8V4@;W(@;F]T(&]F(&$@2
  106. XM=V%L;"!I;B!A"B(@<&%R=&EC=6QA<B!D:7)E8W1I;VXN(%1H:7,@9&ER96-T-
  107. XM:6]N(&ES(&=I=F5N(&EN('1H92!F;VQL;W=I;F<@=&%B;&4N"B(@"B(@3F5X=
  108. XM=$-H87(@=&%B;&4Z"B(@<W1A=&4@("`@("`@(&1I<F5C=&EO;B`@("`@("!V8
  109. XM:2!C;VUM86YD<PHB("!.,2`@("`@("`@("`@("`@5R`@("`@("`@("`@("`@=
  110. XM(&A&"B(@($XR("`@("`@("`@("`@("!.("`@("`@("`@("`@("`@:T8*(B`@%
  111. XM4S$@("`@("`@("`@("`@($4@("`@("`@("`@("`@("!L1@HB("!3,B`@("`@L
  112. XM("`@("`@("`@4R`@("`@("`@("`@("`@($8*(B`@13$@("`@("`@("`@("`@;
  113. XM($X@("`@("`@("`@("`@("!K1@HB("!%,B`@("`@("`@("`@("`@12`@("`@'
  114. XM("`@("`@("`@(&Q&"B(@(%<Q("`@("`@("`@("`@("!3("`@("`@("`@("`@Y
  115. XM("`@1@HB("!7,B`@("`@("`@("`@("`@5R`@("`@("`@("`@("`@(&A&"B(@,
  116. XM"B(@=VAE<F4@1B!I<R!A(&UA8W)O('=H:6-H('EA;FMS('1H92!C:&%R86-T,
  117. XM97(@=6YD97(@=&AE(&-U<G-O<B!I;G1O"B(@=&AE($YE>'1#:&%R(')E9VES2
  118. XM=&5R("AN*2X*(B`*(B!3=&%T92!T86)L93H*(B!);B!T:&4@)W9I(&-O;6UA*
  119. XM;F1S)R!C;VQU;6X@:7,@9VEV96X@=&AE(&%C=&EO;G,@=&\@8V%R<GD@;W5T]
  120. XM('=H96X@:6X*(B!T:&ES('-T871E(&%N9"!T:&4@3F5X=$-H87(@:7,@87,@/
  121. XM9VEV96XN(%1H92!C;VUM86YD<R!K+"!J+"!L;"P@:&@@;6]V90HB('1H92!CB
  122. XM=7)R96YT('!O<VET:6]N(&YO<G1H+"!S;W5T:"P@96%S="!A;F0@=V5S="!R`
  123. XM97-P96-T:79E;'DN(%1H90HB(&-O;6UA;F0@;6T@:7,@=7-E9"!A<R!A(&YO`
  124. XM+6]P(&-O;6UA;F0N"B(@26X@=&AE("=N97AT('-T871E)R!C;VQU;6X@:7,@5
  125. XM9VEV96X@=&AE(&YE=R!S=&%T92!O9B!T:&4@;6%C:&EN92!A9G1E<@HB('1H*
  126. XM92!A8W1I;VX@:7,@8V%R<FEE9"!O=70N"B(@"B(@8W5R<F5N="!S=&%T92`@[
  127. XM("`@("`@3F5X=$-H87(@("`@=FD@8V]M;6%N9',@(&YE>'0@<W1A=&4*(B`@:
  128. XM("`@($XQ("`@("`@("`@("`@("`@("`N("`@("`@("`@("`@:&@@("`@("`@]
  129. XM("`@5S$*(B`@("`@($XQ("`@("`@("`@("`@("`@("!\("`@("`@("`@("`@O
  130. XM;6T@("`@("`@("`@3C(*(B`@("`@($XR("`@("`@("`@("`@("`@("!?("`@E
  131. XM("`@("`@("`@;6T@("`@("`@("`@13$*(B`@("`@($XR("`@("`@("`@("`@<
  132. XM("`@<W!A8V4@("`@("`@("`@:R`@("`@("`@("`@3C$*(B`@("`@(%,Q("`@&
  133. XM("`@("`@("`@("`@("`N("`@("`@("`@("`@;&P@("`@("`@("`@13$*(B`@H
  134. XM("`@(%,Q("`@("`@("`@("`@("`@("!\("`@("`@("`@("`@;6T@("`@("`@:
  135. XM("`@4S(*(B`@("`@(%,R("`@("`@("`@("`@("`@("!?("`@("`@("`@("`@5
  136. XM;6T@("`@("`@("`@5S$*(B`@("`@(%,R("`@("`@("`@("`@("`@<W!A8V4@?
  137. XM("`@("`@("`@:B`@("`@("`@("`@4S$*(B`@("`@($4Q("`@("`@("`@("`@0
  138. XM("`@<W!A8V4@("`@("`@("`@:R`@("`@("`@("`@3C$*(B`@("`@($4Q("`@X
  139. XM("`@("`@("`@("`@("!?("`@("`@("`@("`@;6T@("`@("`@("`@13(*(B`@<
  140. XM("`@($4R("`@("`@("`@("`@("`@("!\("`@("`@("`@("`@;6T@("`@("`@-
  141. XM("`@4S$*(B`@("`@($4R("`@("`@("`@("`@("`@("`N("`@("`@("`@("`@5
  142. XM;&P@("`@("`@("`@13$*(B`@("`@(%<Q("`@("`@("`@("`@("`@<W!A8V4@.
  143. XM("`@("`@("`@:B`@("`@("`@("`@4S$*(B`@("`@(%<Q("`@("`@("`@("`@B
  144. XM("`@("!?("`@("`@("`@("`@;6T@("`@("`@("`@5S(*(B`@("`@(%<R("`@W
  145. XM("`@("`@("`@("`@("!\("`@("`@("`@("`@;6T@("`@("`@("`@3C$*(B`@!
  146. XM("`@(%<R("`@("`@("`@("`@("`@("`N("`@("`@("`@("`@:&@@("`@("`@'
  147. XM("`@5S$*(@HB(`HB($-O;7!L86EN="!A8F]U="!V:2!M86-R;W,Z"B(@270@5
  148. XM<V5E;7,@=&AA="!Y;W4@8V%N;F]T(&AA=F4@;6]R92!T:&%N(&]N92`G=6YD@
  149. XM;RUA8FQE)R!V:2!C;VUM86YD"B(@:6X@=&AE(&]N92!M86-R;RP@<V\@>6]U8
  150. XM(&AA=F4@=&\@;6%K92!L;W1S(&]F(&QI='1L92!M86-R;W,@86YD"B(@<'5TG
  151. XM('1H96T@=&]G971H97(N"B(*(B!))VQL(&5X<&QA:6X@=VAA="!)(&UE86X@M
  152. XM8GD@86X@97AA;7!L92X@161I="!A(&9I;&4@86YD"B(@='EP92`G.FUA<"!1\
  153. XM(')862<N(%1H:7,@<VAO=6QD(&UA<"!T:&4@42!K97D@=&\@)W)E<&QA8V4@>
  154. XM=&AE"B(@8VAA<F%C=&5R('5N9&5R('1H92!C=7)S;W(@=VET:"!8(&%N9"!Y7
  155. XM86YK('1H92!L:6YE)RX*(B!"=70@=VAE;B!)('1Y<&4@42P@=FD@=&5L;',@,
  156. XM;64@)T-A;B=T('EA;FL@:6YS:61E(&=L;V)A;"]M86-R;R<@86YD"B(@9V]E(
  157. XM<R!I;G1O(&5X(&UO9&4N($AO=V5V97(@:68@22!T>7!E("<Z;6%P(%$@<EA4E
  158. XM)R!A;F0@)SIM87`@5"!9)RP*(B!E=F5R>71H:6YG(&ES($]++B!)8&T@9&]I`
  159. XM;F<@86QL('1H:7,@;VX@82!3<&%R8W-T871I;VXN"B(@268@86YY;VYE(')EI
  160. XM861I;F<@=&AI<R!H87,@86X@86YS=V5R('1O('1H:7,@<')O8FQE;2P@=&AE/
  161. XM(&%U=&AO<B!W;W5L9`HB(&QO=F4@=&\@9FEN9"!O=70N($UA:6P@=&\@9W)EN
  162. XM9VU`;W1C+F]T8V$N;WHN874N"B(*(B!4:&4@;6%C<F]S.@HB(%1H92!M86-R@
  163. XM;R!T;R!R=6X@=&AE(&UA>F4@<V]L=F5R(&ES("=G)RX@5&AI<R!S:6UP;'D@E
  164. XM8V%L;',@='=O(&]T:&5R"B(@;6%C<F]S.B!)+"!T;R!I;FET:6%L:7-E(&5VT
  165. XM97)Y=&AI;F<L(&%N9"!,+"!T;R!L;V]P(&9O<F5V97(@<G5N;FEN9PHB('1H`
  166. XM<F]U9V@@=&AE('-T871E('1A8FQE+@HB($)O=&@@;V8@=&AE<V4@;6%C<F]S)
  167. XM(&%R92!L;VYG('-E<75E;F-E<R!O9B!C86QL<R!T;R!O=&AE<B!M86-R;W,N0
  168. XM($%L;`HB(&]F('1H97-E(&]T:&5R(&UA8W)O<R!A<F4@<75I=&4@<VEM<&QE$
  169. XM(&%N9"!S;R!T;R!U;F1E<G-T86YD(&AO=R!T:&ES"B(@=V]R:W,L(&%L;"!Y6
  170. XM;W4@;F5E9"!T;R!D;R!I<R!E>&%M:6YE(&UA8W)O<R!)(&%N9"!,(&%N9"!L%
  171. XM96%R;B!W:&%T('1H97D*(B!D;R`H82!S:6UP;&4@<V5Q=65N8V4@;V8@=FD@3
  172. XM86-T:6]N<RD@86YD(&AO=R!,(&QO;W!S("AB>2!C86QL:6YG(%4L('=H:6-H%
  173. XM"B(@<VEM<&QY(&-A;&QS($P@86=A:6XI+@HB"B(@36%C<F\@22!S971S('5PS
  174. XM('1H92!S=&%T92!T86)L92!A;F0@3F5X=$-H87(@=&%B;&4@870@=&AE(&5N+
  175. XM9"!O9B!T:&4@9FEL92X*(B!-86-R;R!,('1H96X@<V5A<F-H97,@=&AE<V4@H
  176. XM=&%B;&5S('1O(&9I;F0@;W5T('=H870@86-T:6]N<R!T;R!P97)F;W)M(&%NI
  177. XM9`HB('=H870@<W1A=&4@8VAA;F=E<R!T;R!M86ME+@HB"B(@5&AE(&5N=')IH
  178. XM97,@:6X@=&AE('-T871E('1A8FQE(&%L;"!B96=I;B!W:71H(&$@:V5Y(&-O/
  179. XM;G-I<W1I;F<@;V8@=&AE"B(@;&5T=&5R("=S)RP@=&AE(&-U<G)E;G0@<W1A:
  180. XM=&4@86YD('1H92!.97AT0VAA<BX@($%F=&5R('1H:7,@:7,@=&AE"B(@86-TC
  181. XM:6]N('1O('1A:V4@:6X@=&AI<R!S=&%T92!A;F0@869T97(@=&AI<R!I<R!T+
  182. XM:&4@;F5X="!S=&%T92!T;R!C:&%N9V4@=&\N"B(*(B!4:&4@96YT<FEE<R!IC
  183. XM;B!T:&4@3F5X=$-H87(@=&%B;&4@8F5G:6X@=VET:"!A(&ME>2!C;VYS:7-T"
  184. XM:6YG(&]F('1H90HB(&QE='1E<B`G;B<@86YD('1H92!C=7)R96YT('-T871ED
  185. XM+B!!9G1E<B!T:&ES(&ES('1H92!A8W1I;VX@=&\@=&%K92!T;PHB(&]B=&%IY
  186. XM;B!.97AT0VAA<B`M('1H92!C:&%R86-T97(@=&AA="!M=7-T(&)E(&5X86UI[
  187. XM;F5D('1O(&-H86YG92!S=&%T92X*(@HB($]N92!W87D@=&\@<V5E('=H870@.
  188. XM96%C:"!P87)T(&]F('1H92!M86-R;W,@:7,@9&]I;F<@:7,@=&\@='EP92!IZ
  189. XM;B!T:&4*(B!B;V1Y(&]F('1H92!M86-R;W,@22!A;F0@3"!M86YU86QL>2`HW
  190. XM:6YS=&5A9"!O9B!T>7!I;F<@)V<G*2!A;F0@<V5E"B(@=VAA="!H87!P96YS5
  191. XM(&%T(&5A8V@@<W1E<"X*(@HB($=O;V0@;'5C:RX*(@HB(%)E9VES=&5R<R!US
  192. XM<V5D(&)Y('1H92!M86-R;W,Z"B(@<R`H4W1A=&4I("`@("`@("`M(&AO;&1S/
  193. XM('1H92!S=&%T92!T:&4@;6%C:&EN92!I<R!I;@HB(&,@*$-H87(I("`@("`@)
  194. XM("`@+2!H;VQD<R!T:&4@8VAA<F%C=&5R('5N9&5R('1H92!C=7)R96YT('!OV
  195. XM<VET:6]N"B(@;2`H36%C<F\I("`@("`@("`M(&AO;&1S(&$@=FD@8V]M;6%NT
  196. XM9"!S=')I;F<@=&\@8F4@97AE8W5T960@;&%T97(*(B!N("A.97AT0VAA<BD@<
  197. XM("`@("T@:&]L9',@=&AE(&-H87)A8W1E<B!W92!M=7-T(&5X86UI;F4@=&\@D
  198. XM8VAA;F=E('-T871E"B(@<B`H4V5C;VYD($UA8W)O*2`M(&AO;&1S(&$@<V5CG
  199. XM;VYD('9I(&-O;6UA;F0@<W1R:6YG('1O(&)E(&5X96-U=&5D(&QA=&5R"B(*%
  200. XM<V5T(')E;6%P"G-E="!N;VUA9VEC"G-E="!N;W1E<G-E"G-E="!W<F%P<V-AR
  201. XM;@HB"B(]/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T].
  202. XM/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T]"B(@9R`M(&=O(')U;G,@=&AE('=HV
  203. XM;VQE('-H;W<*(B`@("`@("`@22`M(&EN:71I86QI<V4*(B`@("`@("`@3"`MS
  204. XM('1H96X@;&]O<"!F;W)E=F5R"FUA<"!G("`@24P*(@HB/3T]/3T]/3T]/3T]Z
  205. XM/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T]Y
  206. XM/3T]/3T]/0HB($D@+2!I;FET:6%L:7-E(&5V97)Y=&AI;F<@8F5F;W)E(')U7
  207. XM;FYI;F<@=&AE(&QO;W`*(B`@($<D/RY>32`M(&9I;F0@=&AE(&QA<W0@+B!I^
  208. XM;B!T:&4@;6%Z90HB("`@("`@("!>("T@<F5P;&%C92!I="!W:71H(&%N(%@@/
  209. XM*'1H92!G;V%L*0HB("`@1UE+9410("T@<')I;G0@=&AE('-T871E('1A8FQEI
  210. XM(&%N9"!N97AT(&-H87(@=&%B;&4@870@=&AE(&5N9"!O9B!T:&4@9FEL90HB'
  211. XM("`@("`@(#!3("T@:6YI=&EA;&ES92!T:&4@<W1A=&4@;V8@=&AE(&UA8VAI5
  212. XM;F4@=&\@13$*(B`@("`@(#)';"`M(&UO=F4@=&\@=&AE('1O<"!L969T(&-EK
  213. XM;&P@;V8@=&AE(&UA>F4*;6%P($D@("!')#\N#5Y'64ME1%`P4S)';`HB"B(]P
  214. XM/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T]Y
  215. XM/3T]/3T]/3T]/3T]/3T]/3T]"B(@3"`M('1H92!L;V]P('=H:6-H(&ES(&5X6
  216. XM96-U=&5D(&9O<F5V97(*(B`@("`@("`@42`M('-A=F4@=&AE(&-U<G)E;G0@0
  217. XM8VAA<F%C=&5R(&EN('1H92!#:&%R(')E9VES=&5R"B(@("`@("`@($$@+2!RT
  218. XM97!L86-E('1H92!C=7)R96YT(&-H87)A8W1E<B!W:71H(&%N("=/)PHB("`@/
  219. XM("`@(&UA("T@;6%R:R!T:&4@8W5R<F5N="!P;W-I=&EO;B!W:71H(&UA<FL@&
  220. XM)V$G"B(@("`@("!'3D(@+2!O;B!B;W1T;VT@;&EN92P@8W)E871E(&$@8V]M9
  221. XM;6%N9"!T;R!S96%R8V@@=&AE($YE>'1#:&%R('1A8FQE"B(@("`@("`@("`@K
  222. XM("!F;W(@=&AE(&-U<G)E;G0@<W1A=&4*(B`P33!%0&U>32`M('EA;FL@=&AEC
  223. XM(&-O;6UA;F0@:6YT;R!T:&4@36%C<F\@<F5G:7-T97(@86YD(&5X96-U=&4@7
  224. XM:70*(B`@("`@("!W6"`M('=E(&AA=F4@;F]W(&9O=6YD('1H92!E;G1R>2!IQ
  225. XM;B!T:&4@=&%B;&4L(&YO=R!Y86YK('1H90HB("`@("`@("`@("`@9F]L;&]W*
  226. XM:6YG('=O<F0@:6YT;R!T:&4@36%C<F\@<F5G:7-T97(*(B`@("`@8&%`;2`MS
  227. XM(&=O(&)A8VL@=&\@=&AE(&-U<G)E;G0@<&]S:71I;VX@86YD(&5X96-U=&4@)
  228. XM=&AE(&UA8W)O+"!T:&ES('=I;&P*(B`@("`@("`@("`@('EA;FL@=&AE($YEB
  229. XM>'1#:&%R(&EN(')E9VES=&5R(&X*(B`@($=4)$(D4B`M(&]N(&)O='1O;2!L"
  230. XM:6YE+"!C<F5A=&4@82!C;VUM86YD('1O('-E87)C:"!T:&4@<W1A=&4@=&%B.
  231. XM;&4*(B`@("`@("`@("`@(&9O<B!T:&4@8W5R<F5N="!S=&%T92!A;F0@3F5XG
  232. XM=$-H87(*(B`P33!%0&U>32`M('EA;FL@=&AE(&-O;6UA;F0@:6YT;R!T:&4@C
  233. XM36%C<F\@<F5G:7-T97(@86YD(&5X96-U=&4@:70*(B`@("`@(#)74R`M('=EK
  234. XM(&AA=F4@;F]W(&9O=6YD('1H92!E;G1R>2!I;B!T:&4@=&%B;&4L(&YO=R!Y@
  235. XM86YK('1H90HB("`@("`@("`@("`@;F5X="!S=&%T92!I;G1O('1H92!3=&%T^
  236. XM92!M86-R;PHB("`@("`@(&)8("T@86YD('EA;FL@=&AE(&%C=&EO;B!C;W)RE
  237. XM97-P;VYD:6YG('1O('1H:7,@<W1A=&4@=&%B;&4@96YT<GD*(B`@("`@("`@)
  238. XM("`@(&EN=&\@=&AE($UA8W)O(')E9VES=&5R"B(@("`@("!'5DH@+2!O;B!B1
  239. XM;W1T;VT@;&EN92P@8W)E871E(&$@8V]M;6%N9"!T;R!R97-T;W)E('1H92!C&
  240. XM=7)R96YT(&-H87)A8W1E<@HB("`@("`@(#!(("T@86YD('-A=F4@=&AE(&-OS
  241. XM;6UA;F0@:6YT;R!T:&4@<V5C;VYD($UA8W)O(')E9VES=&5R"B(@("`@(&!A(
  242. XM0'(@+2!G;R!B86-K('1O('1H92!C=7)R96YT('!O<VET:6]N(&%N9"!E>&5C:
  243. XM='5T92!T:&4@;6%C<F\@=&\@<F5S=&]R90HB("`@("`@("`@("`@=&AE(&-UA
  244. XM<G)E;G0@8VAA<F%C=&5R"B(@("`@("`@0&T@+2!E>&5C=71E('1H92!A8W1IS
  245. XM;VX@87-S;V-I871E9"!W:71H('1H:7,@<W1A=&4*(B`@("`@("`@52`M(&%N/
  246. XM9"!R97!E870*;6%P($P@("!106UA1TY",$TP14!M#7=88&%`;4=4)$(D4C!-M
  247. XM,$5`;0TR5U-B6$=62C!(8&%`<D!M50HB"B(]/3T]/3T]/3T]/3T]/3T]/3T]X
  248. XM/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T]Y
  249. XM"B(@52`M(&YO('1A:6P@<F5C=7)S:6]N(&%L;&]W960@:6X@=FD@;6%C<F]S2
  250. XM('-O(&-H96%T(&%N9"!S970@52`]($P*;6%P(%4@("!,"B(*(CT]/3T]/3T]-
  251. XM/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T]Y
  252. XM/3T]/3T]/3T]/3T*(B!3("T@>6%N:R!T:&4@;F5X="!T=V\@8VAA<F%C=&5RE
  253. XM<R!I;G1O('1H92!3=&%T92!R96=I<W1E<@IM87`@4R`@(")S>3)L"B(*(CT]M
  254. XM/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T]Y
  255. XM/3T]/3T]/3T]/3T]/3T]/3T*(B!1("T@<V%V92!T:&4@8W5R<F5N="!C:&%R(
  256. XM86-T97(@:6X@=&AE($-H87(@<F5G:7-T97(*;6%P(%$@("`B8WEL"B(*(CT]?
  257. XM/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T]Y
  258. XM/3T]/3T]/3T]/3T]/3T]/3T*(B!!("T@<F5P;&%C92!T:&4@8W5R<F5N="!CJ
  259. XM:&%R86-T97(@=VET:"!A;B`G3R<*;6%P($$@("!R3PHB"B(]/3T]/3T]/3T]6
  260. XM/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T]Y
  261. XM/3T]/3T]/3T]"B(@3B`M(')E<&QA8V4@=&AI<R!L:6YE('=I=&@@=&AE('-TL
  262. XM<FEN9R`G;B<*;6%P($X@("!#+VX;"B(*(CT]/3T]/3T]/3T]/3T]/3T]/3T]Y
  263. XM/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T*&
  264. XM(B!"("T@<'5T('1H92!C=7)R96YT('-T871E"FUA<"!"("`@(G-P"B(*(CT]P
  265. XM/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T]Y
  266. XM/3T]/3T]/3T]/3T]/3T]/3T*(B!-("T@>6%N:R!T:&ES(&QI;F4@:6YT;R!T4
  267. XM:&4@36%C<F\@<F5G:7-T97(*;6%P($T@("`B;7DD"B(*(CT]/3T]/3T]/3T]<
  268. XM/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T]Y
  269. XM/3T]/3T]/3T*(B!%("T@9&5L971E('1O('1H92!E;F0@;V8@=&AE(&QI;F4*\
  270. XM;6%P($4@("!D)`HB"B(]/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T]&
  271. XM/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T]"B(@6"`M('EA;FL@!
  272. XM=&AI<R!W;W)D(&EN=&\@=&AE($UA8W)O(')E9VES=&5R"FUA<"!8("`@(FUY.
  273. XM="`*(@HB/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T]W
  274. XM/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T]/0HB(%0@+2!R97!L86-E('1H:7,@6
  275. XM;&EN92!W:71H('1H92!S=')I;F<@)W,G"FUA<"!4("`@0R]S&PHB"B(]/3T]E
  276. XM/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T]Y
  277. XM/3T]/3T]/3T]/3T]/3T]"B(@4B`M('!U="!.97AT0VAA<@IM87`@4B`@(")N>
  278. XM<`HB"B(]/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T]0
  279. XM/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T]"B(@5B`M(&%D9"!T:&4@;&5T=&5R!
  280. XM("=R)R`H=&AE(')E<&QA8V4@=FD@8V]M;6%N9"D*;6%P(%8@("!A<AL*(@HBP
  281. XM/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T]Y
  282. XM/3T]/3T]/3T]/3T]/3T]/3T]/0HB($H@+2!R97-T;W)E('1H92!C=7)R96YT2
  283. XM(&-H87)A8W1E<@IM87`@2B`@(")C<`HB"B(]/3T]/3T]/3T]/3T]/3T]/3T]S
  284. XM/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T]Y
  285. XM"B(@2"`M('EA;FL@=&AI<R!L:6YE(&EN=&\@=&AE('-E8V]N9"!-86-R;R!R/
  286. XM96=I<W1E<@IM87`@2"`@(")R>20*(@HB/3T]/3T]/3T]/3T]/3T]/3T]/3T]-
  287. XM/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T]/0HBK
  288. XM($8@+2!Y86YK($YE>'1#:&%R("AT:&ES(&UA8W)O(&ES(&-A;&QE9"!F<F]M*
  289. XM('1H92!-86-R;R!R96=I<W1E<BD*;6%P($8@("`B;GEL"B(*(CT]/3T]/3T]D
  290. XM/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T]Y
  291. XM/3T]/3T]/3T]/3T*(B!>("T@<F5P;&%C92!T:&4@8W5R<F5N="!C:&%R86-T,
  292. XM97(@=VET:"!A;B`G6"<*;6%P(%X@("!R6`HB"B(]/3T]/3T]/3T]/3T]/3T]`
  293. XM/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T]Y
  294. XM/3T]"B(@64ME1%`@+2!C<F5A=&4@=&AE('-T871E('1A8FQE+"!.97AT0VAA"
  295. XM<B!T86)L92!A;F0@:6YI=&EA;"!S=&%T90HB($YO=&4@=&AA="!Y;W4@:&%V'
  296. XM92!T;R!E<V-A<&4@=&AE(&)A<B!C:&%R86-T97(L('-I;F-E(&ET(&ES('-P6
  297. XM96-I86P@=&\*(B!T:&4@;6%P(&-O;6UA;F0@*&ET(&EN9&EC871E<R!A(&YE8
  298. XM=R!L:6YE*2X*;6%P(%D@("!O<T4Q("!K("!.,2`@("`@("!S13%?(&UM($4RR
  299. XM("`@("`@('-%,A9\(&UM(%,Q("`@("`@('-%,BX@;&P@13$;"FUA<"!+("`@N
  300. XM;W-7,2`@:B`@4S$@("`@("`@<U<Q7R!M;2!7,B`@("`@("!S5S(6?"!M;2!.+
  301. XM,2`@("`@("!S5S(N(&AH(%<Q&PIM87`@92`@(&]S3C$N(&AH(%<Q("`@("`@"
  302. XM('-.,19\(&UM($XR("`@("`@('-.,B`@:R`@3C$@("`@("`@<TXR7R!M;2!%,
  303. XM,1L*;6%P($0@("!O<U,Q+B!L;"!%,2`@("`@("!S4S$6?"!M;2!3,B`@("`@B
  304. XM("!S4S(@(&H@(%,Q("`@("`@('-3,E\@;6T@5S$;"FUA<"!0("`@;VY%,2!K0
  305. XM1B!N13(@;$8@;E<Q($<D2D8@;E<R(&A&(&Y.,2!H1B!N3C(@:T8@;E,Q(&Q&1
  306. X/(&Y3,B!')$I&(`U%,1L*V
  307. X``
  308. Xend
  309. Xsize 12165
  310. END_OF_FILE
  311. if test 17071 -ne `wc -c <'vim/macros/maze/maze_mac.uue'`; then
  312.     echo shar: \"'vim/macros/maze/maze_mac.uue'\" unpacked with wrong size!
  313. fi
  314. chmod +x 'vim/macros/maze/maze_mac.uue'
  315. # end of 'vim/macros/maze/maze_mac.uue'
  316. fi
  317. if test -f 'vim/src/misccmds.c' -a "${1}" != "-c" ; then 
  318.   echo shar: Will not clobber existing file \"'vim/src/misccmds.c'\"
  319. else
  320. echo shar: Extracting \"'vim/src/misccmds.c'\" \(16465 characters\)
  321. sed "s/^X//" >'vim/src/misccmds.c' <<'END_OF_FILE'
  322. X/* vi:ts=4:sw=4
  323. X *
  324. X * VIM - Vi IMproved
  325. X *
  326. X * Code Contributions By:    Bram Moolenaar            mool@oce.nl
  327. X *                            Tim Thompson            twitch!tjt
  328. X *                            Tony Andrews            onecom!wldrdg!tony 
  329. X *                            G. R. (Fred) Walter        watmath!watcgl!grwalter 
  330. X */
  331. X
  332. X/*
  333. X * misccmds.c: functions that didn't seem to fit elsewhere
  334. X */
  335. X
  336. X#include "vim.h"
  337. X#include "globals.h"
  338. X#include "proto.h"
  339. X#include "param.h"
  340. X
  341. Xstatic char *(si_tab[]) = {"if", "else", "while", "for", "do"};
  342. X
  343. X/*
  344. X * count the size of the indent in the current line
  345. X */
  346. X    int
  347. Xget_indent()
  348. X{
  349. X    register char *ptr;
  350. X    register int count = 0;
  351. X
  352. X    for (ptr = nr2ptr(Curpos.lnum); *ptr; ++ptr)
  353. X    {
  354. X        if (*ptr == TAB)    /* count a tab for what it is worth */
  355. X            count += (int)p_ts - (count % (int)p_ts);
  356. X        else if (*ptr == ' ')
  357. X            ++count;            /* count a space for one */
  358. X        else
  359. X            break;
  360. X    }
  361. X    return (count);
  362. X}
  363. X
  364. X/*
  365. X * set the indent of the current line
  366. X * leaves the cursor on the first non-blank in the line
  367. X */
  368. X    void
  369. Xset_indent(size, delete)
  370. X    register int size;
  371. X    int delete;
  372. X{
  373. X    int        oldstate = State;
  374. X
  375. X    State = INSERT;        /* don't want REPLACE for State */
  376. X    Curpos.col = 0;
  377. X    if (delete)
  378. X    {
  379. X        while (isspace(gcharCurpos()))    /* delete old indent */
  380. X            delchar(FALSE);
  381. X    }
  382. X    if (!p_et)            /* if 'expandtab' is set, don't use TABs */
  383. X        while (size >= (int)p_ts)
  384. X        {
  385. X            inschar(TAB);
  386. X            size -= (int)p_ts;
  387. X        }
  388. X    while (size)
  389. X    {
  390. X        inschar(' ');
  391. X        --size;
  392. X    }
  393. X    State = oldstate;
  394. X    script_winsize_pp();
  395. X}
  396. X
  397. X/*
  398. X * Opencmd
  399. X *
  400. X * Add a blank line below or above the current line.
  401. X */
  402. X
  403. X    int
  404. XOpencmd(dir, redraw, delspaces)
  405. X    int         dir;
  406. X    int            redraw;
  407. X    int            delspaces;
  408. X{
  409. X    char   *l;
  410. X    char   *ptr, *pp;
  411. X    FPOS    oldCurpos;             /* old cursor position */
  412. X    int        newcol = 0;            /* new cursor column */
  413. X    int     newindent = 0;        /* auto-indent of the new line */
  414. X    int     extra = 0;            /* number of bytes to be copied from current line */
  415. X    int        n;
  416. X    int        truncate = FALSE;    /* truncate current line afterwards */
  417. X    int        no_si = FALSE;        /* reset did_si afterwards */
  418. X
  419. X    ptr = nr2ptr(Curpos.lnum);
  420. X    u_clearline();        /* cannot do "U" command when adding lines */
  421. X    did_si = FALSE;
  422. X    if (p_ai || p_si)
  423. X    {
  424. X        /*
  425. X         * count white space on current line
  426. X         */
  427. X        newindent = get_indent();
  428. X        if (newindent == 0)
  429. X            newindent = old_indent;        /* for ^^D command in insert mode */
  430. X        old_indent = 0;
  431. X
  432. X            /*
  433. X             * If we just did an auto-indent, then we didn't type anything on the
  434. X             * prior line, and it should be truncated.
  435. X             */
  436. X        if (dir == FORWARD && did_ai)
  437. X            truncate = TRUE;
  438. X        else if (p_si && *ptr != NUL)
  439. X        {
  440. X            char    *p;
  441. X            char    *pp;
  442. X            int        i, save;
  443. X
  444. X            if (dir == FORWARD)
  445. X            {
  446. X                p = ptr + strlen(ptr) - 1;
  447. X                while (p > ptr && isspace(*p))    /* find last non-blank in line */
  448. X                    --p;
  449. X                if (*p == '{')                    /* line ends in '{': do indent */
  450. X                {
  451. X                    did_si = TRUE;
  452. X                    no_si = TRUE;
  453. X                }
  454. X                else                            /* look for "if" and the like */
  455. X                {
  456. X                    p = ptr;
  457. X                    skipspace(&p);
  458. X                    for (pp = p; islower(*pp); ++pp)
  459. X                        ;
  460. X                    if (!isidchar(*pp))            /* careful for vars starting with "if" */
  461. X                    {
  462. X                        save = *pp;
  463. X                        *pp = NUL;
  464. X                        for (i = sizeof(si_tab)/sizeof(char *); --i >= 0; )
  465. X                            if (strcmp(p, si_tab[i]) == 0)
  466. X                            {
  467. X                                did_si = TRUE;
  468. X                                break;
  469. X                            }
  470. X                        *pp = save;
  471. X                    }
  472. X                }
  473. X            }
  474. X            else
  475. X            {
  476. X                p = ptr;
  477. X                skipspace(&p);
  478. X                if (*p == '}')            /* if line starts with '}': do indent */
  479. X                    did_si = TRUE;
  480. X            }
  481. X        }
  482. X        did_ai = TRUE;
  483. X        if (p_si)
  484. X            can_si = TRUE;
  485. X    }
  486. X    if (State == INSERT || State == REPLACE)    /* only when dir == FORWARD */
  487. X    {
  488. X        pp = ptr + Curpos.col;
  489. X        if (p_ai && delspaces)
  490. X            skipspace(&pp);
  491. X        extra = strlen(pp);
  492. X    }
  493. X    if ((l = alloc_line(extra)) == NULL)
  494. X        return (FALSE);
  495. X    if (extra)
  496. X    {
  497. X        strcpy(l, pp);
  498. X        did_ai = FALSE;         /* don't trucate now */
  499. X    }
  500. X
  501. X    oldCurpos = Curpos;
  502. X    if (dir == BACKWARD)
  503. X        --Curpos.lnum;
  504. X    if (appendline(Curpos.lnum, l) == FALSE)
  505. X        return FALSE;
  506. X    if (newindent || did_si)
  507. X    {
  508. X        ++Curpos.lnum;
  509. X        if (did_si)
  510. X        {
  511. X            if (p_sr)
  512. X                newindent -= newindent % (int)p_sw;
  513. X            newindent += (int)p_sw;
  514. X        }
  515. X        set_indent(newindent, FALSE);
  516. X        newcol = Curpos.col;
  517. X        if (no_si)
  518. X            did_si = FALSE;
  519. X    }
  520. X    Curpos = oldCurpos;
  521. X
  522. X    if (dir == FORWARD)
  523. X    {
  524. X        if (truncate || State == INSERT || State == REPLACE)
  525. X        {
  526. X            if (truncate)
  527. X                *ptr = NUL;
  528. X            else
  529. X                *(ptr + Curpos.col) = NUL;    /* truncate current line at cursor */
  530. X            canincrease(0);
  531. X        }
  532. X
  533. X        /*
  534. X         * Get the cursor to the start of the line, so that 'Cursrow' gets
  535. X         * set to the right physical line number for the stuff that
  536. X         * follows...
  537. X         */
  538. X        Curpos.col = 0;
  539. X
  540. X        if (redraw)
  541. X        {
  542. X            cursupdate();
  543. X
  544. X            /*
  545. X             * If we're doing an open on the last logical line, then go ahead and
  546. X             * scroll the screen up. Otherwise, just insert a blank line at the
  547. X             * right place. We use calls to plines() in case the cursor is
  548. X             * resting on a long line.
  549. X             */
  550. X            n = Cursrow + plines(Curpos.lnum);
  551. X            if (n == (Rows - 1))
  552. X                scrollup(1L);
  553. X            else
  554. X                s_ins(n, 1, TRUE);
  555. X        }
  556. X        ++Curpos.lnum;    /* cursor moves down */
  557. X    }
  558. X    else if (redraw)
  559. X        s_ins(Cursrow, 1, TRUE); /* insert physical line */
  560. X
  561. X    Curpos.col = newcol;
  562. X    if (redraw)
  563. X    {
  564. X        updateScreen(VALID_TO_CURSCHAR);
  565. X        cursupdate();            /* update Cursrow */
  566. X    }
  567. X    CHANGED;
  568. X
  569. X    return (TRUE);
  570. X}
  571. X
  572. X/*
  573. X * plines(p) - return the number of physical screen lines taken by line 'p'
  574. X */
  575. X    int
  576. Xplines(p)
  577. X    linenr_t p;
  578. X{
  579. X    register int        col = 0;
  580. X    register u_char        *s;
  581. X
  582. X    if (!p_wrap)
  583. X        return 1;
  584. X
  585. X    s = (u_char *)nr2ptr(p);
  586. X    if (*s == NUL)                /* empty line */
  587. X        return 1;
  588. X
  589. X    while (*s != NUL)
  590. X        col += chartabsize(*s++, col);
  591. X
  592. X    /*
  593. X     * If list mode is on, then the '$' at the end of the line takes up one
  594. X     * extra column.
  595. X     */
  596. X    if (p_list)
  597. X        col += 1;
  598. X
  599. X    /*
  600. X     * If 'number' mode is on, add another 8.
  601. X     */
  602. X    if (p_nu)
  603. X        col += 8;
  604. X
  605. X    col = (col + ((int)Columns - 1)) / (int)Columns;
  606. X    if (col < Rows)
  607. X        return col;
  608. X    return (int)(Rows - 1);        /* maximum length */
  609. X}
  610. X
  611. X/*
  612. X * Count the physical lines (rows) for the lines "first" to "last" inclusive.
  613. X */
  614. X    int
  615. Xplines_m(first, last)
  616. X    linenr_t        first, last;
  617. X{
  618. X        int count = 0;
  619. X
  620. X        while (first <= last)
  621. X                count += plines(first++);
  622. X        return (count);
  623. X}
  624. X
  625. X    void
  626. Xfileinfo(fullname)
  627. X    int fullname;
  628. X{
  629. X    if (bufempty())
  630. X    {
  631. X        msg("Buffer Empty");
  632. X        return;
  633. X    }
  634. X    sprintf(IObuff, "\"%s\"%s%s%s line %ld of %ld -- %d %% --",
  635. X            (!fullname && sFilename != NULL) ? sFilename :
  636. X                ((Filename != NULL) ? Filename : "No File"),
  637. X            Changed ? " [Modified]" : "",
  638. X            NotEdited ? " [Not edited]" : "",
  639. X            p_ro ? " [readonly]" : "",
  640. X            (long)Curpos.lnum,
  641. X            (long)line_count,
  642. X            (int)(((long)Curpos.lnum * 100L) / (long)line_count));
  643. X
  644. X    if (numfiles > 1)
  645. X        sprintf(IObuff + strlen(IObuff), " (file %d of %d)", curfile + 1, numfiles);
  646. X    msg(IObuff);
  647. X}
  648. X
  649. X/*
  650. X * Set the current file name to 's'.
  651. X * The file name with the full path is also remembered, for when :cd is used.
  652. X */
  653. X    void
  654. Xsetfname(s, ss)
  655. X    char *s, *ss;
  656. X{
  657. X    free(Filename);
  658. X    free(sFilename);
  659. X    if (s == NULL || *s == NUL)
  660. X    {
  661. X        Filename = NULL;
  662. X        sFilename = NULL;
  663. X    }
  664. X    else
  665. X    {
  666. X        if (ss == NULL)
  667. X            ss = s;
  668. X        sFilename = (char *)strsave(ss);
  669. X        FullName(s, IObuff, IOSIZE);
  670. X        Filename = (char *)strsave(IObuff);
  671. X    }
  672. X    if (did_cd)
  673. X        xFilename = Filename;
  674. X    else
  675. X        xFilename = sFilename;
  676. X
  677. X#ifndef MSDOS
  678. X    thisfile_sn = FALSE;
  679. X#endif
  680. X}
  681. X
  682. X/*
  683. X * return nonzero if "s" is not the same file as current file
  684. X */
  685. X    int
  686. Xotherfile(s)
  687. X    char *s;
  688. X{
  689. X    if (s == NULL || *s == NUL || Filename == NULL)        /* no name is different */
  690. X        return TRUE;
  691. X    FullName(s, IObuff, IOSIZE);
  692. X    return fnamecmp(IObuff, Filename);
  693. X}
  694. X    
  695. X/*
  696. X * put filename in title bar of window
  697. X */
  698. X    void
  699. Xmaketitle()
  700. X{
  701. X#ifdef AMIGA
  702. X    if (Filename == NULL)
  703. X        settitle("");
  704. X    else
  705. X    {
  706. X        if (numfiles <= 1)
  707. X            settitle(Filename);
  708. X        else
  709. X        {
  710. X            sprintf(IObuff, "%s (%d of %d)", Filename, curfile + 1, numfiles);
  711. X            settitle(IObuff);
  712. X        }
  713. X    }
  714. X#endif
  715. X}
  716. X
  717. X    void
  718. Xinschar(c)
  719. X    int            c;
  720. X{
  721. X    register char  *p;
  722. X    int                rir0;        /* reverse replace in column 0 */
  723. X
  724. X    p = Curpos2ptr();
  725. X    rir0 = (State == REPLACE && p_ri && Curpos.col == 0);
  726. X    if (rir0 || State != REPLACE || *p == NUL)
  727. X    {
  728. X            /* make room for the new char. */
  729. X        if (!canincrease(1))    /* make room for the new char */
  730. X            return;
  731. X
  732. X        p = Curpos2ptr();        /* get p again, canincrease() may have changed it */
  733. X        memmove(p + 1, p, strlen(p) + 1);    /* move following text and NUL */
  734. X    }
  735. X    if (rir0)                    /* reverse replace in column 0 */
  736. X    {
  737. X        *(p + 1) = c;            /* replace the char that was in column 0 */
  738. X        c = ' ';                /* insert a space */
  739. X        extraspace = TRUE;
  740. X    }
  741. X    *p = c;
  742. X
  743. X    /*
  744. X     * If we're in insert mode and showmatch mode is set, then check for
  745. X     * right parens and braces. If there isn't a match, then beep. If there
  746. X     * is a match AND it's on the screen, then flash to it briefly. If it
  747. X     * isn't on the screen, don't do anything.
  748. X     */
  749. X    if (p_sm && State == INSERT && (c == ')' || c == '}' || c == ']'))
  750. X    {
  751. X        FPOS           *lpos, csave;
  752. X
  753. X        if ((lpos = showmatch()) == NULL)        /* no match, so beep */
  754. X            beep();
  755. X        else if (lpos->lnum >= Topline)
  756. X        {
  757. X            updateScreen(VALID_TO_CURSCHAR); /* show the new char first */
  758. X            csave = Curpos;
  759. X            Curpos = *lpos;     /* move to matching char */
  760. X            cursupdate();
  761. X            showruler(0);
  762. X            setcursor();
  763. X            flushbuf();
  764. X            vim_delay();        /* brief pause */
  765. X            Curpos = csave;     /* restore cursor position */
  766. X            cursupdate();
  767. X        }
  768. X    }
  769. X    if (!p_ri)                            /* normal insert: cursor right */
  770. X        ++Curpos.col;
  771. X    else if (State == REPLACE && !rir0)    /* reverse replace mode: cursor left */
  772. X        --Curpos.col;
  773. X    CHANGED;
  774. X}
  775. X
  776. X    void
  777. Xinsstr(s)
  778. X    register char  *s;
  779. X{
  780. X    register char  *p;
  781. X    register int    n = strlen(s);
  782. X
  783. X    if (!canincrease(n))    /* make room for the new string */
  784. X        return;
  785. X
  786. X    p = Curpos2ptr();
  787. X    memmove(p + n, p, strlen(p) + 1);
  788. X    memmove(p, s, (size_t)n);
  789. X    Curpos.col += n;
  790. X    CHANGED;
  791. X}
  792. X
  793. X    int
  794. Xdelchar(fixpos)
  795. X    int            fixpos;     /* if TRUE fix the cursor position when done */
  796. X{
  797. X    char        *ptr;
  798. X    int            lastchar;
  799. X
  800. X    ptr = Curpos2ptr();
  801. X
  802. X    if (*ptr == NUL)    /* can't do anything (happens with replace mode) */
  803. X        return FALSE;
  804. X
  805. X    lastchar = (*++ptr == NUL);
  806. X    /* Delete the char. at Curpos by shifting everything in the line down. */
  807. X    do
  808. X        *(ptr - 1) = *ptr;
  809. X    while (*ptr++);
  810. X
  811. X    /*
  812. X     * If we just took off the last character of a non-blank line, we don't
  813. X     * want to end up positioned at the newline.
  814. X     */
  815. X    if (fixpos && Curpos.col > 0 && lastchar)
  816. X        --Curpos.col;
  817. X
  818. X    (void)canincrease(0);
  819. X    CHANGED;
  820. X    return TRUE;
  821. X}
  822. X
  823. X    void
  824. Xdellines(nlines, doscreen, undo)
  825. X    long             nlines;            /* number of lines to delete */
  826. X    int             doscreen;        /* if true, update the screen */
  827. X    int                undo;            /* if true, prepare for undo */
  828. X{
  829. X    int             num_plines = 0;
  830. X    char            *ptr;
  831. X
  832. X    if (nlines <= 0)
  833. X        return;
  834. X    /*
  835. X     * There's no point in keeping the screen updated if we're deleting more
  836. X     * than a screen's worth of lines.
  837. X     */
  838. X    if (nlines > (Rows - 1 - Cursrow) && doscreen)
  839. X    {
  840. X        doscreen = FALSE;
  841. X        /* flaky way to clear rest of screen */
  842. X        s_del(Cursrow, (int)Rows - 1, TRUE);
  843. X    }
  844. X    if (undo && !u_savedel(Curpos.lnum, nlines))
  845. X        return;
  846. X    while (nlines-- > 0)
  847. X    {
  848. X        if (bufempty())         /* nothing to delete */
  849. X            break;
  850. X
  851. X        /*
  852. X         * Set up to delete the correct number of physical lines on the
  853. X         * screen
  854. X         */
  855. X        if (doscreen)
  856. X            num_plines += plines(Curpos.lnum);
  857. X
  858. X        ptr = delsline(Curpos.lnum, TRUE);
  859. X        if (!undo)
  860. X            free_line(ptr);
  861. X
  862. X        CHANGED;
  863. X
  864. X        /* If we delete the last line in the file, stop */
  865. X        if (Curpos.lnum > line_count)
  866. X        {
  867. X            Curpos.lnum = line_count;
  868. X            break;
  869. X        }
  870. X    }
  871. X    Curpos.col = 0;
  872. X    /*
  873. X     * Delete the correct number of physical lines on the screen
  874. X     */
  875. X    if (doscreen && num_plines > 0)
  876. X        s_del(Cursrow, num_plines, TRUE);
  877. X}
  878. X
  879. X    int
  880. Xgchar(pos)
  881. X    FPOS *pos;
  882. X{
  883. X    return (int)(*(pos2ptr(pos)));
  884. X}
  885. X
  886. X    int
  887. XgcharCurpos()
  888. X{
  889. X    return (int)(*(Curpos2ptr()));
  890. X}
  891. X
  892. X    void
  893. XpcharCurpos(c)
  894. X    int c;
  895. X{
  896. X    *(Curpos2ptr()) = c;
  897. X}
  898. X
  899. X/*
  900. X * return TRUE if the cursor is before or on the first non-blank in the line
  901. X */
  902. X    int
  903. Xinindent()
  904. X{
  905. X    register char *ptr;
  906. X    register int col;
  907. X
  908. X    for (col = 0, ptr = nr2ptr(Curpos.lnum); isspace(*ptr++); ++col)
  909. X        ;
  910. X    if (col >= Curpos.col)
  911. X        return TRUE;
  912. X    else
  913. X        return FALSE;
  914. X}
  915. X
  916. X/*
  917. X * skipspace: skip over ' ' and '\t'.
  918. X *
  919. X * note: you must give a pointer to a char pointer!
  920. X */
  921. X    void
  922. Xskipspace(pp)
  923. X    char **pp;
  924. X{
  925. X    register char *p;
  926. X    
  927. X    for (p = *pp; *p == ' ' || *p == '\t'; ++p)    /* skip to next non-white */
  928. X        ;
  929. X    *pp = p;
  930. X}
  931. X
  932. X/*
  933. X * skiptospace: skip over text until ' ' or '\t'.
  934. X *
  935. X * note: you must give a pointer to a char pointer!
  936. X */
  937. X    void
  938. Xskiptospace(pp)
  939. X    char **pp;
  940. X{
  941. X    register char *p;
  942. X
  943. X    for (p = *pp; *p != ' ' && *p != '\t' && *p != NUL; ++p)
  944. X        ;
  945. X    *pp = p;
  946. X}
  947. X
  948. X/*
  949. X * skiptodigit: skip over text until digit found
  950. X *
  951. X * note: you must give a pointer to a char pointer!
  952. X */
  953. X    void
  954. Xskiptodigit(pp)
  955. X    char **pp;
  956. X{
  957. X    register char *p;
  958. X
  959. X    for (p = *pp; !isdigit(*p) && *p != NUL; ++p)
  960. X        ;
  961. X    *pp = p;
  962. X}
  963. X
  964. X/*
  965. X * getdigits: get a number from a string and skip over it
  966. X *
  967. X * note: you must give a pointer to a char pointer!
  968. X */
  969. X
  970. X    long
  971. Xgetdigits(pp)
  972. X    char **pp;
  973. X{
  974. X    register char *p;
  975. X    long retval;
  976. X    
  977. X    p = *pp;
  978. X    retval = atol(p);
  979. X    while (isdigit(*p))    /* skip to next non-digit */
  980. X        ++p;
  981. X    *pp = p;
  982. X    return retval;
  983. X}
  984. X
  985. X    char *
  986. Xplural(n)
  987. X    long n;
  988. X{
  989. X    static char buf[2] = "s";
  990. X
  991. X    if (n == 1)
  992. X        return &(buf[1]);
  993. X    return &(buf[0]);
  994. X}
  995. X
  996. X/*
  997. X * set_Changed is called whenever something in the file is changed
  998. X * If the file is readonly, give a warning message with the first change.
  999. X * Don't use emsg(), because it flushes the macro buffer.
  1000. X */
  1001. X    void
  1002. Xset_Changed()
  1003. X{
  1004. X    change_warning();
  1005. X    Changed = 1;
  1006. X    Updated = 1;
  1007. X}
  1008. X
  1009. X    void
  1010. Xchange_warning()
  1011. X{
  1012. X    if (Changed == 0 && p_ro)
  1013. X    {
  1014. X        msg("Warning: Changing a readonly file");
  1015. X        sleep(1);            /* give him some time to think about it */
  1016. X    }
  1017. X}
  1018. X
  1019. X    int
  1020. Xask_yesno(str)
  1021. X    char *str;
  1022. X{
  1023. X    int r = ' ';
  1024. X
  1025. X    while (r != 'y' && r != 'n')
  1026. X    {
  1027. X        smsg("%s (y/n)? ", str);
  1028. X        r = vgetc();
  1029. X        if (r == Ctrl('C'))
  1030. X            r = 'n';
  1031. X        outchar(r);        /* show what you typed */
  1032. X        flushbuf();
  1033. X    }
  1034. X    return r;
  1035. X}
  1036. X
  1037. X    void
  1038. Xmsgmore(n)
  1039. X    long n;
  1040. X{
  1041. X    long pn;
  1042. X
  1043. X    if (n > 0)
  1044. X        pn = n;
  1045. X    else
  1046. X        pn = -n;
  1047. X
  1048. X    if (pn > p_report)
  1049. X        smsg("%ld %s line%s %s", pn, n > 0 ? "more" : "fewer", plural(pn),
  1050. X                                            got_int ? "(Interrupted)" : "");
  1051. X}
  1052. X
  1053. X/*
  1054. X * give a warning for an error
  1055. X */
  1056. X    void
  1057. Xbeep()
  1058. X{
  1059. X    flush_buffers(FALSE);        /* flush internal buffers */
  1060. X    if (p_vb)
  1061. X    {
  1062. X        if (T_VB && *T_VB)
  1063. X            outstr(T_VB);
  1064. X        else
  1065. X        {                        /* very primitive visual bell */
  1066. X            msg("    ^G");
  1067. X            msg("     ^G");
  1068. X            msg("    ^G ");
  1069. X            msg("     ^G");
  1070. X            msg("       ");
  1071. X            showmode();            /* may have deleted the mode message */
  1072. X        }
  1073. X    }
  1074. X    else
  1075. X        outchar('\007');
  1076. X}
  1077. X
  1078. X/* 
  1079. X * Expand environment variable with path name.
  1080. X * If anything fails no expansion is done and dst equals src.
  1081. X */
  1082. X    void
  1083. Xexpand_env(src, dst, dstlen)
  1084. X    char    *src;            /* input string e.g. "$HOME/vim.hlp" */
  1085. X    char    *dst;            /* where to put the result */
  1086. X    int        dstlen;            /* maximum length of the result */
  1087. X{
  1088. X    char    *tail;
  1089. X    int        c;
  1090. X    char    *var;
  1091. X
  1092. X    if (*src == '$')
  1093. X    {
  1094. X/*
  1095. X * The variable name is copied into dst temporarily, because it may be
  1096. X * a string in read-only memory.
  1097. X */
  1098. X        tail = src + 1;
  1099. X        var = dst;
  1100. X        c = dstlen - 1;
  1101. X        while (c-- > 0 && *tail && isidchar(*tail))
  1102. X            *var++ = *tail++;
  1103. X        *var = NUL;
  1104. X/*
  1105. X * It is possible that vimgetenv() uses IObuff for the expansion, and that the
  1106. X * 'dst' is also IObuff. This works, as long as 'var' is the first to be copied
  1107. X * to 'dst'!
  1108. X */
  1109. X        var = (char *)vimgetenv(dst);
  1110. X        if (var && (strlen(var) + strlen(tail) + 1 < (unsigned)dstlen))
  1111. X        {
  1112. X            strcpy(dst, var);
  1113. X            strcat(dst, tail);
  1114. X            return;
  1115. X        }
  1116. X    }
  1117. X    strncpy(dst, src, (size_t)dstlen);
  1118. X}
  1119. X
  1120. X/*
  1121. X * Compare two file names and return TRUE if they are different files.
  1122. X * For the first name environment variables are expanded
  1123. X */
  1124. X    int
  1125. Xfullpathcmp(s1, s2)
  1126. X    char *s1, *s2;
  1127. X{
  1128. X#ifdef UNIX
  1129. X    struct stat st1, st2;
  1130. X    char buf1[MAXPATHL];
  1131. X
  1132. X    expand_env(s1, buf1, MAXPATHL);
  1133. X    if (stat(buf1, &st1) == 0 && stat(s2, &st2) == 0 &&
  1134. X                st1.st_dev == st2.st_dev && st1.st_ino == st2.st_ino)
  1135. X        return FALSE;
  1136. X    return TRUE;
  1137. X#else
  1138. X    char buf1[MAXPATHL];
  1139. X    char buf2[MAXPATHL];
  1140. X
  1141. X    expand_env(s1, buf2, MAXPATHL);
  1142. X    if (FullName(buf2, buf1, MAXPATHL) && FullName(s2, buf2, MAXPATHL))
  1143. X        return strcmp(buf1, buf2);
  1144. X    /*
  1145. X     * one of the FullNames() failed, file probably doesn't exist.
  1146. X     */
  1147. X    return TRUE;
  1148. X#endif
  1149. X}
  1150. X
  1151. X/*
  1152. X * get the tail of a path: the file name.
  1153. X */
  1154. X    char *
  1155. Xgettail(fname)
  1156. X    char *fname;
  1157. X{
  1158. X    register char *p1, *p2;
  1159. X
  1160. X    for (p1 = p2 = fname; *p2; ++p2)    /* find last part of path */
  1161. X    {
  1162. X        if (ispathsep(*p2))
  1163. X            p1 = p2 + 1;
  1164. X    }
  1165. X    return p1;
  1166. X}
  1167. X
  1168. X/*
  1169. X * return TRUE if 'c' is a path separator.
  1170. X */
  1171. X    int
  1172. Xispathsep(c)
  1173. X    int c;
  1174. X{
  1175. X#ifdef UNIX
  1176. X    return (c == PATHSEP);        /* UNIX has ':' inside file names */
  1177. X#else
  1178. X# ifdef MSDOS
  1179. X    return (c == ':' || c == PATHSEP || c == '/');
  1180. X# else
  1181. X    return (c == ':' || c == PATHSEP);
  1182. X# endif
  1183. X#endif
  1184. X}
  1185. END_OF_FILE
  1186. if test 16465 -ne `wc -c <'vim/src/misccmds.c'`; then
  1187.     echo shar: \"'vim/src/misccmds.c'\" unpacked with wrong size!
  1188. fi
  1189. chmod +x 'vim/src/misccmds.c'
  1190. # end of 'vim/src/misccmds.c'
  1191. fi
  1192. if test -f 'vim/src/version.c' -a "${1}" != "-c" ; then 
  1193.   echo shar: Will not clobber existing file \"'vim/src/version.c'\"
  1194. else
  1195. echo shar: Extracting \"'vim/src/version.c'\" \(15699 characters\)
  1196. sed "s/^X//" >'vim/src/version.c' <<'END_OF_FILE'
  1197. X/* vi:ts=4 sw=4 tw=77
  1198. X *
  1199. X *
  1200. X * VIM - Vi IMproved
  1201. X *
  1202. X * Code Contributions By:    Bram Moolenaar            mool@oce.nl
  1203. X *                            Tim Thompson            twitch!tjt
  1204. X *                            Tony Andrews            onecom!wldrdg!tony 
  1205. X *                            G. R. (Fred) Walter        watmath!watcgl!grwalter 
  1206. X */
  1207. X
  1208. X/*
  1209. X Started with Stevie version 3.6 (Fish disk 217) - GRWalter (Fred)
  1210. X
  1211. X VIM 1.0    - Changed so many things that I felt that a new name was required
  1212. X            (I didn't like the name Stevie that much: I don't have an ST).
  1213. X            - VIM stands for "Vi IMitation".
  1214. X            - New storage structure, MULTI-LEVEL undo and redo,
  1215. X            improved screen output, removed an awful number of bugs,
  1216. X            removed fixed size buffers, added counts to a lot of commands,
  1217. X            added new commands, added new options, added 'smart indent',
  1218. X            added recording mode, added script files, moved help to a file,
  1219. X            etc. etc. etc.
  1220. X            - Compiles under Manx/Aztec C 5.0. You can use "rez" to make VIM
  1221. X            resident.
  1222. X            - Bram Moolenaar (Mool)
  1223. X
  1224. X VIM 1.09 - spaces can be used in tags file instead of tabs (compatible with
  1225. X            Manx ctags).
  1226. X
  1227. X VIM 1.10 - Csh not required anymore for CTRL-D. Search options /e and /s added.
  1228. X            Shell option implemented. BS in replace mode does not delete
  1229. X            character. Backspace, wrapmargin and tags options added.
  1230. X            Added support for Manx's QuickFix mode (just like "Z").
  1231. X            The ENV: environment variables instead of the Old Manx environment
  1232. X            variables are now used, because Vim was compiled with version 5.0d
  1233. X            of the compiler. "mool" library not used anymore. Added index to
  1234. X            help screens.
  1235. X
  1236. X VIM 1.11 - removed bug that caused :e of same file, but with name in upper case,
  1237. X            to re-edit that file.
  1238. X
  1239. X VIM 1.12 - The second character of several commands (e.g. 'r', 't', 'm') not
  1240. X            :mapped anymore (UNIX vi does it like this, don't know why); Some
  1241. X            operators did not work when doing a 'l' on the last character in
  1242. X            a line (e.g. 'yl'); Added :mapping when executing registers;
  1243. X            Removed vi incompatibility from 't' and 'T' commands; :mapping! also
  1244. X            works for command line editing; Changed a few details to have Vim
  1245. X            run the macros for solving a maze and Towers of Hanoi! It now also
  1246. X            runs the Turing machine macros!
  1247. X
  1248. X VIM 1.13 - Removed a bug for !! on empty line. "$" no longer puts cursor at
  1249. X            the end of the line when combined with an operator. Added
  1250. X            automatic creation of a script file for recovery after a crash.
  1251. X            Added "-r" option. Solved bug for not detecting end of script file.
  1252. X            ".bak" is now appended, thus "main.c" and "main.h" will have
  1253. X            separate backup files.
  1254. X
  1255. X VIM 1.14 - Removed a few minor bugs. Added "-n" option to skip autoscript.
  1256. X            Made options more Vi compatible. Improved ^C handling. On serious
  1257. X            errors typahead and scripts are discarded. 'U' is now correctly
  1258. X            undone with 'u'. Fixed showmatch() handling of 'x' and '\x'.
  1259. X            Solved window size dependency for scripts by adding ":winsize"
  1260. X            commands to scripts. This version released on Fish disk 591.
  1261. X
  1262. X VIM 1.15 - No extra return in recording mode (MCHAR instead of MLINE buffer).
  1263. X            plural() argument is now a long. Search patterns shared between
  1264. X            :g, :s and /. After recovery a message is given. Overflow of mapbuf
  1265. X            is detected. Line number possible with :read. Error message when
  1266. X            characters follow a '$' in a search pattern. Cause for crash
  1267. X            removed: ":s/pat/repl/g" allocated not enough memory. Option
  1268. X            "directory" added. Option "expandtab" added. Solved showmode non-
  1269. X            functioning. Solved bug with window resizing. Removed some *NULL
  1270. X            references. CTRL-], * and # commands now skips non-identifier
  1271. X            characters. Added tag list, CTRL-T, :pop and :tags commands.
  1272. X            Added jump list, CTRL-O and CTRL-I commands. Added "shiftround"
  1273. X            option. Applied AUX and Lattice mods from Juergen Weigert.
  1274. X            Finally made linenr_t a long, files can be > 65000 lines!
  1275. X            :win command could be written to script file halfway a command.
  1276. X            Option shelltype added. With ^V no mapping anymore.
  1277. X            Added :move, :copy, :t, :mark and :k. Improved Ex address parsing.
  1278. X            Many delimiters possible with :s.
  1279. X
  1280. X VIM 1.16 - Solved bug with zero line number in Ex range. Added file-number to
  1281. X            jump list. Solved bug when scrolling downwards. Made tagstack vi
  1282. X            compatible. Cmdline editing: CTRL-U instead of '@'. Made Vim DICE
  1283. X            compatible. Included regexp improvements from Olaf Seibert,
  1284. X            mapstring() removed. Removed bug with CTRL-U in insert mode.
  1285. X            Count allowed before ". Added uppercase (file) marks. Added
  1286. X            :marks command. Added joinspaces option. Added :jumps command. Made
  1287. X            jumplist compatible with tag list. Added count to :next and :Next.
  1288. X
  1289. X VIM 1.17 - Removed '"' for Ex register name. Repaired stupid bug in tag code.
  1290. X            Now compiled with Aztec 5.2a. Changed Arpbase.h for use with 2.04
  1291. X            includes. Added repdel option. Improved :set listing. Added count
  1292. X            to 'u' and CTRL-R commands. "vi:" and "ex:" in modelines must now
  1293. X            be preceded with a blank. Option "+command" for command line and
  1294. X            :edit command added.
  1295. X
  1296. X VIM 1.18 - Screen was not updated when all lines deleted. Readfile() now
  1297. X            puts cursor on first new line. Catch strange disk label.
  1298. X            Endless "undo line missing" loop removed. With empty file 'O' would
  1299. X            cause this. Added window size reset in windexit(). Flush .vim file
  1300. X            only when buffer has been changed. Added the nice things from
  1301. X            Elvis 1.5: Added "equalprg" and "ruler" option. Added quoting.
  1302. X            Added third meaning to 'backspace' option: backspacing over start
  1303. X            of insert. Added "-c {command}" command line option. Made generating
  1304. X            of prototypes automatically. Added insert mode command CTRL-O and
  1305. X            arrow keys. CTRL-T/CTRL-D now always insert/delete indent. When
  1306. X            starting an edit on specified lnum there was redraw of first lines.
  1307. X            Added 'inputmode' option. Added CTRL-A and CTRL-S commands. '`' is
  1308. X            now exclusive (as it should be). Added digraphs as an option.
  1309. X            Changed implementation of parameters. Added :wnext command.
  1310. X            Added ':@r' command. Changed handling of CTRL-V in command line.
  1311. X            Block macros now work. Added keyword lookup command 'K'. Added
  1312. X            CTRL-N and CTRL-P to command line editing. For DOS 2.0x the Flush
  1313. X            function is used for the autoscript file; this should solve the
  1314. X            lockup bug. Added wait_return to msg() for long messages.
  1315. X
  1316. X VIM 1.19 - Changes from Juergen Weigert:
  1317. X            Terminal type no longer restricted to machine console. New
  1318. X            option -T terminal. New set option "term". Builtin termcap 
  1319. X            entries for "amiga", "ansi", "atari", "nansi", "pcterm". 
  1320. X            Ported to MSDOS. New set option "textmode" ("tx") to control 
  1321. X            CR-LF translation. CTRL-U and CTRL-D scroll half a screen full,
  1322. X            rather than 12 lines. New set option "writebackup" ("wb") to 
  1323. X            disable even the 'backup when writing' feature.
  1324. X            Ported to SunOS. Full termcap support. Does resize on SIGWINCH.
  1325. X
  1326. X            Made storage.c portable. Added reading of ".vimrc". Added
  1327. X            'helpfile' option. With quoting the first char of an empty line
  1328. X            is inverted. Optimized screen updating a bit. Startup code 
  1329. X            looks for VIMINIT variable and .vimrc file first. Added option
  1330. X            helpfile. Solved bug of inserting deletes: redefined ISSPECIAL.
  1331. X            Changed inchar() to use key codes from termcap. Added parameters
  1332. X            for terminal codes. Replaced aux device handling by amiga window
  1333. X            handling. Added optional termcap code. Added 'V', format
  1334. X            operator.
  1335. X
  1336. X VIM 1.20 - wait_return only ignores CR, LF and space. 'V' also works for
  1337. X            single line. No redrawing while formatting text. Added CTRL-Z.
  1338. X            Added usage of termcap "ks" and "ke". Fixed showmatch().
  1339. X            Added timeout option. Added newfile argument to readfile().
  1340. X
  1341. X VIM 1.21 - Added block mode. Added 'o' command for quoting. Added :set inv.
  1342. X            Added pos2ptr(). Added repeating and '$' to Quoting.
  1343. X
  1344. X VIM 1.22 - Fixed a bug in doput() with count > 1.
  1345. X            Port to linux by Juergen Weigert included.
  1346. X            More unix semantics in writeit(), forceit flag ignores errors while 
  1347. X            preparing backup file. For UNIX, backup is now copied, not moved.
  1348. X            When the current directory is not writable, vim now tries a backup
  1349. X            in the directory given with the backupdir option. For UNIX, raw mode
  1350. X            has now ICRNL turned off, that allowes ^V^M. Makefiles for BSD,
  1351. X            SYSV, and linux unified in makefile.unix. For MSDOS
  1352. X            mch_get_winsize() implemented. Reimplemented builtin termcaps in
  1353. X            term.c and term.h. set_term() now handles all cases. Even builtins
  1354. X            when TERMCAP is defined. Show "..." while doing filename completion.
  1355. X
  1356. X VIM 1.23 -    Improved MSDOS version: Added function and cursor keys to builtin 
  1357. X            pcterm. Replaced setmode by settmode, delay by vim_delay and 
  1358. X            delline by dellines to avoid name conflicts. Made F1 help key.
  1359. X            Renamed makecmdtab to mkcmdtab and cmdsearch to csearch for 
  1360. X            8 char name limit. Wildcard expansion adds *.* to names without a 
  1361. X            dot. Added shell execution.
  1362. X            For unix: writeit() overwrites readonly files when forced write,
  1363. X            more safety checks. Termcap buffer for linux now 2048 bytes.
  1364. X            Expandone() no longer appends "*" to file name. Added "graphic"
  1365. X            option. Added ':' command to quoting.
  1366. X            
  1367. X VIM 1.24    Adjusted number of spaces inserted by dojoin(). MSDOS version uses 
  1368. X            searchpath() to find helpfile. Fixed a few small problems. Fixed 
  1369. X            nasty bug in getperm() for SAS 6.0. Removed second argument from 
  1370. X            wait_return(). Script files accessed in binary mode with MSDOS. 
  1371. X            Added 'u' and 'U' commands to quoting (make upper or lower case). 
  1372. X            Added "CTRL-V [0-9]*" to enter any byte value. Fixed doput().
  1373. X            Dodis() displays register 0. Added CTRL-B to insert mode. Attempt 
  1374. X            to fix the lockup bug by adding Delay() to startscript(). -v 
  1375. X            option now implies -n option. doformat() added to improve 'V' 
  1376. X            command. Replace bool_t with int. Fixed handling of \& and ~ in
  1377. X            regsub(). Added interrupt handling in msdos.c for ctrl-break and
  1378. X            critical errors. Added scrolljump option. Added :stop. Added -d
  1379. X            argument. Fixed bug in quickfix startup from cli. Fixed enforcer
  1380. X            hit with aux:. Added CTRL-C handling to unix.c. Fixed "O<BS><CR>" 
  1381. X            bug with autoindent. Worked around :cq not working by adding a 
  1382. X            printf()!? Added default mapping for MSDOS PageUp etc. Fixed 
  1383. X            cursor position after 'Y'. Added shift-cursor commands. Changed 
  1384. X            ExpandFile() to keep names with errors. Added CLEAR and CURSUPD 
  1385. X            arguments to updateScreen(). Fixed CTRL-@ after a change command.
  1386. X            modname() changes '.' into '_'. Added emptyrows to screen.c. 
  1387. X            Fixed redo of search with offset. Added count to 'z' command. 
  1388. X            Made :so! work with :global. Added writing of cursor postition to 
  1389. X            startscript(). Minimized terminal requirements. Fixed problem 
  1390. X            with line in tags file with mixed spaces and tabs. Fixed problem 
  1391. X            with pattern "\\" in :s and :g. This version posted on Usenet.
  1392. X
  1393. X VIM 1.25    Improved error messages for :set. Open helpfile in binary mode 
  1394. X            for MSDOS. Fixed ignorecase for Unix in cstrncmp(). Fixed read 
  1395. X            from NULL with :tags after vim -t. Repaired 'z' command. Changed 
  1396. X            outnum() for >32767. In msdos.c flushbuf did write(1, .. instead 
  1397. X            of write(0, .. Added secure to fix security. Fixed pointer 
  1398. X            use after free() bug in regsub() (made :s fail under MSDOS). 
  1399. X            Added nofreeNULL(), needed for some UNIXes. Improved window 
  1400. X            resizing for Unix. Fixed messages for report == 0. Added 
  1401. X            bsdmemset(). Changed a few small things for portability. Added 
  1402. X            :list. Made '0' and '^' exclusive. Fixed regexp for /pattern* 
  1403. X            (did /(pattern)* instead of /pattern(n)*). Added "']" and "'[". 
  1404. X            Changed Delay(2L) into Delay(10L). Made 'timeout' option 
  1405. X            vi-compatible, added 'ttimeout' option. Changed TIOCSETP to 
  1406. X            TIOCSETN in unix.c. Added "ti" and "te" termcap entries, makes 
  1407. X            sun cmdtool work. Added stop- and starttermcap(). Use cooked 
  1408. X            output for listings on Amiga only. Added "starting" flag, no ~s 
  1409. X            anymore with every startup. Modname made portable; Added 
  1410. X            'shortname' option, Fixed problems with .vim file on messydos. 
  1411. X            Global .exrc/.vimrc for Unix added. Added patches for SCO Xenix. 
  1412. X            Add :w argument to list of alternate file names. Applied a few 
  1413. X            changes for HPUX. Added Flock in writeit() for safety. Command 
  1414. X            ":'a,'bm." moved to 'b instead of current line. Argument in 
  1415. X            'shell' option allowed. Re-implemented :copy and :move. Fixed 
  1416. X            BS-CR-BS on empty line bug in edit.c. -t option was ignored if 
  1417. X            there is a file ".vim". Changed amiga.c to work without 
  1418. X            arp.library for dos 2.0. Fixed "\$" and "\^" in regexp. Fixed 
  1419. X            pipe in filter command. Fixed CTRL-U and CTRL-D. With '}' indent 
  1420. X            in front of the cursor is included in the operated text. Fixed 
  1421. X            tag with '[' in search pattern. Added CTRL-V to 'r'. Fixed "tc" 
  1422. X            entry in termlib.c. term_console now default off. Added :noremap 
  1423. X            and ^V in :map argument. Replaced CTRL by Ctrl because some 
  1424. X            unixes have this already. Fixed "Empty file" message disappearing 
  1425. X            when there is no .exrc file. Added CTRL-K for entering digraphs. 
  1426. X            Removed escape codes from vim.hlp, added handling of inversion to 
  1427. X            help().
  1428. X
  1429. X VIM 1.26    For Unix: Removed global .exrc; renamed global .vimrc to vimrc.
  1430. X             Moved names of *rc and help files to makefile. Added various 
  1431. X            little changes for different kinds of Unix. Changed CR-LF 
  1432. X            handling in dosource() for MSDOS. Added :mkvimrc. Fixed 
  1433. X            WildExpand in unix.c for empty file. Fixed incompatibility with 
  1434. X            msdos share program (removed setperm(fname, 0) from fileio.c).
  1435. X            Added ":set compatible". Fixed 'history=0'.
  1436. X
  1437. X VIM 1.27    Added USE_LOCALE. Changed swapchar() to use toupper() and 
  1438. X            tolower(). Changed init order: .vimrc before EXINIT. Half-fixed 
  1439. X            lines that do not fit on screen. A few minor bug fixes. Fixed 
  1440. X            typehead bug in Read() in unix.c. Added :number. Reset IXON flag 
  1441. X            in unix.c for CTRL-Q. In tags file any Ex command can be used. Ex 
  1442. X            search command accepts same flags as normal search command. Fixed 
  1443. X            '?' in tag search pattern. 'New file' message was wrong when 'bk' 
  1444. X            and 'wb' options were both off.
  1445. X
  1446. X Vim 1.29 to 1.31 and Vim 2.0    See ../readme2.0.
  1447. X
  1448. X Vim 2.0    When reading and writing files and in some other cases use short
  1449. X             filename if ":cd" not used. Fixes problem with networks. Deleted
  1450. X            "#include <ctype.h>" from regexp.c. ":v" without argument was not
  1451. X            handled correctly in doglob(). Check for tail recursion removed
  1452. X            again, because it forbids ":map! foo ^]foo", which is OK. Removed
  1453. X            redraw on exit for msdos. Fixed return value for FullName in
  1454. X            unix.c. Call_shell does not always use cooked mode, fixes problem
  1455. X            with typing CR while doing filename completion in unix. "r<TAB>"
  1456. X            now done by edit() to make expandtab works. Implemented FullName
  1457. X            for msdos. Implemented the drive specifier for the :cd command for
  1458. X            MSDOS. Added CTRL-B and CTRL-E to command line editing. Del key
  1459. X            for msdos not mapped to "x" in command mode, could not delete last
  1460. X            char of count. Fixed screen being messed up with long commands
  1461. X            when 'sc' is set. Fixed use of CR-LF in tags file. Added check
  1462. X            for abbreviation when typing ESC or CTRL-O in insert mode. Doing
  1463. X            a ":w file" does overwrite when "file" is the current file. Unmap
  1464. X            will check for 'to' string if there is no match with 'from'
  1465. X            string; Fixes ":unab foo" after ":ab foo bar". Fixed problem in
  1466. X            addstar() for msdos: Check for negative index. Added possibility
  1467. X            to switch off undo ":set ul=-1". Allow parameters to be set to
  1468. X            numbers >32000 for machines with 16 bit ints.
  1469. X*/
  1470. X
  1471. Xchar           *Version = "VIM 2.0";
  1472. X#if !defined(__DATE__) || !defined(__TIME__)
  1473. Xchar           *longVersion = "Vi IMproved 2.0 (1993 Dec 14) by Bram Moolenaar";
  1474. X#else
  1475. Xchar           *longVersion = "Vi IMproved 2.0 (" __DATE__ " " __TIME__ ") by Bram Moolenaar";
  1476. X#endif
  1477. END_OF_FILE
  1478. if test 15699 -ne `wc -c <'vim/src/version.c'`; then
  1479.     echo shar: \"'vim/src/version.c'\" unpacked with wrong size!
  1480. fi
  1481. chmod +x 'vim/src/version.c'
  1482. # end of 'vim/src/version.c'
  1483. fi
  1484. echo shar: End of archive 7 \(of 25\).
  1485. cp /dev/null ark7isdone
  1486. MISSING=""
  1487. for I in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 ; do
  1488.     if test ! -f ark${I}isdone ; then
  1489.     MISSING="${MISSING} ${I}"
  1490.     fi
  1491. done
  1492. if test "${MISSING}" = "" ; then
  1493.     echo You have unpacked all 25 archives.
  1494.     rm -f ark[1-9]isdone ark[1-9][0-9]isdone
  1495. else
  1496.     echo You still need to unpack the following archives:
  1497.     echo "        " ${MISSING}
  1498. fi
  1499. ##  End of shell archive.
  1500. exit 0
  1501.  
  1502. ===============================================================================
  1503. Bram Moolenaar                             | DISCLAIMER:  This  note  does  not
  1504. Oce Nederland B.V., Research & Development | necessarily represent the position
  1505. p.o. box 101, 5900 MA  Venlo               | of  Oce-Nederland  B.V.  Therefore
  1506. The Netherlands        phone +31 77 594077 | no liability or responsibility for
  1507. UUCP: mool@oce.nl        fax +31 77 595473 | whatever will be accepted.
  1508.  
  1509. exit 0 # Just in case...
  1510.