summaryrefslogtreecommitdiffstats
path: root/src/config.l
diff options
context:
space:
mode:
Diffstat (limited to 'src/config.l')
-rw-r--r--src/config.l43
1 files changed, 42 insertions, 1 deletions
diff --git a/src/config.l b/src/config.l
index 75a4223..1965934 100644
--- a/src/config.l
+++ b/src/config.l
@@ -1,4 +1,4 @@
-/* This file was generated by configgen on Sun Aug 13 14:05:26 2000
+/* This file was generated by configgen on Fri Aug 25 21:22:11 2000
* from config_templ.l
*
* DO NOT EDIT!
@@ -105,6 +105,7 @@ int Config::tabSize = 8;
QStrList Config::sectionFilterList;
bool Config::generateTodoList = TRUE;
bool Config::generateTestList = TRUE;
+QStrList Config::aliasList;
bool Config::quietFlag = FALSE;
bool Config::warningFlag = TRUE;
bool Config::warningUndocFlag = TRUE;
@@ -361,6 +362,8 @@ static void readIncludeFile(const char *incName)
<Start>"ENABLED_SECTIONS"[ \t]*"+=" { BEGIN(GetStrList); l=&Config::sectionFilterList; elemStr=""; }
<Start>"GENERATE_TODOLIST"[ \t]*"=" { BEGIN(GetBool); b=&Config::generateTodoList; }
<Start>"GENERATE_TESTLIST"[ \t]*"=" { BEGIN(GetBool); b=&Config::generateTestList; }
+<Start>"ALIASES"[ \t]*"=" { BEGIN(GetStrList); l=&Config::aliasList; l->clear(); elemStr=""; }
+<Start>"ALIASES"[ \t]*"+=" { BEGIN(GetStrList); l=&Config::aliasList; elemStr=""; }
<Start>"QUIET"[ \t]*"=" { BEGIN(GetBool); b=&Config::quietFlag; }
<Start>"WARNINGS"[ \t]*"=" { BEGIN(GetBool); b=&Config::warningFlag; }
<Start>"WARN_IF_UNDOCUMENTED"[ \t]*"=" { BEGIN(GetBool); b=&Config::warningUndocFlag; }
@@ -595,6 +598,14 @@ void dumpConfig()
}
printf("generateTodoList=`%d'\n",Config::generateTodoList);
printf("generateTestList=`%d'\n",Config::generateTestList);
+ {
+ char *is=Config::aliasList.first();
+ while (is)
+ {
+ printf("aliasList=`%s'\n",is);
+ is=Config::aliasList.next();
+ }
+ }
printf("# configuration options related to warning and progress messages\n");
printf("quietFlag=`%d'\n",Config::quietFlag);
printf("warningFlag=`%d'\n",Config::warningFlag);
@@ -817,6 +828,7 @@ void Config::init()
Config::sectionFilterList.clear();
Config::generateTodoList = TRUE;
Config::generateTestList = TRUE;
+ Config::aliasList.clear();
Config::quietFlag = FALSE;
Config::warningFlag = TRUE;
Config::warningUndocFlag = TRUE;
@@ -1310,6 +1322,20 @@ void writeTemplateConfig(QFile *f,bool sl)
if (!sl)
{
t << "\n";
+ t << "# This tag can be used to specify a number of aliases that acts \n";
+ t << "# as commands in the documentation. An alias has the form \"\\name=value\". \n";
+ t << "# For example adding \"sideeffect=\\par Side Effects:\\n\" will allow you to \n";
+ t << "# put the command \\sideeffect (or @sideeffect) in the documentation, which \n";
+ t << "# will result in a user defined paragraph with heading \"Side Effects:\". \n";
+ t << "# Predefined commands cannot be overwritten using aliases. \n";
+ t << "\n";
+ }
+ t << "ALIASES = ";
+ writeStringList(t,Config::aliasList);
+ t << "\n";
+ if (!sl)
+ {
+ t << "\n";
}
t << "#---------------------------------------------------------------------------\n";
t << "# configuration options related to warning and progress messages\n";
@@ -2374,6 +2400,7 @@ void substituteEnvironmentVars()
substEnvVarsInString( Config::outputLanguage );
substEnvVarsInStrList( Config::stripFromPath );
substEnvVarsInStrList( Config::sectionFilterList );
+ substEnvVarsInStrList( Config::aliasList );
substEnvVarsInString( Config::warnFormat );
substEnvVarsInStrList( Config::inputSources );
substEnvVarsInStrList( Config::filePatternList );
@@ -2635,6 +2662,20 @@ void checkConfig()
#endif
s=Config::includePath.next();
}
+
+ // check aliases
+ s=Config::aliasList.first();
+ while (s)
+ {
+ QRegExp re("[a-z_A-Z][a-z_A-Z0-9]*[ \t]*=");
+ QCString alias=s;
+ alias=alias.stripWhiteSpace();
+ if (alias.find(re)!=0)
+ {
+ err("Illegal alias format `%s'. Use \"name=value\"\n",alias.data());
+ }
+ s=Config::aliasList.next();
+ }
// check dot path
if (!Config::dotPath.isEmpty())