Changeset fefe03 in git


Ignore:
Timestamp:
Apr 28, 2005, 7:10:57 PM (19 years ago)
Author:
Hans Schönemann <hannes@…>
Branches:
(u'fieker-DuVal', '117eb8c30fc9e991c4decca4832b1d19036c4c65')(u'spielwiese', 'b4f17ed1d25f93d46dbe29e4b499baecc2fd51bb')
Children:
23b5a65cf5607012698a7371986704418775654b
Parents:
cfc9c0a1f0e480d7fbfe9a32ec1bc89a904a83ba
Message:
*hannes: generate plural_cmd.inc


git-svn-id: file:///usr/local/Singular/svn/trunk@7933 2c84dea3-7e68-4137-9b89-c4e89433aadc
Location:
Singular
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • Singular/iparith.cc

    rcfc9c0 rfefe03  
    22*  Computer Algebra System SINGULAR     *
    33****************************************/
    4 /* $Id: iparith.cc,v 1.347 2005-04-27 15:15:18 Singular Exp $ */
     4/* $Id: iparith.cc,v 1.348 2005-04-28 17:10:47 Singular Exp $ */
    55
    66/*
     
    6262#include "gring.h"
    6363#define ALLOW_PLURAL    ,1
     64#define ALLOW_PLURAL_N   1
    6465#define NO_PLURAL       ,0
     66#define NO_PLURAL_N      0
    6567#define COMM_PLURAL     ,2
     68#define COMM_PLURAL_N    2
    6669#else
    6770#define ALLOW_PLURAL
     
    62506253}
    62516254#endif
     6255void ttGen4()
     6256{
     6257  FILE *outfile = myfopen("plural_cmd.inc","w");
     6258  int i;
     6259  char *old_s="";
     6260  fprintf(outfile,
     6261  "@c *****************************************\n"
     6262  "@c *  Computer Algebra System SINGULAR     *\n"
     6263  "@c *****************************************\n\n");
     6264/*-------------------------------------------------------------------*/
     6265  fprintf(outfile,"@multicolumn .45 .45\n");
     6266  int op;
     6267  i=0;
     6268  while ((op=dArith1[i].cmd)!=0)
     6269  {
     6270    if (dArith1[i].p!=jjWRONG)
     6271    {
     6272      char *s = iiTwoOps(op);
     6273      if ((s!=NULL) && (isalpha(s[0])) && (strcmp(s,old_s)!=0))
     6274      {
     6275        old_s=s;
     6276        switch (dArith1[i].valid_for_plural)
     6277        {
     6278          case NO_PLURAL_N:
     6279            fprintf(outfile,"@item @ref{%s} @tab @code{---}\n",s);
     6280            break;
     6281          case ALLOW_PLURAL_N:
     6282            fprintf(outfile,"@item @ref{%s} @tab @ref{%s (plural)}\n",s,s);
     6283            break;
     6284          case COMM_PLURAL_N:
     6285            fprintf(outfile,"@item @ref{%s} @tab %s\n",s,s);
     6286            break;
     6287        }
     6288      }
     6289    }
     6290    i++;
     6291  }
     6292  fprintf(outfile,"@c ---------------------------------------------\n");
     6293  i=0;
     6294  while ((op=dArith2[i].cmd)!=0)
     6295  {
     6296    if (dArith2[i].p!=jjWRONG2)
     6297    {
     6298      char *s = iiTwoOps(op);
     6299      if ((s!=NULL) && (isalpha(s[0])) && (strcmp(s,old_s)!=0))
     6300      {
     6301        old_s=s;
     6302        switch (dArith2[i].valid_for_plural)
     6303        {
     6304          case NO_PLURAL_N:
     6305            fprintf(outfile,"@item @ref{%s} @tab @code{---}\n",s);
     6306            break;
     6307          case ALLOW_PLURAL_N:
     6308            fprintf(outfile,"@item @ref{%s} @tab @ref{%s (plural)}\n",s,s);
     6309            break;
     6310          case COMM_PLURAL_N:
     6311            fprintf(outfile,"@item @ref{%s} @tab %s\n",s,s);
     6312            break;
     6313        }
     6314      }
     6315    }
     6316    i++;
     6317  }
     6318  fprintf(outfile,"@c ---------------------------------------------\n");
     6319  i=0;
     6320  while ((op=dArith3[i].cmd)!=0)
     6321  {
     6322    char *s = iiTwoOps(op);
     6323    if (dArith3[i].p!=jjWRONG3)
     6324    {
     6325      if ((s!=NULL) && (isalpha(s[0])) && (strcmp(s,old_s)!=0))
     6326      {
     6327        old_s=s;
     6328        switch (dArith3[i].valid_for_plural)
     6329        {
     6330          case NO_PLURAL_N:
     6331            fprintf(outfile,"@item @ref{%s} @tab @code{---}\n",s);
     6332            break;
     6333          case ALLOW_PLURAL_N:
     6334            fprintf(outfile,"@item @ref{%s} @tab @ref{%s (plural)}\n",s,s);
     6335            break;
     6336          case COMM_PLURAL_N:
     6337            fprintf(outfile,"@item @ref{%s} @tab %s\n",s,s);
     6338            break;
     6339        }
     6340      }
     6341    }
     6342    i++;
     6343  }
     6344  fprintf(outfile,"@c ---------------------------------------------\n");
     6345  i=0;
     6346  while ((op=dArithM[i].cmd)!=0)
     6347  {
     6348    char *s = iiTwoOps(op);
     6349    if ((s!=NULL) && (isalpha(s[0])) && (strcmp(s,old_s)!=0))
     6350    {
     6351        old_s=s;
     6352        switch (dArithM[i].valid_for_plural)
     6353        {
     6354          case NO_PLURAL_N:
     6355            fprintf(outfile,"@item @ref{%s} @tab @code{---}\n",s);
     6356            break;
     6357          case ALLOW_PLURAL_N:
     6358            fprintf(outfile,"@item @ref{%s} @tab @ref{%s (plural)}\n",s,s);
     6359            break;
     6360          case COMM_PLURAL_N:
     6361            fprintf(outfile,"@item @ref{%s} @tab %s\n",s,s);
     6362            break;
     6363        }
     6364    }
     6365    i++;
     6366  }
     6367  fprintf(outfile,"@c ---------------------------------------------\n");
     6368  fprintf(outfile,"@end table\n");
     6369  fclose(outfile);
     6370}
    62526371/*-------------------------------------------------------------------*/
    62536372#else
  • Singular/tesths.cc

    rcfc9c0 rfefe03  
    22*  Computer Algebra System SINGULAR     *
    33****************************************/
    4 /* $Id: tesths.cc,v 1.96 2005-02-04 14:44:12 Singular Exp $ */
     4/* $Id: tesths.cc,v 1.97 2005-04-28 17:10:57 Singular Exp $ */
    55
    66/*
     
    5757  extern void ttGen1();
    5858  extern void ttGen2();
     59  extern void ttGen4();
    5960  #ifndef __MWERKS__
    6061    extern void mpsr_ttGen(); // For initialization of (CMD, MP_COP) tables
    6162    mpsr_ttGen();
    6263  #endif
     64  ttGen4();
    6365  ttGen1();
    6466  ttGen2();
Note: See TracChangeset for help on using the changeset viewer.