1
0
mirror of https://github.com/moparisthebest/curl synced 2025-01-09 21:18:00 -05:00

examples/curlgtk.c: fix the copyright year range

... and make private functions static.
This commit is contained in:
Daniel Stenberg 2020-12-30 22:37:44 +01:00
parent f2ed79d8ee
commit 2855997a95
No known key found for this signature in database
GPG Key ID: 5CC908FDB71E12C2

View File

@ -5,7 +5,7 @@
* | (__| |_| | _ <| |___ * | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____| * \___|\___/|_| \_\_____|
* *
* Copyright (c) 2000 - 2019 David Odin (aka DindinX) for MandrakeSoft * Copyright (c) 2000 - 2020 David Odin (aka DindinX) for MandrakeSoft
*/ */
/* <DESC> /* <DESC>
* use the libcurl in a gtk-threaded application * use the libcurl in a gtk-threaded application
@ -19,17 +19,17 @@
GtkWidget *Bar; GtkWidget *Bar;
size_t my_write_func(void *ptr, size_t size, size_t nmemb, FILE *stream) static size_t my_write_func(void *ptr, size_t size, size_t nmemb, FILE *stream)
{ {
return fwrite(ptr, size, nmemb, stream); return fwrite(ptr, size, nmemb, stream);
} }
size_t my_read_func(char *ptr, size_t size, size_t nmemb, FILE *stream) static size_t my_read_func(char *ptr, size_t size, size_t nmemb, FILE *stream)
{ {
return fread(ptr, size, nmemb, stream); return fread(ptr, size, nmemb, stream);
} }
int my_progress_func(GtkWidget *bar, static int my_progress_func(GtkWidget *bar,
double t, /* dltotal */ double t, /* dltotal */
double d, /* dlnow */ double d, /* dlnow */
double ultotal, double ultotal,
@ -42,7 +42,7 @@ int my_progress_func(GtkWidget *bar,
return 0; return 0;
} }
void *my_thread(void *ptr) static void *my_thread(void *ptr)
{ {
CURL *curl; CURL *curl;
@ -98,7 +98,6 @@ int main(int argc, char **argv)
if(!g_thread_create(&my_thread, argv[1], FALSE, NULL) != 0) if(!g_thread_create(&my_thread, argv[1], FALSE, NULL) != 0)
g_warning("can't create the thread"); g_warning("can't create the thread");
gdk_threads_enter(); gdk_threads_enter();
gtk_main(); gtk_main();
gdk_threads_leave(); gdk_threads_leave();