- if (strncmp(s->section.txt, "Example:", 8) == 0)
- continue;
- if (strncmp(s->section.txt, "File:", 5) != 0) {
- fprintf(stderr, "Unreferenced section is not a file name: %.*s\n",
+ char *spc = strnchr(s->section.txt, s->section.len, ' ');
+
+ if (spc > s->section.txt && spc[-1] == ':') {
+ if (strncmp(s->section.txt, "File: ", 6) != 0 &&
+ (section.txt == NULL ||
+ text_cmp(s->section, section) != 0))
+ /* Ignore this section */
+ continue;
+ } else {
+ fprintf(stderr, "Code in unreferenced section that is not ignored or a file name: %.*s\n",