summaryrefslogtreecommitdiff
path: root/Build/source/texk/mendexk
diff options
context:
space:
mode:
Diffstat (limited to 'Build/source/texk/mendexk')
-rw-r--r--Build/source/texk/mendexk/ChangeLog5
-rw-r--r--Build/source/texk/mendexk/convert.c16
-rw-r--r--Build/source/texk/mendexk/fwrite.c2
3 files changed, 15 insertions, 8 deletions
diff --git a/Build/source/texk/mendexk/ChangeLog b/Build/source/texk/mendexk/ChangeLog
index a3d33df8dbb..99118bcbf48 100644
--- a/Build/source/texk/mendexk/ChangeLog
+++ b/Build/source/texk/mendexk/ChangeLog
@@ -1,3 +1,8 @@
+2014-05-05 TANAKA Takuji <KXD02663@nifty.ne.jp>
+
+ * convert.c: Allow longer words in dictionary.
+ * fwrite.c: Make a buffer size larger.
+
2014-05-02 Peter Breitenlohner <peb@mppmu.mpg.de>
* fwrite.c: OS X build fix.
diff --git a/Build/source/texk/mendexk/convert.c b/Build/source/texk/mendexk/convert.c
index 66b31bca246..4d6aff618a2 100644
--- a/Build/source/texk/mendexk/convert.c
+++ b/Build/source/texk/mendexk/convert.c
@@ -13,7 +13,7 @@
#include "kp.h"
struct dictionary{
-char dic[2][50];
+char* dic[2];
};
static struct dictionary *dictable,*envdic;
@@ -124,7 +124,7 @@ 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];
+ char buff[256],buff2[256];
FILE *fp;
if(kpse_in_name_ok(filename))
@@ -141,18 +141,20 @@ static int dicvalread(const char *filename, struct dictionary *dicval, int line)
}
for (j=0;((buff[j]==' ')||(buff[j]=='\t'));j++);
for (k=0;((buff[j]!='\r')&&(buff[j]!='\n')&&(buff[j]!=' ')&&(buff[j]!='\t'));j++,k++) {
- dicval[i].dic[0][k]=buff[j];
+ buff2[k]=buff[j];
}
- dicval[i].dic[0][k]='\0';
+ buff2[k]='\0';
+ dicval[i].dic[0]=xstrdup(buff2);
if (strlen(dicval[i].dic[0])==0) {
i--;
continue;
}
for (;((buff[j]==' ')||(buff[j]=='\t'));j++);
for (k=0;((buff[j]!='\r')&&(buff[j]!='\n')&&(buff[j]!=' ')&&(buff[j]!='\t'));j++,k++) {
- dicval[i].dic[1][k]=buff[j];
+ buff2[k]=buff[j];
}
- dicval[i].dic[1][k]='\0';
+ buff2[k]='\0';
+ dicval[i].dic[1]=xstrdup(buff2);
if (strlen(dicval[i].dic[1])==0) {
i--;
continue;
@@ -175,7 +177,7 @@ static int dcomp(const void *bf1, const void *bf2)
const struct dictionary *buff2 = (const struct dictionary *) bf2;
int i;
- for (i=0;i<50;i++) {
+ for (i=0;i<256;i++) {
if (((*buff1).dic[0][i]=='\0')&&((*buff2).dic[0][i]=='\0')) return 0;
else if (((*buff1).dic[0][i]=='\0')&&((*buff2).dic[0][i]!='\0')) return 1;
else if (((*buff1).dic[0][i]!='\0')&&((*buff2).dic[0][i]=='\0')) return -1;
diff --git a/Build/source/texk/mendexk/fwrite.c b/Build/source/texk/mendexk/fwrite.c
index 0255502664a..77176ec8940 100644
--- a/Build/source/texk/mendexk/fwrite.c
+++ b/Build/source/texk/mendexk/fwrite.c
@@ -70,7 +70,7 @@ void verb_printf(FILE *fp, const char *format, ...)
void indwrite(char *filename, struct index *ind, int pagenum)
{
int i,j,hpoint=0;
- char datama[256],lbuff[BUFFERLEN];
+ char datama[2048],lbuff[BUFFERLEN];
FILE *fp;
if (filename[0]!='\0' && kpse_out_name_ok(filename)) fp=fopen(filename,"wb");