chiark / gitweb /
debian/control: Add missing build-dependency on flex. Fixes FTBFS. Report from Aurel...
[userv.git] / both.h
1 /*
2  * userv - both.h
3  * Useful very-low-level utility routines' declarations,
4  * for both client and daemon.
5  *
6  * userv is
7  * Copyright 1996-2017 Ian Jackson <ian@davenant.greenend.org.uk>.
8  * Copyright 2000      Ben Harris <bjh21@cam.ac.uk>
9  * Copyright 2016-2017 Peter Benie <pjb1008@cam.ac.uk>
10  *
11  * This is free software; you can redistribute it and/or modify it
12  * under the terms of the GNU General Public License as published by
13  * the Free Software Foundation; either version 3 of the License, or
14  * (at your option) any later version.
15  *
16  * This program is distributed in the hope that it will be useful, but
17  * WITHOUT ANY WARRANTY; without even the implied warranty of
18  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
19  * General Public License for more details.
20  *
21  * You should have received a copy of the GNU General Public License
22  * along with userv; if not, see <http://www.gnu.org/licenses/>.
23  */
24
25 #ifndef BOTH_H
26 #define BOTH_H
27
28 /* provided by both.c */
29
30 void *xmalloc(size_t s);
31 void *xrealloc(void *p, size_t s);
32 char *xstrsave(const char *s);
33
34 int working_getc(FILE *file);
35 size_t working_fread(void *ptr, size_t sz, FILE *file);
36
37 /* used by both.c, so must be present */
38
39 void syscallerror(const char *what) NONRETURNING;
40
41 #define ISCHAR(iswotsit,ch) (iswotsit((unsigned char)(ch))) /*Feh!*/
42
43 #endif