aboutsummaryrefslogtreecommitdiff
path: root/docs/examples/getinmemory.c
AgeCommit message (Collapse)Author
2018-09-23docs/examples: URL updatesViktor Szakats
- also update two URLs outside of docs/examples - fix spelling of filename persistant.c - fix three long lines that started failing checksrc.pl Closes https://github.com/curl/curl/pull/3036
2018-09-17examples: Fix memory leaks from realloc errorsKruzya
Make sure to not overwrite the reallocated pointer in realloc() calls to avoid a memleak on memory errors.
2018-07-09examples: fix -Wformat warningsMarcel Raad
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
2018-05-14examples: Fix format specifiersRikard Falkeborn
Closes #2561
2016-02-03URLs: change all http:// URLs to https://Daniel Stenberg
2015-06-18examples: more descriptionsDaniel Stenberg
2015-03-16Bug #149: Deletion of unnecessary checks before calls of the function "free"Markus Elfring
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>
2013-09-29getinmemory: remove a commentDaniel Stenberg
The comment mentioned the need to free the data, but the example already does that free
2013-03-09examples/getinmemory.c: abort the transfer if not enough memoryCédric Deltheil
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.
2011-09-07getinmemory.c: use better argument names for write callbackDaniel Stenberg
2011-03-10sources: update source headersDaniel Stenberg
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.
2010-12-17examples: fix compiler warningsDaniel Stenberg
2010-10-05examples: use example.com in example URLsDaniel Stenberg
2010-09-14getinmemory: make the example easier to followJames Bursa
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.
2010-03-24remove the CVSish $Id$ linesDaniel Stenberg
2008-09-06remove unnecessary typecasting of realloc()Yang Tse
2007-11-07Add a call to curl_global_cleanup to show how to do a proper shutdown.Dan Fandrich
2007-07-16Fixed some more simple compile warnings in the examples.Dan Fandrich
2005-10-10make it compile warning-free and free() the memory before exitDaniel Stenberg
2005-02-04fix typeDaniel Stenberg
2004-11-02modified to not use realloc() on a NULL pointerDaniel Stenberg
2004-05-19language!Daniel Stenberg
2004-05-19Set CURLOPT_USERAGENT tooDaniel Stenberg
2003-12-08use the newer option namesDaniel Stenberg
2003-11-19remove the wrong win32 comment and use global_initDaniel Stenberg
2003-03-10no the data is not freed, this is left for the app to do when neededDaniel Stenberg
2001-05-15this might actually compile too...Daniel Stenberg
2001-05-15an example on how you can use the write callback to receive data in a memoryDaniel Stenberg
chunk