From 524625c68b34cf1727e5cd9d9493ff1b0523966c Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Tue, 11 Jan 2022 21:59:48 +0000 Subject: bibarts (11jan22) git-svn-id: svn://tug.org/texlive/trunk@61569 c570f23f-e606-0410-a88d-b1316a301751 --- Master/texmf-dist/source/latex/bibarts/bibsort.c | 120 +++++++++++++++++++---- 1 file changed, 102 insertions(+), 18 deletions(-) (limited to 'Master/texmf-dist/source/latex/bibarts') diff --git a/Master/texmf-dist/source/latex/bibarts/bibsort.c b/Master/texmf-dist/source/latex/bibarts/bibsort.c index 0841620e757..cc094f10bf3 100644 --- a/Master/texmf-dist/source/latex/bibarts/bibsort.c +++ b/Master/texmf-dist/source/latex/bibarts/bibsort.c @@ -1,5 +1,5 @@ -/* BibArts 2.3 assists you to write LaTeX texts in arts and humanities. */ -/* Copyright (C) 2021 Timo Baumann bibarts[at]gmx.de (2021/12/06) */ +/* BibArts 2.4 assists you to write LaTeX texts in arts and humanities. */ +/* Copyright (C) 2022 Timo Baumann bibarts[at]gmx.de (2022/01/10) */ /* This program is free software; you can redistribute it and/or modify */ /* it under the terms of the GNU General Public License as published by */ @@ -46,7 +46,7 @@ The C-compiled binary of this file is reading LaTeX .aux files. It can NOT read the .bar files, which BibArts 1.x did use. - BibArts 2.3 ONLY has an EMULATION for 1.3 texts: Keep copies of 1.x? + BibArts 2.4 ONLY has an EMULATION for 1.3 texts: Keep copies of 1.x? */ @@ -4164,8 +4164,8 @@ static char *thtwentyfive_oheightyfour[] = { "", /* 225 184 155 e with tilde below (not v1.2l) */ "", /* 225 184 156 [\\u{\\c{E}}] (not v1.2l) */ "", /* 225 184 157 [\\u{\\c{e}}] (not v1.2l) */ - "", /* 225 184 158 \\.F (not v1.2l) */ - "", /* 225 184 159 \\.f (not v1.2l) */ + "\\.F", /* 225 184 158 new in 2.4 */ + "\\.f", /* 225 184 159 new in 2.4 */ "\\=G", /* 225 184 160 */ "\\=g", /* 225 184 161 */ "", /* 225 184 162 \\.H (not v1.2l) */ @@ -4182,8 +4182,8 @@ static char *thtwentyfive_oheightyfour[] = { "", /* 225 184 173 i with tilde below (not v1.2l) */ "", /* 225 184 174 \\\'{\\\"I} (not v1.2l) */ "", /* 225 184 175 \\\'{\\\"{\\i}} (not v1.2l) */ - "", /* 225 184 176 \\\'K (not v1.2l) */ - "", /* 225 184 177 \\\'k (not v1.2l) */ + "\\\'K", /* 225 184 176 new in 2.4 */ + "\\\'k", /* 225 184 177 new in 2.4 */ "", /* 225 184 178 \\d{K} (not v1.2l) */ "", /* 225 184 179 \\d{k} (not v1.2l) */ "", /* 225 184 180 \\b{K} (not v1.2l) */ @@ -4288,6 +4288,83 @@ char *get_thtwentyfive_oheightyfive(unsigned char c) } +static char *thtwentyfive_oheightysix[] = { + "", /* 225 186 128 \\`W (not v1.2l) */ + "", /* 225 186 129 \\`w (not v1.2l) */ + "", /* 225 186 130 \\\'W (not v1.2l) */ + "", /* 225 186 131 \\\'w (not v1.2l) */ + "", /* 225 186 132 \\\"W (not v1.2l) */ + "", /* 225 186 133 \\\"w (not v1.2l) */ + "", /* 225 186 134 \\.W (not v1.2l) */ + "", /* 225 186 135 \\.w (not v1.2l) */ + "", /* 225 186 136 \\d{W} (not v1.2l) */ + "", /* 225 186 137 \\d{w} (not v1.2l) */ + "", /* 225 186 138 \\.X (not v1.2l) */ + "", /* 225 186 139 \\.x (not v1.2l) */ + "", /* 225 186 140 \\\"X (not v1.2l) */ + "", /* 225 186 141 \\\"x (not v1.2l) */ + "\\.Y", /* 225 186 142 new in 2.4 */ + "\\.y", /* 225 186 143 new in 2.4 */ + "\\^Z", /* 225 186 144 new in 2.4 */ + "\\^z", /* 225 186 145 new in 2.4 */ + "", /* 225 186 146 \\d{Z} (not v1.2l) */ + "", /* 225 186 147 \\d{z} (not v1.2l) */ + "", /* 225 186 148 Z with line below (not v1.2l) */ + "", /* 225 186 149 z with line below (not v1.2l) */ + "", /* 225 186 150 h with line below (not v1.2l) */ + "", /* 225 186 151 \\\"t (not v1.2l) */ + "", /* 225 186 152 \\r{w} */ + "", /* 225 186 153 \\r{y} */ + "", /* 225 186 154 a with right half ring (not v1.2l) */ + "", /* 225 186 155 long s with dot above (not v1.2l) */ + "", /* 225 186 156 long s with diagonal stroke (not v1.2l) */ + "", /* 225 186 157 long s with high stroke (not v1.2l) */ + "{\\SS}", /* 225 186 158 */ + "", /* 225 186 159 \\delta (not v1.2l) */ + "", /* 225 186 160 \\d{A} (not v1.2l) */ + "", /* 225 186 161 \\d{a} (not v1.2l) */ + "", /* 225 186 162 A with hook above (not v1.2l) */ + "", /* 225 186 163 a with hook above (not v1.2l) */ + "", /* 225 186 164 A with circumflex-acute (not v1.2l) */ + "", /* 225 186 165 a with circumflex-acute (not v1.2l) */ + "", /* 225 186 166 A with circumflex-grave (not v1.2l) */ + "", /* 225 186 167 a with circumflex-grave (not v1.2l) */ + "", /* 225 186 168 A with circumflex-hook (not v1.2l) */ + "", /* 225 186 169 a with circumflex-hook (not v1.2l) */ + "", /* 225 186 170 \\~{\\^A} (not v1.2l) */ + "", /* 225 186 171 \\~{\\^a} (not v1.2l) */ + "", /* 225 186 172 \\d{\\^A} (not v1.2l) */ + "", /* 225 186 173 \\d{\\^a} (not v1.2l) */ + "", /* 225 186 174 A with breve-acute (not v1.2l) */ + "", /* 225 186 175 a with breve-acute (not v1.2l) */ + "", /* 225 186 176 A with breve-grave (not v1.2l) */ + "", /* 225 186 177 a with breve-grave (not v1.2l) */ + "", /* 225 186 178 A with breve-hook (not v1.2l) */ + "", /* 225 186 179 a with breve-hook (not v1.2l) */ + "", /* 225 186 180 A with breve-tilde (not v1.2l) */ + "", /* 225 186 181 a with breve-tilde (not v1.2l) */ + "", /* 225 186 182 \\d{\\u{A}} (not v1.2l) */ + "", /* 225 186 183 \\d{\\u{a}} (not v1.2l) */ + "", /* 225 186 184 \\d{E} (not v1.2l) */ + "", /* 225 186 185 \\d{e} (not v1.2l) */ + "", /* 225 186 186 E with hook above (not v1.2l) */ + "", /* 225 186 187 e with hook above (not v1.2l) */ + "", /* 225 186 188 \\~E (not v1.2l) */ + "", /* 225 186 189 \\~e (not v1.2l) */ + "", /* 225 186 190 E with circumflex-acute (not v1.2l) */ + "", /* 225 186 191 e with circumflex-acute (not v1.2l) */ + NULL }; + +#define THTWENTYFIVE_OHEIGHTYSIX 186 + +char *get_thtwentyfive_oheightysix(unsigned char c) +{ + if (c >= UTF_BLOCK_BEGIN && c <= UTF_BLOCK_END) /* 128 ... 191 */ + return thtwentyfive_oheightysix[c-UTF_BLOCK_BEGIN]; + else return ""; +} + + static char *thtwentysix_ohtwentyeight[] = { "", /* 226 128 128 en quad (not v1.2l) */ "", /* 226 128 129 em quad (not v1.2l) */ @@ -4613,8 +4690,11 @@ int reg_utf_eight(int l, int val, char ch[UTF_EIGHT_MAXERR][UTF_EIGHT_MAXLEN+1], { i = 0; while (i < l && ch[entry][i] == *(p+i) && *(p+i) != '\0') ++i; - if (ch[entry][i] == '\0' && *(p+i) == '\0') /* (i == l) for valids */ - { + if ( i > 0 /* i > 0 added in 2.4 */ + && ch[entry][i] == '\0' + && (*(p+i) == '\0' || i == l) /* i == l added in 2.4 */ + ) + { found = 1; break; } @@ -4648,7 +4728,7 @@ int utf_eight_err(const char *p) else if (c >= QUADRUPLES_BEGIN && c <= QUADRUPLES_END) l = 4; /* 240 ... 244 */ - /* l == 1 falls \GenericError bliebe. */ + /* l == 1 if \GenericError stays and the char is in its arguments */ if (l >= 1) { utf_err_c = reg_utf_eight(l, utf_err_c, err_utf_eight, p); @@ -4744,8 +4824,14 @@ void get_utf_eight(char in[], const char *p) if (signeless(*(p+1)) == THTWENTYFIVE_OHEIGHTYFIVE) pos = insposmaxstr(in, get_thtwentyfive_oheightyfive(*(p+2)), pos, MAXLEN-1); else - if (signeless(*(p+1)) == 186 && signeless(*(p+2)) == 158) - pos = insposmaxstr(in, "{\\SS}", pos, MAXLEN-1); /* 225 186 158 */ + if (signeless(*(p+1)) == THTWENTYFIVE_OHEIGHTYSIX) + pos = insposmaxstr(in, get_thtwentyfive_oheightysix(*(p+2)), pos, MAXLEN-1); + else + if (signeless(*(p+1)) == 187 && signeless(*(p+2)) == 178) + pos = insposmaxstr(in, "\\`Y", pos, MAXLEN-1); /* 225 187 178 new in 2.4 */ + else + if (signeless(*(p+1)) == 187 && signeless(*(p+2)) == 179) + pos = insposmaxstr(in, "\\`y", pos, MAXLEN-1); /* 225 187 179 new in 2.4 */ } else if (a == THTWENTYSIX) @@ -4797,8 +4883,6 @@ void get_utf_eight(char in[], const char *p) } in[pos] = '\0'; - - /* printf("%% \"%s\"\n", in); */ /* !!!! */ } @@ -6052,7 +6136,7 @@ void printfilelist(FILE *file, int filec, int cc, const char *vor, const char *n int i = 0; if (cc == 1) - fprintf(file, "\n%%%% BibArts 2.3 (C) Timo Baumann 2021 [%s]\n", __DATE__); + fprintf(file, "\n%%%% BibArts 2.4 (C) Timo Baumann 2022 [%s]\n", __DATE__); fprintf(file, "%%%%\n"); timestamp(file); @@ -8495,7 +8579,7 @@ void print_utf_msg(const char err[UTF_EIGHT_MAXERR][UTF_EIGHT_MAXLEN+1], int err while (j < err_c && j < UTF_EIGHT_MAXERR) { printf("%%%%> %s utf8 sequence ", msg_a); - if (err[j][1] == '\0') printf("beginning with char "); + if (err[j][1] == '\0') printf("consisting only of char "); /* msg changed in 2.4 */ i = 0; while(err[j][i] != '\0') { printf("%d", ((unsigned char)err[j][i])); if(err[j][i+1] != '\0') printf("-"); ++i; } a = ((unsigned char)err[j][0]); @@ -8540,8 +8624,8 @@ int main(int argc, char *argv[]) char *inname = mydefault, *arg_i = NULL, *arg_o = NULL; - printf("\n%%%%> This is bibsort 2.3 (for help: %s -\?)\n", getmyname(argv[0], 37)); - fprintf(stderr, "%%%% bibsort 2.3 is part of BibArts 2.3 (C) Timo Baumann 2021.\n"); + printf("\n%%%%> This is bibsort 2.4 (for help: %s -\?)\n", getmyname(argv[0], 37)); + fprintf(stderr, "%%%% bibsort 2.4 is part of BibArts 2.4 (C) Timo Baumann 2022.\n"); argc = single_option(argc, argv, "-B", "-b"); -- cgit v1.2.3