summaryrefslogtreecommitdiffstats
path: root/src/pre.l
diff options
context:
space:
mode:
authordimitri <dimitri@afe2bf4a-e733-0410-8a33-86f594647bc7>2005-09-16 18:34:41 (GMT)
committerdimitri <dimitri@afe2bf4a-e733-0410-8a33-86f594647bc7>2005-09-16 18:34:41 (GMT)
commit3b98221d43ba62088538ead3aa726f81dd9202f9 (patch)
tree11aba0942df62a4f1090d7ffd3f4cb98c0c3b6ed /src/pre.l
parent2620b73bf03f4ecafc9d751691dccb31cc94a4fe (diff)
downloadDoxygen-3b98221d43ba62088538ead3aa726f81dd9202f9.zip
Doxygen-3b98221d43ba62088538ead3aa726f81dd9202f9.tar.gz
Doxygen-3b98221d43ba62088538ead3aa726f81dd9202f9.tar.bz2
Release-1.4.4-20050817
Diffstat (limited to 'src/pre.l')
-rw-r--r--src/pre.l33
1 files changed, 22 insertions, 11 deletions
diff --git a/src/pre.l b/src/pre.l
index 117949f..3619a22 100644
--- a/src/pre.l
+++ b/src/pre.l
@@ -2242,13 +2242,17 @@ void preprocessFile(const char *fileName,BufStr &output)
if (i<(int)tmp.length()) definition+=tmp.mid(i,tmp.length()-i);
// add define definition to the dictionary of defines for this file
- Define *def = new Define;
- def->name = ds.left(i_obrace);
- def->definition = definition;
- def->nargs = count;
- def->isPredefined = TRUE;
- def->nonRecursive = nonRecursive;
- g_fileDefineDict->insert(def->name,def);
+ QCString dname = ds.left(i_obrace);
+ if (!dname.isEmpty())
+ {
+ Define *def = new Define;
+ def->name = dname;
+ def->definition = definition;
+ def->nargs = count;
+ def->isPredefined = TRUE;
+ def->nonRecursive = nonRecursive;
+ g_fileDefineDict->insert(def->name,def);
+ }
//printf("#define `%s' `%s' #nargs=%d\n",
// def->name.data(),def->definition.data(),def->nargs);
@@ -2270,10 +2274,17 @@ void preprocessFile(const char *fileName,BufStr &output)
def->name = ds.left(ine);
def->definition = ds.right(ds.length()-i_equals-1);
}
- def->nargs = -1;
- def->isPredefined = TRUE;
- def->nonRecursive = nonRecursive;
- g_fileDefineDict->insert(def->name,def);
+ if (!def->name.isEmpty())
+ {
+ def->nargs = -1;
+ def->isPredefined = TRUE;
+ def->nonRecursive = nonRecursive;
+ g_fileDefineDict->insert(def->name,def);
+ }
+ else
+ {
+ delete def;
+ }
//printf("#define `%s' `%s' #nargs=%d\n",
// def->name.data(),def->definition.data(),def->nargs);