mirror of
https://github.com/curl/curl.git
synced 2025-04-06 16:10:34 +08:00
parent
7ce1a6ae75
commit
5ec15ea48f
@ -35,23 +35,6 @@ struct WriteThis {
|
||||
|
||||
static size_t read_callback(char *ptr, size_t size, size_t nmemb, void *userp)
|
||||
{
|
||||
#ifdef LIB644
|
||||
static int count = 0;
|
||||
(void)ptr;
|
||||
(void)size;
|
||||
(void)nmemb;
|
||||
(void)userp;
|
||||
switch(count++) {
|
||||
case 0: /* Return a single byte. */
|
||||
*ptr = '\n';
|
||||
return 1;
|
||||
case 1: /* Request abort. */
|
||||
return CURL_READFUNC_ABORT;
|
||||
}
|
||||
printf("Wrongly called >2 times\n");
|
||||
exit(1); /* trigger major failure */
|
||||
#else
|
||||
|
||||
struct WriteThis *pooh = (struct WriteThis *)userp;
|
||||
int eof = !*pooh->readptr;
|
||||
|
||||
@ -71,7 +54,6 @@ static size_t read_callback(char *ptr, size_t size, size_t nmemb, void *userp)
|
||||
}
|
||||
|
||||
return 0; /* no more data left to deliver */
|
||||
#endif
|
||||
}
|
||||
|
||||
static int once(char *URL, bool oldstyle)
|
||||
|
Loading…
x
Reference in New Issue
Block a user