annotate utils.h @ 16:9dda765ee85c

expression evaluator
author David A. Holland
date Mon, 20 Dec 2010 00:32:20 -0500
parents 97243badae69
children c08a947d8f30
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
6
0601b6e8e53d checkpoint - can find files
David A. Holland
parents: 3
diff changeset
1 #include <stdbool.h>
0601b6e8e53d checkpoint - can find files
David A. Holland
parents: 3
diff changeset
2 #include <stddef.h>
0601b6e8e53d checkpoint - can find files
David A. Holland
parents: 3
diff changeset
3
0601b6e8e53d checkpoint - can find files
David A. Holland
parents: 3
diff changeset
4 struct place;
0601b6e8e53d checkpoint - can find files
David A. Holland
parents: 3
diff changeset
5
0601b6e8e53d checkpoint - can find files
David A. Holland
parents: 3
diff changeset
6
3
bfa97d43197e support code
David A. Holland
parents:
diff changeset
7 #define HOWMANY(arr) (sizeof(arr)/sizeof((arr)[0]))
bfa97d43197e support code
David A. Holland
parents:
diff changeset
8
16
9dda765ee85c expression evaluator
David A. Holland
parents: 8
diff changeset
9 extern const char ws[];
9dda765ee85c expression evaluator
David A. Holland
parents: 8
diff changeset
10 extern const char alnum[];
9dda765ee85c expression evaluator
David A. Holland
parents: 8
diff changeset
11
9dda765ee85c expression evaluator
David A. Holland
parents: 8
diff changeset
12
3
bfa97d43197e support code
David A. Holland
parents:
diff changeset
13 void *domalloc(size_t len);
bfa97d43197e support code
David A. Holland
parents:
diff changeset
14 void *dorealloc(void *ptr, size_t len);
bfa97d43197e support code
David A. Holland
parents:
diff changeset
15
bfa97d43197e support code
David A. Holland
parents:
diff changeset
16 char *dostrdup(const char *s);
bfa97d43197e support code
David A. Holland
parents:
diff changeset
17 char *dostrdup2(const char *s, const char *t);
bfa97d43197e support code
David A. Holland
parents:
diff changeset
18 char *dostrdup3(const char *s, const char *t, const char *u);
bfa97d43197e support code
David A. Holland
parents:
diff changeset
19
8
97243badae69 split place stuff to its own file
David A. Holland
parents: 6
diff changeset
20 /* in place.c */
6
0601b6e8e53d checkpoint - can find files
David A. Holland
parents: 3
diff changeset
21 void complain(const struct place *, const char *fmt, ...);
0601b6e8e53d checkpoint - can find files
David A. Holland
parents: 3
diff changeset
22 void complain_fail(void);
0601b6e8e53d checkpoint - can find files
David A. Holland
parents: 3
diff changeset
23 bool complain_failed(void);
0601b6e8e53d checkpoint - can find files
David A. Holland
parents: 3
diff changeset
24
0601b6e8e53d checkpoint - can find files
David A. Holland
parents: 3
diff changeset
25 /* in main.c */
3
bfa97d43197e support code
David A. Holland
parents:
diff changeset
26 void freestringlater(char *s);
bfa97d43197e support code
David A. Holland
parents:
diff changeset
27 void die(void);