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
Родитель f2ed79d8ee
Коммит 2855997a95
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 5CC908FDB71E12C2
1 изменённых файлов: 9 добавлений и 10 удалений

Просмотреть файл

@ -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,21 +19,21 @@
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,
double ulnow) double ulnow)
{ {
/* printf("%d / %d (%g %%)\n", d, t, d*100.0/t);*/ /* printf("%d / %d (%g %%)\n", d, t, d*100.0/t);*/
gdk_threads_enter(); gdk_threads_enter();
@ -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();