diff options
author | Norbert Preining <norbert@preining.info> | 2021-09-20 03:02:23 +0000 |
---|---|---|
committer | Norbert Preining <norbert@preining.info> | 2021-09-20 03:02:23 +0000 |
commit | c9fcf97bc045a9d020980c33b6c7c1ee5aedef99 (patch) | |
tree | bf74a43623e081cad4b72a752730aeff86b7c5cf /indexing/makeindexk/scanid.c | |
parent | 996c9b239bde82dc3ef3e5b69cd525e87fdb61a8 (diff) |
CTAN sync 202109200302
Diffstat (limited to 'indexing/makeindexk/scanid.c')
-rw-r--r-- | indexing/makeindexk/scanid.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/indexing/makeindexk/scanid.c b/indexing/makeindexk/scanid.c index 8076a6be47..aea5272d47 100644 --- a/indexing/makeindexk/scanid.c +++ b/indexing/makeindexk/scanid.c @@ -424,26 +424,28 @@ scan_no(char no[], int npg[], short *count, short *type) if (!scan_arabic(no, npg, count)) return (FALSE); /* simple heuristic to determine if a letter is Roman or Alpha */ - } else if (IS_ROMAN_LOWER(no[0]) && (!IS_COMPOSITOR)) { + } else if (IS_ROMAN_LOWER(no[0]) && strchr(page_prec,ROMAN_LOWER) && + (!strchr(page_prec,ALPHA_LOWER) || (!IS_COMPOSITOR))) { *type = ROML; if (!scan_roman_lower(no, npg, count)) return (FALSE); /* simple heuristic to determine if a letter is Roman or Alpha */ - } else if (IS_ROMAN_UPPER(no[0]) && - ((no[0] == ROMAN_I) || (!IS_COMPOSITOR))) { + } else if (IS_ROMAN_UPPER(no[0]) && strchr(page_prec,ROMAN_UPPER) && + (!strchr(page_prec,ALPHA_UPPER) || (!IS_COMPOSITOR))) { *type = ROMU; if (!scan_roman_upper(no, npg, count)) return (FALSE); - } else if (IS_ALPHA_LOWER(no[0])) { + } else if (IS_ALPHA_LOWER(no[0]) && strchr(page_prec,ALPHA_LOWER)) { *type = ALPL; if (!scan_alpha_lower(no, npg, count)) return (FALSE); - } else if (IS_ALPHA_UPPER(no[0])) { + } else if (IS_ALPHA_UPPER(no[0]) && strchr(page_prec,ALPHA_UPPER)) { *type = ALPU; if (!scan_alpha_upper(no, npg, count)) return (FALSE); } else { - IDX_ERROR1("Illegal page number %s.\n", no); + IDX_ERROR2("Illegal page number %s or page_precedence %s.\n", + no, page_prec); return (FALSE); } return (TRUE); |