|
|
1.1 root 1: /*************************************************************************
2: * This program is copyright (C) 1985, 1986 by Jonathan Payne. It is *
3: * provided to you without charge for use only on a licensed Unix *
4: * system. You may copy JOVE provided that this notice is included with *
5: * the copy. You may not sell copies of this program or versions *
6: * modified for use on microcomputer systems, unless the copies are *
7: * included with a Unix system distribution and the source is provided. *
8: *************************************************************************/
9:
10: #include "jove.h"
11:
12: struct variable variables[] = {
13: VARIABLE, "allow-^S-and-^Q", &OKXonXoff, V_BOOL|V_TTY_RESET,
14: VARIABLE, "allow-bad-filenames", &OkayBadChars, V_BOOL,
15: #ifdef ABBREV
16: VARIABLE, "auto-case-abbrev", &AutoCaseAbbrev, V_BOOL,
17: #endif
18: #ifdef F_COMPLETION
19: VARIABLE, "bad-filename-extensions", (int *) BadExtensions, V_STRING,
20: #endif
21: VARIABLE, "c-indentation-increment", &CIndIncrmt, V_BASE10,
22: VARIABLE, "case-ignore-search", &CaseIgnore, V_BOOL,
23: #ifdef CMT_FMT
24: VARIABLE, "comment-format", (int *) CmtFmt, V_STRING,
25: #endif
26: #ifdef BIFF
27: VARIABLE, "disable-biff", &BiffChk, V_BOOL,
28: #endif
29: VARIABLE, "error-window-size", &EWSize, V_BASE10,
30: VARIABLE, "file-creation-mode", &CreatMode, V_BASE8,
31: VARIABLE, "files-should-end-with-newline", &EndWNewline, V_BOOL,
32: VARIABLE, "internal-tabstop", &tabstop, V_BASE10|V_CLRSCREEN,
33: VARIABLE, "left-margin", &LMargin, V_BASE10,
34: VARIABLE, "mailbox", (int *) Mailbox, V_STRING,
35: VARIABLE, "mail-check-frequency", (int *) &MailInt, V_BASE10,
36: #ifdef BACKUPFILES
37: VARIABLE, "make-backup-files", &BkupOnWrite, V_BOOL,
38: #endif
39: VARIABLE, "mark-threshold", &MarkThresh, V_BASE10,
40: VARIABLE, "marks-should-float", &MarksShouldFloat, V_BOOL,
41: VARIABLE, "match-regular-expressions", &UseRE, V_BOOL,
42: VARIABLE, "meta-key", &MetaKey, V_BOOL|V_TTY_RESET,
43: VARIABLE, "mode-line", (int *) ModeFmt, V_STRING|V_MODELINE,
44: VARIABLE, "mode-line-should-standout", &BriteMode, V_BOOL|V_MODELINE,
45: VARIABLE, "paren-flash-delay", &PDelay, V_BASE10,
46: VARIABLE, "physical-tabstop", &phystab, V_BASE10|V_CLRSCREEN,
47: #ifdef IPROCS
48: VARIABLE, "process-prompt", (int *) proc_prompt, V_STRING,
49: #endif
50: VARIABLE, "right-margin", &RMargin, V_BASE10,
51: VARIABLE, "scroll-step", &ScrollStep, V_BASE10,
52: VARIABLE, "search-exit-char", &SExitChar, V_CHAR,
53: VARIABLE, "send-typeout-to-buffer", &UseBuffers, V_BOOL,
54: VARIABLE, "shell", (int *) Shell, V_STRING,
55: VARIABLE, "shell-flags", (int *) ShFlags, V_STRING,
56: VARIABLE, "sync-frequency", &SyncFreq, V_BASE10,
57: VARIABLE, "tag-file", (int *) TagFile, V_STRING,
58: VARIABLE, "update-time-frequency", &UpdFreq, V_BASE10,
59: #ifdef ID_CHAR
60: VARIABLE, "use-i/d-char", &UseIC, V_BOOL,
61: #endif
62: VARIABLE, "visible-bell", &VisBell, V_BOOL,
63: VARIABLE, "wrap-search", &WrapScan, V_BOOL,
64: VARIABLE, "write-files-on-make", &WtOnMk, V_BOOL,
65: VARIABLE, 0, 0, 0
66: };
67:
68: data_obj *
69: findvar(prompt)
70: char *prompt;
71: {
72: static char *strings[(sizeof variables) / sizeof (struct variable)];
73: static int beenhere = 0;
74: register int com;
75:
76: if (beenhere == 0) {
77: register char **strs = strings;
78: register struct variable *v = variables;
79:
80: beenhere = 1;
81: for (; v->Name; v++)
82: *strs++ = v->Name;
83: *strs = 0;
84: }
85:
86: if ((com = complete(strings, prompt)) < 0)
87: return 0;
88: return (data_obj *) &variables[com];
89: }
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.