Added parsing of arguments to --read. The explicit format spec is currently
broken. git-svn-id: svn://svn.cc65.org/cc65/trunk@5576 b7a2c559-68d2-44c3-8de9-860c34a00d81
This commit is contained in:
@@ -85,6 +85,28 @@ int FindAttr (const Collection* C, const char* Name, unsigned* Index);
|
||||
* will contain the insert position.
|
||||
*/
|
||||
|
||||
const Attr* GetAttr (const Collection* C, const char* Name);
|
||||
/* Search for an attribute with the given name and return it. The function
|
||||
* returns NULL if the attribute wasn't found.
|
||||
*/
|
||||
|
||||
const Attr* NeedAttr (const Collection* C, const char* Name, const char* Context);
|
||||
/* 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.
|
||||
*/
|
||||
|
||||
const char* GetAttrVal (const Collection* C, const char* Name);
|
||||
/* Search for an attribute with the given name and return its value. The
|
||||
* function returns NULL if the attribute wasn't found.
|
||||
*/
|
||||
|
||||
const char* NeedAttrVal (const Collection* C, const char* Name, const char* Context);
|
||||
/* 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.
|
||||
*/
|
||||
|
||||
void AddAttr (Collection* C, const char* Name, const char* Value);
|
||||
/* Add an attribute to an alphabetically sorted attribute collection */
|
||||
|
||||
@@ -94,6 +116,13 @@ void SplitAddAttr (Collection* C, const char* Combined, const char* Name);
|
||||
* Name is NULL, terminate with an error.
|
||||
*/
|
||||
|
||||
Collection* ParseAttrList (const char* List, const char** NameList, unsigned NameCount);
|
||||
/* Parse a list containing name/value pairs into a sorted collection. Some
|
||||
* attributes may not need a name, so NameList contains these names. If there
|
||||
* were no errors, the function returns a alphabetically sorted collection
|
||||
* containing Attr entries.
|
||||
*/
|
||||
|
||||
|
||||
|
||||
/* End of attr.h */
|
||||
|
||||
Reference in New Issue
Block a user