Kaydet (Commit) 92b94aed authored tarafından Nick Treleaven's avatar Nick Treleaven

Fix parsing C macro argument list.

git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@1810 ea778897-0a13-0410-b9d1-a72fbfd435f5
üst 9268f74e
......@@ -3,6 +3,8 @@
* src/plugins.c:
Apply patch from Jeff Pohlmeyer to fix warning when unloading plugins
that use signals when quitting (thanks).
* tagmanager/get.c:
Fix parsing C macro argument list.
2007-08-16 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
......
......@@ -296,7 +296,7 @@ static boolean popConditional (void)
return isIgnore ();
}
static void makeDefineTag (const char *const name)
static void makeDefineTag (const char *const name, boolean parameterized)
{
const boolean isFileScope = (boolean) (! isHeaderFile ());
......@@ -304,23 +304,36 @@ static void makeDefineTag (const char *const name)
(! isFileScope || Option.include.fileScope))
{
tagEntryInfo e;
initTagEntry (&e, name);
e.lineNumberEntry = (boolean) (Option.locate != EX_PATTERN);
e.isFileScope = isFileScope;
e.truncateLine = TRUE;
e.kindName = "macro";
e.kind = 'd';
if (parameterized)
e.extensionFields.arglist = getArglistFromPos(getInputFilePosition()
, e.name);
makeTagEntry (&e);
if (parameterized)
free((char *) e.extensionFields.arglist);
}
}
static void directiveDefine (const int c)
{
boolean parameterized;
int nc;
if (isident1 (c))
{
readIdentifier (c, Cpp.directive.name);
nc = fileGetc ();
fileUngetc (nc);
parameterized = (boolean) (nc == '(');
if (! isIgnore ())
makeDefineTag (vStringValue (Cpp.directive.name));
makeDefineTag (vStringValue (Cpp.directive.name), parameterized);
}
Cpp.directive.state = DRCTV_NONE;
}
......@@ -340,7 +353,7 @@ static void directivePragma (int c)
if (isident1 (c))
{
readIdentifier (c, Cpp.directive.name);
makeDefineTag (vStringValue (Cpp.directive.name));
makeDefineTag (vStringValue (Cpp.directive.name), FALSE);
}
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment