| 697 | } |
| 698 | |
| 699 | static void op_scan_groups(CBMHashTable *groups, CBMHashTable *seen, const char *file, |
| 700 | const char *text) { |
| 701 | char dir[CBM_SZ_1K]; |
| 702 | op_dirname(file, dir, sizeof(dir)); |
| 703 | for (const char *p = strstr(text, "+groupName="); p; p = strstr(p + SKIP_ONE, "+groupName=")) { |
| 704 | char g[CBM_SZ_256]; |
| 705 | op_token(p + OP_SLEN("+groupName="), g, sizeof(g)); |
| 706 | op_note_group(groups, seen, g, dir); |
| 707 | } |
| 708 | for (const char *p = strstr(text, "GroupName"); p; p = strstr(p + SKIP_ONE, "GroupName")) { |
| 709 | const char *q = p + OP_SLEN("GroupName"); |
| 710 | while (*q == ' ' || *q == '\t') { |
| 711 | q++; |
| 712 | } |
| 713 | if (*q != '=') { |
| 714 | continue; |
| 715 | } |
| 716 | q++; |
| 717 | while (*q == ' ' || *q == '\t') { |
| 718 | q++; |
| 719 | } |
| 720 | if (*q == '"') { |
| 721 | char g[CBM_SZ_256]; |
| 722 | op_token(q + SKIP_ONE, g, sizeof(g)); |
| 723 | op_note_group(groups, seen, g, dir); |
| 724 | } |
| 725 | } |
| 726 | } |
| 727 | |
| 728 | static void op_free_seen(const char *key, void *value, void *ud) { |
| 729 | (void)value; |
no test coverage detected