#include <stdlib.h>
#include <errno.h>
+#include "config.h"
#include "both.h"
+void *xmalloc(size_t s) {
+ void *p;
+ p= malloc(s?s:1); if (!p) syscallerror("malloc");
+ return p;
+}
+
+void *xrealloc(void *p, size_t s) {
+ p= realloc(p,s);
+ if (!p) syscallerror("realloc");
+ return p;
+}
+
+char *xstrsave(const char *s) {
+ char *r;
+
+ r= xmalloc(strlen(s)+1);
+ strcpy(r,s);
+ return r;
+}
+
+
int working_getc(FILE *file) {
int c;