summaryrefslogtreecommitdiff
path: root/docs/examples/getinmemory.c
Commit message (Collapse)AuthorAgeFilesLines
* examples: fix -Wformat warningsMarcel Raad2018-07-091-1/+1
| | | | | | | | | When size_t is not a typedef for unsigned long (as usually the case on Windows), GCC emits -Wformat warnings when using lu and lx format specifiers with size_t. Silence them with explicit casts to unsigned long. Closes https://github.com/curl/curl/pull/2721
* examples: Fix format specifiersRikard Falkeborn2018-05-141-1/+1
| | | | Closes #2561
* URLs: change all http:// URLs to https://Daniel Stenberg2016-02-031-1/+1
|
* examples: more descriptionsDaniel Stenberg2015-06-181-5/+5
|
* Bug #149: Deletion of unnecessary checks before calls of the function "free"Markus Elfring2015-03-161-2/+1
| | | | | | | | | | | The function "free" is documented in the way that no action shall occur for a passed null pointer. It is therefore not needed that a function caller repeats a corresponding check. http://stackoverflow.com/questions/18775608/free-a-null-pointer-anyway-or-check-first This issue was fixed by using the software Coccinelle 1.0.0-rc24. Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
* getinmemory: remove a commentDaniel Stenberg2013-09-291-5/+1
| | | | | The comment mentioned the need to free the data, but the example already does that free
* examples/getinmemory.c: abort the transfer if not enough memoryCédric Deltheil2013-03-091-16/+24
| | | | | | No more use exit(3) but instead tell libcurl that no byte has been written to let it return a `CURLE_WRITE_ERROR`. In addition, check curl easy handle return code.
* getinmemory.c: use better argument names for write callbackDaniel Stenberg2011-09-071-3/+3
|
* sources: update source headersDaniel Stenberg2011-03-101-2/+15
| | | | | | All C and H files now (should) feature the proper project curl source code header, which includes basic info, a copyright statement and some basic disclaimers.
* examples: fix compiler warningsDaniel Stenberg2010-12-171-2/+2
|
* examples: use example.com in example URLsDaniel Stenberg2010-10-051-1/+1
|
* getinmemory: make the example easier to followJames Bursa2010-09-141-21/+14
| | | | | | | | | | | | | | 1. Remove the comment warning that it's "not been verified to work". It works with no problems in my testing. 2. Remove 2 unnecessary includes. 3. Remove the myrealloc(). Initialize chunk.memory with malloc() instead of NULL. The comments for these two parts contradicted each other. 4. Handle out of memory from realloc() instead of continuing. 5. Print a brief status message at the end.
* remove the CVSish $Id$ linesDaniel Stenberg2010-03-241-1/+0
|
* remove unnecessary typecasting of realloc()Yang Tse2008-09-061-1/+3
|
* Add a call to curl_global_cleanup to show how to do a proper shutdown.Dan Fandrich2007-11-071-0/+3
|
* Fixed some more simple compile warnings in the examples.Dan Fandrich2007-07-161-2/+2
|
* make it compile warning-free and free() the memory before exitDaniel Stenberg2005-10-101-0/+5
|
* fix typeDaniel Stenberg2005-02-041-1/+1
|
* modified to not use realloc() on a NULL pointerDaniel Stenberg2004-11-021-6/+16
|
* language!Daniel Stenberg2004-05-191-1/+1
|
* Set CURLOPT_USERAGENT tooDaniel Stenberg2004-05-191-0/+4
|
* use the newer option namesDaniel Stenberg2003-12-081-1/+1
|
* remove the wrong win32 comment and use global_initDaniel Stenberg2003-11-191-3/+2
|
* no the data is not freed, this is left for the app to do when neededDaniel Stenberg2003-03-101-0/+4
|
* this might actually compile too...Daniel Stenberg2001-05-151-2/+1
|
* an example on how you can use the write callback to receive data in a memoryDaniel Stenberg2001-05-151-0/+81
chunk