diff --git a/.hgtags b/.hgtags index 331e13419b..d42eb7d6e8 100644 --- a/.hgtags +++ b/.hgtags @@ -1512,3 +1512,32 @@ ee48b3da9d53a487f3636df34cace6400d13f32c v7-3-172 537e0102c0f9cc2c0656c298ed1534ef30176eb8 v7-3-175 94f42ae4e4e66483fb6cc7305c61820b004c6182 v7-3-176 66f2d62271fe77d4acdda5808bd0d3a45be3149c v7-3-177 +ac639ca9f58f7c71551c19090473395d81a021b6 v7-3-178 +11e62fb6f8154537f92be5f278c31e737247f781 v7-3-179 +ed47d18b39c6a672ad4f0caa2f2c3ee897e784a7 v7-3-180 +5381eb5b1eb9c39797c435ad904bfcb71f1efb01 v7-3-181 +21346361ce6c7e9afca2e475ceb62f6244197919 v7-3-182 +e4403440e192d082af7dc8fe3e1a12d24f0e259c v7-3-183 +b941cc96926a26b62d59f759a021ddb5b51823ed v7-3-184 +9c8dffc62a41a143230f76376f9a3abf46ff3536 v7-3-185 +3d1a3aa0240c7a9acdf3feb77b664798e3703463 v7-3-186 +8bd38abda3149cce7043da86e6093dbebecf63df v7-3-187 +f2e1c3a90a3bda6ce8977187b365745efd4e5c35 v7-3-188 +71e1da07e1414740d1d0eed47a346cb3292a9e2e v7-3-189 +30b7cde2194064040cb7d7e6485a5712b2fc9b40 v7-3-190 +107b03fdf1ad831e2697c22a04bd3eeaca08c291 v7-3-191 +8470ac4679c17b69aefb06989c6e8a267761988a v7-3-192 +e1c5f69de95b99112fae28c23ce6427ca251e50f v7-3-193 +664c1adcb909aca654c4fe9200364cc741068803 v7-3-194 +8dbea5adc937ecddf8ca336856cd487e1b118b1a v7-3-195 +d641f141f9376b3ecf2146e5d68c38bf0227c970 v7-3-196 +45c536fe48db330c4ee8f1056befe702d9d19cfe v7-3-197 +b0190e93e601f9061a797689a1eb95a86805f769 v7-3-198 +c76efe33a3c1db5767cfa4f4bb433466cba6e351 v7-3-199 +41b17dd070295783af37698b1229a7052ab0549c v7-3-200 +78859ef2982bbc75dcfbc551e3d8a0ec5c9126eb v7-3-201 +f80e67bd627114cf7f16098ec4ed7d878816a46b v7-3-202 +ce1dce2af2a34aec196b7fbe29cf8c653b6ec6de v7-3-203 +e6ce47f06836721108394f0b921af076606cf715 v7-3-204 +8d8bd6307b1aa51fe2f592ce45d32abf0f6666d8 v7-3-205 +46544d3ae7ecb245a2646ae5005a3d67ca380f88 v7-3-206 diff --git a/Filelist b/Filelist index 3d67affe77..37822bcbc0 100644 --- a/Filelist +++ b/Filelist @@ -427,9 +427,6 @@ SRC_EXTRA = \ $(SRC_VMS) \ README_os390.txt \ src/Make_mint.mak \ - src/Make_ro.mak \ - src/gui_riscos.c \ - src/gui_riscos.h \ src/if_sniff.c \ src/infplist.xml \ src/link.390 \ @@ -437,10 +434,6 @@ SRC_EXTRA = \ src/os_beos.h \ src/os_beos.rsrc \ src/os_mint.h \ - src/os_riscos.c \ - src/os_riscos.h \ - src/proto/gui_riscos.pro \ - src/proto/os_riscos.pro \ src/os_vms_fix.com \ src/toolbar.phi \ diff --git a/README_extra.txt b/README_extra.txt index 7bb54c5e4f..3481b0d26d 100644 --- a/README_extra.txt +++ b/README_extra.txt @@ -13,9 +13,6 @@ src/if_sniff.* Interface to SNiFF. If you don't know what SNiFF is, src/os_amiga.* Files for the Amiga port. -src/gui_riscos.* -src/os_riscos.* Files for the RISC OS port. - src/gui_beos.* src/os_beos.* Files for the BeOS port. diff --git a/runtime/doc/autocmd.txt b/runtime/doc/autocmd.txt index d40df23416..145ecf624b 100644 --- a/runtime/doc/autocmd.txt +++ b/runtime/doc/autocmd.txt @@ -299,6 +299,8 @@ Name triggered by ~ |InsertEnter| starting Insert mode |InsertChange| when typing while in Insert or Replace mode |InsertLeave| when leaving Insert mode +|InsertCharPre| when a character was typed in Insert mode, before + inserting it |ColorScheme| after loading a color scheme @@ -657,6 +659,17 @@ InsertChange When typing while in Insert or indicates the new mode. Be careful not to move the cursor or do anything else that the user does not expect. + *InsertCharPre* +InsertCharPre When a character is typed in Insert mode, + before inserting the char. + The |v:char| variable indicates the char typed + and can be changed during the event to insert + a different character. When |v:char| is set + to more than one character this text is + inserted literally. + It is not allowed to change the text |textlock|. + The event is not triggered when 'paste' is + set. *InsertEnter* InsertEnter Just before starting Insert mode. Also for Replace mode and Virtual Replace mode. The diff --git a/runtime/doc/change.txt b/runtime/doc/change.txt index 165b0468fb..09c46f0d34 100644 --- a/runtime/doc/change.txt +++ b/runtime/doc/change.txt @@ -1,4 +1,4 @@ -*change.txt* For Vim version 7.3. Last change: 2011 Feb 25 +*change.txt* For Vim version 7.3. Last change: 2011 May 17 VIM REFERENCE MANUAL by Bram Moolenaar @@ -522,11 +522,11 @@ comment (starting with '"') after the ":!" command. ={motion} Filter {motion} lines through the external program given with the 'equalprg' option. When the 'equalprg' option is empty (this is the default), use the - internal formatting function |C-indenting|. But when - 'indentexpr' is not empty, it will be used instead - |indent-expression|. When Vim was compiled without - internal formatting then the "indent" program is used - as a last resort. + internal formatting function |C-indenting| and + |'lisp'|. But when 'indentexpr' is not empty, it will + be used instead |indent-expression|. When Vim was + compiled without internal formatting then the "indent" + program is used as a last resort. *==* == Filter [count] lines like with ={motion}. @@ -919,8 +919,8 @@ inside of strings can change! Also see 'softtabstop' option. > *:y* *:yank* *E850* :[range]y[ank] [x] Yank [range] lines [into register x]. Yanking to the - "* or "+ registers is possible only in GUI versions or - when the |+xterm_clipboard| feature is included. + "* or "+ registers is possible only when the + |+clipboard| feature is included. :[range]y[ank] [x] {count} Yank {count} lines, starting with last line number @@ -1390,16 +1390,19 @@ before typing anything else on the new line. This will replace the middle-comment leader with the end-comment leader and apply any specified alignment, leaving just " */". There is no need to hit BackSpace first. +When there is a match with a middle part, but there also is a maching end part +which is longer, the end part is used. This makes a C style comment work +without requiring the middle part to end with a space. Here is an example of alignment flags at work to make a comment stand out -(kind of looks like a 1 too). Consider comment string > - sr:/***,m:**,ex2:******/ - - /*** - **<--right aligned from "r" flag - ** -offset 2 spaces from the "2" flag--->** - ******/ +(kind of looks like a 1 too). Consider comment string: > + :set comments=sr:/***,m:**,ex-2:******/ +< + /*** ~ + **<--right aligned from "r" flag ~ + ** ~ +offset 2 spaces for the "-2" flag--->** ~ + ******/ ~ In this case, the first comment was typed, then return was pressed 4 times, then "/" was pressed to end the comment. @@ -1417,8 +1420,8 @@ Reindenting using a different method like |gq| or |=| will not consult alignment flags either. The same behaviour can be defined in those other formatting options. One consideration is that 'cindent' has additional options for context based indenting of comments but cannot replicate many three piece -indent alignments. However, 'indentexpr' is has the ability to work better -with three piece comments. +indent alignments. However, 'indentexpr' has the ability to work better with +three piece comments. Other examples: > "b:*" Includes lines starting with "*", but not if the "*" is diff --git a/runtime/doc/eval.txt b/runtime/doc/eval.txt index ca965bfa38..8a098771c7 100644 --- a/runtime/doc/eval.txt +++ b/runtime/doc/eval.txt @@ -1,4 +1,4 @@ -*eval.txt* For Vim version 7.3. Last change: 2011 Mar 18 +*eval.txt* For Vim version 7.3. Last change: 2011 May 17 VIM REFERENCE MANUAL by Bram Moolenaar @@ -1293,6 +1293,7 @@ v:beval_winnr The number of the window, over which the mouse pointer is. Only *v:char* *char-variable* v:char Argument for evaluating 'formatexpr' and used for the typed character when using in an abbreviation |:map-|. + It is also used by the |InsertPreChar| event. *v:charconvert_from* *charconvert_from-variable* v:charconvert_from @@ -1545,7 +1546,9 @@ v:progname Contains the name (with path removed) with which Vim was *v:register* *register-variable* v:register The name of the register in effect for the current normal mode - command. If none is supplied it is the default register. + command. If none is supplied it is the default register '"', + unless 'clipboard' contains "unnamed" or "unnamedplus", then + it is '*' or '+'. Also see |getreg()| and |setreg()| *v:scrollstart* *scrollstart-variable* @@ -4074,6 +4077,7 @@ match({expr}, {pat}[, {start}[, {count}]]) *match()* {pat} matches. A match at the first character or |List| item returns zero. If there is no match -1 is returned. + For getting submatches see |matchlist()|. Example: > :echo match("testing", "ing") " results in 4 :echo match([1, 'x'], '\a') " results in 1 @@ -5579,6 +5583,10 @@ substitute({expr}, {pat}, {sub}, {flags}) *substitute()* < This removes the last component of the 'path' option. > :echo substitute("testing", ".*", "\\U\\0", "") < results in "TESTING". + The {sub} argument can start with \=, just like with + |:substitute|. Example: > + :echo substitute(s, '%\(\x\x\)', + \ '\=nr2char("0x" . submatch(1))', 'g') synID({lnum}, {col}, {trans}) *synID()* The result is a Number, which is the syntax ID at the position @@ -6225,7 +6233,8 @@ persistent_undo Compiled with support for persistent undo history. postscript Compiled with PostScript file printing. printer Compiled with |:hardcopy| support. profile Compiled with |:profile| support. -python Compiled with Python interface. +python Compiled with Python 2.x interface. |has-python| +python3 Compiled with Python 3.x interface. |has-python| qnx QNX version of Vim. quickfix Compiled with |quickfix| support. reltime Compiled with |reltime()| support. diff --git a/runtime/doc/fold.txt b/runtime/doc/fold.txt index 24a8dcb617..4f279333fb 100644 --- a/runtime/doc/fold.txt +++ b/runtime/doc/fold.txt @@ -60,7 +60,7 @@ level form a fold, with the lines with a higher level forming a nested fold. The nesting of folds is limited with 'foldnestmax'. Some lines are ignored and get the fold level of the line above or below it, -whatever is the lowest. These are empty or white lines and lines starting +whichever is lower. These are empty or white lines and lines starting with a character in 'foldignore'. White space is skipped before checking for characters in 'foldignore'. For C use "#" to ignore preprocessor lines. diff --git a/runtime/doc/if_pyth.txt b/runtime/doc/if_pyth.txt index 51f936e35d..43c435655e 100644 --- a/runtime/doc/if_pyth.txt +++ b/runtime/doc/if_pyth.txt @@ -1,4 +1,4 @@ -*if_pyth.txt* For Vim version 7.3. Last change: 2010 Oct 20 +*if_pyth.txt* For Vim version 7.3. Last change: 2011 May 07 VIM REFERENCE MANUAL by Paul Moore @@ -377,6 +377,18 @@ To work around such problems there are these options: 3. You undefine PY_NO_RTLD_GLOBAL in auto/config.h after configuration. This may crash Vim though. + *has-python* +You can test what Python version is available with: > + if has('python') + echo 'there is Pyton 2.x' + elseif has('python3') + echo 'there is Python 3.x' + endif + +Note however, that when Python 2 and 3 are both available and loaded +dynamically, these has() calls will try to load them. If only one can be +loaded at a time, just checking if Python 2 or 3 are available will prevent +the other one from being available. ============================================================================== vim:tw=78:ts=8:ft=help:norl: diff --git a/runtime/doc/indent.txt b/runtime/doc/indent.txt index 405c3dd8b1..f2600d3ce2 100644 --- a/runtime/doc/indent.txt +++ b/runtime/doc/indent.txt @@ -128,13 +128,20 @@ have changed the indent by typing , , or in the indent or used CTRL-T or CTRL-D. *cinoptions-values* -The 'cinoptions' option sets how Vim performs indentation. In the list below, +The 'cinoptions' option sets how Vim performs indentation. The value after +the option character can be one of these (N is any number): + N indent N spaces + -N indent N spaces to the left + Ns N times 'shiftwidth spaces + -Ns N times 'shiftwidth spaces to the left + +In the list below, "N" represents a number of your choice (the number can be negative). When there is an 's' after the number, Vim multiplies the number by 'shiftwidth': "1s" is 'shiftwidth', "2s" is two times 'shiftwidth', etc. You can use a -decimal point, too: "-0.5s" is minus half a 'shiftwidth'. The examples below -assume a 'shiftwidth' of 4. - +decimal point, too: "-0.5s" is minus half a 'shiftwidth'. +The examples below assume a 'shiftwidth' of 4. + *cino->* >N Amount added for "normal" indent. Used after a line that should increase the indent (lines starting with "if", an opening brace, etc.). (default 'shiftwidth'). @@ -145,6 +152,7 @@ assume a 'shiftwidth' of 4. foo; foo; foo; } } } < + *cino-e* eN Add N to the prevailing indent inside a set of braces if the opening brace at the End of the line (more precise: is not the first character in a line). This is useful if you want a @@ -160,6 +168,7 @@ assume a 'shiftwidth' of 4. bar; bar; bar; } } } < + *cino-n* nN Add N to the prevailing indent for a statement after an "if", "while", etc., if it is NOT inside a set of braces. This is useful if you want a different indent when there is no '{' @@ -174,6 +183,7 @@ assume a 'shiftwidth' of 4. bar; bar; bar; } } } < + *cino-f* fN Place the first opening brace of a function or other block in column N. This applies only for an opening brace that is not inside other braces and is at the start of the line. What comes @@ -184,6 +194,7 @@ assume a 'shiftwidth' of 4. { { { int foo; int foo; int foo; < + *cino-{* {N Place opening braces N characters from the prevailing indent. This applies only for opening braces that are inside other braces. (default 0). @@ -193,6 +204,7 @@ assume a 'shiftwidth' of 4. { { { foo; foo; foo; < + *cino-}* }N Place closing braces N characters from the matching opening brace. (default 0). @@ -202,6 +214,7 @@ assume a 'shiftwidth' of 4. foo; foo; foo; } } } < + *cino-^* ^N Add N to the prevailing indent inside a set of braces if the opening brace is in column 0. This can specify a different indent for whole of a function (some may like to set it to a @@ -216,6 +229,7 @@ assume a 'shiftwidth' of 4. } } } } } } < + *cino-L* LN Controls placement of jump labels. If N is negative, the label will be placed at column 1. If N is non-negative, the indent of the label will be the prevailing indent minus N. (default -1). @@ -229,6 +243,7 @@ assume a 'shiftwidth' of 4. } } } } } } < + *cino-:* :N Place case labels N characters from the indent of the switch(). (default 'shiftwidth'). @@ -240,6 +255,7 @@ assume a 'shiftwidth' of 4. default: default: } } < + *cino-=* =N Place statements occurring after a case label N characters from the indent of the label. (default 'shiftwidth'). @@ -247,6 +263,7 @@ assume a 'shiftwidth' of 4. case 11: case 11: a = a + 1; a = a + 1; b = b + 1; < + *cino-l* lN If N != 0 Vim will align with a case label instead of the statement after it in the same line. @@ -256,6 +273,7 @@ assume a 'shiftwidth' of 4. break; break; } } < + *cino-b* bN If N != 0 Vim will align a final "break" with the case label, so that case..break looks like a sort of block. (default: 0). When using 1, consider adding "0=break" to 'cinkeys'. @@ -272,6 +290,7 @@ assume a 'shiftwidth' of 4. break; break; } } < + *cino-g* gN Place C++ scope declarations N characters from the indent of the block they are in. (default 'shiftwidth'). A scope declaration can be "public:", "protected:" or "private:". @@ -283,6 +302,7 @@ assume a 'shiftwidth' of 4. private: private: } } < + *cino-h* hN Place statements occurring after a C++ scope declaration N characters from the indent of the label. (default 'shiftwidth'). @@ -291,6 +311,21 @@ assume a 'shiftwidth' of 4. public: public: a = a + 1; a = a + 1; b = b + 1; < + *cino-N* + NN Indent inside C++ namespace N characters extra compared to a + normal block. (default 0). + + cino= cino=N-s > + namespace { namespace { + void function(); void function(); + } } + + namespace my namespace my + { { + void function(); void function(); + } } +< + *cino-p* pN Parameter declarations for K&R-style function declarations will be indented N characters from the margin. (default 'shiftwidth'). @@ -300,6 +335,7 @@ assume a 'shiftwidth' of 4. int a; int a; int a; char b; char b; char b; < + *cino-t* tN Indent a function return type declaration N characters from the margin. (default 'shiftwidth'). @@ -307,6 +343,7 @@ assume a 'shiftwidth' of 4. int int int func() func() func() < + *cino-i* iN Indent C++ base class declarations and constructor initializations, if they start in a new line (otherwise they are aligned at the right side of the ':'). @@ -320,6 +357,7 @@ assume a 'shiftwidth' of 4. BaseClass(3) BaseClass(3) {} {} < + *cino-+* +N Indent a continuation line (a line that spills onto the next) inside a function N additional characters. (default 'shiftwidth'). @@ -330,6 +368,7 @@ assume a 'shiftwidth' of 4. a = b + 9 * a = b + 9 * c; c; < + *cino-c* cN Indent comment lines after the comment opener, when there is no other text with which to align, N characters from the comment opener. (default 3). See also |format-comments|. @@ -339,6 +378,7 @@ assume a 'shiftwidth' of 4. text. text. */ */ < + *cino-C* CN When N is non-zero, indent comment lines by the amount specified with the c flag above even if there is other text behind the comment opener. (default 0). @@ -349,12 +389,14 @@ assume a 'shiftwidth' of 4. ********/ ********/ < (Example uses ":set comments& comments-=s1:/* comments^=s0:/*") + *cino-/* /N Indent comment lines N characters extra. (default 0). cino= cino=/4 > a = b; a = b; /* comment */ /* comment */ c = d; c = d; < + *cino-(* (N When in unclosed parentheses, indent N characters from the line with the unclosed parentheses. Add a 'shiftwidth' for every unclosed parentheses. When N is 0 or the unclosed parentheses @@ -370,6 +412,7 @@ assume a 'shiftwidth' of 4. (c2 || c3)) (c2 || c3)) { { < + *cino-u* uN Same as (N, but for one level deeper. (default 'shiftwidth'). cino= cino=u2 > @@ -377,6 +420,7 @@ assume a 'shiftwidth' of 4. && (c22345 && (c22345 || c3)) || c3)) < + *cino-U* UN When N is non-zero, do not ignore the indenting specified by ( or u in case that the unclosed parentheses is the first non-white character in its line. (default 0). @@ -388,6 +432,7 @@ assume a 'shiftwidth' of 4. c3 c3 ) && c4; ) && c4; < + *cino-2* wN When in unclosed parentheses and N is non-zero and either using "(0" or "u0", respectively, or using "U0" and the unclosed parentheses is the first non-white character in its line, line @@ -400,6 +445,7 @@ assume a 'shiftwidth' of 4. || c3)) || c3)) foo; foo; < + *cino-W* WN When in unclosed parentheses and N is non-zero and either using "(0" or "u0", respectively and the unclosed parentheses is the last non-white character in its line and it is not the @@ -414,6 +460,7 @@ assume a 'shiftwidth' of 4. a_short_line(argument, a_short_line(argument, argument); argument); < + *cino-m* mN When N is non-zero, line up a line starting with a closing parentheses with the first character of the line with the matching opening parentheses. (default 0). @@ -428,6 +475,7 @@ assume a 'shiftwidth' of 4. ) ) foo; foo; < + *cino-M* MN When N is non-zero, line up a line starting with a closing parentheses with the first character of the previous line. (default 0). @@ -437,7 +485,7 @@ assume a 'shiftwidth' of 4. cond2 cond2 ) ) < - *java-cinoptions* *java-indenting* + *java-cinoptions* *java-indenting* *cino-j* jN Indent java anonymous classes correctly. The value 'N' is currently unused but must be non-zero (e.g. 'j1'). 'j1' will indent for example the following code snippet correctly: > @@ -448,7 +496,7 @@ assume a 'shiftwidth' of 4. } }); < - *javascript-cinoptions* *javascript-indenting* + *javascript-cinoptions* *javascript-indenting* *cino-J* JN Indent JavaScript object declarations correctly by not confusing them with labels. The value 'N' is currently unused but must be non-zero (e.g. 'J1'). > @@ -466,16 +514,19 @@ assume a 'shiftwidth' of 4. } } < + *cino-)* )N Vim searches for unclosed parentheses at most N lines away. This limits the time needed to search for parentheses. (default 20 lines). + *cino-star* *N Vim searches for unclosed comments at most N lines away. This limits the time needed to search for the start of a comment. If your /* */ comments stop indenting afer N lines this is the value you will want to change. (default 70 lines). + *cino-#* #N When N is non-zero recognize shell/Perl comments, starting with '#'. Default N is zero: don't recognizes '#' comments. Note that lines starting with # will still be seen as preprocessor @@ -483,7 +534,7 @@ assume a 'shiftwidth' of 4. The defaults, spelled out in full, are: - cinoptions=>s,e0,n0,f0,{0,}0,^0,L-1,:s,=s,l0,b0,gs,hs,ps,ts,is,+s, + cinoptions=>s,e0,n0,f0,{0,}0,^0,L-1,:s,=s,l0,b0,gs,hs,N0,ps,ts,is,+s, c3,C0,/0,(2s,us,U0,w0,W0,m0,j0,J0,)20,*70,#0 Vim puts a line in column 1 if: diff --git a/runtime/doc/intro.txt b/runtime/doc/intro.txt index 33eab763d1..6682ba6aa7 100644 --- a/runtime/doc/intro.txt +++ b/runtime/doc/intro.txt @@ -1,4 +1,4 @@ -*intro.txt* For Vim version 7.3. Last change: 2010 Dec 08 +*intro.txt* For Vim version 7.3. Last change: 2011 May 15 VIM REFERENCE MANUAL by Bram Moolenaar @@ -135,8 +135,10 @@ http://www.vim.org/maillist.php Bug reports: *bugs* *bug-reports* *bugreport.vim* -Send bug reports to: Vim bugs -This is not a maillist but the message is redirected to the Vim maintainer. +Send bug reports to: Vim Developers +This is a maillist, many people will see the message. If you don't want that, +e.g. because it is a security issue, send it to , this only goes +to the Vim maintainer (that's Bram). Please be brief; all the time that is spent on answering mail is subtracted from the time that is spent on improving Vim! Always give a reproducible example and try to find out which settings or other things influence the diff --git a/runtime/doc/map.txt b/runtime/doc/map.txt index 29b9e9f35e..ceb29013d0 100644 --- a/runtime/doc/map.txt +++ b/runtime/doc/map.txt @@ -1,4 +1,4 @@ -*map.txt* For Vim version 7.3. Last change: 2011 Apr 13 +*map.txt* For Vim version 7.3. Last change: 2011 May 10 VIM REFERENCE MANUAL by Bram Moolenaar @@ -226,7 +226,7 @@ text before the cursor and start omni completion when some condition is met. For abbreviations |v:char| is set to the character that was typed to trigger the abbreviation. You can use this to decide how to expand the {lhs}. You -can't change v:char and you should not insert it. +you should not either insert or change the v:char. Be very careful about side effects! The expression is evaluated while obtaining characters, you may very well make the command dysfunctional. @@ -480,9 +480,9 @@ You can create an empty {rhs} by typing nothing after a single CTRL-V (you have to type CTRL-V two times). Unfortunately, you cannot do this in a vimrc file. ** -A easier way to get a mapping that doesn't produce anything, is to use "" -for the {rhs}. This only works when the |<>| notation is enabled. For -example, to make sure that function key 8 does nothing at all: > +An easier way to get a mapping that doesn't produce anything, is to use +"" for the {rhs}. This only works when the |<>| notation is enabled. +For example, to make sure that function key 8 does nothing at all: > :map :map! < @@ -495,7 +495,7 @@ scenario: > :set encoding=utf-8 The mapping for is defined with the latin1 encoding, resulting in a 0xc3 byte. If you type the character (0xe1 ) in UTF-8 encoding this is the -two bytes 0xc3 0xa1. You don't want the 0xc3 byte to be mapped then, +two bytes 0xc3 0xa1. You don't want the 0xc3 byte to be mapped then or otherwise it would be impossible to type the character. ** *mapleader* @@ -1177,13 +1177,15 @@ reported if any are supplied). However, it is possible to specify that the command can take arguments, using the -nargs attribute. Valid cases are: -nargs=0 No arguments are allowed (the default) - -nargs=1 Exactly one argument is required - -nargs=* Any number of arguments are allowed (0, 1, or many) + -nargs=1 Exactly one argument is require, it includes spaces + -nargs=* Any number of arguments are allowed (0, 1, or many), + separated by white space -nargs=? 0 or 1 arguments are allowed -nargs=+ Arguments must be supplied, but any number are allowed Arguments are considered to be separated by (unescaped) spaces or tabs in this -context. +context, except when there is one argument, then the white space is part of +the argument. Note that arguments are used as text, not as expressions. Specifically, "s:var" will use the script-local variable in the script where the command was diff --git a/runtime/doc/message.txt b/runtime/doc/message.txt index 2a5f0f589e..97c452502c 100644 --- a/runtime/doc/message.txt +++ b/runtime/doc/message.txt @@ -1,4 +1,4 @@ -*message.txt* For Vim version 7.3. Last change: 2011 Jan 30 +*message.txt* For Vim version 7.3. Last change: 2011 May 10 VIM REFERENCE MANUAL by Bram Moolenaar @@ -27,8 +27,8 @@ The "g<" command can be used to see the last page of previous command output. This is especially useful if you accidentally typed at the hit-enter prompt. You are then back at the hit-enter prompt and can then scroll further back. -Note: when you stopped the output with "q" at the more prompt only up to that -point will be displayed. +Note: If the output has been stopped with "q" at the more prompt, it will only +be displayed up to this point. The previous command output is cleared when another command produces output. If you are using translated messages, the first printed line tells who diff --git a/runtime/doc/options.txt b/runtime/doc/options.txt index 7d1ecf20c3..faf97beb79 100644 --- a/runtime/doc/options.txt +++ b/runtime/doc/options.txt @@ -1,4 +1,4 @@ -*options.txt* For Vim version 7.3. Last change: 2011 Apr 15 +*options.txt* For Vim version 7.3. Last change: 2011 May 17 VIM REFERENCE MANUAL by Bram Moolenaar @@ -820,7 +820,7 @@ A jump table for the options with a short description can be found at |Q_op|. been set. *'background'* *'bg'* -'background' 'bg' string (default "dark" or "light") +'background' 'bg' string (default "dark" or "light", see below) global {not in Vi} When set to "dark", Vim will try to use colors that look good on a @@ -854,6 +854,12 @@ A jump table for the options with a short description can be found at |Q_op|. color). To get around this, force the GUI window to be opened by putting a ":gui" command in the .gvimrc file, before where the value of 'background' is used (e.g., before ":syntax on"). + + For MS-DOS, Windows and OS/2 the default is "dark". + For other systems "dark" is used when 'term' is "linux", + "screen.linux", "cygwin" or "putty", or $COLORFGBG suggests a dark + background. Otherwise the default is "light". + Normally this option would be set in the .vimrc file. Possibly depending on the terminal name. Example: > :if &term == "pcterm" @@ -3099,7 +3105,7 @@ A jump table for the options with a short description can be found at |Q_op|. closed. Also for manually closed folds. With the default value of one a fold can only be closed if it takes up two or more screen lines. Set to zero to be able to close folds of just one screen line. - Note that this only has an effect of what is displayed. After using + Note that this only has an effect on what is displayed. After using "zc" to close a fold, which is displayed open because it's smaller than 'foldminlines', a following "zc" may close a containing fold. @@ -4199,7 +4205,8 @@ A jump table for the options with a short description can be found at |Q_op|. It is used when a new line is created, for the |=| operator and in Insert mode as specified with the 'indentkeys' option. When this option is not empty, it overrules the 'cindent' and - 'smartindent' indenting. + 'smartindent' indenting. When 'lisp' is set, this option is + overridden by the Lisp indentation algorithm. When 'paste' is set this option is not used for indenting. The expression is evaluated with |v:lnum| set to the line number for which the indent is to be computed. The cursor is also in this line diff --git a/runtime/doc/os_risc.txt b/runtime/doc/os_risc.txt index b0790d4918..e9b69f6e06 100644 --- a/runtime/doc/os_risc.txt +++ b/runtime/doc/os_risc.txt @@ -1,322 +1,12 @@ -*os_risc.txt* For Vim version 7.3. Last change: 2010 Aug 07 +*os_risc.txt* For Vim version 7.3. Last change: 2011 May 10 VIM REFERENCE MANUAL by Thomas Leonard *riscos* *RISCOS* *RISC-OS* -This file contains the particularities for the RISC OS version of Vim. +The RISC OS support has been removed from Vim with patch 7.3.187. +If you would like to use Vim on RISC OS get the files from before that patch. -The RISC OS port is a completely new port and is not based on the old "archi" -port. -1. File locations |riscos-locations| -2. Filename munging |riscos-munging| -3. Command-line use |riscos-commandline| -4. Desktop (GUI) use |riscos-gui| -5. Remote use (telnet) |riscos-remote| -6. Temporary files |riscos-temp-files| -7. Interrupting |riscos-interrupt| -8. Memory usage |riscos-memory| -9. Filetypes |riscos-filetypes| -10. The shell |riscos-shell| -11. Porting new releases |riscos-porting| - -If I've missed anything, email me and I'll try to fix it. In fact, even if I -haven't missed anything then email me anyway to give me some confidence that it -actually works! - -Thomas Leonard - - [these URLs no longer work...] - Port homepage: http://www.ecs.soton.ac.uk/~tal197/ - or try: http://www.soton.ac.uk/~tal197/ - -============================================================================== - *riscos-locations* -1. File locations - -The Vim executable and shared resource files are all stored inside the !Vim -application directory. - -When !Vim is first seen by the filer, it aliases the *vi and *ex commands to -run the command-line versions of Vim (see |riscos-commandline|). - -!Vim.Resources and !Vim.Resources2 contain the files from the standard Vim -distribution, but modified slightly to work within the limits of ADFS, plus -some extra files such as the window templates. - -User choices are read from "Choices:*" and are saved to ".*". -If you have the new !Boot structure then these should be set up already. If -not, set Choices$Path to a list of directories to search when looking for -user configuration files. Set Choices$Write to the directory you want files -to be saved into (so your search patterns and marks can be remembered between -sessions). - -============================================================================== - *riscos-munging* -2. Filename munging - -All pathname munging is disabled by default, so Vim should behave like a -normal RISC OS application now. So, if you want to edit "doc/html" then you -actually type "*vi doc/html". - -The only times munging is done is when: - -- Searching included files from C programs, since these are always munged. - See |[I|. - Note: make sure you are in the right directory when you use this - command (i.e. the one with subdirectories "c" and "h"). - -- Sourcing files using |:so|. - Paths starting "$VIM/" are munged like this: - - $VIM/syntax/help.vim -> Vim:syntax.help - - Also, files ending in ".vim" have their extensions removed, and slashes - replaced with dots. - -Some tag files and script files may have to be edited to work under this port. - -============================================================================== - *riscos-commandline* -3. Command-line use - -To use Vim from the command-line use the "*vi" command (or "*ex" for -|Ex-mode|). - -Type "*vi -h" for a list of options. - -Running the command-line version of Vim in a large high-color mode may cause -the scrolling to be very slow. Either change to a mode with fewer colors or -use the GUI version. - -Also, holding down Ctrl will slow it down even more, and Ctrl-Shift will -freeze it, as usual for text programs. - -============================================================================== - *riscos-gui* -4. Desktop use - -Limitations: - -- Left scrollbars don't work properly (right and bottom are fine). -- Doesn't increase scroll speed if it gets behind. - -You can resize the window by dragging the lower-right corner, even though -there is no icon shown there. - -You can use the --rows and --columns arguments to specify the initial size of -the Vim window, like this: > - - *Vi -g --rows 20 --columns 80 - -The global clipboard is supported, so you can select some text and then -paste it directly into another application (provided it supports the -clipboard too). - -Clicking Menu now opens a menu like a normal RISC OS program. Hold down Shift -when clicking Menu to paste (from the global clipboard). - -Dragging a file to the window replaces the CURRENT buffer (the one with the -cursor, NOT the one you dragged to) with the file. - -Dragging with Ctrl held down causes a new Vim window to be opened for the -file (see |:sp|). - -Dragging a file in with Shift held down in insert mode inserts the pathname of -the file. - -:browse :w opens a standard RISC OS save box. -:browse :e opens a directory viewer. - -For fonts, you have the choice of the system font, an outline font, the system -font via ZapRedraw and any of the Zap fonts via ZapRedraw: > - - :set guifont= -< To use the system font via the VDU drivers. Supports - bold and underline. -> - :set guifont=Corpus.Medium -< Use the named outline font. You can use any font, but - only monospaced ones like Corpus look right. -> - :set guifont=Corpus.Medium:w8:h12:b:i -< As before, but with size of 8 point by 12 point, and - in bold italic. - If only one of width and height is given then that - value is used for both. If neither is given then 10 - point is used. - -Thanks to John Kortink, Vim can use the ZapRedraw module. Start the font name -with "!" (or "!!" for double height), like this: > - - :set guifont=!! -< Use the system font, but via ZapRedraw. This gives a - faster redraw on StrongARM processors, but you can't - get bold or italic text. Double height. -> - :set guifont=!script -< Uses the named Zap font (a directory in VimFont$Path). - The redraw is the same speed as for "!!", but you get - a nicer looking font. - Only the "man+" and "script" fonts are supplied - currently, but you can use any of the Zap fonts if - they are in VimFont$Path. - Vim will try to load font files "0", "B", "I" and "IB" - from the named directory. Only "0" (normal style) MUST - be present. Link files are not currently supported. - -Note that when using ZapRedraw the edit bar is drawn in front of the character -you are on rather than behind it. Also redraw is incorrect for screen modes -with eigen values of 0. If the font includes control characters then you can -get Vim to display them by changing the 'isprint' option. - -If you find the scrolling is too slow on your machine, try experimenting -with the 'scrolljump' and 'ttyscroll' options. - -In particular, StrongARM users may find that: > - - :set ttyscroll=0 - -makes scrolling faster in high-color modes. - -============================================================================= - *riscos-remote* -5. Remote use (telnet) - -I have included a built-in termcap entry, but you can edit the termcap file to -allow other codes to be used if you want to use Vim from a remote terminal. - -Although I do not have an internet connection to my Acorn, I have managed to -run Vim in a FreeTerm window using the loopback connection. - -It seems to work pretty well now, using "*vi -T ansi". - -============================================================================== - *riscos-temp-files* -6. Temporary files - -If Vim crashes then the swap and backup files (if any) will be in the -directories set with the 'directory' and 'bdir' options. By default the swap -files are in (i.e. inside !Scrap) and backups are in the -directory you were saving to. Vim will allow you to try and recover the file -when you next try to edit it. - -To see a list of swap files, press and type "*vi -r". - -Vim no longer brings up ATTENTION warnings if you try to edit two files with -the same name in different directories. - -However, it also no longer warns if you try to edit the same file twice (with -two copies of Vim), though you will still be warned when you save that the -datestamp has changed. - -============================================================================== - *riscos-interrupt* -7. Interrupting - -To break out of a looping macro, or similar, hold down Escape in the -command-line version, or press CTRL-C in the GUI version. - -============================================================================== - *riscos-memory* -8. Memory usage - -Vim will use dynamic areas on RISC OS 3.5 or later. If you can use them on -older machines then edit the !RunTxt and GVim files. I don't know what UnixLib -does by default on these machines so I'm playing safe. - -It doesn't work at all well without dynamic areas, since it can't change its -memory allocation once running. Hence you should edit "!Vim.GVim" and -"!Vim.!RunTxt" to choose the best size for you. You probably need at least -about 1400K. - -============================================================================== - *riscos-filetypes* -9. Filetypes - -You can now specify that autocommands are only executed for files of certain -types. The filetype is given in the form &xxx, when xxx is the filetype. - -Filetypes must be specified by number (e.g. &fff for Text). - -The system has changed from version 5.3. The new sequence of events is: - -- A file is loaded. |'osfiletype'| is set to the RISC OS filetype. -- Based on the filetype and pathname, Vim will try to set |'filetype'| to the - Vim-type of the file. -- Setting this option may load syntax files and perform other actions. -- Saving the file will give it a filetype of |'osfiletype'|. - -Some examples may make this clearer: - - Kind of file loaded osfiletype filetype ~ - C code "c.hellow" Text (&fff) C - LaTeX document LaTeX (&2a8) TeX - Draw document DrawFile (&aff) (not changed) - -============================================================================== - *riscos-shell* -10. The shell - -- Bangs (!s) are only replaced if they are followed by a space or end-of-line, - since many pathnames contain them. - -- You can prefix the command with "~", which stops any output from being - displayed. This also means that you don't have to press afterwards, - and stops the screen from being redrawn. {only in the GUI version} - -============================================================================== - *riscos-porting* -11. Porting new releases to RISC OS - -Downloading everything you need: - -- Get the latest source distribution (see www.vim.org) -- Get the runtime environment files (e.g. these help files) -- Get the RISC OS binary distribution (if possible) - - -Unarchiving: - -- Create a raFS disk and put the archives on it -- Un-gzip them -- Un-tar them (*tar xELf 50 archive/tar) - - -Recompiling the sources: - -- Create c, s, and h directories. -- Put all the header files in "h". \ -- Put all the C files in "c". | And lose the extensions -- Put the assembler file ("swis/s") in "s". / -- Rename all the files in "proto" to "h", like this: - raFS::VimSrc.source.proto.file/pro - becomes - raFS::VimSrc.source.h.file_pro -- In the files "h.proto" and "c.termlib", search and replace - .pro" - with - _pro.h" -- Create a simple Makefile if desired and do "*make -k". - Use "CC = gcc -DRISCOS -DUSE_GUI -O2 -x c" in the Makefile. -- Save the binary as !Vim.Vim in the binary distribution. - - -Updating the run-time environment: - -- Replace old or missing files inside !Vim.Resources with the - new files. -- Remove files in "doc" not ending in "/txt", except for "tags". -- Lose the extensions from the files in "doc". -- Edit the "doc.tags" file. Remove extensions from the second column: > - :%s/^\(.[^\t]*\t.*\)\.txt\t/\1\t/ -- Remove extensions from the syntax files. Split them into two directories - to avoid the 77 entry limit on old ADFS filesystems. -- Edit "Vim:FileType" to match "*.c.*" as well as "*/c" and so on. - Add filetype checking too. -- Edit "Vim:Menu" and remove all the keys from the menus: > - :%s/[^ \t]*// -< vim:tw=78:ts=8:ft=help:norl: diff --git a/runtime/doc/os_win32.txt b/runtime/doc/os_win32.txt index 9557f2e957..7f224f82af 100644 --- a/runtime/doc/os_win32.txt +++ b/runtime/doc/os_win32.txt @@ -313,7 +313,36 @@ A. When using :! to run an external command, you can run it with "start": > with :!start do not get passed Vim's open file handles, which means they do not have to be closed before Vim. To avoid this special treatment, use ":! start". - The optional "/min" argument causes the window to be minimized. + There are two optional arguments (see the next Q): + /min the window will be minimized. + /b" no console window will be opened + You can only one of these flags at a time. A second second one will be + treated as the start of the command. + +Q. How do I avoid getting a window for programs that I run asynchronously? +A. You have two possible solutions depending on what exactly do you want: + 1) You may use the /min flag that would run program in minimized state with + no other changes. It will work equally for console and GUI applications. + 2) You can use /b flag to run console applications without creating a + console window for them (GUI applications are not affected). But you + should use this flag only if application you run doesn't require any + input. Otherwise it will get an EOF error because it's input stream + (stdin) would be redirected to \\.\NUL (stdour and stderr too). + + Example for a console application, run Exuberant ctags: > + :!start /min ctags -R . +< When it has finished you should see file named "tags" in your current + directory. You should notice the window title blinking on your taskbar. + This is more noticable for commands that take longer. + Now delete the "tags" file and run this command: > + :!start /b ctags -R . +< You should have the same "tags" file, but this time there will be no + blinking on the taskbar. + Example for a GUI application: > + :!start /min notepad + :!start /b notepad +< The first command runs notepad minimized and the second one runs it + normally. Q. I'm using Win32s, and when I try to run an external command like "make", Vim doesn't wait for it to finish! Help! diff --git a/runtime/doc/quickfix.txt b/runtime/doc/quickfix.txt index 1d05882bd6..22562d70ba 100644 --- a/runtime/doc/quickfix.txt +++ b/runtime/doc/quickfix.txt @@ -1,4 +1,4 @@ -*quickfix.txt* For Vim version 7.3. Last change: 2011 Feb 01 +*quickfix.txt* For Vim version 7.3. Last change: 2011 May 10 VIM REFERENCE MANUAL by Bram Moolenaar @@ -215,28 +215,29 @@ command with 'l'. *:cex* *:cexpr* *E777* :cex[pr][!] {expr} Create a quickfix list using the result of {expr} and - jump to the first error. If {expr} is a String, then - each new-line terminated line in the String is - processed using 'errorformat' and the result is added - to the quickfix list. If {expr} is a List, then each - String item in the list is processed and added to the - quickfix list. Non String items in the List are - ignored. See |:cc| - for [!]. + jump to the first error. + If {expr} is a String, then each new-line terminated + line in the String is processed using the global value + of 'errorformat' and the result is added to the + quickfix list. + If {expr} is a List, then each String item in the list + is processed and added to the quickfix list. Non + String items in the List are ignored. + See |:cc| for [!]. Examples: > :cexpr system('grep -n xyz *') :cexpr getline(1, '$') < *:lex* *:lexpr* -:lex[pr][!] {expr} Same as ":cexpr", except the location list for the +:lex[pr][!] {expr} Same as |:cexpr|, except the location list for the current window is used instead of the quickfix list. *:cgete* *:cgetexpr* :cgete[xpr] {expr} Create a quickfix list using the result of {expr}. - Just like ":cexpr", but don't jump to the first error. + Just like |:cexpr|, but don't jump to the first error. *:lgete* *:lgetexpr* -:lgete[xpr] {expr} Same as ":cgetexpr", except the location list for the +:lgete[xpr] {expr} Same as |:cgetexpr|, except the location list for the current window is used instead of the quickfix list. *:cad* *:caddexpr* diff --git a/runtime/doc/syntax.txt b/runtime/doc/syntax.txt index 839b9909c7..0f81d5f95c 100644 --- a/runtime/doc/syntax.txt +++ b/runtime/doc/syntax.txt @@ -1,4 +1,4 @@ -*syntax.txt* For Vim version 7.3. Last change: 2011 Apr 06 +*syntax.txt* For Vim version 7.3. Last change: 2011 May 06 VIM REFERENCE MANUAL by Bram Moolenaar @@ -1102,6 +1102,8 @@ your .vimrc: > FLEXWIKI *flexwiki.vim* *ft-flexwiki-syntax* FlexWiki is an ASP.NET-based wiki package available at http://www.flexwiki.com +NOTE: this site currently doesn't work, on Wikipedia is mentioned that +development stopped in 2009. Syntax highlighting is available for the most common elements of FlexWiki syntax. The associated ftplugin script sets some buffer-local options to make diff --git a/runtime/doc/tags b/runtime/doc/tags index c264c516ec..a56c69d79f 100644 --- a/runtime/doc/tags +++ b/runtime/doc/tags @@ -4281,6 +4281,7 @@ E847 syntax.txt /*E847* E848 syntax.txt /*E848* E849 syntax.txt /*E849* E85 options.txt /*E85* +E850 change.txt /*E850* E86 windows.txt /*E86* E87 windows.txt /*E87* E88 windows.txt /*E88* @@ -6114,6 +6115,7 @@ hangul hangulin.txt /*hangul* hangulin.txt hangulin.txt /*hangulin.txt* has() eval.txt /*has()* has-patch eval.txt /*has-patch* +has-python if_pyth.txt /*has-python* has_key() eval.txt /*has_key()* haskell.vim syntax.txt /*haskell.vim* haslocaldir() eval.txt /*haslocaldir()* diff --git a/runtime/doc/todo.txt b/runtime/doc/todo.txt index 3adc36cc20..38df7605e1 100644 --- a/runtime/doc/todo.txt +++ b/runtime/doc/todo.txt @@ -1,4 +1,4 @@ -*todo.txt* For Vim version 7.3. Last change: 2011 Apr 28 +*todo.txt* For Vim version 7.3. Last change: 2011 May 19 VIM REFERENCE MANUAL by Bram Moolenaar @@ -32,36 +32,31 @@ be worked on, but only if you sponsor Vim development. See |sponsor|. Go through more coverity reports. -Patch for behavior of :cwindow. (Ingo Karkat, 2011 Apr 15) - -Configure fix for finding exctags. (Hong Xu, 2011 Aprl 2) - -When 'colorcolumn' is set locally to a window, ":new" opens a window with the -same highlighting but 'colorcolumn' is empty. (Tyru, 2010 Nov 15) -Patch by Christian Brabandt, 2011 Feb 13 (but move further down). - -Patch for configure related to Ruby on Mac OS X. (Bjorn Winckler, 2011 Jan 14) - -Patch to make mkdir() work properly for different encodings. (Yukihiro -Nakadaira, 2011 Apr 23) - -Updated PHP syntax file. (Jason Woofenden, 2011 Apr 22) - -ASCII Vim logo's (Erling Westenvik, 2011 Apr 19) Add to website. +Hong Xu: I think src/Make_ro.mak should also be removed. +Two patches 2011 May 15 Crash in autocomplete, valgrind log. (Greg Weber, 2011 Apr 22) -Patch for static code analysis errors in riscOS. (Dominique Pelle, 2010 Dec 3) +Ex command ":s/ \?/ /g" splits multi-byte characters into bytes. (Dominique +Pelle, 2011 May 7). -Patch to set v:register on startup. (Ingo Karkat, 2011 Jan 16) +In command line window ":close" doesn't work properly. (Tony Mechelynck, 2009 +Jun 1) +Patch by Jean-Rene David, 2011 Apr 30. -Risc OS gui has obvious errors. Drop it? +When "b" is a symlink to directory "a", resolve("b/") doesn't result in "a/". +(ZyX, 2011 Feb 12) +Patch by Jean-Rene David, 2011 Apr 30. Patch to set v:register default depending on "unnamed" in 'clipboard'. (Ingo Karkat, 2011 Jan 16) Patch to add 'cscoperelative'. (Raghavendra Prabhu, 2011 Apr 18) +9 "} else" causes following lines to be indented too much. (Rouben + Rostamian, 2008 Aug 30) +Patch by Lech Lorens, 2011 May 16, with more tests. + New syntax file for dnsmasq. (Thilo Six, 2011 Apr 18) Discussion about canonicalization of Hebrew. (Ron Aaron, 2011 April 10) @@ -83,6 +78,8 @@ Lepa, 2011 Jan 18) Patch to support ":!start /b cmd". (Xaizek, 2010 Dec 22) +Patch for syntax "extend" not working correctly. (Ben Schmidt, 2011 May 15) + Patch to build with GTK on Mac. (Ben Schmidt, 2011 Jan 18) Use another name instead of FEAT_GUI_ELSEWHERE. @@ -96,6 +93,11 @@ Patch to improve optwin.vim. (ZyX, 2011 Jan 29) Patch for Python 3 support. (lilydjwg, 2011 Feb 24) +Patch to make putting from clipboard linewise when the text ends in a newline. +(Sung Pae) Do we want this? + +Patch to add third dict argument to sort(). (ZyX, 2011 May 15) + Building the MingW version without clipboard but with multi-byte doesn't work. (Bill Lam, 2010 Sep 18) @@ -105,12 +107,26 @@ Patch for handling of NL in substitute() with \= expression. (Motoya Kurotsu, Patch to disallow fork() when __APPLE__ is defined. (Hisashi T Fujinaka, 2010 Nov 25) +7 Output for ":scriptnames" and ":breaklist" should shorten the file names: + use "~/" when possible. +Patch by Jean-Rene David, 2011 May 1. + +Patch for better #if 0 syntax highlighting for C code. (Ben Schmidt, 2011 Jan +20) +Change to C syntax folding to make it work much faster, but a bit less +reliable. (Lech Lorens, 2009 Nov 9) Enable with an option? +Most time is spent in in_id_list(). +Updated to merge both patches. (Ben Schmidt, 2011 May 2) + GTK: Patch to fix menu popping down. (Hong Xu, 2010 Dec 4, Dec 5) Update 2011 Feb 3. Patch to use pipes on Win32. (Vincent Berthoux, 2011 Feb 28) Update Mar 1 using 'shelltemp'. +Patch to support UTF-8 for Hangul. (Shawn Y.H. Kim, 2011 May 1) +Needs more work. + "gh" deletes the current line, except when it's the last line. Hint by Christian Brabandt, 2011 Mar 22 @@ -127,6 +143,10 @@ problems, even though double quotes are used. (Manuel Stol, 2011 Mar 9) Patch to change the meaning of \n in substitute(). (motoya kurotsu, 2011 Mar 8) +Gui menu edit/paste in block mode insert only inserts in one line (Bjorn +Winckler, 2011 May 11) +Use function to set paste option and restore it, use CTRL-R+ to paste. + Help file foldexpr (ZyX) Syntax region with 'concealends' and a 'cchar' value, 'conceallevel' set to 2, @@ -150,8 +170,15 @@ The error was 'RenderBadPicture (invalid Picture parameter)'. backtrace from your debugger if you break on the gdk_x_error() function.) Check that number of pixels doesn't go above 65535? +8 Add an event like CursorHold that is triggered repeatedly, not just once + after typing something. +Need for CursorHold that retriggers. Use a key that doesn't do anything, or a +function that resets did_cursorhold. +Patch by Christian Brabandt, 2011 May 6. + CursorHold repeats typed key when it's the start of a mapping. (Will Gray, 2011 Mar 23) +Christian Brabandt: problem is that OP_PENDING isn't set. Windows keys not set properly on Windows 7? (cncyber, 2010 Aug 26) @@ -312,9 +339,6 @@ mkdir(). When 'paste' is changed with 'pastetoggle', the ruler doesn't reflect this right away. (Samuel Ferencik, 2010 Dec 7) -Windows installer: licence text should not use indent, causes bad word wrap. -(Benjamin Fritz, 2010 Aug 16) - Mac with X11: clipboard doesn't work properly. (Raf, 2010 Aug 16) Using CompilerSet doesn't record where an option was set from. E.g., in the @@ -357,11 +381,6 @@ Can 'undolevels' be a buffer-local option? Helps for making big changes in one file only, set 'ul' to -1 only for that buffer. Patch by Christian Brabandt, 2010 Dec 17. Needs test. -Dos uninstal may delete vim.bat from the wrong directory (e.g., when someone -makes his own wrapper). Add a magic string with the version number to the -.bat file and check for it in the uninstaller. E.g. - # uninstall key: vim7.3* - Problem with cursor in the wrong column. (SungHyun Nam, 2010 Mar 11) Additional info by Dominique Pelle. (also on 2010 Apr 10) @@ -372,11 +391,6 @@ FILE_SHARE_WRITE in mch_access()? (Phillippe Vaucher, 2010 Nov 2) Is ~/bin (literally) in $PATH supposed to work? (Paul, 2010 March 29) Looks like only bash can do it. (Yakov Lerner) -8 Add an event like CursorHold that is triggered repeatedly, not just once - after typing something. -Need for CursorHold that retriggers. Use a key that doesn't do anything, or a -function that resets did_cursorhold. - Cscope "cs add" stopped working somewhat before 7.2.438. (Gary Johnson, 2010 Jun 29) Caused by 7.2.433? @@ -401,8 +415,6 @@ Shell not recognized properly if it ends in "csh -f". (James Vega, 2009 Nov 3) Find tail? Might have a / in argument. Find space? Might have space in path. -":sort n" treats empty line as higher than zero. (Beeyawned, 2010 Oct 13) - Test 51 fails when language set to German. (Marco, 2011 Jan 9) Dominique can't reproduc it. @@ -440,13 +452,6 @@ Undo problem: line not removed as expected when using setline() from Insert mode. (Israel Chauca, 2010 May 13, more in second msg) Break undo when CTRL-R = changes the text? Or save more lines? -Patch for better #if 0 syntax highlighting for C code. (Ben Schmidt, 2011 Jan -20) - -Change to C syntax folding to make it work much faster, but a bit less -reliable. (Lech Lorens, 2009 Nov 9) Enable with an option? -Most time is spent in in_id_list(). - Slow combination of folding and PHP syntax highlighting. Script to reproduce it. Caused by "syntax sync fromstart" in combination with patch 7.2.274. (Christian Brabandt, 2010 May 27) @@ -459,9 +464,6 @@ Disable updating folds while completion is active? (Peter Odding, 2010 Jun 9) Using ":call foo#d.f()" doesn't autoload the "foo.vim" file. Works OK for echo, just not for ":call" and ":call call()". (Ted, 2011 Mar 17) -In command line window ":close" doesn't work properly. (Tony Mechelynck, 2009 -Jun 1) - Cannot use getchar() inside :normal and using an expression mapping. Is this supposed to work? (XyX, 2010 Sep 22) @@ -585,9 +587,6 @@ Ignore window options when not in the right window? Perhaps we need to use a hidden window for applying autocommands to a buffer that doesn't have a window. -When "b" is a symlink to directory "a", resolve("b/") doesn't result in "a/". -(ZyX, 2011 Feb 12) - When using "ab foo bar" and mapping to , pressing after foo doesn't trigger the abbreviation like would. (Ramana Kumar, 2009 Sep 6) @@ -1001,6 +1000,9 @@ Jun 3) However, for backwards compatibility escaping might be necessary. Check if the user put quotes around the expanded item? +A throw in a function causes missing an endif below the call. (Spiros +Bousbouras, 2011 May 16) + Error E324 can be given when a cron script has wiped out our temp directory. Give a clear error message about this (and tell them not to wipe out /tmp). @@ -1020,10 +1022,19 @@ go to Insert mode and add a few lines. Then backspacing every other time moves the cursor instead of deleting. (Chris Kaiser, 2007 Sep 25) Patch to use Modern UI 2.0 for the Nsis installer. (Guopeng Wen, 2010 Jul 30) +Latest version: 2011 May 18 8 Windows install with NSIS: make it possible to do a silent install, see http://nsis.sourceforge.net/Docs/Chapter4.html#4.12 Version from Guopeng Wen that does this (2010 Dec 27) +Windows installer: licence text should not use indent, causes bad word wrap. +(Benjamin Fritz, 2010 Aug 16) + +Dos uninstal may delete vim.bat from the wrong directory (e.g., when someone +makes his own wrapper). Add a magic string with the version number to the +.bat file and check for it in the uninstaller. E.g. + # uninstall key: vim7.3* + Changes for Win32 makefile. (Mike Williams, 2007 Jan 22, Alexei Alexandrov, 2007 Feb 8) @@ -1857,7 +1868,7 @@ GUI: 8 When translating menus ignore the part after the Tab, the shortcut. So that the same menu item with a different shortcut (e.g., for the Mac) are still translated. -8 Add menu separators for Amiga, RISCOS. +8 Add menu separators for Amiga. 8 Add way to specify the file filter for the browse dialog. At least for browse(). 8 Add dialog for search/replace to other GUIs? Tk has something for this, @@ -2102,8 +2113,6 @@ Macintosh: 6 Python: ":py raw_input('prompt')" doesn't work. (Manu Hack) 8 Command line completion: buffers "foo.txt" and "../b/foo.txt", completing ":buf foo" doesn't find the second one. (George V. Reilly) -7 Output for ":scriptnames" and ":breaklist" should shorten the file names: - use "~/" when possible. 7 mb_off2cells() doesn't work correctly on the tail byte of a double-byte character. (Yasuhiro Matsumoto) It should return 1 when used on a tail byte, like for utf-8. Store second byte of double-byte in ScreenLines2[] @@ -2130,8 +2139,6 @@ Macintosh: works. 8 A very long message in confirm() can't be quit. Make this possible with CTRL-C. -8 When the clipboard isn't supported: ":yank*" gives a confusing error - message. Specifically mention that the register name is invalid. 8 "gf" always excludes trailing punctuation characters. file_name_in_line() is currently fixed to use ".,:;!". Add an option to make this configurable? @@ -2145,8 +2152,6 @@ Macintosh: is a multi-byte character. 8 When appending to a file and 'patchmode' isn't empty, a backup file is always written, even when the original file already exists. -7 When using "daw" on the last word in a file and this is a single letter, - nothing is deleted. Should delete the letter and preceding white space. 9 When getting focus while writing a large file, could warn for this file being changed outside of Vim. Avoid checking this while the file is being written. @@ -2797,7 +2802,7 @@ Multi-byte characters: For Windows, the charset_pairs[] table could be used. But how do we know if a font exists? - Do keyboard conversion from 'termencoding' to 'encoding' with - convert_input() for Mac GUI and RiscOS GUI. + convert_input() for Mac GUI. - Add mnemonics from RFC1345 longer than two characters. Support CTRL-K _{mnemonic}_ 7 In "-- INSERT (lang) --" show the name of the keymap used instead of @@ -3060,6 +3065,10 @@ Built-in script language: Patch by Ilya Sher, 2004 Mar 4. Return a list instead. char2hex() convert char string to hex string. + crypt() encrypt string + decrypt() decrypt string + base64enc() base 64 encoding + base64dec() base 64 decoding attributes() return file protection flags "drwxrwxrwx" filecopy(from, to) Copy a file shorten(fname) shorten a file name, like home_replace() @@ -3441,7 +3450,7 @@ Win32 GUI: GUI: -8 Make inputdialog() work for Photon, Amiga, RiscOS. +8 Make inputdialog() work for Photon, Amiga. - cannot be mapped. Should be possible to recognize this as a normal "-" with the Ctrl modifier. 7 Implement ":popup" for other systems than Windows. @@ -3552,9 +3561,9 @@ Autocommands: handled (e.g., other font) (Ron Aaron) 7 When trying to open a directory, trigger an OpenDirectory event. 7 Add file type in front of file pattern: for directory, for link, - for executable, etc. <&xxx> for Risc OS. With commas to separate - alternatives. The autocommand is only executed when both the file type - AND the file pattern match. (Leonard) + for executable, etc. With commas to separate alternatives. The + autocommand is only executed when both the file type AND the file pattern + match. (Leonard) 5 Add option that specifies extensions which are to be discarded from the file name. E.g. 'ausuffix', with ".gz,.orig". Such that file.c.gz will trigger the "*.c" autocommands. (Belabas) @@ -3812,12 +3821,6 @@ Insert mode: 'cindent', 'smartindent': -9 ") :" confuses continuation line: (Colin Bennett, 2007 Dec 14) - cout << "a" - << ") :" - << "y"; -9 "} else" causes following lines to be indented too much. (Rouben - Rostamian, 2008 Aug 30) 9 Wrapping a variable initialization should have extra indent: char * veryLongName = "very long string" diff --git a/runtime/filetype.vim b/runtime/filetype.vim index 28507b3f1f..701d3688ae 100644 --- a/runtime/filetype.vim +++ b/runtime/filetype.vim @@ -1,7 +1,7 @@ " Vim support file to detect file types " " Maintainer: Bram Moolenaar -" Last Change: 2011 Apr 28 +" Last Change: 2011 May 19 " Listen very carefully, I will say this only once if exists("did_load_filetypes") @@ -556,7 +556,7 @@ au BufNewFile,BufRead */etc/apt/sources.list.d/*.list setf debsources au BufNewFile,BufRead denyhosts.conf setf denyhosts " dnsmasq(8) configuration files -au BufNewFile,BufRead dnsmasq.conf setf dnsmasq +au BufNewFile,BufRead */etc/dnsmasq.conf setf dnsmasq " ROCKLinux package description au BufNewFile,BufRead *.desc setf desc diff --git a/runtime/ftplugin/changelog.vim b/runtime/ftplugin/changelog.vim index c871a777eb..dafcbe20ff 100644 --- a/runtime/ftplugin/changelog.vim +++ b/runtime/ftplugin/changelog.vim @@ -1,7 +1,7 @@ " Vim filetype plugin file " Language: generic Changelog file " Maintainer: Nikolai Weibull -" Latest Revision: 2010-08-17 +" Latest Revision: 2011-05-02 " Variables: " g:changelog_timeformat (deprecated: use g:changelog_dateformat instead) - " description: the timeformat used in ChangeLog entries. @@ -99,8 +99,9 @@ if &filetype == 'changelog' function! s:try_reading_file(path) try return readfile(a:path) + catch + return [] endtry - return [] endfunction function! s:passwd_field(line, field) @@ -170,7 +171,7 @@ if &filetype == 'changelog' endfunction " Internal function to create a new entry in the ChangeLog. - function! s:new_changelog_entry(...) + function! s:new_changelog_entry() " Deal with 'paste' option. let save_paste = &paste let &paste = 1 @@ -178,7 +179,7 @@ if &filetype == 'changelog' " Look for an entry for today by our user. let date = strftime(g:changelog_dateformat) let search = s:substitute_items(g:changelog_date_entry_search, date, - \ g:changelog_username) + \ s:username()) if search(search) > 0 " Ok, now we look for the end of the date entry, and add an entry. call cursor(nextnonblank(line('.') + 1), 1) @@ -197,7 +198,7 @@ if &filetype == 'changelog' " No entry today, so create a date-user header and insert an entry. let todays_entry = s:substitute_items(g:changelog_new_date_format, - \ date, g:changelog_username) + \ date, s:username()) " Make sure we have a cursor positioning. if stridx(todays_entry, '{cursor}') == -1 let todays_entry = todays_entry . '{cursor}' diff --git a/runtime/syntax/dnsmasq.vim b/runtime/syntax/dnsmasq.vim index e6976201f1..80248201f1 100644 --- a/runtime/syntax/dnsmasq.vim +++ b/runtime/syntax/dnsmasq.vim @@ -1,13 +1,20 @@ " Vim syntax file " Language: dnsmasq(8) configuration file " Maintainer: Thilo Six -" Last Change: 2011 Apr 28 +" Last Change: 17 May 2011 " Credits: This file is a mix of cfg.vim, wget.vim and xf86conf.vim, credits go to: " Igor N. Prischepoff " Doug Kearns " David Ne\v{c}as " -" Options: let dnsmasq_backrgound_light = 1 +" Options: You might want to add this to your vimrc: +" +" if &background == "dark" +" " dnsmasq.vim +" let dnsmasq_backrgound_light = 0 +" else +" let dnsmasq_backrgound_light = 1 +" endif " " For version 5.x: Clear all syntax items @@ -18,6 +25,7 @@ elseif exists ("b:current_syntax") finish endif + if !exists("b:dnsmasq_backrgound_light") if exists("dnsmasq_backrgound_light") let b:dnsmasq_backrgound_light = dnsmasq_backrgound_light @@ -30,75 +38,136 @@ endif " case on syn case match -"Parameters -syn match DnsmasqParams "^.\{-}="me=e-1 contains=DnsmasqComment -"... and their values (don't want to highlight '=' sign) syn match DnsmasqValues "=.*"hs=s+1 contains=DnsmasqComment,DnsmasqSpecial +syn match DnsmasqSpecial display '=\|@\|,\|!\|:' nextgroup=DnsmasqValues +syn match DnsmasqSpecial "#" -"...because we do it here. -syn match DnsmasqEq display '=\|@\|/\|,' nextgroup=DnsmasqValues +syn match DnsmasqIPv4 "\(\d\{1,3}\.\)\{3}\d\{1,3}" nextgroup=DnsmasqSubnet2,DnsmasqRange +syn match DnsmasqSubnet "\<255.\(\d\{1,3}\.\)\{2}\d\{1,3}" +syn match DnsmasqSubnet2 contained "\/\(\d\{1,2}\)\>" +syn match DnsmasqRange contained "-" +syn match DnsmasqMac "\<\(\x\x\?:\)\{5}\x\x\?" -syn match DnsmasqSpecial "#" +syn match DnsmasqTime "\<\(\d\{1,3}\)[hm]\>" " String -syn match DnsmasqString "\".*\"" -syn match DnsmasqString "'.*'" +syn match DnsmasqString "\".*\"" +syn match DnsmasqString "'.*'" " Comments -syn match DnsmasqComment "^#.*$" contains=DnsmasqTodo -syn match DnsmasqComment "[ \t]#.*$" contains=DnsmasqTodo +syn match DnsmasqComment "^#.*$" contains=DnsmasqTodo +syn match DnsmasqComment "\s#.*$" contains=DnsmasqTodo syn keyword DnsmasqTodo FIXME TODO XXX NOT contained +syn match DnsmasqKeywordSpecial "\:"me=e-1 +syn match DnsmasqKeywordSpecial "\:"me=e-1 +syn match DnsmasqKeywordSpecial ",\"hs=s+1 contains=DnsmasqSpecial +syn match DnsmasqKeywordSpecial ",\"hs=s+1 contains=DnsmasqSpecial +syn match DnsmasqKeywordSpecial "\:"me=e-1 +syn match DnsmasqKeywordSpecial "\:"me=e-1 +syn match DnsmasqKeywordSpecial "\:"me=e-1 +syn match DnsmasqKeywordSpecial "\:"me=e-1 +syn match DnsmasqKeywordSpecial ",\"hs=s+1 contains=DnsmasqSpecial +syn match DnsmasqKeywordSpecial "\:"me=e-1 + syn match DnsmasqKeyword "^\s*add-mac\>" +syn match DnsmasqKeyword "^\s*addn-hosts\>" +syn match DnsmasqKeyword "^\s*address\>" +syn match DnsmasqKeyword "^\s*alias\>" syn match DnsmasqKeyword "^\s*all-servers\>" syn match DnsmasqKeyword "^\s*bind-interfaces\>" +syn match DnsmasqKeyword "^\s*bogus-nxdomain\>" syn match DnsmasqKeyword "^\s*bogus-priv\>" +syn match DnsmasqKeyword "^\s*cache-size\>" syn match DnsmasqKeyword "^\s*clear-on-reload\>" +syn match DnsmasqKeyword "^\s*cname\>" +syn match DnsmasqKeyword "^\s*conf-dir\>" +syn match DnsmasqKeyword "^\s*conf-file\>" syn match DnsmasqKeyword "^\s*dhcp-authoritative\>" +syn match DnsmasqKeyword "^\s*dhcp-boot\>" syn match DnsmasqKeyword "^\s*dhcp-fqdn\>" +syn match DnsmasqKeyword "^\s*dhcp-host\>" +syn match DnsmasqKeyword "^\s*dhcp-ignore\>" +syn match DnsmasqKeyword "^\s*dhcp-lease-max\>" +syn match DnsmasqKeyword "^\s*dhcp-leasefile\>" +syn match DnsmasqKeyword "^\s*dhcp-mac\>" +syn match DnsmasqKeyword "^\s*dhcp-match\>" syn match DnsmasqKeyword "^\s*dhcp-no-override\>" +syn match DnsmasqKeyword "^\s*dhcp-option-force\>" +syn match DnsmasqKeyword "^\s*dhcp-option\>" +syn match DnsmasqKeyword "^\s*dhcp-range\>" +syn match DnsmasqKeyword "^\s*dhcp-script\>" syn match DnsmasqKeyword "^\s*dhcp-scriptuser\>" +syn match DnsmasqKeyword "^\s*dhcp-userclass\>" +syn match DnsmasqKeyword "^\s*dhcp-vendorclass\>" syn match DnsmasqKeyword "^\s*domain-needed\>" +syn match DnsmasqKeyword "^\s*domain\>" syn match DnsmasqKeyword "^\s*enable-dbus\>" syn match DnsmasqKeyword "^\s*enable-tftp\>" +syn match DnsmasqKeyword "^\s*except-interface\>" syn match DnsmasqKeyword "^\s*expand-hosts\>" syn match DnsmasqKeyword "^\s*filterwin2k\>" +syn match DnsmasqKeyword "^\s*group\>" +syn match DnsmasqKeyword "^\s*interface\>" syn match DnsmasqKeyword "^\s*keep-in-foreground\>" syn match DnsmasqKeyword "^\s*leasefile-ro\>" +syn match DnsmasqKeyword "^\s*listen-address\>" +syn match DnsmasqKeyword "^\s*local-ttl\>" +syn match DnsmasqKeyword "^\s*local\>" syn match DnsmasqKeyword "^\s*localise-queries\>" syn match DnsmasqKeyword "^\s*localmx\>" syn match DnsmasqKeyword "^\s*log-dhcp\>" syn match DnsmasqKeyword "^\s*log-queries\>" +syn match DnsmasqKeyword "^\s*mx-host\>" +syn match DnsmasqKeyword "^\s*mx-target\>" syn match DnsmasqKeyword "^\s*no-daemon\>" +syn match DnsmasqKeyword "^\s*no-dhcp-interface\>" syn match DnsmasqKeyword "^\s*no-hosts\>" syn match DnsmasqKeyword "^\s*no-negcache\>" syn match DnsmasqKeyword "^\s*no-ping\>" syn match DnsmasqKeyword "^\s*no-poll\>" syn match DnsmasqKeyword "^\s*no-resolv\>" syn match DnsmasqKeyword "^\s*proxy-dnssec\>" +syn match DnsmasqKeyword "^\s*ptr-record\>" +syn match DnsmasqKeyword "^\s*pxe-prompt\>" +syn match DnsmasqKeyword "^\s*pxe-service\>" syn match DnsmasqKeyword "^\s*read-ethers\>" syn match DnsmasqKeyword "^\s*rebind-localhost-ok\>" +syn match DnsmasqKeyword "^\s*resolv-file\>" syn match DnsmasqKeyword "^\s*selfmx\>" +syn match DnsmasqKeyword "^\s*server\>" +syn match DnsmasqKeyword "^\s*srv-host\>" syn match DnsmasqKeyword "^\s*stop-dns-rebind\>" syn match DnsmasqKeyword "^\s*strict-order\>" syn match DnsmasqKeyword "^\s*tftp-no-blocksize\>" +syn match DnsmasqKeyword "^\s*tftp-root\>" syn match DnsmasqKeyword "^\s*tftp-secure\>" syn match DnsmasqKeyword "^\s*tftp-unique-root\>" +syn match DnsmasqKeyword "^\s*txt-record\>" +syn match DnsmasqKeyword "^\s*user\>" if b:dnsmasq_backrgound_light == 1 - hi def DnsmasqParams ctermfg=DarkGreen guifg=DarkGreen - hi def DnsmasqKeyword ctermfg=DarkGreen guifg=DarkGreen + hi def DnsmasqParams ctermfg=DarkGreen guifg=DarkGreen + hi def DnsmasqKeyword ctermfg=DarkGreen guifg=DarkGreen else hi def link DnsmasqKeyword Keyword hi def link DnsmasqParams Keyword endif -hi def link DnsmasqTodo Todo -hi def link DnsmasqSpecial Constant -hi def link DnsmasqComment Comment -hi def link DnsmasqString Constant -hi def link DnsmasqValues Normal -hi def link DnsmasqEq Constant +hi def link DnsmasqKeywordSpecial Type +hi def link DnsmasqTodo Todo +hi def link DnsmasqSpecial Constant +hi def link DnsmasqIPv4 Identifier +hi def link DnsmasqSubnet2 DnsmasqSubnet +hi def link DnsmasqSubnet DnsmasqMac +hi def link DnsmasqRange DnsmasqMac +hi def link DnsmasqMac Preproc +hi def link DnsmasqTime Preproc +hi def link DnsmasqComment Comment +hi def link DnsmasqString Constant +hi def link DnsmasqValues Normal + let b:current_syntax = "dnsmasq" + diff --git a/runtime/syntax/dot.vim b/runtime/syntax/dot.vim index 507f72e281..4cc6f4f21d 100644 --- a/runtime/syntax/dot.vim +++ b/runtime/syntax/dot.vim @@ -3,7 +3,7 @@ " Filenames: *.dot " Maintainer: Markus Mottl " URL: http://www.ocaml.info/vim/syntax/dot.vim -" Last Change: 2006 Feb 05 +" Last Change: 2011 May 17 - improved identifier matching + two new keywords " 2001 May 04 - initial version " For version 5.x: Clear all syntax items @@ -47,10 +47,10 @@ syn keyword dotType shape shapefile sides skew width " Edge attributes syn keyword dotType arrowhead arrowsize arrowtail constraint decorateP -syn keyword dotType dir headclip headlabel labelangle labeldistance +syn keyword dotType dir headclip headlabel headport labelangle labeldistance syn keyword dotType labelfontcolor labelfontname labelfontsize syn keyword dotType minlen port_label_distance samehead sametail -syn keyword dotType tailclip taillabel weight +syn keyword dotType tailclip taillabel tailport weight " Shared attributes (graphs, nodes, edges) syn keyword dotType color @@ -67,7 +67,7 @@ syn match dotKeyChar ";" syn match dotKeyChar "->" " Identifier -syn match dotIdentifier /\<\w\+\>/ +syn match dotIdentifier /\<\w\+\(:\w\+\)\?\>/ " Synchronization syn sync minlines=50 diff --git a/runtime/syntax/gnash.vim b/runtime/syntax/gnash.vim index 413ebaa643..97d5aa4cea 100644 --- a/runtime/syntax/gnash.vim +++ b/runtime/syntax/gnash.vim @@ -2,7 +2,7 @@ " Language: gnash(1) configuration files " http://www.gnu.org/software/gnash/manual/gnashuser.html#gnashrc " Maintainer: Thilo Six -" Last Change: 2011 Apr 28 +" Last Change: 17 May 2011 " Credidts: derived from readline.vim " Nikolai Weibull " @@ -15,16 +15,12 @@ elseif exists ("b:current_syntax") finish endif -let s:cpo_save = &cpo -set cpo&vim - - syn case match - syn keyword GnashTodo contained TODO FIXME XXX NOTE -syn region GnashComment display oneline start='^\s*#' end='$' - \ contains=GnashTodo,@Spell +" Comments +syn match GnashComment "^#.*$" contains=GnashTodo +syn match GnashComment "\s#.*$" contains=GnashTodo syn match GnashNumber display '\<\d\+\>' @@ -84,16 +80,13 @@ syn match GnashKeyword '\' syn match GnashKeyword '\' syn match GnashKeyword '\' -hi def GnashOn ctermfg=Green guifg=Green -hi def GnashOff ctermfg=Red guifg=Red +hi def link GnashOn Identifier +hi def link GnashOff Preproc hi def link GnashComment Comment hi def link GnashTodo Todo hi def link GnashString String -hi def link GnashNumber Normal +hi def link GnashNumber Type hi def link GnashSet String hi def link GnashKeyword Keyword let b:current_syntax = "gnash" - -let &cpo = s:cpo_save -unlet s:cpo_save diff --git a/runtime/syntax/hostsaccess.vim b/runtime/syntax/hostsaccess.vim new file mode 100644 index 0000000000..8a9f02eff5 --- /dev/null +++ b/runtime/syntax/hostsaccess.vim @@ -0,0 +1,27 @@ +" Vim syntax file +" Language: hosts.deny, hosts.allow configuration files +" Maintainer: Thilo Six +" Last Change: 2011 May 01 +" Derived From: conf.vim +" Credits: Bram Moolenaar +" +" This file is there to get at least a minimal highlighting. +" A later version may be improved. + + +" Quit when a (custom) syntax file was already loaded +if exists("b:current_syntax") + finish +endif + +" For a starter we just use conf.vim for highlighting +if version < 600 + so :p:h/conf.vim +else + runtime! syntax/conf.vim + unlet b:current_syntax +endif + + +let b:current_syntax = "hostsaccess" +" vim: ts=8 sw=2 diff --git a/runtime/syntax/ocaml.vim b/runtime/syntax/ocaml.vim index 27eb3907e4..e2abc55242 100644 --- a/runtime/syntax/ocaml.vim +++ b/runtime/syntax/ocaml.vim @@ -5,9 +5,9 @@ " Karl-Heinz Sylla " Issac Trotts " URL: http://www.ocaml.info/vim/syntax/ocaml.vim -" Last Change: 2007 Apr 13 - Added highlighting of nativeints (MM) -" 2006 Oct 09 - More highlighting improvements to numbers (MM) -" 2006 Sep 19 - Improved highlighting of numbers (Florent Monnier) +" Last Change: 2010 Oct 11 - Added highlighting of lnot (MM, thanks to Erick Matsen) +" 2010 Sep 03 - Fixed escaping bug (MM, thanks to Florent Monnier) +" 2010 Aug 07 - Fixed module type bug (MM) " A minor patch was applied to the official version so that object/end " can be distinguished from begin/end, which is used for indentation, @@ -24,14 +24,14 @@ endif " OCaml is case sensitive. syn case match +" Access to the method of an object +syn match ocamlMethod "#" + " Script headers highlighted like comments syn match ocamlComment "^#!.*" " Scripting directives -syn match ocamlScript "^#\<\(quit\|labels\|warnings\|directory\|cd\|load\|use\|install_printer\|remove_printer\|require\|thread\|trace\|untrace\|untrace_all\|print_depth\|print_length\)\>" - -" Script headers highlighted like comments -syn match ocamlComment "^#!.*" +syn match ocamlScript "^#\<\(quit\|labels\|warnings\|directory\|cd\|load\|use\|install_printer\|remove_printer\|require\|thread\|trace\|untrace\|untrace_all\|print_depth\|print_length\|camlp4o\)\>" " lowercase identifier - the standard way to match syn match ocamlLCIdentifier /\<\(\l\|_\)\(\w\|'\)*\>/ @@ -69,7 +69,7 @@ syn cluster ocamlAllErrs contains=ocamlBraceErr,ocamlBrackErr,ocamlParenErr,oca syn cluster ocamlAENoParen contains=ocamlBraceErr,ocamlBrackErr,ocamlCommentErr,ocamlCountErr,ocamlDoErr,ocamlDoneErr,ocamlEndErr,ocamlThenErr -syn cluster ocamlContained contains=ocamlTodo,ocamlPreDef,ocamlModParam,ocamlModParam1,ocamlPreMPRestr,ocamlMPRestr,ocamlMPRestr1,ocamlMPRestr2,ocamlMPRestr3,ocamlModRHS,ocamlFuncWith,ocamlFuncStruct,ocamlModTypeRestr,ocamlModTRWith,ocamlWith,ocamlWithRest,ocamlModType,ocamlFullMod +syn cluster ocamlContained contains=ocamlTodo,ocamlPreDef,ocamlModParam,ocamlModParam1,ocamlPreMPRestr,ocamlMPRestr,ocamlMPRestr1,ocamlMPRestr2,ocamlMPRestr3,ocamlModRHS,ocamlFuncWith,ocamlFuncStruct,ocamlModTypeRestr,ocamlModTRWith,ocamlWith,ocamlWithRest,ocamlModType,ocamlFullMod,ocamlVal " Enclosing delimiters @@ -109,9 +109,6 @@ syn region ocamlNone matchgroup=ocamlKeyword start="\" matchgroup=ocamlKe "" Modules -" "struct" -syn region ocamlStruct matchgroup=ocamlModule start="\" matchgroup=ocamlModule end="\" contains=ALLBUT,@ocamlContained,ocamlEndErr - " "sig" syn region ocamlSig matchgroup=ocamlModule start="\" matchgroup=ocamlModule end="\" contains=ALLBUT,@ocamlContained,ocamlEndErr,ocamlModule syn region ocamlModSpec matchgroup=ocamlKeyword start="\" matchgroup=ocamlModule end="\<\u\(\w\|'\)*\>" contained contains=@ocamlAllErrs,ocamlComment skipwhite skipempty nextgroup=ocamlModTRWith,ocamlMPRestr @@ -124,8 +121,8 @@ syn match ocamlKeyword "\" skipwhite skipempty nextgroup=ocamlModPa " "module" - somewhat complicated stuff ;-) syn region ocamlModule matchgroup=ocamlKeyword start="\" matchgroup=ocamlModule end="\<\u\(\w\|'\)*\>" contains=@ocamlAllErrs,ocamlComment skipwhite skipempty nextgroup=ocamlPreDef -syn region ocamlPreDef start="."me=e-1 matchgroup=ocamlKeyword end="\l\|="me=e-1 contained contains=@ocamlAllErrs,ocamlComment,ocamlModParam,ocamlModTypeRestr,ocamlModTRWith nextgroup=ocamlModPreRHS -syn region ocamlModParam start="([^*]" end=")" contained contains=@ocamlAENoParen,ocamlModParam1 +syn region ocamlPreDef start="."me=e-1 matchgroup=ocamlKeyword end="\l\|=\|)"me=e-1 contained contains=@ocamlAllErrs,ocamlComment,ocamlModParam,ocamlModTypeRestr,ocamlModTRWith nextgroup=ocamlModPreRHS +syn region ocamlModParam start="([^*]" end=")" contained contains=@ocamlAENoParen,ocamlModParam1,ocamlVal syn match ocamlModParam1 "\<\u\(\w\|'\)*\>" contained skipwhite skipempty nextgroup=ocamlPreMPRestr syn region ocamlPreMPRestr start="."me=e-1 end=")"me=e-1 contained contains=@ocamlAllErrs,ocamlComment,ocamlMPRestr,ocamlModTypeRestr @@ -135,6 +132,8 @@ syn region ocamlMPRestr1 matchgroup=ocamlModule start="\ssig\s\=" matchgroup=o syn region ocamlMPRestr2 start="\sfunctor\(\s\|(\)\="me=e-1 matchgroup=ocamlKeyword end="->" contained contains=@ocamlAllErrs,ocamlComment,ocamlModParam skipwhite skipempty nextgroup=ocamlFuncWith,ocamlMPRestr2 syn match ocamlMPRestr3 "\w\(\w\|'\)*\(\.\w\(\w\|'\)*\)*" contained syn match ocamlModPreRHS "=" contained skipwhite skipempty nextgroup=ocamlModParam,ocamlFullMod +syn keyword ocamlKeyword val +syn region ocamlVal matchgroup=ocamlKeyword start="\" matchgroup=ocamlLCIdentifier end="\<\l\(\w\|'\)*\>" contains=@ocamlAllErrs,ocamlComment skipwhite skipempty nextgroup=ocamlMPRestr syn region ocamlModRHS start="." end=".\w\|([^*]"me=e-2 contained contains=ocamlComment skipwhite skipempty nextgroup=ocamlModParam,ocamlFullMod syn match ocamlFullMod "\<\u\(\w\|'\)*\(\.\u\(\w\|'\)*\)*" contained skipwhite skipempty nextgroup=ocamlFuncWith @@ -146,8 +145,11 @@ syn region ocamlModTRWith start=":\s*("hs=s+1 end=")" contained contains=@ocam syn match ocamlWith "\<\(\u\(\w\|'\)*\.\)*\w\(\w\|'\)*\>" contained skipwhite skipempty nextgroup=ocamlWithRest syn region ocamlWithRest start="[^)]" end=")"me=e-1 contained contains=ALLBUT,@ocamlContained +" "struct" +syn region ocamlStruct matchgroup=ocamlModule start="\<\(module\s\+\)\=struct\>" matchgroup=ocamlModule end="\" contains=ALLBUT,@ocamlContained,ocamlEndErr + " "module type" -syn region ocamlKeyword start="\\s*\" matchgroup=ocamlModule end="\<\w\(\w\|'\)*\>" contains=ocamlComment skipwhite skipempty nextgroup=ocamlMTDef +syn region ocamlKeyword start="\\s*\\(\s*\\)\=" matchgroup=ocamlModule end="\<\w\(\w\|'\)*\>" contains=ocamlComment skipwhite skipempty nextgroup=ocamlMTDef syn match ocamlMTDef "=\s*\w\(\w\|'\)*\>"hs=s+1,me=s syn keyword ocamlKeyword and as assert class @@ -159,7 +161,7 @@ syn keyword ocamlKeyword land lazy let match syn keyword ocamlKeyword method mutable new of syn keyword ocamlKeyword parser private raise rec syn keyword ocamlKeyword try type -syn keyword ocamlKeyword val virtual when while with +syn keyword ocamlKeyword virtual when while with if exists("ocaml_revised") syn keyword ocamlKeyword do value @@ -174,7 +176,7 @@ syn keyword ocamlType array bool char exn float format format4 syn keyword ocamlType int int32 int64 lazy_t list nativeint option syn keyword ocamlType string unit -syn keyword ocamlOperator asr lor lsl lsr lxor mod not +syn keyword ocamlOperator asr lnot lor lsl lsr lxor mod not syn match ocamlConstructor "(\s*)" syn match ocamlConstructor "\[\s*\]" @@ -189,6 +191,7 @@ syn match ocamlConstructor "`\w\(\w\|'\)*\>" syn match ocamlModPath "\u\(\w\|'\)*\."he=e-1 syn match ocamlCharacter "'\\\d\d\d'\|'\\[\'ntbr]'\|'.'" +syn match ocamlCharacter "'\\x\x\x'" syn match ocamlCharErr "'\\\d\d'\|'\\\d'" syn match ocamlCharErr "'\\[^\'ntbr]'" syn region ocamlString start=+"+ skip=+\\\\\|\\"+ end=+"+ @@ -220,7 +223,7 @@ syn match ocamlNumber "\<-\=\d\(_\|\d\)*[l|L|n]\?\>" syn match ocamlNumber "\<-\=0[x|X]\(\x\|_\)\+[l|L|n]\?\>" syn match ocamlNumber "\<-\=0[o|O]\(\o\|_\)\+[l|L|n]\?\>" syn match ocamlNumber "\<-\=0[b|B]\([01]\|_\)\+[l|L|n]\?\>" -syn match ocamlFloat "\<-\=\d\(_\|\d\)*\.\(_\|\d\)*\([eE][-+]\=\d\(_\|\d\)*\)\=\>" +syn match ocamlFloat "\<-\=\d\(_\|\d\)*\.\?\(_\|\d\)*\([eE][-+]\=\d\(_\|\d\)*\)\=\>" " Labels syn match ocamlLabel "\~\(\l\|_\)\(\w\|'\)*"lc=1 @@ -294,6 +297,7 @@ if version >= 508 || !exists("did_ocaml_syntax_inits") HiLink ocamlConstructor Constant + HiLink ocamlVal Keyword HiLink ocamlModPreRHS Keyword HiLink ocamlMPRestr2 Keyword HiLink ocamlKeyword Keyword diff --git a/runtime/syntax/pfmain.vim b/runtime/syntax/pfmain.vim index 233c8d9c59..a0904457a2 100644 --- a/runtime/syntax/pfmain.vim +++ b/runtime/syntax/pfmain.vim @@ -1,10 +1,11 @@ " Vim syntax file " Language: Postfix main.cf configuration " Maintainer: KELEMEN Peter -" Last Change: 2006 Apr 15 -" Version: 0.20 +" Last Update: Hong Xu +" Last Change: 2011 May 14 +" Version: 0.40 " URL: http://cern.ch/fuji/vim/syntax/pfmain.vim -" Comment: Based on Postfix 2.3.x defaults. +" Comment: Based on Postfix 2.9 defaults. if version < 600 syntax clear @@ -22,7 +23,9 @@ syntax case match syntax sync minlines=1 syntax keyword pfmainConf 2bounce_notice_recipient +syntax keyword pfmainConf access_map_defer_code syntax keyword pfmainConf access_map_reject_code +syntax keyword pfmainConf address_verify_cache_cleanup_interval syntax keyword pfmainConf address_verify_default_transport syntax keyword pfmainConf address_verify_local_transport syntax keyword pfmainConf address_verify_map @@ -36,6 +39,7 @@ syntax keyword pfmainConf address_verify_positive_refresh_time syntax keyword pfmainConf address_verify_relay_transport syntax keyword pfmainConf address_verify_relayhost syntax keyword pfmainConf address_verify_sender +syntax keyword pfmainConf address_verify_sender_dependent_default_transport_maps syntax keyword pfmainConf address_verify_sender_dependent_relayhost_maps syntax keyword pfmainConf address_verify_service_name syntax keyword pfmainConf address_verify_transport_maps @@ -83,22 +87,31 @@ syntax keyword pfmainConf connection_cache_service_name syntax keyword pfmainConf connection_cache_status_update_time syntax keyword pfmainConf connection_cache_ttl_limit syntax keyword pfmainConf content_filter +syntax keyword pfmainConf cyrus_sasl_config_path syntax keyword pfmainConf daemon_directory syntax keyword pfmainConf daemon_timeout +syntax keyword pfmainConf data_directory syntax keyword pfmainConf debug_peer_level syntax keyword pfmainConf debug_peer_list syntax keyword pfmainConf default_database_type syntax keyword pfmainConf default_delivery_slot_cost syntax keyword pfmainConf default_delivery_slot_discount syntax keyword pfmainConf default_delivery_slot_loan +syntax keyword pfmainConf default_destination_concurrency_failed_cohort_limit syntax keyword pfmainConf default_destination_concurrency_limit +syntax keyword pfmainConf default_destination_concurrency_negative_feedback +syntax keyword pfmainConf default_destination_concurrency_positive_feedback +syntax keyword pfmainConf default_destination_rate_delay syntax keyword pfmainConf default_destination_recipient_limit syntax keyword pfmainConf default_extra_recipient_limit +syntax keyword pfmainConf default_filter_nexthop syntax keyword pfmainConf default_minimum_delivery_slots syntax keyword pfmainConf default_privs syntax keyword pfmainConf default_process_limit syntax keyword pfmainConf default_rbl_reply syntax keyword pfmainConf default_recipient_limit +syntax keyword pfmainConf default_recipient_refill_delay +syntax keyword pfmainConf default_recipient_refill_limit syntax keyword pfmainConf default_transport syntax keyword pfmainConf default_verp_delimiters syntax keyword pfmainConf defer_code @@ -109,15 +122,22 @@ syntax keyword pfmainConf delay_notice_recipient syntax keyword pfmainConf delay_warning_time syntax keyword pfmainConf deliver_lock_attempts syntax keyword pfmainConf deliver_lock_delay +syntax keyword pfmainConf destination_concurrency_feedback_debug +syntax keyword pfmainConf detect_8bit_encoding_header syntax keyword pfmainConf disable_dns_lookups syntax keyword pfmainConf disable_mime_input_processing syntax keyword pfmainConf disable_mime_output_conversion syntax keyword pfmainConf disable_verp_bounces syntax keyword pfmainConf disable_vrfy_command +syntax keyword pfmainConf dnsblog_reply_delay +syntax keyword pfmainConf dnsblog_service_name syntax keyword pfmainConf dont_remove syntax keyword pfmainConf double_bounce_sender syntax keyword pfmainConf duplicate_filter_limit +syntax keyword pfmainConf empty_address_default_transport_maps_lookup_key syntax keyword pfmainConf empty_address_recipient +syntax keyword pfmainConf empty_address_relayhost_maps_lookup_key +syntax keyword pfmainConf enable_long_queue_ids syntax keyword pfmainConf enable_original_recipient syntax keyword pfmainConf error_notice_recipient syntax keyword pfmainConf error_service_name @@ -151,13 +171,16 @@ syntax keyword pfmainConf in_flow_delay syntax keyword pfmainConf inet_interfaces syntax keyword pfmainConf inet_protocols syntax keyword pfmainConf initial_destination_concurrency +syntax keyword pfmainConf internal_mail_filter_classes syntax keyword pfmainConf invalid_hostname_reject_code syntax keyword pfmainConf ipc_idle syntax keyword pfmainConf ipc_timeout syntax keyword pfmainConf ipc_ttl syntax keyword pfmainConf line_length_limit +syntax keyword pfmainConf lmtp_address_preference syntax keyword pfmainConf lmtp_bind_address syntax keyword pfmainConf lmtp_bind_address6 +syntax keyword pfmainConf lmtp_body_checks syntax keyword pfmainConf lmtp_cname_overrides_servername syntax keyword pfmainConf lmtp_connect_timeout syntax keyword pfmainConf lmtp_connection_cache_destinations @@ -172,23 +195,34 @@ syntax keyword pfmainConf lmtp_destination_concurrency_limit syntax keyword pfmainConf lmtp_destination_recipient_limit syntax keyword pfmainConf lmtp_discard_lhlo_keyword_address_maps syntax keyword pfmainConf lmtp_discard_lhlo_keywords +syntax keyword pfmainConf lmtp_dns_resolver_options syntax keyword pfmainConf lmtp_enforce_tls syntax keyword pfmainConf lmtp_generic_maps +syntax keyword pfmainConf lmtp_header_checks syntax keyword pfmainConf lmtp_host_lookup syntax keyword pfmainConf lmtp_lhlo_name syntax keyword pfmainConf lmtp_lhlo_timeout syntax keyword pfmainConf lmtp_line_length_limit syntax keyword pfmainConf lmtp_mail_timeout +syntax keyword pfmainConf lmtp_mime_header_checks syntax keyword pfmainConf lmtp_mx_address_limit syntax keyword pfmainConf lmtp_mx_session_limit +syntax keyword pfmainConf lmtp_nested_header_checks +syntax keyword pfmainConf lmtp_per_record_deadline syntax keyword pfmainConf lmtp_pix_workaround_delay_time +syntax keyword pfmainConf lmtp_pix_workaround_maps syntax keyword pfmainConf lmtp_pix_workaround_threshold_time +syntax keyword pfmainConf lmtp_pix_workarounds syntax keyword pfmainConf lmtp_quit_timeout syntax keyword pfmainConf lmtp_quote_rfc821_envelope syntax keyword pfmainConf lmtp_randomize_addresses syntax keyword pfmainConf lmtp_rcpt_timeout +syntax keyword pfmainConf lmtp_reply_filter syntax keyword pfmainConf lmtp_rset_timeout +syntax keyword pfmainConf lmtp_sasl_auth_cache_name +syntax keyword pfmainConf lmtp_sasl_auth_cache_time syntax keyword pfmainConf lmtp_sasl_auth_enable +syntax keyword pfmainConf lmtp_sasl_auth_soft_bounce syntax keyword pfmainConf lmtp_sasl_mechanism_filter syntax keyword pfmainConf lmtp_sasl_password_maps syntax keyword pfmainConf lmtp_sasl_path @@ -201,10 +235,34 @@ syntax keyword pfmainConf lmtp_sender_dependent_authentication syntax keyword pfmainConf lmtp_skip_5xx_greeting syntax keyword pfmainConf lmtp_starttls_timeout syntax keyword pfmainConf lmtp_tcp_port +syntax keyword pfmainConf lmtp_tls_CAfile +syntax keyword pfmainConf lmtp_tls_CApath +syntax keyword pfmainConf lmtp_tls_block_early_mail_reply +syntax keyword pfmainConf lmtp_tls_cert_file +syntax keyword pfmainConf lmtp_tls_ciphers +syntax keyword pfmainConf lmtp_tls_dcert_file +syntax keyword pfmainConf lmtp_tls_dkey_file +syntax keyword pfmainConf lmtp_tls_eccert_file +syntax keyword pfmainConf lmtp_tls_eckey_file syntax keyword pfmainConf lmtp_tls_enforce_peername +syntax keyword pfmainConf lmtp_tls_exclude_ciphers +syntax keyword pfmainConf lmtp_tls_fingerprint_cert_match +syntax keyword pfmainConf lmtp_tls_fingerprint_digest +syntax keyword pfmainConf lmtp_tls_key_file +syntax keyword pfmainConf lmtp_tls_loglevel +syntax keyword pfmainConf lmtp_tls_mandatory_ciphers +syntax keyword pfmainConf lmtp_tls_mandatory_exclude_ciphers +syntax keyword pfmainConf lmtp_tls_mandatory_protocols syntax keyword pfmainConf lmtp_tls_note_starttls_offer syntax keyword pfmainConf lmtp_tls_per_site +syntax keyword pfmainConf lmtp_tls_policy_maps +syntax keyword pfmainConf lmtp_tls_protocols syntax keyword pfmainConf lmtp_tls_scert_verifydepth +syntax keyword pfmainConf lmtp_tls_secure_cert_match +syntax keyword pfmainConf lmtp_tls_security_level +syntax keyword pfmainConf lmtp_tls_session_cache_database +syntax keyword pfmainConf lmtp_tls_session_cache_timeout +syntax keyword pfmainConf lmtp_tls_verify_cert_match syntax keyword pfmainConf lmtp_use_tls syntax keyword pfmainConf lmtp_xforward_timeout syntax keyword pfmainConf local_command_shell @@ -229,6 +287,7 @@ syntax keyword pfmainConf mailq_path syntax keyword pfmainConf manpage_directory syntax keyword pfmainConf maps_rbl_domains syntax keyword pfmainConf maps_rbl_reject_code +syntax keyword pfmainConf master_service_disable syntax keyword pfmainConf masquerade_classes syntax keyword pfmainConf masquerade_domains syntax keyword pfmainConf masquerade_exceptions @@ -239,10 +298,31 @@ syntax keyword pfmainConf maximal_queue_lifetime syntax keyword pfmainConf message_reject_characters syntax keyword pfmainConf message_size_limit syntax keyword pfmainConf message_strip_characters +syntax keyword pfmainConf milter_command_timeout +syntax keyword pfmainConf milter_connect_macros +syntax keyword pfmainConf milter_connect_timeout +syntax keyword pfmainConf milter_content_timeout +syntax keyword pfmainConf milter_data_macros +syntax keyword pfmainConf milter_default_action +syntax keyword pfmainConf milter_end_of_data_macros +syntax keyword pfmainConf milter_end_of_header_macros +syntax keyword pfmainConf milter_header_checks +syntax keyword pfmainConf milter_helo_macros +syntax keyword pfmainConf milter_macro_daemon_name +syntax keyword pfmainConf milter_macro_v +syntax keyword pfmainConf milter_mail_macros +syntax keyword pfmainConf milter_protocol +syntax keyword pfmainConf milter_rcpt_macros +syntax keyword pfmainConf milter_unknown_command_macros syntax keyword pfmainConf mime_boundary_length_limit syntax keyword pfmainConf mime_header_checks syntax keyword pfmainConf mime_nesting_limit syntax keyword pfmainConf minimal_backoff_time +syntax keyword pfmainConf multi_instance_directories +syntax keyword pfmainConf multi_instance_enable +syntax keyword pfmainConf multi_instance_group +syntax keyword pfmainConf multi_instance_name +syntax keyword pfmainConf multi_instance_wrapper syntax keyword pfmainConf multi_recipient_bounce_reject_code syntax keyword pfmainConf mydestination syntax keyword pfmainConf mydomain @@ -253,23 +333,74 @@ syntax keyword pfmainConf myorigin syntax keyword pfmainConf nested_header_checks syntax keyword pfmainConf newaliases_path syntax keyword pfmainConf non_fqdn_reject_code +syntax keyword pfmainConf non_smtpd_milters syntax keyword pfmainConf notify_classes syntax keyword pfmainConf owner_request_special syntax keyword pfmainConf parent_domain_matches_subdomains syntax keyword pfmainConf permit_mx_backup_networks syntax keyword pfmainConf pickup_service_name syntax keyword pfmainConf plaintext_reject_code +syntax keyword pfmainConf postmulti_control_commands +syntax keyword pfmainConf postmulti_start_commands +syntax keyword pfmainConf postmulti_stop_commands +syntax keyword pfmainConf postscreen_access_list +syntax keyword pfmainConf postscreen_bare_newline_action +syntax keyword pfmainConf postscreen_bare_newline_enable +syntax keyword pfmainConf postscreen_bare_newline_ttl +syntax keyword pfmainConf postscreen_blacklist_action +syntax keyword pfmainConf postscreen_cache_cleanup_interval +syntax keyword pfmainConf postscreen_cache_map +syntax keyword pfmainConf postscreen_cache_retention_time +syntax keyword pfmainConf postscreen_client_connection_count_limit +syntax keyword pfmainConf postscreen_command_count_limit +syntax keyword pfmainConf postscreen_command_filter +syntax keyword pfmainConf postscreen_command_time_limit +syntax keyword pfmainConf postscreen_disable_vrfy_command +syntax keyword pfmainConf postscreen_discard_ehlo_keyword_address_maps +syntax keyword pfmainConf postscreen_discard_ehlo_keywords +syntax keyword pfmainConf postscreen_dnsbl_action +syntax keyword pfmainConf postscreen_dnsbl_reply_map +syntax keyword pfmainConf postscreen_dnsbl_sites +syntax keyword pfmainConf postscreen_dnsbl_threshold +syntax keyword pfmainConf postscreen_dnsbl_ttl +syntax keyword pfmainConf postscreen_enforce_tls +syntax keyword pfmainConf postscreen_expansion_filter +syntax keyword pfmainConf postscreen_forbidden_commands +syntax keyword pfmainConf postscreen_greet_action +syntax keyword pfmainConf postscreen_greet_banner +syntax keyword pfmainConf postscreen_greet_ttl +syntax keyword pfmainConf postscreen_greet_wait +syntax keyword pfmainConf postscreen_helo_required +syntax keyword pfmainConf postscreen_non_smtp_command_action +syntax keyword pfmainConf postscreen_non_smtp_command_enable +syntax keyword pfmainConf postscreen_non_smtp_command_ttl +syntax keyword pfmainConf postscreen_pipelining_action +syntax keyword pfmainConf postscreen_pipelining_enable +syntax keyword pfmainConf postscreen_pipelining_ttl +syntax keyword pfmainConf postscreen_post_queue_limit +syntax keyword pfmainConf postscreen_pre_queue_limit +syntax keyword pfmainConf postscreen_reject_footer +syntax keyword pfmainConf postscreen_tls_security_level +syntax keyword pfmainConf postscreen_use_tls +syntax keyword pfmainConf postscreen_watchdog_timeout +syntax keyword pfmainConf postscreen_whitelist_interfaces syntax keyword pfmainConf prepend_delivered_header +syntax keyword pfmainConf process_id syntax keyword pfmainConf process_id_directory +syntax keyword pfmainConf process_name syntax keyword pfmainConf propagate_unmatched_extensions syntax keyword pfmainConf proxy_interfaces syntax keyword pfmainConf proxy_read_maps +syntax keyword pfmainConf proxy_write_maps +syntax keyword pfmainConf proxymap_service_name +syntax keyword pfmainConf proxywrite_service_name syntax keyword pfmainConf qmgr_clog_warn_time syntax keyword pfmainConf qmgr_fudge_factor syntax keyword pfmainConf qmgr_message_active_limit syntax keyword pfmainConf qmgr_message_recipient_limit syntax keyword pfmainConf qmgr_message_recipient_minimum syntax keyword pfmainConf qmqpd_authorized_clients +syntax keyword pfmainConf qmqpd_client_port_logging syntax keyword pfmainConf qmqpd_error_delay syntax keyword pfmainConf qmqpd_timeout syntax keyword pfmainConf queue_directory @@ -285,6 +416,7 @@ syntax keyword pfmainConf recipient_canonical_classes syntax keyword pfmainConf recipient_canonical_maps syntax keyword pfmainConf recipient_delimiter syntax keyword pfmainConf reject_code +syntax keyword pfmainConf reject_tempfail_action syntax keyword pfmainConf relay_clientcerts syntax keyword pfmainConf relay_destination_concurrency_limit syntax keyword pfmainConf relay_destination_recipient_limit @@ -296,23 +428,28 @@ syntax keyword pfmainConf relayhost syntax keyword pfmainConf relocated_maps syntax keyword pfmainConf remote_header_rewrite_domain syntax keyword pfmainConf require_home_directory +syntax keyword pfmainConf reset_owner_alias syntax keyword pfmainConf resolve_dequoted_address syntax keyword pfmainConf resolve_null_domain syntax keyword pfmainConf resolve_numeric_domain syntax keyword pfmainConf rewrite_service_name syntax keyword pfmainConf sample_directory +syntax keyword pfmainConf send_cyrus_sasl_authzid syntax keyword pfmainConf sender_bcc_maps syntax keyword pfmainConf sender_canonical_classes syntax keyword pfmainConf sender_canonical_maps +syntax keyword pfmainConf sender_dependent_default_transport_maps syntax keyword pfmainConf sender_dependent_relayhost_maps syntax keyword pfmainConf sendmail_path syntax keyword pfmainConf service_throttle_time syntax keyword pfmainConf setgid_group syntax keyword pfmainConf show_user_unknown_table_name syntax keyword pfmainConf showq_service_name +syntax keyword pfmainConf smtp_address_preference syntax keyword pfmainConf smtp_always_send_ehlo syntax keyword pfmainConf smtp_bind_address syntax keyword pfmainConf smtp_bind_address6 +syntax keyword pfmainConf smtp_body_checks syntax keyword pfmainConf smtp_cname_overrides_servername syntax keyword pfmainConf smtp_connect_timeout syntax keyword pfmainConf smtp_connection_cache_destinations @@ -327,25 +464,35 @@ syntax keyword pfmainConf smtp_destination_concurrency_limit syntax keyword pfmainConf smtp_destination_recipient_limit syntax keyword pfmainConf smtp_discard_ehlo_keyword_address_maps syntax keyword pfmainConf smtp_discard_ehlo_keywords +syntax keyword pfmainConf smtp_dns_resolver_options syntax keyword pfmainConf smtp_enforce_tls syntax keyword pfmainConf smtp_fallback_relay syntax keyword pfmainConf smtp_generic_maps +syntax keyword pfmainConf smtp_header_checks syntax keyword pfmainConf smtp_helo_name syntax keyword pfmainConf smtp_helo_timeout syntax keyword pfmainConf smtp_host_lookup syntax keyword pfmainConf smtp_line_length_limit syntax keyword pfmainConf smtp_mail_timeout +syntax keyword pfmainConf smtp_mime_header_checks syntax keyword pfmainConf smtp_mx_address_limit syntax keyword pfmainConf smtp_mx_session_limit +syntax keyword pfmainConf smtp_nested_header_checks syntax keyword pfmainConf smtp_never_send_ehlo syntax keyword pfmainConf smtp_pix_workaround_delay_time +syntax keyword pfmainConf smtp_pix_workaround_maps syntax keyword pfmainConf smtp_pix_workaround_threshold_time +syntax keyword pfmainConf smtp_pix_workarounds syntax keyword pfmainConf smtp_quit_timeout syntax keyword pfmainConf smtp_quote_rfc821_envelope syntax keyword pfmainConf smtp_randomize_addresses syntax keyword pfmainConf smtp_rcpt_timeout +syntax keyword pfmainConf smtp_reply_filter syntax keyword pfmainConf smtp_rset_timeout +syntax keyword pfmainConf smtp_sasl_auth_cache_name +syntax keyword pfmainConf smtp_sasl_auth_cache_time syntax keyword pfmainConf smtp_sasl_auth_enable +syntax keyword pfmainConf smtp_sasl_auth_soft_bounce syntax keyword pfmainConf smtp_sasl_mechanism_filter syntax keyword pfmainConf smtp_sasl_password_maps syntax keyword pfmainConf smtp_sasl_path @@ -360,18 +507,33 @@ syntax keyword pfmainConf smtp_skip_quit_response syntax keyword pfmainConf smtp_starttls_timeout syntax keyword pfmainConf smtp_tls_CAfile syntax keyword pfmainConf smtp_tls_CApath +syntax keyword pfmainConf smtp_tls_block_early_mail_reply syntax keyword pfmainConf smtp_tls_cert_file syntax keyword pfmainConf smtp_tls_cipherlist +syntax keyword pfmainConf smtp_tls_ciphers syntax keyword pfmainConf smtp_tls_dcert_file syntax keyword pfmainConf smtp_tls_dkey_file +syntax keyword pfmainConf smtp_tls_eccert_file +syntax keyword pfmainConf smtp_tls_eckey_file syntax keyword pfmainConf smtp_tls_enforce_peername +syntax keyword pfmainConf smtp_tls_exclude_ciphers +syntax keyword pfmainConf smtp_tls_fingerprint_cert_match +syntax keyword pfmainConf smtp_tls_fingerprint_digest syntax keyword pfmainConf smtp_tls_key_file syntax keyword pfmainConf smtp_tls_loglevel +syntax keyword pfmainConf smtp_tls_mandatory_ciphers +syntax keyword pfmainConf smtp_tls_mandatory_exclude_ciphers +syntax keyword pfmainConf smtp_tls_mandatory_protocols syntax keyword pfmainConf smtp_tls_note_starttls_offer syntax keyword pfmainConf smtp_tls_per_site +syntax keyword pfmainConf smtp_tls_policy_maps +syntax keyword pfmainConf smtp_tls_protocols syntax keyword pfmainConf smtp_tls_scert_verifydepth +syntax keyword pfmainConf smtp_tls_secure_cert_match +syntax keyword pfmainConf smtp_tls_security_level syntax keyword pfmainConf smtp_tls_session_cache_database syntax keyword pfmainConf smtp_tls_session_cache_timeout +syntax keyword pfmainConf smtp_tls_verify_cert_match syntax keyword pfmainConf smtp_use_tls syntax keyword pfmainConf smtp_xforward_timeout syntax keyword pfmainConf smtpd_authorized_verp_clients @@ -383,8 +545,10 @@ syntax keyword pfmainConf smtpd_client_connection_rate_limit syntax keyword pfmainConf smtpd_client_event_limit_exceptions syntax keyword pfmainConf smtpd_client_message_rate_limit syntax keyword pfmainConf smtpd_client_new_tls_session_rate_limit +syntax keyword pfmainConf smtpd_client_port_logging syntax keyword pfmainConf smtpd_client_recipient_rate_limit syntax keyword pfmainConf smtpd_client_restrictions +syntax keyword pfmainConf smtpd_command_filter syntax keyword pfmainConf smtpd_data_restrictions syntax keyword pfmainConf smtpd_delay_open_until_valid_rcpt syntax keyword pfmainConf smtpd_delay_reject @@ -401,18 +565,22 @@ syntax keyword pfmainConf smtpd_helo_required syntax keyword pfmainConf smtpd_helo_restrictions syntax keyword pfmainConf smtpd_history_flush_threshold syntax keyword pfmainConf smtpd_junk_command_limit +syntax keyword pfmainConf smtpd_milters syntax keyword pfmainConf smtpd_noop_commands syntax keyword pfmainConf smtpd_null_access_lookup_key syntax keyword pfmainConf smtpd_peername_lookup +syntax keyword pfmainConf smtpd_per_record_deadline syntax keyword pfmainConf smtpd_policy_service_max_idle syntax keyword pfmainConf smtpd_policy_service_max_ttl syntax keyword pfmainConf smtpd_policy_service_timeout syntax keyword pfmainConf smtpd_proxy_ehlo syntax keyword pfmainConf smtpd_proxy_filter +syntax keyword pfmainConf smtpd_proxy_options syntax keyword pfmainConf smtpd_proxy_timeout syntax keyword pfmainConf smtpd_recipient_limit syntax keyword pfmainConf smtpd_recipient_overshoot_limit syntax keyword pfmainConf smtpd_recipient_restrictions +syntax keyword pfmainConf smtpd_reject_footer syntax keyword pfmainConf smtpd_reject_unlisted_recipient syntax keyword pfmainConf smtpd_reject_unlisted_sender syntax keyword pfmainConf smtpd_restriction_classes @@ -426,59 +594,142 @@ syntax keyword pfmainConf smtpd_sasl_tls_security_options syntax keyword pfmainConf smtpd_sasl_type syntax keyword pfmainConf smtpd_sender_login_maps syntax keyword pfmainConf smtpd_sender_restrictions +syntax keyword pfmainConf smtpd_service_name syntax keyword pfmainConf smtpd_soft_error_limit syntax keyword pfmainConf smtpd_starttls_timeout syntax keyword pfmainConf smtpd_timeout syntax keyword pfmainConf smtpd_tls_CAfile syntax keyword pfmainConf smtpd_tls_CApath +syntax keyword pfmainConf smtpd_tls_always_issue_session_ids syntax keyword pfmainConf smtpd_tls_ask_ccert syntax keyword pfmainConf smtpd_tls_auth_only syntax keyword pfmainConf smtpd_tls_ccert_verifydepth syntax keyword pfmainConf smtpd_tls_cert_file syntax keyword pfmainConf smtpd_tls_cipherlist +syntax keyword pfmainConf smtpd_tls_ciphers syntax keyword pfmainConf smtpd_tls_dcert_file syntax keyword pfmainConf smtpd_tls_dh1024_param_file syntax keyword pfmainConf smtpd_tls_dh512_param_file syntax keyword pfmainConf smtpd_tls_dkey_file +syntax keyword pfmainConf smtpd_tls_eccert_file +syntax keyword pfmainConf smtpd_tls_eckey_file +syntax keyword pfmainConf smtpd_tls_eecdh_grade +syntax keyword pfmainConf smtpd_tls_exclude_ciphers +syntax keyword pfmainConf smtpd_tls_fingerprint_digest syntax keyword pfmainConf smtpd_tls_key_file syntax keyword pfmainConf smtpd_tls_loglevel +syntax keyword pfmainConf smtpd_tls_mandatory_ciphers +syntax keyword pfmainConf smtpd_tls_mandatory_exclude_ciphers +syntax keyword pfmainConf smtpd_tls_mandatory_protocols +syntax keyword pfmainConf smtpd_tls_protocols syntax keyword pfmainConf smtpd_tls_received_header syntax keyword pfmainConf smtpd_tls_req_ccert +syntax keyword pfmainConf smtpd_tls_security_level syntax keyword pfmainConf smtpd_tls_session_cache_database syntax keyword pfmainConf smtpd_tls_session_cache_timeout syntax keyword pfmainConf smtpd_tls_wrappermode syntax keyword pfmainConf smtpd_use_tls syntax keyword pfmainConf soft_bounce syntax keyword pfmainConf stale_lock_time +syntax keyword pfmainConf stress syntax keyword pfmainConf strict_7bit_headers syntax keyword pfmainConf strict_8bitmime syntax keyword pfmainConf strict_8bitmime_body syntax keyword pfmainConf strict_mime_encoding_domain syntax keyword pfmainConf strict_rfc821_envelopes +syntax keyword pfmainConf strict_7bit_headers +syntax keyword pfmainConf strict_8bitmime +syntax keyword pfmainConf strict_8bitmime_body +syntax keyword pfmainConf strict_mailbox_ownership +syntax keyword pfmainConf strict_mime_encoding_domain +syntax keyword pfmainConf strict_rfc821_envelopes syntax keyword pfmainConf sun_mailtool_compatibility syntax keyword pfmainConf swap_bangpath syntax keyword pfmainConf syslog_facility syntax keyword pfmainConf syslog_name +syntax keyword pfmainConf tcp_windowsize +syntax keyword pfmainConf tls_append_default_CA syntax keyword pfmainConf tls_daemon_random_bytes +syntax keyword pfmainConf tls_disable_workarounds +syntax keyword pfmainConf tls_eecdh_strong_curve +syntax keyword pfmainConf tls_eecdh_ultra_curve +syntax keyword pfmainConf tls_export_cipherlist +syntax keyword pfmainConf tls_high_cipherlist +syntax keyword pfmainConf tls_low_cipherlist +syntax keyword pfmainConf tls_medium_cipherlist +syntax keyword pfmainConf tls_null_cipherlist +syntax keyword pfmainConf tls_preempt_cipherlist syntax keyword pfmainConf tls_random_bytes syntax keyword pfmainConf tls_random_exchange_name syntax keyword pfmainConf tls_random_prng_update_period syntax keyword pfmainConf tls_random_reseed_period syntax keyword pfmainConf tls_random_source +syntax keyword pfmainConf tlsproxy_enforce_tls +syntax keyword pfmainConf tlsproxy_service_name +syntax keyword pfmainConf tlsproxy_tls_CAfile +syntax keyword pfmainConf tlsproxy_tls_CApath +syntax keyword pfmainConf tlsproxy_tls_always_issue_session_ids +syntax keyword pfmainConf tlsproxy_tls_ask_ccert +syntax keyword pfmainConf tlsproxy_tls_ccert_verifydepth +syntax keyword pfmainConf tlsproxy_tls_cert_file +syntax keyword pfmainConf tlsproxy_tls_ciphers +syntax keyword pfmainConf tlsproxy_tls_dcert_file +syntax keyword pfmainConf tlsproxy_tls_dh1024_param_file +syntax keyword pfmainConf tlsproxy_tls_dh512_param_file +syntax keyword pfmainConf tlsproxy_tls_dkey_file +syntax keyword pfmainConf tlsproxy_tls_eccert_file +syntax keyword pfmainConf tlsproxy_tls_eckey_file +syntax keyword pfmainConf tlsproxy_tls_eecdh_grade +syntax keyword pfmainConf tlsproxy_tls_exclude_ciphers +syntax keyword pfmainConf tlsproxy_tls_fingerprint_digest +syntax keyword pfmainConf tlsproxy_tls_key_file +syntax keyword pfmainConf tlsproxy_tls_loglevel +syntax keyword pfmainConf tlsproxy_tls_mandatory_ciphers +syntax keyword pfmainConf tlsproxy_tls_mandatory_exclude_ciphers +syntax keyword pfmainConf tlsproxy_tls_mandatory_protocols +syntax keyword pfmainConf tlsproxy_tls_protocols +syntax keyword pfmainConf tlsproxy_tls_req_ccert +syntax keyword pfmainConf tlsproxy_tls_security_level +syntax keyword pfmainConf tlsproxy_tls_session_cache_timeout +syntax keyword pfmainConf tlsproxy_use_tls +syntax keyword pfmainConf tlsproxy_watchdog_timeout syntax keyword pfmainConf trace_service_name +syntax keyword pfmainConf transport_delivery_slot_cost +syntax keyword pfmainConf transport_delivery_slot_discount +syntax keyword pfmainConf transport_delivery_slot_loan +syntax keyword pfmainConf transport_destination_concurrency_failed_cohort_limit +syntax keyword pfmainConf transport_destination_concurrency_limit +syntax keyword pfmainConf transport_destination_concurrency_negative_feedback +syntax keyword pfmainConf transport_destination_concurrency_positive_feedback +syntax keyword pfmainConf transport_destination_rate_delay +syntax keyword pfmainConf transport_destination_recipient_limit +syntax keyword pfmainConf transport_extra_recipient_limit +syntax keyword pfmainConf transport_initial_destination_concurrency syntax keyword pfmainConf transport_maps +syntax keyword pfmainConf transport_minimum_delivery_slots +syntax keyword pfmainConf transport_recipient_limit +syntax keyword pfmainConf transport_recipient_refill_delay +syntax keyword pfmainConf transport_recipient_refill_limit syntax keyword pfmainConf transport_retry_time syntax keyword pfmainConf trigger_timeout syntax keyword pfmainConf undisclosed_recipients_header syntax keyword pfmainConf unknown_address_reject_code +syntax keyword pfmainConf unknown_address_tempfail_action syntax keyword pfmainConf unknown_client_reject_code +syntax keyword pfmainConf unknown_helo_hostname_tempfail_action syntax keyword pfmainConf unknown_hostname_reject_code syntax keyword pfmainConf unknown_local_recipient_reject_code syntax keyword pfmainConf unknown_relay_recipient_reject_code syntax keyword pfmainConf unknown_virtual_alias_reject_code syntax keyword pfmainConf unknown_virtual_mailbox_reject_code +syntax keyword pfmainConf unverified_recipient_defer_code syntax keyword pfmainConf unverified_recipient_reject_code +syntax keyword pfmainConf unverified_recipient_reject_reason +syntax keyword pfmainConf unverified_recipient_tempfail_action +syntax keyword pfmainConf unverified_sender_defer_code syntax keyword pfmainConf unverified_sender_reject_code +syntax keyword pfmainConf unverified_sender_reject_reason +syntax keyword pfmainConf unverified_sender_tempfail_action syntax keyword pfmainConf verp_delimiter_filter syntax keyword pfmainConf virtual_alias_domains syntax keyword pfmainConf virtual_alias_expansion_limit @@ -496,7 +747,9 @@ syntax keyword pfmainConf virtual_minimum_uid syntax keyword pfmainConf virtual_transport syntax keyword pfmainConf virtual_uid_maps syntax match pfmainRef "$\<2bounce_notice_recipient\>" +syntax match pfmainRef "$\" syntax match pfmainRef "$\" +syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" @@ -510,6 +763,7 @@ syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" +syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" @@ -557,22 +811,31 @@ syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" +syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" +syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" +syntax match pfmainRef "$\" syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" +syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" @@ -583,15 +846,22 @@ syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" +syntax match pfmainRef "$\" syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" @@ -625,13 +895,16 @@ syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" +syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" +syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" +syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" @@ -646,23 +919,34 @@ syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" +syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" +syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" +syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" syntax match pfmainRef "$\" +syntax match pfmainRef "$\" syntax match pfmainRef "$\" +syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" +syntax match pfmainRef "$\" syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" syntax match pfmainRef "$\" +syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" @@ -675,10 +959,31 @@ syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" @@ -703,6 +1008,7 @@ syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" +syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" @@ -713,10 +1019,31 @@ syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" @@ -727,23 +1054,77 @@ syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" +syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" syntax match pfmainRef "$\" +syntax match pfmainRef "$\" syntax match pfmainRef "$\" +syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" +syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" @@ -759,6 +1140,7 @@ syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" +syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" @@ -770,23 +1152,28 @@ syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" +syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" +syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" +syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" +syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" +syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" @@ -801,25 +1188,35 @@ syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" +syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" +syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" +syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" +syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" +syntax match pfmainRef "$\" syntax match pfmainRef "$\" +syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" +syntax match pfmainRef "$\" syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" syntax match pfmainRef "$\" +syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" @@ -834,18 +1231,33 @@ syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" +syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" +syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" +syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" @@ -857,8 +1269,10 @@ syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" +syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" +syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" @@ -875,18 +1289,22 @@ syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" +syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" +syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" +syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" +syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" @@ -900,59 +1318,142 @@ syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" +syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" +syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" +syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" +syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" +syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" +syntax match pfmainRef "$\" syntax match pfmainRef "$\" +syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" +syntax match pfmainRef "$\" syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" @@ -969,6 +1470,7 @@ syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" + syntax keyword pfmainWord all syntax keyword pfmainWord check_address_map syntax keyword pfmainWord check_ccert_access @@ -987,17 +1489,29 @@ syntax keyword pfmainWord check_sender_access syntax keyword pfmainWord check_sender_mx_access syntax keyword pfmainWord check_sender_ns_access syntax keyword pfmainWord class +syntax keyword pfmainWord client_address +syntax keyword pfmainWord client_port syntax keyword pfmainWord defer_if_permit syntax keyword pfmainWord defer_if_reject syntax keyword pfmainWord dns +syntax keyword pfmainWord drop +syntax keyword pfmainWord dunno +syntax keyword pfmainWord enforce syntax keyword pfmainWord envelope_recipient syntax keyword pfmainWord envelope_sender +syntax keyword pfmainWord export syntax keyword pfmainWord header_recipient syntax keyword pfmainWord header_sender +syntax keyword pfmainWord high syntax keyword pfmainWord host +syntax keyword pfmainWord ignore syntax keyword pfmainWord ipv4 syntax keyword pfmainWord ipv6 +syntax keyword pfmainWord localtime +syntax keyword pfmainWord low +syntax keyword pfmainWord medium syntax keyword pfmainWord native +syntax keyword pfmainWord null syntax keyword pfmainWord permit syntax keyword pfmainWord permit_auth_destination syntax keyword pfmainWord permit_inet_interfaces @@ -1008,6 +1522,7 @@ syntax keyword pfmainWord permit_sasl_authenticated syntax keyword pfmainWord permit_tls_all_clientcerts syntax keyword pfmainWord permit_tls_clientcerts syntax keyword pfmainWord reject +syntax keyword pfmainWord reject_authenticated_sender_login_mismatch syntax keyword pfmainWord reject_invalid_helo_hostname syntax keyword pfmainWord reject_invalid_hostname syntax keyword pfmainWord reject_maps_rbl @@ -1041,8 +1556,23 @@ syntax keyword pfmainWord reject_unverified_recipient syntax keyword pfmainWord reject_unverified_sender syntax keyword pfmainWord sleep syntax keyword pfmainWord smtpd_access_maps +syntax keyword pfmainWord server_name +syntax keyword pfmainWord speed_adjust syntax keyword pfmainWord subnet syntax keyword pfmainWord warn_if_reject +syntax keyword pfmainWord CRYPTOPRO_TLSEXT_BUG +syntax keyword pfmainWord DONT_INSERT_EMPTY_FRAGMENTS +syntax keyword pfmainWord LEGACY_SERVER_CONNECT +syntax keyword pfmainWord MICROSOFT_BIG_SSLV3_BUFFER +syntax keyword pfmainWord MICROSOFT_SESS_ID_BUG +syntax keyword pfmainWord MSIE_SSLV2_RSA_PADDING +syntax keyword pfmainWord NETSCAPE_CHALLENGE_BUG +syntax keyword pfmainWord NETSCAPE_REUSE_CIPHER_CHANGE_BUG +syntax keyword pfmainWord SSLEAY_080_CLIENT_DH_BUG +syntax keyword pfmainWord SSLREF2_REUSE_CERT_TYPE_BUG +syntax keyword pfmainWord TLS_BLOCK_PADDING_BUG +syntax keyword pfmainWord TLS_D5_BUG +syntax keyword pfmainWord TLS_ROLLBACK_BUG syntax keyword pfmainDict btree cidr environ hash nis pcre proxy regexp sdbm sdbm static tcp unix syntax keyword pfmainQueueDir incoming active deferred corrupt hold diff --git a/runtime/syntax/php.vim b/runtime/syntax/php.vim index 4e6b95ca9f..f9104ad7bc 100644 --- a/runtime/syntax/php.vim +++ b/runtime/syntax/php.vim @@ -1,11 +1,10 @@ " Vim syntax file " Language: php PHP 3/4/5 -" Maintainer: Peter Hodge -" Last Change: June 9, 2006 -" URL: http://www.vim.org/scripts/script.php?script_id=1571 -" -" Former Maintainer: Debian VIM Maintainers -" Former URL: http://svn.debian.org/wsvn/pkg-vim/trunk/runtime/syntax/php.vim?op=file&rev=0&sc=0 +" Maintainer: Jason Woofenden +" Last Change: April 28, 2011 +" URL: https://gitorious.org/jasonwoof/vim-syntax/blobs/master/php.vim +" Former Maintainers: Peter Hodge +" Debian VIM Maintainers " " Note: If you are using a colour terminal with dark background, you will probably find " the 'elflord' colorscheme is much better for PHP's syntax than the default @@ -327,6 +326,8 @@ syn match phpFloat "\(-\=\<\d+\|-\=\)\.\d\+\>" contained display syn match phpSpecialChar "\\[abcfnrtyv\\]" contained display syn match phpSpecialChar "\\\d\{3}" contained contains=phpOctalError display syn match phpSpecialChar "\\x\x\{2}" contained display +syn match phpDoubleSpecialChar "\\\"" contained display +syn match phpSingleSpecialChar "\\[\\']" contained display " Error syn match phpOctalError "[89]" contained display @@ -355,13 +356,13 @@ endif " String if exists("php_parent_error_open") - syn region phpStringDouble matchgroup=None start=+"+ skip=+\\\\\|\\"+ end=+"+ contains=@phpAddStrings,phpIdentifier,phpSpecialChar,phpIdentifierSimply,phpIdentifierComplex contained keepend + syn region phpStringDouble matchgroup=None start=+"+ skip=+\\\\\|\\"+ end=+"+ contains=@phpAddStrings,phpIdentifier,phpSpecialChar,phpIdentifierSimply,phpIdentifierComplex,phpDoubleSpecialChar contained keepend syn region phpBacktick matchgroup=None start=+`+ skip=+\\\\\|\\"+ end=+`+ contains=@phpAddStrings,phpIdentifier,phpSpecialChar,phpIdentifierSimply,phpIdentifierComplex contained keepend - syn region phpStringSingle matchgroup=None start=+'+ skip=+\\\\\|\\'+ end=+'+ contains=@phpAddStrings contained keepend + syn region phpStringSingle matchgroup=None start=+'+ skip=+\\\\\|\\'+ end=+'+ contains=@phpAddStrings,phpSingleSpecialChar contained keepend else - syn region phpStringDouble matchgroup=None start=+"+ skip=+\\\\\|\\"+ end=+"+ contains=@phpAddStrings,phpIdentifier,phpSpecialChar,phpIdentifierSimply,phpIdentifierComplex contained extend keepend + syn region phpStringDouble matchgroup=None start=+"+ skip=+\\\\\|\\"+ end=+"+ contains=@phpAddStrings,phpIdentifier,phpSpecialChar,phpIdentifierSimply,phpIdentifierComplex,phpDoubleSpecialChar contained extend keepend syn region phpBacktick matchgroup=None start=+`+ skip=+\\\\\|\\"+ end=+`+ contains=@phpAddStrings,phpIdentifier,phpSpecialChar,phpIdentifierSimply,phpIdentifierComplex contained extend keepend - syn region phpStringSingle matchgroup=None start=+'+ skip=+\\\\\|\\'+ end=+'+ contains=@phpAddStrings contained keepend extend + syn region phpStringSingle matchgroup=None start=+'+ skip=+\\\\\|\\'+ end=+'+ contains=@phpAddStrings,phpSingleSpecialChar contained keepend extend endif " HereDoc @@ -613,6 +614,8 @@ if version >= 508 || !exists("did_php_syn_inits") HiLink phpInclude Include HiLink phpDefine Define HiLink phpSpecialChar SpecialChar + HiLink phpDoubleSpecialChar SpecialChar + HiLink phpSingleSpecialChar SpecialChar HiLink phpParent Delimiter HiLink phpIdentifierConst Delimiter HiLink phpParentError Error diff --git a/runtime/syntax/readline.vim b/runtime/syntax/readline.vim index 91094c7978..06306d513e 100644 --- a/runtime/syntax/readline.vim +++ b/runtime/syntax/readline.vim @@ -1,11 +1,11 @@ " Vim syntax file " Language: readline(3) configuration file " Maintainer: Nikolai Weibull -" Latest Revision: 2009-05-25 +" Latest Revision: 2011-05-02 " readline_has_bash - if defined add support for bash specific " settings/functions -if exists("b:current_syntax") +if exists('b:current_syntax') finish endif @@ -14,163 +14,382 @@ set cpo&vim setlocal iskeyword+=- -syn keyword readlineTodo contained TODO FIXME XXX NOTE +syn match readlineKey contained + \ '\S' + \ nextgroup=readlineKeyTerminator -syn region readlineComment display oneline start='^\s*#' end='$' - \ contains=readlineTodo,@Spell +syn match readlineBegin display '^' + \ nextgroup=readlineComment, + \ readlineConditional, + \ readlineInclude, + \ readlineKeyName, + \ readlineKey, + \ readlineKeySeq, + \ readlineKeyword + \ skipwhite -syn match readlineString '^\s*[A-Za-z-]\+:'me=e-1 contains=readlineKeys -syn region readlineString display oneline start=+"+ skip=+\\\\\|\\"+ - \ end=+"+ contains=readlineKeysTwo +syn region readlineComment contained display oneline + \ start='#' + \ end='$' + \ contains=readlineTodo, + \ @Spell + +syn keyword readlineTodo contained + \ TODO + \ FIXME + \ XXX + \ NOTE + +syn match readlineConditional contained + \ '$if\>' + \ nextgroup=readlineTest, + \ readlineTestApp + \ skipwhite + +syn keyword readlineTest contained + \ mode + \ nextgroup=readlineTestModeEq + +syn match readlineTestModeEq contained + \ '=' + \ nextgroup=readlineEditingMode + +syn keyword readlineTest contained + \ term + \ nextgroup=readlineTestTermEq + +syn match readlineTestTermEq contained + \ '=' + \ nextgroup=readlineTestTerm + +syn match readlineTestTerm contained + \ '\S\+' + +syn match readlineTestApp contained + \ '\S\+' + +syn match readlineConditional contained display + \ '$\%(else\|endif\)\>' + +syn match readlineInclude contained display + \ '$include\>' + \ nextgroup=readlinePath + +syn match readlinePath contained display + \ '.\+' syn case ignore -syn keyword readlineKeys contained Control Meta Del Esc Escape LFD - \ Newline Ret Return Rubout Space Spc Tab +syn match readlineKeyName contained display + \ nextgroup=readlineKeySeparator, + \ readlineKeyTerminator + \ '\%(Control\|Del\|Esc\|Escape\|LFD\|Meta\|Newline\|Ret\|Return\|Rubout\|Space\|Spc\|Tab\)' syn case match -syn match readlineKeysTwo contained display - \ +\\\([CM]-\|[e\\"'abdfnrtv]\|\o\{3}\|x\x\{3}\)+ +syn match readlineKeySeparator contained + \ '-' + \ nextgroup=readlineKeyName, + \ readlineKey -syn match readlineKeymaps contained display - \ 'emacs\(-standard\|-meta\|-ctlx\)\=' -syn match readlineKeymaps contained display - \ 'vi\(-move\|-command\|-insert\)\=' +syn match readlineKeyTerminator contained + \ ':' + \ nextgroup=readlineFunction + \ skipwhite -syn keyword readlineBellStyles contained audible visible none +syn region readlineKeySeq contained display oneline + \ start=+"+ + \ skip=+\\\\\|\\"+ + \ end=+"+ + \ contains=readlineKeyEscape + \ nextgroup=readlineKeyTerminator -syn match readlineNumber contained display '\<\d\+\>' +syn match readlineKeyEscape contained display + \ +\\\([CM]-\|[e\\"'abdfnrtv]\|\o\{3}\|x\x\{2}\)+ + +syn keyword readlineKeyword contained + \ set + \ nextgroup=readlineVariable + \ skipwhite + +syn keyword readlineVariable contained + \ nextgroup=readlineBellStyle + \ skipwhite + \ bell-style + +syn keyword readlineVariable contained + \ nextgroup=readlineBoolean + \ skipwhite + \ bind-tty-special-chars + \ completion-ignore-case + \ completion-map-case + \ convert-meta + \ disable-completion + \ echo-control-characters + \ enable-keypad + \ enable-meta-key + \ expand-tilde + \ history-preserve-point + \ horizontal-scroll-mode + \ input-meta + \ meta-flag + \ mark-directories + \ mark-modified-lines + \ mark-symlinked-directories + \ match-hidden-files + \ menu-complete-display-prefix + \ output-meta + \ page-completions + \ print-completions-horizontally + \ revert-all-at-newline + \ show-all-if-ambiguous + \ show-all-if-unmodified + \ skip-completed-text + \ visible-stats + +syn keyword readlineVariable contained + \ nextgroup=readlineString + \ skipwhite + \ comment-begin + \ isearch-terminators + +syn keyword readlineVariable contained + \ nextgroup=readlineNumber + \ skipwhite + \ completion-display-width + \ completion-prefix-display-length + \ completion-query-items + \ history-size + +syn keyword readlineVariable contained + \ nextgroup=readlineEditingMode + \ skipwhite + \ editing-mode + +syn keyword readlineVariable contained + \ nextgroup=readlineKeymap + \ skipwhite + \ keymap + +syn keyword readlineBellStyle contained + \ audible + \ visible + \ none syn case ignore -syn keyword readlineBoolean contained on off +syn keyword readlineBoolean contained + \ on + \ off syn case match -syn keyword readlineIfOps contained mode term +syn region readlineString contained display oneline + \ matchgroup=readlineStringDelimiter + \ start=+"+ + \ skip=+\\\\\|\\"+ + \ end=+"+ -syn region readlineConditional display oneline transparent - \ matchgroup=readlineConditional - \ start='^\s*$if' end="$" - \ contains=readlineIfOps,readlineKeymaps -syn match readlineConditional display '^\s*$\(else\|endif\)\>' +syn match readlineNumber contained display + \ '[+-]\d\+\>' -syn match readlineInclude display '^\s*$include\>' +syn keyword readlineEditingMode contained + \ emacs + \ vi -syn region readlineSet display oneline transparent - \ matchgroup=readlineKeyword start='^\s*set\>' - \ end="$"me=e-1 contains=readlineNumber, - \ readlineBoolean,readlineKeymaps, - \ readlineBellStyles,readlineSettings +syn match readlineKeymap contained display + \ 'emacs\%(-\%(standard\|meta\|ctlx\)\)\=\|vi\%(-\%(move\|command\|insert\)\)\=' -syn keyword readlineSettings contained bell-style comment-begin - \ completion-ignore-case completion-query-items - \ convert-meta disable-completion editing-mode - \ enable-keypad expand-tilde - \ horizontal-scroll-mode mark-directories - \ keymap mark-modified-lines meta-flag - \ input-meta output-meta - \ print-completions-horizontally - \ show-all-if-ambiguous visible-stats - \ prefer-visible-bell blink-matching-paren - \ match-hidden-files history-preserve-point - \ isearch-terminators - -syn region readlineBinding display oneline transparent - \ matchgroup=readlineKeyword start=':' end='$' - \ contains=readlineKeys,readlineFunctions - -syn keyword readlineFunctions contained display - \ beginning-of-line end-of-line forward-char - \ backward-char forward-word backward-word - \ clear-screen redraw-current-line - \ accept-line previous-history - \ next-history beginning-of-history - \ end-of-history reverse-search-history - \ forward-search-history - \ non-incremental-reverse-search-history - \ non-incremental-forward-search-history - \ history-search-forward - \ history-search-backward - \ yank-nth-arg yank-last-arg - \ delete-char backward-delete-char - \ forward-backward-delete-char quoted-insert - \ tab-insert self-insert transpose-chars - \ transpose-words upcase-word downcase-word - \ capitalize-word overwrite-mode kill-line - \ backward-kill-line unix-line-discard - \ kill-whole-line kill-word backward-kill-word - \ unix-word-rubout unix-filename-rubout - \ delete-horizontal-space kill-region - \ copy-region-as-kill copy-backward-word - \ copy-forward-word yank yank-pop - \ digit-argument universal-argument complete - \ possible-completions insert-completions - \ menu-complete delete-char-or-list - \ start-kbd-macro end-kbd-macro - \ call-last-kbd-macro re-read-init-file - \ abort do-uppercase-version prefix-meta - \ undo revert-line tilde-expand set-mark - \ exchange-point-and-mark character-search - \ character-search-backward insert-comment - \ dump-functions dump-variables dump-macros - \ emacs-editing-mode vi-editing-mode - \ vi-complete vi-char-search vi-redo - \ vi-search vi-arg-digit vi-append-eol - \ vi-prev-word vi-change-to vi-delete-to - \ vi-end-word vi-fetch-history vi-insert-beg - \ vi-search-again vi-put vi-replace - \ vi-subst vi-yank-to vi-first-print - \ vi-yank-arg vi-goto-mark vi-append-mode - \ vi-insertion-mode prev-history vi-set-mark - \ vi-search-again vi-put vi-change-char - \ vi-subst vi-delete vi-yank-to - \ vi-column vi-change-case vi-overstrike - \ vi-overstrike-delete do-lowercase-version - \ delete-char-or-list tty-status - \ arrow-key-prefix vi-back-to-indent vi-bword - \ vi-bWord vi-eword vi-eWord vi-fword vi-fWord - \ vi-next-word - \ vi-movement-mode +syn keyword readlineFunction contained + \ beginning-of-line + \ end-of-line + \ forward-char + \ backward-char + \ forward-word + \ backward-word + \ clear-screen + \ redraw-current-line + \ + \ accept-line + \ previous-history + \ next-history + \ beginning-of-history + \ end-of-history + \ reverse-search-history + \ forward-search-history + \ non-incremental-reverse-search-history + \ non-incremental-forward-search-history + \ history-search-forward + \ history-search-backward + \ yank-nth-arg + \ yank-last-arg + \ + \ delete-char + \ backward-delete-char + \ forward-backward-delete-char + \ quoted-insert + \ tab-insert + \ self-insert + \ transpose-chars + \ transpose-words + \ upcase-word + \ downcase-word + \ capitalize-word + \ overwrite-mode + \ + \ kill-line + \ backward-kill-line + \ unix-line-discard + \ kill-whole-line + \ kill-word + \ backward-kill-word + \ unix-word-rubout + \ unix-filename-rubout + \ delete-horizontal-space + \ kill-region + \ copy-region-as-kill + \ copy-backward-word + \ copy-forward-word + \ yank + \ yank-pop + \ + \ digit-argument + \ universal-argument + \ + \ complete + \ possible-completions + \ insert-completions + \ menu-complete + \ menu-complete-or-backward + \ delete-char-or-list + \ + \ start-kbd-macro + \ end-kbd-macro + \ call-last-kbd-macro + \ + \ re-read-init-file + \ abort + \ do-uppercase-version + \ prefix-meta + \ undo + \ revert-line + \ tilde-expand + \ set-mark + \ exchange-point-and-mark + \ character-search + \ character-search-backward + \ skip-csi-sequence + \ insert-comment + \ dump-functions + \ dump-variables + \ dump-macros + \ emacs-editing-mode + \ vi-editing-mode + \ + \ vi-eof-maybe + \ vi-movement-mode + \ vi-undo + \ vi-match + \ vi-tilde-expand + \ vi-complete + \ vi-char-search + \ vi-redo + \ vi-search + \ vi-arg-digit + \ vi-append-eol + \ vi-prev-word + \ vi-change-to + \ vi-delete-to + \ vi-end-word + \ vi-char-search + \ vi-fetch-history + \ vi-insert-beg + \ vi-search-again + \ vi-put + \ vi-replace + \ vi-subst + \ vi-char-search + \ vi-next-word + \ vi-yank-to + \ vi-first-print + \ vi-yank-arg + \ vi-goto-mark + \ vi-append-mode + \ vi-prev-word + \ vi-change-to + \ vi-delete-to + \ vi-end-word + \ vi-char-search + \ vi-insert-mode + \ vi-set-mark + \ vi-search-again + \ vi-put + \ vi-change-char + \ vi-subst + \ vi-char-search + \ vi-undo + \ vi-next-word + \ vi-delete + \ vi-yank-to + \ vi-column + \ vi-change-case if exists("readline_has_bash") - syn keyword readlineFunctions contained - \ shell-expand-line history-expand-line - \ magic-space alias-expand-line - \ history-and-alias-expand-line - \ insert-last-argument operate-and-get-next - \ forward-backward-delete-char - \ delete-char-or-list complete-filename - \ possible-filename-completions - \ complete-username - \ possible-username-completions - \ complete-variable - \ possible-variable-completions - \ complete-hostname - \ possible-hostname-completions - \ complete-command - \ possible-command-completions - \ dynamic-complete-history - \ complete-into-braces - \ glob-expand-word glob-list-expansions - \ display-shell-version glob-complete-word - \ edit-and-execute-command + syn keyword readlineFunction contained + \ shell-expand-line + \ history-expand-line + \ magic-space + \ alias-expand-line + \ history-and-alias-expand-line + \ insert-last-argument + \ operate-and-get-next + \ forward-backward-delete-char + \ delete-char-or-list + \ complete-filename + \ possible-filename-completions + \ complete-username + \ possible-username-completions + \ complete-variable + \ possible-variable-completions + \ complete-hostname + \ possible-hostname-completions + \ complete-command + \ possible-command-completions + \ dynamic-complete-history + \ complete-into-braces + \ glob-expand-word + \ glob-list-expansions + \ display-shell-version + \ glob-complete-word + \ edit-and-execute-command endif -hi def link readlineComment Comment -hi def link readlineTodo Todo -hi def link readlineString String -hi def link readlineKeys SpecialChar -hi def link readlineKeysTwo SpecialChar -hi def link readlineKeymaps Constant -hi def link readlineBellStyles Constant -hi def link readlineNumber Number -hi def link readlineBoolean Boolean -hi def link readlineIfOps Type -hi def link readlineConditional Conditional -hi def link readlineInclude Include -hi def link readlineKeyword Keyword -hi def link readlineSettings Type -hi def link readlineFunctions Type +hi def link readlineKey readlineKeySeq +hi def link readlineComment Comment +hi def link readlineTodo Todo +hi def link readlineConditional Conditional +hi def link readlineTest Type +hi def link readlineDelimiter Delimiter +hi def link readlineTestModeEq readlineEq +hi def link readlineTestTermEq readlineEq +hi def link readlineTestTerm readlineString +hi def link readlineTestAppEq readlineEq +hi def link readlineTestApp readlineString +hi def link readlineInclude Include +hi def link readlinePath String +hi def link readlineKeyName SpecialChar +hi def link readlineKeySeparator readlineKeySeq +hi def link readlineKeyTerminator readlineDelimiter +hi def link readlineKeySeq String +hi def link readlineKeyEscape SpecialChar +hi def link readlineKeyword Keyword +hi def link readlineVariable Identifier +hi def link readlineBellStyle Constant +hi def link readlineBoolean Boolean +hi def link readlineString String +hi def link readlineStringDelimiter readlineString +hi def link readlineNumber Number +hi def link readlineEditingMode Constant +hi def link readlineKeymap Constant +hi def link readlineFunction Function -let b:current_syntax = "readline" +let b:current_syntax = 'readline' let &cpo = s:cpo_save unlet s:cpo_save diff --git a/runtime/syntax/sysctl.vim b/runtime/syntax/sysctl.vim index d16d458a99..748054fd73 100644 --- a/runtime/syntax/sysctl.vim +++ b/runtime/syntax/sysctl.vim @@ -1,7 +1,7 @@ " Vim syntax file " Language: sysctl.conf(5) configuration file " Maintainer: Nikolai Weibull -" Latest Revision: 2006-04-19 +" Latest Revision: 2011-05-02 if exists("b:current_syntax") finish @@ -13,7 +13,7 @@ set cpo&vim syn match sysctlBegin display '^' \ nextgroup=sysctlToken,sysctlComment skipwhite -syn match sysctlToken contained display '\S\+' +syn match sysctlToken contained display '[^=]\+' \ nextgroup=sysctlTokenEq skipwhite syn match sysctlTokenEq contained display '=' nextgroup=sysctlValue skipwhite diff --git a/src/INSTALL b/src/INSTALL index dd50e0dc26..aa4b6e341c 100644 --- a/src/INSTALL +++ b/src/INSTALL @@ -6,9 +6,8 @@ executable version of Vim, you don't need this. Contents: 1. Generic 2. Unix -3. RISC OS -4. OS/2 (with EMX 0.9b) -5. Atari MiNT +3. OS/2 (with EMX 0.9b) +4. Atari MiNT See INSTALLami.txt for Amiga See INSTALLmac.txt for Macintosh @@ -174,25 +173,7 @@ And to not search for locally installed headers and libraries at all, use: ./configure --without-local-dir -3. RISC OS -============= - -Much file renaming is needed before you can compile anything. -You'll need UnixLib to link against, GCC and GNU make. - -I suggest you get the RISC OS binary distribution, which includes the -Templates file and the loader. - -Try here: http://www.ecs.soton.ac.uk/~tal197 - -Do - :help riscos - -within the editor for more information, or read the -../runtime/doc/os_risc.txt help file. - - -4. OS/2 +3. OS/2 ======= Summary: @@ -237,7 +218,7 @@ Prerequisites: Check ../runtime/doc/os_os2.txt for additional info on running Vim. -5. Atari MiNT +4. Atari MiNT ============= [NOTE: this is quite old, it might not work anymore] diff --git a/src/Make_ro.mak b/src/Make_ro.mak deleted file mode 100644 index 203a18ac4d..0000000000 --- a/src/Make_ro.mak +++ /dev/null @@ -1,135 +0,0 @@ -# -# Makefile for Vim on RISC OS - Andy Wingate -# - -GCC = gcc -mthrowback -CFLAGS = -DRISCOS -DFEAT_GUI -CC = $(GCC) $(CFLAGS) -O2 -# -DUP_BC_PC_EXTERN for term.c needed as BC defined in termlib.c and term.c - -TERMFLAG = -DUP_BC_PC_EXTERN - -ASMFLAGS = -throwback -objasm -gcc - -OBJS = o.buffer o.charset o.diff o.digraph o.edit o.eval o.ex_cmds o.ex_cmds2 \ - o.ex_docmd o.ex_eval o.ex_getln o.fileio o.fold o.getchar \ - o.hardcopy o.hashtab o.main o.mark o.mbyte \ - o.memfile o.memline o.menu o.message o.misc1 o.misc2 o.move \ - o.normal o.ops o.option o.popupmnu o.quickfix o.regexp o.screen \ - o.search \ - o.spell o.syntax o.tag o.term o.termlib o.ui o.undo o.version \ - o.window o.os_riscos o.swis o.gui o.gui_riscos - -Vim: $(OBJS) - $(GCC) -o Vim $(OBJS) - -install: Vim - squeeze -v Vim @.!Vim.Vim - -clean: - create o.!fake! 0 - wipe o.* ~cf - remove Vim - -o.swis: s.swis - as $(ASMFLAGS) -o o.swis s.swis - -# Rules for object files - -o.%: c.% - $(CC) -c $< -o $@ - -o.buffer: c.buffer - -o.charset: c.charset - -o.digraph: c.digraph - -o.diff: c.diff - -o.edit: c.edit - -o.eval: c.eval - -o.ex_cmds: c.ex_cmds - -o.ex_cmds2: c.ex_cmds2 - -o.ex_docmd: c.ex_docmd - -o.ex_eval: c.ex_eval - -o.ex_getln: c.ex_getln - -o.fileio: c.fileio - -o.fold: c.fold - -o.getchar: c.getchar - -o.hardcopy: c.hardcopy - -o.hashtab: c.hashtab - -o.gui: c.gui - -o.gui_riscos: c.gui_riscos - -o.main: c.main - -o.mark: c.mark - -o.mbyte: c.mbyte - -o.memfile: c.memfile - -o.memline: c.memline - -o.menu: c.menu - -o.message: c.message - -o.misc1: c.misc1 - -o.misc2: c.misc2 - -o.move: c.move - -o.normal: c.normal - -o.ops: c.ops - -o.option: c.option - -o.os_riscos: c.os_riscos - -o.pty: c.pty - -o.popupmnu: c.popupmnu - -o.quickfix: c.quickfix - -o.regexp: c.regexp - -o.screen: c.screen - -o.search: c.search - -o.spell: c.spell - -o.syntax: c.syntax - -o.tag: c.tag - -o.term: c.term - $(CC) $(TERMFLAG) -c c.term -o o.term - -o.termlib: c.termlib - -o.ui: c.ui - -o.undo: c.undo - -o.version: c.version - -o.window: c.window diff --git a/src/Makefile b/src/Makefile index 74168ea933..ae86f69e40 100644 --- a/src/Makefile +++ b/src/Makefile @@ -29,7 +29,7 @@ # - Uncomment the line "CONF_OPT_X = --without-x" if you have X11 but # want to disable using X11 libraries. This speeds up starting Vim, # but the window title will not be set and the X11 selection can not -# used. +# be used. # - Uncomment the line "CONF_OPT_XSMP = --disable-xsmp" if you have the # X11 Session Management Protocol (XSMP) library (libSM) but do not # want to use it. @@ -730,12 +730,6 @@ LINT_OPTIONS = -beprxzF ### USL for Unix Systems Laboratories (SYSV 4.2) #EXTRA_DEFS = -DUSL -### RISCos on MIPS without X11 -#EXTRA_DEFS = -DMIPS - -### RISCos on MIPS with X11 -#EXTRA_LIBS = -lsun - ### (6) A/UX 3.1.1 with gcc (Jim Jagielski) #CC= gcc -D_POSIX_SOURCE #CFLAGS= -O2 @@ -1649,7 +1643,7 @@ PRO_AUTO = \ RSRC_DIR = os_mac_rsrc PRO_MANUAL = os_amiga.pro os_msdos.pro os_win16.pro os_win32.pro \ - os_mswin.pro os_beos.pro os_vms.pro os_riscos.pro $(PERL_PRO) + os_mswin.pro os_beos.pro os_vms.pro $(PERL_PRO) # Default target is making the executable and tools all: $(VIMTARGET) $(TOOLS) languages $(GUI_BUNDLE) diff --git a/src/ascii.h b/src/ascii.h index b920d41afd..5256fc32de 100644 --- a/src/ascii.h +++ b/src/ascii.h @@ -183,11 +183,6 @@ extern char MetaCharTable[]; # define PATHSEP psepc # define PATHSEPSTR pseps #else -# ifdef RISCOS -# define PATHSEP '.' -# define PATHSEPSTR "." -# else -# define PATHSEP '/' -# define PATHSEPSTR "/" -# endif +# define PATHSEP '/' +# define PATHSEPSTR "/" #endif diff --git a/src/auto/configure b/src/auto/configure index 9863d144b3..0607b8ef35 100755 --- a/src/auto/configure +++ b/src/auto/configure @@ -18255,10 +18255,12 @@ fi { echo "$as_me:$LINENO: checking how to create tags" >&5 echo $ECHO_N "checking how to create tags... $ECHO_C" >&6; } test -f tags && mv tags tags.save -if (eval exctags --version /dev/null | grep Exuberant) < /dev/null 1>&5 2>&1; then - TAGPRG="exctags -I INIT+ --fields=+S" -elif (eval ctags --version /dev/null | grep Exuberant) < /dev/null 1>&5 2>&1; then +if (eval ctags --version /dev/null | grep Exuberant) < /dev/null 1>&5 2>&1; then TAGPRG="ctags -I INIT+ --fields=+S" +elif (eval exctags --version /dev/null | grep Exuberant) < /dev/null 1>&5 2>&1; then + TAGPRG="exctags -I INIT+ --fields=+S" +elif (eval exuberant-ctags --version /dev/null | grep Exuberant) < /dev/null 1>&5 2>&1; then + TAGPRG="exuberant-ctags -I INIT+ --fields=+S" else TAGPRG="ctags" (eval etags /dev/null) < /dev/null 1>&5 2>&1 && TAGPRG="etags" diff --git a/src/buffer.c b/src/buffer.c index dd07370601..71c28fd0a0 100644 --- a/src/buffer.c +++ b/src/buffer.c @@ -1812,9 +1812,6 @@ free_buf_options(buf, free_p_ff) #ifdef FEAT_AUTOCMD clear_string_option(&buf->b_p_ft); #endif -#ifdef FEAT_OSFILETYPE - clear_string_option(&buf->b_p_oft); -#endif #ifdef FEAT_CINDENT clear_string_option(&buf->b_p_cink); clear_string_option(&buf->b_p_cino); diff --git a/src/configure.in b/src/configure.in index 73c9992ab9..17187a5f23 100644 --- a/src/configure.in +++ b/src/configure.in @@ -3433,10 +3433,12 @@ dnl -v for variables. Dangerous, most ctags take this for 'vgrind style'. dnl -i+m to test for older Exuberant ctags AC_MSG_CHECKING(how to create tags) test -f tags && mv tags tags.save -if (eval exctags --version /dev/null | grep Exuberant) < /dev/null 1>&AC_FD_CC 2>&1; then - TAGPRG="exctags -I INIT+ --fields=+S" -elif (eval ctags --version /dev/null | grep Exuberant) < /dev/null 1>&AC_FD_CC 2>&1; then +if (eval ctags --version /dev/null | grep Exuberant) < /dev/null 1>&AC_FD_CC 2>&1; then TAGPRG="ctags -I INIT+ --fields=+S" +elif (eval exctags --version /dev/null | grep Exuberant) < /dev/null 1>&AC_FD_CC 2>&1; then + TAGPRG="exctags -I INIT+ --fields=+S" +elif (eval exuberant-ctags --version /dev/null | grep Exuberant) < /dev/null 1>&AC_FD_CC 2>&1; then + TAGPRG="exuberant-ctags -I INIT+ --fields=+S" else TAGPRG="ctags" (eval etags /dev/null) < /dev/null 1>&AC_FD_CC 2>&1 && TAGPRG="etags" diff --git a/src/edit.c b/src/edit.c index 6976b96c89..e0a6acbd49 100644 --- a/src/edit.c +++ b/src/edit.c @@ -1391,10 +1391,45 @@ docomplete: goto do_intr; #endif +normalchar: /* * Insert a nomal character. */ -normalchar: +#ifdef FEAT_AUTOCMD + if (!p_paste) + { + /* Trigger the InsertCharPre event. Lock the text to avoid + * weird things from happening. */ + set_vim_var_char(c); + ++textlock; + if (apply_autocmds(EVENT_INSERTCHARPRE, NULL, NULL, + FALSE, curbuf)) + { + /* Get the new value of v:char. If it is more than one + * character insert it literally. */ + char_u *s = get_vim_var_str(VV_CHAR); + if (MB_CHARLEN(s) > 1) + { + if (stop_arrow() != FAIL) + { + ins_str(s); + AppendToRedobuffLit(s, -1); + } + c = NUL; + } + else + c = PTR2CHAR(s); + } + + set_vim_var_string(VV_CHAR, NULL, -1); + --textlock; + + /* If the new value is an empty string then don't insert a + * char. */ + if (c == NUL) + break; + } +#endif #ifdef FEAT_SMARTINDENT /* Try to perform smart-indenting. */ ins_try_si(c); @@ -1563,12 +1598,16 @@ ins_redraw(ready) ins_ctrl_v() { int c; + int did_putchar = FALSE; /* may need to redraw when no more chars available now */ ins_redraw(FALSE); if (redrawing() && !char_avail()) + { edit_putchar('^', TRUE); + did_putchar = TRUE; + } AppendToRedobuff((char_u *)CTRL_V_STR); /* CTRL-V */ #ifdef FEAT_CMDL_INFO @@ -1576,8 +1615,10 @@ ins_ctrl_v() #endif c = get_literal(); - edit_unputchar(); /* when line fits in 'columns' the '^' is at the start - of the next line and will not be redrawn */ + if (did_putchar) + /* when the line fits in 'columns' the '^' is at the start of the next + * line and will not removed by the redraw */ + edit_unputchar(); #ifdef FEAT_CMDL_INFO clear_showcmd(); #endif @@ -3495,11 +3536,7 @@ ins_compl_addfrommatch() return; } p += len; -#ifdef FEAT_MBYTE - c = mb_ptr2char(p); -#else - c = *p; -#endif + c = PTR2CHAR(p); ins_compl_addleader(c); } @@ -9671,6 +9708,7 @@ ins_digraph() { int c; int cc; + int did_putchar = FALSE; pc_status = PC_STATUS_UNSET; if (redrawing() && !char_avail()) @@ -9679,6 +9717,7 @@ ins_digraph() ins_redraw(FALSE); edit_putchar('?', TRUE); + did_putchar = TRUE; #ifdef FEAT_CMDL_INFO add_to_showcmd_c(Ctrl_K); #endif @@ -9695,8 +9734,10 @@ ins_digraph() c = plain_vgetc(); --no_mapping; --allow_keys; - edit_unputchar(); /* when line fits in 'columns' the '?' is at the start - of the next line and will not be redrawn */ + if (did_putchar) + /* when the line fits in 'columns' the '?' is at the start of the next + * line and will not be removed by the redraw */ + edit_unputchar(); if (IS_SPECIAL(c) || mod_mask) /* special key */ { @@ -9708,6 +9749,7 @@ ins_digraph() } if (c != ESC) { + did_putchar = FALSE; if (redrawing() && !char_avail()) { /* may need to redraw when no more chars available now */ @@ -9715,11 +9757,9 @@ ins_digraph() if (char2cells(c) == 1) { - /* first remove the '?', otherwise it's restored when typing - * an ESC next */ - edit_unputchar(); ins_redraw(FALSE); edit_putchar(c, TRUE); + did_putchar = TRUE; } #ifdef FEAT_CMDL_INFO add_to_showcmd_c(c); @@ -9730,8 +9770,10 @@ ins_digraph() cc = plain_vgetc(); --no_mapping; --allow_keys; - edit_unputchar(); /* when line fits in 'columns' the '?' is at the - start of the next line and will not be redrawn */ + if (did_putchar) + /* when the line fits in 'columns' the '?' is at the start of the + * next line and will not be removed by a redraw */ + edit_unputchar(); if (cc != ESC) { AppendToRedobuff((char_u *)CTRL_V_STR); diff --git a/src/eval.c b/src/eval.c index 563a36b4d9..b9c0bad5ad 100644 --- a/src/eval.c +++ b/src/eval.c @@ -352,7 +352,7 @@ static struct vimvar {VV_NAME("swapname", VAR_STRING), VV_RO}, {VV_NAME("swapchoice", VAR_STRING), 0}, {VV_NAME("swapcommand", VAR_STRING), VV_RO}, - {VV_NAME("char", VAR_STRING), VV_RO}, + {VV_NAME("char", VAR_STRING), 0}, {VV_NAME("mouse_win", VAR_NUMBER), 0}, {VV_NAME("mouse_lnum", VAR_NUMBER), 0}, {VV_NAME("mouse_col", VAR_NUMBER), 0}, @@ -911,6 +911,7 @@ eval_clear() hash_clear(&compat_hashtab); free_scriptnames(); + free_locales(); /* global variables */ vars_clear(&globvarht); @@ -11826,9 +11827,6 @@ f_has(argvars, rettv) #ifdef __QNX__ "qnx", #endif -#ifdef RISCOS - "riscos", -#endif #ifdef UNIX "unix", #endif @@ -12093,9 +12091,6 @@ f_has(argvars, rettv) #ifdef FEAT_OLE "ole", #endif -#ifdef FEAT_OSFILETYPE - "osfiletype", -#endif #ifdef FEAT_PATH_EXTRA "path_extra", #endif @@ -15014,7 +15009,10 @@ f_resolve(argvars, rettv) len = STRLEN(p); if (len > 0 && after_pathsep(p, p + len)) + { has_trailing_pathsep = TRUE; + p[len - 1] = NUL; /* the trailing slash breaks readlink() */ + } q = getnextcomp(p); if (*q != NUL) diff --git a/src/ex_cmds.c b/src/ex_cmds.c index fba7aa101e..64c1371bd3 100644 --- a/src/ex_cmds.c +++ b/src/ex_cmds.c @@ -899,9 +899,6 @@ free_prev_shellcmd() * Handle the ":!cmd" command. Also for ":r !cmd" and ":w !cmd" * Bangs in the argument are replaced with the previously entered command. * Remember the argument. - * - * RISCOS: Bangs only replaced when followed by a space, since many - * pathnames contain one. */ void do_bang(addr_count, eap, forceit, do_in, do_out) @@ -980,11 +977,7 @@ do_bang(addr_count, eap, forceit, do_in, do_out) trailarg = NULL; while (*p) { - if (*p == '!' -#ifdef RISCOS - && (p[1] == ' ' || p[1] == NUL) -#endif - ) + if (*p == '!') { if (p > newcmd && p[-1] == '\\') STRMOVE(p - 1, p); @@ -1578,14 +1571,8 @@ make_filter_cmd(cmd, itmp, otmp) if (p != NULL) *p = NUL; } -# ifdef RISCOS - STRCAT(buf, " { < "); /* Use RISC OS notation for input. */ - STRCAT(buf, itmp); - STRCAT(buf, " } "); -# else STRCAT(buf, " <"); /* " < " causes problems on Amiga */ STRCAT(buf, itmp); -# endif if (*p_shq == NUL) { p = vim_strchr(cmd, '|'); @@ -1634,16 +1621,9 @@ append_redir(buf, buflen, opt, fname) else vim_snprintf((char *)end, (size_t)(buflen - (end - buf)), #ifdef FEAT_QUICKFIX -# ifndef RISCOS - opt != p_sp ? " %s%s" : -# endif " %s %s", #else -# ifndef RISCOS " %s%s", /* " > %s" causes problems on Amiga */ -# else - " %s %s", /* But is needed for 'shellpipe' and RISC OS */ -# endif #endif (char *)opt, (char *)fname); } @@ -1844,11 +1824,7 @@ write_viminfo(file, forceit) #ifdef VMS (char_u *)"-tmp", #else -# ifdef RISCOS - (char_u *)"/tmp", -# else (char_u *)".tmp", -# endif #endif FALSE); if (tempname == NULL) /* out of memory */ @@ -4649,7 +4625,15 @@ do_sub(eap) * for a match in this line again. */ skip_match = TRUE; else - ++matchcol; /* search for a match at next column */ + { + /* search for a match at next column */ +#ifdef FEAT_MBYTE + if (has_mbyte) + matchcol += mb_ptr2len(sub_firstline + matchcol); + else +#endif + ++matchcol; + } goto skip; } @@ -5365,8 +5349,9 @@ ex_global(eap) global_exe(cmd) char_u *cmd; { - linenr_T old_lcount; /* b_ml.ml_line_count before the command */ - linenr_T lnum; /* line number according to old situation */ + linenr_T old_lcount; /* b_ml.ml_line_count before the command */ + buf_T *old_buf = curbuf; /* remember what buffer we started in */ + linenr_T lnum; /* line number according to old situation */ /* * Set current position only once for a global command. @@ -5410,8 +5395,10 @@ global_exe(cmd) msg_didout = FALSE; /* If substitutes done, report number of substitutes, otherwise report - * number of extra or deleted lines. */ - if (!do_sub_msg(FALSE)) + * number of extra or deleted lines. + * Don't report extra or deleted lines in the edge case where the buffer + * we are in after execution is different from the buffer we started in. */ + if (!do_sub_msg(FALSE) && curbuf == old_buf) msgmore(curbuf->b_ml.ml_line_count - old_lcount); } diff --git a/src/ex_cmds2.c b/src/ex_cmds2.c index 90b74f1011..a6506f60f6 100644 --- a/src/ex_cmds2.c +++ b/src/ex_cmds2.c @@ -500,18 +500,10 @@ dbg_parsearg(arg, gap) /* Expand the file name in the same way as do_source(). This means * doing it twice, so that $DIR/file gets expanded when $DIR is * "~/dir". */ -#ifdef RISCOS - q = mch_munge_fname(p); -#else q = expand_env_save(p); -#endif if (q == NULL) return FAIL; -#ifdef RISCOS - p = mch_munge_fname(q); -#else p = expand_env_save(q); -#endif vim_free(q); if (p == NULL) return FAIL; @@ -1541,7 +1533,7 @@ vim_dialog_save_all_changes(buf) #endif /* - * Ask the user what to do when abondoning a changed buffer. + * Ask the user what to do when abandoning a changed buffer. * Must check 'write' option first! */ void @@ -3013,11 +3005,7 @@ do_source(fname, check_other, is_vimrc) proftime_T wait_start; #endif -#ifdef RISCOS - p = mch_munge_fname(fname); -#else p = expand_env_save(fname); -#endif if (p == NULL) return retval; fname_exp = fix_fname(p); @@ -4238,6 +4226,82 @@ ex_language(eap) } # if defined(FEAT_CMDL_COMPL) || defined(PROTO) + +static char_u **locales = NULL; /* Array of all available locales */ +static int did_init_locales = FALSE; + +static void init_locales __ARGS((void)); +static char_u **find_locales __ARGS((void)); + +/* + * Lazy initialization of all available locales. + */ + static void +init_locales() +{ + if (!did_init_locales) + { + did_init_locales = TRUE; + locales = find_locales(); + } +} + +/* Return an array of strings for all available locales + NULL for the + * last element. Return NULL in case of error. */ + static char_u ** +find_locales() +{ + garray_T locales_ga; + char_u *loc; + + /* Find all available locales by running command "locale -a". If this + * doesn't work we won't have completion. */ + char_u *locale_a = get_cmd_output((char_u *)"locale -a", + NULL, SHELL_SILENT); + if (locale_a == NULL) + return NULL; + ga_init2(&locales_ga, sizeof(char_u *), 20); + + /* Transform locale_a string where each locale is separated by "\n" + * into an array of locale strings. */ + loc = (char_u *)strtok((char *)locale_a, "\n"); + + while (loc != NULL) + { + if (ga_grow(&locales_ga, 1) == FAIL) + break; + loc = vim_strsave(loc); + if (loc == NULL) + break; + + ((char_u **)locales_ga.ga_data)[locales_ga.ga_len++] = loc; + loc = (char_u *)strtok(NULL, "\n"); + } + vim_free(locale_a); + if (ga_grow(&locales_ga, 1) == FAIL) + { + ga_clear(&locales_ga); + return NULL; + } + ((char_u **)locales_ga.ga_data)[locales_ga.ga_len] = NULL; + return (char_u **)locales_ga.ga_data; +} + +# if defined(EXITFREE) || defined(PROTO) + void +free_locales() +{ + int i; + if (locales != NULL) + { + for (i = 0; locales[i] != NULL; i++) + vim_free(locales[i]); + vim_free(locales); + locales = NULL; + } +} +# endif + /* * Function given to ExpandGeneric() to obtain the possible arguments of the * ":language" command. @@ -4253,7 +4317,25 @@ get_lang_arg(xp, idx) return (char_u *)"ctype"; if (idx == 2) return (char_u *)"time"; - return NULL; + + init_locales(); + if (locales == NULL) + return NULL; + return locales[idx - 3]; +} + +/* + * Function given to ExpandGeneric() to obtain the available locales. + */ + char_u * +get_locales(xp, idx) + expand_T *xp UNUSED; + int idx; +{ + init_locales(); + if (locales == NULL) + return NULL; + return locales[idx]; } # endif diff --git a/src/ex_docmd.c b/src/ex_docmd.c index 9fee9e7a37..48e8ad8db0 100644 --- a/src/ex_docmd.c +++ b/src/ex_docmd.c @@ -3871,13 +3871,24 @@ set_one_cmd_context(xp, buff) #if (defined(HAVE_LOCALE_H) || defined(X_LOCALE)) \ && (defined(FEAT_GETTEXT) || defined(FEAT_MBYTE)) case CMD_language: - if (*skiptowhite(arg) == NUL) + p = skiptowhite(arg); + if (*p == NUL) { xp->xp_context = EXPAND_LANGUAGE; xp->xp_pattern = arg; } else - xp->xp_context = EXPAND_NOTHING; + { + if ( STRNCMP(arg, "messages", p - arg) == 0 + || STRNCMP(arg, "ctype", p - arg) == 0 + || STRNCMP(arg, "time", p - arg) == 0) + { + xp->xp_context = EXPAND_LOCALES; + xp->xp_pattern = skipwhite(p); + } + else + xp->xp_context = EXPAND_NOTHING; + } break; #endif #if defined(FEAT_PROFILE) @@ -6490,7 +6501,7 @@ ex_close(eap) { # ifdef FEAT_CMDWIN if (cmdwin_type != 0) - cmdwin_result = K_IGNORE; + cmdwin_result = Ctrl_C; else # endif if (!text_locked() @@ -9722,14 +9733,7 @@ eval_vars(src, srcstart, usedlen, lnump, errormsg, escaped) valid = 0; /* Must have ":p:h" to be valid */ } else -#ifdef RISCOS - /* Always use the full path for RISC OS if possible. */ - result = curbuf->b_ffname; - if (result == NULL) - result = curbuf->b_fname; -#else result = curbuf->b_fname; -#endif break; case SPEC_HASH: /* '#' or "#99": alternate file */ @@ -9874,11 +9878,7 @@ eval_vars(src, srcstart, usedlen, lnump, errormsg, escaped) if (src[*usedlen] == '<') /* remove the file name extension */ { ++*usedlen; -#ifdef RISCOS - if ((s = vim_strrchr(result, '/')) != NULL && s >= gettail(result)) -#else if ((s = vim_strrchr(result, '.')) != NULL && s >= gettail(result)) -#endif resultlen = (int)(s - result); } #ifdef FEAT_MODIFY_FNAME @@ -10903,8 +10903,7 @@ get_view_file(c) else if (vim_ispathsep(*p)) { *s++ = '='; -#if defined(BACKSLASH_IN_FILENAME) || defined(AMIGA) || defined(RISCOS) \ - || defined(VMS) +#if defined(BACKSLASH_IN_FILENAME) || defined(AMIGA) || defined(VMS) if (*p == ':') *s++ = '-'; else diff --git a/src/ex_getln.c b/src/ex_getln.c index 36769aa8d0..447f981c77 100644 --- a/src/ex_getln.c +++ b/src/ex_getln.c @@ -4582,50 +4582,52 @@ ExpandFromContext(xp, pat, num_file, file, options) int context; char_u *((*func)__ARGS((expand_T *, int))); int ic; + int escaped; } tab[] = { - {EXPAND_COMMANDS, get_command_name, FALSE}, - {EXPAND_BEHAVE, get_behave_arg, TRUE}, + {EXPAND_COMMANDS, get_command_name, FALSE, TRUE}, + {EXPAND_BEHAVE, get_behave_arg, TRUE, TRUE}, #ifdef FEAT_USR_CMDS - {EXPAND_USER_COMMANDS, get_user_commands, FALSE}, - {EXPAND_USER_CMD_FLAGS, get_user_cmd_flags, FALSE}, - {EXPAND_USER_NARGS, get_user_cmd_nargs, FALSE}, - {EXPAND_USER_COMPLETE, get_user_cmd_complete, FALSE}, + {EXPAND_USER_COMMANDS, get_user_commands, FALSE, TRUE}, + {EXPAND_USER_CMD_FLAGS, get_user_cmd_flags, FALSE, TRUE}, + {EXPAND_USER_NARGS, get_user_cmd_nargs, FALSE, TRUE}, + {EXPAND_USER_COMPLETE, get_user_cmd_complete, FALSE, TRUE}, #endif #ifdef FEAT_EVAL - {EXPAND_USER_VARS, get_user_var_name, FALSE}, - {EXPAND_FUNCTIONS, get_function_name, FALSE}, - {EXPAND_USER_FUNC, get_user_func_name, FALSE}, - {EXPAND_EXPRESSION, get_expr_name, FALSE}, + {EXPAND_USER_VARS, get_user_var_name, FALSE, TRUE}, + {EXPAND_FUNCTIONS, get_function_name, FALSE, TRUE}, + {EXPAND_USER_FUNC, get_user_func_name, FALSE, TRUE}, + {EXPAND_EXPRESSION, get_expr_name, FALSE, TRUE}, #endif #ifdef FEAT_MENU - {EXPAND_MENUS, get_menu_name, FALSE}, - {EXPAND_MENUNAMES, get_menu_names, FALSE}, + {EXPAND_MENUS, get_menu_name, FALSE, TRUE}, + {EXPAND_MENUNAMES, get_menu_names, FALSE, TRUE}, #endif #ifdef FEAT_SYN_HL - {EXPAND_SYNTAX, get_syntax_name, TRUE}, + {EXPAND_SYNTAX, get_syntax_name, TRUE, TRUE}, #endif - {EXPAND_HIGHLIGHT, get_highlight_name, TRUE}, + {EXPAND_HIGHLIGHT, get_highlight_name, TRUE, TRUE}, #ifdef FEAT_AUTOCMD - {EXPAND_EVENTS, get_event_name, TRUE}, - {EXPAND_AUGROUP, get_augroup_name, TRUE}, + {EXPAND_EVENTS, get_event_name, TRUE, TRUE}, + {EXPAND_AUGROUP, get_augroup_name, TRUE, TRUE}, #endif #ifdef FEAT_CSCOPE - {EXPAND_CSCOPE, get_cscope_name, TRUE}, + {EXPAND_CSCOPE, get_cscope_name, TRUE, TRUE}, #endif #ifdef FEAT_SIGNS - {EXPAND_SIGN, get_sign_name, TRUE}, + {EXPAND_SIGN, get_sign_name, TRUE, TRUE}, #endif #ifdef FEAT_PROFILE - {EXPAND_PROFILE, get_profile_name, TRUE}, + {EXPAND_PROFILE, get_profile_name, TRUE, TRUE}, #endif #if (defined(HAVE_LOCALE_H) || defined(X_LOCALE)) \ && (defined(FEAT_GETTEXT) || defined(FEAT_MBYTE)) - {EXPAND_LANGUAGE, get_lang_arg, TRUE}, + {EXPAND_LANGUAGE, get_lang_arg, TRUE, FALSE}, + {EXPAND_LOCALES, get_locales, TRUE, FALSE}, #endif - {EXPAND_ENV_VARS, get_env_name, TRUE}, + {EXPAND_ENV_VARS, get_env_name, TRUE, TRUE}, #ifdef FEAT_GUI_MACVIM - {EXPAND_MACACTION, get_macaction_name, FALSE}, + {EXPAND_MACACTION, get_macaction_name, FALSE, FALSE}, #endif }; int i; @@ -4640,7 +4642,8 @@ ExpandFromContext(xp, pat, num_file, file, options) { if (tab[i].ic) regmatch.rm_ic = TRUE; - ret = ExpandGeneric(xp, ®match, num_file, file, tab[i].func); + ret = ExpandGeneric(xp, ®match, num_file, file, + tab[i].func, tab[i].escaped); break; } } @@ -4662,13 +4665,14 @@ ExpandFromContext(xp, pat, num_file, file, options) * Returns OK when no problems encountered, FAIL for error (out of memory). */ int -ExpandGeneric(xp, regmatch, num_file, file, func) +ExpandGeneric(xp, regmatch, num_file, file, func, escaped) expand_T *xp; regmatch_T *regmatch; int *num_file; char_u ***file; char_u *((*func)__ARGS((expand_T *, int))); /* returns a string from the list */ + int escaped; { int i; int count = 0; @@ -4693,7 +4697,10 @@ ExpandGeneric(xp, regmatch, num_file, file, func) { if (round) { - str = vim_strsave_escaped(str, (char_u *)" \t\\."); + if (escaped) + str = vim_strsave_escaped(str, (char_u *)" \t\\."); + else + str = vim_strsave(str); (*file)[count] = str; #ifdef FEAT_MENU if (func == get_menu_names && str != NULL) @@ -6338,6 +6345,12 @@ ex_window() ccline.cmdbuff = vim_strsave((char_u *)"qa"); cmdwin_result = CAR; } + else if (cmdwin_result == Ctrl_C) + { + /* :q or :close, don't execute any command + * and don't modify the cmd window. */ + ccline.cmdbuff = NULL; + } else ccline.cmdbuff = vim_strsave(ml_get_curline()); if (ccline.cmdbuff == NULL) diff --git a/src/feature.h b/src/feature.h index 144d904a93..c9c88775d4 100644 --- a/src/feature.h +++ b/src/feature.h @@ -505,15 +505,6 @@ # define FEAT_WILDMENU #endif -/* - * +osfiletype filetype checking in autocommand patterns. - * Only on systems that support filetypes (RISC OS). - */ -#if 0 -# define FEAT_OSFILETYPE -# define DFLT_OFT "Text" -#endif - /* * +viminfo reading/writing the viminfo file. Takes about 8Kbyte * of code. diff --git a/src/fileio.c b/src/fileio.c index 1842b0cd1f..abdcd87302 100644 --- a/src/fileio.c +++ b/src/fileio.c @@ -504,18 +504,11 @@ readfile(fname, sfname, from, lines_to_skip, lines_to_read, eap, flags) if (newfile && !read_stdin && !read_buffer) { - /* Remember time of file. - * For RISCOS, also remember the filetype. - */ + /* Remember time of file. */ if (mch_stat((char *)fname, &st) >= 0) { buf_store_time(curbuf, &st, fname); curbuf->b_mtime_read = curbuf->b_mtime; - -#if defined(RISCOS) && defined(FEAT_OSFILETYPE) - /* Read the filetype into the buffer local filetype option. */ - mch_read_filetype(fname); -#endif #ifdef UNIX /* * Use the protection bits of the original file for the swap file. @@ -557,7 +550,6 @@ readfile(fname, sfname, from, lines_to_skip, lines_to_read, eap, flags) /* * for UNIX: check readonly with perm and mch_access() - * for RISCOS: same as Unix, otherwise file gets re-datestamped! * for MSDOS and Amiga: check readonly by trying to open the file for writing */ file_readonly = FALSE; @@ -3804,13 +3796,7 @@ buf_write(buf, fname, sfname, start, end, eap, append, forceit, /* make sure we have a valid backup extension to use */ if (*p_bex == NUL) - { -#ifdef RISCOS - backup_ext = (char_u *)"/bak"; -#else backup_ext = (char_u *)".bak"; -#endif - } else backup_ext = p_bex; @@ -4724,11 +4710,6 @@ restore_backup: #endif if (perm >= 0) /* set perm. of new file same as old file */ (void)mch_setperm(wfname, perm); -#ifdef RISCOS - if (!append && !filtering) - /* Set the filetype after writing the file. */ - mch_set_filetype(wfname, buf->b_p_oft); -#endif #ifdef HAVE_ACL /* Probably need to set the ACL before changing the user (can't set the * ACL on a file the user doesn't own). */ @@ -6267,19 +6248,17 @@ buf_modname(shortname, fname, ext, prepend_dot) */ for (ptr = retval + fnamelen; ptr > retval; mb_ptr_back(retval, ptr)) { -#ifndef RISCOS if (*ext == '.' -# ifdef USE_LONG_FNAME +#ifdef USE_LONG_FNAME && (!USE_LONG_FNAME || shortname) -# else -# ifndef SHORT_FNAME +#else +# ifndef SHORT_FNAME && shortname -# endif # endif +#endif ) if (*ptr == '.') /* replace '.' by '_' */ *ptr = '_'; -#endif if (vim_ispathsep(*ptr)) { ++ptr; @@ -6314,23 +6293,14 @@ buf_modname(shortname, fname, ext, prepend_dot) if (fname == NULL || *fname == NUL || vim_ispathsep(fname[STRLEN(fname) - 1])) { -#ifdef RISCOS - if (*ext == '/') -#else if (*ext == '.') -#endif *s++ = '_'; } /* * If the extension starts with '.', truncate the base name at 8 * characters */ -#ifdef RISCOS - /* We normally use '/', but swap files are '_' */ - else if (*ext == '/' || *ext == '_') -#else else if (*ext == '.') -#endif { if ((size_t)(s - ptr) > (size_t)8) { @@ -6342,13 +6312,8 @@ buf_modname(shortname, fname, ext, prepend_dot) * If the extension doesn't start with '.', and the file name * doesn't have an extension yet, append a '.' */ -#ifdef RISCOS - else if ((e = vim_strchr(ptr, '/')) == NULL) - *s++ = '/'; -#else else if ((e = vim_strchr(ptr, '.')) == NULL) *s++ = '.'; -#endif /* * If the extension doesn't start with '.', and there already is an * extension, it may need to be truncated @@ -6376,23 +6341,14 @@ buf_modname(shortname, fname, ext, prepend_dot) /* * Prepend the dot. */ - if (prepend_dot && !shortname && *(e = gettail(retval)) != -#ifdef RISCOS - '/' -#else - '.' -#endif + if (prepend_dot && !shortname && *(e = gettail(retval)) != '.' #ifdef USE_LONG_FNAME && USE_LONG_FNAME #endif ) { STRMOVE(e + 1, e); -#ifdef RISCOS - *e = '/'; -#else *e = '.'; -#endif } #endif @@ -7744,6 +7700,7 @@ static struct event_name {"InsertChange", EVENT_INSERTCHANGE}, {"InsertEnter", EVENT_INSERTENTER}, {"InsertLeave", EVENT_INSERTLEAVE}, + {"InsertCharPre", EVENT_INSERTCHARPRE}, {"MenuPopup", EVENT_MENUPOPUP}, {"QuickFixCmdPost", EVENT_QUICKFIXCMDPOST}, {"QuickFixCmdPre", EVENT_QUICKFIXCMDPRE}, @@ -10243,19 +10200,11 @@ file_pat_to_reg_pat(pat, pat_end, allow_dirs, no_bslash) ++p; break; case '.': -#ifdef RISCOS - if (allow_dirs != NULL) - *allow_dirs = TRUE; - /* FALLTHROUGH */ -#endif case '~': reg_pat[i++] = '\\'; reg_pat[i++] = *p; break; case '?': -#ifdef RISCOS - case '#': -#endif reg_pat[i++] = '.'; break; case '\\': diff --git a/src/globals.h b/src/globals.h index 6fe00eed4b..60ca4d3bce 100644 --- a/src/globals.h +++ b/src/globals.h @@ -1517,7 +1517,7 @@ EXTERN char_u e_readerrf[] INIT(= N_("E47: Error while reading errorfile")); EXTERN char_u e_sandbox[] INIT(= N_("E48: Not allowed in sandbox")); #endif EXTERN char_u e_secure[] INIT(= N_("E523: Not allowed here")); -#if defined(AMIGA) || defined(MACOS) || defined(MSWIN) || defined(RISCOS) \ +#if defined(AMIGA) || defined(MACOS) || defined(MSWIN) \ || defined(UNIX) || defined(VMS) || defined(OS2) EXTERN char_u e_screenmode[] INIT(= N_("E359: Screen mode setting not supported")); #endif diff --git a/src/gui.c b/src/gui.c index a7130420fc..fa6471030b 100644 --- a/src/gui.c +++ b/src/gui.c @@ -2177,7 +2177,7 @@ gui_outstr_nowrap(s, len, flags, fg, bg, back) if (highlight_mask & (HL_INVERSE | HL_STANDOUT)) { -#if defined(AMIGA) || defined(RISCOS) +#if defined(AMIGA) gui_mch_set_colors(bg_color, fg_color); #else gui_mch_set_fg_color(bg_color); @@ -2186,7 +2186,7 @@ gui_outstr_nowrap(s, len, flags, fg, bg, back) } else { -#if defined(AMIGA) || defined(RISCOS) +#if defined(AMIGA) gui_mch_set_colors(fg_color, bg_color); #else gui_mch_set_fg_color(fg_color); @@ -2214,7 +2214,7 @@ gui_outstr_nowrap(s, len, flags, fg, bg, back) if (back != 0 && ((draw_flags & DRAW_BOLD) || (highlight_mask & HL_ITALIC))) return FAIL; -#if defined(RISCOS) || defined(FEAT_GUI_GTK) || defined(FEAT_GUI_MACVIM) +#if defined(FEAT_GUI_GTK) || defined(FEAT_GUI_MACVIM) /* If there's no italic font, then fake it. * For GTK2, we don't need a different font for italic style. */ if (hl_mask_todo & HL_ITALIC) @@ -3033,26 +3033,11 @@ button_set: did_clip = TRUE; } /* Allow the left button to start the selection */ - else if (button == -# ifdef RISCOS - /* Only start a drag on a drag event. Otherwise - * we don't get a release event. */ - MOUSE_DRAG -# else - MOUSE_LEFT -# endif - ) + else if (button == MOUSE_LEFT) { clip_start_selection(X_2_COL(x), Y_2_ROW(y), repeated_click); did_clip = TRUE; } -# ifdef RISCOS - else if (button == MOUSE_LEFT) - { - clip_clear_selection(); - did_clip = TRUE; - } -# endif /* Always allow pasting */ if (button != MOUSE_MIDDLE) diff --git a/src/gui.h b/src/gui.h index 0242d62058..856362c4fa 100644 --- a/src/gui.h +++ b/src/gui.h @@ -52,10 +52,6 @@ # include */ #endif -#ifdef RISCOS -# include "gui_riscos.h" -#endif - #ifdef FEAT_GUI_PHOTON # include # include @@ -152,7 +148,7 @@ #define DRAW_BOLD 0x02 /* draw bold text */ #define DRAW_UNDERL 0x04 /* draw underline text */ #define DRAW_UNDERC 0x08 /* draw undercurl text */ -#if defined(RISCOS) || defined(FEAT_GUI_GTK) || defined(FEAT_GUI_MACVIM) +#if defined(FEAT_GUI_GTK) || defined(FEAT_GUI_MACVIM) # define DRAW_ITALIC 0x10 /* draw italic text */ #endif #define DRAW_CURSOR 0x20 /* drawing block cursor (win32) */ @@ -222,9 +218,6 @@ typedef struct GuiScrollbar #ifdef FEAT_GUI_MAC ControlHandle id; /* A handle to the scrollbar */ #endif -#ifdef RISCOS - int id; /* Window handle of scrollbar window */ -#endif #ifdef FEAT_GUI_PHOTON PtWidget_t *id; #endif @@ -458,14 +451,6 @@ typedef struct Gui int visibility; /* Is window partially/fully obscured? */ #endif -#ifdef RISCOS - int window_handle; - char_u *window_title; - int window_title_size; - int fg_colour; /* in 0xBBGGRR format */ - int bg_colour; -#endif - #ifdef FEAT_GUI_PHOTON PtWidget_t *vimWindow; /* PtWindow */ PtWidget_t *vimTextArea; /* PtRaw */ diff --git a/src/gui_riscos.c b/src/gui_riscos.c deleted file mode 100644 index 90634fad76..0000000000 --- a/src/gui_riscos.c +++ /dev/null @@ -1,3558 +0,0 @@ -/* vi:set ts=8 sts=4 sw=4: - * - * VIM - Vi IMproved by Bram Moolenaar - * - * Do ":help uganda" in Vim to read copying and usage conditions. - * Do ":help credits" in Vim to see a list of people who contributed. - * See README.txt for an overview of the Vim source code. - */ - -#include "vim.h" -#include - -/* - * gui_riscos.c - * - * Thomas Leonard - * Updated by Andy Wingate - */ - -extern int time_of_last_poll; - -int task_handle = 0; /* Zero means we are not yet a Wimp task */ -int child_handle = 0; /* Task handle of our child process (zero if none). */ -int *wimp_menu = (int *) -1; /* Pointer to a Wimp menu structure (or -1) */ -int save_window = -1; /* Save As window handle */ - -int *redraw_block = NULL; /* NULL means not in a redraw loop. */ -int ro_return_early = FALSE; /* Break out of gui_mch_wait_for_chars() */ - -int leaf_ref = 0; /* Wimp message number - send via Wimp$Scrap */ -char_u *leaf_name = NULL; /* Leaf name from DataSave */ - -int default_columns = 120; /* These values are used if the --rows and --columns */ -int default_rows = 32; /* options aren't used on startup. */ - -#define DRAG_FALSE 0 -#define DRAG_SELECTION 1 -#define DRAG_RESIZE_WINDOW 2 -int ro_dragging = DRAG_FALSE; -int drag_button; -int drag_modifiers; -int drag_x_offset; -int drag_y_offset; - -int nested_wimp = FALSE; /* Bool - can we use the new wimp? */ - -int changed_mode = FALSE; -int x_eigen_factor; -int y_eigen_factor; - -/* If ro_current_font is non-zero then use the outline font with that handle, - * otherwise, if zap_redraw is TRUE then use ZapRedraw, otherwise use the - * system font. - * - * If zap_redraw is TRUE then zap_file[] contains valid Zap font file - * pointers (or NULLs). - */ -int ro_current_font = 0; /* 0 is system font, or ZapRedraw */ -int font_x_offset = 0; /* Where to position each char in its box */ -int font_y_offset = 0; - -int zap_redraw = FALSE; -int double_height = FALSE; /* Plot each line twice? */ - -#define grgb(r,g,b) ((b<<16) + (g<<8) + (r)) -#define UNUSED_COLOUR (gui.back_pixel) - -#define RO_LOAD_CLIPBOARD -2 /* Internal handle for DataSave message. */ - -/* Changes by John Kortink, 22-23 July 1998 - * - * Stuff to make redraw a lot faster. Almost all of it is right here below, - * elsewhere changes are marked with 'JK230798'. Apart from a small change in - * 'gui.c' all changes are limited to this file, 'gui_riscos.c'. The change in - * 'gui.c' is to make Vim stop being 'smart' not redrawing characters that are - * 'already there' (i.e. from the previous line, by coincidence). This caused a - * lot more calls to the redraw code, which we want to avoid because a few nice - * big strings at a time is a lot faster than a truckload of small ones. ('Dear - * Bram ...'). - */ - -/* The ZapRedraw structure */ - -static struct -{ - int r_flags; - int r_minx; - int r_miny; - int r_maxx; - int r_maxy; - int r_screen; - int r_bpl; - int r_bpp; - int r_charw; - int r_charh; - char *r_caddr; - int r_cbpl; - int r_cbpc; - int r_linesp; - int r_data; - int r_scrollx; - int r_scrolly; - int *r_palette; - int r_for; - int r_bac; - char *r_workarea; - int r_magx; - int r_magy; - int r_xsize; - int r_ysize; - int r_mode; -} -zap_redraw_block; - -/* Other globals */ - -static int zap_redraw_initialised = FALSE; -static int zap_redraw_update_colours; -static int zap_redraw_colours[2]; -static int zap_redraw_palette[16]; - -/* Holds the current Zap font file(s). - * The font is recreated from this block on a mode change. - * When using zap, element ZAP_NORMAL is always valid, but - * the others can be NULL. - */ - -#define ZAP_NORMAL 0 -#define ZAP_BOLD 1 -#define ZAP_ITALIC 2 -#define ZAP_BITALIC 3 -#define ZAP_STYLES 4 - -/* Zap font file format data */ -static char *zap_file[ZAP_STYLES] = {NULL, NULL, NULL, NULL}; - -/* r_caddr format for current mode */ -static char *zap_caddr[ZAP_STYLES] = {NULL, NULL, NULL, NULL}; - -static void ro_remove_menu(int *menu); - -/* - * Initialise all the ZapRedraw stuff. - * Call this when changing font and after each mode change. - * zap_redraw_bitmap must contain a valid Zap font file (possibly - * created from the system font). - * - * Return FAIL to revert to system font (if we can't use ZapRedraw). - */ - int -ro_zap_redraw_initialise() -{ - int bytes_per_bitmap_char; - int first, last; - int i; - - /* Can't have initialisers for struct members :-(, ok, this way then ... */ - if (!zap_redraw_initialised) - { - zap_redraw_block.r_workarea = NULL; - zap_redraw_initialised = TRUE; - } - - /* We redraw in DSA mode */ - zap_redraw_block.r_flags = 0x0; - - /* Let ZapRedraw get the screen address for us */ - zap_redraw_block.r_screen = 0; - - /* Read the font width and height from the font file header. - * Assume that all styles are the same size. - * ZAP_NORMAL is always present. - */ - zap_redraw_block.r_charw = ((int *) zap_file[ZAP_NORMAL])[2]; - zap_redraw_block.r_charh = ((int *) zap_file[ZAP_NORMAL])[3]; - - /* We have no linespacing */ - zap_redraw_block.r_linesp = 0; - - /* Fix foreground = colour 1 */ - zap_redraw_block.r_for = 1; - - /* Fix background = colour 0 */ - zap_redraw_block.r_bac = 0; - - /* Colour mask buffer */ - zap_redraw_block.r_palette = zap_redraw_palette; - - /* Allocate local workspace (for the few calls following here) */ - if (zap_redraw_block.r_workarea != NULL) - free(zap_redraw_block.r_workarea); - zap_redraw_block.r_workarea = (char*) malloc(128); - if (!zap_redraw_block.r_workarea) - return FAIL; /* Out of memory */ - - /* Fill in VDU variables */ - if (xswi(ZapRedraw_ReadVduVars, 0, &zap_redraw_block) & v_flag) - return FAIL; /* Can't find ZapRedraw module - use VDU instead */ - - /* Determine cbpl and cbpc */ - swi(ZapRedraw_CachedCharSize, zap_redraw_block.r_bpp, 0, - zap_redraw_block.r_charw, zap_redraw_block.r_charh); - zap_redraw_block.r_cbpl = r2; - zap_redraw_block.r_cbpc = r3; - - /* Allocate general workspace (for the calls outside) */ - if (zap_redraw_block.r_workarea != NULL) - free(zap_redraw_block.r_workarea); - zap_redraw_block.r_workarea = (char*) malloc(128 + zap_redraw_block.r_cbpl); - if (!zap_redraw_block.r_workarea) - return FAIL; /* Out of memory */ - - /* Now convert the 1 bpp character data ready for the current mode */ - - bytes_per_bitmap_char = (zap_redraw_block.r_charw * zap_redraw_block.r_charh + 7) / 8; - - /* Convert the fonts from 1bpp to a format suitable for the - * current mode. - */ - for (i = 0; i < ZAP_STYLES; i++) - { - first = ((int *) zap_file[i])[4]; - last = ((int *) zap_file[i])[5]; - - if (last > 255) - last = 255; /* Don't convert cursors (overwrites memory!) */ - - /* Allocate the font cache */ - vim_free(zap_caddr[i]); - if (zap_file[i]) - zap_caddr[i] = (char*) malloc(zap_redraw_block.r_cbpc * 256); - else - zap_caddr[i] = NULL; /* No file for this style */ - - if (zap_caddr[i]) - { - zap_redraw_block.r_caddr = zap_caddr[i]; - - swi(ZapRedraw_ConvertBitmap, 0, &zap_redraw_block, - first, last, /* Range of characters to convert */ - zap_file[i] + 0x20 /* Addr of first char provided by font */ - - first * bytes_per_bitmap_char); - } - } - - if (!zap_caddr[ZAP_NORMAL]) - { - zap_redraw = FALSE; /* Out of memory */ - return FAIL; - } - - /* Next time we need them, we have to update the colour masks */ - zap_redraw_update_colours = TRUE; - - return OK; -} - -/* - * Redraw a string at OS coordinates (top-left, x inclusive, y exclusive). - * Graphics clip window is window[0..3] as in R1+28..40 of Wimp_RedrawWindow. - * Returns (possibly modified) flags. - */ - int -ro_zap_redraw_draw_string(x, y, string, length, flags, clip) - int x; - int y; - char *string; - int length; - int flags; /* DRAW_TRANSP, DRAW_BOLD, DRAW_UNDERL, DRAW_ITALIC */ - int *clip; -{ - char redraw_data[1024]; - int clip_minx; - int clip_miny; - int clip_maxx; - int clip_maxy; - int os_xshift = zap_redraw_block.r_magx; - int os_yshift = zap_redraw_block.r_magy; - - if (flags & DRAW_TRANSP) - return flags; /* We don't do transparent plotting yet. */ - - if (flags & DRAW_BOLD) - { - if (flags & DRAW_ITALIC && zap_caddr[ZAP_BITALIC]) - zap_redraw_block.r_caddr = zap_caddr[ZAP_BITALIC]; - else - zap_redraw_block.r_caddr = zap_caddr[ZAP_BOLD]; - } - else - { - if (flags & DRAW_ITALIC) - zap_redraw_block.r_caddr = zap_caddr[ZAP_ITALIC]; - else - zap_redraw_block.r_caddr = zap_caddr[ZAP_NORMAL]; - } - if (!zap_redraw_block.r_caddr) - { - zap_redraw_block.r_caddr = zap_caddr[ZAP_NORMAL]; - flags |= DRAW_UNDERL; /* Style missing - we can always underline */ - } - - /* Set the vertical scaling flag */ - if (double_height) - zap_redraw_block.r_flags = 1 << 1; - else - zap_redraw_block.r_flags = 0; - - /* Update the colour masks (if needed) */ - if (zap_redraw_update_colours) - { - swi(ZapRedraw_CreatePalette, 2, - &zap_redraw_block, - zap_redraw_colours, - zap_redraw_block.r_palette, 2); - zap_redraw_update_colours = FALSE; - } - - /* Target rectangle in ZapRedraw rectangle coordinates (pixels, Y-min/max reversed !!!) */ - zap_redraw_block.r_minx = x >> os_xshift; /* inclusive */ - zap_redraw_block.r_miny = zap_redraw_block.r_ysize - (y >> os_yshift); /* inclusive */ - zap_redraw_block.r_maxx = (x + length * gui.char_width) >> os_xshift; /* exclusive */ - zap_redraw_block.r_maxy = zap_redraw_block.r_ysize - ((y - gui.char_height) >> os_yshift); - /* exclusive */ - - /* Clip rectangle in ZapRedraw rectangle coordinates (pixels, Y-min/max reversed !!!) */ - clip_minx = clip[0] >> os_xshift; /* inclusive */ - clip_miny = zap_redraw_block.r_ysize - (clip[3] >> os_yshift); /* inclusive */ - clip_maxx = clip[2] >> os_xshift; /* exclusive */ - clip_maxy = zap_redraw_block.r_ysize - (clip[1] >> os_yshift); /* exclusive */ - - /* Clip target rectangle against the current graphics window */ - if (zap_redraw_block.r_minx < clip_minx) - { - zap_redraw_block.r_scrollx = clip_minx - zap_redraw_block.r_minx; - zap_redraw_block.r_minx = clip_minx; - } - else - zap_redraw_block.r_scrollx = 0; - if (zap_redraw_block.r_miny < clip_miny) - { - zap_redraw_block.r_scrolly = clip_miny - zap_redraw_block.r_miny; - zap_redraw_block.r_miny = clip_miny; - } - else - zap_redraw_block.r_scrolly = 0; - if (zap_redraw_block.r_maxx > clip_maxx) - zap_redraw_block.r_maxx = clip_maxx; - if (zap_redraw_block.r_maxy > clip_maxy) - zap_redraw_block.r_maxy = clip_maxy; - - /* Fill in the character data structure */ - if (length > (sizeof(redraw_data) - 2 * 4 - 2)) - length = sizeof(redraw_data) - 2 * 4 - 2; - ((int*) redraw_data)[0] = 2 * 4; - ((int*) redraw_data)[1] = 0; - strncpy(redraw_data + 2 * 4, string, length); - redraw_data[2 * 4 + length + 0] = '\0'; - redraw_data[2 * 4 + length + 1] = '\x2'; - zap_redraw_block.r_data = (int) redraw_data; - - /* Perform the draw */ - swi(ZapRedraw_RedrawArea, 0, &zap_redraw_block); - - return flags; -} - -/* - * Okay that was it from me, back to Thomas ... - */ - -/* - * Parse the GUI related command-line arguments. Any arguments used are - * deleted from argv, and *argc is decremented accordingly. This is called - * when vim is started, whether or not the GUI has been started. - */ - void -gui_mch_prepare(int *argc, char **argv) -{ - int arg = 1; - - while (arg < *argc - 1) - { - if (strcmp(argv[arg], "--rows") == 0 || strcmp(argv[arg], "--columns") == 0) - { - int value; - - value = atoi(argv[arg + 1]); - - if (argv[arg][2] == 'r') - default_rows = value; - else - default_columns = value; - - /* Delete argument from argv[]. (hope this is read/write!) */ - - *argc -= 2; - if (*argc > arg) - mch_memmove(&argv[arg], &argv[arg + 2], (*argc - arg) - * sizeof(char *)); - } - else - arg++; - } -} - -/* Fatal error on initialisation - report it and die. */ - void -ro_die(error) - char_u *error; /* RISC OS error block */ -{ - swi(Wimp_ReportError, error, 5, "GVim"); - exit(EXIT_FAILURE); -} - -/* Find the sizes of the window tools: - * - * Create a test window. - * Find inner and outer sizes. - * Find the difference. - * Delete window. - * - * While we're here, find the eigen values too. - */ - void -ro_measure_tools() -{ - int block[10]; - int vdu[] = { 4, 5, -1}; - int test_window[] = - { - -100, -100, /* Visible area : min X,Y */ - -50, -50, /* max X,Y */ - 0, 0, /* Scroll offsets */ - -1, /* Window in front */ - 0xd0800150, /* Window flags */ - 0xff070207, /* Colours */ - 0x000c0103, /* More colours */ - 0, -0x4000, /* Workarea extent */ - 0x4000, 0, /* max X,Y */ - 0x00000000, /* No title */ - 0 << 12, /* No workarea button type */ - 1, /* Wimp sprite area */ - 0x00010001, /* Minimum width, height */ - 0, 0, 0, /* Title data (none) */ - 0 /* No icons */ - }; - int inner_max_x, inner_min_y; - - swi(Wimp_CreateWindow, 0, test_window); - - block[0] = r0; - /* Open the window (and read state). - * GetWindowOutline needs it too if the wimp isn't nested. - */ - swi(Wimp_OpenWindow, 0, block); - inner_max_x = block[3]; - inner_min_y = block[2]; - - swi(Wimp_GetWindowOutline, 0, block); - - gui.scrollbar_width = block[3] - inner_max_x; - gui.scrollbar_height = inner_min_y - block[2]; - - swi(Wimp_DeleteWindow, 0, block); - - /* Read the size of one pixel. */ - swi(OS_ReadVduVariables, vdu, vdu); - x_eigen_factor = vdu[0]; - y_eigen_factor = vdu[1]; -} - -/* Load a template from the current templates file. - * Create the window and return its handle. - */ - int -ro_load_template(str_name, title, title_size) - char_u *str_name; /* Identifier of window in file (max 12 chars) */ - char_u **title; /* If not NULL then return pointer to title here */ - int *title_size; /* If not NULL then return the title length here */ -{ - int *window; - char *data; - int name[4]; - - strcpy( (char *) name, str_name); - - /* Find how big we must make the buffers */ - - if (xswi(Wimp_LoadTemplate, 0, 0, 0, 0, -1, name, 0) & v_flag) - ro_die( (char *) r0); - - window = malloc(r1); /* Don't print text messages from alloc() */ - data = malloc(r2); - if (window == NULL || data == NULL) - ro_die("\0\0\0\0Out of memory - Can't load templates"); - - /* Load the template into the buffers */ - - swi(Wimp_LoadTemplate, 0, - window, /* Temp block */ - data, /* Icon data */ - data + r2 + 1, /* End of icon data */ - -1, /* No fonts */ - name, 0); /* First match */ - if (r6 == 0) - ro_die("\0\0\0\0Can't find window in Templates file"); - - /* Create the window */ - - if (xswi(Wimp_CreateWindow, 0, window) & v_flag) - ro_die( (char *) r0); - - if (title) - *title = (char_u *) window[18]; - if (title_size) - *title_size = window[20]; - - free(window); /* Free temp block */ - return r0; /* Return the window handle */ -} - -/* - * Check if the GUI can be started. Called before gvimrc is sourced. - * Return OK or FAIL. - */ - int -gui_mch_init_check() -{ - return OK; /* TODO: GUI can always be started? */ -} - -/* - * Initialise the RISC OS GUI. - * Create all the windows. - * Returns OK for success, FAIL when the GUI can't be started. - */ - int -gui_mch_init() -{ - int messages[] = { - 1, 2, 3, 4, /* DataSave, DataSaveAck, DataLoad, DataLoadAck */ - 8, /* PreQuit */ - 0xf, /* ClaimEntity (for clipboard) */ - 0x10, /* DataRequest (for clipboard) */ - 0x400c1, /* Mode change */ - 0x400c3, /* TaskCloseDown */ - 0x400c9, /* MenusDeleted */ - 0x808c1, /* TW_Output */ - 0x808c2, /* TW_Ego */ - 0x808c3, /* TW_Morio */ - 0x808c4, /* TW_Morite */ - 0}; /* End-of-list. */ - - - /* There may have been some errors reported in the - * command window before we get here. Wait if so. - */ - swi(Wimp_ReadSysInfo, 3); - if (r0 == 0) - swi(Wimp_CommandWindow, 0); /* Window opened - close with prompt */ - - if (xswi(Wimp_Initialise, 310, 0x4b534154, "GVim", messages) & v_flag) - return FAIL; - nested_wimp = r0 >= 397; - task_handle = r1; - - /* Load the templates. */ - - if (xswi(Wimp_OpenTemplate, 0, "Vim:Templates") & v_flag) - ro_die( (char *) r0); - - gui.window_handle = ro_load_template("editor", - &gui.window_title, - &gui.window_title_size); - - save_window = ro_load_template("save", NULL, NULL); - - swi(Wimp_CloseTemplate); - - /* Set default foreground and background colours. */ - - gui.norm_pixel = gui.def_norm_pixel; - gui.back_pixel = gui.def_back_pixel; - - /* Get the colours from the "Normal" and "Menu" group (set in syntax.c or - * in a vimrc file) */ - - set_normal_colors(); - - /* - * Check that none of the colors are the same as the background color - */ - - gui_check_colors(); - - /* Get the colours for the highlight groups (gui_check_colors() might have - * changed them) */ - - highlight_gui_started(); /* re-init colours and fonts */ - - /* Set geometry based on values read on initialisation. */ - - gui.num_cols = Columns = default_columns; - gui.num_rows = Rows = default_rows; - - /* Get some information about our environment. */ - - ro_measure_tools(); - - return OK; -} - -/* - * Called when the foreground or background colour has been changed. - */ - void -gui_mch_new_colors() -{ -} - -/* - * Open the GUI window which was created by a call to gui_mch_init(). - */ - int -gui_mch_open(void) -{ - int block[10]; - - block[0] = gui.window_handle; - swi(Wimp_GetWindowState, 0, block); - block[7] = -1; /* Open at the top of the stack */ - swi(Wimp_OpenWindow, 0, block); - - /* Give the new window the input focus */ - swi(Wimp_SetCaretPosition, gui.window_handle, -1, 0, 0, -1, -1); - - if (gui_win_x != -1 && gui_win_y != -1) - gui_mch_set_winpos(gui_win_x, gui_win_y); - - return OK; -} - - void -gui_mch_exit(int rc) -{ - int block[64]; - - /* Close window. Stops us from getting troublesome events - * if we take a while to die. - */ - block[0] = gui.window_handle; - swi(Wimp_CloseWindow, 0, block); - - if (child_handle) - { - /* We still have a sub-task running - kill it */ - block[0] = 20; - block[3] = 0; - block[4] = 0; /* Quit */ - if ((xswi(Wimp_SendMessage, 17, block, child_handle) & v_flag) == 0) - { - /* Idle until child dies. */ - while (child_handle) - { - process_event(wimp_poll(1, block), block); - } - } - } - - exit(rc); -} - -/* - * Get the position of the top left corner of the window. - */ - int -gui_mch_get_winpos(int *x, int *y) -{ - /* TODO */ - return FAIL; -} - -/* - * Set the position of the top left corner of the window to the given - * coordinates. - */ - void -gui_mch_set_winpos(int x, int y) -{ - /* TODO */ -} - - void -gui_mch_set_shellsize(width, height, min_width, min_height, base_width, base_height, direction) - int width; /* In OS units */ - int height; - int min_width; /* Smallest permissible window size (ignored) */ - int min_height; - int base_width; /* Space for scroll bars, etc */ - int base_height; - int direction; -{ - int s_width, s_height; - int block[] = { - gui.window_handle, - 0, - -height + 1, - width, - 1}; - - gui_mch_get_screen_dimensions(&s_width, &s_height); - s_width -= base_width; - s_height -= base_height; /* Underestimate - ignores titlebar */ - - swi(Wimp_GetWindowState, 0, block); - block[3] = block[1] + width; - block[2] = block[4] - height; - if (block[3] > s_width) - { - block[3] = s_width; - block[1] = block[3] - width; - } - if (block[2] < gui.scrollbar_height) - { - block[2] = gui.scrollbar_height; - block[4] = block[2] + height; - } - swi(Wimp_OpenWindow, 0, block); - swi(Wimp_ForceRedraw, gui.window_handle, 0, -height, width, 0); -} - - void -gui_mch_get_screen_dimensions(int *screen_w, int *screen_h) -{ - int block[] = {4, 5, 11, 12, -1}; - - swi(OS_ReadVduVariables, block, block); - *screen_w = (block[2] + 1) << block[0]; - *screen_h = (block[3] + 1) << block[1]; -} - -/* Take a font name with options and return a font handle, or - * zero for failure. - * Replace extension with 'Bold' or 'Italic' depending on modifiers. - */ - int -ro_get_font(fullname, weight) - char_u *fullname; - int weight; /* Initial weights: - * BIT MEANING - * 0 bold - * 1 italic - */ -{ - char_u *arg; - char_u font[41]; - int width = -1; - int height = -1; - int name_len; - int i; - char_u c; - - for (i = 0; i < 39;) - { - c = fullname[i]; - if (c == ':' || c == NUL || c == '.') - break; - font[i++] = c; - } - - /* find the first modifier, NULL if none */ - arg = strchr(fullname + i, ':'); - - while (arg) - { - switch (*++arg) - { - case 'h': - height = strtol(arg + 1, (char **) &arg, 10); - break; - case 'w': - width = strtol(arg + 1, (char **) &arg, 10); - break; - case 'b': - weight |= 1; - break; - case 'i': - weight |= 2; - break; - default: - return 0; - } - arg = strchr(arg, ':'); - } - - if ((weight & 1) && i < 35) - { - /* Bold goes instead of given suffix */ - strncpy(font + i, ".Bold", 5); - i += 5; - } - else - { - /* Copy rest of name unless we are using Bold */ - while (i < 39) - { - c = fullname[i]; - if (c == ':' || c == NUL) - break; - font[i++] = c; - } - } - if ((weight & 2) && i < 32) - { - strncpy(font + i, ".Oblique", 8); - i += 8; - } - - font[i] = 0; - - if (height < 1 && width < 1) - height = width = 10; /* Default to 10pt */ - else if (height < 1) - height = width; - else if (width < 1) - width = height; - - if (xswi(Font_FindFont, 0, font, width << 4, height << 4, 0, 0) & v_flag) - return NOFONT; /* Can't find font */ - - return r0; -} - -/* Load a file into allocated memory and check it is valid. - * Return a pointer to the allocated block on success. - */ - char * -zap_load_file(name, style) - char_u *name; /* Name of directory containing styles */ - char_u *style; /* Name of style within directory */ -{ - char_u fname[256]; - char_u *file; - - if (strlen(name) + strlen(style) > 254) - return NULL; /* Names too long */ - - sprintf(fname, "%s.%s", name, style); - - /* Load the named font in 1bpp format. */ - if (xswi(OS_File, 13, fname, 0, 0, "VimFonts:") & v_flag || r0 != 1) - return NULL; /* Error reading file info, or not a file */ - - /* Allocate enough memory to load the whole file */ - file = (char *) alloc(r4); - if (!file) - return NULL; /* Out of memory */ - - if (xswi(OS_File, 12, fname, file, 0, "VimFonts:") & v_flag) - return NULL; /* Unable to load file */ - - if (strncmp(file, "ZapFont\015", 8) == 0) - return file; /* Loaded OK! */ - - vim_free(file); - return NULL; /* Not a valid font file */ -} - -/* Load and convert the named font. - * If name is NULL or a null string then convert the system font. - * Return OK on success; FAIL and we revert to using the VDU drivers. - * - * 'name' is the name of a directory. - * Tries to load 'name.0', 'name.B', 'name.I' and 'name.IB'. - */ - int -zap_load_font(name) - char_u *name; -{ - int i; - - /* Free the existing font files, if any */ - for (i = 0; i < ZAP_STYLES; i++) - { - vim_free(zap_file[i]); - zap_file[i] = NULL; - } - - if (name && *name == '!') - { - name++; - double_height = TRUE; - } - else - double_height = FALSE; - - if (name && *name) - { - zap_file[ZAP_NORMAL] = zap_load_file(name, "0"); - if (!zap_file[ZAP_NORMAL]) - return FAIL; /* Can't load the 'normal' style - error */ - - zap_file[ZAP_BOLD] = zap_load_file(name, "B"); - zap_file[ZAP_ITALIC] = zap_load_file(name, "I"); - zap_file[ZAP_BITALIC] = zap_load_file(name, "IB"); - } - else - { - int *header; - char workarea[16]; - char *old_wa; - - /* Allocate memory for system font (8 x 8 x 256 bits, plus header) */ - header = (int *) alloc(0x20 + 8 * 256); - if (header == NULL) - return FAIL; - zap_file[ZAP_NORMAL] = (char *) header; - - /* Store details about the system font */ - header[2] = 8; /* Width */ - header[3] = 8; /* Height */ - header[4] = 0; /* First char */ - header[5] = 255; /* Last char */ - header[6] = header[7] = 0; /* Reserved */ - - /* Get system font bitmap */ - old_wa = zap_redraw_block.r_workarea; - zap_redraw_block.r_workarea = workarea; - swi(ZapRedraw_ReadSystemChars, zap_file[ZAP_NORMAL] + 0x20, &zap_redraw_block); - zap_redraw_block.r_workarea = old_wa; - } - - return ro_zap_redraw_initialise(); -} - -/* - * Initialise vim to use the font with the given name. - * Return FAIL if the font could not be loaded, OK otherwise. - */ - int -gui_mch_init_font(char_u *font_name, int fontset) -{ - int new_handle = 0; /* Use the system font by default */ - - if (font_name[0] == '!') - { - /* Select a ZapRedraw font */ - if (zap_load_font(font_name + 1)) - zap_redraw = TRUE; - else - { - EMSG2(_("E610: Can't load Zap font '%s'"), font_name); - font_name = "System"; /* Error - use system font */ - zap_redraw = FALSE; - } - } - else - { - zap_redraw = FALSE; - - if (font_name) - { - /* Extract any extra details about the font */ - new_handle = ro_get_font(font_name, 0); - if (!new_handle) - return FAIL; - } - else - font_name = "System"; - } - - /* Free the previous font, if any */ - gui_mch_free_font(gui.norm_font); - gui.norm_font = new_handle; - gui.char_ascent = 0; - - if (new_handle) - { - /* Read details about the chosen font */ - swi(Font_ReadInfo, new_handle); - - gui.char_width = r3 - r1; - gui.char_height = r4 - r2; - - font_x_offset = -r1; /* Where to position each char in its box */ - font_y_offset = -r4; - - /* Try to load other fonts for bold, italic, and bold-italic */ - gui_mch_free_font(gui.bold_font); - gui.bold_font = ro_get_font(font_name, 1); - gui_mch_free_font(gui.ital_font); - gui.ital_font = ro_get_font(font_name, 2); - gui_mch_free_font(gui.boldital_font); - gui.boldital_font = ro_get_font(font_name, 3); - } - else - { - /* Use the system font or ZapRedraw. */ - if (zap_redraw) - { - gui.char_width = zap_redraw_block.r_charw << zap_redraw_block.r_magx; - gui.char_height = zap_redraw_block.r_charh << zap_redraw_block.r_magy; - if (double_height) - gui.char_height <<= 1; - } - else - { - gui.char_width = 16; - gui.char_height = 32; - } - - gui_mch_free_font(gui.bold_font); - gui.bold_font = 0; - gui_mch_free_font(gui.ital_font); - gui.ital_font = 0; - gui_mch_free_font(gui.boldital_font); - gui.boldital_font = 0; - } - hl_set_font_name(font_name); - - must_redraw = CLEAR; - return OK; -} - -/* - * Adjust gui.char_height (after 'linespace' was changed). - */ - int -gui_mch_adjust_charheight() -{ - return FAIL; -} - -/* - * Get a font structure for highlighting. - */ - GuiFont -gui_mch_get_font(name, giveErrorIfMissing) - char_u *name; - int giveErrorIfMissing; -{ - int handle; - - if (!name) - return NOFONT; /* System font if no name */ - - handle = ro_get_font(name, 0); - if (!handle) - { - if (giveErrorIfMissing) - EMSG2(_("E611: Can't use font %s"), name); - return NOFONT; - } - - return handle; -} - -#if defined(FEAT_EVAL) || defined(PROTO) -/* - * Return the name of font "font" in allocated memory. - * Don't know how to get the actual name, thus use the provided name. - */ - char_u * -gui_mch_get_fontname(font, name) - GuiFont font; - char_u *name; -{ - if (name == NULL) - return NULL; - return vim_strsave(name); -} -#endif - -/* - * Set the current text font. - */ - void -gui_mch_set_font(GuiFont font) -{ - ro_current_font = font; - - if (font) - { - /* Not the system font or ZapRedraw font - select it */ - swi(Font_SetFont, font); - } -} - -/* - * If a font is not going to be used, free its structure. - */ - void -gui_mch_free_font(GuiFont font) -{ - if (font) - swi(Font_LoseFont, font); -} - -/* - * Return the Pixel value (colour) for the given colour name. - * Return INVALCOLOR for error. - * NB: I've changed Green for now, since it looked really sick - */ - guicolor_T -gui_mch_get_color(char_u *name) -{ - int i; - struct colour - { - char_u *name; - guicolor_T value; - } colours[] = - { - { "Red", grgb(255, 0, 0) }, - { "LightRed", grgb(255, 0, 0) }, - { "DarkRed", grgb(139, 0, 0) }, - - { "Green", grgb(50, 200, 50) }, - { "LightGreen", grgb(144, 238, 144) }, - { "DarkGreen", grgb(0, 100, 0) }, - { "SeaGreen", grgb(46, 139, 87) }, - - { "Blue", grgb(0, 0, 255) }, - { "LightBlue", grgb(173, 216, 230) }, - { "DarkBlue", grgb(0, 0, 139) }, - { "SlateBlue", grgb(160, 90, 205) }, - - { "Cyan", grgb(0, 255, 255) }, - { "LightCyan", grgb(224, 255, 255) }, - { "DarkCyan", grgb(0, 139, 139) }, - - { "Magenta", grgb(255, 0, 255) }, - { "LightMagenta", grgb(255, 224, 255) }, - { "DarkMagenta", grgb(139, 0, 139) }, - - { "Yellow", grgb(255, 255, 0) }, - { "LightYellow", grgb(255, 255, 224) }, - { "DarkYellow", grgb(139, 139, 0) }, - { "Brown", grgb(165, 42, 42) }, - - { "Gray", grgb(190, 190, 190) }, - { "Grey", grgb(190, 190, 190) }, - { "LightGray", grgb(211, 211, 211) }, - { "LightGrey", grgb(211, 211, 211) }, - { "DarkGray", grgb(169, 169, 169) }, - { "DarkGrey", grgb(169, 169, 169) }, - { "Gray10", grgb(26, 26, 26) }, - { "Grey10", grgb(26, 26, 26) }, - { "Gray20", grgb(51, 51, 51) }, - { "Grey20", grgb(51, 51, 51) }, - { "Gray30", grgb(77, 77, 77) }, - { "Grey30", grgb(77, 77, 77) }, - { "Gray40", grgb(102, 102, 102) }, - { "Grey40", grgb(102, 102, 102) }, - { "Gray50", grgb(127, 127, 127) }, - { "Grey50", grgb(127, 127, 127) }, - { "Gray60", grgb(153, 153, 153) }, - { "Grey60", grgb(153, 153, 153) }, - { "Gray70", grgb(179, 179, 179) }, - { "Grey70", grgb(179, 179, 179) }, - { "Gray80", grgb(204, 204, 204) }, - { "Grey80", grgb(204, 204, 204) }, - { "Gray90", grgb(229, 229, 229) }, - { "Grey90", grgb(229, 229, 229) }, - - { "Black", grgb(0, 0, 0) }, - { "White", grgb(255, 255, 255) }, - - { "Orange", grgb(255, 165, 0) }, - { "Purple", grgb(160, 32, 240) }, - { "Violet", grgb(238, 130, 238) }, - {NULL, 0} - }; - - if (name[0] == '#') - { - char *end; - int c; - - c = strtol(name + 1, &end, 16); - return (guicolor_T) ((c >> 16) & 0xff) | (c & 0xff00) | ((c & 0xff) << 16); - } - - for (i = 0; colours[i].name != NULL; i++) - { - if (STRICMP(name, colours[i].name) == 0) - return colours[i].value; - } - if (strnicmp(name, "grey", 4) == 0 || strnicmp(name, "gray", 4) == 0) - { - int level = (255 * atoi(name + 4)) / 100; - return (guicolor_T) grgb(level, level, level); - } - return INVALCOLOR; -} - -/* - * Set the current text colours. - * If we are using fonts then set the antialiasing colours too. - */ - void -gui_mch_set_colors(guicolor_T fg, guicolor_T bg) -{ - zap_redraw_colours[0] = bg << 8; /* JK230798, register new background colour */ - zap_redraw_colours[1] = fg << 8; /* JK230798, register new foreground colour */ - zap_redraw_update_colours = TRUE; /* JK230798, need update of colour masks */ - - swi(ColourTrans_ReturnGCOL, fg << 8); - gui.fg_colour = r0; - swi(ColourTrans_ReturnGCOL, bg << 8); - gui.bg_colour = r0; - - if (ro_current_font) - swi(ColourTrans_SetFontColours, 0, bg << 8, fg << 8, 14); -} - - void -ro_draw_string(x, y, s, len, flags, clip) - int x; /* Top-left coord to plot at (x incl, y excl) */ - int y; /* (screen coords) */ - char_u *s; /* String to plot */ - int len; /* Length of string */ - int flags; /* DRAW_TRANSP, DRAW_BOLD, DRAW_UNDERL */ - int* clip; /* JK230798, added clip window */ -{ - if (ro_current_font) - { - int fx; - int flen = len; /* Preserve for underline */ - - /* Use the Font manager to paint the string. - * Must do one char at a time to get monospacing. - */ - - if (flags & DRAW_ITALIC && !gui.ital_font) - flags |= DRAW_UNDERL; /* No italic - underline instead */ - - if ((flags & DRAW_TRANSP) == 0) - { - swi(ColourTrans_SetColour, gui.bg_colour, 0, 0, 0, 0); - swi(OS_Plot, 4, x, y - gui.char_height); - swi(OS_Plot, 96 + 5, x + len * gui.char_width - 1, y - 1); - } - - fx = x + font_x_offset; - while (flen--) - { - swi(Font_Paint, 0, s++, 0x90, fx, y + font_y_offset, 0, 0, 1); - fx += gui.char_width; - } - } - else - { - if (zap_redraw) - { - /* Using fast Zap redraw. */ - flags = ro_zap_redraw_draw_string(x, y, s, len, flags, clip); - } - else - { - /* Using the system font */ - if (flags & DRAW_ITALIC) - flags |= DRAW_UNDERL; - - if ((flags & DRAW_TRANSP) == 0) - { - swi(ColourTrans_SetColour, gui.bg_colour, 0, 0, 0, 0); - swi(OS_Plot, 4, x, y - gui.char_height); - swi(OS_Plot, 96 + 5, x + len * gui.char_width - 1, y - 1); - } - swi(OS_Plot, 4, /* Move the drawing cursor */ - x, - y - 1); - swi(ColourTrans_SetColour, gui.fg_colour, 0, 0, 0, 0); - swi(OS_WriteN, s, len); - - if (flags & DRAW_BOLD) - { - swi(OS_Plot, 4, x + (1 << x_eigen_factor), y - 1); - swi(OS_WriteN, s, len); - } - } - } - - if (flags & DRAW_UNDERL) - { - if (ro_current_font || zap_redraw) - swi(ColourTrans_SetColour, gui.fg_colour, 0, 0, 0, 0); - /* Underlined is the same with all plotting methods */ - swi(OS_Plot, 4, x, y - gui.char_height); - swi(OS_Plot, 1, gui.char_width * len, 0); - } -} - - void -gui_mch_draw_string(int row, int col, char_u *s, int len, int flags) -{ - int x, y; /* Workarea x,y */ - x = col * gui.char_width; - y = -row * gui.char_height; - - if (redraw_block) - { - ro_draw_string(x + redraw_block[1], y + redraw_block[4], - s, len, flags, &redraw_block[7]); /* JK230798, added clip window */ - } - else - { - int block[44]; - block[0] = gui.window_handle; - block[1] = x; - block[2] = y - gui.char_height; - block[3] = (col + len) * gui.char_width; - block[4] = y; - swi(Wimp_UpdateWindow, 0, block); - while (r0) - { - ro_draw_string(x + block[1], y + block[4], - s, len, flags, &block[7]); /* JK230798, added clip window */ - swi(Wimp_GetRectangle, 0, block); - } - } -} - -/* - * Return OK if the key with the termcap name "name" is supported. - */ - int -gui_mch_haskey(char_u *name) -{ - return FAIL; -} - - void -gui_mch_beep(void) -{ - swi(OS_WriteI + 7); -} - -/* - * Visual bell. - */ - void -gui_mch_flash(int msec) -{ - /* TODO */ -} - - -/* - * Plot a solid rectangle using the given plot action and colour. - * Coordinates are inclusive and window-relative. - */ - void -plot_rectangle(plot, colour, minx, miny, maxx, maxy) - int plot; /* OS_Plot action */ - int colour; - int minx; - int miny; - int maxx; - int maxy; -{ - if (redraw_block) - { - swi(ColourTrans_SetColour, colour, 0, 0, 0, 0); - swi(OS_Plot, 4, minx + redraw_block[1], miny + redraw_block[4]); - swi(OS_Plot, plot, maxx + redraw_block[1], maxy + redraw_block[4]); - } - else - { - int block[44]; - block[0] = gui.window_handle; - block[1] = minx; - block[2] = miny; - block[3] = maxx + 1; - block[4] = maxy + 1; - swi(Wimp_UpdateWindow, 0, block); - while (r0) - { - swi(ColourTrans_SetColour, colour, 0, 0, 0, 0); - swi(OS_Plot, 4, minx + block[1], miny + block[4]); - swi(OS_Plot, plot, maxx + block[1], maxy + block[4]); - swi(Wimp_GetRectangle, 0, block); - } - } -} - -/* - * Invert a rectangle from row r, column c, for nr rows and nc columns. - */ - void -gui_mch_invert_rectangle(int r, int c, int nr, int nc) -{ - plot_rectangle(96 + 6, 0, FILL_X(c), -FILL_Y(r + nr), FILL_X(c + nc), -FILL_Y(r)); -} - -/* - * Iconify the GUI window. - */ - void -gui_mch_iconify(void) -{ -} - -#if defined(FEAT_EVAL) || defined(PROTO) -/* - * Bring the Vim window to the foreground. - */ - void -gui_mch_set_foreground() -{ - /* TODO */ -} -#endif - -/* Draw a hollow rectangle relative to the current - * graphics cursor position, with the given width - * and height. Start position is top-left. - */ - void -draw_hollow(w, h) - int w; - int h; -{ - swi(OS_Plot, 1, w - 1, 0); - swi(OS_Plot, 1, 0, 1 - h); - swi(OS_Plot, 1, 1 - w, 0); - swi(OS_Plot, 1, 0, h - 1); -} - -/* - * Draw a cursor without focus. - */ - void -gui_mch_draw_hollow_cursor(guicolor_T colour) -{ - int x = FILL_X(gui.cursor_col); /* Window relative, top-left */ - int y = -FILL_Y(gui.cursor_row); - if (redraw_block == NULL) - { - int block[11]; - - block[0] = gui.window_handle; - block[1] = x; - block[2] = y - gui.char_height; - block[3] = x + gui.char_width; - block[4] = y; - swi(Wimp_UpdateWindow, 0, block); - while (r0) - { - swi(ColourTrans_SetGCOL, colour << 8, 0, 0, 0, 0); - - swi(OS_Plot, 4, x + block[1], y + block[4] - 1); - draw_hollow(gui.char_width, gui.char_height); - - swi(Wimp_GetRectangle, 0, block); - } - } - else - { - swi(ColourTrans_SetGCOL, colour << 8, 0, 0, 0, 0); - - swi(OS_Plot, 4, x + redraw_block[1], y + redraw_block[4] - 1); - draw_hollow(gui.char_width, gui.char_height); - } -} - -/* - * Draw part of a cursor, "w" pixels wide, and "h" pixels high, using - * color "color". - */ - void -gui_mch_draw_part_cursor(w, h, colour) - int w; - int h; - guicolor_T colour; -{ - int x = FILL_X(gui.cursor_col); - int y = -FILL_Y(gui.cursor_row); - swi(ColourTrans_ReturnGCOL, colour << 8); - plot_rectangle(96 + 5, r0, x, y - h, x + w - 1, y - 1); -} - -/* - * Catch up with any queued events. This may put keyboard input into the - * input buffer, call resize call-backs, trigger timers etc. - * If there is nothing in the event queue(& no timers pending), then we return - * immediately (well, after a Wimp_Poll). - */ - void -gui_mch_update(void) -{ - int block[64]; - int reason; - - swi(OS_ReadMonotonicTime); - if ((r0 - time_of_last_poll) < 50) - return; /* Don't return too often */ - - reason = wimp_poll(0, block); - if (reason) - process_event(reason, block); - ro_return_early = FALSE; /* We're returning anyway. */ -} - - void -redraw_window(block) - int *block; -{ - int x, y; /* Vim workarea coords */ - int width, height; - int blank_col; - - swi(ColourTrans_ReturnGCOL, UNUSED_COLOUR << 8, 0, 0, 1<<7, 0); - blank_col = r0; - - swi(Wimp_RedrawWindow, 0, block); - redraw_block = block; - while (r0) - { - x = block[7] - block[1]; - y = block[4] - block[10]; - width = block[9] - block[7]; - height = block[10] - block[8]; - - if (height + y > Rows * gui.char_height) - { - /* Blank everything off the bottom. */ - plot_rectangle(96 + 5, blank_col, - 0, block[8] - block[4], - block[9] - block[1], -FILL_Y(Rows) - 1); - height = Rows * gui.char_height; - } - if (width + x> Columns * gui.char_width) - { - /* Blank everything off to the right. */ - plot_rectangle(96 + 5, blank_col, - FILL_X(Columns), block[8] - block[4], - block[9] - block[1], 0); - width = Columns * gui.char_width; - } - gui_redraw(x , y, width, height); - swi(Wimp_GetRectangle, 0, block); - } - redraw_block = NULL; -} - -/* Check if we have modified data. - * If we do then ack the message to stop the shutdown. - * Otherwise, ignore the message. - */ - void -ro_prequit(block) - int *block; -{ - if (!ro_ok_to_quit()) - { - /* Not OK to quit - stop shutdown */ - block[3] = block[2]; - swi(Wimp_SendMessage, 19, block, block[1]); - } - /* Do nothing. We may get a Message_Quit later. */ -} - -/* If there is unsaved data then ask the user if they mind losing it. - * Return TRUE if we can quit without saving, FALSE to halt the - * shutdown. - */ - int -ro_ok_to_quit() -{ - int old_confirm = cmdmod.confirm; - - cmdmod.confirm = FALSE; /* Use our own, single tasking, box */ - - if (check_changed_any(FALSE)) - { - swi(Wimp_ReportError, - "\0\0\0\0Vim contains unsaved data - quit anyway?", - 0x17, - "Vim"); - cmdmod.confirm = old_confirm; - if (r1 != 1) - return FALSE; - } - cmdmod.confirm = old_confirm; - return TRUE; -} - -/* Quit without checking for unsaved data. */ - void -ro_quit() -{ - exiting = TRUE; - getout(0); - - exiting = FALSE; /* probably can't get here */ - setcursor(); /* position cursor */ - out_flush(); -} - -/* Insent the given vim special code into the input buffer */ - void -ro_press(a, b, modifier) - char a; - char b; - int modifier; /* % 0000 0000 */ -{ - char_u buf[6]; - int vim_mod; - int key; - - - /* Convert RISC OS modifier to Vim modifier. */ - vim_mod = ((modifier & 0x10) ? MOD_MASK_SHIFT : 0) - | ((modifier & 0x20) ? MOD_MASK_CTRL : 0); - key = simplify_key(TERMCAP2KEY(a, b), &vim_mod); - - buf[3] = CSI; - buf[4] = KEY2TERMCAP0(key); - buf[5] = KEY2TERMCAP1(key); - if (vim_mod) - { - buf[0] = CSI; - buf[1] = KS_MODIFIER; - buf[2] = vim_mod; - add_to_input_buf(buf, 6); - } - else - add_to_input_buf(buf + 3, 3); -} - -/* Take a wimp key code and insert the vim equivalent - * into vim's input buffer. - * CTRL-C also sets got_int. - */ - void -ro_insert_key(code) - char_u *code; /* Wimp_ProcessKey code (4 bytes) */ -{ - char a = code[0]; - char b = code[1]; - int base, modifier; - - if (a == 3 && ctrl_c_interrupts) - got_int = TRUE; - - /* Is it a normal key? */ - if (a > 31 && a < 127) - { - add_to_input_buf(code, 1); - return; - } - - /* We should pass any unrecognised keys on, but - * for now just pass on F12 combinations. - */ - switch (b) - { - case 0: - /* Home and Delete are the only special cases */ - switch (a) - { - case 0x1e: - ro_press('k','h', 0); /* Home */ - return; - case 0x7f: - ro_press('k','D', 0); /* Delete */ - return; - case CSI: - { - /* Turn CSI into K_CSI. Untested! */ - char_u string[3] = {CSI, KS_EXTRA, KE_CSI}; - - add_to_input_buf(string, 3); - return; - } - default: - add_to_input_buf(code, 1); - return; - } - case 1: - if ((a & 0xcf) == 0xcc) - { - /* F12 pressed - pass it on (quick hack) */ - swi(Wimp_ProcessKey, a | 0x100); - return; - } - base = a & 0xcf; - modifier = a & 0x30; - switch (base) - { - case 0x8a: /* Tab */ - add_to_input_buf("\011", 1); - return; - case 0x8b: /* Copy (End) */ - return ro_press('@', '7', modifier); - case 0x8c: /* Left */ - return ro_press('k', 'l', modifier); - case 0x8d: /* Right */ - return ro_press('k', 'r', modifier); - case 0x8e: /* Down */ - if (modifier & 0x10) - return ro_press('k', 'N', modifier ^ 0x10); - else - return ro_press('k', 'd', modifier); - case 0x8f: /* Up */ - if (modifier & 0x10) - return ro_press('k', 'P', modifier ^ 0x10); - else - return ro_press('k', 'u', modifier); - case 0xca: /* F10 */ - return ro_press('k', ';', modifier); - case 0xcb: /* F11 */ - return ro_press('F', '1', modifier); - case 0xcd: /* Insert */ - return ro_press('k', 'I', modifier); - default: - if (base > 0x80 && base < 0x18a) - { - /* One of the other function keys */ - return ro_press('k', '0' + (base & 15), modifier); - } - } - } -} - -/* Process a mouse event. */ - void -ro_mouse(block) - int *block; -{ - int x, y, button, vim_button; - int modifiers = 0; - int min_x, min_y; /* Visible area of editor window */ - int max_x, max_y; - - if (block[3] != gui.window_handle || ro_dragging) - return; /* Not our window or ignoring clicks*/ - - x = block[0]; /* Click position - screen coords */ - y = block[1]; - button = block[2]; - - block[0] = gui.window_handle; - swi(Wimp_GetWindowState, 0, block); - min_x = block[1]; - min_y = block[2]; - max_x = block[3]; - max_y = block[4]; - - if (block[3] - x < gui.scrollbar_width) - { - /* Click in that blank area under the scrollbars */ - - if (button & 0x444) - { - int front_block[10]; - /* Dragging with Select - bring window to front first */ - front_block[0] = gui.window_handle; - swi(Wimp_GetWindowState, 0, front_block); - front_block[7] = -1; - ro_open_main(front_block); - } - - block[0] = gui.window_handle; - block[1] = 7; /* Drag point */ - block[2] = block[4] = 0; /* Coords of point. */ - block[3] = block[5] = 0; - drag_x_offset = max_x - x; - drag_y_offset = min_y - y; - - /* Parent box. */ - block[6] = min_x + - gui.scrollbar_width * 2 + - MIN_COLUMNS * gui.char_width; - block[7] = 0; - gui_mch_get_screen_dimensions(&block[8], &block[9]); - block[9] = max_y - - 4 * gui.char_height - - gui.scrollbar_height; - - swi(Wimp_DragBox, 0, block); - ro_dragging = DRAG_RESIZE_WINDOW; - drag_button = vim_button; - drag_modifiers = modifiers; - return; - } - - if (button & 0x111) - vim_button = MOUSE_RIGHT; - else if (button & 0x222) - vim_button = MOUSE_MIDDLE; - else - vim_button = MOUSE_LEFT; - - swi(OS_Byte, 121, 0x80); - if (r1 == 0xff) - modifiers |= MOUSE_SHIFT; - swi(OS_Byte, 121, 0x81); - if (r1 == 0xff) - modifiers |= MOUSE_CTRL; - swi(OS_Byte, 121, 0x82); - if (r1 == 0xff) - modifiers |= MOUSE_ALT; - - if (button == 2) - { - /* Menu click: - * If shift was pressed then do the paste action. - * If not, then open the pop-up menu. - */ - modifiers ^= MOUSE_SHIFT; - if (modifiers && MOUSE_SHIFT) - { - vimmenu_T main; - /* Shift was NOT pressed - show menu */ - main.dname = (char_u *) "Vim"; - main.children = root_menu; - gui_mch_show_popupmenu(&main); - return; - } - } - - /* Gain the input focus */ - swi(Wimp_SetCaretPosition, gui.window_handle, -1, 0, 0, -1, -1); - - if (button & 0xf0) - { - /* Drag operation: - * - * Tell the Wimp to start a drag. - * Monitor null events. - */ - block[1] = 7; /* Drag a point. */ - block[2] = block[4] = x; /* Coords of point. */ - block[3] = block[5] = y; - block[6] = 0; /* Coords of bounding box. */ - block[7] = 0; - gui_mch_get_screen_dimensions(&block[8], &block[9]); - - drag_x_offset = drag_y_offset = 0; - - swi(Wimp_DragBox, 0, block); - ro_dragging = DRAG_SELECTION; - drag_button = vim_button; - drag_modifiers = modifiers; - - vim_button |= MOUSE_DRAG; - } - - gui_send_mouse_event( - vim_button, - x - min_x, - max_y - y, - button & 0xf ? TRUE : FALSE, /* dclick */ - modifiers); -} - - void -ro_continue_drag(block) - int *block; /* Just used as scrap. */ -{ - int x, y; - - /* Get screen coords of pointer. */ - swi(Wimp_GetPointerInfo, 0, block); - x = block[0] + drag_x_offset; - y = block[1] + drag_y_offset; - - block[0] = gui.window_handle; - swi(Wimp_GetWindowState, 0, block); - - if (ro_dragging == DRAG_RESIZE_WINDOW) - { - /* Resizeing the main window. */ - block[2] = y; - block[3] = x; - ro_open_main(block); - } - else - { - /* Selecting some text. */ - gui_send_mouse_event( - drag_button | MOUSE_DRAG, /* Always report the same button */ - x - block[1], - block[4] - y, - FALSE, /* Not a double click. */ - drag_modifiers); - } -} - -/* User has released all mouse buttons, marking the end of a drag. */ - void -ro_drag_finished(block) - int *block; -{ - int x; - int y; - int width, height; - - /* I don't trust the box returned by Wimp_Poll; look at the pointer - * ourselves. - */ - swi(Wimp_GetPointerInfo, 0, block); - x = block[0] + drag_x_offset; - y = block[1] + drag_y_offset; - - if (ro_dragging == DRAG_RESIZE_WINDOW) - { - block[0] = gui.window_handle; - swi(Wimp_GetWindowState, 0, block); - block[2] = y; - block[3] = x; - ro_open_main(block); - - width = (block[3] - block[1]); - height = (block[4] - block[2]); - - swi(Wimp_ForceRedraw, gui.window_handle, 0, -height, width, 0); - gui_resize_shell(width, height); - } - else - { - block[0] = gui.window_handle; - swi(Wimp_GetWindowState, 0, block); - gui_send_mouse_event( - MOUSE_RELEASE, - x - block[1], - block[4] - y, - FALSE, /* not a double click */ - drag_modifiers); - } - ro_dragging = DRAG_FALSE; -} - -/* Load the file/pathname given in block into a [new] buffer. - * - * Modifier Action - * - * None :confirm e - * Ctrl :sp - * Shift - * - * Insert into typebuf, at the start. - * If loading from !Scrap then use saved leafname instead, and - * delete the scrap file. Also, ignore shift key. - * - * NB: Doesn't send DataLoadAck (other app might delete temp file?). - */ - void -ro_dataload(block) - int *block; -{ - char_u new_path[MAXPATHL]; - char_u *path = ((char_u *) block) + 44; - int scrap = FALSE; - - if (block[3] == leaf_ref && leaf_name) - scrap = TRUE; - - switch (get_real_state() & 0xff) - { - case INSERT: - case CMDLINE: - case CMDLINE+LANGMAP: - /* For insert mode we can only insert the pathname (currently) - * Make sure Shift is pressed. - */ - swi(OS_Byte, 121, 0x80); /* Is Shift pressed? */ - if (r1 == 0xff) - { - ins_typebuf(" ", REMAP_NONE, 0, TRUE, FALSE); - ins_typebuf(path, REMAP_NONE, 0, TRUE, FALSE); - ro_return_early = TRUE; /* Return even though nothing was typed. */ - } - else - swi(Wimp_ReportError, - "\0\0\0\0Sorry, you can only load text in normal mode", 5, "Vim"); - break; - - case NORMAL: - ro_return_early = TRUE; /* Return even though nothing was typed. */ - - if (scrap) /* Remove . Later. */ - ins_typebuf(":!~remove \r", REMAP_NONE, 0, TRUE, FALSE); - - /* Insert {:sp ,:confirm e }[+f\ ] */ - ins_typebuf("\r", REMAP_NONE, 0, TRUE, FALSE); - ins_typebuf(path, REMAP_NONE, 0, TRUE, FALSE); - ins_typebuf(" ", REMAP_NONE, 0, TRUE, FALSE); - - if (scrap) - { - /* Loading via !Scrap - change pathname to stored leafname */ - ins_typebuf(leaf_name, REMAP_NONE, 0, TRUE, FALSE); - ins_typebuf(" +f\\ ", REMAP_NONE, 0, TRUE, FALSE); - leaf_ref = 0; - vim_free(leaf_name); - leaf_name = NULL; - } - - swi(OS_Byte, 121, 0x81); /* Is Ctrl pressed? */ - if (r1 == 0xff) - /* Yes, split window */ - ins_typebuf(":sp", REMAP_NONE, 0, TRUE, FALSE); - else - ins_typebuf(":confirm e", REMAP_NONE, 0, TRUE, FALSE); - break; - - default: - swi(Wimp_ReportError, "\0\0\0\0You can only load text in normal mode.", 5, "Vim"); - } - /* Send DataSaveAck so other program doesn't think we died - * and delete . - */ - block[3] = block[2]; - block[4] = 4; - swi(Wimp_SendMessage, 17, block, block[1]); -} - - void -ro_datasave(block) - int *block; -{ - char_u *path = ((char_u *) block) + 44; - - /* Preserve the name given so we can use it, not */ - if (leaf_name) - vim_free(leaf_name); - leaf_name = vim_strsave(path); - - block[9] = -1; /* File is unsafe. */ - strcpy(path, ""); - block[0] = 60; - block[3] = block[2]; - block[4] = 2; - swi(Wimp_SendMessage, 17, block, block[1]); - - leaf_ref = block[2]; -} - - void -ro_message(block) - int *block; -{ - char_u *buffer; - long_u len; - - if (block[1] == task_handle) - return; /* Don't talk to ourself! */ - switch (block[4]) - { - case 0: /* Quit. */ - if (block[4] == 0) - ro_quit(); - break; - case 1: /* DataSave */ - ro_datasave(block); - break; - case 2: /* DataSaveAck. */ - if (clip_convert_selection(&buffer, &len, &clip_star) == -1) - return; - - /* Save the clipboard contents to a file. */ - swi(OS_File, 10, ((char_u *) block) + 44, 0xfff, 0, buffer, buffer + len); - - /* Ack with DataLoad message. */ - block[3] = block[2]; - block[4] = 3; - block[9] = len; - swi(Wimp_SendMessage, 17, block, block[1]); - - vim_free(buffer); - break; - case 3: /* DataLoad */ - ro_dataload(block); - break; - case 8: /* PreQuit */ - ro_prequit(block); - break; - case 0xf: /* Lose clipboard. */ - if (block[5] & 4) - { - clip_free_selection(&clip_star); - clip_star.owned = FALSE; - } - break; - case 0x10: /* DataRequest (clip_star) */ - if (clip_star.owned) - { - int rows; - - /* Tell other program that we have the clipboard. */ - block[0] = 52; - block[3] = block[2]; /* Copy myref to yourref. */ - block[4] = 1; /* DataSave message. */ - /* Create an estimate for the size (larger or same as true - * value) */ - rows = clip_star.end.lnum - clip_star.start.lnum; - if (rows < 0) - rows = -rows; - block[9] = (rows + 1) * Columns + 1; /* Add one for possible - final newline. */ - block[10] = 0xfff; /* Clipboard is text. */ - strcpy( ((char_u *) block) + 44, "VimClip"); - swi(Wimp_SendMessage, 17, block, block[1]); - } - break; - case 0x400c1: /* Mode change */ - changed_mode = TRUE; /* Flag - update on next OpenWindow */ - if (zap_redraw) - { - /* JK230798, re-initialise ZapRedraw stuff */ - if (ro_zap_redraw_initialise() == FAIL) - zap_redraw = FALSE; - } - break; - case 0x400c3: /* TaskCloseDown */ - if (block[1] == child_handle) - child_handle = 0; - break; - } -} - -/* - * Converts a scrollbar's window handle into a scrollbar pointer. - * NULL on failure. - */ - scrollbar_T * -ro_find_sbar(id) - int id; -{ - win_T *wp; - - if (gui.bottom_sbar.id == id) - return &gui.bottom_sbar; - FOR_ALL_WINDOWS(wp) - { - if (wp->w_scrollbars[SBAR_LEFT].id == id) - return &wp->w_scrollbars[SBAR_LEFT]; - if (wp->w_scrollbars[SBAR_RIGHT].id == id) - return &wp->w_scrollbars[SBAR_RIGHT]; - } - return NULL; -} - - void -scroll_to(line, sb) - int sb; /* Scrollbar number */ - int line; -{ - char_u code[8]; - - /* Don't put events in the input queue now. */ - if (hold_gui_events) - return; - - /* Send a scroll event: - * - * A scrollbar event is CSI (NOT K_SPECIAL), KS_VER_SCROLLBAR, - * KE_FILLER followed by: - * one byte representing the scrollbar number, and then four bytes - * representing a long_u which is the new value of the scrollbar. - */ - code[0] = CSI; - code[1] = KS_VER_SCROLLBAR; - code[2] = KE_FILLER; - code[3] = sb; - code[4] = line >> 24; - code[5] = line >> 16; - code[6] = line >> 8; - code[7] = line; - add_to_input_buf(code, 8); -} - - void -h_scroll_to(col) - int col; -{ - char_u code[8]; - - /* Don't put events in the input queue now. */ - if (hold_gui_events) - return; - - /* Send a scroll event: - * - * A scrollbar event is CSI (NOT K_SPECIAL) - * - * A horizontal scrollbar event is K_SPECIAL, KS_HOR_SCROLLBAR, - * KE_FILLER followed by four bytes representing a long_u which is the - * new value of the scrollbar. - */ - code[0] = CSI; - code[1] = KS_HOR_SCROLLBAR; - code[2] = KE_FILLER; - code[4] = col >> 24; - code[5] = col >> 16; - code[6] = col >> 8; - code[7] = col; - add_to_input_buf(code, 8); -} - - void -ro_scroll(block) - int *block; -{ - scrollbar_T *sb; - int offset; - win_T *wp; - - /* Block is ready for Wimp_OpenWindow, and also contains: - * - * +32 = scroll X direction (-2 .. +2) - * +36 = scroll Y direction (-2 .. +2) - */ - - sb = ro_find_sbar(block[0]); - if (!sb) - return; /* Window not found (error). */ - - wp = sb-> wp; - - if (wp == NULL) - { - /* Horizontal bar. */ - offset = block[8]; - if (offset == -2) - offset = (block[1] - block[3]) / gui.char_width; - else if (offset == 2) - offset = (block[3] - block[1]) / gui.char_width; - - block[5] += offset * gui.char_width; - - gui_drag_scrollbar(sb, block[5] / gui.char_width, FALSE); - - swi(Wimp_OpenWindow, 0, block); - } - else - { - offset = -block[9]; - if (offset == -2) - offset = -(wp -> w_height - 1); - else if (offset == 2) - offset = wp -> w_height - 1; - - /* Possibly we should reposition the scrollbar? - * Vim seems to update the bar anyway... - */ - gui_drag_scrollbar(sb, offset - (block[6] / gui.char_height), FALSE); - } -} - -/* Move a window by a given offset. Used to simulate the function of the - * nested wimp. - */ - void -ro_move_child(window, x, y, pos_wanted, pos_got) - int window; - int x,y; /* offset to move by */ - int pos_wanted, pos_got; -{ - int block[10]; - - block[0] = window; - swi(Wimp_GetWindowState, 0, block); - block[1] += x; - block[2] += y; - block[3] += x; - block[4] += y; - if (pos_wanted == -1) - block[7] = -1; - else if (pos_wanted == -2) - block[7] = pos_got; - swi(Wimp_OpenWindow, 0, block); -} - -/* Open the main window. Also updates scrollbars if we are not - * using the nested Wimp. - * If we have just changed mode then re-read all values. - */ - void -ro_open_main(block) - int *block; -{ - int toggle_size; - - /* Find out if the user clicked on the toggle size icon. */ - block[20] = block[0]; - swi(Wimp_GetWindowState, 0, block + 20); - toggle_size = block[28] & (1 << 19); - - if (nested_wimp) - { - swi(Wimp_OpenWindow, 0, block); - } - else - { - int old[10]; - int x_offset, y_offset; /* Move children same as parent. */ - int pos_wanted, pos_got; - int left_bar = gui.which_scrollbars[SBAR_LEFT]; - int right_bar = gui.which_scrollbars[SBAR_RIGHT]; - win_T *wp; - - /* Three cases to think about: - * 1) Move to top. Open each window at the top. - * 2) Same stack position. Open each with same position. - * 3) Open at bottom. Open children with parent's new position. - */ - - old[0] = block[0]; - swi(Wimp_GetWindowState, 0, old); - pos_wanted = block[7]; - swi(Wimp_OpenWindow, 0, block); - /* Block updated by OpenWindow? I don't think so! */ - swi(Wimp_GetWindowState, 0, block); - pos_got = block[7]; - - x_offset = block[1] - old[1]; - y_offset = block[4] - old[4]; - if (x_offset || y_offset || pos_wanted == -1 || pos_wanted == -2) - { - /* If parent has moved, re-open all the child windows. */ - FOR_ALL_WINDOWS(wp) - { - /* Reopen scrollbars for this window. */ - if (left_bar) - ro_move_child(wp -> w_scrollbars[SBAR_LEFT].id, - x_offset, y_offset, - pos_wanted, pos_got); - if (right_bar) - ro_move_child(wp -> w_scrollbars[SBAR_RIGHT].id, - x_offset, y_offset, - pos_wanted, pos_got); - } - } - } - if (changed_mode || toggle_size) - { - int width, height; - - if (changed_mode) - ro_measure_tools(); - block[0] = gui.window_handle; - swi(Wimp_GetWindowState, 0, block); - - width = block[3] - block[1]; - height = block[4] - block[2]; - swi(Wimp_ForceRedraw, gui.window_handle, 0, -height, width, 0); - gui_resize_shell(width, height); - changed_mode = FALSE; - } -} - - void -ro_open_window(block) - int *block; -{ - int pos; - scrollbar_T *sb; - - if (block[0] == gui.window_handle) - ro_open_main(block); - else - { - swi(Wimp_OpenWindow, 0, block); - if (block[0] != gui.window_handle) - { - sb = ro_find_sbar(block[0]); - if (sb) - { - if (sb-> wp != NULL) - gui_drag_scrollbar(sb, -block[6] / gui.char_height, FALSE); - else - gui_drag_scrollbar(sb, block[5] / gui.char_width, FALSE); - } - } - } -} - - void -ro_menu_selection(block) - int *block; -{ - int *item = wimp_menu + 7; - vimmenu_T *menu; - /* wimp_menu points to a wimp menu structure */ - - for (;;) - { - while (block[0]--) - item += 6; - if (block[1] == -1) - break; - item = ((int *) item[1]) + 7; - block++; - } - /* item points to the wimp menu item structure chosen */ - menu = (vimmenu_T *) item[5]; - - swi(Wimp_GetPointerInfo, 0, block); - if (block[2] == 1) - /* Adjust used - keep menu open */ - swi(Wimp_CreateMenu, 0, wimp_menu); - - if (menu-> cb) - menu-> cb(menu); -} - - void -ro_open_parent() -{ - int head; - char_u *i = curbuf-> b_ffname; - char_u buffer[256]; - - head = 0; - for (; *i; i++) - { - if (*i == '.') - head = i - curbuf-> b_ffname; - } - - /* Append head chars to buffer */ - if (head < 240 && curbuf-> b_ffname && head) - { - strcpy(buffer, "%filer_opendir "); - strncpy(buffer + 15, curbuf-> b_ffname, head); - buffer[15 + head] = '\0'; - swi(OS_CLI, buffer); - } -} - - void -process_event(event, block) - int event; - int *block; -{ - switch (event) - { - case 0: /* Nothing - update drag state. */ - if (ro_dragging) - ro_continue_drag(block); - break; - case 1: /* Redraw window. */ - redraw_window(block); - break; - case 2: /* Open window. */ - ro_open_window(block); - break; - case 3: /* Close window. */ - swi(Wimp_GetPointerInfo, 0, block + 1); - if (block[3] == 1) - ro_open_parent(); - else - if (ro_ok_to_quit()) - ro_quit(); - break; - case 6: /* Mouse click. */ - ro_mouse(block); - break; - case 7: /* Finished drag. */ - ro_drag_finished(block); - break; - case 8: /* Key pressed. */ - ro_insert_key((char_u *) &block[6]); - break; - case 9: - ro_menu_selection(block); - break; - case 10: /* Scroll request. */ - ro_scroll(block); - break; - case 11: /* Lose caret. */ - if (block[0] == gui.window_handle) - gui_focus_change(FALSE); - break; - case 12: /* Gain caret. */ - if (block[0] == gui.window_handle) - gui_focus_change(TRUE); - break; - case 17: /* User message. */ - case 18: /* User message recorded. */ - ro_message(block); - break; - } -} - -/* - * GUI input routine called by gui_wait_for_chars(). Waits for a character - * from the keyboard. - * wtime == -1 Wait forever. - * wtime == 0 This should never happen. - * wtime > 0 Wait wtime milliseconds for a character. - * Returns OK if a character was found to be available within the given time, - * or FAIL otherwise. - */ - int -gui_mch_wait_for_chars(long wtime) -{ - int block[64]; - int reason; - int start_time = -1; - int ctime = wtime / 10; /* delay in cs */ - - if (wtime != -1) - { - swi(OS_ReadMonotonicTime); - start_time = r0; - } - - for (;;) - { - if (ro_dragging) - reason = wimp_poll(0, block); /* Always return immediately */ - else if (wtime == -1) - reason = wimp_poll(1, block); - else - reason = wimp_pollidle(0, block, start_time + ctime); - - process_event(reason, block); - - if (input_available() || ro_return_early) - { - ro_return_early = FALSE; - return OK; /* There is something to process (key / menu event) */ - } - - if (wtime != -1) - { - swi(OS_ReadMonotonicTime); - if (r0 - start_time > ctime) - return FAIL; /* We've been waiting too long - return failure */ - } - } -} - -/* Flush any output to the screen */ - void -gui_mch_flush(void) -{ -} - -/* - * Clear a rectangular region of the screen from text pos(row1, col1) to - * (row2, col2) inclusive. - */ - void -gui_mch_clear_block(int row1, int col1, int row2, int col2) -{ - swi(ColourTrans_ReturnGCOL, gui.back_pixel << 8, 0, 0, 1<<7, 0); - plot_rectangle(96 + 5, r0, - FILL_X(col1), -FILL_Y(row2 + 1), - FILL_X(col2 + 1), -FILL_Y(row1)); -} - - void -gui_mch_clear_all(void) -{ - if (redraw_block) - { - swi(ColourTrans_SetGCOL, gui.back_pixel << 8, 0, 0, 1<<7, 0); - swi(OS_WriteI + 16); - } - else - { - int block[44]; - block[0] = gui.window_handle; - block[1] = 0; - block[2] = -gui.num_rows * gui.char_height; - block[3] = gui.num_cols * gui.char_width; - block[4] = 0; - swi(Wimp_UpdateWindow, 0, block); - while (r0) - { - swi(ColourTrans_SetGCOL, gui.back_pixel << 8, 0, 0, 1<<7, 0); - swi(OS_WriteI + 16); - swi(Wimp_GetRectangle, 0, block); - } - } -} - -/* - * Delete the given number of lines from the given row, scrolling up any - * text further down within the scroll region. - */ - void -gui_mch_delete_lines(int row, int num_lines) -{ - int top_from = -row - num_lines; - int bot_from = -gui.scroll_region_bot - 1; - int bot_to = bot_from + num_lines; - - swi(ColourTrans_SetGCOL, gui.back_pixel << 8, 0, 0, 0x80, 0); - - /* Changed without checking! */ - swi(Wimp_BlockCopy, gui.window_handle, - gui.scroll_region_left * gui.char_width, - bot_from * gui.char_height, - (gui.scroll_region_right - gui.scroll_region_left - + 1) * gui.char_width, - top_from * gui.char_height, - - gui.scroll_region_left * gui.char_width, - bot_to * gui.char_height); - - gui_clear_block(gui.scroll_region_bot - num_lines + 1, - gui.scroll_region_left, - gui.scroll_region_bot, gui.scroll_region_right); -} - -/* - * Insert the given number of lines before the given row, scrolling down any - * following text within the scroll region. - */ - void -gui_mch_insert_lines(int row, int num_lines) -{ - int top_from = -row; - int bot_to = -gui.scroll_region_bot - 1; - int bot_from = bot_to + num_lines; - - swi(ColourTrans_SetGCOL, gui.back_pixel << 8, 0, 0, 0x80, 0); - - swi(Wimp_BlockCopy, gui.window_handle, - gui.scroll_region_left * gui.char_width, - bot_from * gui.char_height, - (gui.scroll_region_right - gui.scroll_region_left - + 1) * gui.char_width, - top_from * gui.char_height, - - gui.scroll_region_left * gui.char_width, - bot_to * gui.char_height); - - gui_clear_block(row, gui.scroll_region_left, - row + num_lines - 1, gui.scroll_region_right); -} - -/* Put selection in clipboard buffer. - * Should we become the new owner? - */ - void -clip_mch_request_selection(VimClipboard *cbd) -{ - int block[64]; /* Will be used in Wimp_Poll. */ - int reason; - char_u *buffer; - long_u length; - - block[0] = 48; /* Size of block. */ - block[3] = 0; /* Orinial message. */ - block[4] = 0x10; /* Data request. */ - block[5] = gui.window_handle; - block[6] = RO_LOAD_CLIPBOARD; /* Internal handle. */ - block[7] = block[8] = 0; /* (x,y) not used. */ - block[9] = 4; - block[10] = 0xfff; /* We want text files if possible, I think. */ - block[11] = -1; /* End of list. */ - swi(Wimp_SendMessage, 17, block, 0); /* Broadcast request. */ - - /* OK, we've sent the request. Poll until we get a null poll (failure) or - * we load the clipboard. - * If we receive a DataSave event with icon handle = -2 then put it on the - * clipboard. RISC OS should ensure that key events will not be delivered - * until the clipboard operation completes (unless the owner starts idling - * - we can't wait forever!). - */ - for (;;) - { - reason = wimp_poll(0, block); - if (reason == 0) - return; /* Failed to get clipboard. */ - if ((reason == 17 || reason == 18) && - block[4] == 1 && block[6] == RO_LOAD_CLIPBOARD) - break; /* Got it - stop waiting. */ - process_event(reason, block); - if (ro_return_early) - return; - } - /* Tell owner to save data in . */ - block[0] = 60; - block[3] = block[2]; /* Copy myref -> yourref */ - block[4] = 2; /* DataSaveAck. */ - block[9] = -1; /* Data is unsafe. */ - strcpy( ((char_u *) block) + 44, ""); - swi(Wimp_SendMessage, 17, block, block[1]); - - /* Wait again for reply. */ - for (;;) - { - reason = wimp_poll(0, block); - if (reason == 0) - return; /* Other program has given up! */ - if ((reason == 17 || reason == 18) && block[4] == 3 && block[6] == RO_LOAD_CLIPBOARD) - break; /* Clipboard data saved to */ - process_event(reason, block); - if (ro_return_early) - return; - } - - /* contains clipboard - load it. */ - if (xswi(OS_File, 17, "") & v_flag) - return; /* Error! */ - if (r0 != 1 && r0 != 3) - return; - length = r4; - - buffer = lalloc(length, TRUE); /* Claim memory (and report errors). */ - if (buffer == NULL) - return; - - if (xswi(OS_File, 16, "", buffer, 0) & v_flag) - return; - - clip_yank_selection(MCHAR, buffer, length, cbd); - - vim_free(buffer); - - swi(OS_FSControl, 27, "", 0, 0); /* Delete temp file. */ - - block[4] = 4; /* Send DataLoadAck. */ - block[3] = block[2]; /* Copy myref -> yourref. */ - swi(Wimp_SendMessage, 17, block, block[1]); -} - -/* Not sure what this means under RISC OS. */ - void -clip_mch_lose_selection(VimClipboard *cbd) -{ -} - -/* Tell everyone that we now own the clipboard. - * Return OK if our claim is accepted (always, under RISC OS) - */ - int -clip_mch_own_selection(VimClipboard *cbd) -{ - int block[6]; - block[0] = 24; /* Length of block. */ - block[3] = 0; /* Original message. */ - block[4] = 0xf; /* ClaimEntity. */ - block[5] = 0x4; /* Claim clipboard only. */ - swi(Wimp_SendMessage, 17, block, 0); - return OK; -} - -/* - * Send the current selection to the clipboard. Do nothing for X because we - * will fill in the selection only when requested by another app. Sounds good - * for RISC OS too. - */ - void -clip_mch_set_selection(VimClipboard *cbd) -{ - clip_get_selection(cbd); -} - -/* - * Make a menu either grey or not grey. - */ - void -gui_mch_menu_grey(vimmenu_T *menu, int grey) -{ - menu-> greyed_out = grey; -} - -/* - * Make menu item hidden or not hidden - */ - void -gui_mch_menu_hidden(vimmenu_T *menu, int hidden) -{ - menu-> hidden = hidden; -} - -/* - * This is called after setting all the menus to grey/hidden or not. - */ - void -gui_mch_draw_menubar(void) -{ - swi(Wimp_CreateMenu, 0, -1); - if (wimp_menu != (int *) -1) - { - ro_remove_menu(wimp_menu); - wimp_menu = (int *) -1; - } -} - -/* Add or remove a scrollbar. Note that this is only called when - * the scrollbar state is changing. - * The scroll bar window has already been created. - * We can't do anything except remove the scroll bar - * until we know what size to use. - */ - void -gui_mch_enable_scrollbar(sb, flag) - scrollbar_T *sb; - int flag; -{ - if (!flag) - swi(Wimp_CloseWindow, 0, & (sb->id) ); - return; -} - - void -gui_mch_set_blinking(long waittime, long on, long off) -{ -} - -/* - * Stop the cursor blinking. Show the cursor if it wasn't shown. - */ - void -gui_mch_stop_blink(void) -{ -} - -/* - * Start the cursor blinking. If it was already blinking, this restarts the - * waiting time and shows the cursor. - */ - void -gui_mch_start_blink(void) -{ -} - -/* - * Return the RGB value of a pixel as a long. - */ - long_u -gui_mch_get_rgb(guicolor_T pixel) -{ - return (long_u)pixel; -} - - void -gui_mch_set_text_area_pos(int x, int y, int w, int h) -{ -} - - void -gui_mch_enable_menu(int flag) -{ -} - - void -gui_mch_set_menu_pos(int x, int y, int w, int h) -{ -} - - void -gui_mch_add_menu(vimmenu_T *menu, int idx) -{ -} - - void -gui_mch_add_menu_item(vimmenu_T *menu, int idx) -{ -} - - void -gui_mch_new_menu_colors(void) -{ -} - - void -gui_mch_destroy_menu(vimmenu_T *menu) -{ -} - -/* Size of buffer has changed. - * Add one to max since gui.c subtracts one more than it should! - */ - void -gui_mch_set_scrollbar_thumb(sb, val, size, max) - scrollbar_T *sb; - long val; - long size; - long max; -{ - int block[10], width, height; - - width = (max + 1) * gui.char_width; - height = (max + 1 + W_STATUS_HEIGHT(sb->wp)) * gui.char_height; - - block[0] = block[3] = 0; - block[1] = -height + (1 << y_eigen_factor); - block[2] = width; - - swi(Wimp_SetExtent, sb -> id, block); - - block[0] = sb -> id; - swi(Wimp_GetWindowState, 0, block); - block[5] = val * gui.char_width; - block[6] = -val * gui.char_height; - swi(Wimp_OpenWindow, 0, block, 0x4b534154, - gui.window_handle, /* Parent window handle. */ - (CHILD_FIX_TO_RIGHT << CHILD_LEFT ) | - (CHILD_FIX_TO_RIGHT << CHILD_RIGHT ) | - (CHILD_FIX_TO_BOTTOM << CHILD_TOP ) | - (CHILD_FIX_TO_BOTTOM << CHILD_BOTTOM) | - (CHILD_SELF_SCROLL << CHILD_SCROLL_X) | - (CHILD_SELF_SCROLL << CHILD_SCROLL_Y) - ); -} - -/* Set the position of the scrollbar within the editor - * window. Note that, for vertical scrollbars, x and w - * are ignored. For horizontal bars y and h are ignored. - */ - void -gui_mch_set_scrollbar_pos(sb, x, y, w, h) - scrollbar_T *sb; - int x; /* Horizontal sb position */ - int y; /* Top of scroll bar */ - int w; /* Width */ - int h; /* Height */ -{ - int block[24]; - int px1, py1; /* Parent window min coords */ - int px2, py2; /* Parent window max coords */ - - /* Find where the parent window is. */ - block[0] = gui.window_handle; - swi(Wimp_GetWindowState, 0, block); - px1 = block[1]; - py1 = block[2]; - px2 = block[3]; - py2 = block[4]; - - block[0] = sb -> id; - - /* Find out how big the scroll window is at the moment. */ - swi(Wimp_GetWindowInfo, 0, ((char_u *)block) + 1); - - if (block[13] < w || block[12] > -h) - { - /* Current window is too small! */ - if (block[12] > -h) - block[12] = -h; - if (block[13] < w) - block[13] = w; - swi(Wimp_SetExtent, block[0], block + 11); - } - - /* This works better on the nested_wimp. */ - if (sb-> wp) - { - /* This is a vertical scrollbar. */ - block[1] = block[3] = px2 - gui.scrollbar_width + (1 << x_eigen_factor); - block[2] = 1 + py2 - (y + h) + (1 << y_eigen_factor); - block[4] = 1 + py2 - y; - } - else - { - /* This is a horizontal scrollbar. */ - block[2] = block[4] = py1 + gui.scrollbar_height; - block[1] = px1; - block[3] = px2 - gui.scrollbar_width; - } - - block[5] = 0; - block[6] = 0; - block[7] = -1; - - swi(Wimp_OpenWindow, 0, block, 0x4b534154, - gui.window_handle, /* Parent window handle. */ - (CHILD_FIX_TO_RIGHT << CHILD_LEFT ) | - (CHILD_FIX_TO_RIGHT << CHILD_RIGHT ) | - (CHILD_FIX_TO_BOTTOM << CHILD_TOP ) | - (CHILD_FIX_TO_BOTTOM << CHILD_BOTTOM) | - (CHILD_SELF_SCROLL << CHILD_SCROLL_X) | - (CHILD_SELF_SCROLL << CHILD_SCROLL_Y) - ); -} - -/* Create a window with no workarea to place inside editor window. - * (what happens without the nested wimp?) - * Data for scrollbar is invalid. - */ - void -gui_mch_create_scrollbar(sb, orient) - scrollbar_T *sb; - int orient; /* orient is SBAR_HORIZ or SBAR_VERT */ -{ - int bar[] = - { - 0, 0, /* Visible area : min X,Y */ - 100, 100, /* max X,Y */ - 0, 0, /* Scroll offsets */ - -1, /* Window in front */ - 0x80800150 | (orient == SBAR_HORIZ ? (1 << 30) : (1 << 28)), - 0xff070207, /* Colours */ - 0x000c0103, /* More colours */ - 0, -0x4000, /* Workarea extent */ - 0x4000, 0, /* max X,Y */ - 0x00000000, /* No title */ - 0 << 12, /* No workarea button type */ - 1, /* Wimp sprite area */ - 0x00010001, /* Minimum width, height */ - 0, 0, 0, /* Title data (none) */ - 0 /* No icons */ - }; - swi(Wimp_CreateWindow, 0, bar); - sb -> id = r0; -} - -#if defined(FEAT_WINDOWS) || defined(PROTO) - void -gui_mch_destroy_scrollbar(scrollbar_T *sb) -{ - swi(Wimp_DeleteWindow, 0, & (sb->id)); - sb -> id = -1; -} -#endif - - void -gui_mch_set_scrollbar_colors(scrollbar_T *sb) -{ - /* Always use default RO colour scheme. */ -} - -/* - * Get current mouse coordinates in text window. - * Note: (0,0) is the bottom left corner, positive y is UP. - */ - void -gui_mch_getmouse(x, y) - int *x; - int *y; -{ - int left; - int top; - int block[10]; - - block[0] = gui.window_handle; - swi(Wimp_GetWindowState, 0, block); - left = block[1]; - top = block[4]; - - swi(Wimp_GetPointerInfo, 0, block); - *x = block[0] - left; - *y = top - block[1]; -} - -/* MouseTo(x, y) */ - void -gui_mch_setmouse(x, y) - int x; - int y; -{ -} - - void -gui_mch_toggle_tearoffs(enable) - int enable; -{ - /* no tearoff menus */ -} - -/* Redraw a window's title. - * For the nested wimp we use the new 'redraw-title-bar' reason code. - * For older wimps we mark the area of the screen where the title bar - * is as invalid. - */ - void -ro_redraw_title(window) - int window; -{ - if (nested_wimp) - { - swi(Wimp_ForceRedraw, window, 0x4b534154, 3); - } - else - { - int block[10]; - int miny; - - block[0] = window; - swi(Wimp_GetWindowState, 0, block); - miny = block[4]; - swi(Wimp_GetWindowOutline, 0, block); - swi(Wimp_ForceRedraw, -1, - block[1], miny, - block[3], block[4]); - } -} - -/* Turn a vimmenu_T structure into a wimp menu structure. - * -1 if resulting menu is empty. - * Only the children and dname items in the root menu are used. - */ - int * -ro_build_menu(menu) - vimmenu_T *menu; -{ - int *wimp_menu; - int width = 4; - int w; - int size = 28; - vimmenu_T *item; - int *wimp_item; - - /* Find out how big the menu is so we can allocate memory for it */ - for (item = menu-> children; item; item = item-> next) - { - if (item-> hidden == FALSE && !menu_is_separator(item->name)) - size += 24; - } - - if (size <= 28) - return (int *) -1; /* No children - shouldn't happen */ - - wimp_menu = (int *) alloc(size); - - wimp_menu[0] = (int) menu-> dname; - wimp_menu[1] = -1; - wimp_menu[2] = 0; - wimp_menu[3] = 0x00070207; - wimp_menu[5] = 44; - wimp_menu[6] = 0; - - wimp_item = wimp_menu + 7; - - for (item = menu-> children; item; item = item-> next) - { - if (menu_is_separator(item-> name)) - { - /* This menu entry is actually a separator. If it is not the first - * menu entry then mark the previous menu item as needing a dotted - * line after it. - */ - if (wimp_item > wimp_menu + 7) - wimp_item[-6] |= 0x2; - } - else if (item-> hidden == FALSE) - { - wimp_item[0] = 0; - wimp_item[1] = item-> children ? (int) ro_build_menu(item) : -1; - wimp_item[2] = 0x07009131 | (item-> greyed_out << 22); - wimp_item[3] = (int) item-> dname; - wimp_item[4] = -1; - wimp_item[5] = (int) item; /* Stuff the menu address in this unused space */ - - w = strlen(item-> dname) + 1; - if (w > width) - width = w; - wimp_item += 6; - } - } - - wimp_menu[4] = (width + 2) * 16; - wimp_menu[7] |= 0x100; /* Menu title is indirected */ - wimp_item[-6] |= 0x080; /* Last entry in menu */ - return wimp_menu; -} - - static void -ro_remove_menu(menu) - int *menu; -{ - int *item = menu + 7; - - if (menu == NULL || menu == (int *) -1) - return; - - for (;;) - { - if (item[1] != -1) - ro_remove_menu((int *) item[1]); /* Remove sub-menu */ - if (item[0] & 0x80) - break; /* This was the last entry */ - item += 6; - } - vim_free(menu); -} - - void -gui_mch_show_popupmenu(menu) - vimmenu_T *menu; -{ - int block[10]; - - /* Remove the existing menu, if any */ - if (wimp_menu != (int *) -1) - { - swi(Wimp_CreateMenu, 0, -1); - ro_remove_menu(wimp_menu); - wimp_menu = (int *) -1; - } - - wimp_menu = ro_build_menu(menu); - if (wimp_menu != (int *) -1) - { - swi(Wimp_GetPointerInfo, 0, block); - swi(Wimp_CreateMenu, 0, wimp_menu, block[0] - 64, block[1] + 64); - } -} - -/* Run a command using the TaskWindow module. - * If SHELL_FILTER is set then output is not echoed to the screen, - * If it is not set, then \r is not sent to the output file. - */ - int -gui_mch_call_shell(cmd, options) - char_u *cmd; - int options; /* SHELL_FILTER if called by do_filter() */ - /* SHELL_COOKED if term needs cooked mode */ -{ - char_u task_cmd[256]; /* Contains *TaskWindow command. */ - int block[64]; - int reason; - char_u *out; - char_u c; - int old_msg_col; - char_u *out_redir; - int length; - FILE *out_file = NULL; - - out_redir = strstr(cmd, " > "); - if (out_redir == NULL) - length = strlen(cmd); /* No redirection. */ - else - { - length = out_redir - cmd; - out_file = fopen(out_redir + 3, "wb"); - if (out_file == NULL) - smsg("WARNING : Can't open file %s for writing\n", out_redir + 3); - } - - if (length > 180) - { - if (out_file) - fclose(out_file); - return FAIL; /* Command too long. */ - } - - strcpy(task_cmd, "TaskWindow \""); - strncpy(task_cmd + 12, cmd, length); - sprintf(task_cmd + 12 + length, - "\" -task &%08x -ctrl -quit -name \"Vim command\"", - task_handle); - - if (options & SHELL_COOKED) - settmode(TMODE_COOK); - - if (xswi(Wimp_StartTask, task_cmd) & v_flag) - { - /* Failed to even start a new task (out of memory?) */ - settmode(TMODE_RAW); - if (out_file) - fclose(out_file); - return FAIL; - } - - /* Wait for the child process to initialise. */ - child_handle = 0; - while (!child_handle) - { - reason = wimp_poll(0, block); - if ((reason == 17 || reason == 18) && block[4] == 0x808c2) - child_handle = block[1]; - else - process_event(reason, block); - } - - /* Block until finished */ - while (child_handle) - { - reason = wimp_poll(1, block); - if (reason == 3 || (reason == 8 && block[6] == 3)) - { - /* Close window request or CTRL-C - kill child task. */ - block[0] = 20; - block[3] = 0; - block[4] = 0x808c4; /* Morite */ - swi(Wimp_SendMessage, 17, block, child_handle); - MSG_PUTS(_("\nSending message to terminate child process.\n")); - continue; - } - else if (reason == 8) - { - block[0] = 28; - block[3] = 0; - block[4] = 0x808c0; /* Input */ - block[5] = 1; - /* Block[6] is OK as it is! */ - swi(Wimp_SendMessage, 17, block, child_handle); - continue; - } - else if (reason == 17 || reason == 18) - { - if (block[4] == 0x808c1) - { - /* Ack message. */ - block[3] = block[2]; - swi(Wimp_SendMessage, 19, block, block[1]); - out = (char_u *)block + 24; - old_msg_col = msg_col; - while (block[5]--) - { - c = *out++; - if (out_file && (c != '\r' || (options & SHELL_FILTER))) - fputc(c, out_file); - if ((options & SHELL_FILTER) == 0) - { - if (c == 127) - msg_puts("\b \b"); - else if (c > 31) - msg_putchar(c); - else if (c == 10) - { - lines_left = 8; /* Don't do More prompt! */ - msg_putchar(10); - } - } - } - /* Flush output to the screen. */ - windgoto(msg_row, msg_col); - out_flush(); - continue; - } - } - process_event(reason, block); - } - msg_putchar('\n'); - settmode(TMODE_RAW); - if (out_file) - fclose(out_file); - return OK; -} - -/* Like strsave(), but stops at any control char */ - char_u * -wimp_strsave(str) - char *str; -{ - int strlen = 0; - char_u *retval; - while (str[strlen] > 31) - strlen++; - retval = alloc(strlen + 1); - if (retval) - { - memcpy(retval, str, strlen); - retval[strlen] = '\0'; - } - return retval; -} - -/* If we are saving then pop up a standard RISC OS save box. - * Otherwise, open a directory viewer on the given directory (and return NULL) - * The string we return will be freed later. - */ - char_u * -gui_mch_browse(saving, title, dflt, ext, initdir, filter) - int saving; /* write action */ - char_u *title; /* title for the window */ - char_u *dflt; /* default file name */ - char_u *ext; /* extension added */ - char_u *initdir; /* initial directory, NULL for current dir */ - char_u *filter; /* file name filter */ -{ - char command[256]; - int length; - - if (saving) - { - int block[64]; - int reason; - int done_save = FALSE; - char_u *retval = NULL; - char_u *sprname; - char_u *fname; - int dragging_icon = FALSE; - int filetype; - - if (!dflt) - dflt = "TextFile"; - - block[0] = save_window; - block[1] = 0; - swi(Wimp_GetIconState, 0, block); - sprname = ((char_u *) block[7]); - block[1] = 1; - swi(Wimp_GetIconState, 0, block); - fname = ((char *) block[7]); - strncpy(fname, dflt, 255); - - if (xswi(OS_FSControl, 31, curbuf->b_p_oft) & v_flag) - { - filetype = 0xfff; - strcpy(sprname + 5, "xxx"); - } - else - { - filetype = r2; - sprintf(sprname + 5, "%03x", filetype); - } - - /* Open the save box */ - - swi(Wimp_GetPointerInfo, 0, block); - swi(Wimp_CreateMenu, 0, save_window, block[0] - 64, block[1] + 64); - swi(Wimp_SetCaretPosition, save_window, 1, 0, 0, -1, -1); - - while (!done_save) - { - reason = wimp_poll(1, block); - switch (reason) - { - case 1: - redraw_window(block); - break; - case 2: - if (block[0] == save_window) - swi(Wimp_OpenWindow, 0, block); - else - ro_open_window(block); - break; - case 3: - done_save = TRUE; - break; - case 6: - if (block[3] != save_window) - done_save = TRUE; - else - { - int drag_box[4]; - int min_x, max_y; - - switch (block[4]) - { - case 0: /* Start drag */ - block[0] = save_window; - swi(Wimp_GetWindowState, 0, block); - min_x = block[1]; - max_y = block[4]; - block[1] = 0; - swi(Wimp_GetIconState, 0, block); - drag_box[0] = block[2] + min_x; - drag_box[1] = block[3] + max_y; - drag_box[2] = block[4] + min_x; - drag_box[3] = block[5] + max_y; - - swi(DragASprite_Start, - 0x45, - 1, - sprname, - drag_box); - dragging_icon = TRUE; - break; - case 2: /* OK */ - retval = wimp_strsave(fname); - done_save = TRUE; - break; - case 3: /* Cancel */ - done_save = TRUE; - break; - } - } - break; - case 7: - if (dragging_icon) - { - int len = 0; - - dragging_icon = FALSE; - swi(Wimp_GetPointerInfo, 0, block); - block[5] = block[3]; - block[6] = block[4]; - block[7] = block[0]; - block[8] = block[1]; - block[9] = 0; /* Don't know the size */ - block[10] = filetype; - - while (fname[len] > 31) - { - if (fname[len] == '.') - { - fname += len + 1; - len = 0; - } - else - len++; - } - if (len > 211) - len = 211; - - memcpy(((char_u *) block) + 44, fname, len); - ((char_u *)block)[44 + len] = '\0'; - - block[0] = (len + 48) & 0xfc; - block[3] = 0; - block[4] = 1; /* DataSave */ - - swi(Wimp_SendMessage, 17, block, block[5], block[6]); - } - else - ro_drag_finished(block); - break; - case 8: - if (block[6] == 13) - { - retval = wimp_strsave(fname); - done_save = TRUE; - } - else if (block[6] == 0x1b) - done_save = TRUE; - else - swi(Wimp_ProcessKey, block[6]); - break; - case 17: - case 18: - if (block[4] == 2 && block[9] != -1) - { - /* DataSaveAck from dragging icon. */ - retval = wimp_strsave(((char_u *) block) + 44); - done_save = TRUE; - } - else if (block[4] == 0x400c9) - { - /* MenusDeleted */ - done_save = TRUE; - } - else - ro_message(block); - break; - } - } - block[0] = save_window; - swi(Wimp_CloseWindow, 0, block); - swi(Wimp_GetCaretPosition, 0, block); - if (block[0] == -1) - swi(Wimp_SetCaretPosition, gui.window_handle, -1, 0, 0, -1, -1); - - return retval; - } - else if (initdir) - { - /* Open a directory viewer */ - length = strlen(initdir); - - if (length > 240) - return NULL; /* Path too long! */ - - length = sprintf(command, "Filer_OpenDir %s", initdir); - while (command[length - 1] == '.') - length--; - command[length] = '\0'; - swi(OS_CLI, command); - } - return NULL; -} diff --git a/src/gui_riscos.h b/src/gui_riscos.h deleted file mode 100644 index fe22e6a81a..0000000000 --- a/src/gui_riscos.h +++ /dev/null @@ -1,32 +0,0 @@ -/* vi:set ts=8 sts=4 sw=4: - * - * VIM - Vi IMproved by Bram Moolenaar - * - * Do ":help uganda" in Vim to read copying and usage conditions. - * Do ":help credits" in Vim to see a list of people who contributed. - */ - -#define FEAT_BROWSE - -#define TASK 0x4b534154 - -/* Nested wimp flags: */ -#define CHILD_FIX_TO_WORKAREA 0 -#define CHILD_FIX_TO_LEFT 1 -#define CHILD_FIX_TO_BOTTOM 1 -#define CHILD_FIX_TO_RIGHT 2 -#define CHILD_FIX_TO_TOP 2 - -#define CHILD_SELF_SCROLL 0 -#define CHILD_PARENT_SCROLL 1 - -#define CHILD_LEFT 16 -#define CHILD_BOTTOM 18 -#define CHILD_RIGHT 20 -#define CHILD_TOP 22 -#define CHILD_SCROLL_X 24 -#define CHILD_SCROLL_Y 26 - -int wimp_poll(int mask, int *block); -int wimp_poll_idle(int mask, int *block, int end_time); -void ro_open_main(int *block); diff --git a/src/gui_w32.c b/src/gui_w32.c index cdb1abb583..128869ee12 100644 --- a/src/gui_w32.c +++ b/src/gui_w32.c @@ -1575,7 +1575,7 @@ gui_mch_init(void) #ifdef FEAT_EVAL /* set the v:windowid variable */ - set_vim_var_nr(VV_WINDOWID, (long)s_hwnd); + set_vim_var_nr(VV_WINDOWID, HandleToLong(s_hwnd)); #endif theend: diff --git a/src/if_ole.h b/src/if_ole.h index 0b48b92ff1..5749cdb759 100644 --- a/src/if_ole.h +++ b/src/if_ole.h @@ -46,8 +46,11 @@ typedef struct Vim Vim; /* header files for imported files */ #include "oaidl.h" -void __RPC_FAR * __RPC_USER MIDL_user_allocate(size_t); -void __RPC_USER MIDL_user_free( void __RPC_FAR * ); +#ifndef __MIDL_user_allocate_free_DEFINED__ +#define __MIDL_user_allocate_free_DEFINED__ + void __RPC_FAR * __RPC_USER MIDL_user_allocate(size_t); + void __RPC_USER MIDL_user_free( void __RPC_FAR * ); +#endif #ifndef __IVim_INTERFACE_DEFINED__ #define __IVim_INTERFACE_DEFINED__ diff --git a/src/main.c b/src/main.c index 54a9e7b196..224d2aa3d6 100644 --- a/src/main.c +++ b/src/main.c @@ -3365,11 +3365,6 @@ usage() main_msg(_("+reverse\t\tDon't use reverse video (also: +rv)")); main_msg(_("-xrm \tSet the specified resource")); #endif /* FEAT_GUI_X11 */ -#if defined(FEAT_GUI) && defined(RISCOS) - mch_msg(_("\nArguments recognised by gvim (RISC OS version):\n")); - main_msg(_("--columns \tInitial width of window in columns")); - main_msg(_("--rows \tInitial height of window in rows")); -#endif #ifdef FEAT_GUI_GTK mch_msg(_("\nArguments recognised by gvim (GTK+ version):\n")); main_msg(_("-font \t\tUse for normal text (also: -fn)")); diff --git a/src/memfile.c b/src/memfile.c index 8769dbc1ea..c87b981135 100644 --- a/src/memfile.c +++ b/src/memfile.c @@ -1307,7 +1307,7 @@ mf_do_open(mfp, fname, flags) * fname cannot be NameBuff, because it must have been allocated. */ mf_set_ffname(mfp); -#if defined(MSDOS) || defined(MSWIN) || defined(RISCOS) +#if defined(MSDOS) || defined(MSWIN) /* * A ":!cd e:xxx" may change the directory without us knowning, use the * full pathname always. Careful: This frees fname! diff --git a/src/memline.c b/src/memline.c index f70e8e32be..547b550892 100644 --- a/src/memline.c +++ b/src/memline.c @@ -748,7 +748,7 @@ ml_open_file(buf) continue; if (mf_open_file(mfp, fname) == OK) /* consumes fname! */ { -#if defined(MSDOS) || defined(MSWIN) || defined(RISCOS) +#if defined(MSDOS) || defined(MSWIN) /* * set full pathname for swap file now, because a ":!cd dir" may * change directory without us knowing it. @@ -933,7 +933,7 @@ set_b0_fname(b0p, buf) b0p->b0_fname[0] = NUL; else { -#if defined(MSDOS) || defined(MSWIN) || defined(AMIGA) || defined(RISCOS) +#if defined(MSDOS) || defined(MSWIN) || defined(AMIGA) /* Systems that cannot translate "~user" back into a path: copy the * file name unmodified. Do use slashes instead of backslashes for * portability. */ @@ -1103,7 +1103,7 @@ ml_recover() fname = (char_u *)""; len = (int)STRLEN(fname); if (len >= 4 && -#if defined(VMS) || defined(RISCOS) +#if defined(VMS) STRNICMP(fname + len - 4, "_s" , 2) #else STRNICMP(fname + len - 4, ".s" , 2) @@ -1773,11 +1773,7 @@ recover_names(fname, list, nr, fname_out) #ifdef VMS names[0] = vim_strsave((char_u *)"*_sw%"); #else -# ifdef RISCOS - names[0] = vim_strsave((char_u *)"*_sw#"); -# else names[0] = vim_strsave((char_u *)"*.sw?"); -# endif #endif #if defined(UNIX) || defined(WIN3264) /* For Unix names starting with a dot are special. MS-Windows @@ -1804,11 +1800,7 @@ recover_names(fname, list, nr, fname_out) #ifdef VMS names[0] = concat_fnames(dir_name, (char_u *)"*_sw%", TRUE); #else -# ifdef RISCOS - names[0] = concat_fnames(dir_name, (char_u *)"*_sw#", TRUE); -# else names[0] = concat_fnames(dir_name, (char_u *)"*.sw?", TRUE); -# endif #endif #if defined(UNIX) || defined(WIN3264) /* For Unix names starting with a dot are special. MS-Windows @@ -1877,7 +1869,7 @@ recover_names(fname, list, nr, fname_out) char_u *swapname; swapname = modname(fname_res, -#if defined(VMS) || defined(RISCOS) +#if defined(VMS) (char_u *)"_swp", FALSE #else (char_u *)".swp", TRUE @@ -2176,11 +2168,7 @@ recov_file_names(names, path, prepend_dot) #ifdef VMS names[num_names] = concat_fnames(path, (char_u *)"_sw%", FALSE); #else -# ifdef RISCOS - names[num_names] = concat_fnames(path, (char_u *)"_sw#", FALSE); -# else names[num_names] = concat_fnames(path, (char_u *)".sw?", FALSE); -# endif #endif if (names[num_names] == NULL) goto end; @@ -2207,11 +2195,7 @@ recov_file_names(names, path, prepend_dot) #ifdef VMS names[num_names] = modname(path, (char_u *)"_sw%", FALSE); #else -# ifdef RISCOS - names[num_names] = modname(path, (char_u *)"_sw#", FALSE); -# else names[num_names] = modname(path, (char_u *)".sw?", FALSE); -# endif #endif if (names[num_names] == NULL) goto end; @@ -3205,7 +3189,8 @@ ml_delete_int(buf, lnum, message) mf_free(mfp, hp); /* free the data block */ buf->b_ml.ml_locked = NULL; - for (stack_idx = buf->b_ml.ml_stack_top - 1; stack_idx >= 0; --stack_idx) + for (stack_idx = buf->b_ml.ml_stack_top - 1; stack_idx >= 0; + --stack_idx) { buf->b_ml.ml_stack_top = 0; /* stack is invalid when failing */ ip = &(buf->b_ml.ml_stack[stack_idx]); @@ -3956,14 +3941,9 @@ makeswapname(fname, ffname, buf, dir_name) #else (buf->b_p_sn || buf->b_shortname), #endif -#ifdef RISCOS - /* Avoid problems if fname has special chars, eg */ - ffname, -#else fname_res, -#endif (char_u *) -#if defined(VMS) || defined(RISCOS) +#if defined(VMS) "_swp", #else ".swp", @@ -4427,14 +4407,6 @@ findswapname(buf, dirp, old_fname) } close(fd); } -#ifdef RISCOS - else - /* Can't open swap file, though it does exist. - * Assume that the user is editing two files with - * the same name in different directories. No error. - */ - differ = TRUE; -#endif /* give the ATTENTION message when there is an old swap file * for the current file, and the buffer was not recovered. */ diff --git a/src/misc1.c b/src/misc1.c index f25c3f9292..5a654e2177 100644 --- a/src/misc1.c +++ b/src/misc1.c @@ -1561,6 +1561,9 @@ get_leader_len(line, flags, backward) char_u part_buf[COM_MAX_LEN]; /* buffer for one option part */ char_u *string; /* pointer to comment string */ char_u *list; + int middle_match_len = 0; + char_u *prev_list; + char_u *saved_flags = NULL; i = 0; while (vim_iswhite(line[i])) /* leading white space is ignored */ @@ -1569,7 +1572,7 @@ get_leader_len(line, flags, backward) /* * Repeat to match several nested comment strings. */ - while (line[i]) + while (line[i] != NUL) { /* * scan through the 'comments' option for a match @@ -1577,82 +1580,104 @@ get_leader_len(line, flags, backward) found_one = FALSE; for (list = curbuf->b_p_com; *list; ) { - /* - * Get one option part into part_buf[]. Advance list to next one. - * put string at start of string. - */ - if (!got_com && flags != NULL) /* remember where flags started */ - *flags = list; + /* Get one option part into part_buf[]. Advance "list" to next + * one. Put "string" at start of string. */ + if (!got_com && flags != NULL) + *flags = list; /* remember where flags started */ + prev_list = list; (void)copy_option_part(&list, part_buf, COM_MAX_LEN, ","); string = vim_strchr(part_buf, ':'); if (string == NULL) /* missing ':', ignore this part */ continue; *string++ = NUL; /* isolate flags from string */ - /* - * When already found a nested comment, only accept further - * nested comments. - */ + /* If we found a middle match previously, use that match when this + * is not a middle or end. */ + if (middle_match_len != 0 + && vim_strchr(part_buf, COM_MIDDLE) == NULL + && vim_strchr(part_buf, COM_END) == NULL) + break; + + /* When we already found a nested comment, only accept further + * nested comments. */ if (got_com && vim_strchr(part_buf, COM_NEST) == NULL) continue; - /* When 'O' flag used don't use for "O" command */ + /* When 'O' flag present and using "O" command skip this one. */ if (backward && vim_strchr(part_buf, COM_NOBACK) != NULL) continue; - /* - * Line contents and string must match. + /* Line contents and string must match. * When string starts with white space, must have some white space * (but the amount does not need to match, there might be a mix of - * TABs and spaces). - */ + * TABs and spaces). */ if (vim_iswhite(string[0])) { if (i == 0 || !vim_iswhite(line[i - 1])) - continue; + continue; /* missing shite space */ while (vim_iswhite(string[0])) ++string; } for (j = 0; string[j] != NUL && string[j] == line[i + j]; ++j) ; if (string[j] != NUL) - continue; + continue; /* string doesn't match */ - /* - * When 'b' flag used, there must be white space or an - * end-of-line after the string in the line. - */ + /* When 'b' flag used, there must be white space or an + * end-of-line after the string in the line. */ if (vim_strchr(part_buf, COM_BLANK) != NULL && !vim_iswhite(line[i + j]) && line[i + j] != NUL) continue; - /* - * We have found a match, stop searching. - */ - i += j; - got_com = TRUE; + /* We have found a match, stop searching unless this is a middle + * comment. The middle comment can be a substring of the end + * comment in which case it's better to return the length of the + * end comment and its flags. Thus we keep searching with middle + * and end matches and use an end match if it matches better. */ + if (vim_strchr(part_buf, COM_MIDDLE) != NULL) + { + if (middle_match_len == 0) + { + middle_match_len = j; + saved_flags = prev_list; + } + continue; + } + if (middle_match_len != 0 && j > middle_match_len) + /* Use this match instead of the middle match, since it's a + * longer thus better match. */ + middle_match_len = 0; + + if (middle_match_len == 0) + i += j; found_one = TRUE; break; } - /* - * No match found, stop scanning. - */ + if (middle_match_len != 0) + { + /* Use the previously found middle match after failing to find a + * match with an end. */ + if (!got_com && flags != NULL) + *flags = saved_flags; + i += middle_match_len; + found_one = TRUE; + } + + /* No match found, stop scanning. */ if (!found_one) break; - /* - * Include any trailing white space. - */ + /* Include any trailing white space. */ while (vim_iswhite(line[i])) ++i; - /* - * If this comment doesn't nest, stop here. - */ + /* If this comment doesn't nest, stop here. */ + got_com = TRUE; if (vim_strchr(part_buf, COM_NEST) == NULL) break; } + return (got_com ? i : 0); } #endif @@ -4570,25 +4595,21 @@ get_past_head(path) vim_ispathsep(c) int c; { -#ifdef RISCOS - return (c == '.' || c == ':'); -#else -# ifdef UNIX +#ifdef UNIX return (c == '/'); /* UNIX has ':' inside file names */ -# else -# ifdef BACKSLASH_IN_FILENAME +#else +# ifdef BACKSLASH_IN_FILENAME return (c == ':' || c == '/' || c == '\\'); -# else -# ifdef VMS +# else +# ifdef VMS /* server"user passwd"::device:[full.path.name]fname.extension;version" */ return (c == ':' || c == '[' || c == ']' || c == '/' || c == '<' || c == '>' || c == '"' ); -# else /* Amiga */ +# else return (c == ':' || c == '/'); -# endif /* VMS */ -# endif +# endif /* VMS */ # endif -#endif /* RISC OS */ +#endif } #if defined(FEAT_SEARCHPATH) || defined(PROTO) @@ -4944,6 +4965,7 @@ static pos_T *find_match_paren __ARGS((int, int)); static int corr_ind_maxparen __ARGS((int ind_maxparen, pos_T *startpos)); static int find_last_paren __ARGS((char_u *l, int start, int end)); static int find_match __ARGS((int lookfor, linenr_T ourscope, int ind_maxparen, int ind_maxcomment)); +static int cin_is_cpp_namespace __ARGS((char_u *)); static int ind_hash_comment = 0; /* # starts a comment */ @@ -4989,7 +5011,7 @@ cin_skipcomment(s) } /* - * Return TRUE if there there is no code at *s. White space and comments are + * Return TRUE if there is no code at *s. White space and comments are * not considered code. */ static int @@ -5206,6 +5228,50 @@ cin_isscopedecl(s) return (*(s = cin_skipcomment(s + i)) == ':' && s[1] != ':'); } +/* Maximum number of lines to search back for a "namespace" line. */ +#define FIND_NAMESPACE_LIM 20 + +/* + * Recognize a "namespace" scope declaration. + */ + static int +cin_is_cpp_namespace(s) + char_u *s; +{ + char_u *p; + int has_name = FALSE; + + s = cin_skipcomment(s); + if (STRNCMP(s, "namespace", 9) == 0 && (s[9] == NUL || !vim_iswordc(s[9]))) + { + p = cin_skipcomment(skipwhite(s + 9)); + while (*p != NUL) + { + if (vim_iswhite(*p)) + { + has_name = TRUE; /* found end of a name */ + p = cin_skipcomment(skipwhite(p)); + } + else if (*p == '{') + { + break; + } + else if (vim_iswordc(*p)) + { + if (has_name) + return FALSE; /* word character after skipping past name */ + ++p; + } + else + { + return FALSE; + } + } + return TRUE; + } + return FALSE; +} + /* * Return a pointer to the first non-empty non-comment character after a ':'. * Return NULL if not found. @@ -5464,8 +5530,11 @@ cin_islinecomment(p) } /* - * Recognize a line that starts with '{' or '}', or ends with ';', '{' or '}'. + * Recognize a line that starts with '{' or '}', or ends with ';', ',', '{' or + * '}'. * Don't consider "} else" a terminated line. + * If a line begins with an "else", only consider it terminated if no unmatched + * opening braces follow (handle "else { foo();" correctly). * Return the character terminating the line (ending char's have precedence if * both apply in order to determine initializations). */ @@ -5475,21 +5544,35 @@ cin_isterminated(s, incl_open, incl_comma) int incl_open; /* include '{' at the end as terminator */ int incl_comma; /* recognize a trailing comma */ { - char_u found_start = 0; + char_u found_start = 0; + unsigned n_open = 0; + int is_else = FALSE; s = cin_skipcomment(s); if (*s == '{' || (*s == '}' && !cin_iselse(s))) found_start = *s; + if (!found_start) + is_else = cin_iselse(s); + while (*s) { /* skip over comments, "" strings and 'c'haracters */ s = skip_string(cin_skipcomment(s)); - if ((*s == ';' || (incl_open && *s == '{') || *s == '}' - || (incl_comma && *s == ',')) + if (*s == '}' && n_open > 0) + --n_open; + if ((!is_else || n_open == 0) + && (*s == ';' || *s == '}' || (incl_comma && *s == ',')) && cin_nocode(s + 1)) return *s; + else if (*s == '{') + { + if (incl_open && cin_nocode(s + 1)) + return *s; + else + ++n_open; + } if (*s) s++; @@ -5794,7 +5877,9 @@ cin_is_cpp_baseclass(col) continue; } - if (s[0] == ':') + if (s[0] == '"') + s = skip_string(s) + 1; + else if (s[0] == ':') { if (s[1] == ':') { @@ -6262,6 +6347,11 @@ get_c_indent() */ int ind_keep_case_label = 0; + /* + * handle C++ namespace + */ + int ind_cpp_namespace = 0; + pos_T cur_curpos; int amount; int scope_amount; @@ -6302,6 +6392,7 @@ get_c_indent() int n; int iscase; int lookfor_break; + int lookfor_cpp_namespace = FALSE; int cont_amount = 0; /* amount for continuation line */ int original_line_islabel; @@ -6375,6 +6466,7 @@ get_c_indent() case 'J': ind_js = n; break; case 'l': ind_keep_case_label = n; break; case '#': ind_hash_comment = n; break; + case 'N': ind_cpp_namespace = n; break; } if (*options == ',') ++options; @@ -6942,11 +7034,24 @@ get_c_indent() if (start_brace == BRACE_IN_COL0) /* '{' is in column 0 */ { amount = ind_open_left_imag; + lookfor_cpp_namespace = TRUE; + } + else if (start_brace == BRACE_AT_START && + lookfor_cpp_namespace) /* '{' is at start */ + { + + lookfor_cpp_namespace = TRUE; } else { if (start_brace == BRACE_AT_END) /* '{' is at end of line */ + { amount += ind_open_imag; + + l = skipwhite(ml_get_curline()); + if (cin_is_cpp_namespace(l)) + amount += ind_cpp_namespace; + } else { /* Compensate for adding ind_open_extra later. */ @@ -7117,6 +7222,46 @@ get_c_indent() else amount += ind_continuation; } + else if (lookfor_cpp_namespace) + { + if (curwin->w_cursor.lnum == ourscope) + continue; + + if (curwin->w_cursor.lnum == 0 + || curwin->w_cursor.lnum + < ourscope - FIND_NAMESPACE_LIM) + break; + + l = ml_get_curline(); + + /* + * If we're in a comment now, skip to the start of the + * comment. + */ + trypos = find_start_comment(ind_maxcomment); + if (trypos != NULL) + { + curwin->w_cursor.lnum = trypos->lnum + 1; + curwin->w_cursor.col = 0; + continue; + } + + /* + * Skip preprocessor directives and blank lines. + */ + if (cin_ispreproc_cont(&l, &curwin->w_cursor.lnum)) + continue; + + if (cin_is_cpp_namespace(l)) + { + amount += ind_cpp_namespace; + break; + } + + if (cin_nocode(l)) + continue; + + } else if (lookfor != LOOKFOR_TERM && lookfor != LOOKFOR_CPP_BASECLASS) { @@ -7507,17 +7652,25 @@ get_c_indent() /* * When searching for a terminated line, don't use the - * one between the "if" and the "else". + * one between the "if" and the matching "else". * Need to use the scope of this "else". XXX * If whilelevel != 0 continue looking for a "do {". */ - if (cin_iselse(l) - && whilelevel == 0 - && ((trypos = find_start_brace(ind_maxcomment)) - == NULL + if (cin_iselse(l) && whilelevel == 0) + { + /* If we're looking at "} else", let's make sure we + * find the opening brace of the enclosing scope, + * not the one from "if () {". */ + if (*l == '}') + curwin->w_cursor.col = + (colnr_T)(l - ml_get_curline()) + 1; + + if ((trypos = find_start_brace(ind_maxcomment)) + == NULL || find_match(LOOKFOR_IF, trypos->lnum, - ind_maxparen, ind_maxcomment) == FAIL)) - break; + ind_maxparen, ind_maxcomment) == FAIL) + break; + } } /* diff --git a/src/normal.c b/src/normal.c index e38981c932..6362ee28b5 100644 --- a/src/normal.c +++ b/src/normal.c @@ -1202,7 +1202,16 @@ getcount: { clearop(oap); #ifdef FEAT_EVAL - set_reg_var('"'); + { + int regname = 0; + + /* Adjust the register according to 'clipboard', so that when + * "unnamed" is present it becomes '*' or '+' instead of '"'. */ +# ifdef FEAT_CLIPBOARD + adjust_clip_reg(®name); +# endif + set_reg_var(regname); + } #endif } diff --git a/src/option.c b/src/option.c index c50332c9b8..6af23731c3 100644 --- a/src/option.c +++ b/src/option.c @@ -143,9 +143,6 @@ #define PV_MMTA OPT_BUF(BV_MMTA) #endif #define PV_NF OPT_BUF(BV_NF) -#ifdef FEAT_OSFILETYPE -# define PV_OFT OPT_BUF(BV_OFT) -#endif #ifdef FEAT_COMPL_FUNC # define PV_OFU OPT_BUF(BV_OFU) #endif @@ -343,9 +340,6 @@ static int p_mmta; static int p_mod; static char_u *p_mps; static char_u *p_nf; -#ifdef FEAT_OSFILETYPE -static char_u *p_oft; -#endif static int p_pi; #ifdef FEAT_TEXTOBJ static char_u *p_qe; @@ -1939,14 +1933,8 @@ static struct vimoption (char_u *)NULL, PV_NONE, {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT}, {"osfiletype", "oft", P_STRING|P_ALLOCED|P_VI_DEF, -#ifdef FEAT_OSFILETYPE - (char_u *)&p_oft, PV_OFT, - {(char_u *)DFLT_OFT, (char_u *)0L} -#else (char_u *)NULL, PV_NONE, - {(char_u *)0L, (char_u *)0L} -#endif - SCRIPTID_INIT}, + {(char_u *)0L, (char_u *)0L} SCRIPTID_INIT}, {"paragraphs", "para", P_STRING|P_VI_DEF, (char_u *)&p_para, PV_NONE, {(char_u *)"IPLPPPQPP TPHPLIPpLpItpplpipbp", @@ -5352,9 +5340,6 @@ check_buf_options(buf) #ifdef FEAT_AUTOCMD check_string_option(&buf->b_p_ft); #endif -#ifdef FEAT_OSFILETYPE - check_string_option(&buf->b_p_oft); -#endif #if defined(FEAT_SMARTINDENT) || defined(FEAT_CINDENT) check_string_option(&buf->b_p_cinw); #endif @@ -9804,9 +9789,6 @@ get_varp(p) case PV_MA: return (char_u *)&(curbuf->b_p_ma); case PV_MOD: return (char_u *)&(curbuf->b_changed); case PV_NF: return (char_u *)&(curbuf->b_p_nf); -#ifdef FEAT_OSFILETYPE - case PV_OFT: return (char_u *)&(curbuf->b_p_oft); -#endif case PV_PI: return (char_u *)&(curbuf->b_p_pi); #ifdef FEAT_TEXTOBJ case PV_QE: return (char_u *)&(curbuf->b_p_qe); @@ -10156,9 +10138,6 @@ buf_copy_options(buf, flags) #ifdef FEAT_AUTOCMD /* Don't copy 'filetype', it must be detected */ buf->b_p_ft = empty_option; -#endif -#ifdef FEAT_OSFILETYPE - buf->b_p_oft = vim_strsave(p_oft); #endif buf->b_p_pi = p_pi; #if defined(FEAT_SMARTINDENT) || defined(FEAT_CINDENT) diff --git a/src/option.h b/src/option.h index 55aaf127fa..1a22333b18 100644 --- a/src/option.h +++ b/src/option.h @@ -1002,9 +1002,6 @@ enum , BV_MMTA #endif , BV_NF -#ifdef FEAT_OSFILETYPE - , BV_OFT -#endif #ifdef FEAT_COMPL_FUNC , BV_OFU #endif diff --git a/src/os_riscos.c b/src/os_riscos.c deleted file mode 100644 index 5c443fce15..0000000000 --- a/src/os_riscos.c +++ /dev/null @@ -1,1292 +0,0 @@ -/* vi:set ts=8 sts=4 sw=4: - * - * VIM - Vi IMproved by Bram Moolenaar - * - * Do ":help uganda" in Vim to read copying and usage conditions. - * Do ":help credits" in Vim to see a list of people who contributed. - * See README.txt for an overview of the Vim source code. - */ - -#include "vim.h" - -/* - * os_riscos.c - * - * Thomas Leonard - */ - -const char *__dynamic_da_name = "Vim heap"; /* Enable and name our dynamic area */ -int ro_line_mode = TRUE; /* For Ex mode we much echo chars to the screen ourselves */ -int windowed; /* Flag - are we running inside a text window? */ -int WinLeft, WinTop; /* We might be started inside a text window */ -int ScrollTop; /* Make cursor movements relative to ScrollTop. */ - -int old_escape_state = -1; -int old_cursor_state = -1; - -#define rgb(r,g,b) ((b<<24) + (g<<16) + (r<<8)) -#define NORMAL_FG 0x00000000 -#define NORMAL_BG 0xffffffff - -/* Convert a DOS colour number to an RGB palette entry. - * Mappings from X11 rgb/txt file. - */ - static int -map_colour(dos) - int dos; /* Standard DOS colour number. */ -{ - switch (dos) - { - case 0: return 0; /* Black */ - case 1: return rgb(0,0,139); /* DarkBlue */ - case 2: return rgb(0,100,0); /* DarkGreen */ - case 3: return rgb(0,139,139); /* DarkCyan */ - case 4: return rgb(139,0,0); /* DarkRed */ - case 5: return rgb(139,0,139); /* DarkMagenta */ - case 6: return rgb(165,42,42); /* Brown, DarkYellow */ - case 7: return rgb(211,211,211); /* LightGray, LightGrey, Gray, Grey */ - case 8: return rgb(169,169,169); /* DarkGray, DarkGrey */ - case 9: return rgb(173,216,230); /* Blue, LightBlue */ - case 10: return rgb(144,238,144); /* Green, LightGreen */ - case 11: return rgb(224,255,255); /* Cyan, LightCyan */ - case 12: return rgb(255,0,0); /* Red, LightRed */ - case 13: return rgb(255,0,255); /* Magenta, LightMagenta */ - case 14: return rgb(255,255,0); /* Yellow, LightYellow */ - case 15: return rgb(255,255,255); /* White */ - } - return rgb(100,100,100); -} - - static void -text_fg(fg) - int fg; /* Foregound colour in the form &BBGGRR00 */ -{ - xswi(ColourTrans_SetTextColour, fg, 0, 0, 0); -} - - static void -text_bg(bg) - int bg; /* Backgound colour in the form &BBGGRR00 */ -{ - xswi(ColourTrans_SetTextColour, bg, 0, 0, 1 << 7); -} - -#define OUT_NORMAL 0 -#define OUT_NUMBER 1 /* Reading in a number */ - - void -mch_write(s, len) - char_u *s; - int len; -{ - static int mode = OUT_NORMAL; - static int x, y; /* For reading numbers in. */ - - if (!term_console) - { - /* Maybe we are running Vim remotely - don't interpret chars */ - while (len--) - { - char_u c = *s++; - swi(OS_WriteC, c); - /* We might need to send a CR too. This shouldn't - * hurt if we don't need it, should it? - */ - if (c == 10) - swi(OS_WriteI + 13); - } - return; - } - - while (len--) - { - char_u c = *s++; - switch (mode) - { - case OUT_NUMBER: - if (c < '0' || c > '9') - { - mode = OUT_NORMAL; - } - else - { - x = (x * 10) + c - '0'; - continue; - } - /* note: no break here! */ - - case OUT_NORMAL: - switch (c) - { - case 1: - /* Number (in decimal) follows. */ - mode = OUT_NUMBER; - y = x; - x = 0; - break; - case 2: - /* Position cursor. */ - swi(OS_WriteI + 31); - swi(OS_WriteC, x); - swi(OS_WriteC, y - ScrollTop); - break; - case 3: - /* Set scroll region. */ - if (x == Rows -1 && y == 0 && !windowed) - { - /* Whole screen - remove text window. - * This is MUCH faster. - */ - swi(OS_WriteI + 26); - } - else - { - /* Create a text window. */ - swi(OS_WriteI + 28); - swi(OS_WriteC, WinLeft); - swi(OS_WriteC, WinTop + x); - swi(OS_WriteC, WinLeft + Columns - 1); - swi(OS_WriteC, WinTop + y); - } - ScrollTop = y; - break; - case 4: - /* Normal mode. */ - text_fg(NORMAL_FG); - text_bg(NORMAL_BG); - break; - case 5: - /* Reverse mode. */ - text_fg(NORMAL_BG); - text_bg(NORMAL_FG); - break; - case 10: - swi(OS_NewLine); - break; - case 14: - /* Cursor invisible. */ - swi(OS_WriteN, - "\027\001\000\000\000\000\000\000\000\000", - 10); - break; - case 15: - /* Cursor visible. */ - swi(OS_WriteN, - "\027\001\002\000\000\000\000\000\000\000", - 10); - break; - case 16: - /* Cursor very visible (flash) */ - swi(OS_WriteN, - "\027\001\003\000\000\000\000\000\000\000", - 10); - case 17: - /* Set foreground colour. */ - text_fg(map_colour(x)); - break; - case 18: - /* Set background colour. */ - text_bg(map_colour(x)); - break; - case 19: - /* Scroll text down. */ - swi(OS_WriteN, - "\027\007\000\002\000\000\000\000\000\000", - 10); - break; - default: - swi(OS_WriteC, c); - } - continue; - - default: - printf("[output error]"); - mode = OUT_NORMAL; - } - } -} - -/* - * mch_inchar(): low level input funcion. - * Get a characters from the keyboard. - * Return the number of characters that are available. - * If wtime == 0 do not wait for characters. - * If wtime == n wait n msecs for characters. - * If wtime == -1 wait forever for characters. - * - * TODO: call convert_input() for 'fileencoding' to 'encoding' conversion. - */ - int -mch_inchar(buf, maxlen, wtime, tb_change_cnt) - char_u *buf; - int maxlen; - long wtime; - int tb_change_cnt; -{ - int got=0; - unsigned int start_time = clock(); - - if (ro_line_mode) - { - /* We're probably in Ex mode - get whole lines at a time. */ - - static char_u line_buffer[256]; - static int remaining_chars = 0; - static int buf_pos = 0; - - /* Do we need to fetch another line? */ - if (remaining_chars == 0) - { - int old_esc_state; - swi(OS_Byte, 200, 1, 0xfe); - old_esc_state = r1; - - buf_pos = 0; - if (xswi(OS_ReadLine, line_buffer, 255, 0, 255) & (c_flag | v_flag)) - { - got_int = TRUE; /* ESC pressed */ - r1 = 0; - } - line_buffer[r1] = 13; - remaining_chars = r1 + 1; /* Count CR as part of input */ - - swi(OS_Byte, 200, old_esc_state, 0); - } - - /* Can we send the rest of the buffer back in one go? */ - if (remaining_chars <= maxlen) - { - int got = remaining_chars; - - memcpy(buf, line_buffer + buf_pos, got); - remaining_chars = 0; - return got; - } - - /* Send as much as we can */ - memcpy(buf, line_buffer + buf_pos, maxlen); - buf_pos += maxlen; - remaining_chars -= maxlen; - - return maxlen; - } - - if (!term_console) - { - /* Use OS_ReadC for all input. - * Avoids problems with remote access getting interference from - * the keyboard. - */ - if (wtime == 0) - return 0; /* Ignore quick key checks */ - - if (xswi(OS_ReadC) & c_flag) - { - got_int = TRUE; /* ESC pressed - can this happen? */ - swi(OS_Byte, 124); /* Clear Escape state */ - r0 = 0x1b; /* It *might* not have been Escape! */ - } - buf[0] = r0; - return 1; - } - - /* - * OK, here's the plan: - * - * 1) Wait until wtime expires or we get a key - * 2) Get keys until the keyboard buffer is empty or buf is full - */ - - while (xswi(OS_Byte,145,0) & c_flag) - { - /* Nothing at all in the keyboard buffer. - * Has our time expired yet? - */ - if ( (wtime != -1) && (clock() - start_time) >= wtime ) - return 0; /* Nothing read - giving up */ - } - - /* We've got one char (in r2) - are there any more? */ - - while (got < maxlen) - { - buf[got++] = r2; - - if (xswi(OS_Byte,145,0) & c_flag) - return got; /* Keyboard buffer empty */ - } - return got; /* buf is full */ -} - -/* - * return non-zero if a character is available - */ - int -mch_char_avail() -{ - if (!term_console) - return 0; /* Can't tell */ - if (xswi(OS_Byte, 152, 0) & c_flag) - return 0; - return 1; -} - -/* Find out how much free memory we have. - * I don't know how to work this out exactly but, since we can claim - * more memory from the OS, let's just report the free pool size. - * Dynamic area 6 doesn't exist pre 3.6 according to StrongHelp, so - * we'll use Wimp_SlotSize. If that fails (outside the desktop?) - * then just return a big number and hope. - */ - long_u -mch_avail_mem(special) - int special; -{ - if (xswi(Wimp_SlotSize, -1, -1) & v_flag) - return 0x7fffffff; - return r2; -} - - void -mch_delay(msec, ignoreinput) - long msec; - int ignoreinput; -{ - int start_time, time_now; - int csec = msec / 10; - - swi(OS_ReadMonotonicTime); - start_time = r0; - - for (;;) - { - swi(OS_ReadMonotonicTime); - time_now = r0; - if (time_now - start_time > csec) - return; -#ifdef FEAT_GUI - /* In the GUI, allow other programs to run while waiting. */ - if (gui.in_use) - gui_mch_wait_for_chars(start_time + csec); -#endif - } -} - -/* - * If the machine has job control, use it to suspend the program, - * otherwise fake it by starting a new shell. - */ - void -mch_suspend() -{ - suspend_shell(); -} - - void -mch_init() -{ - /* - * Read window size first. Calls to mch_get_shellsize() will - * simply return these values in future so that setting the - * text window (used for scrolling) won't give strange results. - */ - - int buf[7] = {132, 135, 256, 257, 1, 2, -1}; - - /* Command windows are no longer forced open, since if we are - * in the desktop then we'll use the GUI version. - * Opening a command window here messes up the GUI version startup - */ -#ifndef FEAT_GUI - swi(OS_WriteI); -#endif - swi(OS_ReadVduVariables, buf, buf); - WinLeft = buf[0]; - WinTop = buf[1]; - Columns = buf[2]; - Rows = buf[3] + 1; /* Seems to be one off (VduVars wrong?) */ - ScrollTop = 0; - - /* Are we running in a textwindow? */ - if (Rows == buf[5] + 1 && Columns == buf[4] + 1) - windowed = 0; - else - windowed = 1; - - /* Choose a nice colour scheme. */ - text_fg(NORMAL_FG); - text_bg(NORMAL_BG); -} - -/* - * Check_win checks whether we have an interactive stdout. - */ -/* ARGSUSED */ - int -mch_check_win(argc, argv) - int argc; - char **argv; -{ - return OK; -} - -/* - * Return TRUE if the input comes from a terminal, FALSE otherwise. - */ - int -mch_input_isatty() -{ - if (xswi(OS_ChangeRedirection, -1, -1) & v_flag) - return TRUE; /* Error - TRUE is probably correct though */ - if (r0 == 0) - return TRUE; - return FALSE; -} - -#ifdef FEAT_TITLE - int -mch_can_restore_title() -{ - return FALSE; -} - - int -mch_can_restore_icon() -{ - return FALSE; -} - - -/* - * Set the window title and icon. - */ - void -mch_settitle(title, icon) - char_u *title; - char_u *icon; -{ - if (title == NULL) - title = (char_u *) ""; -#ifdef FEAT_GUI - if (gui.in_use && strcmp(title, gui.window_title)) - { - int length; - length = strlen(title); - if (length >= gui.window_title_size) - length = gui.window_title_size - 1; - strncpy(gui.window_title, title, length); - gui.window_title[length] = 0; - ro_redraw_title(gui.window_handle); - } -#endif - return; -} - -/* - * Restore the window/icon title. - * "which" is one of: - * 1 only restore title - * 2 only restore icon - * 3 restore title and icon - */ - void -mch_restore_title(which) - int which; -{ - return; -} -#endif - -/* - * Insert user name in s[len]. - * Return OK if a name found. - */ - int -mch_get_user_name(s, len) - char_u *s; - int len; -{ - /* RISC OS doesn't support user names. */ - *s = NUL; - return FAIL; -} - -/* - * Insert host name in s[len]. - */ - - void -mch_get_host_name(s, len) - char_u *s; - int len; -{ - if (xswi(OS_ReadVarVal, "Machine$Name", s, len, 0, 3) & v_flag) - { - /* Variable does not exist (normal operation) */ - vim_strncpy(s, "(unknown)", len - 1); - } -} - -/* - * return process ID - */ - long -mch_get_pid() -{ - if (xswi(Wimp_ReadSysInfo, 5) & v_flag) - return 0; - return r0; -} - -/* - * Get name of current directory into buffer 'buf' of length 'len' bytes. - * Return OK for success, FAIL for failure. - */ - int -mch_dirname(buf, len) - char_u *buf; - int len; -{ - if (xswi(OS_FSControl, 37, "@", buf, 0, 0, len) & v_flag) - return FAIL; - return OK; -} - -/* - * Get absolute file name into buffer 'buf' of length 'len' bytes. - * - * return FAIL for failure, OK for success - */ - int -mch_FullName(fname, buf, len, force) - char_u *fname, *buf; - int len; - int force; /* Also expand when already absolute path name. - * Not used under RISC OS. - */ -{ - if (xswi(OS_FSControl, 37, fname, buf, 0, 0, len) & v_flag) - return FAIL; - return OK; -} - -/* - * Return TRUE if "fname" does not depend on the current directory. - */ - int -mch_isFullName(fname) - char_u *fname; -{ - if (strstr(fname, "::") && strstr(fname,".$.")) - return TRUE; - return FALSE; -} - -/* - * Get file permissions for 'name'. - * Returns -1 when it doesn't exist. - */ - long -mch_getperm(name) - char_u *name; -{ - struct stat statb; - - if (stat((char *)name, &statb)) - return -1; - return statb.st_mode; -} - -/* - * set file permission for 'name' to 'perm' - * - * return FAIL for failure, OK otherwise - */ - int -mch_setperm(name, perm) - char_u *name; - long perm; -{ - return (chmod((char *)name, (mode_t)perm) == 0 ? OK : FAIL); -} - -/* - * Set hidden flag for "name". - */ -/* ARGSUSED */ - void -mch_hide(name) - char_u *name; -{ - /* can't hide a file */ -} - -/* - * return TRUE if "name" is a directory - * return FALSE if "name" is not a directory - * return FALSE for error - */ - int -mch_isdir(name) - char_u *name; -{ - if (xswi(OS_File, 17, name) & v_flag) - return FALSE; - if (r0 == 2 || r0 == 3) - return TRUE; /* Count image files as directories. */ - return FALSE; -} - -/* - * Return 1 if "name" can be executed, 0 if not. - * Return -1 if unknown. Requires which to work. - */ - int -mch_can_exe(name) - char_u *name; -{ - char_u *buf; - char_u *p; - int retval; - - buf = alloc((unsigned)STRLEN(name) + 7); - if (buf == NULL) - return -1; - sprintf((char *)buf, "which %s", name); - p = get_cmd_output(buf, NULL, SHELL_SILENT); - vim_free(buf); - if (p == NULL) - return -1; - /* result can be: "name: Command not found" */ - retval = (*p != NUL && strstr((char *)p, "not found") == NULL); - vim_free(p); - return retval; -} - -/* - * Check what "name" is: - * NODE_NORMAL: file or directory (or doesn't exist) - * NODE_WRITABLE: writable device, socket, fifo, etc. - * NODE_OTHER: non-writable things - */ - int -mch_nodetype(name) - char_u *name; -{ - /* TODO */ - return NODE_NORMAL; -} - - void -mch_early_init() -{ - /* Turn off all the horrible filename munging in UnixLib. */ - int __riscosify_control = __RISCOSIFY_NO_PROCESS; -} - - void -mch_exit(r) - int r; -{ - settmode(TMODE_COOK); - exiting = TRUE; - out_flush(); - ml_close_all(TRUE); /* remove all memfiles */ - -#ifdef FEAT_GUI - if (gui.in_use) - gui_exit(r); -#endif - swi(OS_NewLine); - if (old_escape_state != -1) - swi(OS_Byte, 229, old_escape_state, 0); - if (old_cursor_state != -1) - swi(OS_Byte, 4, old_cursor_state); - exit(r); -} - - void -mch_settmode(tmode) - int tmode; /* TMODE_RAW or TMODE_COOK */ -{ - if (tmode == TMODE_COOK) - { - ro_line_mode = TRUE; - return; - } - - ro_line_mode = FALSE; - - if (term_console) - { - /* Block cursor. */ - swi(OS_WriteN, - "\027\000\012\000\000\000\000\000\000\000", - 10); - - /* Disable the standard cursor key actions. */ - swi(OS_Byte, 4, 1); - if (old_cursor_state == -1) - old_cursor_state = r1; - } - - /* Stop Escape from quitting Vim! */ - swi(OS_Byte, 229, 1, 0); - if (old_escape_state == -1) - old_escape_state = r1; -} - -/* - * set mouse clicks on or off (only works for xterms) - */ - void -mch_setmouse(on) - int on; -{ -} - -/* - * set screen mode, always fails. - */ -/* ARGSUSED */ - int -mch_screenmode(arg) - char_u *arg; -{ - EMSG(_(e_screenmode)); - return FAIL; -} - -/* - * Try to get the current window size. - * Return OK when size could be determined, FAIL otherwise. - * Simply return results stored by mch_init() if we are the - * machine's console. If not, we don't know how big the screen is. - */ - int -mch_get_shellsize() -{ - /* if size changed: screenalloc will allocate new screen buffers */ - return term_console ? OK : FAIL; -} - -/* - * Can't change the size. - * Assume the user knows what he's doing and use the new values. - */ - void -mch_set_shellsize() -{ - /* Assume the user knows what he's doing and use the new values. */ -} - -/* - * Rows and/or Columns has changed. - */ - void -mch_new_shellsize() -{ - /* Nothing to do. */ -} - - int -mch_call_shell(cmd, options) - char_u *cmd; - int options; /* SHELL_*, see vim.h */ -{ - int retval; - int tmode = cur_tmode; - - if (cmd == NULL) - cmd = (char_u *) "GOS"; - -#ifdef FEAT_GUI - if (gui.in_use) - return gui_mch_call_shell(cmd, options); -#endif - if (options & SHELL_COOKED) - settmode(TMODE_COOK); /* set to normal mode */ - MSG_PUTS("\n"); - - /* I don't even want to think about what UnixLib must - * be doing to allow this to work... - */ - retval = system(cmd); - if (retval && !(options & SHELL_SILENT)) - EMSG(strerror(EOPSYS)); /* Doesn't seem to set errno? */ - - swi(OS_Byte, 229, 1, 0); /* Re-disable escape */ - if (tmode == TMODE_RAW) - settmode(TMODE_RAW); /* set to raw mode */ - return retval ? FAIL : OK; -} - -/* - * Check for Escape being pressed right now. - * [ different if !term_console? ] - */ - void -mch_breakcheck() -{ - if (xswi(OS_Byte, 121, 0xf0) & v_flag) - return; - if (r1 == 0xff) - { - got_int = TRUE; - swi(OS_Byte, 15, 1); /* Flush input buffer */ - } -} - -/* - * Recursively expand one path component into all matching files and/or - * directories. - * "path" has backslashes before chars that are not to be expanded. - * Return the number of matches found. - */ - int -mch_expandpath(gap, path, flags) - garray_T *gap; /* Grow array for results. */ - char_u *path; - int flags; /* EW_* flags */ -{ - int got; /* Number of matches. */ - char_u *pattern; - - /* Plan: - * - * 1) Get first part of path - no wildcards - * 2) Get next path element (wildcarded) - * 3) Get rest of path - * - * If (3) is nothing then only the leaf is wildcarded - add to gap - * Otherwise call recursively for each path in (2), passing (3) - * - * This is just the header function. - */ - - /* We must be able to modifiy path, so make a copy */ - pattern = vim_strsave(path); - if (pattern == NULL) - return 0; - got = expand_section(gap, (char_u *)"", pattern, flags); - vim_free(pattern); - return got; -} - -/* - * expand_section(gap, "$.Dir1.Dir2", "ABBA*.myleaf##") - * - * calls expand_section(gap, "$.Dir1.Dir2.ABBA_Gold", "myleaf##") - * and expand_section(gap, "$.Dir1.Dir2.ABBA_Live", "myleaf##") - * - * If rest is just a leaf then all matches are added to gap. - * - * Returns number of items added to gap. - */ - int -expand_section(gap, root, rest, flags) - garray_T *gap; - char_u *root; /* Non-wildcarded path to search */ - char_u *rest; /* Wildcarded remainder of path */ - int flags; /* Add dirs/files/missing objects. */ -{ - static char_u buf[MAXPATHL]; /* Temporary buffer. */ - char_u dir[MAXPATHL]; - int start_element = -1; /* Start of wildcarded element */ - char_u c; - int i; - int got, dir_pos; - int buflen; /* Chars used in buf[] */ - int colon = 0; /* Dir ends in ':' */ - - buflen = strlen(root); - STRNCPY(buf, root, buflen); /* Copy root into buffer. */ - - /* - * Find end of nonwildcarded section. - * Count ':' as a path sep since Vim:Bug* is a valid pathname. - */ - - for (i = 0; c = rest[i]; i++) - { - if (c == PATHSEP) - { - start_element = i; - colon = 0; - } - if (c == ':') - { - start_element = i + 1; - colon = 1; - } - if (c == '#' || c == '*') - break; - } - if (c == 0) - start_element = i; - - /* - * start_element +> terminator for non-wildcarded section. - * Transfer this bit into buf. - */ - if (buflen + start_element + 4 >= MAXPATHL) - return 0; /* Buffer full */ - if (start_element >= 0) - { - if (*root && !colon) - buf[buflen++] = PATHSEP; - strncpy(buf + buflen, rest, start_element); - buflen += start_element; - } - buf[buflen] = 0; - - /* - * Did we reach the end of the string without hitting any wildcards? - */ - if (c == 0) - { - /* Yes - add combined path to grow array and return. */ - addfile(gap, buf, flags); - return 1; - } - - if (start_element < 0 || !colon) - start_element++; - rest += start_element; - - /* - * rest does contain wildcards if we get here. - * - * Now : have we reached the leaf names part yet? - * If so, add all matches (files and dirs) to gap. - * If not, get next path element and scan all matching directories. - */ - - start_element = -1; - for (i = 0; rest[i]; i++) - { - if (rest[i] == '.') - { - start_element = i; - rest[i] = 0; /* Break string here. */ - break; - } - } - - /* If start_element is -1 then we are matching leaf names */ - - r3 = 0; /* Number of objs read. */ - dir_pos = 0; /* Position through directory. */ - got = 0; /* Files added so far. */ - while (dir_pos != -1) - { - buf[buflen] = 0; - if (xswi(OS_GBPB, 9, - buf, /* Directory to scan. */ - buf + buflen + (1 - colon), /* Buffer for result. */ - 1, /* Number of objects to read. */ - dir_pos, /* Search position. */ - MAXPATHL - 2 - buflen, /* Size of result buffer. */ - rest) /* Wildcarded leafname. */ - & v_flag) - { - EMSG(r0 + 4); - r4 = -1; - } - dir_pos = r4; /* r4 corrupted by addfile() */ - if (r3 > 0) - { - char_u *path = buf; - if (buflen == 0) - path++; /* Don't do '.File' */ - else if (!colon) - buf[buflen] = '.'; /* Join path and leaf */ - - /* Path -> full path of object found */ - if (start_element == -1) - { - addfile(gap, path, flags); - got++; - } - else - { - /* Scan into subdirectories and images; ignore files */ - swi(OS_File, 17, path); - if (r0 == 2 || r0 == 3) - got += expand_section(gap, - path, - rest + start_element + 1, - flags); - } - } - } - - /* Restore the dot if we removed it. */ - if (start_element >= 0) - rest[start_element] = '.'; - return got; -} - -/* - * mch_expand_wildcards() - this code does wild-card pattern matching using - * the shell. It isn't used under RISC OS. - * - * return OK for success, FAIL for error (you may lose some memory) and put - * an error message in *file. - * - * num_pat is number of input patterns - * pat is array of pointers to input patterns - * num_file is pointer to number of matched file names - * file is pointer to array of pointers to matched file names - */ - int -mch_expand_wildcards(num_pat, pat, num_file, file, flags) - int num_pat; - char_u **pat; - int *num_file; - char_u ***file; - int flags; /* EW_* flags */ -{ - /* This doesn't get called unless SPECIAL_WILDCHAR is defined. */ - return FAIL; -} - -/* - * Return TRUE if "p" contains wildcards which can be expanded by - * mch_expandpath(). - */ - int -mch_has_exp_wildcard(p) - char_u *p; -{ - if (vim_strpbrk((char_u *)"*#", p)) - return TRUE; - return FALSE; -} - -/* Return TRUE if "p" contains wildcards. */ - int -mch_has_wildcard(p) - char_u *p; -{ - if (vim_strpbrk((char_u *)"*#`", p)) - return TRUE; - return FALSE; -} - - int /* see Unix unlink(2) */ -mch_remove(file) - char_u *file; /* Name of file to delete. */ -{ - if (xswi(OS_FSControl, 27, file, 0, 0) & v_flag) - return EXIT_FAILURE; - return EXIT_SUCCESS; -} - -/* Try to make existing scripts work without modification. - * Return a pointer to the new string (freed by caller), or NULL - * - * Two main cases: - * - Absolute : $VIM/syntax/help.vim - * - Relative : Adfs::4.$.!Vim.Resources.Syntax/help.vim - */ - char_u * -mch_munge_fname(fname) - char_u *fname; -{ - char_u c; - int len; - char_u *retval; - - retval = fname = vim_strsave(fname); - if (fname == NULL) - return NULL; - - if (strncmp(fname, "$VIM/", 5) == 0) - { - strncpy(fname, "Vim:", 4); - for (fname += 5; c = *fname; fname++) - { - if (c == '.') - break; - if (c == '/') - fname[-1] = '.'; - else - fname[-1] = c; - } - fname[-1] = '\0'; - } - else - { - /* Check to see if the file exists without modification. */ - if (xswi(OS_File, 17, fname) & v_flag) - r0 == 0; /* Invalid filename? */ - if (r0) - return retval; - - len = strlen(fname); - if (strcmp(fname + len - 4, ".vim") == 0) - { - fname[len - 4] = '\0'; - for (; c = *fname; fname++) - { - if (c == '/') - *fname = '.'; - } - } - } - return retval; -} - -/* QuickFix reads munged names from the error file. - * Correct them. - */ - int -ro_buflist_add(old_name) - char_u *old_name; /* Name of file found by quickfix */ -{ - char_u *fname; - char_u *leaf; /* Pointer to start of leaf in old_name */ - char_u *ptr; - char_u c; - int retval; - - if (old_name == NULL) - return buflist_add(NULL, 0); - - /* Copy the name so we can mess around with it. */ - fname = vim_strsave(old_name); - if (fname == NULL) - /* Out of memory - can't modify name */ - return buflist_add(old_name, 0); - - /* Change `dir/main.c' into `dir.c.main' */ - leaf = fname; - for (ptr = fname; c = *ptr; ptr++) - { - if (c == '/') - { - leaf = ptr + 1; - *ptr = '.'; - } - else if (c == '.') - break; - } - if (c == '.') - { - /* Change `main.c' into `c.main' - * | | - * leaf ptr - */ - ptr += old_name - fname; - *ptr = '\0'; - sprintf(leaf, - "%s.%s", - ptr + 1, - leaf - fname + old_name); - } - - retval = buflist_add(fname, 0); - free(fname); - return retval; -} - -/* Change the current directory. - * Strip trailing dots to make it easier to use with filename completion. - * Return 0 for success, -1 for failure. - */ - int -mch_chdir(dir) - char_u *dir; -{ - int length; - int retval; - char_u *new_dir; - - if (p_verbose >= 5) - { - verbose_enter(); - smsg((char_u *)"chdir(%s)", dir); - verbose_leave(); - } - length = strlen(dir); - if (dir[length - 1] != '.') - return chdir(dir); /* No trailing dots - nothing to do. */ - new_dir = vim_strsave(dir); - if (new_dir == NULL) - return chdir(dir); /* Can't allocate memory. */ - - while (new_dir[--length] == '.') - new_dir[length] = '\0'; - - retval = chdir(new_dir); - vim_free(new_dir); - return retval; -} - -/* Examine the named file, and set the 'osfiletype' option - * (in curbuf) to the file's type. - */ - void -mch_read_filetype(file) - char_u *file; -{ - int type; - char_u type_string[9]; - int i; - - if (xswi(OS_File, 23, file) & v_flag) - type = 0xfff; /* Default to Text */ - else - type = r6; - - /* Type is the numerical value - see if we have a textual equivalent */ - swi(OS_FSControl, 18, 0, type); - ((int *) type_string)[0] = r2; - ((int *) type_string)[1] = r3; - type_string[8] = 0; - for (i = 0; type_string[i] > ' '; i++) - ; - type_string[i] = 0; - - set_string_option_direct("osfiletype", -1, type_string, OPT_FREE, 0); - return; -} - - void -mch_set_filetype(file, type) - char_u *file; - char_u *type; -{ - if (xswi(OS_FSControl, 31, type) & v_flag) - { - EMSG(_("E366: Invalid 'osfiletype' option - using Text")); - r2 = 0xfff; - } - - swi(OS_File, 18, file, r2); -} - -/* Return TRUE if the file's type matches 'type' - * RISC OS types always start with '&' - */ - int -mch_check_filetype(fname, type) - char_u *fname; - char_u *type; -{ - int value; - char *end; - - if (*type != '&') - return FALSE; - - value = strtol(type + 1, &end, 16); - if (*end) - return FALSE; /* Invalid type (report error?) */ - - if (xswi(OS_File, 23, fname) & v_flag) - return FALSE; /* Invalid filename? */ - - return (r0 && r6 == value); -} diff --git a/src/os_riscos.h b/src/os_riscos.h deleted file mode 100644 index 47a48da79f..0000000000 --- a/src/os_riscos.h +++ /dev/null @@ -1,166 +0,0 @@ -/* vi:set ts=8 sts=4 sw=4: - * - * VIM - Vi IMproved by Bram Moolenaar - * - * Do ":help uganda" in Vim to read copying and usage conditions. - * Do ":help credits" in Vim to see a list of people who contributed. - */ - -#include -#include -#include -#include -#include -#include -#include -#include - -#define CASE_INSENSITIVE_FILENAME -#define FEAT_MODIFY_FNAME -#define FEAT_OSFILETYPE -#define DFLT_OFT "Text" -#define USE_TERM_CONSOLE -#define HAVE_AVAIL_MEM - -/* Longer filenames now accessible to all */ -#ifndef BASENAMELEN -# define BASENAMELEN 64 /* Same length as unzip */ -#endif - -#ifndef TEMNAME -# define TEMPNAME ".v?XXXXXX" -# define TEMPNAMELEN 25 -#endif - -#ifndef DFLT_HELPFILE -# define DFLT_HELPFILE "Vim:doc.help" -#endif - -#ifndef DFLT_BDIR -# define DFLT_BDIR ".,." /* default for 'backupdir' */ -#endif - -/* Paths to try putting swap file in. */ -#ifndef DFLT_DIR -# define DFLT_DIR ".,." /* default for 'directory' */ -#endif - -#ifndef DFLT_VDIR -# define DFLT_VDIR "Choices:Vim.view" /* default for 'viewdir' */ -#endif - -#ifndef TERMCAPFILE -# define TERMCAPFILE "Vim:TermCap" -#endif -#define HAVE_TGETENT - -#ifndef SYNTAX_FNAME -# define SYNTAX_FNAME "Vim:Syntax.%s" -#endif - -#ifndef EVIM_FILE -# define EVIM_FILE "Vim:Evim" -#endif - -#define FEAT_VIMINFO - -#ifndef VIMINFO_FILE -# define VIMINFO_FILE ".Vim.VimInfo" -#endif -#ifndef VIMINFO_FILE2 -# define VIMINFO_FILE2 "Choices:Vim.VimInfo" -#endif - -#ifndef VIMRC_FILE -# define VIMRC_FILE "/vimrc" -#endif -#ifndef EXRC_FILE -# define EXRC_FILE "/exrc" -#endif -#ifndef GVIMRC_FILE -# define GVIMRC_FILE "/gvimrc" -#endif -#ifndef USR_VIMRC_FILE -# define USR_VIMRC_FILE "Vim:Evim" -#endif -#ifndef SESSION_FILE -# define SESSION_FILE "/Session.vim" -#endif -#ifndef USR_VIMRC_FILE -# define USR_VIMRC_FILE "Choices:Vim.VimRC" -#endif -#ifndef USR_GVIMRC_FILE -# define USR_GVIMRC_FILE "Choices:Vim.GVimRC" -#endif -#ifndef USR_EXRC_FILE -# define USR_EXRC_FILE "Choices:Vim.ExRC" -#endif -#ifndef SYS_VIMRC_FILE -# define SYS_VIMRC_FILE "Vim:VimRC" -#endif -#ifndef SYS_GVIMRC_FILE -# define SYS_GVIMRC_FILE "Vim:GVimRC" -#endif -#ifndef SYS_MENU_FILE -# define SYS_MENU_FILE "Vim:Menu" -#endif -#ifndef SYS_OPTWIN_FILE -# define SYS_OPTWIN_FILE "Vim:Optwin" -#endif -#ifndef FILETYPE_FILE -# define FILETYPE_FILE "Vim:Filetype" -#endif -#ifndef FTPLUGIN_FILE -# define FTPLUGIN_FILE "Vim:Ftplugin/vim" -#endif -#ifndef INDENT_FILE -# define INDENT_FILE "Vim:Indent/vim" -#endif -#ifndef FTOFF_FILE -# define FTOFF_FILE "Vim:Ftoff" -#endif -#ifndef FTPLUGOF_FILE -# define FTPLUGOF_FILE "Vim:Ftplugof" -#endif -#ifndef INDOFF_FILE -# define INDOFF_FILE "Vim:Indoff" -#endif - -#define DFLT_ERRORFILE "errors/vim" -#define DFLT_RUNTIMEPATH "Choices:Vim,Vim:,Choices:Vim.after" - -/* - * RISC PCs have plenty of memory, use large buffers - */ -#define CMDBUFFSIZE 1024 /* size of the command processing buffer */ -#define MAXPATHL 256 /* paths are always quite short though */ - -#ifndef DFLT_MAXMEM -# define DFLT_MAXMEM (5*1024) /* use up to 5 Mbyte for a buffer */ -#endif - -#ifndef DFLT_MAXMEMTOT -# define DFLT_MAXMEMTOT (10*1024) /* use up to 10 Mbyte for Vim */ -#endif - -#ifdef HAVE_SIGSET -# define signal sigset -#endif - -#define n_flag (1<<31) -#define z_flag (1<<30) -#define c_flag (1<<29) -#define v_flag (1<<28) - -/* These take r0-r7 as inputs, returns r0-r7 in global variables. */ -void swi(int swinum, ...); /* Handles errors itself */ -int xswi(int swinum, ...); /* Returns errors using v flag */ -extern int r0, r1, r2, r3, r4, r5, r6, r7; /* For return values */ - -#include -#include - -#define mch_memmove(to, from, len) memmove((char *)(to), (char *)(from), len) -#define mch_rename(src, dst) rename(src, dst) -#define mch_getenv(x) (char_u *)getenv((char *)x) -#define mch_setenv(name, val, x) setenv(name, val, x) diff --git a/src/os_win32.c b/src/os_win32.c index 179ee64ad9..d4ef93988b 100644 --- a/src/os_win32.c +++ b/src/os_win32.c @@ -3401,6 +3401,7 @@ mch_call_shell( { STARTUPINFO si; PROCESS_INFORMATION pi; + DWORD flags = CREATE_NEW_CONSOLE; si.cb = sizeof(si); si.lpReserved = NULL; @@ -3418,6 +3419,22 @@ mch_call_shell( si.dwFlags = STARTF_USESHOWWINDOW; si.wShowWindow = SW_SHOWMINNOACTIVE; } + else if ((STRNICMP(cmdbase, "/b", 2) == 0) + && vim_iswhite(cmdbase[2])) + { + cmdbase = skipwhite(cmdbase + 2); + flags = CREATE_NO_WINDOW; + si.dwFlags = STARTF_USESTDHANDLES; + si.hStdInput = CreateFile("\\\\.\\NUL", // File name + GENERIC_READ, // Access flags + 0, // Share flags + NULL, // Security att. + OPEN_EXISTING, // Open flags + FILE_ATTRIBUTE_NORMAL, // File att. + NULL); // Temp file + si.hStdOutput = si.hStdInput; + si.hStdError = si.hStdInput; + } /* When the command is in double quotes, but 'shellxquote' is * empty, keep the double quotes around the command. @@ -3445,7 +3462,7 @@ mch_call_shell( NULL, // Process security attributes NULL, // Thread security attributes FALSE, // Inherit handles - CREATE_NEW_CONSOLE, // Creation flags + flags, // Creation flags NULL, // Environment NULL, // Current directory &si, // Startup information @@ -3458,6 +3475,11 @@ mch_call_shell( EMSG(_("E371: Command not found")); #endif } + if (si.hStdInput != NULL) + { + /* Close the handle to \\.\NUL */ + CloseHandle(si.hStdInput); + } /* Close the handles to the subprocess, so that it goes away */ CloseHandle(pi.hThread); CloseHandle(pi.hProcess); diff --git a/src/po/af.po b/src/po/af.po index 56fd428d56..d73660b6ed 100644 --- a/src/po/af.po +++ b/src/po/af.po @@ -1768,19 +1768,6 @@ msgstr "Seleksie" msgid "Undo" msgstr "Herroep" -msgid "E610: Can't load Zap font '%s'" -msgstr "E610: Kan nie Zap font '%s' laai nie" - -msgid "E611: Can't use font %s" -msgstr "E611: Kan nie font %s gebruik nie" - -msgid "" -"\n" -"Sending message to terminate child process.\n" -msgstr "" -"\n" -"Besig om doodsboodskap aan kindproses te stuur.\n" - msgid "E671: Cannot find window title \"%s\"" msgstr "E671: Kan nie venster titel vind nie \"%s\"" @@ -3752,9 +3739,6 @@ msgstr "E244: Ongeldige karakterstelnaam \"%s\" in fontnaam \"%s\"" msgid "E245: Illegal char '%c' in font name \"%s\"" msgstr "E245: Ongeldige karakter '%c' in fontnaam \"%s\"" -msgid "E366: Invalid 'osfiletype' option - using Text" -msgstr "E366: Ongeldige 'osfiletype' opsie - gaan Text gebruik" - msgid "Vim: Double signal, exiting\n" msgstr "Vim: Dubbel sein, staak\n" diff --git a/src/po/ca.po b/src/po/ca.po index 3e0b4b742b..20f3c4b20a 100644 --- a/src/po/ca.po +++ b/src/po/ca.po @@ -2076,21 +2076,6 @@ msgstr "Substitueix-les &totes" msgid "&Undo" msgstr "&Desfs" -#, c-format -msgid "E610: Can't load Zap font '%s'" -msgstr "E610: No s'ha pogut carregar la fosa Zap '%s'" - -#, c-format -msgid "E611: Can't use font %s" -msgstr "E611: No es pot utilitzar la fosa %s" - -msgid "" -"\n" -"Sending message to terminate child process.\n" -msgstr "" -"\n" -"Enviant un missatge per finalitzar el procs fill.\n" - #, c-format msgid "E671: Cannot find window title \"%s\"" msgstr "E671: No s'ha trobat el ttol de finestra \"%s\"" @@ -4282,9 +4267,6 @@ msgstr "E244: Conjunt de car msgid "E245: Illegal char '%c' in font name \"%s\"" msgstr "E245: Carcter '%c' illegal en el tipus \"%s\"" -msgid "E366: Invalid 'osfiletype' option - using Text" -msgstr "E366: L'opci 'osfiletype' no s vlida - s'usa Text" - msgid "Vim: Double signal, exiting\n" msgstr "Vim: S'ha rebut un doble senyal, sortint\n" diff --git a/src/po/de.po b/src/po/de.po index 0d331f8bae..e0c40333a8 100644 --- a/src/po/de.po +++ b/src/po/de.po @@ -1976,21 +1976,6 @@ msgstr "Ersetze &alles" msgid "&Undo" msgstr "&Rckgngig" -#, c-format -msgid "E610: Can't load Zap font '%s'" -msgstr "E610: Zap-Schriftart '%s' kann nicht geladen werden" - -#, c-format -msgid "E611: Can't use font %s" -msgstr "E611: Schriftart %s kann nicht verwendet werden" - -msgid "" -"\n" -"Sending message to terminate child process.\n" -msgstr "" -"\n" -"Sende Nachricht zum Beenden des Kind-Prozesses.\n" - #, c-format msgid "E671: Cannot find window title \"%s\"" msgstr "E671: Kann Fenstertitel \"%s\" nicht finden" @@ -4169,9 +4154,6 @@ msgstr "E244: Unzul msgid "E245: Illegal char '%c' in font name \"%s\"" msgstr "E245: Unzulssiges Zeichen '%c' in der Schriftart \"%s\"" -msgid "E366: Invalid 'osfiletype' option - using Text" -msgstr "E366: Unzulssige 'osfiletype'-Option - verwende Text" - msgid "Vim: Double signal, exiting\n" msgstr "Vim: Doppel-Signal, beenden\n" diff --git a/src/po/en_GB.po b/src/po/en_GB.po index 26409a8b7d..1caad8ae2f 100644 --- a/src/po/en_GB.po +++ b/src/po/en_GB.po @@ -139,14 +139,6 @@ msgstr "E614: vim_SelFile: cannot return to current directory" msgid "E615: vim_SelFile: can't get current directory" msgstr "E615: vim_SelFile: cannot get current directory" -#, c-format -msgid "E610: Can't load Zap font '%s'" -msgstr "E610: Cannot load Zap font '%s'" - -#, c-format -msgid "E611: Can't use font %s" -msgstr "E611: Cannot use font %s" - msgid "Vim E458: Cannot allocate colormap entry, some colors may be incorrect" msgstr "" "Vim E458: Cannot allocate colourmap entry, some colours may be incorrect" diff --git a/src/po/eo.po b/src/po/eo.po index b295153e21..4d35bfa3cf 100644 --- a/src/po/eo.po +++ b/src/po/eo.po @@ -2169,21 +2169,6 @@ msgstr "Anstataŭigi ĉi&on" msgid "&Undo" msgstr "&Malfari" -#, c-format -msgid "E610: Can't load Zap font '%s'" -msgstr "E610: Ne eblas ŝargi la tiparon Zap \"%s\"" - -#, c-format -msgid "E611: Can't use font %s" -msgstr "E611: Ne eblas uzi tiparon %s" - -msgid "" -"\n" -"Sending message to terminate child process.\n" -msgstr "" -"\n" -"Sendas mesaĝon por finigi idan procezon\n" - #, c-format msgid "E671: Cannot find window title \"%s\"" msgstr "E671: Ne eblas trovi titolon de fenestro \"%s\"" @@ -4508,10 +4493,6 @@ msgstr "E244: Nevalida nomo de signaro \"%s\" en nomo de tiparo \"%s\"" msgid "E245: Illegal char '%c' in font name \"%s\"" msgstr "E245: Nevalida signo '%c' en nomo de tiparo \"%s\"" -# DP: ĉu traduki Text? -msgid "E366: Invalid 'osfiletype' option - using Text" -msgstr "E366: Nevalida opcio 'osfiletype' - uzas Text" - msgid "Vim: Double signal, exiting\n" msgstr "Vim: Duobla signalo, eliranta\n" diff --git a/src/po/es.po b/src/po/es.po index ed30f7aab6..5a916caa27 100644 --- a/src/po/es.po +++ b/src/po/es.po @@ -2806,24 +2806,6 @@ msgstr "Reemplazar &Todos" msgid "&Undo" msgstr "&Deshacer" -#: gui_riscos.c:953 -#, c-format -msgid "E610: Can't load Zap font '%s'" -msgstr "E610: No se pudo cargar el tipo de letra de impresión Zap '%s'" - -#: gui_riscos.c:1052 -#, c-format -msgid "E611: Can't use font %s" -msgstr "E611: No se puede usar el tipo de letra de impresión %s" - -#: gui_riscos.c:3282 -msgid "" -"\n" -"Sending message to terminate child process.\n" -msgstr "" -"\n" -"Enviando mensaje para terminar los procesos dependientes (\"child\").\n" - #: gui_w32.c:1177 #, c-format msgid "E671: Cannot find window title \"%s\"" @@ -5814,10 +5796,6 @@ msgstr "" "E245: Carácter '%c' ilegal en el nombre del tipo de letra de\n" "impresión %s" -#: os_riscos.c:1263 -msgid "E366: Invalid 'osfiletype' option - using Text" -msgstr "E366: La opción \"osfiletype\" no es válida - usando Texto" - #: os_unix.c:1065 msgid "Vim: Double signal, exiting\n" msgstr "Vim: Señal doble, saliendo\n" diff --git a/src/po/fi.po b/src/po/fi.po index 6a2a69a60a..cacb00a878 100644 --- a/src/po/fi.po +++ b/src/po/fi.po @@ -2166,22 +2166,6 @@ msgstr "Korvaa k&aikki" msgid "&Undo" msgstr "&Kumoa" -#, c-format -msgid "E610: Can't load Zap font '%s'" -msgstr "E610: Zap-fontin latause ei onnistu %s" - -#, c-format -msgid "E611: Can't use font %s" -msgstr "E611: Ei voi kytt fonttia %s" - -# varmaan SIGTERM, ei SIGKILL tms. -msgid "" -"\n" -"Sending message to terminate child process.\n" -msgstr "" -"\n" -"Lhetetn viesti lapsiprosessien terminoimiseksi.\n" - #, c-format msgid "E671: Cannot find window title \"%s\"" msgstr "E671: Ikkunan otsikkoa ei lydy %s" @@ -4468,9 +4452,6 @@ msgstr "E244: Virheellinen merkist msgid "E245: Illegal char '%c' in font name \"%s\"" msgstr "E245: Virheellinen merkki %c fontin nimess %s" -msgid "E366: Invalid 'osfiletype' option - using Text" -msgstr "E366: Virheellinen osfiletype - kytetn Texti" - msgid "Vim: Double signal, exiting\n" msgstr "Vim: Kaksoissignaali, lopetetaan\n" diff --git a/src/po/fr.po b/src/po/fr.po index 7d384a1807..ef1a287158 100644 --- a/src/po/fr.po +++ b/src/po/fr.po @@ -2376,21 +2376,6 @@ msgstr "Rempl&acer tout" msgid "&Undo" msgstr "Ann&uler" -#, c-format -msgid "E610: Can't load Zap font '%s'" -msgstr "E610: Impossible de charger la police Zap '%s'" - -#, c-format -msgid "E611: Can't use font %s" -msgstr "E611: Impossible d'utiliser la police %s" - -msgid "" -"\n" -"Sending message to terminate child process.\n" -msgstr "" -"\n" -"Envoi d'un message pour interrompre le processus fils.\n" - #, c-format msgid "E671: Cannot find window title \"%s\"" msgstr "E671: Titre de fentre \"%s\" introuvable" @@ -4752,9 +4737,6 @@ msgstr "E244: Jeu de caract msgid "E245: Illegal char '%c' in font name \"%s\"" msgstr "E245: Caractre '%c' invalide dans le nom de fonte \"%s\"" -msgid "E366: Invalid 'osfiletype' option - using Text" -msgstr "E366: Option 'osfiletype' invalide - Text est utilis" - msgid "Vim: Double signal, exiting\n" msgstr "Vim : Double signal, sortie\n" diff --git a/src/po/ga.po b/src/po/ga.po index ea357703e0..d0c5821b5d 100644 --- a/src/po/ga.po +++ b/src/po/ga.po @@ -2140,21 +2140,6 @@ msgstr "Ionadaigh &Uile" msgid "&Undo" msgstr "&Cealaigh" -#, c-format -msgid "E610: Can't load Zap font '%s'" -msgstr "E610: N fidir an chlfhoireann Zap '%s' a lucht" - -#, c-format -msgid "E611: Can't use font %s" -msgstr "E611: N fidir an chlfhoireann %s a sid" - -msgid "" -"\n" -"Sending message to terminate child process.\n" -msgstr "" -"\n" -"Ag seoladh teachtaireachta chun an macphriseas a stopadh.\n" - #, c-format msgid "E671: Cannot find window title \"%s\"" msgstr "E671: N fidir teideal na fuinneoige \"%s\" a aimsi" @@ -4476,9 +4461,6 @@ msgstr "" msgid "E245: Illegal char '%c' in font name \"%s\"" msgstr "E245: Carachtar neamhcheadaithe '%c' mar phirt d'ainm cl \"%s\"" -msgid "E366: Invalid 'osfiletype' option - using Text" -msgstr "E366: Rogha neamhbhail 'osfiletype' - ag baint sid as `Text'" - msgid "Vim: Double signal, exiting\n" msgstr "Vim: Comhartha dbailte, ag scor\n" diff --git a/src/po/it.po b/src/po/it.po index ed7c42028d..c6b377ed04 100644 --- a/src/po/it.po +++ b/src/po/it.po @@ -2181,21 +2181,6 @@ msgstr "&A Sostituisci Tutto" msgid "&Undo" msgstr "&U Disfa" -#, c-format -msgid "E610: Can't load Zap font '%s'" -msgstr "E610: Non riesco a caricare il font Zap '%s'" - -#, c-format -msgid "E611: Can't use font %s" -msgstr "E611: Non riesco a usare il font %s" - -msgid "" -"\n" -"Sending message to terminate child process.\n" -msgstr "" -"\n" -"Spedisco un messaggio per terminare il processo figlio.\n" - #, c-format msgid "E671: Cannot find window title \"%s\"" msgstr "E671: Non trovo il titolo della finestra \"%s\"" @@ -4533,9 +4518,6 @@ msgstr "E244: Nome di charset non ammesso \"%s\" nel fonte di nome \"%s\"" msgid "E245: Illegal char '%c' in font name \"%s\"" msgstr "E245: Carattere non ammesso '%c' nel font di nome \"%s\"" -msgid "E366: Invalid 'osfiletype' option - using Text" -msgstr "E366: Opzione 'osfiletype' non valida - uso 'Text'" - msgid "Vim: Double signal, exiting\n" msgstr "Vim: Segnale doppio, esco\n" diff --git a/src/po/ja.po b/src/po/ja.po index aeb0d6b63b..2f9a541aed 100644 --- a/src/po/ja.po +++ b/src/po/ja.po @@ -2150,21 +2150,6 @@ msgstr " msgid "&Undo" msgstr "ɥ(&U)" -#, c-format -msgid "E610: Can't load Zap font '%s'" -msgstr "E610: Zapե '%s' ɹޤ" - -#, c-format -msgid "E611: Can't use font %s" -msgstr "E611: ե %s ѤǤޤ" - -msgid "" -"\n" -"Sending message to terminate child process.\n" -msgstr "" -"\n" -"ҥץߥåǤ.\n" - #, c-format msgid "E671: Cannot find window title \"%s\"" msgstr "E671: ȥ뤬 \"%s\" ΥɥϤߤĤޤ" @@ -4469,9 +4454,6 @@ msgstr "E244: ʸ msgid "E245: Illegal char '%c' in font name \"%s\"" msgstr "E245: '%c' ʸǤ (ե̾ \"%s\")" -msgid "E366: Invalid 'osfiletype' option - using Text" -msgstr "E366: ̵ 'osfiletype' ץ - \"Text\" Ȥޤ" - msgid "Vim: Double signal, exiting\n" msgstr "Vim: 2ŤΥʥΤ, λޤ\n" diff --git a/src/po/ja.sjis.po b/src/po/ja.sjis.po index 0bc66889b2..3fe29b7db8 100644 --- a/src/po/ja.sjis.po +++ b/src/po/ja.sjis.po @@ -2150,21 +2150,6 @@ msgstr " msgid "&Undo" msgstr "AhD(&U)" -#, c-format -msgid "E610: Can't load Zap font '%s'" -msgstr "E610: ZaptHg '%s' Ǎ߂܂" - -#, c-format -msgid "E611: Can't use font %s" -msgstr "E611: tHg %s gpł܂" - -msgid "" -"\n" -"Sending message to terminate child process.\n" -msgstr "" -"\n" -"qvZX֒~bZ[W𑗐Mł.\n" - #, c-format msgid "E671: Cannot find window title \"%s\"" msgstr "E671: ^Cg \"%s\" ̃EBhE݂͂‚܂" @@ -4469,9 +4454,6 @@ msgstr "E244: msgid "E245: Illegal char '%c' in font name \"%s\"" msgstr "E245: '%c' ͕sȕł (tHg \"%s\")" -msgid "E366: Invalid 'osfiletype' option - using Text" -msgstr "E366: 'osfiletype' IvV - \"Text\" g܂" - msgid "Vim: Double signal, exiting\n" msgstr "Vim: 2d̃VOî, I܂\n" diff --git a/src/po/ko.UTF-8.po b/src/po/ko.UTF-8.po index ce72947de1..3da9a185c7 100644 --- a/src/po/ko.UTF-8.po +++ b/src/po/ko.UTF-8.po @@ -2134,21 +2134,6 @@ msgstr "모두 바꾸기(&A)" msgid "&Undo" msgstr "취소(&U)" -#, c-format -msgid "E610: Can't load Zap font '%s'" -msgstr "E610: Zap 글꼴 '%s'을(를) 로드할 수 없습니다" - -#, c-format -msgid "E611: Can't use font %s" -msgstr "E611: 글꼴 %s을(를) 사용할 수 없습니다" - -msgid "" -"\n" -"Sending message to terminate child process.\n" -msgstr "" -"\n" -"자식 프로세스를 끝내기 위해 메시지를 보냈습니다.\n" - #, c-format msgid "E671: Cannot find window title \"%s\"" msgstr "E671: 창 제목 \"%s\"을(를) 찾을 수 없습니다" @@ -4426,9 +4411,6 @@ msgstr "E244: 잘못된 글자셋 이름 \"%s\"이(가) 글꼴 이름 \"%s\"에 msgid "E245: Illegal char '%c' in font name \"%s\"" msgstr "E245: 잘못된 글자 '%c'이(가) 글꼴 이름 \"%s\"에 있습니다" -msgid "E366: Invalid 'osfiletype' option - using Text" -msgstr "E366: 잘못된 'osfiletype' 옵션 - Text를 사용합니다" - msgid "Vim: Double signal, exiting\n" msgstr "빔: 같은 시그널 두 번, 끝냅니다\n" diff --git a/src/po/ko.po b/src/po/ko.po index b12e73b660..5a447dae9b 100644 --- a/src/po/ko.po +++ b/src/po/ko.po @@ -2134,21 +2134,6 @@ msgstr " msgid "&Undo" msgstr "(&U)" -#, c-format -msgid "E610: Can't load Zap font '%s'" -msgstr "E610: Zap ۲ '%s'() ε ϴ" - -#, c-format -msgid "E611: Can't use font %s" -msgstr "E611: ۲ %s() ϴ" - -msgid "" -"\n" -"Sending message to terminate child process.\n" -msgstr "" -"\n" -"ڽ μ ޽ ½ϴ.\n" - #, c-format msgid "E671: Cannot find window title \"%s\"" msgstr "E671: â \"%s\"() ã ϴ" @@ -4426,9 +4411,6 @@ msgstr "E244: msgid "E245: Illegal char '%c' in font name \"%s\"" msgstr "E245: ߸ '%c'() ۲ ̸ \"%s\" ֽϴ" -msgid "E366: Invalid 'osfiletype' option - using Text" -msgstr "E366: ߸ 'osfiletype' ɼ - Text մϴ" - msgid "Vim: Double signal, exiting\n" msgstr ": ñ׳ , ϴ\n" diff --git a/src/po/nb.po b/src/po/nb.po index 238bcc6890..f6d4761cb5 100644 --- a/src/po/nb.po +++ b/src/po/nb.po @@ -2069,21 +2069,6 @@ msgstr "Erstatt &alle" msgid "&Undo" msgstr "&Angre" -#, c-format -msgid "E610: Can't load Zap font '%s'" -msgstr "E610: Kan ikke laste Zap-skrifttype '%s'" - -#, c-format -msgid "E611: Can't use font %s" -msgstr "E611: Kan ikke bruke skrifttype %s" - -msgid "" -"\n" -"Sending message to terminate child process.\n" -msgstr "" -"\n" -"Sender beskjed om avslutte barneprosess.\n" - #, c-format msgid "E671: Cannot find window title \"%s\"" msgstr "E671: Fant ikke vindutittel \"%s\"" @@ -4324,9 +4309,6 @@ msgstr "E244: Ulovlig navn p msgid "E245: Illegal char '%c' in font name \"%s\"" msgstr "E245: Ulovlig tegn '%c' i skrifttypenavn \"%s\"" -msgid "E366: Invalid 'osfiletype' option - using Text" -msgstr "E366: Ugyldig 'osfiletype'-valg - bruker Text" - msgid "Vim: Double signal, exiting\n" msgstr "Vim: Dobbelt signal, avslutter\n" diff --git a/src/po/no.po b/src/po/no.po index 238bcc6890..f6d4761cb5 100644 --- a/src/po/no.po +++ b/src/po/no.po @@ -2069,21 +2069,6 @@ msgstr "Erstatt &alle" msgid "&Undo" msgstr "&Angre" -#, c-format -msgid "E610: Can't load Zap font '%s'" -msgstr "E610: Kan ikke laste Zap-skrifttype '%s'" - -#, c-format -msgid "E611: Can't use font %s" -msgstr "E611: Kan ikke bruke skrifttype %s" - -msgid "" -"\n" -"Sending message to terminate child process.\n" -msgstr "" -"\n" -"Sender beskjed om avslutte barneprosess.\n" - #, c-format msgid "E671: Cannot find window title \"%s\"" msgstr "E671: Fant ikke vindutittel \"%s\"" @@ -4324,9 +4309,6 @@ msgstr "E244: Ulovlig navn p msgid "E245: Illegal char '%c' in font name \"%s\"" msgstr "E245: Ulovlig tegn '%c' i skrifttypenavn \"%s\"" -msgid "E366: Invalid 'osfiletype' option - using Text" -msgstr "E366: Ugyldig 'osfiletype'-valg - bruker Text" - msgid "Vim: Double signal, exiting\n" msgstr "Vim: Dobbelt signal, avslutter\n" diff --git a/src/po/pl.UTF-8.po b/src/po/pl.UTF-8.po index facbd14e35..725c92beba 100644 --- a/src/po/pl.UTF-8.po +++ b/src/po/pl.UTF-8.po @@ -2146,21 +2146,6 @@ msgstr "Zamień &wszystko" msgid "&Undo" msgstr "&Cofnij" -#, c-format -msgid "E610: Can't load Zap font '%s'" -msgstr "E610: Nie mogę załadować czcionki Zap '%s'" - -#, c-format -msgid "E611: Can't use font %s" -msgstr "E611: Nie mogę użyć czcionki %s" - -msgid "" -"\n" -"Sending message to terminate child process.\n" -msgstr "" -"\n" -"Wysyłam zawiadomienie kończące proces pochodny.\n" - #, c-format msgid "E671: Cannot find window title \"%s\"" msgstr "E671: Nie mogę znaleźć tytułu okna \"%s\"" @@ -4472,9 +4457,6 @@ msgstr "" msgid "E245: Illegal char '%c' in font name \"%s\"" msgstr "E245: Niedozwolony znak '%c' w nazwie czcionki \"%s\"" -msgid "E366: Invalid 'osfiletype' option - using Text" -msgstr "E366: Niewłaściwa opcja 'osfiletype' - używam Text" - msgid "Vim: Double signal, exiting\n" msgstr "Vim: Podwójny sygnał, wychodzę\n" diff --git a/src/po/pl.cp1250.po b/src/po/pl.cp1250.po index b5f649a661..f502e36b85 100644 --- a/src/po/pl.cp1250.po +++ b/src/po/pl.cp1250.po @@ -2146,21 +2146,6 @@ msgstr "Zamie msgid "&Undo" msgstr "&Cofnij" -#, c-format -msgid "E610: Can't load Zap font '%s'" -msgstr "E610: Nie mog zaadowa czcionki Zap '%s'" - -#, c-format -msgid "E611: Can't use font %s" -msgstr "E611: Nie mog uy czcionki %s" - -msgid "" -"\n" -"Sending message to terminate child process.\n" -msgstr "" -"\n" -"Wysyam zawiadomienie koczce proces pochodny.\n" - #, c-format msgid "E671: Cannot find window title \"%s\"" msgstr "E671: Nie mog znale tytuu okna \"%s\"" @@ -4472,9 +4457,6 @@ msgstr "" msgid "E245: Illegal char '%c' in font name \"%s\"" msgstr "E245: Niedozwolony znak '%c' w nazwie czcionki \"%s\"" -msgid "E366: Invalid 'osfiletype' option - using Text" -msgstr "E366: Niewaciwa opcja 'osfiletype' - uywam Text" - msgid "Vim: Double signal, exiting\n" msgstr "Vim: Podwjny sygna, wychodz\n" diff --git a/src/po/pl.po b/src/po/pl.po index 30ed4dc725..19a4471fd0 100644 --- a/src/po/pl.po +++ b/src/po/pl.po @@ -2146,21 +2146,6 @@ msgstr "Zamie msgid "&Undo" msgstr "&Cofnij" -#, c-format -msgid "E610: Can't load Zap font '%s'" -msgstr "E610: Nie mog zaadowa czcionki Zap '%s'" - -#, c-format -msgid "E611: Can't use font %s" -msgstr "E611: Nie mog uy czcionki %s" - -msgid "" -"\n" -"Sending message to terminate child process.\n" -msgstr "" -"\n" -"Wysyam zawiadomienie koczce proces pochodny.\n" - #, c-format msgid "E671: Cannot find window title \"%s\"" msgstr "E671: Nie mog znale tytuu okna \"%s\"" @@ -4472,9 +4457,6 @@ msgstr "" msgid "E245: Illegal char '%c' in font name \"%s\"" msgstr "E245: Niedozwolony znak '%c' w nazwie czcionki \"%s\"" -msgid "E366: Invalid 'osfiletype' option - using Text" -msgstr "E366: Niewaciwa opcja 'osfiletype' - uywam Text" - msgid "Vim: Double signal, exiting\n" msgstr "Vim: Podwjny sygna, wychodz\n" diff --git a/src/po/pt_BR.po b/src/po/pt_BR.po index 187991306e..a88cf2ca86 100644 --- a/src/po/pt_BR.po +++ b/src/po/pt_BR.po @@ -2097,21 +2097,6 @@ msgstr "Substituir &todas" msgid "&Undo" msgstr "&Desfazer" -#, c-format -msgid "E610: Can't load Zap font '%s'" -msgstr "E610: Impossvel carregar a fonte Zap '%s'" - -#, c-format -msgid "E611: Can't use font %s" -msgstr "E611: Impossvel usar a fonte %s" - -msgid "" -"\n" -"Sending message to terminate child process.\n" -msgstr "" -"\n" -"Enviando mensagem para terminar processo-filho.\n" - #, c-format msgid "E671: Cannot find window title \"%s\"" msgstr "E671: Impossvel encontrar janela de ttulo \"%s\"" @@ -4342,9 +4327,6 @@ msgstr "E244: Conjunto de caracteres \"%s\" inv msgid "E245: Illegal char '%c' in font name \"%s\"" msgstr "E245: Caractere '%c' invlido no nome da fonte \"%s\"" -msgid "E366: Invalid 'osfiletype' option - using Text" -msgstr "E366: Valor invlido para 'osfiletype' - usando Text" - msgid "Vim: Double signal, exiting\n" msgstr "Vim: Sinal duplo, saindo\n" diff --git a/src/po/ru.cp1251.po b/src/po/ru.cp1251.po index 7485f8d823..1ab0676e00 100644 --- a/src/po/ru.cp1251.po +++ b/src/po/ru.cp1251.po @@ -1790,21 +1790,6 @@ msgstr " msgid "Undo" msgstr "" -#, c-format -msgid "E610: Can't load Zap font '%s'" -msgstr "E610: Zap '%s'" - -#, c-format -msgid "E611: Can't use font %s" -msgstr "E611: %s" - -msgid "" -"\n" -"Sending message to terminate child process.\n" -msgstr "" -"\n" -" -.\n" - msgid "E671: Cannot find window title \"%s\"" msgstr "E671: \"%s\" " @@ -3816,9 +3801,6 @@ msgstr "E244: msgid "E245: Illegal char '%c' in font name \"%s\"" msgstr "E245: '%c' \"%s\"" -msgid "E366: Invalid 'osfiletype' option - using Text" -msgstr "E366: 'osfiletype' -- Text" - msgid "Vim: Double signal, exiting\n" msgstr "Vim: , \n" diff --git a/src/po/ru.po b/src/po/ru.po index 612d3a6b03..e5ad7074e6 100644 --- a/src/po/ru.po +++ b/src/po/ru.po @@ -1790,21 +1790,6 @@ msgstr "Выделение" msgid "Undo" msgstr "Отмена" -#, c-format -msgid "E610: Can't load Zap font '%s'" -msgstr "E610: Невозможно загрузить шрифт Zap '%s'" - -#, c-format -msgid "E611: Can't use font %s" -msgstr "E611: Невозможно использовать шрифт %s" - -msgid "" -"\n" -"Sending message to terminate child process.\n" -msgstr "" -"\n" -"Отправка сообщения для уничтожения процесса-потомка.\n" - msgid "E671: Cannot find window title \"%s\"" msgstr "E671: Окно с заголовком \"%s\" не обнаружено" @@ -3816,9 +3801,6 @@ msgstr "E244: Недопустимое имя кодировки \"%s\" в им msgid "E245: Illegal char '%c' in font name \"%s\"" msgstr "E245: Недопустимый символ '%c' в имени шрифта \"%s\"" -msgid "E366: Invalid 'osfiletype' option - using Text" -msgstr "E366: Недопустимое значение опции 'osfiletype' -- используется Text" - msgid "Vim: Double signal, exiting\n" msgstr "Vim: Двойной сигнал, завершение работы\n" diff --git a/src/po/sk.cp1250.po b/src/po/sk.cp1250.po index bc1efda86b..ebc31c1ed7 100644 --- a/src/po/sk.cp1250.po +++ b/src/po/sk.cp1250.po @@ -1908,19 +1908,6 @@ msgstr "Nahradi msgid "&Undo" msgstr "&Sp" -msgid "E610: Can't load Zap font '%s'" -msgstr "E610: Nemem nata chybn font '%s'" - -msgid "E611: Can't use font %s" -msgstr "E611: Ned sa pou psmo %s" - -msgid "" -"\n" -"Sending message to terminate child process.\n" -msgstr "" -"\n" -"Posielam sprvu na ukonenie synovskho procesu.\n" - msgid "E671: Cannot find window title \"%s\"" msgstr "E671: Nemono njs okno s titulkom \"%s\"" @@ -4095,9 +4082,6 @@ msgstr "E244: Chybn msgid "E245: Illegal char '%c' in font name \"%s\"" msgstr "E245: Chybn znak '%c' v nzve psma \"%s\"" -msgid "E366: Invalid 'osfiletype' option - using Text" -msgstr "E366: Chybn 'osfiletype' voba - pouitie Textu" - msgid "Vim: Double signal, exiting\n" msgstr "Vim: dvojit signl, konm\n" diff --git a/src/po/sk.po b/src/po/sk.po index b59b0144b9..477f441f11 100644 --- a/src/po/sk.po +++ b/src/po/sk.po @@ -1908,19 +1908,6 @@ msgstr "Nahradi msgid "&Undo" msgstr "&Sp" -msgid "E610: Can't load Zap font '%s'" -msgstr "E610: Nemem nata chybn font '%s'" - -msgid "E611: Can't use font %s" -msgstr "E611: Ned sa pou psmo %s" - -msgid "" -"\n" -"Sending message to terminate child process.\n" -msgstr "" -"\n" -"Posielam sprvu na ukonenie synovskho procesu.\n" - msgid "E671: Cannot find window title \"%s\"" msgstr "E671: Nemono njs okno s titulkom \"%s\"" @@ -4095,9 +4082,6 @@ msgstr "E244: Chybn msgid "E245: Illegal char '%c' in font name \"%s\"" msgstr "E245: Chybn znak '%c' v nzve psma \"%s\"" -msgid "E366: Invalid 'osfiletype' option - using Text" -msgstr "E366: Chybn 'osfiletype' voba - pouitie Textu" - msgid "Vim: Double signal, exiting\n" msgstr "Vim: dvojit signl, konm\n" diff --git a/src/po/sv.po b/src/po/sv.po index 6516e9d352..43c8de9e95 100644 --- a/src/po/sv.po +++ b/src/po/sv.po @@ -2037,21 +2037,6 @@ msgstr "Ers msgid "&Undo" msgstr "&ngra" -#, c-format -msgid "E610: Can't load Zap font '%s'" -msgstr "E610: Kan inte lsa in Zap-typsnitt '%s'" - -#, c-format -msgid "E611: Can't use font %s" -msgstr "E611: Kan inte anvnda typsnitt %s" - -msgid "" -"\n" -"Sending message to terminate child process.\n" -msgstr "" -"\n" -"Skickar meddelande fr att avsluta barnprocess.\n" - #, c-format msgid "E671: Cannot find window title \"%s\"" msgstr "E671: Kan inte hitta fnstertitel \"%s\"" @@ -4303,9 +4288,6 @@ msgstr "E244: Otill msgid "E245: Illegal char '%c' in font name \"%s\"" msgstr "E245: Otilltet tecken '%c' i typsnittsnamn \"%s\"" -msgid "E366: Invalid 'osfiletype' option - using Text" -msgstr "E366: Ogiltig 'osfiletype'-flagga - anvnder Text" - msgid "Vim: Double signal, exiting\n" msgstr "Vim: Dubbelsignal, avslutar\n" diff --git a/src/po/uk.cp1251.po b/src/po/uk.cp1251.po index 8516458015..ac73ed821d 100644 --- a/src/po/uk.cp1251.po +++ b/src/po/uk.cp1251.po @@ -2198,23 +2198,6 @@ msgstr "&A: msgid "&Undo" msgstr "&U:" -#, c-format -msgid "E610: Can't load Zap font '%s'" -msgstr "E610: Zap '%s'" - -# msgstr "E235: " -#, c-format -msgid "E611: Can't use font %s" -msgstr "E611: %s" - -# msgstr "E242: " -msgid "" -"\n" -"Sending message to terminate child process.\n" -msgstr "" -"\n" -" .\n" - #, c-format msgid "E671: Cannot find window title \"%s\"" msgstr "E671: \"%s\"" @@ -4590,10 +4573,6 @@ msgstr "E244: msgid "E245: Illegal char '%c' in font name \"%s\"" msgstr "E245: %c \"%s\"" -msgid "E366: Invalid 'osfiletype' option - using Text" -msgstr "E366: 'osfiletype' -- `Text'" - -# msgstr "E366: " msgid "Vim: Double signal, exiting\n" msgstr "Vim: , \n" diff --git a/src/po/uk.po b/src/po/uk.po index fb624e7405..06722ab279 100644 --- a/src/po/uk.po +++ b/src/po/uk.po @@ -2198,23 +2198,6 @@ msgstr "&A:Замінити усі" msgid "&Undo" msgstr "&U:Скасувати" -#, c-format -msgid "E610: Can't load Zap font '%s'" -msgstr "E610: Не вдалося завантажити шрифт Zap '%s'" - -# msgstr "E235: " -#, c-format -msgid "E611: Can't use font %s" -msgstr "E611: Не вдалося використати шрифт %s" - -# msgstr "E242: " -msgid "" -"\n" -"Sending message to terminate child process.\n" -msgstr "" -"\n" -"Посилається повідомлення щоб припинити дочірній процес.\n" - #, c-format msgid "E671: Cannot find window title \"%s\"" msgstr "E671: Не вдалося знайти вікно \"%s\"" @@ -4590,10 +4573,6 @@ msgstr "E244: Некоректна назва набору символів \"%s msgid "E245: Illegal char '%c' in font name \"%s\"" msgstr "E245: Помилковий символ %c в назві шрифту \"%s\"" -msgid "E366: Invalid 'osfiletype' option - using Text" -msgstr "E366: Неправильна опція 'osfiletype' -- буде `Text'" - -# msgstr "E366: " msgid "Vim: Double signal, exiting\n" msgstr "Vim: Двічі отримано сигнал, вихід\n" diff --git a/src/po/vi.po b/src/po/vi.po index ba3a26d56f..908b2eb158 100644 --- a/src/po/vi.po +++ b/src/po/vi.po @@ -1784,21 +1784,6 @@ msgstr "Lựa chọn" msgid "Undo" msgstr "Hủy thao tác" -#, c-format -msgid "E610: Can't load Zap font '%s'" -msgstr "E610: Không nạp được phông chữ Zap '%s'" - -#, c-format -msgid "E611: Can't use font %s" -msgstr "E611: Không sử dụng được phông chữ %s" - -msgid "" -"\n" -"Sending message to terminate child process.\n" -msgstr "" -"\n" -"Gửi thông báo để \"hủy diệt\" (dừng) tiến trình con.\n" - #, c-format msgid "E671: Cannot find window title \"%s\"" msgstr "E671: Không tìm được tiêu đề cửa sổ \"%s\"" @@ -3801,9 +3786,6 @@ msgstr "E244: Tên bảng mã không cho phép \"%s\" trong tên phông chữ \" msgid "E245: Illegal char '%c' in font name \"%s\"" msgstr "E245: Ký tự không cho phép '%c' trong tên phông chữ \"%s\"" -msgid "E366: Invalid 'osfiletype' option - using Text" -msgstr "E366: Giá trị tùy chọn 'osfiletype' không cho phép - sử dụng Text" - msgid "Vim: Double signal, exiting\n" msgstr "Vim: Tín hiệu đôi, thoát\n" diff --git a/src/po/zh_CN.UTF-8.po b/src/po/zh_CN.UTF-8.po index 6bfbb36a81..a2a11b62b0 100644 --- a/src/po/zh_CN.UTF-8.po +++ b/src/po/zh_CN.UTF-8.po @@ -2015,21 +2015,6 @@ msgstr "全部替换(&A)" msgid "&Undo" msgstr "撤销(&U)" -#, c-format -msgid "E610: Can't load Zap font '%s'" -msgstr "E610: 无法加载 Zap 字体 '%s'" - -#, c-format -msgid "E611: Can't use font %s" -msgstr "E611: 无法使用字体 %s" - -msgid "" -"\n" -"Sending message to terminate child process.\n" -msgstr "" -"\n" -"正在发送消息终止子进程。\n" - #, c-format msgid "E671: Cannot find window title \"%s\"" msgstr "E671: 找不到窗口标题 \"%s\"" @@ -4226,9 +4211,6 @@ msgstr "E244: 字符集 \"%s\" 不能对应字体\"%s\"" msgid "E245: Illegal char '%c' in font name \"%s\"" msgstr "E245: 不正确的字符 '%c' 出现在字体名称 \"%s\" 内" -msgid "E366: Invalid 'osfiletype' option - using Text" -msgstr "E366: 不正确的 'osfiletype' 选项 - 使用纯文字模式" - msgid "Vim: Double signal, exiting\n" msgstr "Vim: 双重信号,退出中\n" diff --git a/src/po/zh_CN.cp936.po b/src/po/zh_CN.cp936.po index 7b33e31640..585789e956 100644 --- a/src/po/zh_CN.cp936.po +++ b/src/po/zh_CN.cp936.po @@ -2015,21 +2015,6 @@ msgstr "ȫ msgid "&Undo" msgstr "(&U)" -#, c-format -msgid "E610: Can't load Zap font '%s'" -msgstr "E610: ޷ Zap '%s'" - -#, c-format -msgid "E611: Can't use font %s" -msgstr "E611: ޷ʹ %s" - -msgid "" -"\n" -"Sending message to terminate child process.\n" -msgstr "" -"\n" -"ڷϢֹӽ̡\n" - #, c-format msgid "E671: Cannot find window title \"%s\"" msgstr "E671: Ҳڱ \"%s\"" @@ -4226,9 +4211,6 @@ msgstr "E244: msgid "E245: Illegal char '%c' in font name \"%s\"" msgstr "E245: ȷַ '%c' \"%s\" " -msgid "E366: Invalid 'osfiletype' option - using Text" -msgstr "E366: ȷ 'osfiletype' ѡ - ʹôģʽ" - msgid "Vim: Double signal, exiting\n" msgstr "Vim: ˫źţ˳\n" diff --git a/src/po/zh_CN.po b/src/po/zh_CN.po index 696b3dd5dc..3db2241c56 100644 --- a/src/po/zh_CN.po +++ b/src/po/zh_CN.po @@ -2015,21 +2015,6 @@ msgstr "ȫ msgid "&Undo" msgstr "(&U)" -#, c-format -msgid "E610: Can't load Zap font '%s'" -msgstr "E610: ޷ Zap '%s'" - -#, c-format -msgid "E611: Can't use font %s" -msgstr "E611: ޷ʹ %s" - -msgid "" -"\n" -"Sending message to terminate child process.\n" -msgstr "" -"\n" -"ڷϢֹӽ̡\n" - #, c-format msgid "E671: Cannot find window title \"%s\"" msgstr "E671: Ҳڱ \"%s\"" @@ -4226,9 +4211,6 @@ msgstr "E244: msgid "E245: Illegal char '%c' in font name \"%s\"" msgstr "E245: ȷַ '%c' \"%s\" " -msgid "E366: Invalid 'osfiletype' option - using Text" -msgstr "E366: ȷ 'osfiletype' ѡ - ʹôģʽ" - msgid "Vim: Double signal, exiting\n" msgstr "Vim: ˫źţ˳\n" diff --git a/src/po/zh_TW.UTF-8.po b/src/po/zh_TW.UTF-8.po index 7aea37bb75..d7b6501a17 100644 --- a/src/po/zh_TW.UTF-8.po +++ b/src/po/zh_TW.UTF-8.po @@ -1805,21 +1805,6 @@ msgstr "選擇" msgid "Undo" msgstr "復原" -#, c-format -msgid "E610: Can't load Zap font '%s'" -msgstr "E610: 無法開啟 Zap 字型 '%s'" - -#, c-format -msgid "E611: Can't use font %s" -msgstr "E611: 無法使用字型 %s" - -msgid "" -"\n" -"Sending message to terminate child process.\n" -msgstr "" -"\n" -"送出中斷子程式的訊息中.\n" - #, c-format msgid "E671: Cannot find window title \"%s\"" msgstr "E671: 找不到標題為 \"%s\" 的視窗" @@ -3785,9 +3770,6 @@ msgstr "E244: 字元集 \"%s\" 無法對應字型\"%s\"" msgid "E245: Illegal char '%c' in font name \"%s\"" msgstr "E245: 不正確的字元 '%c' 出現在字型名稱 \"%s\" 內" -msgid "E366: Invalid 'osfiletype' option - using Text" -msgstr "E366: 不正確的 'filetype' 選項 - 使用純文字模式" - msgid "Vim: Double signal, exiting\n" msgstr "Vim: 雙重signal, 離開中\n" diff --git a/src/po/zh_TW.po b/src/po/zh_TW.po index ed844c7c57..6f43c8025a 100644 --- a/src/po/zh_TW.po +++ b/src/po/zh_TW.po @@ -1798,21 +1798,6 @@ msgstr " msgid "Undo" msgstr "_" -#, c-format -msgid "E610: Can't load Zap font '%s'" -msgstr "E610: Lk} Zap r '%s'" - -#, c-format -msgid "E611: Can't use font %s" -msgstr "E611: LkϥΦr %s" - -msgid "" -"\n" -"Sending message to terminate child process.\n" -msgstr "" -"\n" -"eX_l{T.\n" - #, c-format msgid "E671: Cannot find window title \"%s\"" msgstr "E671: 䤣D \"%s\" " @@ -3778,9 +3763,6 @@ msgstr "E244: msgid "E245: Illegal char '%c' in font name \"%s\"" msgstr "E245: Tr '%c' X{brW \"%s\" " -msgid "E366: Invalid 'osfiletype' option - using Text" -msgstr "E366: T 'filetype' ﶵ - ϥί¤rҦ" - msgid "Vim: Double signal, exiting\n" msgstr "Vim: signal, }\n" diff --git a/src/proto.h b/src/proto.h index 289c7cb687..0e03faa2ed 100644 --- a/src/proto.h +++ b/src/proto.h @@ -62,9 +62,6 @@ extern int _stricoll __ARGS((char *a, char *b)); # ifdef __BEOS__ # include "os_beos.pro" # endif -# ifdef RISCOS -# include "os_riscos.pro" -# endif # ifdef __QNX__ # include "os_qnx.pro" # endif @@ -248,9 +245,6 @@ extern char *vim_SelFile __ARGS((Widget toplevel, char *prompt, char *init_path, # ifdef FEAT_GUI_X11 # include "gui_x11.pro" # endif -# ifdef RISCOS -# include "gui_riscos.pro" -# endif # ifdef FEAT_GUI_PHOTON # include "gui_photon.pro" # endif diff --git a/src/proto/ex_cmds2.pro b/src/proto/ex_cmds2.pro index 2c89fe3fe5..dc3bb790bb 100644 --- a/src/proto/ex_cmds2.pro +++ b/src/proto/ex_cmds2.pro @@ -83,5 +83,7 @@ void ex_checktime __ARGS((exarg_T *eap)); char_u *get_mess_lang __ARGS((void)); void set_lang_var __ARGS((void)); void ex_language __ARGS((exarg_T *eap)); +void free_locales __ARGS((void)); char_u *get_lang_arg __ARGS((expand_T *xp, int idx)); +char_u *get_locales __ARGS((expand_T *xp, int idx)); /* vim: set ft=c : */ diff --git a/src/proto/ex_getln.pro b/src/proto/ex_getln.pro index cdc49a838f..26eb00d291 100644 --- a/src/proto/ex_getln.pro +++ b/src/proto/ex_getln.pro @@ -31,7 +31,7 @@ char_u *sm_gettail __ARGS((char_u *s)); char_u *addstar __ARGS((char_u *fname, int len, int context)); void set_cmd_context __ARGS((expand_T *xp, char_u *str, int len, int col)); int expand_cmdline __ARGS((expand_T *xp, char_u *str, int col, int *matchcount, char_u ***matches)); -int ExpandGeneric __ARGS((expand_T *xp, regmatch_T *regmatch, int *num_file, char_u ***file, char_u *((*func)(expand_T *, int)))); +int ExpandGeneric __ARGS((expand_T *xp, regmatch_T *regmatch, int *num_file, char_u ***file, char_u *((*func)(expand_T *, int)), int escaped)); char_u *globpath __ARGS((char_u *path, char_u *file, int expand_options)); void init_history __ARGS((void)); int get_histtype __ARGS((char_u *name)); diff --git a/src/proto/gui_riscos.pro b/src/proto/gui_riscos.pro deleted file mode 100644 index 9bfc02b16c..0000000000 --- a/src/proto/gui_riscos.pro +++ /dev/null @@ -1,66 +0,0 @@ -/* Prototypes for gui_riscos.c - * Based on gui_x11_pro.h (10 March 2002 version) - */ -void gui_mch_prepare __ARGS((int *argc, char **argv)); -int gui_mch_init_check __ARGS((void)); -int gui_mch_init __ARGS((void)); -void gui_mch_uninit __ARGS((void)); -void gui_mch_new_colors __ARGS((void)); -int gui_mch_open __ARGS((void)); -void gui_init_tooltip_font __ARGS((void)); -void gui_init_menu_font __ARGS((void));void gui_mch_exit __ARGS((int rc)); -int gui_mch_get_winpos __ARGS((int *x, int *y)); -void gui_mch_set_winpos __ARGS((int x, int y)); -void gui_mch_set_shellsize __ARGS((int width, int height, int min_width, int min_height, int base_width, int base_height)); -void gui_mch_get_screen_dimensions __ARGS((int *screen_w, int *screen_h)); -int gui_mch_init_font __ARGS((char_u *font_name, int do_fontset)); -GuiFont gui_mch_get_font __ARGS((char_u *name, int giveErrorIfMissing)); -int gui_mch_adjust_charheight __ARGS((void)); -void gui_mch_set_font __ARGS((GuiFont font)); -void gui_mch_set_fontset __ARGS((GuiFontset fontset)); -void gui_mch_free_font __ARGS((GuiFont font)); -void gui_mch_free_fontset __ARGS((GuiFontset fontset)); -GuiFontset gui_mch_get_fontset __ARGS((char_u *name, int giveErrorIfMissing, int fixed_width)); -guicolor_T gui_mch_get_color __ARGS((char_u *reqname)); -void gui_mch_set_fg_color __ARGS((guicolor_T color)); -void gui_mch_set_bg_color __ARGS((guicolor_T color)); -void gui_mch_draw_string __ARGS((int row, int col, char_u *s, int len, int flags)); -int gui_mch_haskey __ARGS((char_u *name)); -void gui_mch_beep __ARGS((void)); -void gui_mch_flash __ARGS((int msec)); -void gui_mch_invert_rectangle __ARGS((int r, int c, int nr, int nc)); -void gui_mch_iconify __ARGS((void)); -void gui_mch_set_foreground __ARGS((void)); -void gui_mch_draw_hollow_cursor __ARGS((guicolor_T color)); -void gui_mch_draw_part_cursor __ARGS((int w, int h, guicolor_T color)); -void gui_mch_update __ARGS((void)); -int gui_mch_wait_for_chars __ARGS((long wtime)); -void gui_mch_flush __ARGS((void)); -void gui_mch_clear_block __ARGS((int row1, int col1, int row2, int col2)); -void gui_mch_clear_all __ARGS((void)); -void gui_mch_delete_lines __ARGS((int row, int num_lines)); -void gui_mch_insert_lines __ARGS((int row, int num_lines)); -void clip_mch_lose_selection __ARGS((VimClipboard *cbd)); -int clip_mch_own_selection __ARGS((VimClipboard *cbd)); -void clip_mch_request_selection __ARGS((VimClipboard *cbd)); -void clip_mch_set_selection __ARGS((VimClipboard *cbd)); -void gui_mch_menu_grey __ARGS((vimmenu_T *menu, int grey)); -void gui_mch_menu_hidden __ARGS((vimmenu_T *menu, int hidden)); -void gui_mch_draw_menubar __ARGS((void)); -void gui_mch_set_blinking __ARGS((long waittime, long on, long off)); -void gui_mch_stop_blink __ARGS((void)); -void gui_mch_start_blink __ARGS((void)); -void process_event __ARGS((int event, int *block)); -void gui_mch_show_popupmenu __ARGS((vimmenu_T *menu)); -long_u gui_mch_get_rgb __ARGS((guicolor_T pixel)); -void gui_mch_getmouse __ARGS((int *x, int *y)); -void gui_mch_setmouse __ARGS((int x, int y)); -void gui_mch_drawsign __ARGS((int row, int col, int typenr)); -void gui_mch_destroy_sign __ARGS((XImage *sign)); -void gui_mch_mousehide __ARGS((int hide)); -void mch_set_mouse_shape __ARGS((int shape)); -void gui_mch_menu_set_tip __ARGS((vimmenu_T *menu)); - -void ro_redraw_title __ARGS((int window)); -int ro_ok_to_quit __ARGS((void)); -/* vim: set ft=c : */ diff --git a/src/proto/os_riscos.pro b/src/proto/os_riscos.pro deleted file mode 100644 index 9ea4cd55ff..0000000000 --- a/src/proto/os_riscos.pro +++ /dev/null @@ -1,49 +0,0 @@ -/* os_riscos.c */ -void mch_write __ARGS((char_u *s, int len)); -int mch_inchar __ARGS((char_u *buf, int maxlen, long wtime, int tb_change_cnt)); -int mch_char_avail __ARGS((void)); -long_u mch_avail_mem __ARGS((int special)); -void mch_delay __ARGS((long msec, int ignoreinput)); -void mch_suspend __ARGS((void)); -void mch_init __ARGS((void)); -int mch_check_win __ARGS((int argc, char **argv)); -int mch_input_isatty __ARGS((void)); -int mch_can_restore_title __ARGS((void)); -int mch_can_restore_icon __ARGS((void)); -void mch_settitle __ARGS((char_u *title, char_u *icon)); -void mch_restore_title __ARGS((int which)); -int mch_get_user_name __ARGS((char_u *s, int len)); -void mch_get_host_name __ARGS((char_u *s, int len)); -long mch_get_pid __ARGS((void)); -int mch_dirname __ARGS((char_u *buf, int len)); -int mch_FullName __ARGS((char_u *fname, char_u *buf, int len, int force)); -int mch_isFullName __ARGS((char_u *fname)); -long mch_getperm __ARGS((char_u *name)); -int mch_setperm __ARGS((char_u *name, long perm)); -void mch_hide __ARGS((char_u *name)); -int mch_isdir __ARGS((char_u *name)); -int mch_can_exe __ARGS((char_u *name)); -int mch_nodetype __ARGS((char_u *name)); -void mch_early_init __ARGS((void)); -void mch_exit __ARGS((int r)); -void mch_settmode __ARGS((int tmode)); -void mch_setmouse __ARGS((int on)); -int mch_screenmode __ARGS((char_u *arg)); -int mch_get_shellsize __ARGS((void)); -void mch_set_shellsize __ARGS((void)); -void mch_new_shellsize __ARGS((void)); -int mch_call_shell __ARGS((char_u *cmd, int options)); -void mch_breakcheck __ARGS((void)); -int mch_expandpath __ARGS((garray_T *gap, char_u *path, int flags)); -int expand_section __ARGS((garray_T *gap, char_u *root, char_u *rest, int flags)); -int mch_expand_wildcards __ARGS((int num_pat, char_u **pat, int *num_file, char_u ***file, int flags)); -int mch_has_exp_wildcard __ARGS((char_u *p)); -int mch_has_wildcard __ARGS((char_u *p)); -int mch_remove __ARGS((char_u *file)); -char_u *mch_munge_fname __ARGS((char_u *fname)); -int ro_buflist_add __ARGS((char_u *old_name)); -int mch_chdir __ARGS((char_u *dir)); -void mch_read_filetype __ARGS((char_u *file)); -void mch_set_filetype __ARGS((char_u *file, char_u *type)); -int mch_check_filetype __ARGS((char_u *fname, char_u *type)); -/* vim: set ft=c : */ diff --git a/src/pty.c b/src/pty.c index bc28c0d9ab..59e0069cc0 100644 --- a/src/pty.c +++ b/src/pty.c @@ -123,8 +123,7 @@ static void initmaster __ARGS((int)); /* - * Open all ptys with O_NOCTTY, just to be on the safe side - * (RISCos mips breaks otherwise) + * Open all ptys with O_NOCTTY, just to be on the safe side. */ #ifndef O_NOCTTY # define O_NOCTTY 0 diff --git a/src/quickfix.c b/src/quickfix.c index 1876093f89..999c66ed9b 100644 --- a/src/quickfix.c +++ b/src/quickfix.c @@ -1182,21 +1182,17 @@ qf_get_fnum(directory, fname) if (fname == NULL || *fname == NUL) /* no file name */ return 0; { -#ifdef RISCOS - /* Name is reported as `main.c', but file is `c.main' */ - return ro_buflist_add(fname); -#else char_u *ptr; int fnum; -# ifdef VMS +#ifdef VMS vms_remove_version(fname); -# endif -# ifdef BACKSLASH_IN_FILENAME +#endif +#ifdef BACKSLASH_IN_FILENAME if (directory != NULL) slash_adjust(directory); slash_adjust(fname); -# endif +#endif if (directory != NULL && !vim_isAbsName(fname) && (ptr = concat_fnames(directory, fname, TRUE)) != NULL) { @@ -1221,7 +1217,6 @@ qf_get_fnum(directory, fname) return fnum; } return buflist_add(fname, 0); -#endif } } @@ -2818,17 +2813,21 @@ ex_make(eap) (eap->cmdidx != CMD_grepadd && eap->cmdidx != CMD_lgrepadd), *eap->cmdlinep); + if (wp != NULL) + qi = GET_LOC_LIST(wp); #ifdef FEAT_AUTOCMD if (au_name != NULL) + { apply_autocmds(EVENT_QUICKFIXCMDPOST, au_name, curbuf->b_fname, TRUE, curbuf); + if (qi->qf_curlist < qi->qf_listcount) + res = qi->qf_lists[qi->qf_curlist].qf_count; + else + res = 0; + } #endif if (res > 0 && !eap->forceit) - { - if (wp != NULL) - qi = GET_LOC_LIST(wp); qf_jump(qi, 0, 0, FALSE); /* display first error */ - } mch_remove(fname); vim_free(fname); diff --git a/src/search.c b/src/search.c index 12cd509f36..d3a7b84cde 100644 --- a/src/search.c +++ b/src/search.c @@ -4590,9 +4590,6 @@ find_pattern_in_path(ptr, dir, len, whole, skip_comments, char_u *already = NULL; char_u *startp = NULL; char_u *inc_opt = NULL; -#ifdef RISCOS - int previous_munging = __riscosify_control; -#endif #if defined(FEAT_WINDOWS) && defined(FEAT_QUICKFIX) win_T *curwin_save = NULL; #endif @@ -4605,11 +4602,6 @@ find_pattern_in_path(ptr, dir, len, whole, skip_comments, if (file_line == NULL) return; -#ifdef RISCOS - /* UnixLib knows best how to munge c file names - turn munging back on. */ - int __riscosify_control = 0; -#endif - if (type != CHECK_PATH && type != FIND_DEFINE #ifdef FEAT_INS_EXPAND /* when CONT_SOL is set compare "ptr" with the beginning of the line @@ -5237,11 +5229,6 @@ fpip_end: vim_free(regmatch.regprog); vim_free(incl_regmatch.regprog); vim_free(def_regmatch.regprog); - -#ifdef RISCOS - /* Restore previous file munging state. */ - __riscosify_control = previous_munging; -#endif } static void diff --git a/src/structs.h b/src/structs.h index f3d1d04ffd..4b976e94da 100644 --- a/src/structs.h +++ b/src/structs.h @@ -1530,9 +1530,6 @@ struct file_buffer int b_p_ml_nobin; /* b_p_ml saved for binary mode */ int b_p_ma; /* 'modifiable' */ char_u *b_p_nf; /* 'nrformats' */ -#ifdef FEAT_OSFILETYPE - char_u *b_p_oft; /* 'osfiletype' */ -#endif int b_p_pi; /* 'preserveindent' */ #ifdef FEAT_TEXTOBJ char_u *b_p_qe; /* 'quoteescape' */ @@ -2374,11 +2371,6 @@ struct VimMenu MenuHandle menu_handle; MenuHandle submenu_handle; #endif -#ifdef RISCOS - int *id; /* Not used, but gui.c needs it */ - int greyed_out; /* Flag */ - int hidden; -#endif #ifdef FEAT_GUI_PHOTON PtWidget_t *id; PtWidget_t *submenu_id; diff --git a/src/syntax.c b/src/syntax.c index e23fe9e48e..cc28d3293d 100644 --- a/src/syntax.c +++ b/src/syntax.c @@ -990,7 +990,10 @@ syn_start_line() * previous line and regions that have "keepend". */ if (current_state.ga_len > 0) + { syn_update_ends(TRUE); + check_state_ends(); + } next_match_idx = -1; ++current_line_id; @@ -1064,7 +1067,6 @@ syn_update_ends(startofline) } } check_keepend(); - check_state_ends(); } /**************************************** @@ -2533,7 +2535,7 @@ push_next_match(cur_si) check_state_ends() { stateitem_T *cur_si; - int had_extend = FALSE; + int had_extend; cur_si = &CUR_STATE(current_state.ga_len - 1); for (;;) @@ -2566,6 +2568,9 @@ check_state_ends() #endif update_si_attr(current_state.ga_len - 1); + /* nextgroup= should not match in the end pattern */ + current_next_list = NULL; + /* what matches next may be different now, clear it */ next_match_idx = 0; next_match_col = MAXCOL; @@ -2583,8 +2588,7 @@ check_state_ends() /* When the ended item has "extend", another item with * "keepend" now needs to check for its end. */ - if (cur_si->si_flags & HL_EXTEND) - had_extend = TRUE; + had_extend = (cur_si->si_flags & HL_EXTEND); pop_current_state(); diff --git a/src/term.c b/src/term.c index f41c477c41..77387e099b 100644 --- a/src/term.c +++ b/src/term.c @@ -52,7 +52,7 @@ /* * Here are the builtin termcap entries. They are not stored as complete - * Tcarr structures, as such a structure is too big. + * structures with all entries, as such a structure is too big. * * The entries are compact, therefore they normally are included even when * HAVE_TGETENT is defined. When HAVE_TGETENT is defined, the builtin entries @@ -199,71 +199,6 @@ static struct builtin_term builtin_termcaps[] = #endif #ifndef NO_BUILTIN_TCAPS -# if defined(RISCOS) || defined(ALL_BUILTIN_TCAPS) -/* - * Default for the Acorn. - */ - {(int)KS_NAME, "riscos"}, - {(int)KS_CL, "\014"}, /* Cls and Home Cursor */ - {(int)KS_CM, "\001%d\001%d\002"}, /* Position cursor */ - - {(int)KS_CCO, "16"}, /* Allow 16 colors */ - - {(int)KS_CAF, "\001%d\021"}, /* Set foreground colour */ - {(int)KS_CAB, "\001%d\022"}, /* Set background colour */ - - - {(int)KS_ME, "\004"}, /* Normal mode */ - {(int)KS_MR, "\005"}, /* Reverse */ - - {(int)KS_VI, "\016"}, /* Cursor invisible */ - {(int)KS_VE, "\017"}, /* Cursor visible */ - {(int)KS_VS, "\020"}, /* Cursor very visible */ - - {(int)KS_CS, "\001%d\001%d\003"}, /* Set scroll region */ - {(int)KS_SR, "\023"}, /* Scroll text down */ - {K_UP, "\217"}, - {K_DOWN, "\216"}, - {K_LEFT, "\214"}, - {K_RIGHT, "\215"}, - {K_S_UP, "\237"}, - {K_S_DOWN, "\236"}, - {K_S_LEFT, "\234"}, - {K_S_RIGHT, "\235"}, - - {K_F1, "\201"}, - {K_F2, "\202"}, - {K_F3, "\203"}, - {K_F4, "\204"}, - {K_F5, "\205"}, - {K_F6, "\206"}, - {K_F7, "\207"}, - {K_F8, "\210"}, - {K_F9, "\211"}, - {K_F10, "\312"}, - {K_F11, "\313"}, - {K_F12, "\314"}, - {K_S_F1, "\221"}, - {K_S_F2, "\222"}, - {K_S_F3, "\223"}, - {K_S_F4, "\224"}, - {K_S_F5, "\225"}, - {K_S_F6, "\226"}, - {K_S_F7, "\227"}, - {K_S_F8, "\230"}, - {K_S_F9, "\231"}, - {K_S_F10, "\332"}, - {K_S_F11, "\333"}, - {K_S_F12, "\334"}, - {K_BS, "\010"}, - {K_INS, "\315"}, - {K_DEL, "\177"}, - {K_HOME, "\036"}, - {K_END, "\213"}, - {K_PAGEUP, "\237"}, - {K_PAGEDOWN, "\236"}, -# endif /* Acorn terminal */ - # if defined(AMIGA) || defined(ALL_BUILTIN_TCAPS) /* @@ -1399,10 +1334,6 @@ static struct builtin_term builtin_termcaps[] = /* * DEFAULT_TERM is used, when no terminal is specified with -T option or $TERM. */ -#ifdef RISCOS -# define DEFAULT_TERM (char_u *)"riscos" -#endif - #ifdef AMIGA # define DEFAULT_TERM (char_u *)"amiga" #endif diff --git a/src/termlib.c b/src/termlib.c index 2a9a26757e..ed605e9061 100644 --- a/src/termlib.c +++ b/src/termlib.c @@ -13,7 +13,7 @@ #include "vim.h" #include "termlib.pro" -#if !defined(AMIGA) && !defined(VMS) && !defined(MACOS) && !defined(RISCOS) +#if !defined(AMIGA) && !defined(VMS) && !defined(MACOS) # include #endif diff --git a/src/testdir/test3.in b/src/testdir/test3.in index 62402fb980..1b5cf893bb 100644 --- a/src/testdir/test3.in +++ b/src/testdir/test3.in @@ -799,6 +799,69 @@ main() df */ hello } + +/* valid namespaces with normal indent */ +namespace +{ +{ + 111111111111; +} +} +namespace /* test */ +{ + 11111111111111111; +} +namespace // test +{ + 111111111111111111; +} +namespace +{ + 111111111111111111; +} +namespace test +{ + 111111111111111111; +} +namespace{ + 111111111111111111; +} +namespace test{ + 111111111111111111; +} +namespace { + 111111111111111111; +} +namespace test { + 111111111111111111; +namespace test2 { + 22222222222222222; +} +} + +/* invalid namespaces use block indent */ +namespace test test2 { + 111111111111111111111; +} +namespace11111111111 { + 111111111111; +} +namespace() { + 1111111111111; +} +namespace() +{ + 111111111111111111; +} +namespace test test2 +{ + 1111111111111111111; +} +namespace111111111 +{ + 111111111111111111; +} + /* end of AUTO */ STARTTEST @@ -1343,6 +1406,160 @@ func(int a { } +STARTTEST +:set cino& +2kdd=4][ +ENDTEST + +void func(void) +{ + if(x==y) + if(y==z) + foo=1; + else { bar=1; + baz=2; + } + printf("Foo!\n"); +} + +void func1(void) +{ + char* tab[] = {"foo", "bar", + "baz", "quux", + "this line used", "to be indented incorrectly"}; + foo(); +} + +void func2(void) +{ + int tab[] = + {1, 2, + 3, 4, + 5, 6}; + + printf("This line used to be indented incorrectly.\n"); +} + +void func3(void) +{ + int tab[] = { + 1, 2, + 3, 4, + 5, 6}; + +printf("Don't you dare indent this line incorrectly!\n); +} + +STARTTEST +:set cino& +2kdd=][ +ENDTEST + +void func(void) +{ + cout << "a" + << "b" + << ") :" + << "c"; +} + +STARTTEST +:set com=s1:/*,m:*,ex:*/ +]]3jofoo(); +ENDTEST + +void func(void) +{ + /* + * This is a comment. + */ +} + +STARTTEST +:set cino& +2kdd=][ +ENDTEST + +void func(void) +{ + for (int i = 0; i < 10; ++i) + if (i & 1) { + foo(1); + } else + foo(0); +baz(); +} + +STARTTEST +:set cino=N-s +/namespaces +=/^NAMESPACEEND +ENDTEST + +/* valid namespaces with normal indent */ +namespace +{ + { + 111111111111; +} +} +namespace /* test */ +{ + 11111111111111111; +} +namespace // test +{ + 111111111111111111; +} +namespace +{ + 111111111111111111; +} +namespace test +{ + 111111111111111111; +} +namespace{ + 111111111111111111; +} +namespace test{ + 111111111111111111; +} +namespace { + 111111111111111111; +} +namespace test { + 111111111111111111; +namespace test2 { + 22222222222222222; +} +} + +/* invalid namespaces use block indent */ +namespace test test2 { + 111111111111111111111; +} +namespace11111111111 { + 111111111111; +} +namespace() { + 1111111111111; +} +namespace() +{ + 111111111111111111; +} +namespace test test2 +{ + 1111111111111111111; +} +namespace111111111 +{ + 111111111111111111; +} +NAMESPACEEND + + STARTTEST :g/^STARTTEST/.,/^ENDTEST/d :1;/start of AUTO/,$wq! test.out diff --git a/src/testdir/test3.ok b/src/testdir/test3.ok index 4e2a648114..cf4f85deb5 100644 --- a/src/testdir/test3.ok +++ b/src/testdir/test3.ok @@ -787,6 +787,69 @@ main() df */ hello } + +/* valid namespaces with normal indent */ +namespace +{ + { + 111111111111; + } +} +namespace /* test */ +{ + 11111111111111111; +} +namespace // test +{ + 111111111111111111; +} +namespace +{ + 111111111111111111; +} +namespace test +{ + 111111111111111111; +} +namespace{ + 111111111111111111; +} +namespace test{ + 111111111111111111; +} +namespace { + 111111111111111111; +} +namespace test { + 111111111111111111; + namespace test2 { + 22222222222222222; + } +} + +/* invalid namespaces use block indent */ +namespace test test2 { + 111111111111111111111; +} +namespace11111111111 { + 111111111111; +} +namespace() { + 1111111111111; +} +namespace() +{ + 111111111111111111; +} +namespace test test2 +{ + 1111111111111111111; +} +namespace111111111 +{ + 111111111111111111; +} + /* end of AUTO */ @@ -1204,3 +1267,137 @@ func(int a { } + +void func(void) +{ + if(x==y) + if(y==z) + foo=1; + else { bar=1; + baz=2; + } + printf("Foo!\n"); +} + +void func1(void) +{ + char* tab[] = {"foo", "bar", + "baz", "quux", + "this line used", "to be indented incorrectly"}; + foo(); +} + +void func2(void) +{ + int tab[] = + {1, 2, + 3, 4, + 5, 6}; + + printf("This line used to be indented incorrectly.\n"); +} + +void func3(void) +{ + int tab[] = { + 1, 2, + 3, 4, + 5, 6}; + + printf("Don't you dare indent this line incorrectly!\n); +} + + +void func(void) +{ + cout << "a" + << "b" + << ") :" + << "c"; +} + + +void func(void) +{ + /* + * This is a comment. + */ + foo(); +} + + +void func(void) +{ + for (int i = 0; i < 10; ++i) + if (i & 1) { + foo(1); + } else + foo(0); + baz(); +} + + +/* valid namespaces with normal indent */ +namespace +{ +{ + 111111111111; +} +} +namespace /* test */ +{ +11111111111111111; +} +namespace // test +{ +111111111111111111; +} +namespace +{ +111111111111111111; +} +namespace test +{ +111111111111111111; +} +namespace{ +111111111111111111; +} +namespace test{ +111111111111111111; +} +namespace { +111111111111111111; +} +namespace test { +111111111111111111; +namespace test2 { +22222222222222222; +} +} + +/* invalid namespaces use block indent */ +namespace test test2 { + 111111111111111111111; +} +namespace11111111111 { + 111111111111; +} +namespace() { + 1111111111111; +} +namespace() +{ + 111111111111111111; +} +namespace test test2 +{ + 1111111111111111111; +} +namespace111111111 +{ + 111111111111111111; +} +NAMESPACEEND + + diff --git a/src/version.c b/src/version.c index 2ea009ee13..da1f14eecb 100644 --- a/src/version.c +++ b/src/version.c @@ -436,11 +436,6 @@ static char *(features[]) = "-ole", # endif #endif -#ifdef FEAT_OSFILETYPE - "+osfiletype", -#else - "-osfiletype", -#endif #ifdef FEAT_PATH_EXTRA "+path_extra", #else @@ -729,6 +724,64 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 206, +/**/ + 205, +/**/ + 204, +/**/ + 203, +/**/ + 202, +/**/ + 201, +/**/ + 200, +/**/ + 199, +/**/ + 198, +/**/ + 197, +/**/ + 196, +/**/ + 195, +/**/ + 194, +/**/ + 193, +/**/ + 192, +/**/ + 191, +/**/ + 190, +/**/ + 189, +/**/ + 188, +/**/ + 187, +/**/ + 186, +/**/ + 185, +/**/ + 184, +/**/ + 183, +/**/ + 182, +/**/ + 181, +/**/ + 180, +/**/ + 179, +/**/ + 178, /**/ 177, /**/ @@ -1202,9 +1255,6 @@ list_version() # endif #endif -#ifdef RISCOS - MSG_PUTS(_("\nRISC OS version")); -#endif #ifdef VMS MSG_PUTS(_("\nOpenVMS version")); # ifdef HAVE_PATHDEF diff --git a/src/vim.h b/src/vim.h index 4865fcc7cf..f1ae26ba05 100644 --- a/src/vim.h +++ b/src/vim.h @@ -185,9 +185,6 @@ # define SIZEOF_INT 2 # endif #endif -#ifdef RISCOS -# define SIZEOF_INT 4 -#endif #include "feature.h" /* #defines for optionals and features */ @@ -341,10 +338,6 @@ # include "os_mac.h" #endif -#ifdef RISCOS -# include "os_riscos.h" -#endif - #ifdef __QNX__ # include "os_qnx.h" #endif @@ -788,7 +781,8 @@ extern char *(*dyn_libintl_textdomain)(const char *domainname); #define EXPAND_FILETYPE 37 #define EXPAND_FILES_IN_PATH 38 #define EXPAND_OWNSYNTAX 39 -#define EXPAND_MACACTION 40 +#define EXPAND_LOCALES 40 +#define EXPAND_MACACTION 41 /* Values for exmode_active (0 is no exmode) */ #define EXMODE_NORMAL 1 @@ -1284,6 +1278,7 @@ enum auto_event EVENT_WINENTER, /* after entering a window */ EVENT_WINLEAVE, /* before leaving a window */ EVENT_ENCODINGCHANGED, /* after changing the 'encoding' option */ + EVENT_INSERTCHARPRE, /* before inserting a char */ EVENT_CURSORHOLD, /* cursor in same position for a while */ EVENT_CURSORHOLDI, /* idem, in Insert mode */ EVENT_FUNCUNDEFINED, /* if calling a function which doesn't exist */