[BACK]Return to version.c CVS log [TXT][DIR] Up to [local] / src / usr.bin / vim

Annotation of src/usr.bin/vim/version.c, Revision 1.4

1.4     ! downsj      1: /* $OpenBSD: version.c,v 1.3 1996/10/14 03:55:34 downsj Exp $  */
1.1       downsj      2: /* vi:set ts=4 sw=4:
1.3       downsj      3:  * vi:set comments=sbl\:*\ -,mb\:*,el\:*\ -,sr\:/\*,mb\:*,el\:*\/,fb\:- :
1.1       downsj      4:  *
                      5:  * VIM - Vi IMproved       by Bram Moolenaar
                      6:  *
                      7:  * Do ":help uganda"  in Vim to read copying and usage conditions.
                      8:  * Do ":help credits" in Vim to see a list of people who contributed.
                      9:  */
                     10:
                     11: #include "vim.h"
                     12: #include "globals.h"
                     13: #include "proto.h"
                     14:
                     15: /*
                     16:  * Vim originated from Stevie version 3.6 (Fish disk 217) by GRWalter (Fred)
                     17:  * It has been changed beyond recognition since then.
                     18:  *
                     19:  * All the remarks about older versions have been removed, they are not very
1.2       downsj     20:  * interesting.  Differences between version 3.0 and 4.x can be found in
1.1       downsj     21:  * "../doc/vim_40.txt".
                     22:  *
1.3       downsj     23:  * Changes between version 4.4 BETA and 4.5:
                     24:  * - Ignore CR in line from tags file, also when there is no search command.
                     25:  * - Fixed small cindent problem, when using 'cino' with non-zero after '}'.
                     26:  * - Corrected error message for security violation for tag file commands.
                     27:  * - Fixed bug: When 'shell' set to "sh", "!echo text >x<Tab>" would create
                     28:  *   the file "x*".  Now completion of file names starts after a ">", "<" and
                     29:  *   following "&" and "!" characters.
                     30:  * - Added a few more changes for QNX.
                     31:  * - Fixed: when 'showmode' was not set, CTRL-X submode (error) messages would
                     32:  *   not be shown correctly.
                     33:  * - MSDOS: Fixed computation of mouse area again, didn't work for 50 lines
                     34:  *   screen.
                     35:  * - Fixed: Cursor was not positioned after ":move" command.
                     36:  * - Fixed a few compiler warnings for Athena on Sun OS 5.2.
                     37:  * - Added 'w' flag to 'cpoptions', to fix vi incompatibility for "cw" on a
                     38:  *   row of blanks.
                     39:  * - Fixed making a core dump on certain signals.
                     40:  * - Fixed check for Sun OS 4.x.x for xxd.c.
                     41:  * - Fixed problem with expanding two-character directory names for Win32
                     42:  *   version.
                     43:  * - Fixed: highlight mode for completion sub-messages was always 'r', now it
                     44:  *   depends on the type of message: 'e' for errors, 'w' for warnings.
                     45:  * - Fixed: 'cindentkeys' were not checked when inserting text from a mapping.
                     46:  * - Fixed: a ":global" that requires input, could not be broken with CTRL-C.
                     47:  * - Fixed: "1H" and "1L" were off by one line.
                     48:  * - Included version 1.5 of ctags.
1.4     ! downsj     49:  * Last minute fixes:
        !            50:  * - Fixed: When using ^X^C in insert mode and then entering insert mode
        !            51:  *   again, the ^X mode message is shown when it shouldn't.
        !            52:  * - Fixed: In GUI, when reading the output from an external command, there
        !            53:  *   was no check for an error, which could result in an endless loop.
        !            54:  * - Small correction in src/ctags/ctags.c for MS-DOS.
        !            55:  * - Fixed for Unix: Would never detect a triple signal.
        !            56:  * - Removed ":mfstat" command, it's for debugging only.
1.3       downsj     57:  *
1.2       downsj     58:  * Changes between version 4.3 BETA and 4.4 BETA:
                     59:  * - Moved outputting newline from getout() to mch_windexit().  Helps when
                     60:  *   switching display pages in xterm after an error message for ":!".
                     61:  * - Fixed problem: Not executing BufEnter autocommands for first buffer.
                     62:  * - Fixed Makefile: "make shadow" didn't make ctags and xxd directories.  Now
                     63:  *   passes CC and CFLAGS to ctags and xxd makefiles.
                     64:  * - Removed use of #elif, some old compilers don't understand it.
                     65:  * - Included version 1.4 of ctags.  New Makefile.bcc, supports wildcards for
                     66:  *   16 bit DOS version.
                     67:  * - Fixed mouse positioning in wrong column for MSDOS 16 and 32 bit versions.
                     68:  * - Fixed: Delay in updating Visual area when using "/pat".
                     69:  * - Fixed: With some shells gvim could be killed with CTRL-C in the shell
                     70:  *   where it was started.
                     71:  * - Fixed: For abbreviations entered with ":noreab" only the first two
                     72:  *   characters were not re-mapped instead of all.
                     73:  * - Added help tags for search pattern special characters.  Adjusted
                     74:  *   doctags.c to insert a backslash before a backslash.
                     75:  * - Fixed Vi incompatibility: If the rhs of a mapping starts with the lhs,
                     76:  *   remapping is only disabled for the first character, not the whole lhs.
                     77:  * - Fixed: Default padding character was a space, which caused trouble on
                     78:  *   some systems.  Now it's a NUL.
                     79:  * - Fixed: With GUI Athena the scrollbar could get stuck at the bottom.
                     80:  * - Fixed: When using :imenu to insert more than one line of text, only the
                     81:  *   first line could be undone.
1.3       downsj     82:  * - Fixed: Word completion (CTRL-N) in Insert mode, when there was no
1.2       downsj     83:  *   matching word, the "Pattern not found" message was not shown.
                     84:  * - Fixed: Pattern completion (CTRL-X I) in Insert mode; the file name shown
                     85:  *   was overwritten with the mode message.
                     86:  * - Added ":if" and ":endif" commands.  Everything in between them is
                     87:  *   ingored.  Just to allow for future expansion that is backwards compatible.
                     88:  * - Fixed: Starting Vim without a file, then ":e file", ":sp" and ":q"
                     89:  *   unloaded the buffer.
                     90:  * - Fixed: execution of autocommands could not be interrupted.
                     91:  * - Fixed: "ga" on an empty line gave a misleading message, now it prints
                     92:  *   "empty line".
                     93:  * - Fixed: With 'number' set mouse positioning was wrong when lines wrap, and
                     94:  *   in the GUI horizontal scrolling didn't work properly.
                     95:  * - Removed "src/tags" from the source distribution; you can generate it
                     96:  *   yourself now that ctags is included.
                     97:  * - Included "macros/life", macros to run Conway's game of life.
                     98:  * - Fixed using "set go=r" in gvimrc problem for Motif GUI.
                     99:  * - Fixed problems when using autocommands with ":next" et. al..  Made
                    100:  *   "line1", "line2" and "forceit" local variables, instead of global.  Lots
                    101:  *   of function have to pass it as an argument, which is required to avoid
                    102:  *   the vars to get mixed up with recursive Ex commands.
                    103:  * - Removed the use of "want_start" in search.c.  Fixes bug when using a
                    104:  *   search string that starts with "^" and contains "\|".
                    105:  *
                    106:  * Changes between version 4.2 and 4.3 BETA:
                    107:  * - Moved ctags, tee and xxd sources from the binary to the source archive.
                    108:  * - OS/2: Adjusted ExpandWildCards again, fixed alloc/free error.
                    109:  * - Fixed: "Nothing in register ^@", ^@ for buffer 0 is now "
                    110:  * - Fixed: Was outputting CR CR LF instead of CR LF for termios.
                    111:  * - Fixed: cindent didn't handle "} else" and "} while (cond);".
                    112:  * - Fixed: Was using killpg(0, SIGINT) to interrupt external commands in the
                    113:  *   GUI, which isn't documented on all systems.  Use kill(0, SIGINT) instead.
                    114:  * - Updated version number that is compared with for the ":version" command.
                    115:  * - Fixed: ":0put" inserted text below line 1; now it inserts above line 1.
                    116:  * - Fixed: "/t/e" would not find the last character in a line.
                    117:  * - Fixed: Unloading the current buffer could load another unloaded buffer.
                    118:  *   Use a loaded buffer if there is one.
                    119:  * - Improved: ":dis" now shows "^J" at the end of linewise registers.
                    120:  * - Fixed: Using ":q" to close a window didn't execute the BufEnter
                    121:  *   autocommands for the new current window.
                    122:  * - Forbid the reading of a file after *ReadPre autocommands, this could give
                    123:  *   unpredictable results.
                    124:  * - Fixed: ":sball" didn't work correctly with autocommands that contain a
                    125:  *   ":normal" command.
                    126:  * - Fixed: was accepting a mapping after CTRL-W count.
                    127:  * - Fixed: a '[' in a regexp was special, made "/[z[]/" fail.
                    128:  * - Amiga, DICE: included a few patches to amiga.c.
                    129:  * - Fixed: Could crash when completing a setting, e.g. ":set <t_K<Tab>"
                    130:  * - Fixed: Using "new fname" in a vimrc caused a window with a non-existing
                    131:  *   buffer.
                    132:  * - Added support for keypad keys <kHome>, <kEnd>, <kPageUp> and <kPageDown>.
                    133:  *   They only work when they send a different code from <Home>, etc..
                    134:  * - Swapped the arguments to LINKIT in Makefile, was making a link from Vim,
                    135:  *   instead of to Vim.
                    136:  * - Fixed: Not all parts of the swap file were cleared before using them,
                    137:  *   could include any data in the swap file (mostly the password file!).
                    138:  * - Fixed: Could get an extra swap file when using ":au BufLeave xx bd xx".
                    139:  * - Fixed: ":set comment=n:" didn't give an error message; formatting would
                    140:  *   cause a hang.
                    141:  * - Use off_t for lseek; FreeBSD and others use long long instead of long.
                    142:  * - Fixed: ":/pat" didn't match at first column in the next line.
                    143:  * - Fixed: CTRL-F at end of file with 'scrolloff' non-zero would make the
                    144:  *   screen jump up and down and didn't beep when no more scrolling was
                    145:  *   possible.  When last two lines didn't fit on the screen together, the
                    146:  *   last one was never shown.
                    147:  * - When Vim is not compiled with AUTOCMD, "<afile>" is not included.
                    148:  * - Fixed: ":au BufWritePre xx bunload" caused empty file to be written, now
                    149:  *   it gives an error message.
                    150:  * - Added "<Bar>", to be used in mappings where a '|' is needed.
                    151:  * - Moved "Changing readonly file" message, In insert mode, to after the mode
                    152:  *   message, it would otherwise be hidden.
                    153:  * - Fixed: Putting a temp file in current directory for MS-DOS causes
                    154:  *   problems on readonly devices.  Try several directories to put the temp
                    155:  *   file in.
                    156:  * - Changed default for Unix 'errorformat' to include a few more compilers.
                    157:  * - Fixed: When exiting because of a non-existing file after the "-e"
                    158:  *   argument, there was no newline.
                    159:  * - When writing part of a buffer to a file, don't add a end-of-line for the
                    160:  *   last line, if 'binary' is set and the previous read didn't have an
                    161:  *   end-of-line for the same line.  For FileWritePre autocommands that filter
                    162:  *   the lines through gzip.
                    163:  * - Fixed: When not writing the eol for the last line, this was not visible,
                    164:  *   and the line count was one too low.
                    165:  * - Fixed: BufNewFile autocommands that do ":r file" sometimes didn't work,
                    166:  *   because the cursor was in an invalid line.
                    167:  * - Fixed: a *ReadFile autocommand that changed the file to be read didn't
                    168:  *   work, because the file was already opened.
                    169:  * - Fixed: When doing ":bdel", buf_copy_options() could copy options from
                    170:  *   already freed memory.  Would cause any combination of strange settings.
                    171:  * - Check for errors while reading the viminfo file.  When there are more
                    172:  *   than 10 errors, quit reading it.  When there is any error, don't
                    173:  *   overwrite it with a new viminfo file.  Prevents trashing a file when
                    174:  *   accidently doing "vim -i file" instead of "vim -v file".
                    175:  * - Added "ZQ", alias for ":q!".  Elvis compatible.
                    176:  * - Fixed: "vim -g" would crash when .gvimrc contains ":set go=r".
                    177:  * - Fixed: ":set go&" didn't work, the default contained an illegal 'A'.
                    178:  * - Added 'titlelen' option: percentage of 'columns' to use for the title.
                    179:  *   Reduces problems with truncating long path names.
                    180:  * - Added "tee" for OS/2.  Very useful for ":make".
                    181:  * - Fixed: Setting 'title' in the gvimrc messed up the title of the xterm
                    182:  *   where Vim was started when doing ":gui".
                    183:  * - Fixed: When expanding "~/file" with CTRL-X CTRL-F in insert mode, the
                    184:  *   "~/" would get expanded into a full path.  For "~user/file" the problem
                    185:  *   still exists though.
                    186:  * - Fixed: ":set path=../b" didn't work as expected, any path starting with a
                    187:  *   dot would get expanded to the directory of the current file.
                    188:  * - Fixed: Any dir name in 'directory' and 'backupdir' starting with '.' was
                    189:  *   considered to be in the current directory, also "..".  Now using "./dir"
                    190:  *   means using a directory relative to where the file is.
                    191:  * - Fixed: ":all", ":ball" and "-o" command line option would execute
                    192:  *   Buf/Win Enter/Leave autocommands for first buffer a few times.  Now
                    193:  *   they are only done when really entering a buffer/window.
                    194:  * - Fixed: ":all", change in first buffer, ":all" would give an error message
                    195:  *   for not writing the file.
                    196:  * - Added 'shellcmdflag' and 'shellquote' options, mainly for Win32 when
                    197:  *   using different kinds of shell.
                    198:  * - Fixed: "unmenu *" in .gvimrc caused a crash on some machines.
                    199:  * - Fixed: ":buf" (go to current buffer) should not do anything.  It executed
                    200:  *   autocommands and set the previous context mark.
                    201:  * - Fixed: "*``" moved the cursor back to the start of the word, instead of
                    202:  *   where the cursor was within or before the word.
                    203:  * - Fixed: ":e %:p:h" removed the head of the path ("/" for unix, "d:\" for
                    204:  *   DOS, "drive:" for Amiga.
                    205:  * - Fixed: for the Win32 version, 'term' must be "win32", don't init it with
                    206:  *   $TERM.
                    207:  * - Fixed: Filename completion with <Tab>, when there are several matches,
                    208:  *   but only one without ignored suffix, next <Tab> obtained second match,
                    209:  *   not the one after the previous one.  Now the files without matching
                    210:  *   suffix are put in front of the list.
                    211:  * - Fixed: DJGPP version of system() was eating file descriptors, after a few
                    212:  *   filter commands there would be an "Out of file handles" error.
                    213:  * - Fixed: for MS-DOS: ":n doc\*.txt" didn't work, it became "doc*.txt".
                    214:  * - Added: MS-DOS and WIN32 now expand $ENV in a filename. ":e $VIM/_vimrc"
                    215:  *   works now.
                    216:  * - Fixed: MS-DOS: after ":mode 1" mouse didn't move correctly.  Now it
                    217:  *   mostly works for the display modes up to 0x13.
                    218:  * - Fixed: In Insert mode, the message from  "^O:set tw" would be overwritten
                    219:  *   by "--INSERT--".  Now there is a 10 second delay to be able to read the
                    220:  *   message.
                    221:  *
1.1       downsj    222:  * Changes between version 4.1 and 4.2:
                    223:  * - Included ctags version 1.3.
                    224:  * - Included xxd.c version 1.4 (only one change since 1.3m)
                    225:  * - Unix: Adjusted check for child finished again.  Now use != ECHILD
                    226:  *   instead of == EINTR.
                    227:  * - Fixed: loading compressed files (with autocommands) didn't work when
                    228:  *   'textmode' was previously set.
                    229:  * - Fixed: When executing a shell, a window resize was not recognized for
                    230:  *   Unix.
                    231:  * - Fixed: For GUI, when executing an external command, a window resize
                    232:  *   caused the buffer to be redrawn.
                    233:  * - Fixed: Error message for not being able to open the .viminfo file could
                    234:  *   report the wrong filename.
                    235:  * - MS-DOS, Win32, OS/2: When $HOME is not set, use "C:/".
                    236:  * - OS/2: Improved handling of wildcards again.  Didn't ignore case, didn't
                    237:  *   work with backslashes.
                    238:  * - Fixed: ":s/pat<Tab>" could cause a core dump or other problems.
                    239:  * - Fixed: When entering a hidden buffer with ":e", the BufEnter autocommands
                    240:  *   were not executed.
                    241:  * - Fixed: Ignoring a CTRL-Z at end-of-file was only done on MS-DOS.  Now it
                    242:  *   also works on other systems, but only in textmode.
                    243:  * - Fixed: In the GUI special characters were not passed on to external
                    244:  *   commands, typeahead was truncated.
                    245:  * - Added "gq" as an alias to "Q".  Should be used when "Q" is made to be Vi
                    246:  *   compatible: go to Ex mode.
                    247:  * - Fixed: "gu" in Visual mode could not be redone with "." correctly.
                    248:  * - Fixed: ":normal" command made any typeahead executed right away, causing
                    249:  *   unpredictable problems.
                    250:  * - Fixed: ":normal atest^[" didn't update the screen.
                    251:  * - Fixed: Redoing blockwise visual delete at the end of the file could cause
                    252:  *   "invalid line number" errors.
                    253:  * - Fixed: vim_rename() didn't open the output file in binary mode, could
                    254:  *   cause the .viminfo file to contain CR-LF on OS/2.
                    255:  * - Fixed: OS/2 was using /tmp/xxx for temporary file name, would fail if
                    256:  *   there is no /tmp directory.  Now use $TMP/xxx, defaulting to c:/ if $TMP
                    257:  *   is not set.
                    258:  * - Fixed: When USE_TMPNAM was defined, was using the wrong array size for
                    259:  *   the viminfo temporary file.
                    260:  *
                    261:  * Changes between version 4.0 and 4.1:
                    262:  *
                    263:  * - Included xxd.c version 1.3m.
                    264:  * - Included ctags version 1.2.
                    265:  * - Included tools/efm_filt.er.
                    266:  * - Included changes for port to Atari MiNT, including makefile.mint.
                    267:  * - Included a few changes for OS/2: Improved executing external commands,
                    268:  *   depending on the shell; Handle resize after executing an external
                    269:  *   command; Handle wildcard expansion for more than one argument (e.g.
                    270:  *   ":n *.c *.h").
                    271:  * - Include a lot of small changes to the docs.
                    272:  * - Fixed: GUI version would busy-loop and mappings didn't work.  Was caused
                    273:  *   by gui_mch_wait_for_chars() not working properly.  This fix was the main
                    274:  *   reason for releasing 4.1.
                    275:  * - Fixed: setting 'term' while GUI is active was possible, and caused
                    276:  *   problems.
                    277:  * - Fixed: When the "to" part of a mapping or menu command was long (more
                    278:  *   than 24 chars on 32 bit MS-DOS, 128 chars on other systems), any <> were
                    279:  *   not translated and CTRL-Vs not removed.
                    280:  * - Fixed: 'modified' option was included for ":mkvimrc", it shouldn't.
                    281:  * - Included a few changes for that Atari MiNT port (vt52 builtin term
                    282:  *   entry).
                    283:  * - Fixed: on MS-DOS a file name pattern for an autocommand that contains
                    284:  *   "\*" or "\?" didn't work.
                    285:  * - On MS-DOS and Amiga, ignore case when matching the file name pattern for
                    286:  *   autocommands.
                    287:  * - Fixed: using :set to show the value of two options gave an error message
                    288:  *   (e.g. ":set so sj").
                    289:  * - Fixed: Non-printable characters in a file name caused trouble when
                    290:  *   displayed in a status line.
                    291:  * - Pack the MS-DOS zip files with Infozip, under Unix.  Preserves the long
                    292:  *   filenames and case.  Files with two dots don't work though, the first dot
                    293:  *   is replaced with an underscore.
                    294:  * - Fixed: Pasting more than one line with the mouse in insert mode, didn't
                    295:  *   put the cursor after the last pasted character.
                    296:  * - When pasting linewise text, put the '] mark on the last character of the
                    297:  *   last line, instead of the first character of the last line.
                    298:  * - Fixed: on some Unix systems, when resizing the window while in a external
                    299:  *   command (e.g., ":!cat"), Vim would stop waiting for the child, causing
                    300:  *   trouble, because the child is still running.
                    301:  * - Fixed: resizing the window while executing an external command, and
                    302:  *   't_ti' and 't_te' are defined to swap display buffers, Vim would redraw
                    303:  *   in the wrong display buffer after the "hit RETURN" message.
                    304:  * - Fixed: "va", "vA", "Vp", "VP", "Vs" and "VS" didn't set the cursor
                    305:  *   position used for up/down movements (e.g., when using "j" after them).
                    306:  * - Fixed: in GUI version, after using "cw" visual selection by dragging the
                    307:  *   mouse didn't work.
                    308:  * - Fixed: setting 'ttyscroll' to 0 caused scrolling of message to stop
                    309:  *   working.
                    310:  * - Fixed: the "WARNING: file changed" message caused buffers to be flushed
                    311:  *   and subsequent commands not to be executed.
                    312:  * - Fixed: in Insert mode, the message from "^O^G" would be
                    313:  *   overwritten by the mode message if 'showmode' set.
                    314:  * - Fixed: Using ":bdel" when there is only one buffer with two windows,
                    315:  *   could cause a crash.
                    316:  * - Changed: the '<' flag in 'cpoptions' now only switches off the
                    317:  *   recognizing of the <> form of key codes.  The 'k' flag is now used for
                    318:  *   the recognizing of raw key codes.
                    319:  * - Fixed: Typing ':' at the --more-- prompt, when displaying autocommands,
                    320:  *   caused extra linefeeds to be produced.
                    321:  * - Fixed: Using 'tagrelative' and ":set tags=./../tags", filenames would
                    322:  *   contain "../" as many times as CTRL-] would be used.  These are removed
                    323:  *   now.
                    324:  * - Fixed: Extremely long error message could cause a crash (e.g., when
                    325:  *   using ":help ^A<CR>").
                    326:  * - Added check for negative value of 'textwidth'.
                    327:  * - Fixed: On MS-DOS, getting the value of $HOME would cause the current
                    328:  *   directory for the drive to be changed.
                    329:  */
                    330:
                    331: /*
                    332:  * Version[] is copied into the swap file (max. length is 10 chars).
                    333:  * longVersion[] is used for the ":version" command and "Vim -h".
                    334:  * Don't forget to update the numbers in version.h for Win32!!!
                    335:  */
                    336:
