/* ** @(#) $Id: multichunk.c,v 1.5 2000/12/19 14:50:33 kahan Exp $ ** ** Other libwww samples can be found at "http://www.w3.org/Library/Examples" ** ** Copyright (cİ 1995-1998 World Wide Web Consortium, (Massachusetts ** Institute of Technology, Institut National de Recherche en ** Informatique et en Automatique, Keio University). All Rights ** Reserved. This program is distributed under the W3C's Software ** Intellectual Property License. This program is distributed in the hope ** that it will be useful, but WITHOUT ANY WARRANTY; without even the ** implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR ** PURPOSE. See W3C License http://www.w3.org/Consortium/Legal/ for more ** details. ** ** Gets the same document n times where n is specified as an option. The ** program uses blocking sockets */ #include "WWWLib.h" #include "WWWHTTP.h" #include "WWWApp.h" #include "WWWInit.h" #define MAX_COUNT 1024 PRIVATE int printer (const char * fmt, va_list pArgs) { return (vfprintf(stdout, fmt, pArgs)); } PRIVATE int tracer (const char * fmt, va_list pArgs) { return (vfprintf(stderr, fmt, pArgs)); } PRIVATE int terminate_handler (HTRequest * request, HTResponse * response, void * param, int status) { /* Check for status */ /* HTPrint("Load resulted in status %d\n", status); */ /* we're not handling other requests */ HTEventList_stopLoop (); /* stop here */ return HT_ERROR; } int main (int argc, char ** argv) { HTRequest * request = NULL; HTChunk * chunk = NULL; char * uri = NULL; int arg = 0; int maxcount = 1; for (arg=1; arg \n", argv[0]); } /* Terminate the Library */ HTProfile_delete(); HTPrint("\n"); return 0; }