Book logo xindy

A Flexible Indexing System


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

tex2xindy



After compiling tex2xindy for glibc2 it didn't work anymore.
Here's a patch to fix it.
-- 
Thomas Henlich
--- tex2xindy.l.fix	Tue Mar  2 18:04:49 1999
+++ tex2xindy.l	Thu May 20 18:39:16 1999
@@ -94,7 +94,7 @@
                            {
                              printf("\")) :attr \"is\" :xref (\"");
                              range = NO_RANGE;
-			     fprintf(stat, "\txref\n");
+			     if (stat) fprintf(stat, "\txref\n");
 		           BEGIN(is);
 			   }
                          else
@@ -120,7 +120,7 @@
 <encap>{RCLOSE}        { range = CLOSE_RANGE; }
 <encap>{ARGOPEN}       { /* close :attr "... */
                          printf("\" :xref (\"");
-			 fprintf(stat, "\txref\n");
+			 if (stat) fprintf(stat, "\txref\n");
 		         braces++;
 		         BEGIN(xref);
                        }
@@ -128,7 +128,7 @@
                            {ECHO; braces--;}
                          else {
 			   putchar('"');
-			   fprintf(stat, "\tlocref\n");
+			   if (stat) fprintf(stat, "\tlocref\n");
 			   switch (range) {
 			     case OPEN_RANGE : printf(" :open-range");
 			       break;
@@ -198,7 +198,7 @@
     stat = fopen(argv[1], "w");
   }
   yylex();
-  fclose(stat);
+  if (stat) fclose(stat);
 }
 
 /*