texlive[64497] Master: sanskrit (24sep22)

commits+karl at tug.org commits+karl at tug.org
Sat Sep 24 22:26:23 CEST 2022


Revision: 64497
          http://tug.org/svn/texlive?view=revision&revision=64497
Author:   karl
Date:     2022-09-24 22:26:22 +0200 (Sat, 24 Sep 2022)
Log Message:
-----------
sanskrit (24sep22)

Modified Paths:
--------------
    trunk/Master/texmf-dist/doc/latex/sanskrit/README.md
    trunk/Master/texmf-dist/doc/latex/sanskrit/README.pdf
    trunk/Master/texmf-dist/doc/latex/sanskrit/build-ctan-dist.sh
    trunk/Master/texmf-dist/doc/latex/sanskrit/sktdoc.pdf
    trunk/Master/texmf-dist/doc/latex/sanskrit/sktdoc.skt
    trunk/Master/texmf-dist/source/latex/sanskrit/skt.c
    trunk/Master/tlpkg/libexec/ctan2tds
    trunk/Master/tlpkg/tlpsrc/sanskrit.tlpsrc

Added Paths:
-----------
    trunk/Master/texmf-dist/doc/latex/sanskrit/README.ps-type1
    trunk/Master/texmf-dist/fonts/map/dvips/sanskrit/
    trunk/Master/texmf-dist/fonts/map/dvips/sanskrit/skt.map
    trunk/Master/texmf-dist/fonts/type1/public/sanskrit/
    trunk/Master/texmf-dist/fonts/type1/public/sanskrit/skt10.pfb
    trunk/Master/texmf-dist/fonts/type1/public/sanskrit/skt8.pfb
    trunk/Master/texmf-dist/fonts/type1/public/sanskrit/skt9.pfb
    trunk/Master/texmf-dist/fonts/type1/public/sanskrit/sktb10.pfb
    trunk/Master/texmf-dist/fonts/type1/public/sanskrit/sktbs10.pfb
    trunk/Master/texmf-dist/fonts/type1/public/sanskrit/sktf10.pfb
    trunk/Master/texmf-dist/fonts/type1/public/sanskrit/sktfs10.pfb
    trunk/Master/texmf-dist/fonts/type1/public/sanskrit/skts10.pfb

Modified: trunk/Master/texmf-dist/doc/latex/sanskrit/README.md
===================================================================
--- trunk/Master/texmf-dist/doc/latex/sanskrit/README.md	2022-09-24 20:16:14 UTC (rev 64496)
+++ trunk/Master/texmf-dist/doc/latex/sanskrit/README.md	2022-09-24 20:26:22 UTC (rev 64497)
@@ -134,6 +134,7 @@
 -   Revision 2.0 1996/11/27 Charles Wikner wikner at nacdh4.nac.ac.za
 -   Revision 2.2 2002/01/02 Charles Wikner wikner at nac.ac.za
 -   Revision 2.2.1 2016/09/01 Václav Haisman vhaisman at gmail.com
+-   Revision 2.2.2 2017/02/22 Václav Haisman vhaisman at gmail.com
 
 I, Václav Haisman, am only a maintainer pro tempore. If you are reading this
 and you have patches to submit and actual interest in and knowledge of

Modified: trunk/Master/texmf-dist/doc/latex/sanskrit/README.pdf
===================================================================
(Binary files differ)

Added: trunk/Master/texmf-dist/doc/latex/sanskrit/README.ps-type1
===================================================================
--- trunk/Master/texmf-dist/doc/latex/sanskrit/README.ps-type1	                        (rev 0)
+++ trunk/Master/texmf-dist/doc/latex/sanskrit/README.ps-type1	2022-09-24 20:26:22 UTC (rev 64497)
@@ -0,0 +1,152 @@
+%
+% README.TXT
+%
+% Revision 1.0 2004/08/24 Sergey Korop svk at lib.ru
+% Revision 1.1 2005/01/23 Sergey Korop svk at lib.ru
+%
+
+sanskrit-t1
+===========
+
+This package extends ``Sanskrit for LaTeX2e'' package with skt-series' fonts 
+in Type 1 format.
+
+
+The ``Sanskrit for LaTeX2e'' package (referred as 'origin' in the text below) 
+was created by Charles Wikner and it is available from the CTAN:
+
+  CTAN:language/sanskrit
+
+
+CONTENTS OF THIS README FILE
+============================
+
+1. License.
+
+2. Requirements.
+
+3. Revision History.
+
+4. Technical Issues.
+
+5. Installation.
+
+6. Feedback.
+
+
+
+
+LICENSE
+=======
+
+This package should be distributed and used together with it's origin 
+under the terms specified for that origin by Charles Wikner. Currently
+(as for version 2.0 of the origin) it is LaTeX Project Public License.
+
+
+REQUIREMENTS
+============
+
+TeX system capable for producing PostScript/PDF files (e.g. system including
+dvips, pdfTeX or similar software).
+
+
+The files that you should have are:
+
+readme.txt   This file.
+sktdoc.pdf   Documentation of origin typesetted using Type 1 fonts.
+skt.map      Configuration file for dvips and pdfTeX program.
+skt8.pfb     PS Type 1 font file for skt font at 8pt upright.
+skt9.pfb     PS Type 1 font file for skt font at 9pt upright.
+skt10.pfb    PS Type 1 font file for skt font at 10pt upright.
+sktb10.pfb   PS Type 1 font file for skt font at 10pt upright bold.
+sktf10.pfb   PS Type 1 font file for skt font at 10pt upright feint.
+skts10.pfb   PS Type 1 font file for skt font at 10pt slanted.
+sktbs10.pfb  PS Type 1 font file for skt font at 10pt bold slanted.
+sktfs10.pfb  PS Type 1 font file for skt font at 10pt feint slanted.
+
+
+REVISION HISTORY
+================
+ * Revision 1.0 2004/08/24 Sergey Korop svk at lib.ru
+
+    Initial release.
+
+ * Revision 1.1 2005/01/23 Sergey Korop svk at lib.ru
+
+    Fixed incompatibility with dvips: changed /FullName and /FontName 
+    font properties to match PS Font names specified in the map file.
+    Thanks to Mr. Hartmut Henkel for bugreport and proposed solution.
+
+TECHNICAL ISSUES
+================
+
+ 1. There are no UniqueIDs for the fonts provided in this package.
+    According to Type 1 font specs, this is allowed feature, but
+    it may probably confuse some font processing software and/or
+    hardware. However, I think that using no UniqueID is better
+    than guessing one with risk of collision.
+
+ 2. Fonts were generated from METAFONT sources automagically using
+    textrace program. Due to the nature of this process, some
+    discrepancies with original fonts may appear.
+
+ 3. To ensure backward compatibility, always make sure that you are 
+    using the same versions of *.pfb files and their *.mf origins.
+
+ 4. Names of PostScript fonts (i.e. /FullName, /FontName, etc) don't
+    match the names of original TeX fonts. I'm not sure this was the
+    best possible solution, but proposed names are:
+
+      -- self-explainatory (i.e one can always identify the origin);
+
+      -- preventing from possible name collision;
+
+      -- matching PostScript naming conventions, e.g. contain distinct 
+         Font Family and Weight parts.
+
+
+INSTALLATION
+============
+
+Depends from TeX system you use. Users of pdfTeX distributed with 
+teTeX or fpTeX may try following steps:
+
+ IMPORTANT: I can't predict the configuration of your system,
+            so use the commands below at your own risk.
+
+ 1. Put the files of this package into appropriate directories:
+
+      skt.map -> .../texmf/dvips/config/
+        *.pfb -> .../texmf/fonts/type1/sanskrit/
+
+    the name 'sanskrit' for font directory is not mandatory and may
+    be changed if you need.
+
+ 2. Run: 
+
+      texhash 
+      
+      kpsewhich skt10.pfb
+
+    to make sure your TeX software has access to those files. The last
+    command should output the full path to appropriate font file, 
+    if nothing appeared, consult your local TeXnicians. 
+
+    NOTE: don't run kpsewhich directly in the font directory --- this won't 
+    show you the real picture.
+
+ 3. Locate your pfdtex.cfg file (either global or private) and add following 
+    line:
+
+      map +skt.map
+
+This should make outline skt fonts available for docs produced by pdfTeX.
+
+
+FEEDBACK
+========
+
+Suggestions and bug reports to: Sergey Korop, <svk at lib.ru>. Please note
+that since I'm neither professional font designer nor experienced TeXnician,
+I will probably be unable to fulfill your requests.


