-void AddNumericMacro (const char* Name, long Val)
-/* Add a macro for a numeric constant */
+void DefineNumericMacro (const char* Name, long Val)
+/* Define a macro for a numeric constant */
{
char Buf[64];
sprintf (Buf, "%ld", Val);
/* Handle as text macro */
- AddTextMacro (Name, Buf);
+ DefineTextMacro (Name, Buf);
}
-void AddTextMacro (const char* Name, const char* Val)
-/* Add a macro for a textual constant */
+void DefineTextMacro (const char* Name, const char* Val)
+/* Define a macro for a textual constant */
{
/* Create a new macro */
Macro* M = NewMacro (Name);
int IsMacro (const char* Name)
/* Return true if the given name is the name of a macro, return false otherwise */
{
- return FindMacro(Name) != 0;
-}
+ return MaybeMacro(Name[0]) && FindMacro(Name) != 0;
+}