diff options
author | dimitri <dimitri@afe2bf4a-e733-0410-8a33-86f594647bc7> | 2005-09-16 18:34:41 (GMT) |
---|---|---|
committer | dimitri <dimitri@afe2bf4a-e733-0410-8a33-86f594647bc7> | 2005-09-16 18:34:41 (GMT) |
commit | 3b98221d43ba62088538ead3aa726f81dd9202f9 (patch) | |
tree | 11aba0942df62a4f1090d7ffd3f4cb98c0c3b6ed /src/pre.l | |
parent | 2620b73bf03f4ecafc9d751691dccb31cc94a4fe (diff) | |
download | Doxygen-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.l | 33 |
1 files changed, 22 insertions, 11 deletions
@@ -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); |