* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2016, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2017, Daniel Stenberg, <daniel@haxx.se>, et al.
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
curl_easy_cleanup(curl);
}
- g_free (http);
+ g_free(http);
/* Adds more latency, testing the mutex.*/
sleep(1);
gboolean pulse_bar(gpointer data)
{
gdk_threads_enter();
- gtk_progress_bar_pulse (GTK_PROGRESS_BAR (data));
+ gtk_progress_bar_pulse(GTK_PROGRESS_BAR (data));
gdk_threads_leave();
/* Return true so the function will be called again;
int error;
/* Make sure I don't create more threads than urls. */
- for(i=0; i < NUMT && i < num_urls ; i++) {
+ for(i = 0; i < NUMT && i < num_urls ; i++) {
error = pthread_create(&tid[i],
NULL, /* default attributes please */
pull_one_url,
}
/* Wait for all threads to terminate. */
- for(i=0; i < NUMT && i < num_urls; i++) {
+ for(i = 0; i < NUMT && i < num_urls; i++) {
error = pthread_join(tid[i], NULL);
fprintf(stderr, "Thread %d terminated\n", i);
}
/* Init thread */
g_thread_init(NULL);
- gdk_threads_init ();
- gdk_threads_enter ();
+ gdk_threads_init();
+ gdk_threads_enter();
gtk_init(&argc, &argv);
/* Progress bar */
progress_bar = gtk_progress_bar_new();
- gtk_progress_bar_pulse (GTK_PROGRESS_BAR (progress_bar));
+ gtk_progress_bar_pulse(GTK_PROGRESS_BAR (progress_bar));
/* Make uniform pulsing */
- gint pulse_ref = g_timeout_add (300, pulse_bar, progress_bar);
+ gint pulse_ref = g_timeout_add(300, pulse_bar, progress_bar);
g_object_set_data(G_OBJECT(progress_bar), "pulse_id",
GINT_TO_POINTER(pulse_ref));
gtk_container_add(GTK_CONTAINER(inside_frame), progress_bar);