Property changes on: trunk/Master/texmf-dist/doc/latex/sanskrit/README.ps-type1
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Modified: trunk/Master/texmf-dist/doc/latex/sanskrit/build-ctan-dist.sh
===================================================================
--- trunk/Master/texmf-dist/doc/latex/sanskrit/build-ctan-dist.sh	2022-09-24 20:16:14 UTC (rev 64496)
+++ trunk/Master/texmf-dist/doc/latex/sanskrit/build-ctan-dist.sh	2022-09-24 20:26:22 UTC (rev 64497)
@@ -8,9 +8,8 @@
 }
 
 if command_exists pandoc ; then
-    pandoc --smart \
-           --verbose \
-           -f markdown-raw_tex \
+    pandoc --verbose \
+           -f markdown+smart-raw_tex \
            -t latex \
            -o README.pdf \
            README.md

Modified: trunk/Master/texmf-dist/doc/latex/sanskrit/sktdoc.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex/sanskrit/sktdoc.skt
===================================================================
--- trunk/Master/texmf-dist/doc/latex/sanskrit/sktdoc.skt	2022-09-24 20:16:14 UTC (rev 64496)
+++ trunk/Master/texmf-dist/doc/latex/sanskrit/sktdoc.skt	2022-09-24 20:26:22 UTC (rev 64497)
@@ -452,6 +452,7 @@
 %             ha<3k>vyadaa<2>taye ni<2r> hotaa<2r> satsi va<3>hi<1>si<2>}\\
 \cline{2-4}
 \end{tabular}{\skt [40- 4- 5-]}
