texlive[49768] Build/source/texk/web2c: Use brace notation for

commits+ascherer at tug.org commits+ascherer at tug.org
Sun Jan 20 11:27:10 CET 2019


Revision: 49768
          http://tug.org/svn/texlive?view=revision&revision=49768
Author:   ascherer
Date:     2019-01-20 11:27:10 +0100 (Sun, 20 Jan 2019)
Log Message:
-----------
Use brace notation for variable expansion.

After clarification of the differences between "$VAR" and "${VAR}" as
arguments for 'kpse_var_expand', we can eliminate the macro variable
that was used to avoid any misspelling.  DRY is even better.

Maybe the two extra lines will come handy later.  This way the 'cweb-tl'
catalog doesn't have to be touched for re-referencing.

Modified Paths:
--------------
    trunk/Build/source/texk/web2c/cwebboot.cin
    trunk/Build/source/texk/web2c/cwebdir/ChangeLog
    trunk/Build/source/texk/web2c/cwebdir/comm-w2c.ch

Modified: trunk/Build/source/texk/web2c/cwebboot.cin
===================================================================
--- trunk/Build/source/texk/web2c/cwebboot.cin	2019-01-20 01:23:30 UTC (rev 49767)
+++ trunk/Build/source/texk/web2c/cwebboot.cin	2019-01-20 10:27:10 UTC (rev 49768)
@@ -179,8 +179,6 @@
 
 #define _(STRING) gettext(STRING)  \
 
-#define TEXMF_LOCALE "$TEXMFLOCALEDIR" \
-
 #define kpse_find_cweb(name) kpse_find_file(name,kpse_cweb_format,true)  \
 
 
@@ -473,15 +471,17 @@
 #line 73 "cwebdir/comm-w2c.ch"
 
 /*89:*/
-#line 1269 "cwebdir/comm-w2c.ch"
+#line 1267 "cwebdir/comm-w2c.ch"
 
 setlocale(LC_MESSAGES,setlocale(LC_CTYPE,""));
-texmf_locale= kpse_var_expand(TEXMF_LOCALE);
+texmf_locale= kpse_var_expand("${TEXMFLOCALEDIR}");
+
 bindtextdomain("cweb",
 bindtextdomain("cweb-tl",
 bindtextdomain("web2c-help",
-strcmp(texmf_locale,TEXMF_LOCALE)?
+strcmp(texmf_locale,"")?
 texmf_locale:"/usr/share/locale")));
+
 free(texmf_locale);
 textdomain("cweb");
 

Modified: trunk/Build/source/texk/web2c/cwebdir/ChangeLog
===================================================================
--- trunk/Build/source/texk/web2c/cwebdir/ChangeLog	2019-01-20 01:23:30 UTC (rev 49767)
+++ trunk/Build/source/texk/web2c/cwebdir/ChangeLog	2019-01-20 10:27:10 UTC (rev 49768)
@@ -1,3 +1,7 @@
+2019-01-20  Andreas Scherer  <https://ascherer.github.io>
+
+	* comm-w2c.ch: Use braced evaluation and save a macro variable.
+
 2019-01-19  Andreas Scherer  <https://ascherer.github.io>
 
 	* comm-w2c.ch: Extended notes about NLS activation.

Modified: trunk/Build/source/texk/web2c/cwebdir/comm-w2c.ch
===================================================================
--- trunk/Build/source/texk/web2c/cwebdir/comm-w2c.ch	2019-01-20 01:23:30 UTC (rev 49767)
+++ trunk/Build/source/texk/web2c/cwebdir/comm-w2c.ch	2019-01-20 10:27:10 UTC (rev 49768)
@@ -1264,16 +1264,16 @@
     e.g., \.{TEXMFLOCALEDIR=\$TEXMFMAIN/locale}\hfil\break
     or \.{TEXMFLOCALEDIR.cweb=\$TEXMFMAIN/locale}.\par}
 
- at d TEXMF_LOCALE "$TEXMFLOCALEDIR"
-
 @<Set locale...@>=
 setlocale(LC_MESSAGES, setlocale(LC_CTYPE, ""));
-texmf_locale = kpse_var_expand (TEXMF_LOCALE);
+texmf_locale = kpse_var_expand ("${TEXMFLOCALEDIR}");
+
 bindtextdomain("cweb",
   bindtextdomain("cweb-tl",
     bindtextdomain("web2c-help", @|
-      strcmp(texmf_locale, TEXMF_LOCALE) ?
+      strcmp(texmf_locale, "") ?
         texmf_locale : "/usr/share/locale")));
+
 free(texmf_locale);
 textdomain("cweb"); /* the majority of |"strings"| come from ``plain \.{CWEB}'' */
 @.cweb.mo@>



More information about the tex-live-commits mailing list