http://www.ousob.com --- Legacy Redefined #include <stdio.h> #include <stdlib.h> #include <extend50.h> CLIPPER b_stdin() { register unsigned int contentLength,i,x; char *pContentLength; char inputBuffer[1024]; setvbuf(stdout,NULL,_IONBF,0); pContentLength = getenv("CONTENT_LENGTH"); if(pContentLength != NULL ){ contentLength = atoi(pContentLength); } else{ contentLength = 0; } if( contentLength > (sizeof(inputBuffer) -1) ){ contentLength = (sizeof(inputBuffer) -1); } i = 0; while( i < contentLength ){ x = fgetc(stdin); if( x == EOF ){ break; } inputBuffer[i++] = x; } inputBuffer[i] = '\0'; _retc( inputBuffer ); }