Fixed some compile warnings and errors and improved portability in the

examples.
Removed ftp3rdparty.c since libcurl doesn't support 3rd party FTP transfers
any longer.
This commit is contained in:
Dan Fandrich
2007-07-12 21:11:10 +00:00
parent 4a728747e6
commit 49ce3e5160
24 changed files with 78 additions and 169 deletions

View File

@@ -74,7 +74,7 @@ main(void)
#define snprintf _snprintf
#endif
/* Netscape format cookie */
snprintf(nline, 256, "%s\t%s\t%s\t%s\t%u\t%s\t%s",
snprintf(nline, sizeof(nline), "%s\t%s\t%s\t%s\t%u\t%s\t%s",
".google.com", "TRUE", "/", "FALSE", time(NULL) + 31337, "PREF", "hello google, i like you very much!");
res = curl_easy_setopt(curl, CURLOPT_COOKIELIST, nline);
if (res != CURLE_OK) {
@@ -83,7 +83,7 @@ main(void)
}
/* HTTP-header style cookie */
snprintf(nline, 256,
snprintf(nline, sizeof(nline),
"Set-Cookie: OLD_PREF=3d141414bf4209321; "
"expires=Sun, 17-Jan-2038 19:14:07 GMT; path=/; domain=.google.com");
res = curl_easy_setopt(curl, CURLOPT_COOKIELIST, nline);