From: Fabian Keil Date: Fri, 9 Mar 2012 16:24:36 +0000 (+0000) Subject: Add missing white-space behind if's and the following parentheses X-Git-Tag: v_3_0_20~393 X-Git-Url: http://www.privoxy.org/gitweb/user-manual/contact.html?a=commitdiff_plain;h=50f87c9446b435d47c371f63615260636639f450;p=privoxy.git Add missing white-space behind if's and the following parentheses --- diff --git a/amiga.c b/amiga.c index c04ab8dd..fbe0ed81 100644 --- a/amiga.c +++ b/amiga.c @@ -1,4 +1,4 @@ -const char amiga_rcs[] = "$Id: amiga.c,v 1.14 2011/09/04 11:10:56 fabiankeil Exp $"; +const char amiga_rcs[] = "$Id: amiga.c,v 1.15 2012/03/09 16:23:50 fabiankeil Exp $"; /********************************************************************* * * File : $Source: /cvsroot/ijbswa/current/amiga.c,v $ @@ -74,7 +74,7 @@ SAVEDS ULONG server_thread(void) { SetErrnoPtr(&(UserData.eno),sizeof(int)); local_csp->cfd=ObtainSocket(local_csp->cfd, AF_INET, SOCK_STREAM, 0); - if(JB_INVALID_SOCKET!=local_csp->cfd) + if (JB_INVALID_SOCKET!=local_csp->cfd) { Signal(main_task,SIGF_SINGLE); serve((struct client_state *) local_csp); @@ -207,7 +207,7 @@ void free (void *m) { ULONG *mem = m; - if(mem && memPool) + if (mem && memPool) { ULONG size=*--mem; diff --git a/cgi.c b/cgi.c index 62de9428..60eb0611 100644 --- a/cgi.c +++ b/cgi.c @@ -1,4 +1,4 @@ -const char cgi_rcs[] = "$Id: cgi.c,v 1.147 2011/12/31 14:54:28 fabiankeil Exp $"; +const char cgi_rcs[] = "$Id: cgi.c,v 1.148 2012/03/09 16:23:50 fabiankeil Exp $"; /********************************************************************* * * File : $Source: /cvsroot/ijbswa/current/cgi.c,v $ @@ -2168,7 +2168,7 @@ struct map *default_exports(const struct client_state *csp, const char *caller) if (!err) err = map_block_killer(exports, "can-toggle"); #endif - if(!strcmp(CODE_STATUS, "stable")) + if (!strcmp(CODE_STATUS, "stable")) { if (!err) err = map_block_killer(exports, "unstable"); } diff --git a/cgiedit.c b/cgiedit.c index 728958a1..6f68d6f6 100644 --- a/cgiedit.c +++ b/cgiedit.c @@ -1,4 +1,4 @@ -const char cgiedit_rcs[] = "$Id: cgiedit.c,v 1.72 2011/12/31 14:47:44 fabiankeil Exp $"; +const char cgiedit_rcs[] = "$Id: cgiedit.c,v 1.73 2012/03/09 16:23:50 fabiankeil Exp $"; /********************************************************************* * * File : $Source: /cvsroot/ijbswa/current/cgiedit.c,v $ @@ -2833,7 +2833,7 @@ jb_err cgi_edit_actions_for_url(struct client_state *csp, * A better solution would be to switch to POST requests, * but this will do for now. */ - if(!err && (csp->config->feature_flags & RUNTIME_FEATURE_SPLIT_LARGE_FORMS)) + if (!err && (csp->config->feature_flags & RUNTIME_FEATURE_SPLIT_LARGE_FORMS)) { /* Generate multiple smaller form by killing the big one. */ err = map_block_killer(exports, "one-form-only"); @@ -3215,7 +3215,7 @@ jb_err cgi_edit_actions_submit(struct client_state *csp, } } - if(err) + if (err) { /* Out of memory */ edit_free_file(file); diff --git a/cgisimple.c b/cgisimple.c index 198c8e77..010497b3 100644 --- a/cgisimple.c +++ b/cgisimple.c @@ -1,4 +1,4 @@ -const char cgisimple_rcs[] = "$Id: cgisimple.c,v 1.112 2011/12/31 14:47:44 fabiankeil Exp $"; +const char cgisimple_rcs[] = "$Id: cgisimple.c,v 1.113 2012/03/09 16:23:50 fabiankeil Exp $"; /********************************************************************* * * File : $Source: /cvsroot/ijbswa/current/cgisimple.c,v $ @@ -1141,7 +1141,7 @@ jb_err cgi_show_url_info(struct client_state *csp, { /* * Empty URL (just prefix). - * Make it totally empty so it's caught by the next if() + * Make it totally empty so it's caught by the next if () */ url_param[0] = '\0'; } @@ -1152,7 +1152,7 @@ jb_err cgi_show_url_info(struct client_state *csp, { /* * Empty URL (just prefix). - * Make it totally empty so it's caught by the next if() + * Make it totally empty so it's caught by the next if () */ url_param[0] = '\0'; } diff --git a/deanimate.c b/deanimate.c index cd427423..936330d3 100644 --- a/deanimate.c +++ b/deanimate.c @@ -1,4 +1,4 @@ -const char deanimate_rcs[] = "$Id: deanimate.c,v 1.21 2011/09/04 11:10:56 fabiankeil Exp $"; +const char deanimate_rcs[] = "$Id: deanimate.c,v 1.22 2011/12/31 14:47:44 fabiankeil Exp $"; /********************************************************************* * * File : $Source: /cvsroot/ijbswa/current/deanimate.c,v $ @@ -349,7 +349,7 @@ int gif_deanimate(struct binbuffer *src, struct binbuffer *dst, int get_first_im /* * Look for global colormap and copy if found. */ - if(c & 0x80) + if (c & 0x80) { int map_length = 3 * (1 << ((c & 0x07) + 1)); if (map_length <= 0) diff --git a/encode.c b/encode.c index cc9c1a00..d61ae72d 100644 --- a/encode.c +++ b/encode.c @@ -1,4 +1,4 @@ -const char encode_rcs[] = "$Id: encode.c,v 1.24 2011/11/06 11:51:57 fabiankeil Exp $"; +const char encode_rcs[] = "$Id: encode.c,v 1.25 2012/03/09 16:23:50 fabiankeil Exp $"; /********************************************************************* * * File : $Source: /cvsroot/ijbswa/current/encode.c,v $ @@ -145,7 +145,7 @@ char * html_encode(const char *s) while ((c = *s++) != '\0') { const char * replace_with = html_code_map[(unsigned char) c]; - if(replace_with != NULL) + if (replace_with != NULL) { const size_t bytes_written = (size_t)(p - buf); assert(bytes_written < buf_size); @@ -311,10 +311,10 @@ int xtoi(const char *s) int d1; d1 = xdtoi(*s); - if(d1 >= 0) + if (d1 >= 0) { int d2 = xdtoi(*(s+1)); - if(d2 >= 0) + if (d2 >= 0) { return (d1 << 4) + d2; } diff --git a/filters.c b/filters.c index 3c3ae38e..480190a2 100644 --- a/filters.c +++ b/filters.c @@ -1,4 +1,4 @@ -const char filters_rcs[] = "$Id: filters.c,v 1.167 2012/03/04 11:51:25 fabiankeil Exp $"; +const char filters_rcs[] = "$Id: filters.c,v 1.168 2012/03/09 16:23:50 fabiankeil Exp $"; /********************************************************************* * * File : $Source: /cvsroot/ijbswa/current/filters.c,v $ @@ -577,7 +577,7 @@ struct http_response *block_url(struct client_state *csp) /* determine HOW images should be blocked */ p = csp->action->string[ACTION_STRING_IMAGE_BLOCKER]; - if(csp->action->flags & ACTION_HANDLE_AS_EMPTY_DOCUMENT) + if (csp->action->flags & ACTION_HANDLE_AS_EMPTY_DOCUMENT) { log_error(LOG_LEVEL_ERROR, "handle-as-empty-document overruled by handle-as-image."); } @@ -646,7 +646,7 @@ struct http_response *block_url(struct client_state *csp) } else #endif /* def FEATURE_IMAGE_BLOCKING */ - if(csp->action->flags & ACTION_HANDLE_AS_EMPTY_DOCUMENT) + if (csp->action->flags & ACTION_HANDLE_AS_EMPTY_DOCUMENT) { /* * Send empty document. diff --git a/jcc.c b/jcc.c index 6661b34e..223a9c01 100644 --- a/jcc.c +++ b/jcc.c @@ -1,4 +1,4 @@ -const char jcc_rcs[] = "$Id: jcc.c,v 1.375 2011/12/10 17:26:11 fabiankeil Exp $"; +const char jcc_rcs[] = "$Id: jcc.c,v 1.376 2012/03/09 16:23:50 fabiankeil Exp $"; /********************************************************************* * * File : $Source: /cvsroot/ijbswa/current/jcc.c,v $ @@ -338,7 +338,7 @@ static void sig_handler(int the_signal) case SIGINT: log_error(LOG_LEVEL_INFO, "exiting by signal %d .. bye", the_signal); #if defined(unix) - if(pidfile) + if (pidfile) { unlink(pidfile); } @@ -2948,7 +2948,7 @@ int main(int argc, char **argv) usage(argv[0]); } - else if(strcmp(argv[argc_pos], "--version") == 0) + else if (strcmp(argv[argc_pos], "--version") == 0) { printf("Privoxy version " VERSION " (" HOME_PAGE_URL ")\n"); exit(0); @@ -3541,7 +3541,7 @@ static void listen_loop(void) log_error(LOG_LEVEL_CONNECT, "accept failed: %E"); #ifdef AMIGA - if(!childs) + if (!childs) { exit(1); } @@ -3700,7 +3700,7 @@ static void listen_loop(void) NP_StackSize, 200*1024, TAG_DONE); #endif - if(0 != child_id) + if (0 != child_id) { childs++; ((struct Task *)child_id)->tc_UserData = csp; diff --git a/loaders.c b/loaders.c index 6d5f54ed..2362127f 100644 --- a/loaders.c +++ b/loaders.c @@ -1,4 +1,4 @@ -const char loaders_rcs[] = "$Id: loaders.c,v 1.87 2011/11/06 11:53:15 fabiankeil Exp $"; +const char loaders_rcs[] = "$Id: loaders.c,v 1.88 2012/03/09 16:23:50 fabiankeil Exp $"; /********************************************************************* * * File : $Source: /cvsroot/ijbswa/current/loaders.c,v $ @@ -923,7 +923,7 @@ int load_trustfile(struct client_state *csp) */ if (trusted) { - if(++trusted_referrers < MAX_TRUSTED_REFERRERS) + if (++trusted_referrers < MAX_TRUSTED_REFERRERS) { *tl++ = b->url; } @@ -931,7 +931,7 @@ int load_trustfile(struct client_state *csp) freez(buf); } - if(trusted_referrers >= MAX_TRUSTED_REFERRERS) + if (trusted_referrers >= MAX_TRUSTED_REFERRERS) { /* * FIXME: ... after Privoxy 3.0.4 is out. diff --git a/miscutil.c b/miscutil.c index 22e7ec46..a002abb7 100644 --- a/miscutil.c +++ b/miscutil.c @@ -1,4 +1,4 @@ -const char miscutil_rcs[] = "$Id: miscutil.c,v 1.73 2012/03/04 11:52:45 fabiankeil Exp $"; +const char miscutil_rcs[] = "$Id: miscutil.c,v 1.74 2012/03/09 16:23:50 fabiankeil Exp $"; /********************************************************************* * * File : $Source: /cvsroot/ijbswa/current/miscutil.c,v $ @@ -542,11 +542,11 @@ char * make_path(const char * dir, const char * file) #ifdef AMIGA char path[512]; - if(dir) + if (dir) { - if(dir[0] == '.') + if (dir[0] == '.') { - if(dir[1] == '/') + if (dir[1] == '/') { strncpy(path,dir+2,512); } @@ -565,7 +565,7 @@ char * make_path(const char * dir, const char * file) { path[0]=0; } - if(AddPart(path,file,512)) + if (AddPart(path,file,512)) { return strdup(path); } @@ -618,12 +618,12 @@ char * make_path(const char * dir, const char * file) assert(NULL != path); #if defined(_WIN32) || defined(__OS2__) - if(path[strlen(path)-1] != '\\') + if (path[strlen(path)-1] != '\\') { strlcat(path, "\\", path_size); } #else /* ifndef _WIN32 || __OS2__ */ - if(path[strlen(path)-1] != '/') + if (path[strlen(path)-1] != '/') { strlcat(path, "/", path_size); } diff --git a/urlmatch.c b/urlmatch.c index c3aa96e2..c48fd385 100644 --- a/urlmatch.c +++ b/urlmatch.c @@ -1,4 +1,4 @@ -const char urlmatch_rcs[] = "$Id: urlmatch.c,v 1.67 2012/03/04 11:51:49 fabiankeil Exp $"; +const char urlmatch_rcs[] = "$Id: urlmatch.c,v 1.68 2012/03/09 16:23:50 fabiankeil Exp $"; /********************************************************************* * * File : $Source: /cvsroot/ijbswa/current/urlmatch.c,v $ @@ -1009,7 +1009,7 @@ static int simplematch(const char *pattern, const char *text) } /* Cut off extra '*'s */ - if(*pat == '*') pat++; + if (*pat == '*') pat++; /* If this is the pattern's end, fine! */ return(*pat); @@ -1374,7 +1374,7 @@ int match_portlist(const char *portlist, int port) * or, if max was omitted, between min and 65K */ *max++ = '\0'; - if(port >= atoi(min) && port <= (atoi(max) ? atoi(max) : 65535)) + if (port >= atoi(min) && port <= (atoi(max) ? atoi(max) : 65535)) { freez(portlist_copy); return(1);