Changeset 31b3e3 in git


Ignore:
Timestamp:
Feb 18, 2011, 3:49:33 PM (13 years ago)
Author:
Hans Schoenemann <hannes@…>
Branches:
(u'spielwiese', '8e0ad00ce244dfd0756200662572aef8402f13d5')
Children:
119f3c13436d65f9d45ceb051a817450ff123d5b
Parents:
bb15ce7f360a27d441e6c9061f3cd56e5ffe00e2
Message:
gentable may produce convert_table.texi

git-svn-id: file:///usr/local/Singular/svn/trunk@13870 2c84dea3-7e68-4137-9b89-c4e89433aadc
File:
1 edited

Legend:

Unmodified
Added
Removed
  • Singular/gentable.cc

    rbb15ce7 r31b3e3  
    1818#include <Singular/tok.h>
    1919#include <Singular/grammar.h>
     20
     21// to produce convert_table.texi for doc:
     22//#define CONVERT_TABLE 1
    2023
    2124  #define ALLOW_PLURAL     1
     
    345348/*-------------------------------------------------------------------*/
    346349  fprintf(outfile,"/*---------------------------------------------*/\n");
     350  #ifdef CONVERT_TABLE
     351  FILE *doctable=fopen("convert_table.texi","w");
     352  fprintf(doctable,"@multitable @columnfractions .05 .18 .81\n");
     353  int doc_nr=1;
     354  #endif
    347355  for (j=257;j<=MAX_TOK+1;j++)
    348356  {
     
    354362        fprintf(outfile,"// convert %s -> %s\n",
    355363          Tok2Cmdname(i), Tok2Cmdname(j));
     364  #ifdef CONVERT_TABLE
     365        fprintf(doctable,
     366        "@item\n@   %d. @tab @code{%s}  @tab @expansion{} @code{%s}\n",
     367        doc_nr,Tok2Cmdname(i),Tok2Cmdname(j));
     368        doc_nr++;
     369  #endif
    356370        if (j==ANY_TYPE) break;
    357371      }
    358372    }
    359373  }
     374  #ifdef CONVERT_TABLE
     375  fprintf(doctable,"@end multitable\n");
     376  fclose(doctable);
     377  #endif
    360378  fprintf(outfile,"/*---------------------------------------------*/\n");
    361379  char ops[]="=><+*/[.^,%(;";
Note: See TracChangeset for help on using the changeset viewer.