Check if any definition with the given label has the given name. */
| 14 | |
| 15 | /* Check if any definition with the given label has the given name. */ |
| 16 | static int has_def(CBMFileResult *r, const char *label, const char *name) { |
| 17 | for (int i = 0; i < r->defs.count; i++) { |
| 18 | if (strcmp(r->defs.items[i].label, label) == 0 && strcmp(r->defs.items[i].name, name) == 0) |
| 19 | return 1; |
| 20 | } |
| 21 | return 0; |
| 22 | } |
| 23 | |
| 24 | /* Check if any definition has the given name (any label). */ |
| 25 | static int has_def_any(CBMFileResult *r, const char *name) { |