comparison utils.h @ 6:0601b6e8e53d

checkpoint - can find files
author David A. Holland
date Sun, 19 Dec 2010 18:55:51 -0500
parents bfa97d43197e
children 97243badae69
comparison
equal deleted inserted replaced
5:7c489c73d62b 6:0601b6e8e53d
1 #include <stdbool.h>
2 #include <stddef.h>
3
4 struct place;
5
6
1 #define HOWMANY(arr) (sizeof(arr)/sizeof((arr)[0])) 7 #define HOWMANY(arr) (sizeof(arr)/sizeof((arr)[0]))
2 8
3 void *domalloc(size_t len); 9 void *domalloc(size_t len);
4 void *dorealloc(void *ptr, size_t len); 10 void *dorealloc(void *ptr, size_t len);
5 11
6 char *dostrdup(const char *s); 12 char *dostrdup(const char *s);
7 char *dostrdup2(const char *s, const char *t); 13 char *dostrdup2(const char *s, const char *t);
8 char *dostrdup3(const char *s, const char *t, const char *u); 14 char *dostrdup3(const char *s, const char *t, const char *u);
9 15
16 /* in files.c */
17 void complain(const struct place *, const char *fmt, ...);
18 void complain_fail(void);
19 bool complain_failed(void);
20
21 /* in main.c */
10 void freestringlater(char *s); 22 void freestringlater(char *s);
11 void die(void); 23 void die(void);