From 668a5f651193f17277d25acefd1b9853c621f096 Mon Sep 17 00:00:00 2001 From: Takuji Tanaka Date: Thu, 30 Apr 2020 23:59:13 +0000 Subject: upmendex: Add bug report addresses on command line help git-svn-id: svn://tug.org/texlive/trunk@54953 c570f23f-e606-0410-a88d-b1316a301751 --- Build/source/texk/upmendex/ChangeLog | 6 ++++++ Build/source/texk/upmendex/Makefile.am | 1 + Build/source/texk/upmendex/Makefile.in | 1 + Build/source/texk/upmendex/convert.c | 23 +++++++++++++---------- Build/source/texk/upmendex/main.c | 4 ++-- Build/source/texk/upmendex/version.h | 2 ++ 6 files changed, 25 insertions(+), 12 deletions(-) create mode 100644 Build/source/texk/upmendex/version.h (limited to 'Build') diff --git a/Build/source/texk/upmendex/ChangeLog b/Build/source/texk/upmendex/ChangeLog index 6c0e2aaef79..e2dc810d827 100644 --- a/Build/source/texk/upmendex/ChangeLog +++ b/Build/source/texk/upmendex/ChangeLog @@ -1,3 +1,9 @@ +2020-05-01 TANAKA Takuji + + * main.c, version.h, Makefile.{am.in}: Add bug report addresses + on command line help. + * convert.c: Tune buffer sizes to avoid tool warnings. + 2020-02-22 TANAKA Takuji * version 0.54 Beta version. diff --git a/Build/source/texk/upmendex/Makefile.am b/Build/source/texk/upmendex/Makefile.am index fc188887f4c..8f1aa54f996 100644 --- a/Build/source/texk/upmendex/Makefile.am +++ b/Build/source/texk/upmendex/Makefile.am @@ -22,6 +22,7 @@ upmendex_SOURCES = \ ktable.h \ main.c \ mendex.h \ + version.h \ pageread.c \ qsort.c \ qsort.h \ diff --git a/Build/source/texk/upmendex/Makefile.in b/Build/source/texk/upmendex/Makefile.in index feb3e6fdf05..bb0abdf29c4 100644 --- a/Build/source/texk/upmendex/Makefile.in +++ b/Build/source/texk/upmendex/Makefile.in @@ -593,6 +593,7 @@ upmendex_SOURCES = \ ktable.h \ main.c \ mendex.h \ + version.h \ pageread.c \ qsort.c \ qsort.h \ diff --git a/Build/source/texk/upmendex/convert.c b/Build/source/texk/upmendex/convert.c index d02b05bf4d4..4687fd4f25a 100644 --- a/Build/source/texk/upmendex/convert.c +++ b/Build/source/texk/upmendex/convert.c @@ -12,6 +12,9 @@ #include "kp.h" #define BUFFERLEN 4096 +#define BUFFERLEN1 256 +#define BUFFERLEN2 (BUFFERLEN1*3) +#define BUFFERLEN3 (BUFFERLEN2+50) struct dictionary{ UChar* dic[2]; @@ -118,8 +121,8 @@ static int dcomp(const void *bf1, const void *bf2); static int dicvalread(const char *filename, struct dictionary *dicval, int line) { int i,j,k; - char buff[256],buff2[256]; - UChar ubuff[256],ubuff2[256]; + char buff[BUFFERLEN1],buff2[BUFFERLEN1]; + UChar ubuff[BUFFERLEN1],ubuff2[BUFFERLEN1]; FILE *fp; if(kpse_in_name_ok(filename)) @@ -143,7 +146,7 @@ static int dicvalread(const char *filename, struct dictionary *dicval, int line) i--; continue; } - multibyte_to_widechar(ubuff,256,buff2); + multibyte_to_widechar(ubuff,BUFFERLEN1,buff2); dicval[i].dic[0]=u_xstrdup(ubuff); for (;((buff[j]==' ')||(buff[j]=='\t'));j++); for (k=0;((buff[j]!='\r')&&(buff[j]!='\n')&&(buff[j]!=' ')&&(buff[j]!='\t'));j++,k++) { @@ -155,7 +158,7 @@ static int dicvalread(const char *filename, struct dictionary *dicval, int line) i--; continue; } - multibyte_to_widechar(ubuff,256,buff2); + multibyte_to_widechar(ubuff,BUFFERLEN1,buff2); convert(ubuff,ubuff2); dicval[i].dic[1]=u_xstrdup(ubuff2); } @@ -173,7 +176,7 @@ static int dcomp(const void *bf1, const void *bf2) const struct dictionary *buff2 = (const struct dictionary *) bf2; int i; - for (i=0;i<256;i++) { + for (i=0;i #include @@ -19,8 +20,6 @@ char *styfile,*idxfile[256],*indfile,*dicfile,*logfile; #endif KpathseaSupportInfo kp_ist,kp_dict; -#define VERSION "version 0.54" - int main(int argc, char **argv) { int i,j,cc=0,startpagenum=-1,ecount=0,chkopt=1; @@ -174,6 +173,7 @@ int main(int argc, char **argv) fprintf(stderr,"-t log take log as the error log file.\n"); fprintf(stderr,"-p no set the starting page number of index.\n"); fprintf(stderr,"idx... input files.\n"); + fprintf(stderr,"\nEmail bug reports to %s.\n", BUG_ADDRESS); exit(0); break; } diff --git a/Build/source/texk/upmendex/version.h b/Build/source/texk/upmendex/version.h new file mode 100644 index 00000000000..8cd1c6cd861 --- /dev/null +++ b/Build/source/texk/upmendex/version.h @@ -0,0 +1,2 @@ +#define VERSION "version " PACKAGE_VERSION +#define BUG_ADDRESS "issue@texjp.org, tex-k@tug.org" -- cgit v1.2.3