1 /************************************************************************ 2 * This program is Copyright (C) 1986-1996 by Jonathan Payne. JOVE is * 3 * provided to you without charge, and with no warranty. You may give * 4 * away copies of JOVE, including sources, provided that this notice is * 5 * included in all the files. * 6 ************************************************************************/ 7 8 struct variable { 9 /* Type and Name must match data_obj */ 10 int Type; /* in this case a variable */ 11 char *Name; /* name is always second */ 12 UnivPtr 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 41 extern const struct variable variables[]; 42