C:/Users/Dennis/src/lang/russell.orig/src/stree/kindname.c

Go to the documentation of this file.
00001 # include "parm.h"
00002 # include "stree/ststructs.mh"
00003 
00004 # ifdef MAIN
00005 
00006 #   include <stdio.h>
00007 #   include "stree/stformats.h"
00008 #   undef dbgmsg
00009 #   define dbgmsg printf
00010 
00011 char * kindname();
00012 /*
00013  *  Driver for kind program.
00014  */
00015 main(argc,argv)
00016 int argc;
00017 char **argv;
00018 {
00019     printf("kind name = %s\n", kindname(atoi(argv[1])));
00020 }
00021 # else
00022 
00023 /* typedescr[] is declared elsewhere */
00024     extern char *typedescr[];
00025 
00026 # endif
00027 
00028 
00029 
00030 /*
00031  *  kindname(kind)
00032  *
00033  *      Return a pointer to an English description of the node kind.
00034  */
00035 char * kindname(kindno)
00036 int kindno;
00037 {
00038     if ( kindno < 0 || kindno > LASTKINDVALUE ) {
00039                 return ("unknown kind");
00040     } else
00041         return ( typedescr[2*kindno] );
00042 }
00043 
00044 

Generated on Fri Jan 25 10:39:48 2008 for russell by  doxygen 1.5.4