summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2020-12-30 22:37:44 +0100
committerDaniel Stenberg <daniel@haxx.se>2020-12-30 22:37:44 +0100
commit2855997a958a815b4169b15d2867820620dd4886 (patch)
treee2923186a933874c9524dc876d81e7977c63e144
parentf2ed79d8eec468612a29bee4f7ef286ccf255c96 (diff)
downloadcurl-2855997a958a815b4169b15d2867820620dd4886.tar.gz
examples/curlgtk.c: fix the copyright year range
... and make private functions static.
-rw-r--r--docs/examples/curlgtk.c19
1 files changed, 9 insertions, 10 deletions
diff --git a/docs/examples/curlgtk.c b/docs/examples/curlgtk.c
index 02b600d9c..51f4b458a 100644
--- a/docs/examples/curlgtk.c
+++ b/docs/examples/curlgtk.c
@@ -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>
* use the libcurl in a gtk-threaded application
@@ -19,21 +19,21 @@
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);
}
-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);
}
-int my_progress_func(GtkWidget *bar,
- double t, /* dltotal */
- double d, /* dlnow */
- double ultotal,
- double ulnow)
+static int my_progress_func(GtkWidget *bar,
+ double t, /* dltotal */
+ double d, /* dlnow */
+ double ultotal,
+ double ulnow)
{
/* printf("%d / %d (%g %%)\n", d, t, d*100.0/t);*/
gdk_threads_enter();
@@ -42,7 +42,7 @@ int my_progress_func(GtkWidget *bar,
return 0;
}
-void *my_thread(void *ptr)
+static void *my_thread(void *ptr)
{
CURL *curl;
@@ -98,7 +98,6 @@ int main(int argc, char **argv)
if(!g_thread_create(&my_thread, argv[1], FALSE, NULL) != 0)
g_warning("can't create the thread");
-
gdk_threads_enter();
gtk_main();
gdk_threads_leave();