home *** CD-ROM | disk | FTP | other *** search
/ vim.ftp.fu-berlin.de / 2015-02-03.vim.ftp.fu-berlin.de.tar / vim.ftp.fu-berlin.de / unix / vim-6.2.tar.bz2 / vim-6.2.tar / vim62 / src / option.h < prev    next >
Encoding:
C/C++ Source or Header  |  2003-05-17  |  26.4 KB  |  786 lines

  1. /* vi:set ts=8 sts=4 sw=4:
  2.  *
  3.  * VIM - Vi IMproved    by Bram Moolenaar
  4.  *
  5.  * Do ":help uganda"  in Vim to read copying and usage conditions.
  6.  * Do ":help credits" in Vim to see a list of people who contributed.
  7.  */
  8.  
  9. /*
  10.  * option.h: definition of global variables for settable options
  11.  */
  12.  
  13. #ifndef EXTERN
  14. # define EXTERN extern
  15. # define INIT(x)
  16. #else
  17. # ifndef INIT
  18. #  define INIT(x) x
  19. # endif
  20. #endif
  21.  
  22. /* default values for p_efm 'errorformat' */
  23. #ifdef AMIGA
  24. # define DFLT_EFM    "%f>%l:%c:%t:%n:%m,%f:%l: %t%*\\D%n: %m,%f %l %t%*\\D%n: %m,%*[^\"]\"%f\"%*\\D%l: %m,%f:%l:%m"
  25. #else
  26. # if defined(MSDOS) || defined(WIN3264)
  27. #  define DFLT_EFM    "%f(%l) : %t%*\\D%n: %m,%*[^\"]\"%f\"%*\\D%l: %m,%f(%l) : %m,%*[^ ] %f %l: %m,%f:%l:%m"
  28. # else
  29. #  if defined(__EMX__)    /* put most common here (i.e. gcc format) at front */
  30. #   define DFLT_EFM    "%f:%l:%m,%*[^\"]\"%f\"%*\\D%l: %m,\"%f\"%*\\D%l: %m,%f(%l:%c) : %m"
  31. #  else
  32. #   if defined(__QNX__)
  33. #    define DFLT_EFM    "%f(%l):%*[^WE]%t%*\\D%n:%m"
  34. #   else
  35. #    ifdef VMS
  36. #     define DFLT_EFM    "%A%p^,%C%%CC-%t-%m,%Cat line number %l in file %f"
  37. #    else /* Unix, probably */
  38. #     ifdef EBCDIC
  39. #define DFLT_EFM    "%*[^ ] %*[^ ] %f:%l%*[ ]%m,%*[^\"]\"%f\"%*\\D%l: %m,\"%f\"%*\\D%l: %m,%f:%l:%m,\"%f\"\\, line %l%*\\D%c%*[^ ] %m,%D%*\\a[%*\\d]: Entering directory `%f',%X%*\\a[%*\\d]: Leaving directory `%f',%DMaking %*\\a in %f"
  40. #     else
  41. #define DFLT_EFM    "%*[^\"]\"%f\"%*\\D%l: %m,\"%f\"%*\\D%l: %m,%-G%f:%l: (Each undeclared identifier is reported only once,%-G%f:%l: for each function it appears in.),%f:%l:%m,\"%f\"\\, line %l%*\\D%c%*[^ ] %m,%D%*\\a[%*\\d]: Entering directory `%f',%X%*\\a[%*\\d]: Leaving directory `%f',%DMaking %*\\a in %f"
  42. #     endif
  43. #    endif
  44. #   endif
  45. #  endif
  46. # endif
  47. #endif
  48.  
  49. #define DFLT_GREPFORMAT    "%f:%l:%m,%f:%l%m,%f  %l%m"
  50.  
  51. /* default values for b_p_ff 'fileformat' and p_ffs 'fileformats' */
  52. #define FF_DOS        "dos"
  53. #define FF_MAC        "mac"
  54. #define FF_UNIX        "unix"
  55.  
  56. #ifdef USE_CRNL
  57. # define DFLT_FF    "dos"
  58. # define DFLT_FFS_VIM    "dos,unix"
  59. # define DFLT_FFS_VI    "dos,unix"    /* also autodetect in compatible mode */
  60. # define DFLT_TEXTAUTO    TRUE
  61. #else
  62. # ifdef USE_CR
  63. #  define DFLT_FF    "mac"
  64. #  define DFLT_FFS_VIM    "mac,unix,dos"
  65. #  define DFLT_FFS_VI    "mac,unix,dos"
  66. #  define DFLT_TEXTAUTO    TRUE
  67. # else
  68. #  define DFLT_FF    "unix"
  69. #  define DFLT_FFS_VIM    "unix,dos"
  70. #  ifdef __CYGWIN__
  71. #   define DFLT_FFS_VI    "unix,dos"    /* Cygwin always needs file detection */
  72. #   define DFLT_TEXTAUTO TRUE
  73. #  else
  74. #   define DFLT_FFS_VI    ""
  75. #   define DFLT_TEXTAUTO FALSE
  76. #  endif
  77. # endif
  78. #endif
  79.  
  80.  
  81. #ifdef FEAT_MBYTE
  82. /* Possible values for 'encoding' */
  83. # define ENC_UCSBOM    "ucs-bom"    /* check for BOM at start of file */
  84.  
  85. /* default value for 'encoding' */
  86. # define ENC_DFLT    "latin1"
  87. #endif
  88.  
  89. /* end-of-line style */
  90. #define EOL_UNKNOWN    -1    /* not defined yet */
  91. #define EOL_UNIX    0    /* NL */
  92. #define EOL_DOS        1    /* CR NL */
  93. #define EOL_MAC        2    /* CR */
  94.  
  95. /* Formatting options for p_fo 'formatoptions' */
  96. #define FO_WRAP        't'
  97. #define FO_WRAP_COMS    'c'
  98. #define FO_RET_COMS    'r'
  99. #define FO_OPEN_COMS    'o'
  100. #define FO_Q_COMS    'q'
  101. #define FO_Q_NUMBER    'n'
  102. #define FO_Q_SECOND    '2'
  103. #define FO_INS_VI    'v'
  104. #define FO_INS_LONG    'l'
  105. #define FO_INS_BLANK    'b'
  106. #define FO_MBYTE_BREAK    'm'    /* break before/after multi-byte char */
  107. #define FO_MBYTE_JOIN    'M'    /* no space before/after multi-byte char */
  108. #define FO_MBYTE_JOIN2    'B'    /* no space between multi-byte chars */
  109. #define FO_ONE_LETTER    '1'
  110. #define FO_WHITE_PAR    'w'    /* trailing white space continues paragr. */
  111. #define FO_AUTO        'a'    /* automatic formatting */
  112.  
  113. #define DFLT_FO_VI    "vt"
  114. #define DFLT_FO_VIM    "tcq"
  115. #define FO_ALL        "tcroq2vlb1mMBn,aw"    /* for do_set() */
  116.  
  117. /* characters for the p_cpo option: */
  118. #define CPO_ALTREAD    'a'    /* ":read" sets alternate file name */
  119. #define CPO_ALTWRITE    'A'    /* ":write" sets alternate file name */
  120. #define CPO_BAR        'b'    /* "\|" ends a mapping */
  121. #define CPO_BSLASH    'B'    /* backslash in mapping is not special */
  122. #define CPO_SEARCH    'c'
  123. #define CPO_CONCAT    'C'    /* Don't concatenate sourced lines */
  124. #define CPO_DOTTAG    'd'    /* "./tags" in 'tags' is in current dir */
  125. #define CPO_DIGRAPH    'D'    /* No digraph after "r", "f", etc. */
  126. #define CPO_EXECBUF    'e'
  127. #define CPO_EMPTYREGION    'E'    /* operating on empty region is an error */
  128. #define CPO_FNAMER    'f'    /* set file name for ":r file" */
  129. #define CPO_FNAMEW    'F'    /* set file name for ":w file" */
  130. #define CPO_GOTO1    'g'    /* goto line 1 for ":edit" */
  131. #define CPO_INTMOD    'i'    /* interrupt a read makes buffer modified */
  132. #define CPO_JOINSP    'j'    /* only use two spaces for join after '.' */
  133. #define CPO_ENDOFSENT    'J'    /* need two spaces to detect end of sentence */
  134. #define CPO_KEYCODE    'k'    /* don't recognize raw key code in mappings */
  135. #define CPO_KOFFSET    'K'    /* don't wait for key code in mappings */
  136. #define CPO_LITERAL    'l'    /* take char after backslash in [] literal */
  137. #define CPO_LISTWM    'L'    /* 'list' changes wrapmargin */
  138. #define CPO_SHOWMATCH    'm'
  139. #define CPO_MATCHBSL    'M'    /* "%" ignores use of backslashes */
  140. #define CPO_NUMCOL    'n'    /* 'number' column also used for text */
  141. #define CPO_LINEOFF    'o'
  142. #define CPO_OVERNEW    'O'    /* silently overwrite new file */
  143. #define CPO_LISP    'p'    /* 'lisp' indenting */
  144. #define CPO_REDO    'r'
  145. #define CPO_BUFOPT    's'
  146. #define CPO_BUFOPTGLOB    'S'
  147. #define CPO_TAGPAT    't'
  148. #define CPO_UNDO    'u'    /* "u" undoes itself */
  149. #define CPO_BACKSPACE    'v'    /* "v" keep deleted text */
  150. #define CPO_CW        'w'    /* "cw" only changes one blank */
  151. #define CPO_FWRITE    'W'    /* "w!" doesn't overwrite readonly files */
  152. #define CPO_ESC        'x'
  153. #define CPO_YANK    'y'
  154. #define CPO_DOLLAR    '$'
  155. #define CPO_FILTER    '!'
  156. #define CPO_MATCH    '%'
  157. #define CPO_STAR    '*'    /* ":*" means ":@" */
  158. #define CPO_SPECI    '<'    /* don't recognize <> in mappings */
  159. #define CPO_DEFAULT    "aABceFs"
  160. #define CPO_ALL        "aAbBcCdDeEfFgijJkKlLmMnoOprsStuvwWxy$!%*<"
  161.  
  162. /* characters for p_ww option: */
  163. #define WW_ALL        "bshl<>[],~"
  164.  
  165. /* characters for p_mouse option: */
  166. #define MOUSE_NORMAL    'n'        /* use mouse in Normal mode */
  167. #define MOUSE_VISUAL    'v'        /* use mouse in Visual/Select mode */
  168. #define MOUSE_INSERT    'i'        /* use mouse in Insert mode */
  169. #define MOUSE_COMMAND    'c'        /* use mouse in Command-line mode */
  170. #define MOUSE_HELP    'h'        /* use mouse in help buffers */
  171. #define MOUSE_RETURN    'r'        /* use mouse for hit-return message */
  172. #define MOUSE_A        "nvich"        /* used for 'a' flag */
  173. #define MOUSE_ALL    "anvichr"    /* all possible characters */
  174. #define MOUSE_NONE    ' '        /* don't use Visual selection */
  175. #define MOUSE_NONEF    'x'        /* forced modeless selection */
  176.  
  177. /* characters for p_shm option: */
  178. #define SHM_RO        'r'        /* readonly */
  179. #define SHM_MOD        'm'        /* modified */
  180. #define SHM_FILE    'f'        /* (file 1 of 2) */
  181. #define SHM_LAST    'i'        /* last line incomplete */
  182. #define SHM_TEXT    'x'        /* tx instead of textmode */
  183. #define SHM_LINES    'l'        /* "L" instead of "lines" */
  184. #define SHM_NEW        'n'        /* "[New]" instead of "[New file]" */
  185. #define SHM_WRI        'w'        /* "[w]" instead of "written" */
  186. #define SHM_A        "rmfixlnw"    /* represented by 'a' flag */
  187. #define SHM_WRITE    'W'        /* don't use "written" at all */
  188. #define SHM_TRUNC    't'        /* trunctate file messages */
  189. #define SHM_TRUNCALL    'T'        /* trunctate all messages */
  190. #define SHM_OVER    'o'        /* overwrite file messages */
  191. #define SHM_OVERALL    'O'        /* overwrite more messages */
  192. #define SHM_SEARCH    's'        /* no search hit bottom messages */
  193. #define SHM_ATTENTION    'A'        /* no ATTENTION messages */
  194. #define SHM_INTRO    'I'        /* intro messages */
  195. #define SHM_ALL        "rmfixlnwaWtToOsAI" /* all possible flags for 'shm' */
  196.  
  197. /* characters for p_go: */
  198. #define GO_ASEL        'a'        /* autoselect */
  199. #define GO_ASELML    'A'        /* autoselect modeless selection */
  200. #define GO_BOT        'b'        /* use bottom scrollbar */
  201. #define GO_CONDIALOG    'c'        /* use console dialog */
  202. #define GO_FORG        'f'        /* start GUI in foreground */
  203. #define GO_GREY        'g'        /* use grey menu items */
  204. #define GO_ICON        'i'        /* use Vim icon */
  205. #define GO_LEFT        'l'        /* use left scrollbar */
  206. #define GO_VLEFT    'L'        /* left scrollbar with vert split */
  207. #define GO_MENUS    'm'        /* use menu bar */
  208. #define GO_NOSYSMENU    'M'        /* don't source system menu */
  209. #define GO_POINTER    'p'        /* pointer enter/leave callbacks */
  210. #define GO_RIGHT    'r'        /* use right scrollbar */
  211. #define GO_VRIGHT    'R'        /* right scrollbar with vert split */
  212. #define GO_TEAROFF    't'        /* add tear-off menu items */
  213. #define GO_TOOLBAR    'T'        /* add toolbar */
  214. #define GO_FOOTER    'F'        /* add footer */
  215. #define GO_VERTICAL    'v'        /* arrange dialog buttons vertically */
  216. #define GO_ALL        "aAbcfFgilmMprtTv" /* all possible flags for 'go' */
  217.  
  218. /* flags for 'comments' option */
  219. #define COM_NEST    'n'        /* comments strings nest */
  220. #define COM_BLANK    'b'        /* needs blank after string */
  221. #define COM_START    's'        /* start of comment */
  222. #define COM_MIDDLE    'm'        /* middle of comment */
  223. #define COM_END        'e'        /* end of comment */
  224. #define COM_AUTO_END    'x'        /* last char of end closes comment */
  225. #define COM_FIRST    'f'        /* first line comment only */
  226. #define COM_LEFT    'l'        /* left adjusted */
  227. #define COM_RIGHT    'r'        /* right adjusted */
  228. #define COM_NOBACK    'O'        /* don't use for "O" command */
  229. #define COM_ALL        "nbsmexflrO"    /* all flags for 'comments' option */
  230. #define COM_MAX_LEN    50        /* maximum length of a part */
  231.  
  232. /* flags for 'statusline' option */
  233. #define STL_FILEPATH    'f'        /* path of file in buffer */
  234. #define STL_FULLPATH    'F'        /* full path of file in buffer */
  235. #define STL_FILENAME    't'        /* last part (tail) of file path */
  236. #define STL_COLUMN    'c'        /* column og cursor*/
  237. #define STL_VIRTCOL    'v'        /* virtual column */
  238. #define STL_VIRTCOL_ALT    'V'        /* - with 'if different' display */
  239. #define STL_LINE    'l'        /* line number of cursor */
  240. #define STL_NUMLINES    'L'        /* number of lines in buffer */
  241. #define STL_BUFNO    'n'        /* current buffer number */
  242. #define STL_KEYMAP    'k'        /* 'keymap' when active */
  243. #define STL_OFFSET    'o'        /* offset of character under cursor*/
  244. #define STL_OFFSET_X    'O'        /* - in hexadecimal */
  245. #define STL_BYTEVAL    'b'        /* byte value of character */
  246. #define STL_BYTEVAL_X    'B'        /* - in hexadecimal */
  247. #define STL_ROFLAG    'r'        /* readonly flag */
  248. #define STL_ROFLAG_ALT    'R'        /* - other display */
  249. #define STL_HELPFLAG    'h'        /* window is showing a help file */
  250. #define STL_HELPFLAG_ALT 'H'        /* - other display */
  251. #define STL_FILETYPE    'y'        /* 'filetype' */
  252. #define STL_FILETYPE_ALT 'Y'        /* - other display */
  253. #define STL_PREVIEWFLAG    'w'        /* window is showing the preview buf */
  254. #define STL_PREVIEWFLAG_ALT 'W'        /* - other display */
  255. #define STL_MODIFIED    'm'        /* modified flag */
  256. #define STL_MODIFIED_ALT 'M'        /* - other display */
  257. #define STL_PERCENTAGE    'p'        /* percentage through file */
  258. #define STL_ALTPERCENT    'P'        /* percentage as TOP BOT ALL or NN% */
  259. #define STL_ARGLISTSTAT    'a'        /* argument list status as (x of y) */
  260. #define STL_PAGENUM    'N'        /* page number (when printing)*/
  261. #define STL_VIM_EXPR    '{'        /* start of expression to substitute */
  262. #define STL_MIDDLEMARK    '='        /* separation between left and right */
  263. #define STL_TRUNCMARK    '<'        /* truncation mark if line is too long*/
  264. #define STL_HIGHLIGHT    '*'        /* highlight from (User)1..9 or 0 */
  265. #define STL_ALL        ((char_u *) "fFtcvVlLknoObBrRhHmYyWwMpPaN{")
  266.  
  267. /* flags used for parsed 'wildmode' */
  268. #define WIM_FULL    1
  269. #define WIM_LONGEST    2
  270. #define WIM_LIST    4
  271.  
  272. /* arguments for can_bs() */
  273. #define BS_INDENT    'i'    /* "Indent" */
  274. #define BS_EOL        'o'    /* "eOl" */
  275. #define BS_START    's'    /* "Start" */
  276.  
  277. #define LISPWORD_VALUE    "defun,define,defmacro,set!,lambda,if,case,let,flet,let*,letrec,do,do*,define-syntax,let-syntax,letrec-syntax,destructuring-bind,defpackage,defparameter,defstruct,deftype,defvar,do-all-symbols,do-external-symbols,do-symbols,dolist,dotimes,ecase,etypecase,eval-when,labels,macrolet,multiple-value-bind,multiple-value-call,multiple-value-prog1,multiple-value-setq,prog1,progv,typecase,unless,unwind-protect,when,with-input-from-string,with-open-file,with-open-stream,with-output-to-string,with-package-iterator,define-condition,handler-bind,handler-case,restart-bind,restart-case,with-simple-restart,store-value,use-value,muffle-warning,abort,continue,with-slots,with-slots*,with-accessors,with-accessors*,defclass,defmethod,print-unreadable-object"
  278.  
  279. /*
  280.  * The following are actual variabables for the options
  281.  */
  282.  
  283. #ifdef FEAT_RIGHTLEFT
  284. EXTERN long    p_aleph;    /* 'aleph' */
  285. #endif
  286. #if defined(FEAT_NETBEANS_INTG) || defined(FEAT_SUN_WORKSHOP)
  287. EXTERN int    p_acd;        /* 'autochdir' */
  288. #endif
  289. #ifdef FEAT_MBYTE
  290. EXTERN char_u    *p_ambw;    /* 'ambiwidth' */
  291. #endif
  292. EXTERN int    p_ar;        /* 'autoread' */
  293. EXTERN int    p_aw;        /* 'autowrite' */
  294. EXTERN int    p_awa;        /* 'autowriteall' */
  295. EXTERN char_u    *p_bs;        /* 'backspace' */
  296. EXTERN char_u    *p_bg;        /* 'background' */
  297. EXTERN int    p_bk;        /* 'backup' */
  298. EXTERN char_u    *p_bkc;        /* 'backupcopy' */
  299. EXTERN char_u    *p_bdir;    /* 'backupdir' */
  300. EXTERN char_u    *p_bex;        /* 'backupext' */
  301. #ifdef FEAT_WILDIGN
  302. EXTERN char_u    *p_bsk;        /* 'backupskip' */
  303. #endif
  304. #ifdef FEAT_BEVAL
  305. EXTERN long    p_bdlay;    /* 'balloondelay' */
  306. # if defined(FEAT_SUN_WORKSHOP) || defined(FEAT_NETBEANS_INTG)
  307. EXTERN int    p_beval;    /* 'ballooneval' */
  308. # endif
  309. #endif
  310. #ifdef FEAT_BROWSE
  311. EXTERN char_u    *p_bsdir;    /* 'browsedir' */
  312. #endif
  313. #ifdef MSDOS
  314. EXTERN int    p_biosk;    /* 'bioskey' */
  315. EXTERN int    p_consk;    /* 'conskey' */
  316. #endif
  317. #ifdef FEAT_LINEBREAK
  318. EXTERN char_u    *p_breakat;    /* 'breakat' */
  319. #endif
  320. EXTERN char_u    *p_cmp;        /* 'casemap' */
  321. EXTERN unsigned    cmp_flags;
  322. #ifdef IN_OPTION_C
  323. static char *(p_cmp_values[]) = {"internal", "keepascii", NULL};
  324. #endif
  325. #define CMP_INTERNAL        0x001
  326. #define CMP_KEEPASCII        0x002
  327. #ifdef FEAT_MBYTE
  328. EXTERN char_u    *p_enc;        /* 'encoding' */
  329. EXTERN int    p_deco;        /* 'delcombine' */
  330. # ifdef FEAT_EVAL
  331. EXTERN char_u    *p_ccv;        /* 'charconvert' */
  332. # endif
  333. #endif
  334. #ifdef FEAT_CMDWIN
  335. EXTERN char_u    *p_cedit;    /* 'cedit' */
  336. EXTERN long    p_cwh;        /* 'cmdwinheight' */
  337. #endif
  338. #ifdef FEAT_CLIPBOARD
  339. EXTERN char_u    *p_cb;        /* 'clipboard' */
  340. EXTERN int    clip_unnamed INIT(= FALSE);
  341. EXTERN int    clip_autoselect INIT(= FALSE);
  342. EXTERN int    clip_autoselectml INIT(= FALSE);
  343. EXTERN regprog_T *clip_exclude_prog INIT(= NULL);
  344. #endif
  345. EXTERN long    p_ch;        /* 'cmdheight' */
  346. #if defined(FEAT_GUI_DIALOG) || defined(FEAT_CON_DIALOG)
  347. EXTERN int    p_confirm;    /* 'confirm' */
  348. #endif
  349. EXTERN int    p_cp;        /* 'compatible' */
  350. EXTERN char_u    *p_cpo;        /* 'cpoptions' */
  351. #ifdef FEAT_CSCOPE
  352. EXTERN char_u    *p_csprg;    /* 'cscopeprg' */
  353. # ifdef FEAT_QUICKFIX
  354. EXTERN char_u    *p_csqf;    /* 'cscopequickfix' */
  355. #  define    CSQF_CMDS   "sgdctefi"
  356. #  define    CSQF_FLAGS  "+-0"
  357. # endif
  358. EXTERN int    p_cst;        /* 'cscopetag' */
  359. EXTERN long    p_csto;        /* 'cscopetagorder' */
  360. EXTERN long    p_cspc;        /* 'cscopepathcomp' */
  361. EXTERN int    p_csverbose;    /* 'cscopeverbose' */
  362. #endif
  363. EXTERN char_u    *p_debug;    /* 'debug' */
  364. #ifdef FEAT_FIND_ID
  365. EXTERN char_u    *p_def;        /* 'define' */
  366. EXTERN char_u    *p_inc;
  367. #endif
  368. #ifdef FEAT_DIFF
  369. EXTERN char_u    *p_dip;        /* 'diffopt' */
  370. # ifdef FEAT_EVAL
  371. EXTERN char_u    *p_dex;        /* 'diffexpr' */
  372. # endif
  373. #endif
  374. #ifdef FEAT_INS_EXPAND
  375. EXTERN char_u    *p_dict;    /* 'dictionary' */
  376. #endif
  377. #ifdef FEAT_DIGRAPHS
  378. EXTERN int    p_dg;        /* 'digraph' */
  379. #endif
  380. EXTERN char_u    *p_dir;        /* 'directory' */
  381. EXTERN char_u    *p_dy;        /* 'display' */
  382. EXTERN unsigned    dy_flags;
  383. #ifdef IN_OPTION_C
  384. static char *(p_dy_values[]) = {"lastline", "uhex", NULL};
  385. #endif
  386. #define DY_LASTLINE        0x001
  387. #define DY_UHEX            0x002
  388. EXTERN int    p_ed;        /* 'edcompatible' */
  389. #ifdef FEAT_VERTSPLIT
  390. EXTERN char_u    *p_ead;        /* 'eadirection' */
  391. #endif
  392. EXTERN int    p_ea;        /* 'equalalways' */
  393. EXTERN char_u    *p_ep;        /* 'equalprg' */
  394. EXTERN int    p_eb;        /* 'errorbells' */
  395. #ifdef FEAT_QUICKFIX
  396. EXTERN char_u    *p_ef;        /* 'errorfile' */
  397. EXTERN char_u    *p_efm;        /* 'errorformat' */
  398. EXTERN char_u    *p_gefm;    /* 'grepformat' */
  399. EXTERN char_u    *p_gp;        /* 'grepprg' */
  400. #endif
  401. #ifdef FEAT_AUTOCMD
  402. EXTERN char_u    *p_ei;        /* 'eventignore' */
  403. #endif
  404. EXTERN int    p_ek;        /* 'esckeys' */
  405. EXTERN int    p_exrc;        /* 'exrc' */
  406. #ifdef FEAT_MBYTE
  407. EXTERN char_u    *p_fencs;    /* 'fileencodings' */
  408. #endif
  409. EXTERN char_u    *p_ffs;        /* 'fileformats' */
  410. #ifdef FEAT_FOLDING
  411. EXTERN char_u    *p_fcl;        /* 'foldclose' */
  412. EXTERN long    p_fdls;        /* 'foldlevelstart' */
  413. EXTERN char_u    *p_fdo;        /* 'foldopen' */
  414. EXTERN unsigned    fdo_flags;
  415. # ifdef IN_OPTION_C
  416. static char *(p_fdo_values[]) = {"all", "block", "hor", "mark", "percent",
  417.                  "quickfix", "search", "tag", "insert",
  418.                  "undo", "jump", NULL};
  419. # endif
  420. # define FDO_ALL        0x001
  421. # define FDO_BLOCK        0x002
  422. # define FDO_HOR        0x004
  423. # define FDO_MARK        0x008
  424. # define FDO_PERCENT        0x010
  425. # define FDO_QUICKFIX        0x020
  426. # define FDO_SEARCH        0x040
  427. # define FDO_TAG        0x080
  428. # define FDO_INSERT        0x100
  429. # define FDO_UNDO        0x200
  430. # define FDO_JUMP        0x400
  431. #endif
  432. EXTERN char_u    *p_fp;        /* 'formatprg' */
  433. EXTERN int    p_gd;        /* 'gdefault' */
  434. #ifdef FEAT_PRINTER
  435. EXTERN char_u    *p_pdev;    /* 'printdevice' */
  436. # ifdef FEAT_POSTSCRIPT
  437. EXTERN char_u    *p_penc;    /* 'printencoding' */
  438. EXTERN char_u    *p_pexpr;    /* 'printexpr' */
  439. # endif
  440. EXTERN char_u    *p_pfn;        /* 'printfont' */
  441. EXTERN char_u    *p_popt;    /* 'printoptions' */
  442. EXTERN char_u    *p_header;    /* 'printheader' */
  443. #endif
  444. #ifdef FEAT_GUI
  445. EXTERN char_u    *p_guifont;    /* 'guifont' */
  446. # ifdef FEAT_XFONTSET
  447. EXTERN char_u    *p_guifontset;    /* 'guifontset' */
  448. # endif
  449. # ifdef FEAT_MBYTE
  450. EXTERN char_u    *p_guifontwide;    /* 'guifontwide' */
  451. # endif
  452. EXTERN int    p_guipty;    /* 'guipty' */
  453. #endif
  454. #if defined(FEAT_GUI_GTK) || defined(FEAT_GUI_X11)
  455. EXTERN long    p_ghr;        /* 'guiheadroom' */
  456. #endif
  457. #ifdef CURSOR_SHAPE
  458. EXTERN char_u    *p_guicursor;    /* 'guicursor' */
  459. #endif
  460. #ifdef FEAT_MOUSESHAPE
  461. EXTERN char_u    *p_mouseshape;    /* 'mouseshape' */
  462. #endif
  463. #if defined(FEAT_GUI)
  464. EXTERN char_u    *p_go;        /* 'guioptions' */
  465. #endif
  466. EXTERN char_u    *p_hf;        /* 'helpfile' */
  467. #ifdef FEAT_WINDOWS
  468. EXTERN long    p_hh;        /* 'helpheight' */
  469. #endif
  470. EXTERN int    p_hid;        /* 'hidden' */
  471. /* Use P_HID to check if a buffer is to be hidden when it is no longer
  472.  * visible in a window. */
  473. #ifndef FEAT_QUICKFIX
  474. # define P_HID(dummy) (p_hid || cmdmod.hide)
  475. #else
  476. # define P_HID(buf) (buf_hide(buf))
  477. #endif
  478. EXTERN char_u    *p_hl;        /* 'highlight' */
  479. EXTERN int    p_hls;        /* 'hlsearch' */
  480. EXTERN long    p_hi;        /* 'history' */
  481. #ifdef FEAT_RIGHTLEFT
  482. EXTERN int    p_hkmap;    /* 'hkmap' */
  483. EXTERN int    p_hkmapp;    /* 'hkmapp' */
  484. # ifdef FEAT_FKMAP
  485. EXTERN int    p_fkmap;    /* 'fkmap' */
  486. EXTERN int    p_altkeymap;    /* 'altkeymap' */
  487. # endif
  488. # ifdef FEAT_ARABIC
  489. EXTERN int    p_arshape;    /* 'arabicshape' */
  490. # endif
  491. #endif
  492. #ifdef FEAT_TITLE
  493. EXTERN int    p_icon;        /* 'icon' */
  494. EXTERN char_u    *p_iconstring;    /* 'iconstring' */
  495. #endif
  496. EXTERN int    p_ic;        /* 'ignorecase' */
  497. #if defined(FEAT_XIM) && defined(FEAT_GUI_GTK)
  498. EXTERN char_u    *p_imak;    /* 'imactivatekey' */
  499. #endif
  500. #ifdef USE_IM_CONTROL
  501. EXTERN int    p_imcmdline;    /* 'imcmdline' */
  502. EXTERN int    p_imdisable;    /* 'imdisable' */
  503. #endif
  504. EXTERN int    p_is;        /* 'incsearch' */
  505. EXTERN int    p_im;        /* 'insertmode' */
  506. EXTERN char_u    *p_isf;        /* 'isfname' */
  507. EXTERN char_u    *p_isi;        /* 'isident' */
  508. EXTERN char_u    *p_isp;        /* 'isprint' */
  509. EXTERN int    p_js;        /* 'joinspaces' */
  510. EXTERN char_u    *p_kp;        /* 'keywordprg' */
  511. #ifdef FEAT_VISUAL
  512. EXTERN char_u    *p_km;        /* 'keymodel' */
  513. #endif
  514. #ifdef FEAT_LANGMAP
  515. EXTERN char_u    *p_langmap;    /* 'langmap'*/
  516. #endif
  517. #if defined(FEAT_MENU) && defined(FEAT_MULTI_LANG)
  518. EXTERN char_u    *p_lm;        /* 'langmenu' */
  519. #endif
  520. #ifdef FEAT_GUI
  521. EXTERN long    p_linespace;    /* 'linespace' */
  522. #endif
  523. #ifdef FEAT_LISP
  524. EXTERN char_u    *p_lispwords;    /* 'lispwords' */
  525. #endif
  526. #ifdef FEAT_WINDOWS
  527. EXTERN long    p_ls;        /* 'laststatus' */
  528. #endif
  529. EXTERN char_u    *p_lcs;        /* 'listchars' */
  530.  
  531. EXTERN int    p_lz;        /* 'lazyredraw' */
  532. EXTERN int    p_lpl;        /* 'loadplugins' */
  533. EXTERN int    p_magic;    /* 'magic' */
  534. #ifdef FEAT_QUICKFIX
  535. EXTERN char_u    *p_mef;        /* 'makeef' */
  536. EXTERN char_u    *p_mp;        /* 'makeprg' */
  537. #endif
  538. EXTERN long    p_mat;        /* 'matchtime' */
  539. #ifdef FEAT_EVAL
  540. EXTERN long    p_mfd;        /* 'maxfuncdepth' */
  541. #endif
  542. EXTERN long    p_mmd;        /* 'maxmapdepth' */
  543. EXTERN long    p_mm;        /* 'maxmem' */
  544. EXTERN long    p_mmt;        /* 'maxmemtot' */
  545. #ifdef FEAT_MENU
  546. EXTERN long    p_mis;        /* 'menuitems' */
  547. #endif
  548. EXTERN long    p_mls;        /* 'modelines' */
  549. EXTERN char_u    *p_mouse;    /* 'mouse' */
  550. #ifdef FEAT_GUI
  551. EXTERN int    p_mousef;    /* 'mousefocus' */
  552. EXTERN int    p_mh;        /* 'mousehide' */
  553. #endif
  554. EXTERN char_u    *p_mousem;    /* 'mousemodel' */
  555. EXTERN long    p_mouset;    /* 'mousetime' */
  556. EXTERN int    p_more;        /* 'more' */
  557. EXTERN char_u    *p_para;    /* 'paragraphs' */
  558. EXTERN int    p_paste;    /* 'paste' */
  559. EXTERN char_u    *p_pt;        /* 'pastetoggle' */
  560. #if defined(FEAT_EVAL) && defined(FEAT_DIFF)
  561. EXTERN char_u    *p_pex;        /* 'patchexpr' */
  562. #endif
  563. EXTERN char_u    *p_pm;        /* 'patchmode' */
  564. EXTERN char_u    *p_path;    /* 'path' */
  565. #ifdef FEAT_SEARCHPATH
  566. EXTERN char_u    *p_cdpath;    /* 'cdpath' */
  567. #endif
  568. EXTERN int    p_remap;    /* 'remap' */
  569. EXTERN long    p_report;    /* 'report' */
  570. #if defined(FEAT_WINDOWS) && defined(FEAT_QUICKFIX)
  571. EXTERN long    p_pvh;        /* 'previewheight' */
  572. #endif
  573. #ifdef WIN3264
  574. EXTERN int    p_rs;        /* 'restorescreen' */
  575. #endif
  576. #ifdef FEAT_RIGHTLEFT
  577. EXTERN int    p_ari;        /* 'allowrevins' */
  578. EXTERN int    p_ri;        /* 'revins' */
  579. #endif
  580. #ifdef FEAT_CMDL_INFO
  581. EXTERN int    p_ru;        /* 'ruler' */
  582. #endif
  583. #ifdef FEAT_STL_OPT
  584. EXTERN char_u    *p_ruf;        /* 'rulerformat' */
  585. #endif
  586. EXTERN char_u    *p_rtp;        /* 'runtimepath' */
  587. EXTERN long    p_sj;        /* 'scrolljump' */
  588. EXTERN long    p_so;        /* 'scrolloff' */
  589. #ifdef FEAT_SCROLLBIND
  590. EXTERN char_u    *p_sbo;        /* 'scrollopt' */
  591. #endif
  592. EXTERN char_u    *p_sections;    /* 'sections' */
  593. EXTERN int    p_secure;    /* 'secure' */
  594. #ifdef FEAT_VISUAL
  595. EXTERN char_u    *p_sel;        /* 'selection' */
  596. EXTERN char_u    *p_slm;        /* 'selectmode' */
  597. #endif
  598. #ifdef FEAT_SESSION
  599. EXTERN char_u    *p_ssop;    /* 'sessionoptions' */
  600. EXTERN unsigned    ssop_flags;
  601. # ifdef IN_OPTION_C
  602. /* Also used for 'viewoptions'! */
  603. static char *(p_ssop_values[]) = {"buffers", "winpos", "resize", "winsize",
  604.     "localoptions", "options", "help", "blank", "globals", "slash", "unix",
  605.     "sesdir", "curdir", "folds", "cursor", NULL};
  606. # endif
  607. # define SSOP_BUFFERS        0x001
  608. # define SSOP_WINPOS        0x002
  609. # define SSOP_RESIZE        0x004
  610. # define SSOP_WINSIZE        0x008
  611. # define SSOP_LOCALOPTIONS    0x010
  612. # define SSOP_OPTIONS        0x020
  613. # define SSOP_HELP        0x040
  614. # define SSOP_BLANK        0x080
  615. # define SSOP_GLOBALS        0x100
  616. # define SSOP_SLASH        0x200
  617. # define SSOP_UNIX        0x400
  618. # define SSOP_SESDIR        0x800
  619. # define SSOP_CURDIR        0x1000
  620. # define SSOP_FOLDS        0x2000
  621. # define SSOP_CURSOR        0x4000
  622. #endif
  623. EXTERN char_u    *p_sh;        /* 'shell' */
  624. EXTERN char_u    *p_shcf;    /* 'shellcmdflag' */
  625. #ifdef FEAT_QUICKFIX
  626. EXTERN char_u    *p_sp;        /* 'shellpipe' */
  627. #endif
  628. EXTERN char_u    *p_shq;        /* 'shellquote' */
  629. EXTERN char_u    *p_sxq;        /* 'shellxquote' */
  630. EXTERN char_u    *p_srr;        /* 'shellredir' */
  631. #ifdef AMIGA
  632. EXTERN long    p_st;        /* 'shelltype' */
  633. #endif
  634. #ifdef BACKSLASH_IN_FILENAME
  635. EXTERN int    p_ssl;        /* 'shellslash' */
  636. #endif
  637. #ifdef FEAT_STL_OPT
  638. EXTERN char_u    *p_stl;        /* 'statusline' */
  639. #endif
  640. EXTERN int    p_sr;        /* 'shiftround' */
  641. EXTERN char_u    *p_shm;        /* 'shortmess' */
  642. #ifdef FEAT_LINEBREAK
  643. EXTERN char_u    *p_sbr;        /* 'showbreak' */
  644. #endif
  645. #ifdef FEAT_CMDL_INFO
  646. EXTERN int    p_sc;        /* 'showcmd' */
  647. #endif
  648. EXTERN int    p_sft;        /* 'showfulltag' */
  649. EXTERN int    p_sm;        /* 'showmatch' */
  650. EXTERN int    p_smd;        /* 'showmode' */
  651. EXTERN long    p_ss;        /* 'sidescroll' */
  652. EXTERN long    p_siso;        /* 'sidescrolloff' */
  653. EXTERN int    p_scs;        /* 'smartcase' */
  654. EXTERN int    p_sta;        /* 'smarttab' */
  655. #ifdef FEAT_WINDOWS
  656. EXTERN int    p_sb;        /* 'splitbelow' */
  657. #endif
  658. #ifdef FEAT_VERTSPLIT
  659. EXTERN int    p_spr;        /* 'splitright' */
  660. #endif
  661. EXTERN int    p_sol;        /* 'startofline' */
  662. EXTERN char_u    *p_su;        /* 'suffixes' */
  663. EXTERN char_u    *p_sws;        /* 'swapsync' */
  664. EXTERN char_u    *p_swb;        /* 'switchbuf' */
  665. EXTERN int    p_tbs;        /* 'tagbsearch' */
  666. EXTERN long    p_tl;        /* 'taglength' */
  667. EXTERN int    p_tr;        /* 'tagrelative' */
  668. EXTERN char_u    *p_tags;    /* 'tags' */
  669. EXTERN int    p_tgst;        /* 'tagstack' */
  670. #ifdef FEAT_ARABIC
  671. EXTERN int    p_tbidi;    /* 'termbidi' */
  672. #endif
  673. #ifdef FEAT_MBYTE
  674. EXTERN char_u    *p_tenc;    /* 'termencoding' */
  675. #endif
  676. EXTERN int    p_terse;    /* 'terse' */
  677. EXTERN int    p_ta;        /* 'textauto' */
  678. EXTERN int    p_to;        /* 'tildeop' */
  679. EXTERN int    p_timeout;    /* 'timeout' */
  680. EXTERN long    p_tm;        /* 'timeoutlen' */
  681. #ifdef FEAT_TITLE
  682. EXTERN int    p_title;    /* 'title' */
  683. EXTERN long    p_titlelen;    /* 'titlelen' */
  684. EXTERN char_u    *p_titleold;    /* 'titleold' */
  685. EXTERN char_u    *p_titlestring;    /* 'titlestring' */
  686. #endif
  687. #ifdef FEAT_INS_EXPAND
  688. EXTERN char_u    *p_tsr;        /* 'thesaurus' */
  689. #endif
  690. EXTERN int    p_ttimeout;    /* 'ttimeout' */
  691. EXTERN long    p_ttm;        /* 'ttimeoutlen' */
  692. EXTERN int    p_tbi;        /* 'ttybuiltin' */
  693. EXTERN int    p_tf;        /* 'ttyfast' */
  694. #if defined(FEAT_TOOLBAR) && !defined(FEAT_GUI_W32)
  695. EXTERN char_u    *p_toolbar;    /* 'toolbar' */
  696. EXTERN unsigned toolbar_flags;
  697. # ifdef IN_OPTION_C
  698. static char *(p_toolbar_values[]) = {"text", "icons", "tooltips", "horiz", NULL};
  699. # endif
  700. # define TOOLBAR_TEXT        0x01
  701. # define TOOLBAR_ICONS        0x02
  702. # define TOOLBAR_TOOLTIPS    0x04
  703. # define TOOLBAR_HORIZ        0x08
  704. #endif
  705. #if defined(FEAT_TOOLBAR) && defined(FEAT_GUI_GTK) && defined(HAVE_GTK2)
  706. EXTERN char_u    *p_tbis;    /* 'toolbariconsize' */
  707. EXTERN unsigned tbis_flags;
  708. # ifdef IN_OPTION_C
  709. static char *(p_tbis_values[]) = {"tiny", "small", "medium", "large", NULL};
  710. # endif
  711. # define TBIS_TINY        0x01
  712. # define TBIS_SMALL        0x02
  713. # define TBIS_MEDIUM        0x04
  714. # define TBIS_LARGE        0x08
  715. #endif
  716. EXTERN long    p_ttyscroll;    /* 'ttyscroll' */
  717. #if defined(FEAT_MOUSE) && (defined(UNIX) || defined(VMS))
  718. EXTERN char_u    *p_ttym;    /* 'ttymouse' */
  719. EXTERN unsigned ttym_flags;
  720. # ifdef IN_OPTION_C
  721. static char *(p_ttym_values[]) = {"xterm", "xterm2", "dec", "netterm", "jsbterm", "pterm", NULL};
  722. # endif
  723. # define TTYM_XTERM        0x01
  724. # define TTYM_XTERM2        0x02
  725. # define TTYM_DEC        0x04
  726. # define TTYM_NETTERM        0x08
  727. # define TTYM_JSBTERM        0x10
  728. # define TTYM_PTERM        0x20
  729. #endif
  730. EXTERN long    p_ul;        /* 'undolevels' */
  731. EXTERN long    p_uc;        /* 'updatecount' */
  732. EXTERN long    p_ut;        /* 'updatetime' */
  733. #if defined(FEAT_WINDOWS) || defined(FEAT_FOLDING)
  734. EXTERN char_u    *p_fcs;        /* 'fillchar' */
  735. #endif
  736. #ifdef FEAT_VIMINFO
  737. EXTERN char_u    *p_viminfo;    /* 'viminfo' */
  738. #endif
  739. #ifdef FEAT_SESSION
  740. EXTERN char_u    *p_vdir;    /* 'viewdir' */
  741. EXTERN char_u    *p_vop;        /* 'viewoptions' */
  742. EXTERN unsigned    vop_flags;    /* uses SSOP_ flags */
  743. #endif
  744. EXTERN int    p_vb;        /* 'visualbell' */
  745. #ifdef FEAT_VIRTUALEDIT
  746. EXTERN char_u    *p_ve;        /* 'virtualedit' */
  747. EXTERN unsigned ve_flags;
  748. # ifdef IN_OPTION_C
  749. static char *(p_ve_values[]) = {"block", "insert", "all", NULL};
  750. # endif
  751. # define VE_BLOCK    5    /* includes "all" */
  752. # define VE_INSERT    6    /* includes "all" */
  753. # define VE_ALL        4
  754. #endif
  755. EXTERN long    p_verbose;    /* 'verbose' */
  756. EXTERN int    p_warn;        /* 'warn' */
  757. #if defined(FEAT_GUI_MSWIN) || defined(FEAT_GUI_MOTIF) || defined(LINT) \
  758.     || defined (FEAT_GUI_GTK) || defined(FEAT_GUI_PHOTON)
  759. #define FEAT_WAK
  760. EXTERN char_u    *p_wak;        /* 'winaltkeys' */
  761. #endif
  762. #ifdef FEAT_WILDIGN
  763. EXTERN char_u    *p_wig;        /* 'wildignore' */
  764. #endif
  765. EXTERN int    p_wiv;        /* 'weirdinvert' */
  766. EXTERN char_u    *p_ww;        /* 'whichwrap' */
  767. EXTERN long    p_wc;        /* 'wildchar' */
  768. EXTERN long    p_wcm;        /* 'wildcharm' */
  769. EXTERN char_u    *p_wim;        /* 'wildmode' */
  770. #ifdef FEAT_WILDMENU
  771. EXTERN int    p_wmnu;        /* 'wildmenu' */
  772. #endif
  773. #ifdef FEAT_WINDOWS
  774. EXTERN long    p_wh;        /* 'winheight' */
  775. EXTERN long    p_wmh;        /* 'winminheight' */
  776. #endif
  777. #ifdef FEAT_VERTSPLIT
  778. EXTERN long    p_wmw;        /* 'winminwidth' */
  779. EXTERN long    p_wiw;        /* 'winwidth' */
  780. #endif
  781. EXTERN int    p_ws;        /* 'wrapscan' */
  782. EXTERN int    p_write;    /* 'write' */
  783. EXTERN int    p_wa;        /* 'writeany' */
  784. EXTERN int    p_wb;        /* 'writebackup' */
  785. EXTERN long    p_wd;        /* 'writedelay' */
  786.