chiark / gitweb /
init info stanza
[userv.git] / both.h
1 /*
2  * userv - lib.c
3  * Useful very-low-level utility routines' declarations,
4  * for both client and daemon.
5  *
6  * Copyright (C)1999,2001 Ian Jackson
7  *
8  * This is free software; you can redistribute it and/or modify it
9  * under the terms of the GNU General Public License as published by
10  * the Free Software Foundation; either version 2 of the License, or
11  * (at your option) any later version.
12  *
13  * This program is distributed in the hope that it will be useful, but
14  * WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
16  * General Public License for more details.
17  *
18  * You should have received a copy of the GNU General Public License
19  * along with userv; if not, write to the Free Software
20  * Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
21  */
22
23 #ifndef BOTH_H
24 #define BOTH_H
25
26 /* provided by both.c */
27
28 void *xmalloc(size_t s);
29 void *xrealloc(void *p, size_t s);
30 char *xstrsave(const char *s);
31
32 int working_getc(FILE *file);
33 size_t working_fread(void *ptr, size_t sz, FILE *file);
34
35 /* used by both.c, so must be present */
36
37 void syscallerror(const char *what) NONRETURNING;
38
39 #define ISCHAR(iswotsit,ch) (iswotsit((unsigned char)(ch))) /*Feh!*/
40
41 #endif