#include "ucgi.h"
-static void *xrealloc(void *ptr, size_t sz) {
- void *r;
-
- r= realloc(ptr,sz);
- if (!r) syserror("realloc failed");
- return r;
-}
-
int main(int argc, const char **argv) {
char *uservarn, *scriptpath, *newvar;
const char *nextslash, *lastslash, *pathi, *ev, *ev2, *en, *scriptdir, *av;
if (scriptpath[scriptpathlen-1]=='~') error("bad char end");
r= stat(scriptpath,&stab); if (r) syserror("stat script");
if (S_ISREG(stab.st_mode)) break;
- if (!S_ISDIR(stab.st_mode)) syserror("script not directory or file");
+ if (!S_ISDIR(stab.st_mode)) error("script not directory or file");
lastslash= nextslash;
}
if (*nextslash) xsetenv("PATH_INFO",nextslash,1);