+\vfill
 
 \framebox[\textwidth]{\hspace*{5mm}\begin{minipage}{130mm}
 {\bf Option 6:} Enable {\skti .Rg/Tait@} accents in basic transliteration mode.
@@ -498,6 +499,7 @@
 a {\skti viraama} in forming a {\skti sa.myoga}. Given the range of 
 {\skti sa.myoga} supported by the font, this warning should only occur
 with very exotic syllables.
+\vfill
 
 \framebox[\textwidth]{\hspace*{5mm}\begin{minipage}{130mm}
 {\bf Option 9:} Enable obey-lines.
@@ -519,6 +521,7 @@
 
 Without this option enabled, the pre-processor will discard any discretionary
 hyphens, \verb+\-+, in the input text.
+\vfill
 
 \framebox[\textwidth]{\hspace*{5mm}\begin{minipage}{130mm}
 {\bf Option 11:} Enable auto-hyphenation.

Added: trunk/Master/texmf-dist/fonts/map/dvips/sanskrit/skt.map
===================================================================
--- trunk/Master/texmf-dist/fonts/map/dvips/sanskrit/skt.map	                        (rev 0)
+++ trunk/Master/texmf-dist/fonts/map/dvips/sanskrit/skt.map	2022-09-24 20:26:22 UTC (rev 64497)
@@ -0,0 +1,8 @@
+skt10   WiknerSanskrit10-Upright      <skt10.pfb
+sktb10  WiknerSanskrit10-BoldUpright  <sktb10.pfb
+sktbs10 WiknerSanskrit10-BoldSlanted  <sktbs10.pfb
+sktf10  WiknerSanskrit10-FeintUpright <sktf10.pfb
+sktfs10 WiknerSanskrit10-FeintSlanted <sktfs10.pfb
+skts10  WiknerSanskrit10-Slanted      <skts10.pfb
+skt9    WiknerSanskrit9-Upright       <skt9.pfb
+skt8    WiknerSanskrit8-Upright       <skt8.pfb


Property changes on: trunk/Master/texmf-dist/fonts/map/dvips/sanskrit/skt.map
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: trunk/Master/texmf-dist/fonts/type1/public/sanskrit/skt10.pfb
===================================================================
(Binary files differ)

Index: trunk/Master/texmf-dist/fonts/type1/public/sanskrit/skt10.pfb
===================================================================
--- trunk/Master/texmf-dist/fonts/type1/public/sanskrit/skt10.pfb	2022-09-24 20:16:14 UTC (rev 64496)
+++ trunk/Master/texmf-dist/fonts/type1/public/sanskrit/skt10.pfb	2022-09-24 20:26:22 UTC (rev 64497)

Property changes on: trunk/Master/texmf-dist/fonts/type1/public/sanskrit/skt10.pfb
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Added: trunk/Master/texmf-dist/fonts/type1/public/sanskrit/skt8.pfb
===================================================================
(Binary files differ)

Index: trunk/Master/texmf-dist/fonts/type1/public/sanskrit/skt8.pfb
===================================================================
--- trunk/Master/texmf-dist/fonts/type1/public/sanskrit/skt8.pfb	2022-09-24 20:16:14 UTC (rev 64496)
+++ trunk/Master/texmf-dist/fonts/type1/public/sanskrit/skt8.pfb	2022-09-24 20:26:22 UTC (rev 64497)

Property changes on: trunk/Master/texmf-dist/fonts/type1/public/sanskrit/skt8.pfb
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Added: trunk/Master/texmf-dist/fonts/type1/public/sanskrit/skt9.pfb
===================================================================
(Binary files differ)

Index: trunk/Master/texmf-dist/fonts/type1/public/sanskrit/skt9.pfb
===================================================================
--- trunk/Master/texmf-dist/fonts/type1/public/sanskrit/skt9.pfb	2022-09-24 20:16:14 UTC (rev 64496)
+++ trunk/Master/texmf-dist/fonts/type1/public/sanskrit/skt9.pfb	2022-09-24 20:26:22 UTC (rev 64497)

Property changes on: trunk/Master/texmf-dist/fonts/type1/public/sanskrit/skt9.pfb
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Added: trunk/Master/texmf-dist/fonts/type1/public/sanskrit/sktb10.pfb
===================================================================
(Binary files differ)

Index: trunk/Master/texmf-dist/fonts/type1/public/sanskrit/sktb10.pfb
===================================================================
--- trunk/Master/texmf-dist/fonts/type1/public/sanskrit/sktb10.pfb	2022-09-24 20:16:14 UTC (rev 64496)
+++ trunk/Master/texmf-dist/fonts/type1/public/sanskrit/sktb10.pfb	2022-09-24 20:26:22 UTC (rev 64497)

Property changes on: trunk/Master/texmf-dist/fonts/type1/public/sanskrit/sktb10.pfb
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Added: trunk/Master/texmf-dist/fonts/type1/public/sanskrit/sktbs10.pfb
===================================================================
(Binary files differ)

Index: trunk/Master/texmf-dist/fonts/type1/public/sanskrit/sktbs10.pfb
===================================================================
--- trunk/Master/texmf-dist/fonts/type1/public/sanskrit/sktbs10.pfb	2022-09-24 20:16:14 UTC (rev 64496)
+++ trunk/Master/texmf-dist/fonts/type1/public/sanskrit/sktbs10.pfb	2022-09-24 20:26:22 UTC (rev 64497)

Property changes on: trunk/Master/texmf-dist/fonts/type1/public/sanskrit/sktbs10.pfb
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Added: trunk/Master/texmf-dist/fonts/type1/public/sanskrit/sktf10.pfb
===================================================================
(Binary files differ)

Index: trunk/Master/texmf-dist/fonts/type1/public/sanskrit/sktf10.pfb
===================================================================
--- trunk/Master/texmf-dist/fonts/type1/public/sanskrit/sktf10.pfb	2022-09-24 20:16:14 UTC (rev 64496)
+++ trunk/Master/texmf-dist/fonts/type1/public/sanskrit/sktf10.pfb	2022-09-24 20:26:22 UTC (rev 64497)

Property changes on: trunk/Master/texmf-dist/fonts/type1/public/sanskrit/sktf10.pfb
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Added: trunk/Master/texmf-dist/fonts/type1/public/sanskrit/sktfs10.pfb
===================================================================
(Binary files differ)

Index: trunk/Master/texmf-dist/fonts/type1/public/sanskrit/sktfs10.pfb
===================================================================
--- trunk/Master/texmf-dist/fonts/type1/public/sanskrit/sktfs10.pfb	2022-09-24 20:16:14 UTC (rev 64496)
+++ trunk/Master/texmf-dist/fonts/type1/public/sanskrit/sktfs10.pfb	2022-09-24 20:26:22 UTC (rev 64497)

Property changes on: trunk/Master/texmf-dist/fonts/type1/public/sanskrit/sktfs10.pfb
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Added: trunk/Master/texmf-dist/fonts/type1/public/sanskrit/skts10.pfb
===================================================================
(Binary files differ)

Index: trunk/Master/texmf-dist/fonts/type1/public/sanskrit/skts10.pfb
===================================================================
--- trunk/Master/texmf-dist/fonts/type1/public/sanskrit/skts10.pfb	2022-09-24 20:16:14 UTC (rev 64496)
+++ trunk/Master/texmf-dist/fonts/type1/public/sanskrit/skts10.pfb	2022-09-24 20:26:22 UTC (rev 64497)

Property changes on: trunk/Master/texmf-dist/fonts/type1/public/sanskrit/skts10.pfb
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Modified: trunk/Master/texmf-dist/source/latex/sanskrit/skt.c
===================================================================
--- trunk/Master/texmf-dist/source/latex/sanskrit/skt.c	2022-09-24 20:16:14 UTC (rev 64496)
+++ trunk/Master/texmf-dist/source/latex/sanskrit/skt.c	2022-09-24 20:26:22 UTC (rev 64497)
@@ -15,6 +15,9 @@
 /*      Revision 2.1 1997/02/11 minor corrections; add more accents           */
 /*      Revision 2.2 2002/01/02 minor corrections; tidy                       */
 /*      Revision 2.2.1 2016-08-31 compilation and other fixes                 */
+/*      Revision 2.2.2 2017-02-22 portability and other tweaks                */
+/*      Revision 2.2.3 2018-02-10 extend working buffers ten times            */
+/*      Revision 2.2.4 2022-09-24 fix abort on MacOS X                        */
 /*                                                                            */
 /*      Copyright 1996 & 2002 Charles Wikner                                  */
 /*      This program can be redistributed and/or modified under the terms     */
@@ -24,7 +27,9 @@
 /*                                                                            */
 /******************************************************************************/
 
+#ifndef DEBUG
 #define DEBUG 0
+#endif
 
 /* Set DEBUG 0 for normal                                                     */
 /* If non-zero, STDIO is used for input/output                                */
@@ -36,9 +41,9 @@
 #include <stdio.h>
 #include <ctype.h>
 #include <string.h>
+#include <stdlib.h>
 
 /* DECLARE FUNCTIONS */
-void   exit        (int);
 void   search      (void);
 void   write_outbuf(void);
 void   write_line  (char *);
@@ -60,10 +65,13 @@
 int    aci         (char *);
 void   translit    (void);
 
-FILE *infile, *outfile, *fopen();
-char infilename[80];
-char outfilename[80];
-#define FILENAME_SCANF "%79s"
+FILE *infile, *outfile;
+#define FILENAME_LEN 4096
+char infilename[FILENAME_LEN+1];
+char outfilename[FILENAME_LEN+1];
+#define SKT_STRINGIFY2(X) #X
+#define SKT_STRINGIFY(X) SKT_STRINGIFY2(X)
+#define FILENAME_SCANF "%" SKT_STRINGIFY(FILENAME_LEN) "s"
 
 #define TRUE 1
 #define FALSE 0
@@ -86,9 +94,13 @@
 #define err_max 10       /* after err_max errors, program aborts              */
 int line_cnt;            /* line number of current input line                 */
 
-char inbuf[255];         /* input file line buffer of text being processed    */
+#define BUFFER_LENGTH_MULTIPLIER 10
+
+/* input file line buffer of text being processed    */
+char inbuf[255*BUFFER_LENGTH_MULTIPLIER];
 char *i_ptr;             /* general pointer to input buffer                   */
-char outbuf[2048];       /* output file line buffer of text processed         */
+/* output file line buffer of text processed         */
+char outbuf[2048*BUFFER_LENGTH_MULTIPLIER];
 char *o_ptr;             /* general pointer to output buffer                  */
 
 unsigned char cont_end;   /* flag TRUE when line ends with %-continuation     */
@@ -99,12 +111,15 @@
 unsigned char ac_char;    /* storage for working vowel character              */
 unsigned char pre_ra;     /* storage/flag for 'r' at beginning of samyoga     */
 char ac_hook;             /* vowel hook code                                  */
-char sktbuf[255];         /* storage for sanskrit in internal code            */
+/* storage for sanskrit in internal code            */
+char sktbuf[255*BUFFER_LENGTH_MULTIPLIER];
 char *s_ptr;              /* general pointer to sanskrit buffer               */
 char *old_sptr;           /* points to samyoga start; used by warning message */
-char work[256];           /* general scratchpad                               */
+/* general scratchpad                               */
+char work[256*BUFFER_LENGTH_MULTIPLIER];
 char *w_ptr;              /* general pointer to work buffer                   */
-char tmp[2048];           /* temporary buffer for previous syllable           */
+/* temporary buffer for previous syllable           */
+char tmp[2048*BUFFER_LENGTH_MULTIPLIER];
 int  wid;                 /* character print width                            */
 int  top;                 /* amount to backspace for top flags                */
 int  bot;                 /* amount to backspace for bottom flags             */
@@ -152,7 +167,7 @@
   o_ptr = outbuf; *o_ptr = '\0';
   for (k=0; k<total_options+1; k++) option[k] = FALSE; /* disable everything  */
 
-  printf("SKT.C Version 2.2.1 2016-08-31\n");
+  printf("SKT.C Version 2.2.4 2022-09-24\n");
 
 #if (DEBUG == 0)
 
@@ -177,11 +192,11 @@
     }
   p = strchr(infilename,'.');
   if (p == 0) strcat(infilename,".skt");  /* default input file extension */
-  if ((infile=fopen(infilename,"r")) == NULL)
+  if ((infile=fopen(infilename,"rb")) == NULL)
         { printf("Cannot open file %s\n",infilename); exit(1); }
   p = strchr(outfilename,'.');
   if (p == 0) strcat(outfilename,".tex"); /* set default output file extension */
-  if ((outfile=fopen(outfilename,"w")) == NULL)
+  if ((outfile=fopen(outfilename,"wb")) == NULL)
         { printf("Cannot open output file %s\n",outfilename); exit(1); }
 #else
   printf("Enter text (blank line terminates program) :\n");
@@ -287,7 +302,7 @@
     write_line(outbuf);
     *o_ptr = e;
     if (c!='\0') { *--o_ptr = d; *--o_ptr = c; } /* restore displaced chars */
-    strcpy(outbuf,o_ptr);
+    memmove(outbuf, o_ptr, strlen(o_ptr) + 1);
   }
   o_ptr = outbuf;
   *o_ptr = '\0';
@@ -333,7 +348,6 @@
 
 void get_line(void)
 {
-char *p;
   i_ptr = inbuf;
   *i_ptr = '\0';
   line_cnt++;
@@ -400,9 +414,10 @@
 /*           of inbuf.                                                        */
 
 void error(char *s, int n)
-{ char err_str[80]; int j;
+{ char err_str[80];
   if (++err_cnt <= err_max)
-    { if (n > 0)  { for (j=0; j<n; j++) err_str[j] = *(i_ptr+j);
+    { if (n > 0)  { int j;
+                    for (j=0; j<n; j++) err_str[j] = *(i_ptr+j);
                     err_str[j] = '\0';
                   }
       if (n == 0) { strcpy(err_str,"oct(");
@@ -423,15 +438,22 @@
 /* Function: process input text within {\skt.., converting to internal        */
 /*           format in sktbuf                                                 */
 
-#define ISAC(c) (((strchr("aAiIuUwWxXeEoO",c) != 0) && c) ? TRUE : FALSE)
+#define ISAC(c) (((c) && (strchr("aAiIuUwWxXeEoO",(c)) != 0)) ? TRUE : FALSE)
 
-#define CAT(w,x,y,z) \
-strcat(w,x); if((y)>9)chrcat(w,('0'+((y)/10))); \
-chrcat(w,('0'+((y)%10))); strcat(w,z)
+void
+cat(char * w, char const * x, int y, char const * z)
+{
+  strcat(w,x);
+  if((y)>9) chrcat(w,('0'+((y)/10)));
+  chrcat(w,('0'+((y)%10)));
+  strcat(w,z);
+}
 
+#define CAT(w,x,y,z) cat((w),(x),(y),(z));
+
 void process(void)
 { int j,k,cap_flag, underscore, nasal_vowel, n_flag, vedic;
-unsigned char *i, c,d;
+unsigned char c,d;
 #define CF ac_flag=svara_flag=ylv_flag=underscore=cap_flag=roman_flag=nasal_vowel=n_flag=vedic=FALSE
 #define CC CF; continue
 #define CR ac_flag=svara_flag=ylv_flag=underscore=cap_flag=nasal_vowel=n_flag=vedic=FALSE;
@@ -446,7 +468,7 @@
     c = *i_ptr; d = *(i_ptr+1);
 /* END OF LINE */
     if ((c == '\0') || (c == '\n'))
-      { sktword(); strcat (outbuf,i_ptr); write_outbuf(); get_line(); CC; }
+      { sktword(); strcat(outbuf,i_ptr); write_outbuf(); get_line(); CC; }
 /* COMMENT DELIMITER */
     if (c == '%')
     { if (*(i_ptr+1) == '\n') sktcont();
@@ -462,7 +484,7 @@
     if (c < ' ')
     { error("Illegal control character: ",0); CI; }
 /* ADDED IMBEDDED ROMAN */
-    if ( (strchr("[`']",c) && c==d) || ((c == '.') && (d == '!')) )
+    if ((c==d && strchr("[`']",c)) || ((c == '.') && (d == '!')) )
     { if (sktbuf[0]) sktword();
       if (!xlit) { if (feint) strcat(outbuf,"\\ZF{");
                    if (bold)  strcat(outbuf,"\\ZB{");
@@ -492,7 +514,7 @@
         { if (*(i_ptr+1) != '.') break;
           i_ptr++; continue;
         }
-        if ((strchr("()*+,-/:;=?",c) && c) == 0) break;
+        if ((c && strchr("()*+,-/:;=?",c)) == 0) break;
       }
       if (!xlit) strcat(outbuf,"}");
       CR; continue;
@@ -734,7 +756,7 @@
     CR;
     if (ISAC(c) || c=='\26') ac_flag = TRUE;
 /**/
-    if (strchr("!\"%()&:;<=>?`\'\27\30\31\32\33\34\35\36\37",c) && c)
+    if (c && strchr("!\"%()&:;<=>?`\'\27\30\31\32\33\34\35\36\37",c))
         svara_flag = TRUE;
     if ((c == 'y') || (c == 'l') || (c == 'v')) ylv_flag = TRUE;
     if (c == 'n') n_flag = TRUE; /* allow accents on letter 'n' */
@@ -783,18 +805,48 @@
 
 /* Function: convert contents of sktbuf to output string in outbuf            */
 
-static char hal_chars[] = "BCDFGJKLNPQRSTVZbcdfghjklmnpqrstvyz";
+static char const hal_chars[] = "BCDFGJKLNPQRSTVZbcdfghjklmnpqrstvyz";
                                               /* internal code for consonants */
-#define ISHAL(c) (((strchr(hal_chars,c) != 0) && c) ? TRUE : FALSE)
+#define ISHAL(c) (((c) && (strchr(hal_chars,(c)) != 0)) ? TRUE : FALSE)
 
-#define CLRVADATA wid=top=bot=dep=rldep=fbar=fwh=bwh=ra=ya=bs=vaflg=0
+void
+clr_vadata(void)
+{
+  wid=0;
+  top=0;
+  bot=0;
+  dep=0;
+  rldep=0;
+  fbar=0;
+  fwh=0;
+  bwh=0;
+  ra=0;
+  ya=0;
+  bs=0;
+  vaflg=0;
+}
 
-#define CLRFLAGS \
-ac_hook=post_ra=pre_ra=virama=bindu=candrabindu=accent=hal_flag=post_ya=0
+#define CLRVADATA clr_vadata()
 
-#define VA(p,q,r,s,t,u,v,w,x,y,z) \
+void
+clr_flags(void)
+{
+  ac_hook=0;
+  post_ra=0;
+  pre_ra=0;
+  virama=0;
+  bindu=0;
+  candrabindu=0;
+  accent=0;
+  hal_flag=0;
+  post_ya=0;
+}
+
+#define CLRFLAGS clr_flags();
+
+#define VA(p,q,r,s,t,u,v,w,x,y,z) do { \
 wid+=p; top=q; bot=r; dep=s; rldep=t; if(!vaflg){fbar=u; fwh=v;} bwh=w; \
-ra=x; ya=y; strcat(work,z); vaflg++;
+ra=x; ya=y; strcat(work,z); vaflg++; } while (0)
 
 void sktword(void)
 { char c;
@@ -909,7 +961,7 @@
 {
   switch(c)
   {  case '0':                     VA(12,0,0, 0,0,0, 3,2,0,0,"0");  break;
-     case '1':   if (option[61]) { VA(12,0,0, 0,0,0, 2,3,0,0,"@1"); break;}
+     case '1':   if (option[61]) { VA(12,0,0, 0,0,0, 2,3,0,0,"@1"); break; }
                  else            { VA(12,0,0, 0,0,0, 3,2,0,0,"1");  break; }
      case '2':                     VA(12,0,0, 0,0,0, 2,2,0,0,"2");  break;
      case '3':                     VA(12,0,0, 0,0,0, 2,2,0,0,"3");  break;
@@ -920,12 +972,12 @@
                  else            { VA(12,0,0, 0,0,0, 3,2,0,0,"5");  break; }
      case '6':   if (option[66]) { VA(12,0,0, 0,0,0, 3,3,0,0,"@6"); break; }
                  else            { VA(12,0,0, 0,0,0, 2,2,0,0,"6");  break; }
-     case '7':                     VA(12,0,0, 0,0,0, 2,2,0,0,"7");  break;
+     case '7':                   { VA(12,0,0, 0,0,0, 2,2,0,0,"7");  break; }
      case '8':   if (option[68]) { VA(12,0,0, 0,0,0, 2,2,0,0,"@8"); break; }
-                 else              VA(12,0,0, 0,0,0, 2,3,0,0,"8");  break;
+                 else            { VA(12,0,0, 0,0,0, 2,3,0,0,"8");  break; }
      case '9':   if (option[79]) { VA(12,0,5, 0,0,0, 2,3,0,0,"@2"); break; }
                  if (option[69]) { VA(12,0,5, 0,0,0, 2,3,0,0,"@9"); break; }
-                 else              VA(12,0,5, 0,0,0, 2,3,0,0,"9");  break;
+                 else            { VA(12,0,5, 0,0,0, 2,3,0,0,"9");  break; }
      case '-':   if (option[10] == 0) break;      /* discretionary hyphen */
                  switch (whiteness)
                    {  case 2: strcat(tmp,".");  break;
@@ -1012,7 +1064,7 @@
      case 'H':   VA( 7,0,0, 0,0,0, 3,6,0,0,"H");          /* visarga              */
                  if (interspace==5) {strcat(work,"\\ZS{2}"); break;}
                  if (interspace>5) {strcat(work,"\\ZS{4}"); break;}
-     case 'Y':   VA(12,0,0, 0,0,0, 2,3,0,0,"Y");  break;  /* avagraha             */
+     case 'Y':   VA(12,0,0, 0,0,0, 2,3,0,0,"Y");  /* avagraha             */
                  if (whiteness < 3) { CAT(tmp,"\\ZS{",2*(3-whiteness),"}"); }
                  break;
      case '$':   if (option[61]) {
@@ -1036,7 +1088,7 @@
      default:  error("Lost in single()",-1);
   }
   if ( (ac_char != '\26' ) && ( whiteness < 7) )
-     { if (strchr("iIuUxXwWeE",ac_char) && ac_char)
+     { if (ac_char && strchr("iIuUxXwWeE",ac_char))
        { switch (interspace - whiteness - fwh)
          { case 1: strcat(tmp,"."); break;
            case 2: strcat(tmp,":"); break;
@@ -1125,7 +1177,7 @@
 (ac_hook=='e' || ac_hook=='E' || pre_ra || bindu || candrabindu)
 
 #define TOPACCENT \
-(strchr("!(\":;<=>?\27",accent) && accent)
+(accent && strchr("!(\":;<=>?\27",accent))
 
 #define BOTHOOKS \
 (virama || c=='U' || c=='X' || c=='W')
@@ -1135,7 +1187,7 @@
   accent = bindu = candrabindu = 0;
   c = *s_ptr;
   if (c == '#') { candrabindu = TRUE; c = *++s_ptr; }
-  if (strchr("!(\"&:;<=>?\27\30\31\32\33\34\35\36",c) && c)
+  if (c && strchr("!(\"&:;<=>?\27\30\31\32\33\34\35\36",c))
      { accent = c; c = *++s_ptr; }
   if (c == '#') { candrabindu = TRUE; c = *++s_ptr; }
   if ( (c == 'M') || (c == 'R') ) { bindu = TRUE; c = *++s_ptr; }
@@ -1183,8 +1235,8 @@
      { t = 0; if (option[4]) t = 8; if (option[5]) t = 12;
               if (option[4] && option[5]) t = 16;
        if (t < v) t = v;
-       if (    (strchr("eioEIO",ac_char) && ac_char)
-            && (strchr("=>?\"\27",accent)  && accent)  )
+       if (    (ac_char && strchr("eioEIO",ac_char) )
+            && (accent && strchr("=>?\"\27",accent) )  )
           { v=8; if ((accent=='\"') || (accent=='\27')) v=3; }
        if (t < v) t = v;
        if (t)   { CAT(work,"\\ZV{",t,"}{"); }
@@ -1294,7 +1346,7 @@
        if (v) strcat(work,"}");
        if (bot) strcat(work,"}");
      }
-  if ( (strchr("&\30\31\32\33\34\35\36",accent) && accent) || (*s_ptr=='%') )
+  if ( (accent && strchr("&\30\31\32\33\34\35\36",accent)) || (*s_ptr=='%') )
      { if (dep > 2) { if (v<0) v=dep-2-v;
                       else v=dep-2; }
        else v=dep;
@@ -1406,7 +1458,7 @@
 /* now set ac_flag according to vowel                                         */
    if (c == 'o') ac_hook = 'e';
    if (c == 'O') ac_hook = 'E';
-   if (strchr("uUeExXwW",c) && c) ac_hook = ac_char;
+   if (c && strchr("uUeExXwW",c)) ac_hook = ac_char;
 /* finally add all flags, accents, nasals, and final vertical as necessary    */
    j=low_right; k=high_right;     /* save interference from previous syllable */
    addhooks();
@@ -1473,7 +1525,6 @@
 
 void autohyphen(void)
 {
-char *p;
    if (option[11] && *s_ptr!='\0' && ac_char
                       && !(*s_ptr=='-'  && option[10]))
       {
@@ -1513,14 +1564,14 @@
 /* LS : if (string_match && option[a]) VA;                                    */
 /* LT : if (string_match && option[a]) { if (option[b]) VA#1 else VA#2 }      */
 
-#define LS(t,u,v,w) n=strlen(t);              \
-        if((option[u]==0) && (strncmp(p,t,n)==0))  \
-          { w; p+=n; v;}
+#define LS(t,u,v,w) { size_t n;                           \
+    if((option[u]==0) && (strncmp(p,t,n=strlen(t))==0))   \
+      { w; p+=n; v;} }
 
-#define LT(t,u,v,w,x,y,z) n=strlen(t);        \
-        if((option[u]==0) && (strncmp(p,t,n)==0))  \
-          { if(option[x]==0) { w; p+=n; v; }     \
-                     else { z; p+=n; y; } }
+#define LT(t,u,v,w,x,y,z) { size_t n;                           \
+    if((option[u]==0) && (strncmp(p,t,n=strlen(t))==0))         \
+      { if(option[x]==0) { w; p+=n; v; }                        \
+        else { z; p+=n; y; } } }
 
 #define NX sam_flag = 'X'; break;
 #define NR sam_flag = 'R'; break;
@@ -1534,7 +1585,7 @@
 
 void samyoga(void)
 {
-char *p, sam_flag; int j,k,n;
+ char *p, sam_flag;
  option[0] = 0;
  sam_flag = 0;
  p = s_ptr;
@@ -1710,7 +1761,9 @@
   LS("jy",   119,NC,VA(20,0,0, 0,2,0, 1,0,6,2,"\\ZM{0Jj0djRdA}*.ay1"));
   if(*p=='j') { if (ISHAL(*(p+1)) || option[119]) {
                     VA(18,0,0, 0,0,0, 1,0,2,1,"j2"); IC; }
-              else  VA(12,3,3, 2,0,0, 1,3,3,2,"\\ZM{0Jj0djRdA}*.a"); IR; }
+              else {
+                    VA(12,3,3, 2,0,0, 1,3,3,2,"\\ZM{0Jj0djRdA}*.a"); IR; }
+              }
   LT("J",      0,NR,VA(23,0,0, 0,0,0, 0,3,2,1,"jJ"),
               42,NR,VA(25,4,4, 0,2,0, 0,1,1,2,"j1`J"));
   LT("V",      0,NC,VA( 8,0,0, 0,0,0, 1,0,3,1,":]"),
@@ -2007,9 +2060,9 @@
   LS("n",    157,NR,VA(14,3,3, 0,0,0, 0,3,2,2,"m1\\ZM{hFnaLe}:a"));
   LT("l",    158,NR,VA(13,2,1, 2,0,0, 0,1,2,6,"m1\\ZM{aLeDPEDFIhBl}+"),
               46,NR,VA(14,3,3, 5,1,0, 0,3,2,2,"m1\\ZM{aLeDdElbL}:a"));
-  if (strchr("mr",*p) && *p)
+  if (*p && strchr("mr",*p))
                   { VA(10,0,0, 0,1,0, 0,0,4,1,"m"); NC; }
-  if (strchr("lbByv",*p) && *p)
+  if (*p && strchr("lbByv",*p))
                   { VA( 9,0,0, 0,0,0, 0,0,1,1,"m1"); NC; }
   if (ISHAL(*p))  { VA(10,0,0, 0,3,0, 0,0,4,1,"m1\\ZM{cLe}."); NC; }
                     VA(10,0,0, 0,1,0, 0,0,4,1,"m"); NC;
@@ -2032,10 +2085,10 @@
               strcat(work,"\\ZH{-6}{<}");IC;}
   NC;
 
-case 'r':
-  j=0;
+case 'r': {
+  int j=0;
   if (ra)
-     { k=dep;
+     { int k=dep;
        if (ra==5) k-=3;
        if (bot) j++; if (k) j+=2;
        switch (j)
@@ -2060,6 +2113,7 @@
       if(*p=='u') { VA( 8,5,4, 0,0,1, 0,0,0,0,"r8"); *p='a'; NX; }
       if(*p=='U') { VA(10,7,6, 0,0,1, 0,1,0,0,"r9"); *p='a'; NX; }
                     VA( 6,3,1, 0,0,1, 0,2,0,0,"="); NX; }
+}
 
 case 'l':
   if (option[160]==0) {
@@ -2143,9 +2197,9 @@
   LS("nv",   170,NR,VA(19,3,3, 0,2,1, 0,3,6,2,"=\\ZM{fMo0HnHMu}*:a"));
   LS("n",    170,NR,VA(12,0,0, 0,1,1, 0,0,2,1,"=+:\\ZM{rMolHneHegMi}"));
   LS("r",      0,NC,VA(11,0,0, 0,0,1, 0,0,2,1,"s1\\ZM{aLeDDr}:"));
-  if (strchr("sm",*p) && *p) {
+  if (*p && strchr("sm",*p)) {
                     VA(10,0,0, 0,0,1, 0,0,2,1,"s"); NC; }
-  if (strchr("GZCJqNdDpPBrZSh",*p) && *p) {
+  if (*p && strchr("GZCJqNdDpPBrZSh",*p)) {
                     VA(10,0,0, 0,0,1, 0,0,2,1,"s1\\ZM{cLe}."); NC; }
   if (ISHAL(*p))  { VA( 9,0,0, 0,0,1, 0,0,2,1,"s1"); NC; }
                     VA(10,0,0, 0,0,1, 0,0,2,1,"s"); NC;
@@ -2173,7 +2227,7 @@
                     VA(10,0,0, 0,2,0, 0,0,2,1,"L2");  NC; }
                     if(ISHAL(*p)) {
                     VA(11,0,0, 0,0,0, 0,0,2,1,"L2."); NC; }
-               else VA(10,0,0, 0,2,0, 0,0,2,1,"L2");  NC; }
+               else { VA(10,0,0, 0,2,0, 0,0,2,1,"L2"); NC; } }
   if(ISHAL(*p))   { VA(10,3,3, 0,0,0, 0,0,3,1,"L1");  NC; }
                     VA(10,3,3, 0,3,0, 0,0,3,1,"L" );  NX;
 
@@ -2207,19 +2261,26 @@
 
 /* Function: transliterate contents of sktbuf, output result in outbuf        */
 
-#define SWITCHFLAG(Y,Z) switch(flag)                                        \
-            {  case 0: strcat(outbuf,Y); break;                             \
-               case 1: if (tech) strcat(outbuf,"\\ZX{"); strcat(outbuf,Z);  \
-                       if (tech) strcat(outbuf,"}"); break;                 \
-               case 2: strcat(outbuf,"\\ZW{"); strcat(outbuf,Y);            \
-                       strcat(outbuf,"}"); break;                           \
-               case 3: strcat(outbuf,"\\ZY{"); strcat(outbuf,Z);            \
-                       strcat(outbuf,"}"); break;                           \
-             } flag=0
+void
+switch_flag(char const * Y, char const * Z, int * flag) {
+  switch (*flag) {
+  case 0: strcat(outbuf,Y); break;
+  case 1: if (tech) strcat(outbuf,"\\ZX{"); strcat(outbuf,Z);
+    if (tech) strcat(outbuf,"}"); break;
+  case 2: strcat(outbuf,"\\ZW{"); strcat(outbuf,Y);
+    strcat(outbuf,"}"); break;
+  case 3: strcat(outbuf,"\\ZY{"); strcat(outbuf,Z);
+    strcat(outbuf,"}"); break;
+  }
+  *flag=0;
+}
 
+#define SWITCHFLAG(Y,Z) switch_flag((Y), (Z), &flag)
+
+
 #define XLIT(X,Y,Z) case X: SWITCHFLAG(Y,Z); break
 
-#define STACK(X,Y,Z) case X: ISTACK(X,Y,Z)
+#define STACK(X,Y,Z) case X: ISTACK(X,Y,Z); break
 
 #define ISTACK(X,Y,Z) c=0; if(*p=='#'){c+=30; if(option[38]) c+=30; p++;}  \
          switch(*p)                                                        \
@@ -2240,8 +2301,8 @@
            else { if(option[11] && (*p!='\0') && !(*p=='-' && option[10])) \
                       strcat(outbuf,"\\-"); }                              \
          }                                                                 \
-         break
 
+
 #define NASAL(X,Y,Z) case X: if (*p == '#') strcat(outbuf,"\\~{");         \
                              SWITCHFLAG(Y,Z);                              \
                              if (*p == '#') { strcat(outbuf,"}"); p++; }   \
@@ -2330,9 +2391,9 @@
 
    /* now for the vowels with stacked nasal and accent                     */
 
-   case 'i': if (strchr("!`'\"(#\27",*p) && *p) { ISTACK('i',"{\\i}","I"); }
+   case 'i': if (*p && strchr("!`'\"(#\27",*p)) { ISTACK('i',"{\\i}","I"); }
              else { ISTACK('i',"i","I"); } break;
-   case 'E': if (strchr("!`'\"(#\27",*p) && *p) { ISTACK('E',"{a\\i}","AI"); }
+   case 'E': if (*p && strchr("!`'\"(#\27",*p)) { ISTACK('E',"{a\\i}","AI"); }
              else { ISTACK('E',"ai","AI"); } break;
 
 
@@ -2346,7 +2407,7 @@
 
    case 'w': if (option[26])
              { save = flag; SWITCHFLAG("lr\\llap{\\d{\\kern.51em}}","L\\d R");
-               flag = save; if ( strchr("!\"#$%&'():;<=>?`",*p) && *p)
+               flag = save; if ( *p && strchr("!\"#$%&'():;<=>?`",*p))
                                { ISTACK('w',"{\\i}","I"); break; }
                             ISTACK('w',"i","I"); break; }
              ISTACK('w',"\\d l","\\d L"); break;
@@ -2358,7 +2419,7 @@
 
    case 'x': if (option[25])
              { save = flag; SWITCHFLAG("r\\llap{\\d{\\kern.51em}}","\\d R");
-               flag = save; if (strchr("!\"#$%&'():;<=>?`",*p) && *p)
+               flag = save; if (*p && strchr("!\"#$%&'():;<=>?`",*p))
                                { ISTACK('x',"{\\i}","I"); break; }
                             ISTACK('x',"i","I"); break; }
              ISTACK('x',"r\\llap{\\d{\\kern.51em}}","\\d R"); break;

Modified: trunk/Master/tlpkg/libexec/ctan2tds
===================================================================
--- trunk/Master/tlpkg/libexec/ctan2tds	2022-09-24 20:16:14 UTC (rev 64496)
+++ trunk/Master/tlpkg/libexec/ctan2tds	2022-09-24 20:26:22 UTC (rev 64497)
@@ -1259,6 +1259,7 @@
  'sae',         "die 'skipping, nosell license'",
  'saferef',     "die 'skipping, nonfree license'",
  'sagetex',     "die 'skipping, omitted at author request (25 Jan 2010 19:50:16)'",
+ 'sanskrit',	"&MAKEflatten",
  'sansmathaccent',      "&MAKEflatten",
  'sansmathfonts',       "&MAKEflatten",
  'scholax',		"&MAKEflatten",
@@ -1746,6 +1747,7 @@
  'pxbase'               => '&POSTpxbase',
  'pxchfon'              => '&POSTpxchfon',
  'recipebook'		=> '&POST_rmsymlink',
+ 'sanskrit'		=> '&POSTsanskrit',
  'schule'		=> '&POSTschule',
  'scontents'		=> '&POSTscontents',
  'shipunov'		=> '&POSTshipunov',
@@ -3755,7 +3757,6 @@
  'psnfss'	=> $standardclean . '|8r\.enc$',	# already in dvips
  'purifyeps'    => 'purifyeps.pdf',
  'revtex'       => '00readme.tex|DOWNLOAD|README',      # already in doc
- 'sanskrit'     => 'ps-type1|sktdoc.ps',          # symlink, pdf in sanskrit-t1
  'suftesi'      => 'example/MaterialeInizialeFinale/.DS_Store',
  'swfigure'	=> $standardclean . '|#README.txt#',
  'tds'		=> 'NULL',                              # preserve .dvi
@@ -7262,6 +7263,11 @@
   &SYSTEM ("$MV $srcdir/*.sfd $sfddir/");
 }
 
+sub POSTsanskrit {
+  print "POST$package - rm leftovers\n";
+  &SYSTEM ("$RM sktdoc.ps ps-type1/sktdoc.pdf && rmdir ps-type1");
+}
+
 sub POSTschule {
   print "POST$package - move additional files\n";
   &mv_with_mkdir ("latex/* data/*", "$DEST/tex/latex/$package");

Modified: trunk/Master/tlpkg/tlpsrc/sanskrit.tlpsrc
===================================================================
--- trunk/Master/tlpkg/tlpsrc/sanskrit.tlpsrc	2022-09-24 20:16:14 UTC (rev 64496)
+++ trunk/Master/tlpkg/tlpsrc/sanskrit.tlpsrc	2022-09-24 20:26:22 UTC (rev 64497)
@@ -0,0 +1 @@
+execute addMixedMap skt.map



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