diff options
author | Takuji Tanaka <ttk@t-lab.opal.ne.jp> | 2021-03-21 08:54:52 +0000 |
---|---|---|
committer | Takuji Tanaka <ttk@t-lab.opal.ne.jp> | 2021-03-21 08:54:52 +0000 |
commit | 14f747595ca6558b495c45aaf3bcdd54e0bf1800 (patch) | |
tree | ee0b3792fd89a27baa47ea224d88b251f098e2fc /Build/source/texk/mendexk/fread.c | |
parent | 1f5fe3a3717f4afa6c1c38e67804612d2e915161 (diff) |
mendexk: Fix a bug about page_precedence in style
git-svn-id: svn://tug.org/texlive/trunk@58575 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/texk/mendexk/fread.c')
-rw-r--r-- | Build/source/texk/mendexk/fread.c | 20 |
1 files changed, 15 insertions, 5 deletions
diff --git a/Build/source/texk/mendexk/fread.c b/Build/source/texk/mendexk/fread.c index 2a5deb2cd91..793bc4c593f 100644 --- a/Build/source/texk/mendexk/fread.c +++ b/Build/source/texk/mendexk/fread.c @@ -474,35 +474,45 @@ ATTRLOOP: switch(page_precedence[pattr[cc]]) { case 'r': if (strchr("ivxlcdm",p->page[i])==NULL) { - pattr[cc]++; + if (pattr[cc]<strlen(page_precedence)-1) + pattr[cc]++; + else pattr[cc]=0; for (j=cc+1;j<3;j++) pattr[j]=0; goto ATTRLOOP; } break; case 'R': if (strchr("IVXLCDM",p->page[i])==NULL) { - pattr[cc]++; + if (pattr[cc]<strlen(page_precedence)-1) + pattr[cc]++; + else pattr[cc]=0; for (j=cc+1;j<3;j++) pattr[j]=0; goto ATTRLOOP; } break; case 'n': if (p->page[i]<'0' || p->page[i]>'9') { - pattr[cc]++; + if (pattr[cc]<strlen(page_precedence)-1) + pattr[cc]++; + else pattr[cc]=0; for (j=cc+1;j<3;j++) pattr[j]=0; goto ATTRLOOP; } break; case 'a': if (p->page[i]<'a' || p->page[i]>'z') { - pattr[cc]++; + if (pattr[cc]<strlen(page_precedence)-1) + pattr[cc]++; + else pattr[cc]=0; for (j=cc+1;j<3;j++) pattr[j]=0; goto ATTRLOOP; } break; case 'A': if (p->page[i]<'A' || p->page[i]>'Z') { - pattr[cc]++; + if (pattr[cc]<strlen(page_precedence)-1) + pattr[cc]++; + else pattr[cc]=0; for (j=cc+1;j<3;j++) pattr[j]=0; goto ATTRLOOP; } |