3 #include "ucgicommon.h"
5 const char *const envok[]= {
11 "HTTP_ACCEPT_ENCODING",
12 "HTTP_ACCEPT_LANGUAGE",
37 const int nenvok= sizeof(envok)/sizeof(envok[0]);
39 void syserror(const char *m) {
40 if (printf("Content-Type: text/plain\n\n"
41 "ucgi: system call error:\n"
43 m,strerror(errno))==EOF || fflush(stdout)) outerror();
47 void error(const char *m) {
48 if (printf("Content-Type: text/plain\n\n"
51 m)==EOF || fflush(stdout)) outerror();
55 void *xmalloc(size_t sz) {
59 if (!r) syserror("malloc failed");