1.2       downsj    337: #include "version.h"
                    338:
1.3       downsj    339: char          *Version = "VIM 4.5";
1.1       downsj    340: #ifdef HAVE_DATE_TIME
1.4     ! downsj    341: char          *longVersion = "VIM - Vi IMproved 4.5 (1996 Oct 12, compiled " __DATE__ " " __TIME__ ")";
1.1       downsj    342: #else
1.4     ! downsj    343: char          *longVersion = "VIM - Vi IMproved 4.5 (1996 Oct 12)";
1.1       downsj    344: #endif
                    345:
                    346: static void version_msg __ARGS((char *s));
                    347:
                    348:    void
                    349: do_version(arg)
                    350:    char_u  *arg;
                    351: {
                    352:    long        n;
                    353:
                    354:    if (*arg != NUL)
                    355:    {
                    356:        found_version = getdigits(&arg) * 100;
                    357:        if (*arg == '.' && isdigit(arg[1]))
                    358:        {
                    359:            /* "4.1"  -> 401, "4.10" -> 410 */
                    360:            n = arg[1] - '0';
                    361:            if (isdigit(arg[2]))
                    362:                found_version += (arg[2] - '0') + n * 10;
                    363:            else
                    364:                found_version += n;
                    365:        }
1.2       downsj    366:        if (found_version > VIM_VERSION_MAJOR * 100 + VIM_VERSION_MINOR)
1.1       downsj    367:        {
                    368:            MSG("Warning: Found newer version command");
                    369:            if (sourcing_name != NULL)
                    370:            {
                    371:                MSG_OUTSTR(" in: \"");
                    372:                msg_outstr(sourcing_name);
                    373:                MSG_OUTSTR("\" line: ");
                    374:                msg_outnum((long)sourcing_lnum);
                    375:            }
                    376:        }
                    377:    }
                    378:    else
                    379:    {
                    380:        msg_outchar('\n');
                    381:        MSG(longVersion);
                    382: #ifdef WIN32
                    383:        MSG_OUTSTR("\nWindows NT / Windows 95 version");
                    384: #endif
                    385: #ifdef MSDOS
                    386: # ifdef DJGPP
                    387:        MSG_OUTSTR("\n32 bit MS-DOS version");
                    388: # else
                    389:        MSG_OUTSTR("\n16 bit MS-DOS version");
                    390: # endif
                    391: #endif
                    392:        MSG_OUTSTR("\nCompiled with (+) or without (-):\n");
                    393: #ifdef AMIGA           /* only for Amiga systems */
                    394: # ifdef NO_ARP
                    395:        version_msg("-ARP ");
                    396: # else
                    397:        version_msg("+ARP ");
                    398: # endif
                    399: #endif
                    400: #ifdef AUTOCMD
                    401:        version_msg("+autocmd ");
                    402: #else
                    403:        version_msg("-autocmd ");
                    404: #endif
                    405: #ifdef NO_BUILTIN_TCAPS
                    406:        version_msg("-builtin_terms ");
                    407: #endif
                    408: #ifdef SOME_BUILTIN_TCAPS
                    409:        version_msg("+builtin_terms ");
                    410: #endif
                    411: #ifdef ALL_BUILTIN_TCAPS
                    412:        version_msg("++builtin_terms ");
                    413: #endif
                    414: #ifdef CINDENT
                    415:        version_msg("+cindent ");
                    416: #else
                    417:        version_msg("-cindent ");
                    418: #endif
                    419: #ifdef COMPATIBLE
                    420:        version_msg("+compatible ");
                    421: #else
                    422:        version_msg("-compatible ");
                    423: #endif
                    424: #ifdef DEBUG
                    425:        version_msg("+debug ");
                    426: #endif
                    427: #ifdef DIGRAPHS
                    428:        version_msg("+digraphs ");
                    429: #else
                    430:        version_msg("-digraphs ");
                    431: #endif
                    432: #ifdef EMACS_TAGS
                    433:        version_msg("+emacs_tags ");
                    434: #else
                    435:        version_msg("-emacs_tags ");
                    436: #endif
                    437:            /* only interesting on Unix systems */
                    438: #if !defined(USE_SYSTEM) && defined(UNIX)
                    439:        version_msg("+fork() ");
                    440: #endif
                    441: #ifdef UNIX
                    442: # ifdef USE_GUI_MOTIF
                    443:        version_msg("+GUI_Motif ");
                    444: # else
                    445: #  ifdef USE_GUI_ATHENA
                    446:        version_msg("+GUI_Athena ");
                    447: #  else
                    448:        version_msg("-GUI ");
                    449: #  endif
                    450: # endif
                    451: #endif
                    452: #ifdef INSERT_EXPAND
                    453:        version_msg("+insert_expand ");
                    454: #else
                    455:        version_msg("-insert_expand ");
                    456: #endif
                    457: #ifdef HAVE_LANGMAP
                    458:        version_msg("+langmap ");
                    459: #else
                    460:        version_msg("-langmap ");
                    461: #endif
                    462: #ifdef LISPINDENT
                    463:        version_msg("+lispindent ");
                    464: #else
                    465:        version_msg("-lispindent ");
                    466: #endif
                    467: #ifdef RIGHTLEFT
                    468:        version_msg("+rightleft ");
                    469: #else
                    470:        version_msg("-rightleft ");
                    471: #endif
                    472: #ifdef SMARTINDENT
                    473:        version_msg("+smartindent ");
                    474: #else
                    475:        version_msg("-smartindent ");
                    476: #endif
                    477:            /* only interesting on Unix systems */
                    478: #if defined(USE_SYSTEM) && (defined(UNIX) || defined(__EMX__))
                    479:        version_msg("+system() ");
                    480: #endif
                    481: #if defined(UNIX) || defined(__EMX__)
                    482: /* only unix (or OS/2 with EMX!) can have terminfo instead of termcap */
                    483: # ifdef TERMINFO
                    484:        version_msg("+terminfo ");
                    485: # else
                    486:        version_msg("-terminfo ");
                    487: # endif
                    488: #else              /* unix always includes termcap support */
                    489: # ifdef HAVE_TGETENT
                    490:        version_msg("+tgetent ");
                    491: # else
                    492:        version_msg("-tgetent ");
                    493: # endif
                    494: #endif
                    495: #ifdef VIMINFO
                    496:        version_msg("+viminfo ");
                    497: #else
                    498:        version_msg("-viminfo ");
                    499: #endif
                    500: #ifdef WRITEBACKUP
                    501:        version_msg("+writebackup ");
                    502: #else
                    503:        version_msg("-writebackup ");
                    504: #endif
                    505: #ifdef UNIX
                    506: # if defined(WANT_X11) && defined(HAVE_X11)
                    507:        version_msg("+X11 ");
                    508: # else
                    509:        version_msg("-X11 ");
                    510: # endif
                    511: #endif
                    512:        msg_outchar('\n');
                    513: #ifdef USR_VIMRC_FILE
                    514:        version_msg("user vimrc file: \"");
                    515:        version_msg(USR_VIMRC_FILE);
                    516:        version_msg("\" ");
                    517: #endif
                    518: #ifdef USR_EXRC_FILE
                    519:        version_msg("user exrc file: \"");
                    520:        version_msg(USR_EXRC_FILE);
                    521:        version_msg("\" ");
                    522: #endif
                    523: #ifdef USE_GUI
                    524:        version_msg("user gvimrc file: \"");
                    525:        version_msg(USR_GVIMRC_FILE);
                    526:        version_msg("\" ");
                    527: #endif
                    528: #if defined(HAVE_CONFIG_H) || defined(OS2)
                    529:        msg_outchar('\n');
                    530:        version_msg("system vimrc file: \"");
                    531:        version_msg((char *)sys_vimrc_fname);
                    532:        version_msg("\"");
                    533:        msg_outchar('\n');
                    534:        version_msg("system compatrc file: \"");
                    535:        version_msg((char *)sys_compatrc_fname);
                    536:        version_msg("\"");
                    537: # ifdef USE_GUI
                    538:        msg_outchar('\n');
                    539:        version_msg("system gvimrc file: \"");
                    540:        version_msg((char *)sys_gvimrc_fname);
                    541:        MSG_OUTSTR("\"");
                    542: # endif
                    543:        msg_outchar('\n');
                    544:        version_msg("Compilation: ");
                    545:        version_msg((char *)all_cflags);
                    546: #endif
                    547:    }
                    548: }
                    549:
                    550: /*
                    551:  * Output a string for the version message.  If it's going to wrap, output a
                    552:  * newline, unless the message is too long to fit on the screen anyway.
                    553:  */
                    554:    static void
                    555: version_msg(s)
                    556:    char        *s;
                    557: {
                    558:    int     len = strlen(s);
                    559:
                    560:    if (len < (int)Columns && msg_col + len >= (int)Columns)
                    561:        msg_outchar('\n');
                    562:    MSG_OUTSTR(s);
                    563: }