/[cvs]/stack/stack.h
ViewVC logotype

Diff of /stack/stack.h

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

revision 1.21 by teddy, Sat Mar 30 02:31:24 2002 UTC revision 1.25 by masse, Fri Aug 8 14:20:49 2003 UTC
# Line 22  Line 22 
22    
23  #define HASHTBLSIZE 2048  #define HASHTBLSIZE 2048
24    
25    #define CAR(X) ((X)->content.c->car)
26    #define CDR(X) ((X)->content.c->cdr)
27    
28    /* printf, sscanf, fgets, fprintf, fopen, perror */
29    #include <stdio.h>
30    /* exit, EXIT_SUCCESS, malloc, free */
31    #include <stdlib.h>
32    /* NULL */
33    #include <stddef.h>
34    /* dlopen, dlsym, dlerror */
35    #include <dlfcn.h>
36    /* strcmp, strcpy, strlen, strcat, strdup */
37    #include <string.h>
38    /* getopt, STDIN_FILENO, STDOUT_FILENO, usleep */
39    #include <unistd.h>
40    /* EX_NOINPUT, EX_USAGE */
41    #include <sysexits.h>
42    /* assert */
43    #include <assert.h>
44    /* waitpid */
45    #include <sys/wait.h>
46    
47    #ifdef __linux__
48    /* mtrace, muntrace */
49    #include <mcheck.h>
50    /* ioctl */
51    #include <sys/ioctl.h>
52    /* KDMKTONE */
53    #include <linux/kd.h>
54    #endif /* __linux__ */
55    
56    
57    
58  /* First, define some types. */  /* First, define some types. */
59    
60  struct cons_struct;  struct cons_struct;
61  struct symbol_struct;  struct symbol_struct;
62    struct environment_struct;
63    
64    /* A type for pointers to external functions */
65    typedef void (*funcp)(struct environment_struct*);
66    /* funcp is a pointer to a void function (environment *) */
67    
68  /* A value of some type */  /* A value of some type */
69  typedef struct {  typedef struct {
# Line 55  typedef struct { Line 93  typedef struct {
93      FILE *p;                    /* ...or an I/O stream */      FILE *p;                    /* ...or an I/O stream */
94      int i;                      /* ...or an integer */      int i;                      /* ...or an integer */
95      float f;                    /* ...or a floating point number */      float f;                    /* ...or a floating point number */
96        funcp func;                 /* ...or a function pointer */
97        char *string;               /* ...or a string */
98    } content;                    /* Stores a pointer or an integer */    } content;                    /* Stores a pointer or an integer */
99    
100  } value;  } value;
# Line 102  typedef struct { Line 142  typedef struct {
142    int gc_count;                 /* Amount currently allocated */    int gc_count;                 /* Amount currently allocated */
143  } environment;  } environment;
144    
 /* A type for pointers to external functions */  
 typedef void (*funcp)(environment*); /* funcp is a pointer to a void  
                                          function (environment *) */  
145    
146  void init_env(environment*);  void init_env(environment*);
147  void printerr(const char*);  void printerr(const char*);

Legend:
Removed from v.1.21  
changed lines
  Added in v.1.25

root@recompile.se
ViewVC Help
Powered by ViewVC 1.1.26