]> git.sur5r.net Git - cc65/blobdiff - src/sp65/attr.h
Removed unneeded include files.
[cc65] / src / sp65 / attr.h
index b1a6b92bebd418f5de36e2375a097c071ebeddb8..9a4f834fb161bd6e7c2518d560faf32ab034a19a 100644 (file)
 
 
 
-/* Attribute flags */
-enum AttrFlags {
-    afNone,
-    afInt,                              /* Integer number */
-};
-typedef enum AttrFlags AttrFlags;
-
-/* */
+/* Attribute structure */
 typedef struct Attr Attr;
 struct Attr {
-    AttrFlags   Flags;                  /* Attribute flags */
-    char*       Name;                   /* Attribute name */
-    char        Value[1];               /* Attribute value */
+    char*       Name;           /* Attribute name - points into Value */
+    char        Value[1];       /* Attribute value followed by Name */
 };
 
 
@@ -75,6 +67,9 @@ struct Attr {
 Attr* NewAttr (const char* Name, const char* Value);
 /* Create a new attribute */
 
+void FreeAttr (Attr* A);
+/* Free an attribute structure */
+
 void DumpAttrColl (const Collection* C);
 /* Dump a collection of attribute/value pairs for debugging */
 
@@ -90,10 +85,10 @@ const Attr* GetAttr (const Collection* C, const char* Name);
  * returns NULL if the attribute wasn't found.
  */
 
-const Attr* NeedAttr (const Collection* C, const char* Name, const char* Context);
+const Attr* NeedAttr (const Collection* C, const char* Name, const char* Op);
 /* Search for an attribute with the given name and return it. If the attribute
- * is not found, the function terminates with an error using Context as
- * additional context in the error message.
+ * is not found, the function terminates with an error using Op as additional
+ * context in the error message.
  */
 
 const char* GetAttrVal (const Collection* C, const char* Name);
@@ -101,10 +96,10 @@ const char* GetAttrVal (const Collection* C, const char* Name);
  * function returns NULL if the attribute wasn't found.
  */
 
-const char* NeedAttrVal (const Collection* C, const char* Name, const char* Context);
+const char* NeedAttrVal (const Collection* C, const char* Name, const char* Op);
 /* Search for an attribute with the given name and return its value. If the
  * attribute wasn't not found, the function terminates with an error using
- * Context as additional context in the error message.
+ * Op as additional context in the error message.
  */
 
 void AddAttr (Collection* C, const char* Name, const char* Value);
@@ -123,6 +118,9 @@ Collection* ParseAttrList (const char* List, const char** NameList, unsigned Nam
  * containing Attr entries.
  */
 
+void FreeAttrList (Collection* C);
+/* Free a list of attributes */
+
 
 
 /* End of attr.h */