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

Diff for /OpenXM/src/kan96xx/Kan/mklookup.c between version 1.4 and 1.7

version 1.4, 2004/09/20 02:11:22 version 1.7, 2022/09/08 10:49:30
Line 1 
Line 1 
 /* $OpenXM: OpenXM/src/kan96xx/Kan/mklookup.c,v 1.3 2001/05/04 01:06:24 takayama Exp $ */  /* $OpenXM: OpenXM/src/kan96xx/Kan/mklookup.c,v 1.6 2020/10/06 11:33:46 takayama Exp $ */
   /*
    If you add new names, update lookup.h by
      make gen-lookup.h
   */
 #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",
Line 19  main() {
Line 24  main() {
   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;
 }  }
   
   

Legend:
Removed from v.1.4  
changed lines
  Added in v.1.7

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>