Main Page   Alphabetical List   Compound List   File List   Compound Members   File Members  

lclctypes.c File Reference

#include "lclintMacros.nf"
#include "llbasic.h"

Go to the source code of this file.

Compounds

struct  Lclctype2sortType

Functions

lsymbol lclctype_toSortDebug (bits t)
lsymbol lclctype_toSort (bits t)


Function Documentation

lsymbol lclctype_toSort ( bits t )
 

Definition at line 134 of file lclctypes.c.

Referenced by makeCTypesNode().

00135 {
00136   int i;
00137   static ob_mstring Type2sortName[] =
00138     {
00139       /* _error must have underscore, LSL/LCL interface convention */
00140       "_error",                 /* TYS_NONE     */
00141       "void",                   /* TYS_VOID     */
00142       "char",                   /* TYS_CHAR     */
00143       "char",                   /* TYS_SCHAR    */
00144       "char",                   /* TYS_UCHAR    */
00145       "int",                    /* TYS_SSINT    */
00146       "int",                    /* TYS_USINT    */
00147       "int",                    /* TYS_INT      */
00148       "int",                    /* TYS_SINT     */
00149       "int",                    /* TYS_UINT     */
00150       "int",                    /* TYS_SLINT    */
00151       "int",                    /* TYS_ULINT    */
00152       "double",                 /* TYS_FLOAT    */
00153       "double",                 /* TYS_DOUBLE   */
00154       "double",                 /* TYS_LDOUBLE  */
00155       "error",                  /* TYS_ENUM     */
00156       "error",                  /* TYS_STRUCT   */
00157       "error",                  /* TYS_UNION    */
00158       "error"                   /* TYS_TYPENAME         */
00159       };
00160 
00161   int lsize = size_toInt (sizeof (lclctype2type) / sizeof (lclctype2type[0]));
00162 
00163   for (i = 0; i < lsize; i++)
00164     {
00165       if (lclctype2type[i].pt == t)
00166         {
00167           return lsymbol_fromChars (Type2sortName[(int)lclctype2type[i].ts]);
00168         }
00169     }
00170 
00171   return lsymbol_fromChars ("_error");
00172 }

lsymbol lclctype_toSortDebug ( bits t )
 

Definition at line 93 of file lclctypes.c.

00094 {
00095   int i;
00096   int lsize;
00097   static ob_mstring OLD_Type2sortName[] =
00098     {
00099       "error",                  /* TYS_NONE     */
00100       "void",                   /* TYS_VOID     */
00101       "char",                   /* TYS_CHAR     */
00102       "signed_char",            /* TYS_SCHAR    */
00103       "char",                   /* TYS_UCHAR    */
00104       "short_int",              /* TYS_SSINT    */
00105       "unsigned_short_int",     /* TYS_USINT    */
00106       "int",                    /* TYS_INT        */
00107       "int",                    /* TYS_SINT     */
00108       "unsigned_int",           /* TYS_UINT     */
00109       "long_int",               /* TYS_SLINT    */
00110       "unsigned_long_int",      /* TYS_ULINT    */
00111       "float",                  /* TYS_FLOAT    */
00112       "double",                 /* TYS_DOUBLE   */
00113       "long_double",            /* TYS_LDOUBLE  */
00114       "error",                  /* TYS_ENUM     */
00115       "error",                  /* TYS_STRUCT   */
00116       "error",                  /* TYS_UNION    */
00117       "error"                   /* TYS_TYPENAME */
00118       };
00119 
00120   lsize = size_toInt (sizeof (lclctype2type) / sizeof (lclctype2type[0]));
00121 
00122   for (i = 0; i < lsize; i++)
00123     {
00124       if (lclctype2type[i].pt == t)
00125         {
00126           return lsymbol_fromChars (OLD_Type2sortName[(int)lclctype2type[i].ts]);
00127         }
00128     }
00129   return lsymbol_fromChars ("_error");
00130 }


Generated at Fri Nov 3 18:57:59 2000 for LCLint by doxygen1.2.3 written by Dimitri van Heesch, © 1997-2000