Home My Page Projects Code Snippets Project Openings 3D graphics for Standard ML
Summary Activity SCM

SCM Repository

[sml3d] Diff of /src/fi-gen/ml-gen.h
ViewVC logotype

Diff of /src/fi-gen/ml-gen.h

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 165, Tue Jun 3 16:47:12 2008 UTC revision 166, Tue Jun 3 16:48:02 2008 UTC
# Line 47  Line 47 
47  extern void prSize (const char *ty, size_t sz);  extern void prSize (const char *ty, size_t sz);
48  extern void prOffset (const char *ty, const char *fld, off_t off);  extern void prOffset (const char *ty, const char *fld, off_t off);
49  extern void prIndex (const char *ty, const char *fld, off_t off, size_t fldSz);  extern void prIndex (const char *ty, const char *fld, off_t off, size_t fldSz);
50  extern void prConst (const char *name, const char *mlTy, int val);  extern void prConst (const char *name, CType_t ty, int val);
51    
52  #define SIZE(ty)        prSize(#ty, sizeof(ty))  #define SIZE(ty)        prSize(#ty, sizeof(ty))
53  #define OFFSET(ty, fld) prOffset(#ty, #fld, offsetof(ty, fld))  #define OFFSET(ty, fld) prOffset(#ty, #fld, offsetof(ty, fld))
54  #define INDEX(ty, fld)  prIndex(#ty, #fld, offsetof(ty, fld), sizeof(((ty *)0)->fld[0]));  #define INDEX(ty, fld)  prIndex(#ty, #fld, offsetof(ty, fld), sizeof(((ty *)0)->fld[0]));
55  #define CONST(c)        prConst(#c, "Word32.word", c);  #define CONST(c)        prConst(#c, U32, c);
56  #define SCONST(c)       prConst(#c, "Int32.int", c);  #define SCONST(c)       prConst(#c, S32, c);
57    
58  #define BEGIN_STRUCT(ty)        {                               \  #define BEGIN_STRUCT(ty)        {                               \
59          printf("    structure %s =\n", #ty);                    \          printf("    structure %s =\n", #ty);                    \

Legend:
Removed from v.165  
changed lines
  Added in v.166

root@smlnj-gforge.cs.uchicago.edu
ViewVC Help
Powered by ViewVC 1.0.0