Commit a00bc1c9 authored by filatov's avatar filatov
Browse files

Support for region id macroses

parent aab2123b
......@@ -1466,7 +1466,18 @@ static int region_id_tag (cxml_handler_t* const _h, cxml_tag_t * const tag)
fprintf(stderr, "ERROR: Region identifier must be set\n");
return -1;
}
while(cisspace(*v))v++;
while (cisspace(*v))v++;
if (!cisdigit(*v)){
// look in the macro map
const char * v1 = macro_lookup(v);
if (!v1){
fprintf(stderr, "%s: Invalid region identifier\n", v);
return -1;
}
while (cisspace(*v1))v1++;
v = v1;
}
uvalue = strtoul(v, NULL, 0);
if(uvalue > 0xFFFF){
fprintf(stderr, "%s: Invalid region identifier\n", v);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment