3 /* definitions of internal variables */
4 #define INT_VAR_MAIL_LEN "MAIL_LEN"
5 #define INT_VAR_LAST_EXIT "LAST_EXIT_CODE"
6 #define INT_VAR_PIPE_RES "LAST_OUTPUT"
10 void yyerror (char const *);
37 } st; /* subtree type */
40 struct tree* c; /* condition */
41 struct tree* i; /* if */
42 struct tree* e; /* else */
49 JUST_BOOL /* value only in left, no op */
54 } cond; /* binary operator */
90 struct tree* input_tree;
93 #define CC(a,b) ((a<<8)|b)
94 void* xmalloc(size_t size);
95 void* xrealloc(void* buf, size_t size);
96 char* xstrdup(const char* s);
97 void __attribute__ ((noreturn)) die(char* msg, ...);
98 void read_conf(char* filename);
158 int res; /* result */
162 int res; /* result */
181 struct list input_code;
182 struct list* var_hash;
185 int temp_varcode_start;
193 void compile(struct tree* t, struct list* where);
194 int find_var(char* name, enum var_type type, struct list* hash);
195 struct variable* get_var_struct(char* name, enum var_type type, struct list* hash);
196 int store_const(char* c);
197 struct list* new_var_hash(void);
198 int get_bucket_number(char* name);
199 void print_code(void);
210 struct list* headers;
217 void save_current_headers(struct list* hash);
218 void print_vars(struct list* hash);
219 void interp(struct list* ins, struct list* hash);
220 void free_string(char* c);
221 void __attribute__ ((noreturn)) bye(int code, char* msg, ...);
222 void set_cur_mail_length_var(int len, struct list* hash);
225 char* default_mailbox;
229 struct list* current_headers;
230 struct email* current_body;
231 struct list* make_hlist(int fd);
232 void print_headers(struct list* l);
233 struct email* get_body(int fd);
234 int deliver_local_email(char* folder, struct email* email);
235 int write_email_to_fd(int fd, struct email* email);
236 char* read_email(struct email* em);
237 void open_email(void);
240 void save_gids(void);
241 void close_mailbox(int fd, char* path, int is_default_mailbox);
242 int open_mailbox(char* path, int is_default_mailbox);
243 char* cat(char* l, char* r);