| 1 | /* Copyright (c) 1979 Regents of the University of California */ |
| 2 | #include "ex.h" |
| 3 | #include "ex_tty.h" |
| 4 | |
| 5 | /* |
| 6 | * Initialization of option values. |
| 7 | * The option #defines in ex_vars.h are made |
| 8 | * from this file by the script makeoptions. |
| 9 | * |
| 10 | * These initializations are done char by char instead of as strings |
| 11 | * to confuse xstr so it will leave them alone. |
| 12 | */ |
| 13 | char direct[ONMSZ] = |
| 14 | { '/', 't', 'm', 'p' }; |
| 15 | char paragraphs[ONMSZ] = { |
| 16 | 'I', 'P', 'L', 'P', 'P', 'P', 'Q', 'P', /* -ms macros */ |
| 17 | 'P', ' ', 'L', 'I', /* -mm macros */ |
| 18 | 'b', 'p' /* bare nroff */ |
| 19 | }; |
| 20 | char sections[ONMSZ] = { |
| 21 | 'N', 'H', 'S', 'H', /* -ms macros */ |
| 22 | 'H', ' ', 'H', 'U' /* -mm macros */ |
| 23 | }; |
| 24 | char shell[ONMSZ] = |
| 25 | { '/', 'b', 'i', 'n', '/', 's', 'h' }; |
| 26 | char tags[ONMSZ] = { |
| 27 | 't', 'a', 'g', 's', ' ', |
| 28 | '/', 'u', 's', 'r', '/', 'l', 'i', 'b', '/', 't', 'a', 'g', 's' |
| 29 | }; |
| 30 | char ttytype[ONMSZ] = |
| 31 | { 'd', 'u', 'm', 'b' }; |
| 32 | |
| 33 | short COLUMNS = 80; |
| 34 | short LINES = 24; |
| 35 | |
| 36 | struct option options[NOPTS + 1] = { |
| 37 | "autoindent", "ai", ONOFF, 0, 0, 0, |
| 38 | "autoprint", "ap", ONOFF, 1, 1, 0, |
| 39 | "autowrite", "aw", ONOFF, 0, 0, 0, |
| 40 | "beautify", "bf", ONOFF, 0, 0, 0, |
| 41 | "directory", "dir", STRING, 0, 0, direct, |
| 42 | "edcompatible", "ed", ONOFF, 0, 0, 0, |
| 43 | "errorbells", "eb", ONOFF, 0, 0, 0, |
| 44 | "hardtabs", "ht", NUMERIC, 8, 8, 0, |
| 45 | "ignorecase", "ic", ONOFF, 0, 0, 0, |
| 46 | "lisp", 0, ONOFF, 0, 0, 0, |
| 47 | "list", 0, ONOFF, 0, 0, 0, |
| 48 | "magic", 0, ONOFF, 1, 1, 0, |
| 49 | "mesg", 0, ONOFF, 1, 1, 0, |
| 50 | "number", "nu", ONOFF, 0, 0, 0, |
| 51 | "open", 0, ONOFF, 1, 1, 0, |
| 52 | "optimize", "opt", ONOFF, 0, 0, 0, |
| 53 | "paragraphs", "para", STRING, 0, 0, paragraphs, |
| 54 | "prompt", 0, ONOFF, 1, 1, 0, |
| 55 | "readonly", "ro", ONOFF, 0, 0, 0, |
| 56 | "redraw", 0, ONOFF, 0, 0, 0, |
| 57 | "remap", 0, ONOFF, 1, 1, 0, |
| 58 | "report", 0, NUMERIC, 5, 5, 0, |
| 59 | "scroll", "scr", NUMERIC, 12, 12, 0, |
| 60 | "sections", "sect", STRING, 0, 0, sections, |
| 61 | "shell", "sh", STRING, 0, 0, shell, |
| 62 | "shiftwidth", "sw", NUMERIC, TABS, TABS, 0, |
| 63 | "showmatch", "sm", ONOFF, 0, 0, 0, |
| 64 | "slowopen", "slow", ONOFF, 0, 0, 0, |
| 65 | "tabstop", "ts", NUMERIC, TABS, TABS, 0, |
| 66 | "taglength", "tl", NUMERIC, 0, 0, 0, |
| 67 | "tags", "tag", STRING, 0, 0, tags, |
| 68 | "term", 0, OTERM, 0, 0, ttytype, |
| 69 | "terse", 0, ONOFF, 0, 0, 0, |
| 70 | "timeout", "to", ONOFF, 1, 1, 0, |
| 71 | "ttytype", "tty", OTERM, 0, 0, ttytype, |
| 72 | "warn", 0, ONOFF, 1, 1, 0, |
| 73 | "window", "wi", NUMERIC, 23, 23, 0, |
| 74 | "wrapscan", "ws", ONOFF, 1, 1, 0, |
| 75 | "wrapmargin", "wm", NUMERIC, 0, 0, 0, |
| 76 | "writeany", "wa", ONOFF, 0, 0, 0, |
| 77 | 0, 0, 0, 0, 0, 0, |
| 78 | }; |