[texhax] makeindex breaks up index group on a capitalized entry

geolsoft at mail.ru geolsoft at mail.ru
Mon Aug 23 16:46:33 CEST 2004


I know this was stupid of me---I set LC_CTYPE and unset
LC_COLLATE.  Please find new patch below.

The posting to texhax at tug.org did not make through---I was
convicted of spam by <spammails at kcmail.datamatics.com>.
(But it actually did---what's going on?)


Best regards,
Oleg Katsitadze


--- makeindexk/genind.c	2002-10-02 15:19:22.000000000 +0300
+++ makeindexk.new/genind.c	2004-08-23 16:37:45.000000000 +0300
@@ -28,6 +28,10 @@
 #include    "mkind.h"
 #include    "genind.h"
 
+#ifdef HAVE_LOCALE_H
+#include <locale.h>
+#endif
+
 static FIELD_PTR curr = NULL;
 static FIELD_PTR prev = NULL;
 static FIELD_PTR begin = NULL;
@@ -219,6 +223,10 @@
 {
     int    let;
     FIELD_PTR ptr;
+#ifdef HAVE_SETLOCALE
+    char *prev_locale;
+    prev_locale = setlocale(LC_CTYPE, "");
+#endif
 
     if (in_range) {
 	ptr = curr;
@@ -246,6 +254,10 @@
 	make_item(NIL);
     } else
 	make_item(delim_t);
+
+#ifdef HAVE_SETLOCALE
+    setlocale(LC_CTYPE, prev_locale);
+#endif
 }
 
 



More information about the texhax mailing list