4 /* definitions of internal variables */
5 #define INT_VAR_MAIL_LEN "MAIL_LEN"
6 #define INT_VAR_LAST_EXIT "LAST_EXIT_CODE"
7 #define INT_VAR_PIPE_RES "LAST_OUTPUT"
14 void yyerror (char const *);
41 } st; /* subtree type */
44 struct tree* c; /* condition */
45 struct tree* i; /* if */
46 struct tree* e; /* else */
53 JUST_BOOL /* value only in left, no op */
58 } cond; /* binary operator */
94 struct tree* input_tree;
97 #define CC(a,b) ((a<<8)|b)
98 void* xmalloc(size_t size);
99 void* xrealloc(void* buf, size_t size);
100 char* xstrdup(const char* s);
101 void __attribute__ ((noreturn)) die(char* msg, ...);
102 void read_conf(char* filename);
162 int res; /* result */
166 int res; /* result */
189 struct list input_code;
190 struct list* var_hash;
193 int temp_varcode_start;
194 struct vartab* var_tab;
201 void compile(struct tree* t, struct list* where);
202 int find_var(char* name, enum var_type type, struct list* hash);
203 struct variable* get_var_struct(char* name, enum var_type type, struct list* hash);
204 int store_const(char* c);
205 struct list* new_var_hash(void);
206 int get_bucket_number(char* name);
207 void print_code(void);
218 struct list* headers;
225 void save_current_headers(struct list* hash);
226 void print_vars(struct list* hash);
227 void interp(struct list* ins, struct list* hash);
228 void free_string(char* c);
229 void __attribute__ ((noreturn)) bye(int code, char* msg, ...);
230 void set_cur_mail_length_var(int len, struct list* hash);
233 char* default_mailbox;
238 struct list* current_headers;
239 struct email* current_body;
240 struct list* make_hlist(int fd);
241 void new_header(char* buf, struct list* h);
242 void print_headers(struct list* l);
243 struct email* get_body(int fd);
244 int deliver_local_email(char* folder, struct email* email);
245 int write_email_to_fd(int fd, struct email* email);
246 char* read_email(struct email* em);
247 void open_email(void);
250 void save_gids(void);
251 void close_mailbox(int fd, char* path, int is_default_mailbox);
252 int open_mailbox(char* path, int is_default_mailbox);
253 char* cat(char* l, char* r);