Changeset eeaeffb in git


Ignore:
Timestamp:
Jul 1, 2014, 1:07:05 PM (10 years ago)
Author:
Hans Schoenemann <hannes@…>
Branches:
(u'spielwiese', 'fe61d9c35bf7c61f2b6cbf1b56e25e2f08d536cc')
Children:
491e80d5863c880870541275ea8e25bc3775e67c
Parents:
68ca413b32be2764e9beed001e3515c6ff600db1
Message:
seperate gneration of .inc and doc files in gentable
Location:
Singular
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • Singular/Makefile.am

    r68ca41 reeaeffb  
    237237                gftables MOD
    238238
    239 CLEANFILES = $(BUILT_SOURCES) $(EXTRA_PROGRAMS) convert_table.texi
     239CLEANFILES = $(BUILT_SOURCES) $(EXTRA_PROGRAMS)
    240240
    241241clean-local:
  • Singular/gentable.cc

    r68ca41 reeaeffb  
    2222
    2323// to produce convert_table.texi for doc:
    24 #define CONVERT_TABLE 1
     24int produce_convert_table=0;
    2525
    2626// bits 0,1 for PLURAL
     
    223223  }
    224224  /* pCmdR->tokval==-1, pCmdR goes at the end */
    225   if(pCmdR->tokval==-1) 
     225  if(pCmdR->tokval==-1)
    226226  { free(ls);free(rs);return -1;}
    227227
     
    395395/*-------------------------------------------------------------------*/
    396396  fprintf(outfile,"/*---------------------------------------------*/\n");
    397   #ifdef CONVERT_TABLE
    398   FILE *doctable=fopen("convert_table.texi","w");
    399   fprintf(doctable,"@multitable @columnfractions .05 .18 .81\n");
     397  FILE *doctable;
     398  if (produce_convert_table)
     399  {
     400    doctable=fopen("convert_table.texi","w");
     401    fprintf(doctable,"@multitable @columnfractions .05 .18 .81\n");
     402  }
    400403  int doc_nr=1;
    401   #endif
    402404  for (j=257;j<=MAX_TOK+1;j++)
    403405  {
     
    409411        fprintf(outfile,"// convert %s -> %s\n",
    410412          Tok2Cmdname(i), Tok2Cmdname(j));
    411   #ifdef CONVERT_TABLE
    412         fprintf(doctable,
    413         "@item\n@   %d. @tab @code{%s}  @tab @expansion{} @code{%s}\n",
    414         doc_nr,Tok2Cmdname(i),Tok2Cmdname(j));
    415         doc_nr++;
    416   #endif
     413        if (produce_convert_table)
     414        {
     415          fprintf(doctable,
     416          "@item\n@   %d. @tab @code{%s}  @tab @expansion{} @code{%s}\n",
     417          doc_nr,Tok2Cmdname(i),Tok2Cmdname(j));
     418          doc_nr++;
     419        }
    417420        if (j==ANY_TYPE) break;
    418421      }
    419422    }
    420423  }
    421   #ifdef CONVERT_TABLE
    422   fprintf(doctable,"@end multitable\n");
    423   fclose(doctable);
    424   #endif
     424  if (produce_convert_table)
     425  {
     426    fprintf(doctable,"@end multitable\n");
     427    fclose(doctable);
     428  }
    425429  fprintf(outfile,"/*---------------------------------------------*/\n");
    426430  char ops[]="=><+*/[.^,%(;";
     
    893897  if (argc>1)
    894898  {
     899    produce_convert_table=1; /* for ttGen1 */
     900    ttGen1();
     901    unlink(iparith_inc);
    895902    ttGen4();
    896903    ttGen2c();
Note: See TracChangeset for help on using the changeset viewer.