git-svn-id: svn://svn.cc65.org/cc65/trunk@2110 b7a2c559-68d2-44c3-8de9-860c34a00d81
This commit is contained in:
cuz
2003-05-01 22:38:47 +00:00
parent 2a5fbd00ef
commit 8fb90af8ff
20 changed files with 653 additions and 187 deletions

View File

@@ -40,6 +40,7 @@
#include "xmalloc.h"
/* sim65 */
#include "error.h"
#include "scanner.h"
#include "cfgdata.h"
@@ -87,6 +88,19 @@ void FreeCfgData (CfgData* D)
void CfgDataCheckType (const CfgData* D, unsigned Type)
/* Check the config data type and print an error message if it has the wrong
* type.
*/
{
if (D->Type != Type) {
Error ("%s(%u): Attribute `%s' has invalid type",
CfgGetName (), D->Line, D->Attr);
}
}
int CfgDataFind (const Collection* Attributes, const char* AttrName)
/* Find the attribute with the given name and return its index. Return -1 if
* the attribute was not found.
@@ -108,7 +122,7 @@ int CfgDataFind (const Collection* Attributes, const char* AttrName)
}
/* Not found */
return -1;
return -1;
}