diff options
author | Jason A. Donenfeld <Jason@zx2c4.com> | 2013-03-04 13:21:33 (JST) |
---|---|---|
committer | Jason A. Donenfeld <Jason@zx2c4.com> | 2013-03-04 23:12:54 (JST) |
commit | bdae1d8a8d39206ac75ab86f8e9ef53b2f29432e (patch) | |
tree | 683306f79bd96a45566879acd21e5ff085120acd /html.c | |
parent | 53bc747d311d18642fa3ad0cc0de34f3899ed1f4 (diff) | |
download | cgit-bdae1d8a8d39206ac75ab86f8e9ef53b2f29432e.zip cgit-bdae1d8a8d39206ac75ab86f8e9ef53b2f29432e.tar.gz |
White space around control verbs.
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Diffstat (limited to 'html.c')
-rw-r--r-- | html.c | 14 |
1 files changed, 7 insertions, 7 deletions
@@ -92,7 +92,7 @@ void html_status(int code, const char *msg, int more_headers) | |||
92 | void html_txt(const char *txt) | 92 | void html_txt(const char *txt) |
93 | { | 93 | { |
94 | const char *t = txt; | 94 | const char *t = txt; |
95 | while(t && *t){ | 95 | while (t && *t) { |
96 | int c = *t; | 96 | int c = *t; |
97 | if (c == '<' || c == '>' || c == '&') { | 97 | if (c == '<' || c == '>' || c == '&') { |
98 | html_raw(txt, t - txt); | 98 | html_raw(txt, t - txt); |
@@ -113,7 +113,7 @@ void html_txt(const char *txt) | |||
113 | void html_ntxt(int len, const char *txt) | 113 | void html_ntxt(int len, const char *txt) |
114 | { | 114 | { |
115 | const char *t = txt; | 115 | const char *t = txt; |
116 | while(t && *t && len--){ | 116 | while (t && *t && len--) { |
117 | int c = *t; | 117 | int c = *t; |
118 | if (c == '<' || c == '>' || c == '&') { | 118 | if (c == '<' || c == '>' || c == '&') { |
119 | html_raw(txt, t - txt); | 119 | html_raw(txt, t - txt); |
@@ -136,7 +136,7 @@ void html_ntxt(int len, const char *txt) | |||
136 | void html_attr(const char *txt) | 136 | void html_attr(const char *txt) |
137 | { | 137 | { |
138 | const char *t = txt; | 138 | const char *t = txt; |
139 | while(t && *t){ | 139 | while (t && *t) { |
140 | int c = *t; | 140 | int c = *t; |
141 | if (c == '<' || c == '>' || c == '\'' || c == '\"' || c == '&') { | 141 | if (c == '<' || c == '>' || c == '\'' || c == '\"' || c == '&') { |
142 | html_raw(txt, t - txt); | 142 | html_raw(txt, t - txt); |
@@ -161,7 +161,7 @@ void html_attr(const char *txt) | |||
161 | void html_url_path(const char *txt) | 161 | void html_url_path(const char *txt) |
162 | { | 162 | { |
163 | const char *t = txt; | 163 | const char *t = txt; |
164 | while(t && *t){ | 164 | while (t && *t) { |
165 | unsigned char c = *t; | 165 | unsigned char c = *t; |
166 | const char *e = url_escape_table[c]; | 166 | const char *e = url_escape_table[c]; |
167 | if (e && c != '+' && c != '&') { | 167 | if (e && c != '+' && c != '&') { |
@@ -178,7 +178,7 @@ void html_url_path(const char *txt) | |||
178 | void html_url_arg(const char *txt) | 178 | void html_url_arg(const char *txt) |
179 | { | 179 | { |
180 | const char *t = txt; | 180 | const char *t = txt; |
181 | while(t && *t){ | 181 | while (t && *t) { |
182 | unsigned char c = *t; | 182 | unsigned char c = *t; |
183 | const char *e = url_escape_table[c]; | 183 | const char *e = url_escape_table[c]; |
184 | if (c == ' ') | 184 | if (c == ' ') |
@@ -260,7 +260,7 @@ int html_include(const char *filename) | |||
260 | filename, strerror(errno), errno); | 260 | filename, strerror(errno), errno); |
261 | return -1; | 261 | return -1; |
262 | } | 262 | } |
263 | while((len = fread(buf, 1, 4096, f)) > 0) | 263 | while ((len = fread(buf, 1, 4096, f)) > 0) |
264 | html_raw(buf, len); | 264 | html_raw(buf, len); |
265 | fclose(f); | 265 | fclose(f); |
266 | return 0; | 266 | return 0; |
@@ -310,7 +310,7 @@ int http_parse_querystring(const char *txt_, void (*fn)(const char *name, const | |||
310 | printf("Out of memory\n"); | 310 | printf("Out of memory\n"); |
311 | exit(1); | 311 | exit(1); |
312 | } | 312 | } |
313 | while((c=*t) != '\0') { | 313 | while ((c=*t) != '\0') { |
314 | if (c == '=') { | 314 | if (c == '=') { |
315 | *t = '\0'; | 315 | *t = '\0'; |
316 | value = t + 1; | 316 | value = t + 1; |