From f0e66866f585c185319a287df3dec5dc482e2463 Mon Sep 17 00:00:00 2001 From: Laurent MONIN Date: Fri, 14 Sep 2007 15:12:32 +0200 Subject: [PATCH] Trim trailing whitespaces. --- contrib/proxy/gen.c | 2 +- src/cookies/cookies.c | 4 ++-- src/document/html/parser/general.c | 2 +- src/document/html/parser/parse.c | 2 +- src/document/html/renderer.c | 2 +- src/ecmascript/ecmascript.h | 2 +- src/ecmascript/see/window.h | 2 +- src/encoding/bzip2.c | 12 ++++++------ src/protocol/fsp/fsp.c | 2 +- src/protocol/ftp/ftp.c | 2 +- src/protocol/http/http.c | 6 +++--- src/protocol/user.c | 2 +- src/scripting/smjs/cache_object.c | 2 +- src/terminal/draw.h | 2 +- src/util/memlist.c | 2 +- src/util/profile.h | 2 +- src/util/secsave.c | 2 +- 17 files changed, 25 insertions(+), 25 deletions(-) diff --git a/contrib/proxy/gen.c b/contrib/proxy/gen.c index 59d1b2b1f..6e7807aba 100644 --- a/contrib/proxy/gen.c +++ b/contrib/proxy/gen.c @@ -95,7 +95,7 @@ parse(void) space = strchr(current, ' '); if (!space) return; - + host = find(space + 1, "Host: "); if (!host) return; diff --git a/src/cookies/cookies.c b/src/cookies/cookies.c index de9f4d429..639e8a605 100644 --- a/src/cookies/cookies.c +++ b/src/cookies/cookies.c @@ -835,7 +835,7 @@ save_cookies(struct terminal *term) { time_t now; #ifdef CONFIG_SMALL -# define CANNOT_SAVE_COOKIES(flags, message) +# define CANNOT_SAVE_COOKIES(flags, message) #else # define CANNOT_SAVE_COOKIES(flags, message) \ do { \ @@ -894,7 +894,7 @@ save_cookies(struct terminal *term) { CANNOT_SAVE_COOKIES(MSGBOX_NO_TEXT_INTL, secsave_strerror(secsave_errno, term)); } -#undef CANNOT_SAVE_COOKIES +#undef CANNOT_SAVE_COOKIES } static void diff --git a/src/document/html/parser/general.c b/src/document/html/parser/general.c index bd653a5c6..3b38a7ff7 100644 --- a/src/document/html/parser/general.c +++ b/src/document/html/parser/general.c @@ -123,7 +123,7 @@ html_quote_close(struct html_context *html_context, unsigned char *a, unsigned char **xxx5) { unsigned char *q; - + if (html_context->quote_level > 0) html_context->quote_level--; diff --git a/src/document/html/parser/parse.c b/src/document/html/parser/parse.c index 2169035c8..fcf343213 100644 --- a/src/document/html/parser/parse.c +++ b/src/document/html/parser/parse.c @@ -616,7 +616,7 @@ count_newline_entities(const unsigned char *html, const unsigned char *eof, if (peek == eof || *peek != ';') break; ++peek; - + if (this_is_cr || !prev_was_cr) ++newlines; prev_was_cr = this_is_cr; diff --git a/src/document/html/renderer.c b/src/document/html/renderer.c index 836b45a09..9eb5282a9 100644 --- a/src/document/html/renderer.c +++ b/src/document/html/renderer.c @@ -161,7 +161,7 @@ realloc_line(struct html_context *html_context, struct document *document, line = &document->data[y]; orig_length = line->length; - + if (length < orig_length) return orig_length; diff --git a/src/ecmascript/ecmascript.h b/src/ecmascript/ecmascript.h index ceac6eab3..e39bf4e16 100644 --- a/src/ecmascript/ecmascript.h +++ b/src/ecmascript/ecmascript.h @@ -29,7 +29,7 @@ struct ecmascript_interpreter { /* The code evaluated by setTimeout() */ struct string code; - + time_t exec_start; /* This is a cross-rerenderings accumulator of diff --git a/src/ecmascript/see/window.h b/src/ecmascript/see/window.h index 76bd1adc3..0511c53b2 100644 --- a/src/ecmascript/see/window.h +++ b/src/ecmascript/see/window.h @@ -19,7 +19,7 @@ struct js_window_object { struct global_object { struct SEE_interpreter interp; /* used by setTimeout */ - struct ecmascript_interpreter *interpreter; + struct ecmascript_interpreter *interpreter; struct js_window_object *win; struct string *ret; int exec_start; diff --git a/src/encoding/bzip2.c b/src/encoding/bzip2.c index 9df4c658c..87434b15e 100644 --- a/src/encoding/bzip2.c +++ b/src/encoding/bzip2.c @@ -66,7 +66,7 @@ bzip2_open(struct stream_encoded *stream, int fd) copy_struct(&data->fbz_stream, &null_bz_stream); data->fdread = fd; data->last_read = 0; - + err = BZ2_bzDecompressInit(&data->fbz_stream, 0, 0); if (err != BZ_OK) { mem_free(data); @@ -86,14 +86,14 @@ bzip2_read(struct stream_encoded *stream, unsigned char *buf, int len) if (!data) return -1; - assert(len > 0); + assert(len > 0); if (data->last_read) return 0; data->fbz_stream.avail_out = len; data->fbz_stream.next_out = buf; - do { + do { if (data->fbz_stream.avail_in == 0) { int l = safe_read(data->fdread, data->buf, ELINKS_BZ_BUFFER_LENGTH); @@ -111,12 +111,12 @@ bzip2_read(struct stream_encoded *stream, unsigned char *buf, int len) data->fbz_stream.next_in = data->buf; data->fbz_stream.avail_in = l; } - + err = BZ2_bzDecompress(&data->fbz_stream); - if (err == BZ_STREAM_END) { + if (err == BZ_STREAM_END) { data->last_read = 1; break; - } else if (err != BZ_OK) { + } else if (err != BZ_OK) { return -1; } } while (data->fbz_stream.avail_out > 0); diff --git a/src/protocol/fsp/fsp.c b/src/protocol/fsp/fsp.c index 04bd3df14..06b24efc0 100644 --- a/src/protocol/fsp/fsp.c +++ b/src/protocol/fsp/fsp.c @@ -147,7 +147,7 @@ display_entry(const FSP_RDENTRY *fentry, const unsigned char dircolor[]) add_to_string(&string, "\tname, namelen, 0); + encode_uri_string(&string, fentry->name, namelen, 0); if (fentry->type == FSP_RDTYPE_DIR) { add_to_string(&string, "/\">"); if (*dircolor) { diff --git a/src/protocol/ftp/ftp.c b/src/protocol/ftp/ftp.c index 11587ee32..13201275d 100644 --- a/src/protocol/ftp/ftp.c +++ b/src/protocol/ftp/ftp.c @@ -725,7 +725,7 @@ add_file_cmd_to_str(struct connection *conn) || !add_crlf_to_string(&command) || !add_string_to_string(&command, &ftp_data_command) - + || !add_to_string(&command, "CWD ") || !add_string_to_string(&command, &pathname) || !add_crlf_to_string(&command) diff --git a/src/protocol/http/http.c b/src/protocol/http/http.c index e3c262aaa..bf675121c 100644 --- a/src/protocol/http/http.c +++ b/src/protocol/http/http.c @@ -702,7 +702,7 @@ http_send_header(struct socket *socket) } /* CONNECT: Referer probably is a secret page in the HTTPS - * server, so don't reveal it to the proxy. */ + * server, so don't reveal it to the proxy. */ if (!use_connect) { switch (get_opt_int("protocol.http.referer.policy")) { case REFERER_NONE: @@ -1042,7 +1042,7 @@ decompress_data(struct connection *conn, unsigned char *data, int len, if (state == NORMAL) { /* ... we aren't finishing yet. */ int written; - + written = safe_write(conn->stream_pipes[1], data, len > to_read ? to_read : len); @@ -1071,7 +1071,7 @@ decompress_data(struct connection *conn, unsigned char *data, int len, } } } - + if (!conn->stream) { conn->stream = open_encoded(conn->stream_pipes[0], conn->content_encoding); diff --git a/src/protocol/user.c b/src/protocol/user.c index e0b3f6288..f0bcc5dbf 100644 --- a/src/protocol/user.c +++ b/src/protocol/user.c @@ -253,7 +253,7 @@ error: fclose(fp); goto error; } - + if (fclose(fp) != 0) goto error; diff --git a/src/scripting/smjs/cache_object.c b/src/scripting/smjs/cache_object.c index 393f664a9..8d2a44d90 100644 --- a/src/scripting/smjs/cache_object.c +++ b/src/scripting/smjs/cache_object.c @@ -49,7 +49,7 @@ cache_entry_get_property(JSContext *ctx, JSObject *obj, jsval id, jsval *vp) if (!JS_InstanceOf(ctx, obj, (JSClass *) &cache_entry_class, NULL)) return JS_FALSE; - cached = JS_GetInstancePrivate(ctx, obj, + cached = JS_GetInstancePrivate(ctx, obj, (JSClass *) &cache_entry_class, NULL); if (!cache_entry_is_valid(cached)) return JS_FALSE; diff --git a/src/terminal/draw.h b/src/terminal/draw.h index 91e4a03a3..6dcd31afa 100644 --- a/src/terminal/draw.h +++ b/src/terminal/draw.h @@ -54,7 +54,7 @@ struct screen_char { unsigned char color[SCREEN_COLOR_SIZE]; }; -/** @relates screen_char */ +/** @relates screen_char */ #define copy_screen_chars(to, from, amount) \ do { memcpy(to, from, (amount) * sizeof(struct screen_char)); } while (0) diff --git a/src/util/memlist.c b/src/util/memlist.c index a50e96ad1..8a7c10b9c 100644 --- a/src/util/memlist.c +++ b/src/util/memlist.c @@ -97,7 +97,7 @@ add_to_ml(struct memory_list **ml, ...) errline = line, errfile = file; #else errline = 0, errfile = "?"; -#endif +#endif elinks_error("add_to_ml(%p, NULL, ...)", ml); #endif return; diff --git a/src/util/profile.h b/src/util/profile.h index 6568c6e2b..4570e9b04 100644 --- a/src/util/profile.h +++ b/src/util/profile.h @@ -1,4 +1,4 @@ -/** Process' CPU time utilities +/** Process' CPU time utilities * @file*/ #ifndef EL__UTIL_PROFILE_H diff --git a/src/util/secsave.c b/src/util/secsave.c index e02f71b18..7c8451436 100644 --- a/src/util/secsave.c +++ b/src/util/secsave.c @@ -213,7 +213,7 @@ secure_open(unsigned char *file_name) #else const mode_t mask = S_IXUSR | S_IRWXG | S_IRWXO; #endif - + saved_mask = umask(mask); ssi = secure_open_umask(file_name); umask(saved_mask);