version 1.3, 2001/05/04 01:06:24 |
version 1.6, 2020/10/06 11:33:46 |
|
|
/* $OpenXM: OpenXM/src/kan96xx/Kan/mklookup.c,v 1.2 2000/01/16 07:55:39 takayama Exp $ */ |
/* $OpenXM: OpenXM/src/kan96xx/Kan/mklookup.c,v 1.5 2005/07/03 11:08:54 ohara Exp $ */ |
#include <stdio.h> |
#include <stdio.h> |
|
#include <stdlib.h> |
#include "datatype.h" |
#include "datatype.h" |
#include "stackm.h" |
#include "stackm.h" |
|
|
/* Refer to global.c. You need to keep the orders of names and values */ |
/* Refer to global.c. You need to keep the orders of names and values */ |
main() { |
int main() { |
int i,j; |
int i,j; |
char *names[]={"Snull","Sinteger","Sstring","SexecutableArray","Soperator", |
char *names[]={"Snull","Sinteger","Sstring","SexecutableArray","Soperator", |
"Sdollar","Sarray","SleftBraceTag","SrightBraceTag","Spoly", |
"Sdollar","Sarray","SleftBraceTag","SrightBraceTag","Spoly", |
"SarrayOfPOLY","SmatrixOfPOLY","Slist","Sfile","Sring", |
"SarrayOfPOLY","SmatrixOfPOLY","Slist","Sfile","Sring", |
"SuniversalNumber","SrationalFunction","Sclass","Sdouble"}; |
"SuniversalNumber","SrationalFunction","Sclass","Sdouble", |
|
"SbyteArray"}; |
int values[]={Snull,Sinteger,Sstring,SexecutableArray,Soperator, |
int values[]={Snull,Sinteger,Sstring,SexecutableArray,Soperator, |
Sdollar,Sarray,SleftBraceTag,SrightBraceTag,Spoly, |
Sdollar,Sarray,SleftBraceTag,SrightBraceTag,Spoly, |
SarrayOfPOLY,SmatrixOfPOLY,Slist,Sfile,Sring, |
SarrayOfPOLY,SmatrixOfPOLY,Slist,Sfile,Sring, |
SuniversalNumber,SrationalFunction,Sclass,Sdouble}; |
SuniversalNumber,SrationalFunction,Sclass,Sdouble, |
|
SbyteArray}; |
for (i=0; i<TYPES; i++) { |
for (i=0; i<TYPES; i++) { |
if (values[i] != i) { |
if (values[i] != i) { |
fprintf(stderr,"Errors in names and values\n"); |
fprintf(stderr,"Errors in names and values\n"); |
exit(100); |
return 100; |
} |
} |
for (j=0; j<TYPES; j++) { |
for (j=0; j<TYPES; j++) { |
printf("#define %s%s %d\n",names[i],names[j],values[i]*TYPES+values[j]); |
printf("#define %s%s %d\n",names[i],names[j],values[i]*TYPES+values[j]); |
} |
} |
} |
} |
exit(0); |
return 0; |
} |
} |
|
|
|
|