diff options
Diffstat (limited to 'docs/examples/ghiper.c')
-rw-r--r-- | docs/examples/ghiper.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/docs/examples/ghiper.c b/docs/examples/ghiper.c index c0fbd8246..a1af4c5a3 100644 --- a/docs/examples/ghiper.c +++ b/docs/examples/ghiper.c @@ -98,7 +98,7 @@ static void mcode_or_die(const char *where, CURLMcode code) { if(CURLM_OK != code) { const char *s; - switch (code) { + switch(code) { case CURLM_BAD_HANDLE: s="CURLM_BAD_HANDLE"; break; case CURLM_BAD_EASY_HANDLE: s="CURLM_BAD_EASY_HANDLE"; break; case CURLM_OUT_OF_MEMORY: s="CURLM_OUT_OF_MEMORY"; break; @@ -272,8 +272,8 @@ static size_t write_cb(void *ptr, size_t size, size_t nmemb, void *data) } /* CURLOPT_PROGRESSFUNCTION */ -static int prog_cb (void *p, double dltotal, double dlnow, double ult, - double uln) +static int prog_cb(void *p, double dltotal, double dlnow, double ult, + double uln) { ConnInfo *conn = (ConnInfo *)p; MSG_OUT("Progress: %s (%g/%g)\n", conn->url, dlnow, dltotal); @@ -318,7 +318,7 @@ static void new_conn(char *url, GlobalInfo *g) } /* This gets called by glib whenever data is received from the fifo */ -static gboolean fifo_cb (GIOChannel *ch, GIOCondition condition, gpointer data) +static gboolean fifo_cb(GIOChannel *ch, GIOCondition condition, gpointer data) { #define BUF_SIZE 1024 gsize len, tp; @@ -380,21 +380,21 @@ int init_fifo(void) if((st.st_mode & S_IFMT) == S_IFREG) { errno = EEXIST; perror("lstat"); - exit (1); + exit(1); } } - unlink (fifo); + unlink(fifo); if(mkfifo (fifo, 0600) == -1) { perror("mkfifo"); - exit (1); + exit(1); } - socket = open (fifo, O_RDWR | O_NONBLOCK, 0); + socket = open(fifo, O_RDWR | O_NONBLOCK, 0); if(socket == -1) { perror("open"); - exit (1); + exit(1); } MSG_OUT("Now, pipe some URL's into > %s\n", fifo); |