annotate utils.h @ 21:e3fab8f1b52c

strip comments.
author David A. Holland
date Mon, 20 Dec 2010 04:15:02 -0500
parents c08a947d8f30
children 76c114899f63
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);
18
c08a947d8f30 deal with macro parameters
David A. Holland
parents: 16
diff changeset
19 char *dostrndup(const char *s, size_t len);
c08a947d8f30 deal with macro parameters
David A. Holland
parents: 16
diff changeset
20
c08a947d8f30 deal with macro parameters
David A. Holland
parents: 16
diff changeset
21 size_t notrailingws(char *buf, size_t len);
c08a947d8f30 deal with macro parameters
David A. Holland
parents: 16
diff changeset
22 bool is_identifier(const char *str);
3
bfa97d43197e support code
David A. Holland
parents:
diff changeset
23
8
97243badae69 split place stuff to its own file
David A. Holland
parents: 6
diff changeset
24 /* in place.c */
6
0601b6e8e53d checkpoint - can find files
David A. Holland
parents: 3
diff changeset
25 void complain(const struct place *, const char *fmt, ...);
0601b6e8e53d checkpoint - can find files
David A. Holland
parents: 3
diff changeset
26 void complain_fail(void);
0601b6e8e53d checkpoint - can find files
David A. Holland
parents: 3
diff changeset
27 bool complain_failed(void);
0601b6e8e53d checkpoint - can find files
David A. Holland
parents: 3
diff changeset
28
0601b6e8e53d checkpoint - can find files
David A. Holland
parents: 3
diff changeset
29 /* in main.c */
3
bfa97d43197e support code
David A. Holland
parents:
diff changeset
30 void freestringlater(char *s);
bfa97d43197e support code
David A. Holland
parents:
diff changeset
31 void die(void);