Debian Codegraph @

vars.h

raw
1 /**************************************************************************
2 * This program is Copyright (C) 1986-2002 by Jonathan Payne. JOVE is *
3 * provided by Jonathan and Jovehacks without charge and without *
4 * warranty. You may copy, modify, and/or distribute JOVE, provided that *
5 * this notice is included in all the source files and documentation. *
6 **************************************************************************/
7
8 struct variable {
9 /* Type and Name must match data_obj */
10 int Type; /* in this case a variable */
11 const char *Name; /* name is always second */
12 void * v_value;
13 size_t v_size;
14 int v_flags; /* type and attributes */
15 };
16
17 #define V_TYPEMASK 017 /* mask for type part */
18
19 /* variable types (choose one)
20 * Note: V_INT through V_NAT are used as subscripts in vset_aux.
21 */
22
23 #define V_INT 001 /* integer */
24 #define V_WHOLEX 002 /* whole numbers, extended with -1 */
25 #define V_WHOLE 003 /* whole number */
26 #define V_NAT 004 /* natural number */
27 #define V_BOOL 005 /* is a boolean */
28 #define V_STRING 006 /* is a string */
29 #define V_CHAR 007 /* is a character */
30 #define V_FILENAME 010 /* a file name */
31
32 /* variable attributes (choose any set) */
33
34 #define V_FMODE 00020 /* number is a file mode: base 8 */
35 #define V_MODELINE 00040 /* update modeline */
36 #define V_CLRSCREEN 00100 /* clear and redraw screen */
37 #define V_TTY_RESET 00200 /* redo the tty modes */
38 #define V_LOCALE 00400 /* locale has changed -- do a setlocale */
39 #define V_UPDFREQ 01000 /* update-time-frequency -- reset alarm */
40 #define V_READONLY 02000 /* not user-modifiable, set by Jove */
41
42 extern const struct variable variables[];
43 extern const struct variable *varidx[IDXSZ];
44 extern const char *getvar(const char * /*name*/, char * /*vbuf*/, size_t /*vbufsize*/);