Home My Page Projects Code Snippets Project Openings SML/NJ
Summary Activity Forums Tracker Lists Tasks Docs Surveys News SCM Files

SCM Repository

[smlnj] Annotation of /sml/trunk/src/runtime/config/gen.h
ViewVC logotype

Annotation of /sml/trunk/src/runtime/config/gen.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 651 - (view) (download) (as text)

1 : monnier 249 /* gen.h
2 :     *
3 :     * COPYRIGHT (c) 1994 by AT&T Bell Laboratories.
4 :     */
5 :    
6 :     #ifndef _GEN_COMMON_
7 :     #define _GEN_COMMON_
8 :    
9 :     #include <stdio.h>
10 :    
11 :     extern FILE *OpenFile (char *fname, char *flag);
12 :     extern void CloseFile (FILE *f, char *flag);
13 :    
14 :     #ifndef _ML_BASE_
15 :     /* nil pointers */
16 :     #define NIL(ty) ((ty)0)
17 :    
18 :     /* aliases for malloc/free, so that we can easily replace them */
19 :     #define MALLOC(sz) malloc(sz)
20 :     #define FREE(p) free(p)
21 :    
22 :     /* Allocate a new C object of type t. */
23 :     #define NEW_OBJ(t) ((t *)MALLOC(sizeof(t)))
24 :     /* Allocate a new C array of type t objects. */
25 :     #define NEW_VEC(t,n) ((t *)MALLOC((n)*sizeof(t)))
26 :     #endif /* !_ML_BASE_ */
27 :    
28 :     #endif /* !_GEN_COMMON_ */
29 :    

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