/* 11 Feb 09. WJS Type "main" and include stdlib.h to avoid diagnostics Exit w/explicit status so said status can be checked. Note that poststring is probably not used. At present, it is in plotmap, and I believe that plotmap is no longer used */ #include #include #include #include char *getenv(); static char querystuff[2049]; char x2c(what) char *what; { register char digit; digit = (what[0] >= 'A' ? ((what[0] & 0xdf) - 'A')+10 : (what[0] - '0')); digit *= 16; digit += (what[1] >= 'A' ? ((what[1] & 0xdf) - 'A')+10 : (what[1] - '0')); return(digit); } void fixstr(url) char *url; { register int x,y; for(x=0,y=0;url[y];++x,++y) { if((url[x]=url[y])=='&'){ url[x]=';';} else if(url[x] == '%') { url[x] = x2c(&url[y+1]); y+=2; } } url[x] = '\0'; } int main(argc,argv) int argc; char *argv[]; { int i,j; char *sp,*sp2; char key[80]; /* want to bracket the incoming argument with ';' */ querystuff[0]=';'; querystuff[1]='\0'; if(strcmp(getenv("REQUEST_METHOD"),"POST")) exit(1); i=atoi(getenv("CONTENT_LENGTH")); for(j=0;j