texlive[60342] Build/source/texk/upmendex: upmendex: add a alias

commits+takuji at tug.org commits+takuji at tug.org
Sat Aug 28 09:26:00 CEST 2021


Revision: 60342
          http://tug.org/svn/texlive?view=revision&revision=60342
Author:   takuji
Date:     2021-08-28 09:26:00 +0200 (Sat, 28 Aug 2021)
Log Message:
-----------
upmendex: add a alias "headings_flag" of the keyword "heading_flag"

Modified Paths:
--------------
    trunk/Build/source/texk/upmendex/ChangeLog
    trunk/Build/source/texk/upmendex/styfile.c

Modified: trunk/Build/source/texk/upmendex/ChangeLog
===================================================================
--- trunk/Build/source/texk/upmendex/ChangeLog	2021-08-28 07:23:33 UTC (rev 60341)
+++ trunk/Build/source/texk/upmendex/ChangeLog	2021-08-28 07:26:00 UTC (rev 60342)
@@ -1,3 +1,10 @@
+2021-08-28  TANAKA Takuji  <ttk at t-lab.opal.ne.jp>
+
+	* styfile.c:
+	Add a alias "headings_flag" of the keyword "heading_flag"
+	in style file for compatibility with makeindex.
+	Warn if specifier in style file is unknown.
+
 2021-08-26  TANAKA Takuji  <ttk at t-lab.opal.ne.jp>
 
 	* sort.c:

Modified: trunk/Build/source/texk/upmendex/styfile.c
===================================================================
--- trunk/Build/source/texk/upmendex/styfile.c	2021-08-28 07:23:33 UTC (rev 60341)
+++ trunk/Build/source/texk/upmendex/styfile.c	2021-08-28 07:26:00 UTC (rev 60342)
@@ -76,16 +76,12 @@
 		if (getparam(buff,"symhead_negative",symhead_negative)) continue;
 		if (getparam(buff,"numhead_positive",numhead_positive)) continue;
 		if (getparam(buff,"numhead_negative",numhead_negative)) continue;
-		cc=scompare(buff,"lethead_flag");
-		if (cc!= -1) {
+		if ( (cc=scompare(buff,"lethead_flag")) != -1 ||
+		     (cc=scompare(buff,"heading_flag")) != -1 ||
+		     (cc=scompare(buff,"headings_flag")) != -1 ) {
 			lethead_flag=atoi(&buff[cc]);
 			continue;
 		}
-		cc=scompare(buff,"heading_flag");
-		if (cc!= -1) {
-			lethead_flag=atoi(&buff[cc]);
-			continue;
-		}
 		cc=scompare(buff,"priority");
 		if (cc!= -1) {
 			priority=atoi(&buff[cc]);
@@ -164,6 +160,13 @@
 			continue;
 		}
 		if (getparam(buff,"icu_attributes", icu_attr_str   )) continue;
+
+		cc=strcspn(buff," \t\r\n");
+		if (cc>0) buff[cc]='\0';
+		if (buff[0]=='%' || buff[0]=='\n') continue;
+		if (strlen(buff)>0) {
+			verb_printf(efp,"\nWarning: Unknown specifier (%s).", buff);
+		}
 	}
 	fclose(fp);
 



More information about the tex-live-commits mailing list.