/* * processEmbeddedOptions * * This routine processes the text contained within "/\*==--" * and "=\*\/" as a single option. If that option is the SUBBLOCK * option, it will need to be massaged for use. */ LOCAL void processEmbeddedOptions(char* pzText) { tSCC zStStr[] = "/*=--"; tSCC zEndSt[] = "=*/"; for (;;) { char* pzStart = strstr(pzText, zStStr); char* pzEnd; int sblct = 0; if (pzStart == NULL) return; if (HAVE_OPT(SUBBLOCK)) sblct = STACKCT_OPT(SUBBLOCK); pzEnd = strstr(pzStart, zEndSt); if (pzEnd == NULL) return; pzStart = compressOptionText(pzStart + sizeof(zStStr)-1, pzEnd); optionLoadLine(&getdefsOptions, pzStart); if (HAVE_OPT(SUBBLOCK) && (sblct != STACKCT_OPT(SUBBLOCK))) { tCC** ppz = STACKLST_OPT(SUBBLOCK); ppz[ sblct ] = fixupSubblockString(ppz[sblct]); } pzText = pzEnd + sizeof(zEndSt); } }
/** * This directive will pass the option name and associated text to the * AutoOpts optionLoadLine routine (@pxref{libopts-optionLoadLine}). The * option text may span multiple lines by continuing them with a backslash. * The backslash/newline pair will be replaced with two space characters. * This directive may be used to set a search path for locating template files * For example, this: * * @example * #option templ-dirs $ENVVAR/dirname * @end example * @noindent * will direct autogen to use the @code{ENVVAR} environment variable to find * a directory named @code{dirname} that (may) contain templates. Since these * directories are searched in most recently supplied first order, search * directories supplied in this way will be searched before any supplied on * the command line. */ char * doDir_option(directive_enum_t id, char const * dir, char * scan_next) { dir = SPN_WHITESPACE_CHARS(dir); optionLoadLine(&autogenOptions, dir); (void)id; return scan_next; }
/*=gfunc set_option * * what: Set a command line option * * exparg: opt, AutoGen option name + its argument * * doc: The text argument must be an option name followed by any needed * option argument. Returns SCM_UNDEFINED. =*/ SCM ag_scm_set_option(SCM opt) { optionLoadLine(&autogenOptions, ag_scm2zchars(opt, "opt + arg")); return SCM_UNDEFINED; }
/*=directive option * * arg: opt-name [ <text> ] * * text: * * This directive will pass the option name and associated text to the * AutoOpts optionLoadLine routine (@pxref{libopts-optionLoadLine}). The * option text may span multiple lines by continuing them with a backslash. * The backslash/newline pair will be replaced with two space characters. * This directive may be used to set a search path for locating template files * For example, this: * * @example * #option templ-dirs $ENVVAR/dirname * @end example * @noindent * will direct autogen to use the @code{ENVVAR} environment variable to find * a directory named @code{dirname} that (may) contain templates. Since these * directories are searched in most recently supplied first order, search * directories supplied in this way will be searched before any supplied on * the command line. =*/ static char* doDir_option(char* pzArg, char* pzScan) { optionLoadLine(&autogenOptions, pzArg); return pzScan; }