From: Daniel Stenberg Date: Tue, 5 Jun 2001 11:27:40 +0000 (+0000) Subject: made the test-program in the bottom compile/build, remember to link with X-Git-Tag: curl-7_8~9 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=b1cd033c277d3b4b819458925db448fb7676ad80;p=thirdparty%2Fcurl.git made the test-program in the bottom compile/build, remember to link with strequal.o as well! --- diff --git a/lib/formdata.c b/lib/formdata.c index cadccb802f..656e4de1b6 100644 --- a/lib/formdata.c +++ b/lib/formdata.c @@ -634,11 +634,16 @@ int main(int argc, char **argv) form=Curl_getFormData(httppost, &size); - FormInit(&formread, form); + Curl_FormInit(&formread, form); - while(nread = FormReader(buffer, 1, sizeof(buffer), (FILE *)&formread)) { + do { + nread = Curl_FormReader(buffer, 1, sizeof(buffer), + (FILE *)&formread); + + if(-1 == nread) + break; fwrite(buffer, nread, 1, stderr); - } + } while(1); fprintf(stderr, "size: %d\n", size);