X-Git-Url: http://www.privoxy.org/gitweb/?p=privoxy.git;a=blobdiff_plain;f=encode.c;h=d7418eeb582a4d56e8b921f24b2107ea5838e00f;hp=954e4529673c0a0989815701fb11912c8937c84f;hb=a8214172984f66ffd964e1e749ca2682dd958947;hpb=f8cf51260d1cf5afa46a8289924156acd2db67c2 diff --git a/encode.c b/encode.c index 954e4529..d7418eeb 100644 --- a/encode.c +++ b/encode.c @@ -1,4 +1,4 @@ -const char encode_rcs[] = "$Id: encode.c,v 1.23 2011/11/06 11:44:56 fabiankeil Exp $"; +const char encode_rcs[] = "$Id: encode.c,v 1.26 2012/03/09 16:24:36 fabiankeil Exp $"; /********************************************************************* * * File : $Source: /cvsroot/ijbswa/current/encode.c,v $ @@ -142,10 +142,10 @@ char * html_encode(const char *s) { char c; char * p = buf; - while ( (c = *s++) != '\0') + 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); @@ -236,7 +236,7 @@ char * url_encode(const char *s) { char c; char * p = buf; - while( (c = *s++) != '\0') + while((c = *s++) != '\0') { const char *replace_with = url_code_map[(unsigned char) c]; if (*replace_with != '\0') @@ -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; } @@ -428,7 +428,7 @@ char *percent_encode_url(const char *s) { char c; char *p = buf; - while((c = *s++) != '\0') + while ((c = *s++) != '\0') { const unsigned int i = (unsigned char)c; if (i >= sizeof(allowed_characters) || '\0' == allowed_characters[i])