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 */
185 struct list input_code;
186 struct list* var_hash;
189 int temp_varcode_start;
197 void compile(struct tree* t, struct list* where);
198 int find_var(char* name, enum var_type type, struct list* hash);
199 struct variable* get_var_struct(char* name, enum var_type type, struct list* hash);
200 int store_const(char* c);
201 struct list* new_var_hash(void);
202 int get_bucket_number(char* name);
203 void print_code(void);
214 struct list* headers;
221 void save_current_headers(struct list* hash);
222 void print_vars(struct list* hash);
223 void interp(struct list* ins, struct list* hash);
224 void free_string(char* c);
225 void __attribute__ ((noreturn)) bye(int code, char* msg, ...);
226 void set_cur_mail_length_var(int len, struct list* hash);
229 char* default_mailbox;
233 struct list* current_headers;
234 struct email* current_body;
235 struct list* make_hlist(int fd);
236 void new_header(char* buf, struct list* h);
237 void print_headers(struct list* l);
238 struct email* get_body(int fd);
239 int deliver_local_email(char* folder, struct email* email);
240 int write_email_to_fd(int fd, struct email* email);
241 char* read_email(struct email* em);
242 void open_email(void);
245 void save_gids(void);
246 void close_mailbox(int fd, char* path, int is_default_mailbox);
247 int open_mailbox(char* path, int is_default_mailbox);
248 char* cat(char* l, char* r);