#include <curl/curl.h>
/* curl write callback, to fill tidy's input buffer... */
-uint write_cb(char *in, uint size, uint nmemb, TidyBuffer *out)
+static uint write_cb(char *in, uint size, uint nmemb, TidyBuffer *out)
{
uint r;
r = size * nmemb;
}
/* Traverse the document tree */
-void dumpNode(TidyDoc doc, TidyNode tnod, int indent)
+static void dumpNode(TidyDoc doc, TidyNode tnod, int indent)
{
TidyNode child;
for(child = tidyGetChild(tnod); child; child = tidyGetNext(child) ) {
}
}
-
int main(int argc, char **argv)
{
CURL *curl;
#define NUMT 4
-pthread_mutex_t lock = PTHREAD_MUTEX_INITIALIZER;
-int j = 0;
-gint num_urls = 9; /* Just make sure this is less than urls[]*/
-const char * const urls[]= {
+static pthread_mutex_t lock = PTHREAD_MUTEX_INITIALIZER;
+static int j = 0;
+static gint num_urls = 9; /* Just make sure this is less than urls[] */
+static const char * const urls[] = {
"90022",
"90023",
"90024",
"90030"
};
-size_t write_cb(void *ptr, size_t size, size_t nmemb, FILE *stream)
+static size_t write_cb(void *ptr, size_t size, size_t nmemb, FILE *stream)
{
return fwrite(ptr, size, nmemb, stream);
}
}
}
-void *pull_one_url(void *NaN)
+static void *pull_one_url(void *NaN)
{
/* protect the reading and increasing of 'j' with a mutex */
pthread_mutex_lock(&lock);
}
-gboolean pulse_bar(gpointer data)
+static gboolean pulse_bar(gpointer data)
{
gdk_threads_enter();
gtk_progress_bar_pulse(GTK_PROGRESS_BAR (data));
return TRUE;
}
-void *create_thread(void *progress_bar)
+static void *create_thread(void *progress_bar)
{
pthread_t tid[NUMT];
int i;
/* [Un]Comment this out to kill the program rather than pushing close. */
/* gtk_main_quit(); */
-
return NULL;
-
}
static gboolean cb_delete(GtkWidget *window, gpointer data)