annotate utils.h @ 9:1fbcbd58742e

move destroyall to array.h
author David A. Holland
date Sun, 19 Dec 2010 19:19:02 -0500
parents 97243badae69
children 9dda765ee85c
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
bfa97d43197e support code
David A. Holland
parents:
diff changeset
9 void *domalloc(size_t len);
bfa97d43197e support code
David A. Holland
parents:
diff changeset
10 void *dorealloc(void *ptr, size_t len);
bfa97d43197e support code
David A. Holland
parents:
diff changeset
11
bfa97d43197e support code
David A. Holland
parents:
diff changeset
12 char *dostrdup(const char *s);
bfa97d43197e support code
David A. Holland
parents:
diff changeset
13 char *dostrdup2(const char *s, const char *t);
bfa97d43197e support code
David A. Holland
parents:
diff changeset
14 char *dostrdup3(const char *s, const char *t, const char *u);
bfa97d43197e support code
David A. Holland
parents:
diff changeset
15
8
97243badae69 split place stuff to its own file
David A. Holland
parents: 6
diff changeset
16 /* in place.c */
6
0601b6e8e53d checkpoint - can find files
David A. Holland
parents: 3
diff changeset
17 void complain(const struct place *, const char *fmt, ...);
0601b6e8e53d checkpoint - can find files
David A. Holland
parents: 3
diff changeset
18 void complain_fail(void);
0601b6e8e53d checkpoint - can find files
David A. Holland
parents: 3
diff changeset
19 bool complain_failed(void);
0601b6e8e53d checkpoint - can find files
David A. Holland
parents: 3
diff changeset
20
0601b6e8e53d checkpoint - can find files
David A. Holland
parents: 3
diff changeset
21 /* in main.c */
3
bfa97d43197e support code
David A. Holland
parents:
diff changeset
22 void freestringlater(char *s);
bfa97d43197e support code
David A. Holland
parents:
diff changeset
23 void die(void);