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

Diff of /stack/stack.h

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

revision 1.25 by masse, Fri Aug 8 14:20:49 2003 UTC revision 1.26 by masse, Mon Aug 11 14:31:48 2003 UTC
# Line 43  Line 43 
43  #include <assert.h>  #include <assert.h>
44  /* waitpid */  /* waitpid */
45  #include <sys/wait.h>  #include <sys/wait.h>
46    /* va_list, va_start, va_arg, va_end */
47    #include <stdarg.h>
48    
49  #ifdef __linux__  #ifdef __linux__
50  /* mtrace, muntrace */  /* mtrace, muntrace */
# Line 65  struct environment_struct; Line 67  struct environment_struct;
67  typedef void (*funcp)(struct environment_struct*);  typedef void (*funcp)(struct environment_struct*);
68  /* funcp is a pointer to a void function (environment *) */  /* funcp is a pointer to a void function (environment *) */
69    
70    enum type_enum {
71      unknown,
72      empty,                        /* The empty list */
73      integer,
74      tfloat,
75      string,
76      func,                 /* Function pointer */
77      symb,                 /* Symbol */
78      tcons,                        /* A pair of two values */
79      port                  /* An I/O port */
80    };                      /* Type of stack element */
81    
82    
83  /* A value of some type */  /* A value of some type */
84  typedef struct {  typedef struct {
85    enum {    enum type_enum type:4;
     empty,                      /* The empty list */  
     integer,  
     tfloat,  
     string,  
     func,                       /* Function pointer */  
     symb,                       /* Symbol */  
     tcons,                      /* A pair of two values */  
     port                        /* An I/O port */  
   } type:4;                     /* Type of stack element */  
86    
87    union {    union {
88      struct {      struct {
# Line 130  typedef struct { Line 136  typedef struct {
136    value *head;                  /* Head of the stack */    value *head;                  /* Head of the stack */
137    hashtbl symbols;              /* Hash table of all variable bindings */    hashtbl symbols;              /* Hash table of all variable bindings */
138    int err;                      /* Error flag */    int err;                      /* Error flag */
139      char *errsymb;
140    char *in_string;              /* Input pending to be read */    char *in_string;              /* Input pending to be read */
141    char *free_string;            /* Free this string when all input is    char *free_string;            /* Free this string when all input is
142                                     read from in_string */                                     read from in_string */
# Line 144  typedef struct { Line 151  typedef struct {
151    
152    
153  void init_env(environment*);  void init_env(environment*);
154  void printerr(const char*);  void printerr(environment*, const char*);
155  extern void toss(environment*);  extern void toss(environment*);
156  symbol **hash(hashtbl, const char*);  symbol **hash(hashtbl, const char*);
157  value* new_val(environment*);  value* new_val(environment*);
# Line 231  void assocgen(environment*, funcp); Line 238  void assocgen(environment*, funcp);
238  extern void sx_646f(environment *);  extern void sx_646f(environment *);
239  extern void sx_6f70656e(environment*);  extern void sx_6f70656e(environment*);
240  extern void sx_636c6f7365(environment*);  extern void sx_636c6f7365(environment*);
241    int check_args(environment*, ...);

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

root@recompile.se
ViewVC Help
Powered by ViewVC 1.1.26