/************************************************************************ * This program is Copyright (C) 1986 by Jonathan Payne. JOVE is * * provided to you without charge, and with no warranty. You may give * * away copies of JOVE, including sources, provided that this notice is * * included in all the files. * ************************************************************************/ #define PRIVATE /* make `private' variables visible. */ #include "jove.h" #include "maps.h" RCS("$Id: vars.c,v 14.30.0.9 1994/02/01 20:35:19 tom Exp tom $") /* * Now we redefine the macros to make a valid command table entry, and * include the variable list. */ #undef DEF_INT #undef DEF_STR #define DEF_INT(name,var,tp) {VARIABLE|V_SET(tp,0),name,&var}, #define DEF_STR(name,var,sz,tp) {VARIABLE|V_SET(tp,0),name,(int *)&var}, #undef MAX #define MAX(bound) V_SET(0,bound) const Variable variables[] = { # include "vars.inc" VARIABLE, 0, 0 }; data_obj * findvar(prompt) const char *prompt; { static struct FIND_CACHE(sizeof variables/sizeof variables[0]) cache ZERO; return find_builtin((data_obj *) variables, (struct find_cache *) &cache, prompt); } /*====================================================================== * $Log: vars.c,v $ * Revision 14.30.0.9 1994/02/01 20:35:19 tom * (MAX): #undef before definition. * * Revision 14.30 1993/01/27 06:00:55 tom * cleanup whitespace; use find_builtin() for joverc optimization. * * Revision 14.28 1992/09/23 22:53:19 tom * remove feeble attempt to sparsemap handling (this is now integrated with * regular keymap mechanism.) * * Revision 14.26 1992/08/27 02:16:11 tom * add RCS directives. * */