extern.h revision 1.1.1.1.4.2 1 1.1.1.1.4.2 pgoyette /* $OpenBSD: extern.h,v 1.5 2015/10/10 19:28:54 deraadt Exp $ */
2 1.1.1.1.4.2 pgoyette
3 1.1.1.1.4.2 pgoyette /*
4 1.1.1.1.4.2 pgoyette * Copyright (c) 2003, Otto Moerbeek <otto (at) drijf.net>
5 1.1.1.1.4.2 pgoyette *
6 1.1.1.1.4.2 pgoyette * Permission to use, copy, modify, and distribute this software for any
7 1.1.1.1.4.2 pgoyette * purpose with or without fee is hereby granted, provided that the above
8 1.1.1.1.4.2 pgoyette * copyright notice and this permission notice appear in all copies.
9 1.1.1.1.4.2 pgoyette *
10 1.1.1.1.4.2 pgoyette * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
11 1.1.1.1.4.2 pgoyette * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
12 1.1.1.1.4.2 pgoyette * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
13 1.1.1.1.4.2 pgoyette * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
14 1.1.1.1.4.2 pgoyette * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
15 1.1.1.1.4.2 pgoyette * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
16 1.1.1.1.4.2 pgoyette * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
17 1.1.1.1.4.2 pgoyette */
18 1.1.1.1.4.2 pgoyette
19 1.1.1.1.4.2 pgoyette #include <stdbool.h>
20 1.1.1.1.4.2 pgoyette #include "bcode.h"
21 1.1.1.1.4.2 pgoyette
22 1.1.1.1.4.2 pgoyette
23 1.1.1.1.4.2 pgoyette /* inout.c */
24 1.1.1.1.4.2 pgoyette void src_setstream(struct source *, FILE *);
25 1.1.1.1.4.2 pgoyette void src_setstring(struct source *, char *);
26 1.1.1.1.4.2 pgoyette struct number *readnumber(struct source *, u_int);
27 1.1.1.1.4.2 pgoyette void printnumber(FILE *, const struct number *, u_int);
28 1.1.1.1.4.2 pgoyette char *read_string(struct source *);
29 1.1.1.1.4.2 pgoyette void print_value(FILE *, const struct value *, const char *, u_int);
30 1.1.1.1.4.2 pgoyette void print_ascii(FILE *, const struct number *);
31 1.1.1.1.4.2 pgoyette
32 1.1.1.1.4.2 pgoyette /* mem.c */
33 1.1.1.1.4.2 pgoyette struct number *new_number(void);
34 1.1.1.1.4.2 pgoyette void free_number(struct number *);
35 1.1.1.1.4.2 pgoyette struct number *dup_number(const struct number *);
36 1.1.1.1.4.2 pgoyette void *bmalloc(size_t);
37 1.1.1.1.4.2 pgoyette void *breallocarray(void *, size_t, size_t);
38 1.1.1.1.4.2 pgoyette char *bstrdup(const char *p);
39 1.1.1.1.4.2 pgoyette void bn_check(int);
40 1.1.1.1.4.2 pgoyette void bn_checkp(const void *);
41 1.1.1.1.4.2 pgoyette
42 1.1.1.1.4.2 pgoyette /* stack.c */
43 1.1.1.1.4.2 pgoyette void stack_init(struct stack *);
44 1.1.1.1.4.2 pgoyette void stack_free_value(struct value *);
45 1.1.1.1.4.2 pgoyette struct value *stack_dup_value(const struct value *, struct value *);
46 1.1.1.1.4.2 pgoyette void stack_swap(struct stack *);
47 1.1.1.1.4.2 pgoyette size_t stack_size(const struct stack *);
48 1.1.1.1.4.2 pgoyette void stack_dup(struct stack *);
49 1.1.1.1.4.2 pgoyette void stack_pushnumber(struct stack *, struct number *);
50 1.1.1.1.4.2 pgoyette void stack_pushstring(struct stack *stack, char *);
51 1.1.1.1.4.2 pgoyette void stack_push(struct stack *, struct value *);
52 1.1.1.1.4.2 pgoyette void stack_set_tos(struct stack *, struct value *);
53 1.1.1.1.4.2 pgoyette struct value *stack_tos(const struct stack *);
54 1.1.1.1.4.2 pgoyette struct value *stack_pop(struct stack *);
55 1.1.1.1.4.2 pgoyette struct number *stack_popnumber(struct stack *);
56 1.1.1.1.4.2 pgoyette char * stack_popstring(struct stack *);
57 1.1.1.1.4.2 pgoyette void stack_clear(struct stack *);
58 1.1.1.1.4.2 pgoyette void stack_print(FILE *, const struct stack *, const char *,
59 1.1.1.1.4.2 pgoyette u_int base);
60 1.1.1.1.4.2 pgoyette void frame_assign(struct stack *, size_t, const struct value *);
61 1.1.1.1.4.2 pgoyette struct value * frame_retrieve(const struct stack *, size_t);
62 1.1.1.1.4.2 pgoyette /* void frame_free(struct stack *); */
63 1.1.1.1.4.2 pgoyette
64 1.1.1.1.4.2 pgoyette int dc_main(int, char **);
65