CVSROOT: /sources/m4 Module name: m4 Changes by: Eric Blake <ericb> 06/08/25 22:06:42
Index: modules/load.c =================================================================== RCS file: /sources/m4/m4/modules/load.c,v retrieving revision 1.17 retrieving revision 1.18 diff -u -b -r1.17 -r1.18 --- modules/load.c 9 Aug 2006 21:33:24 -0000 1.17 +++ modules/load.c 25 Aug 2006 22:06:42 -0000 1.18 @@ -32,15 +32,15 @@ /* Maintain each of the builtins implemented in this modules along with their details in a single table for easy maintenance. - function macros blind minargs maxargs */ + function macros blind side minargs maxargs */ #define builtin_functions \ - BUILTIN(modules, false, false, 1, 1 ) \ - BUILTIN(load, false, true, 2, 2 ) \ - BUILTIN(unload, false, true, 2, 2 ) \ + BUILTIN (modules, false, false, false, 0, 0 ) \ + BUILTIN (load, false, true, false, 1, 1 ) \ + BUILTIN (unload, false, true, false, 1, 1 ) \ /* Generate prototypes for each builtin handler function. */ -#define BUILTIN(handler, macros, blind, min, max) M4BUILTIN(handler) +#define BUILTIN(handler, macros, blind, side, min, max) M4BUILTIN(handler) builtin_functions #undef BUILTIN @@ -48,12 +48,16 @@ /* Generate a table for mapping m4 symbol names to handler functions. */ m4_builtin m4_builtin_table[] = { -#define BUILTIN(handler, macros, blind, min, max) \ - { STR(handler), CONC(builtin_, handler), macros, blind, min, max }, +#define BUILTIN(handler, macros, blind, side, min, max) \ + { CONC(builtin_, handler), STR(handler), \ + ((macros ? M4_BUILTIN_GROKS_MACRO : 0) \ + | (blind ? M4_BUILTIN_BLIND : 0) \ + | (side ? M4_BUILTIN_SIDE_EFFECT : 0)), \ + min, max }, builtin_functions #undef BUILTIN - { 0, 0, false, false, 0, 0 }, + { NULL, NULL, 0, 0, 0 }, }; @@ -62,7 +66,7 @@ { /* name text */ { "__modules__", "" }, - { 0, 0 }, + { NULL, NULL }, };