[BACK]Return to mklookup.c CVS log [TXT][DIR] Up to [local] / OpenXM / src / kan96xx / Kan

File: [local] / OpenXM / src / kan96xx / Kan / mklookup.c (download)

Revision 1.5, Sun Jul 3 11:08:54 2005 UTC (18 years, 11 months ago) by ohara
Branch: MAIN
CVS Tags: R_1_3_1-2, RELEASE_1_3_1_13b, RELEASE_1_2_3_12, KNOPPIX_2006, DEB_REL_1_2_3-9
Changes since 1.4: +2 -1 lines

Fixed grammatical problem for gcc4.

/* $OpenXM: OpenXM/src/kan96xx/Kan/mklookup.c,v 1.5 2005/07/03 11:08:54 ohara Exp $ */
#include <stdio.h>
#include <stdlib.h>
#include "datatype.h"
#include "stackm.h"

/* Refer to global.c. You need to keep the orders of names and values */
main() {
  int i,j;
  char *names[]={"Snull","Sinteger","Sstring","SexecutableArray","Soperator",
                 "Sdollar","Sarray","SleftBraceTag","SrightBraceTag","Spoly",
                 "SarrayOfPOLY","SmatrixOfPOLY","Slist","Sfile","Sring",
                 "SuniversalNumber","SrationalFunction","Sclass","Sdouble",
                 "SbyteArray"};
  int values[]={Snull,Sinteger,Sstring,SexecutableArray,Soperator,
                Sdollar,Sarray,SleftBraceTag,SrightBraceTag,Spoly,
                SarrayOfPOLY,SmatrixOfPOLY,Slist,Sfile,Sring,
                SuniversalNumber,SrationalFunction,Sclass,Sdouble,
                SbyteArray};
  for (i=0; i<TYPES; i++) {
    if (values[i] != i) {
      fprintf(stderr,"Errors in names and values\n");
      exit(100);
    }
    for (j=0; j<TYPES; j++) {
      printf("#define %s%s %d\n",names[i],names[j],values[i]*TYPES+values[j]);
    }
  }
  exit(0);
}