]> 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 defcd9ad8e6af3cee2ff488c7c135b971d854775..61ec567610baca996a4501fa3518932c5bd47508 100644 (file)
@@ -6,10 +6,10 @@
 /*                                                                           */
 /*                                                                           */
 /*                                                                           */
-/* (C) 1998-2000 Ullrich von Bassewitz                                       */
-/*               Wacholderweg 14                                             */
-/*               D-70597 Stuttgart                                           */
-/* EMail:        uz@musoftware.de                                            */
+/* (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 */
 
-int MacExpand (void);
-/* If we're currently expanding a macro, set the the scanner token and
- * attribute to the next value and return true. If we are not expanding
- * a macro, return false.
- */
-
 void MacAbort (void);
 /* Abort the current macro expansion */
 
-int IsMacro (const char* Name);
+int IsMacro (const StrBuf* Name);
 /* Return true if the given name is the name of a macro */
 
-int IsDefine (const char* Name);
+int IsDefine (const StrBuf* Name);
 /* Return true if the given name is the name of a define style macro */
 
-int InMacExpansion (void); 
+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 */