]> git.sur5r.net Git - cc65/blobdiff - src/ca65/macro.h
Finished implemenation of commands to delete macros. Added the new commands to
[cc65] / src / ca65 / macro.h
index 045204a6e4feebe9581bb9dfea199ecd1f3aa93d..61ec567610baca996a4501fa3518932c5bd47508 100644 (file)
@@ -6,10 +6,10 @@
 /*                                                                           */
 /*                                                                           */
 /*                                                                           */
-/* (C) 1998-2008 Ullrich von Bassewitz                                       */
-/*               Roemerstrasse 52                                            */
-/*               D-70794 Filderstadt                                         */
-/* EMail:        uz@cc65.org                                                 */
+/* (C) 1998-2011, Ullrich von Bassewitz                                      */
+/*                Roemerstrasse 52                                           */
+/*                D-70794 Filderstadt                                        */
+/* EMail:         uz@cc65.org                                                */
 /*                                                                           */
 /*                                                                           */
 /* This software is provided 'as-is', without any expressed or implied       */
 
 
 /*****************************************************************************/
-/*                                  Data                                    */
+/*                                 Forwards                                  */
+/*****************************************************************************/
+
+
+
+struct StrBuf;
+
+
+
+/*****************************************************************************/
+/*                                  Data                                    */
 /*****************************************************************************/
 
 
 
 /* Macro styles */
-#define MAC_STYLE_CLASSIC      0
-#define MAC_STYLE_DEFINE       1
+#define MAC_STYLE_CLASSIC      0
+#define MAC_STYLE_DEFINE       1
 
 
 
 /*****************************************************************************/
-/*                                          Code                                    */
+/*                                          Code                                    */
 /*****************************************************************************/
 
 
 void MacDef (unsigned Style);
 /* Parse a macro definition */
 
+void MacUndef (const StrBuf* Name, unsigned char Style);
+/* Undefine the macro with the given name and style. A style mismatch is
+ * treated as if the macro didn't exist.
+ */
+
 void MacExpandStart (void);
 /* Start expanding the macro in SVal */
 
@@ -74,6 +89,14 @@ int IsDefine (const StrBuf* Name);
 int InMacExpansion (void);
 /* Return true if we're currently expanding a macro */
 
+void DisableDefineStyleMacros (void);
+/* Disable define style macros until EnableDefineStyleMacros is called */
+
+void EnableDefineStyleMacros (void);
+/* Re-enable define style macros previously disabled with
+ * DisableDefineStyleMacros.
+ */
+
 
 
 /* End of macro.h */