Index: class.c ================================================================== --- class.c +++ class.c @@ -637,10 +637,11 @@ *tokenstr=0; macros[glohash[name].id-0xC000]=add_macro(); } } +#ifndef CONFIG_OMIT_INCLUDE static void begin_include_file(const char*name) { InputStack*nxt=inpstack; inpstack=malloc(sizeof(InputStack)); if(!inpstack) fatal("Allocation failed\n"); inpstack->classfp=classfp; @@ -656,10 +657,11 @@ } else { classfp=fopen(name,"r"); } if(!classfp) ParseError("Cannot open include file \"%s\": %m\n",name); } +#endif static void begin_macro(TokenList*mac) { MacroStack*ms=malloc(sizeof(MacroStack)); TokenList**ap=0; int a=0; @@ -1019,19 +1021,23 @@ nxttok(); if(!(tokent&TF_NAME) || tokenv!=OP_STRING) ParseError("String literal expected\n"); define_macro(look_hash_mac(),1); goto again; case MAC_INCLUDE: +#ifdef CONFIG_OMIT_INCLUDE + ParseError("The {include} macro has been omitted from this version\n"); +#else if(macstack) ParseError("Cannot use {include} inside of a macro\n"); nxttok1(); if(tokent==TF_MACRO && tokenv==1) ReturnToken(TF_EOF,0); if(!(tokent&TF_NAME) || tokenv!=OP_STRING) ParseError("String literal expected\n"); n=look_hash_mac(); nxttok1(); if(tokent!=TF_MACRO+TF_CLOSE) ParseError("Too many macro arguments\n"); begin_include_file(glohash[n].txt); goto again; +#endif case MAC_CALL: nxttok(); if(!(tokent&TF_NAME) || tokenv!=OP_STRING) ParseError("String literal expected\n"); tokenv=look_hash_mac(); goto call; Index: comconfig.doc ================================================================== --- comconfig.doc +++ comconfig.doc @@ -42,10 +42,13 @@ CONFIG_NO_STATUS If defined, then most status output is omitted unless -v is specified. (Some status output, such as most error messages, are still displayed.) +CONFIG_OMIT_INCLUDE + If defined, then the {include} macro is not implemented. + CONFIG_OMIT_SOUND If defined, omit all sound capabilities (including music). (Even if it is not defined, it can still be disabled at runtime.) CONFIG_USING_32BIT_TIMESTAMPS