From 74e2b217b209baa3d0cfe5b01e6988ca3b5e2974 Mon Sep 17 00:00:00 2001 From: Kalle Olavi Niemitalo Date: Wed, 8 Nov 2006 20:53:01 +0200 Subject: [PATCH 01/20] THANKS: Remove link to HSTI webpage as the domain is for sale. --- THANKS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/THANKS b/THANKS index 5438a2522..a49c01d77 100644 --- a/THANKS +++ b/THANKS @@ -6,7 +6,7 @@ Thanks also to Karel Kulhavy, Petr Kulhavy and Michal Pergel for giving inspiration to new features, and longer hours and constant amusement when deciphering code produced by them. -Thanks to HSTI (http://www.hsti.com/) for sponsoring ELinks development. +Thanks to HSTI for sponsoring ELinks development. Thanks to Gerard Beekmans for providing us the resources for our mailing lists at linuxfromscratch.org servers. From 810a1fc591c9ab67d11a3a3a24d82a9c1f7bbafa Mon Sep 17 00:00:00 2001 From: Miciah Dashiel Butler Masters Date: Fri, 10 Nov 2006 15:57:23 +0000 Subject: [PATCH 02/20] data_compress: fix problem with decompression after recent change Fix bug 834 (various gzip-encoded documents were being truncated), which I introduced with commit e441361f2c51c0ece87afc3ed68e5c6ea5522f13. Thanks to Witek for reporting the bug, Kalle for determining the problematic commit, and Jonas for letting me know about the bug report(!). --- src/protocol/http/http.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/protocol/http/http.c b/src/protocol/http/http.c index 25502602c..58b9e1004 100644 --- a/src/protocol/http/http.c +++ b/src/protocol/http/http.c @@ -1024,7 +1024,9 @@ decompress_data(struct connection *conn, unsigned char *data, int len, return output; } } - } else { + } + + if (state == FINISHING) { /* state is FINISHING. Set to_read to some nice, big * value to empty the encoded output queue by reading * big chunks from it. */ From 18f30e7886bb98f692c28dd4b6727358ed1202a1 Mon Sep 17 00:00:00 2001 From: Kalle Olavi Niemitalo Date: Sat, 11 Nov 2006 14:12:39 +0200 Subject: [PATCH 03/20] decompress_data: Always initialize to_read, avoiding a GCC warning. "'to_read' may be used uninitialized in this function" was a false warning but removing it will make important warnings easier to see. --- src/protocol/http/http.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/protocol/http/http.c b/src/protocol/http/http.c index 58b9e1004..00c7bfbea 100644 --- a/src/protocol/http/http.c +++ b/src/protocol/http/http.c @@ -990,13 +990,14 @@ decompress_data(struct connection *conn, unsigned char *data, int len, } do { - int to_read; + /* The initial value is used only when state == NORMAL. + * Unconditional initialization avoids a GCC warning. */ + int to_read = PIPE_BUF / 2; if (state == NORMAL) { /* ... we aren't finishing yet. */ int written; - to_read = PIPE_BUF / 2; written = safe_write(conn->stream_pipes[1], data, len > to_read ? to_read : len); From 104059f7a3bb50f453d27af2b52b22e8e089a4b0 Mon Sep 17 00:00:00 2001 From: Jonas Fonseca Date: Sat, 11 Nov 2006 14:48:34 +0100 Subject: [PATCH 04/20] Convert AUTHORS file to use UTF-8 encoding --- AUTHORS | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/AUTHORS b/AUTHORS index 54620b4ad..a1abcbe70 100644 --- a/AUTHORS +++ b/AUTHORS @@ -17,7 +17,7 @@ Adam Golebiowski Adam Harvey Fixed sometimes badly posted form -Alberto García +Alberto García Galician translation Aldy Hernandez @@ -85,7 +85,7 @@ Bennett Todd Bunch HTML renderer hacking -Carles Sadurní Anguita +Carles Sadurní Anguita Catalan translation Csaba Raduly @@ -97,7 +97,7 @@ Christian Biesinger Christian Cornelssen Lua5 support -Christian Häggström +Christian Häggström Fixes in parse_http_date() Cliff Cunnington @@ -189,7 +189,7 @@ Flemming Frandsen accesskey,tabindex support Referred as 'ff' or 'FF' in the code -Frédéric L. W. Meunier <0@pervalidus.tk> +Frédéric L. W. Meunier <0@pervalidus.tk> Minor documentation updates Friedel Wolff @@ -253,7 +253,7 @@ Jonas Fonseca BFU and document management hacking Random hacking -Jonas Kölker +Jonas Kölker Handling of quotes. Jon Shapcott @@ -265,7 +265,7 @@ John Johannes Zellner Minor misc hacking -José Luis González González +José Luis González González MIME types documentation Referred as 'Jose' @@ -293,7 +293,7 @@ Karel Zak Support for negotiate-auth based on GSSAPI Minor bug fixes -Karsten Schölzel +Karsten Schölzel Event system chief engineer Scripting subsystem hacking Regex searches @@ -323,7 +323,7 @@ Laurent Monin Lewis Collard Fixed mmap() usage on FreeBSD -Lilja Heiðarsdottir Fjeldsted +Lilja Heiðarsdottir Fjeldsted BitTorrent support Lukasz Dobrek @@ -477,7 +477,7 @@ Pixel Radovan Stas Slovak translation -Raúl Núñez de Arenas Coronado +Raúl Núñez de Arenas Coronado get_unique_name() fix. Russ Rowan (Apu) @@ -563,7 +563,7 @@ Uwe Hermann Unai Uribarri History -Varga Balázs +Varga Balázs Hungarian translation updates Vitaly Lavrov From c283b128b6d2a508f601788ee2142e2cfe19f0b6 Mon Sep 17 00:00:00 2001 From: Kalle Olavi Niemitalo Date: Sat, 11 Nov 2006 20:31:25 +0200 Subject: [PATCH 05/20] Bug 387: Treat inside
...
as a newline. Recognize all of with any number of leading zeroes. (Previously only and were supported.) All of these are case insensitive. Treat each CR+LF combination ( ) as a single newline. --- src/document/html/parser/parse.c | 71 ++++++++++++++++++++++++++++---- 1 file changed, 63 insertions(+), 8 deletions(-) diff --git a/src/document/html/parser/parse.c b/src/document/html/parser/parse.c index cdfc6a244..46e636f8f 100644 --- a/src/document/html/parser/parse.c +++ b/src/document/html/parser/parse.c @@ -565,6 +565,67 @@ static unsigned char *process_element(unsigned char *name, int namelen, int endi unsigned char *eof, unsigned char *attr, struct html_context *html_context); +/* Count the consecutive newline entity references (e.g. " ") at + * the beginning of the range from @html to @eof. Store the number of + * newlines to *@newlines_out and return the address where they end. + * + * This function currently requires a semicolon at the end of any + * entity reference, and does not support U+2028 LINE SEPARATOR and + * U+2029 PARAGRAPH SEPARATOR. */ +static const unsigned char * +count_newline_entities(const unsigned char *html, const unsigned char *eof, + int *newlines_out) +{ + int newlines = 0; + int prev_was_cr = 0; /* treat CRLF as one newline, not two */ + + while ((html + 5 < eof && html[0] == '&' && html[1] == '#')) { + const unsigned char *peek = html + 2; + int this_is_cr; + + if (*peek == 'x' || *peek == 'X') { + ++peek; + while (peek < eof && *peek == '0') + ++peek; + if (peek == eof) + break; + else if (*peek == 'a' || *peek == 'A') + this_is_cr = 0; + else if (*peek == 'd' || *peek == 'D') + this_is_cr = 1; + else + break; + ++peek; + } else { + while (peek < eof && *peek == '0') + ++peek; + if (eof - peek < 2 || *peek != '1') + break; + else if (peek[1] == '0') + this_is_cr = 0; + else if (peek[1] == '3') + this_is_cr = 1; + else + break; + peek += 2; + } + /* @peek should now be pointing to the semicolon of + * e.g. " " or " ". Or more digits might + * follow. */ + if (peek == eof || *peek != ';') + break; + ++peek; + + if (this_is_cr || !prev_was_cr) + ++newlines; + prev_was_cr = this_is_cr; + html = peek; + } + + *newlines_out = newlines; + return html; +} + void parse_html(unsigned char *html, unsigned char *eof, struct part *part, unsigned char *head, @@ -666,15 +727,9 @@ next_break: * checking for '\n's in AT_PREFORMATTED text. */ /* See bug 52 and 387 for more info. */ int length = html - base_pos; - int newlines = 0; - - while ((html + 5 < eof && html[0] == '&' && html[1] == '#') - && (!memcmp(html + 2, "13;", 3) - || (html + 6 < eof && !strncasecmp(html + 2, "x0a;", 4)))) { - newlines++; - html += 5 + (html[4] != ';'); - } + int newlines; + html = (unsigned char *) count_newline_entities(html, eof, &newlines); if (newlines) { put_chrs(html_context, base_pos, length); ln_break(html_context, newlines); From 40b6edc69ddbf4386bf0079dd173577f0a972b25 Mon Sep 17 00:00:00 2001 From: Kalle Olavi Niemitalo Date: Mon, 2 Oct 2006 00:33:41 +0200 Subject: [PATCH 06/20] u2cp_: Make the no_nbsp_hack parameter an enum. This is from attachment 279 of bug 811. The change does not yet affect any visible behaviour. --- src/intl/charsets.c | 9 ++++++--- src/intl/charsets.h | 17 ++++++++++++++--- 2 files changed, 20 insertions(+), 6 deletions(-) diff --git a/src/intl/charsets.c b/src/intl/charsets.c index 9f7882152..047beb1f5 100644 --- a/src/intl/charsets.c +++ b/src/intl/charsets.c @@ -164,7 +164,7 @@ static const unicode_val_T strange_chars[32] = { #define is_cp_ptr_utf8(cp_ptr) ((cp_ptr)->aliases == aliases_utf8) unsigned char * -u2cp_(unicode_val_T u, int to, int no_nbsp_hack) +u2cp_(unicode_val_T u, int to, enum nbsp_mode nbsp_mode) { int j; int s; @@ -179,14 +179,17 @@ u2cp_(unicode_val_T u, int to, int no_nbsp_hack) #endif /* CONFIG_UTF8 */ /* To mark non breaking spaces, we use a special char NBSP_CHAR. */ - if (u == 0xa0) return no_nbsp_hack ? " " : NBSP_CHAR_STRING; + if (u == 0xa0) { + if (nbsp_mode == NBSP_MODE_HACK) return NBSP_CHAR_STRING; + else /* NBSP_MODE_ASCII */ return " "; + } if (u == 0xad) return ""; if (u < 0xa0) { unicode_val_T strange = strange_chars[u - 0x80]; if (!strange) return NULL; - return u2cp_(strange, to, no_nbsp_hack); + return u2cp_(strange, to, nbsp_mode); } if (u < 0xFFFF) diff --git a/src/intl/charsets.h b/src/intl/charsets.h index 841d3da26..65cfc9994 100644 --- a/src/intl/charsets.h +++ b/src/intl/charsets.h @@ -35,6 +35,17 @@ enum convert_string_mode { CSM_NONE, /* Convert nothing. */ }; +/* How to translate non-breaking spaces. */ +enum nbsp_mode { + /* Convert to NBSP_CHAR. This lets the HTML renderer + * recognize nbsp even if the codepage doesn't support + * nbsp. (VISCII doesn't.) */ + NBSP_MODE_HACK = 0, + + /* Convert to normal ASCII space. */ + NBSP_MODE_ASCII = 1 +}; + struct conv_table *get_translation_table(int, int); unsigned char *get_entity_string(const unsigned char *str, const int strlen, int encoding); @@ -101,9 +112,9 @@ unicode_val_T cp_to_unicode(int, unsigned char **, unsigned char *); unicode_val_T cp2u(int, unsigned char); unsigned char *cp2utf8(int, int); -unsigned char *u2cp_(unicode_val_T, int, int no_nbsp_hack); -#define u2cp(u, to) u2cp_(u, to, 0) -#define u2cp_no_nbsp(u, to) u2cp_(u, to, 1) +unsigned char *u2cp_(unicode_val_T, int, enum nbsp_mode); +#define u2cp(u, to) u2cp_(u, to, NBSP_MODE_HACK) +#define u2cp_no_nbsp(u, to) u2cp_(u, to, NBSP_MODE_ASCII) void init_charsets_lookup(void); void free_charsets_lookup(void); From 7809efa1b529c5c2a9af27e338b32905bb027ada Mon Sep 17 00:00:00 2001 From: Kalle Olavi Niemitalo Date: Sun, 12 Nov 2006 14:51:18 +0200 Subject: [PATCH 07/20] Names of enum constants should be in upper case. Requested by Miciah. --- doc/hacking.txt | 2 ++ src/intl/charsets.c | 16 ++++++++-------- src/intl/charsets.h | 6 +++--- src/viewer/text/form.c | 4 ++-- 4 files changed, 15 insertions(+), 13 deletions(-) diff --git a/doc/hacking.txt b/doc/hacking.txt index cf31e0044..140adf500 100644 --- a/doc/hacking.txt +++ b/doc/hacking.txt @@ -495,6 +495,8 @@ Please write sizeof(something) instead of sizeof something. Use assert() and assertm() where applicable. It will prevent hidden bugs. +Names of enum constants should be in upper case. + If you see code in ELinks that doesn't follow these rules, fix it or tell us about it. diff --git a/src/intl/charsets.c b/src/intl/charsets.c index 047beb1f5..530778be9 100644 --- a/src/intl/charsets.c +++ b/src/intl/charsets.c @@ -433,7 +433,7 @@ utf8_step_forward(unsigned char *string, unsigned char *end, end = strchr(string, '\0'); switch (way) { - case utf8_step_characters: + case UTF8_STEP_CHARACTERS: while (steps < max && current < end) { ++current; if (utf8_islead(*current)) @@ -441,8 +441,8 @@ utf8_step_forward(unsigned char *string, unsigned char *end, } break; - case utf8_step_cells_fewer: - case utf8_step_cells_more: + case UTF8_STEP_CELLS_FEWER: + case UTF8_STEP_CELLS_MORE: while (steps < max) { unicode_val_T u; unsigned char *prev = current; @@ -458,7 +458,7 @@ utf8_step_forward(unsigned char *string, unsigned char *end, } width = unicode_to_cell(u); - if (way == utf8_step_cells_fewer + if (way == UTF8_STEP_CELLS_FEWER && steps + width > max) { /* Back off. */ current = prev; @@ -500,7 +500,7 @@ utf8_step_backward(unsigned char *string, unsigned char *start, if_assert_failed goto invalid_arg; switch (way) { - case utf8_step_characters: + case UTF8_STEP_CHARACTERS: while (steps < max && current > start) { --current; if (utf8_islead(*current)) @@ -508,8 +508,8 @@ utf8_step_backward(unsigned char *string, unsigned char *start, } break; - case utf8_step_cells_fewer: - case utf8_step_cells_more: + case UTF8_STEP_CELLS_FEWER: + case UTF8_STEP_CELLS_MORE: while (steps < max) { unsigned char *prev = current; unsigned char *look; @@ -531,7 +531,7 @@ utf8_step_backward(unsigned char *string, unsigned char *start, } else width = unicode_to_cell(u); - if (way == utf8_step_cells_fewer + if (way == UTF8_STEP_CELLS_FEWER && steps + width > max) { /* Back off. */ current = prev; diff --git a/src/intl/charsets.h b/src/intl/charsets.h index 65cfc9994..25e14a324 100644 --- a/src/intl/charsets.h +++ b/src/intl/charsets.h @@ -86,17 +86,17 @@ int utf8_cells2bytes(unsigned char *, int, unsigned char *); enum utf8_step { /* Each step is one character, even if it is a combining or * double-width character. */ - utf8_step_characters, + UTF8_STEP_CHARACTERS, /* Each step is one cell. If the specified number of steps * would end in the middle of a double-width character, do not * include the character. */ - utf8_step_cells_fewer, + UTF8_STEP_CELLS_FEWER, /* Each step is one cell. If the specified number of steps * would end in the middle of a double-width character, * include the whole character. */ - utf8_step_cells_more + UTF8_STEP_CELLS_MORE }; unsigned char *utf8_step_forward(unsigned char *, unsigned char *, int, enum utf8_step, int *); diff --git a/src/viewer/text/form.c b/src/viewer/text/form.c index 0695874b1..fa4305230 100644 --- a/src/viewer/text/form.c +++ b/src/viewer/text/form.c @@ -462,8 +462,8 @@ drew_char: unsigned char *ptr = fs->value + fs->state; int cells = fc->size; enum utf8_step how = (fc->type == FC_PASSWORD) - ? utf8_step_characters - : utf8_step_cells_fewer; + ? UTF8_STEP_CHARACTERS + : UTF8_STEP_CELLS_FEWER; /* The insertion point is at the right * side of the scrolled-visible part From cb02b46154a178fccbe4a3ac0170d6823dadaa83 Mon Sep 17 00:00:00 2001 From: Kalle Olavi Niemitalo Date: Sun, 12 Nov 2006 18:47:07 +0200 Subject: [PATCH 08/20] Bug 153: Refer to the bug from the docstring of bookmarks.file_format. When I first read the warning about "NO NATIONAL CHARS SUPPORT!" I was amazed: XML is based on Unicode, so why would the authors of the XBEL specification have botched support for those characters? The bug is actually in the ELinks implementation of XBEL, and it has already been entered in the ELinks bugzilla. Make the documentation string refer to that. --- src/bookmarks/bookmarks.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/bookmarks/bookmarks.c b/src/bookmarks/bookmarks.c index 4ff0a1aa6..e1722094b 100644 --- a/src/bookmarks/bookmarks.c +++ b/src/bookmarks/bookmarks.c @@ -54,13 +54,13 @@ static struct option_info bookmark_options_info[] = { "file_format", 0, 0, 1, 0, N_("File format for bookmarks (affects both reading and saving):\n" "0 is the default native ELinks format\n" - "1 is XBEL universal XML bookmarks format (NO NATIONAL CHARS SUPPORT!)")), + "1 is XBEL universal XML bookmarks format (ELinks bug 153: NO NATIONAL CHARS SUPPORT!)")), #else INIT_OPT_INT("bookmarks", N_("File format"), "file_format", 0, 0, 1, 0, N_("File format for bookmarks (affects both reading and saving):\n" "0 is the default native ELinks format\n" - "1 is XBEL universal XML bookmarks format (NO NATIONAL CHARS SUPPORT!)" + "1 is XBEL universal XML bookmarks format (ELinks bug 153: NO NATIONAL CHARS SUPPORT!)" " (DISABLED)")), #endif From 89fd7efa3aeb3d6e0b91e3d60a321fe5e263fff1 Mon Sep 17 00:00:00 2001 From: Jonas Fonseca Date: Sun, 12 Nov 2006 18:48:16 +0100 Subject: [PATCH 09/20] Fix misparsing of -remote URLs containing parenthesis (bug 830) Be more strict about the format accepted by the ELinks specific extension to the -remote URL syntax. That is, commands must begin with a nonempty sequence of ASCII alphabetic characters followed by optional whitespace and an opening parenthesis. Also, document the syntax. Fixes bug 830. --- doc/remote.txt | 5 ++++- src/config/cmdline.c | 23 +++++++++++++++-------- 2 files changed, 19 insertions(+), 9 deletions(-) diff --git a/doc/remote.txt b/doc/remote.txt index 587bda7a5..dfe92ba32 100644 --- a/doc/remote.txt +++ b/doc/remote.txt @@ -10,7 +10,10 @@ When invoking ELinks with the -remote argument, it does not start a new instance, but instead connects to an already running ELinks, making it possible to control that ELinks instance. The -remote command line switch takes a command consisting of the action to invoke and any parameters to the -action. Here is an example for opening freshmeat.net in a new tab: +action. Commands must begin with a nonempty sequence of ASCII alphabetic +characters followed by optional whitespace and an opening parenthesis. They +must end with a closing parenthesis optionally followed by whitespace. Here is +an example for opening freshmeat.net in a new tab: $ elinks -remote "openURL(http://freshmeat.net/, new-tab)" diff --git a/src/config/cmdline.c b/src/config/cmdline.c index 113287f6b..b32dccbb9 100644 --- a/src/config/cmdline.c +++ b/src/config/cmdline.c @@ -218,7 +218,7 @@ remote_cmd(struct option *o, unsigned char ***argv, int *argc) { "xfeDoCommand", REMOTE_METHOD_XFEDOCOMMAND }, { NULL, REMOTE_METHOD_NOT_SUPPORTED }, }; - unsigned char *command, *arg, *argend = NULL; + unsigned char *command, *arg, *argend; int method, len = 0; if (*argc < 1) return gettext("Parameter expected"); @@ -228,20 +228,27 @@ remote_cmd(struct option *o, unsigned char ***argv, int *argc) while (isalpha(command[len])) len++; - arg = strchr(&command[len], '('); - if (arg) { - arg++; - skip_space(arg); + /* Find the begining and end of the argument list. */ - argend = strchr(arg, ')'); - } + arg = command + len; + skip_space(arg); - if (!argend) { + argend = arg + strlen(arg); + skipback_whitespace(arg, argend); + if (argend > arg) + argend--; + + /* Decide whether to use the "extended" --remote format where + * all URLs following should be opened in tabs. */ + if (*arg != '(' || *argend != ')') { /* Just open any passed URLs in new tabs */ remote_session_flags |= SES_REMOTE_NEW_TAB; return NULL; } + /* Skip parenthesis and surrounding whitespace. */ + arg++; + skip_space(arg); skipback_whitespace(arg, argend); for (method = 0; remote_methods[method].name; method++) { From 8b8cd5794175d8e452846bbc8ef1ff1160725cd1 Mon Sep 17 00:00:00 2001 From: Kalle Olavi Niemitalo Date: Sun, 12 Nov 2006 19:53:31 +0200 Subject: [PATCH 10/20] Use new macro UCS_ORPHAN_CELL for broken double-cell characters. UCS_ORPHAN_CELL is currently defined as U+0020 SPACE, which was already used before this macro, so the behaviour does not change, but the code seems clearer now. I searched for ' ' and 32 and 0x20 and \x20, and replaced with UCS_ORPHAN_CELL wherever UCS_NO_CHAR was involved. However, some BFU widgets first draw spaces and then overwrite with text; those will require a more complex fix if UCS_ORPHAN_CELL is ever changed to some other character. --- src/bfu/menu.c | 8 ++++---- src/intl/charsets.h | 11 +++++++++++ src/terminal/draw.c | 22 +++++++++++----------- src/viewer/text/form.c | 9 +++++---- 4 files changed, 31 insertions(+), 19 deletions(-) diff --git a/src/bfu/menu.c b/src/bfu/menu.c index 3bbfbc997..2bee057a1 100644 --- a/src/bfu/menu.c +++ b/src/bfu/menu.c @@ -483,7 +483,7 @@ utf8: UCS_NO_CHAR, 0, hk_color); } else { draw_char(term, xbase + x - 1, y, - ' ', 0, hk_color); + UCS_ORPHAN_CELL, 0, hk_color); } } else { #ifdef CONFIG_DEBUG @@ -508,7 +508,7 @@ utf8: y, UCS_NO_CHAR, 0, color); } else { draw_char(term, xbase + x - !!hk_state, - y, ' ', 0, color); + y, UCS_ORPHAN_CELL, 0, color); } } else { draw_char(term, xbase + x - !!hk_state, @@ -1171,10 +1171,10 @@ display_mainmenu(struct terminal *term, struct menu *menu) /* Is second cell of double-width char on the place where * first char of the R_MAINMENU_SPACE will be displayed? */ if (schar->data == UCS_NO_CHAR) { - /* Replace double-width char with ' '. */ + /* Replace double-width char with UCS_ORPHAN_CELL. */ schar++; draw_char_data(term, term->width - R_MAINMENU_SPACE - 1, - 0, ' '); + 0, UCS_ORPHAN_CELL); } } #endif diff --git a/src/intl/charsets.h b/src/intl/charsets.h index 25e14a324..34c416869 100644 --- a/src/intl/charsets.h +++ b/src/intl/charsets.h @@ -16,6 +16,17 @@ typedef uint32_t unicode_val_T; * for the second cell of a double-cell character. */ #define UCS_NO_CHAR ((unicode_val_T) 0xFFFFFFFD) +/* If ELinks should display a double-cell character but there is only + * one cell available, it displays this character instead. This must + * be a single-cell character but need not be unique. Possible values + * might be U+0020 SPACE or U+303F IDEOGRAPHIC HALF FILL SPACE. + * + * Some BFU widgets (at least input fields and list boxes) currently + * ignore this setting and use U+0020 instead. (They first draw spaces + * and then overwrite with text; look for utf8_cells2bytes calls.) + * We should fix that if we ever change the value. */ +#define UCS_ORPHAN_CELL ((unicode_val_T) 0x20) + /*   replacement character. See u2cp(). */ #define NBSP_CHAR ((unsigned char) 1) #define NBSP_CHAR_STRING "\001" diff --git a/src/terminal/draw.c b/src/terminal/draw.c index e3ba49959..5e81e2b75 100644 --- a/src/terminal/draw.c +++ b/src/terminal/draw.c @@ -160,7 +160,7 @@ draw_line(struct terminal *term, int x, int y, int l, struct screen_char *line) sc = line; data_save = sc->data; - sc->data = ' '; + sc->data = UCS_ORPHAN_CELL; copy_screen_chars(screen_char, line, 1); sc->data = data_save; size--; @@ -169,13 +169,13 @@ draw_line(struct terminal *term, int x, int y, int l, struct screen_char *line) } /* Instead of displaying double-width character at last column - * display only space. */ + * display only UCS_ORPHAN_CELL. */ if (size - 1 > 0 && unicode_to_cell(line[size - 1].data) == 2) { unicode_val_T data_save; sc = &line[size - 1]; data_save = sc->data; - sc->data = ' '; + sc->data = UCS_ORPHAN_CELL; copy_screen_chars(screen_char, line, size); sc->data = data_save; } else { @@ -256,7 +256,7 @@ draw_border(struct terminal *term, struct box *box, #ifdef CONFIG_UTF8 /* Checks cells left and right to the box for broken double-width chars. - * Replace it with ' '. + * Replace it with UCS_ORPHAN_CELL. * 1+---+3 * 1|box|##4 * 1| |##4 @@ -284,7 +284,7 @@ fix_dwchar_around_box(struct terminal *term, struct box *box, int border, schar = get_char(term, x, y); for (;height--; schar += term->width) if (unicode_to_cell(schar->data) == 2) - schar->data = ' '; + schar->data = UCS_ORPHAN_CELL; } /* 2 */ @@ -296,7 +296,7 @@ fix_dwchar_around_box(struct terminal *term, struct box *box, int border, schar = get_char(term, x, y); for (;height--; schar += term->width) if (unicode_to_cell(schar->data) == 2) - schar->data = ' '; + schar->data = UCS_ORPHAN_CELL; } /* 3 */ @@ -308,7 +308,7 @@ fix_dwchar_around_box(struct terminal *term, struct box *box, int border, schar = get_char(term, x, y); for (;height--; schar += term->width) if (schar->data == UCS_NO_CHAR) - schar->data = ' '; + schar->data = UCS_ORPHAN_CELL; } /* 4 */ @@ -320,7 +320,7 @@ fix_dwchar_around_box(struct terminal *term, struct box *box, int border, schar = get_char(term, x, y); for (;height--; schar += term->width) if (schar->data == UCS_NO_CHAR) - schar->data = ' '; + schar->data = UCS_ORPHAN_CELL; } } #endif @@ -437,7 +437,7 @@ draw_text_utf8(struct terminal *term, int x, int y, } if (start->data == UCS_NO_CHAR && x - 1 > 0) - draw_char_data(term, x - 1, y, ' '); + draw_char_data(term, x - 1, y, UCS_ORPHAN_CELL); pos = start; @@ -451,7 +451,7 @@ draw_text_utf8(struct terminal *term, int x, int y, pos->data = UCS_NO_CHAR; pos->attr = 0; } else { - pos->data = (unicode_val_T)' '; + pos->data = UCS_ORPHAN_CELL; } } else { pos->data = data; @@ -474,7 +474,7 @@ draw_text_utf8(struct terminal *term, int x, int y, pos->data = UCS_NO_CHAR; pos->attr = 0; } else { - pos->data = (unicode_val_T)' '; + pos->data = UCS_ORPHAN_CELL; } } else { pos->data = data; diff --git a/src/viewer/text/form.c b/src/viewer/text/form.c index fa4305230..83d904f4f 100644 --- a/src/viewer/text/form.c +++ b/src/viewer/text/form.c @@ -412,13 +412,14 @@ retry_after_scroll: } /* The character does not fit completely. - * Write spaces to the cells that do fit. */ + * Write UCS_ORPHAN_CELL to the cells that + * do fit. */ for (cell = 0; cell < cells; cell++) { if (col_is_in_box(box, x + i + cell) && i + cell < fc->size) draw_char_data(term, - x + i + cell, - y, ' '); + x + i + cell, y, + UCS_ORPHAN_CELL); } drew_char: @@ -538,7 +539,7 @@ utf8_select: data = UCS_NO_CHAR; i++; } else if (cell == 2) { - data = ' '; + data = UCS_ORPHAN_CELL; } } else data = '_'; From 24dbdbe899de9b75f46710b0b73886adb164c5f2 Mon Sep 17 00:00:00 2001 From: Kalle Olavi Niemitalo Date: Tue, 14 Nov 2006 00:22:06 +0200 Subject: [PATCH 11/20] Bug 830: Check -remote command names more strictly. doc/remote.txt says there must be a nonempty sequence of ASCII alphabetic characters before the opening parenthesis. Check that they really are ASCII characters and that the sequence is nonempty. Thus, elinks -remote '(foo)' now treats the string as an address, rather than as a command. --- src/config/cmdline.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/config/cmdline.c b/src/config/cmdline.c index b32dccbb9..30745ce2f 100644 --- a/src/config/cmdline.c +++ b/src/config/cmdline.c @@ -225,7 +225,7 @@ remote_cmd(struct option *o, unsigned char ***argv, int *argc) command = *(*argv); - while (isalpha(command[len])) + while (isasciialpha(command[len])) len++; /* Find the begining and end of the argument list. */ @@ -240,7 +240,7 @@ remote_cmd(struct option *o, unsigned char ***argv, int *argc) /* Decide whether to use the "extended" --remote format where * all URLs following should be opened in tabs. */ - if (*arg != '(' || *argend != ')') { + if (len == 0 || *arg != '(' || *argend != ')') { /* Just open any passed URLs in new tabs */ remote_session_flags |= SES_REMOTE_NEW_TAB; return NULL; From 3c7354b1351ee5d893a2752e3eae4a80be7a5767 Mon Sep 17 00:00:00 2001 From: Miciah Dashiel Butler Masters Date: Tue, 14 Nov 2006 00:24:20 +0000 Subject: [PATCH 12/20] Correct documentation for follow-url and goto-url Synchronise the phrasing and mention in both that either NULL or an empty, dynamically allocated string indicates that no URL should be loaded. --- doc/events.txt | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/doc/events.txt b/doc/events.txt index e7d8397b4..979c551c8 100644 --- a/doc/events.txt +++ b/doc/events.txt @@ -150,9 +150,9 @@ Description: If another URL than @url should be followed it is passed by setting @url. If @url is changed the event propagation should be ended. Valid values for @url includes: - - leaving @url unchanged if the original URL should be followed; - - NULL if no URL should be followed; or - - a dynamically allocated new URL to be followed instead. + - unchanged, if the original URL should be followed; + - a new, dynamically allocated URL to be followed instead; or + - NULL or an empty, dynamically allocated string if no URL should be followed. ------------------------------------------------------------------------------- Name: free-history @@ -206,7 +206,7 @@ Description: Valid values for @url are: - unchanged, if the original URL should be followed; - a new, dynamically allocated URL to be followed instead; or - - an empty string, if no URL should be followed. + - NULL or an empty, dynamically allocated string if no URL should be followed. @ses is usually used for deciding based on the current URI or for reporting potential errors during the hook processing through the UI. With @ses being From 39771679b342e8b26aa2cc7a23343ee6a5cb7f05 Mon Sep 17 00:00:00 2001 From: Laurent MONIN Date: Tue, 14 Nov 2006 14:46:23 +0100 Subject: [PATCH 13/20] French translation was updated. --- po/fr.po | 195 ++++++++++++++++++++++++++++--------------------------- 1 file changed, 98 insertions(+), 97 deletions(-) diff --git a/po/fr.po b/po/fr.po index d59446bb0..8e5677ad3 100644 --- a/po/fr.po +++ b/po/fr.po @@ -6,8 +6,8 @@ msgid "" msgstr "" "Project-Id-Version: ELinks 0.12.GIT\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2006-11-06 16:59+0100\n" -"PO-Revision-Date: 2006-11-06 17:01+0100\n" +"POT-Creation-Date: 2006-11-14 14:44+0100\n" +"PO-Revision-Date: 2006-11-14 14:46+0100\n" "Last-Translator: Laurent Monin \n" "Language-Team: French \n" "MIME-Version: 1.0\n" @@ -311,24 +311,25 @@ msgstr "Format de fichier" msgid "" "File format for bookmarks (affects both reading and saving):\n" "0 is the default native ELinks format\n" -"1 is XBEL universal XML bookmarks format (NO NATIONAL CHARS SUPPORT!)" +"1 is XBEL universal XML bookmarks format (ELinks bug 153: NO NATIONAL CHARS " +"SUPPORT!)" msgstr "" "Format du fichier de signets:\n" "0 est le format natif d'ELinks\n" "1 est le format de signets XML universel XBEL\n" -" (PAS DE SUPPORT DES CARACTERES NATIONAUX!)" +" (ELinks bug 153: PAS DE SUPPORT DES CARACTERES NATIONAUX!)" #: src/bookmarks/bookmarks.c:61 msgid "" "File format for bookmarks (affects both reading and saving):\n" "0 is the default native ELinks format\n" -"1 is XBEL universal XML bookmarks format (NO NATIONAL CHARS SUPPORT!) " -"(DISABLED)" +"1 is XBEL universal XML bookmarks format (ELinks bug 153: NO NATIONAL CHARS " +"SUPPORT!) (DISABLED)" msgstr "" "Format du fichier de signets:\n" "0 est le format natif d'ELinks (compatible avec Links 0.9x)\n" "1 est le format de signets XML universel XBEL\n" -" (PAS DE SUPPORT DES CARACTERES NATIONAUX!) (DÉSACTIVÉ)" +" (ELinks bug 153: PAS DE SUPPORT DES CARACTERES NATIONAUX!) (DÉSACTIVÉ)" #: src/bookmarks/bookmarks.c:67 msgid "Save folder state" @@ -1257,56 +1258,56 @@ msgstr "H msgid "Resolver error" msgstr "Erreur du résolveur" -#: src/config/cmdline.c:329 +#: src/config/cmdline.c:336 msgid "Remote method not supported" msgstr "Méthode remote non supportée" -#: src/config/cmdline.c:381 +#: src/config/cmdline.c:388 msgid "Template option folder" msgstr "Dossier des modèles d'option" -#: src/config/cmdline.c:404 +#: src/config/cmdline.c:411 #, c-format msgid "(default: %ld)" msgstr "(défaut: %ld)" -#: src/config/cmdline.c:411 src/config/cmdline.c:440 +#: src/config/cmdline.c:418 src/config/cmdline.c:447 #, c-format msgid "(default: \"%s\")" msgstr "(défaut: \"%s\")" -#: src/config/cmdline.c:416 +#: src/config/cmdline.c:423 #, c-format msgid "(alias for %s)" msgstr "(alias for %s)" -#: src/config/cmdline.c:421 src/config/cmdline.c:430 +#: src/config/cmdline.c:428 src/config/cmdline.c:437 #, c-format msgid "(default: %s)" msgstr "(défaut: %s)" -#: src/config/cmdline.c:564 +#: src/config/cmdline.c:571 msgid "Configuration options" msgstr "Options de configuration" -#: src/config/cmdline.c:568 +#: src/config/cmdline.c:575 msgid "Usage: elinks [OPTION]... [URL]..." msgstr "Usage: elinks [OPTION]... [URL]..." -#: src/config/cmdline.c:569 +#: src/config/cmdline.c:576 msgid "Options" msgstr "Options" -#: src/config/cmdline.c:611 +#: src/config/cmdline.c:618 msgid "Internal consistency error" msgstr "Erreur interne" #. -#: src/config/cmdline.c:647 +#: src/config/cmdline.c:654 msgid "Restrict to anonymous mode" msgstr "Restriction au mode anonyme" -#: src/config/cmdline.c:649 +#: src/config/cmdline.c:656 msgid "" "Restricts ELinks so it can run on an anonymous account.\n" "Local file browsing, downloads, and modification of options\n" @@ -1319,19 +1320,19 @@ msgstr "" "désactivés. L'utilisation de visualisateurs externes reste \n" "possible, mais les associations ne peuvent être modifiées." -#: src/config/cmdline.c:654 +#: src/config/cmdline.c:661 msgid "Autosubmit first form" msgstr "Envoyer automatiquement le premier formulaire" -#: src/config/cmdline.c:656 +#: src/config/cmdline.c:663 msgid "Automatically submit the first form in the given URLs." msgstr "Envoyer automatiquement le premier formulaire de l'URL donnée." -#: src/config/cmdline.c:658 +#: src/config/cmdline.c:665 msgid "Clone internal session with given ID" msgstr "Cloner la session interne ayant l'ID donné" -#: src/config/cmdline.c:660 +#: src/config/cmdline.c:667 msgid "" "Used internally when opening ELinks instances in new windows.\n" "The ID maps to information that will be used when creating the\n" @@ -1343,11 +1344,11 @@ msgstr "" "nouvelle instance.\n" "N'utilisez pas cette option." -#: src/config/cmdline.c:666 +#: src/config/cmdline.c:673 msgid "Name of directory with configuration file" msgstr "Nom du répertoire contenant les fichiers de configuration" -#: src/config/cmdline.c:668 +#: src/config/cmdline.c:675 msgid "" "Path of the directory ELinks will read and write its\n" "config and runtime state files to instead of ~/.elinks.\n" @@ -1359,11 +1360,11 @@ msgstr "" "Si le chemin ne commence pas par un '/', il sera considéré\n" "relatif à votre répertoire HOME." -#: src/config/cmdline.c:673 +#: src/config/cmdline.c:680 msgid "Print default configuration file to stdout" msgstr "Imprimer le fichier de configuration par défaut sur la sortie standart" -#: src/config/cmdline.c:675 +#: src/config/cmdline.c:682 msgid "" "Print a configuration file with options set to the built-in\n" "defaults to stdout." @@ -1371,11 +1372,11 @@ msgstr "" "Imprimer un fichier de configuration contenant les options par défaut\n" "sur la sortie standart." -#: src/config/cmdline.c:680 +#: src/config/cmdline.c:687 msgid "Name of configuration file" msgstr "Nom du fichier de configuration" -#: src/config/cmdline.c:682 +#: src/config/cmdline.c:689 msgid "" "Name of the configuration file that all configuration\n" "options will be read from and written to. It should be\n" @@ -1385,29 +1386,29 @@ msgstr "" "et lues les options de configuration. Il doit être relatif\n" "à config-dir." -#: src/config/cmdline.c:686 +#: src/config/cmdline.c:693 msgid "Print help for configuration options" msgstr "Afficher l'aide pour les options de configuration" -#: src/config/cmdline.c:688 +#: src/config/cmdline.c:695 msgid "Print help for configuration options and exit." msgstr "Afficher l'aide pour les options de configuration et quitter." -#: src/config/cmdline.c:690 +#: src/config/cmdline.c:697 msgid "MIME type assumed for unknown document types" msgstr "Type MIME à supposer pour les documents de type inconnu" -#: src/config/cmdline.c:692 +#: src/config/cmdline.c:699 msgid "The default MIME type used for documents of unknown type." msgstr "" "Le type MIME par défaut à utiliser pour les documents dont\n" "le type est inconnu." -#: src/config/cmdline.c:694 +#: src/config/cmdline.c:701 msgid "Ignore user-defined keybindings" msgstr "Ignorer les associations de touches utilisateur" -#: src/config/cmdline.c:696 +#: src/config/cmdline.c:703 msgid "" "When set, all keybindings from configuration files will be\n" "ignored. It forces use of default keybindings and will reset\n" @@ -1419,46 +1420,46 @@ msgstr "" "réinitialisera les associations de touches définies par\n" "l'utilisateur lors d'une nouvelle sauvegarde." -#: src/config/cmdline.c:700 +#: src/config/cmdline.c:707 msgid "Print formatted versions of given URLs to stdout" msgstr "" "Imprimer les versions formatées des URLs données sur la sortie standard" -#: src/config/cmdline.c:702 +#: src/config/cmdline.c:709 msgid "Print formatted plain-text versions of given URLs to stdout." msgstr "" "Imprimer les versions plein texte formatées des URLs données sur la \n" "sortie standard." -#: src/config/cmdline.c:704 +#: src/config/cmdline.c:711 msgid "Codepage to use with -dump" msgstr "Jeu de caractères à utiliser avec -dump" -#: src/config/cmdline.c:706 +#: src/config/cmdline.c:713 msgid "Codepage used when formatting dump output." msgstr "Jeu de caractères utilisé lors du formatage de la sortie (dump)." -#: src/config/cmdline.c:708 +#: src/config/cmdline.c:715 msgid "Color mode used with -dump" msgstr "Mode couleurs à utiliser avec -dump" -#: src/config/cmdline.c:710 +#: src/config/cmdline.c:717 msgid "Color mode used with -dump." msgstr "Mode couleurs à utiliser avec -dump." -#: src/config/cmdline.c:712 +#: src/config/cmdline.c:719 msgid "Width of document formatted with -dump" msgstr "Largeur de document formaté à utiliser avec -dump" -#: src/config/cmdline.c:714 +#: src/config/cmdline.c:721 msgid "Width of the dump output." msgstr "Largeur de sortie (dump)." -#: src/config/cmdline.c:716 +#: src/config/cmdline.c:723 msgid "Evaluate configuration file directive" msgstr "Evalue une directive de fichier de configuration" -#: src/config/cmdline.c:718 +#: src/config/cmdline.c:725 msgid "" "Specify configuration file directives on the command-line\n" "which will be evaluated after all configuration files has been\n" @@ -1471,11 +1472,11 @@ msgstr "" " -eval 'set protocol.file.allow_special_files = 1'" #. lynx compatibility -#: src/config/cmdline.c:724 +#: src/config/cmdline.c:731 msgid "Interpret documents of unknown types as HTML" msgstr "Interprète les documents de type inconnu comme de l'HTML" -#: src/config/cmdline.c:726 +#: src/config/cmdline.c:733 msgid "" "Makes ELinks assume documents of unknown types are HTML.\n" "Useful when using ELinks as an external viewer from MUAs.\n" @@ -1486,19 +1487,19 @@ msgstr "" "d'ELinks comme visualisateur pour les clients mail.\n" "C'est équivalent à -default-mime-type text/html." -#: src/config/cmdline.c:736 +#: src/config/cmdline.c:743 msgid "Print usage help and exit" msgstr "Afficher l'aide et quitter" -#: src/config/cmdline.c:738 +#: src/config/cmdline.c:745 msgid "Print usage help and exit." msgstr "Afficher l'aide et quitter." -#: src/config/cmdline.c:740 +#: src/config/cmdline.c:747 msgid "Only permit local connections" msgstr "Permettre seulement les connexions locales" -#: src/config/cmdline.c:742 +#: src/config/cmdline.c:749 msgid "" "Restricts ELinks to work offline and only connect to servers\n" "with local addresses (ie. 127.0.0.1). No connections to remote\n" @@ -1508,29 +1509,29 @@ msgstr "" "connexions vers des adresses locales (par exemple, 127.0.0.1),\n" "cela rend impossible toute connexion vers des sites distants." -#: src/config/cmdline.c:746 +#: src/config/cmdline.c:753 msgid "Print detailed usage help and exit" msgstr "Afficher l'aide détaillée et quitter" -#: src/config/cmdline.c:748 +#: src/config/cmdline.c:755 msgid "Print detailed usage help and exit." msgstr "Afficher l'aide détaillée et quitter." -#: src/config/cmdline.c:750 +#: src/config/cmdline.c:757 msgid "Look up specified host" msgstr "Résolution du nom de l'hôte spécifié" -#: src/config/cmdline.c:752 +#: src/config/cmdline.c:759 msgid "Look up specified host and print all DNS resolved IP addresses." msgstr "" "Résoudre le nom d'hôte spécifié et imprimer toutes les adresses IP\n" "correspondantes." -#: src/config/cmdline.c:754 +#: src/config/cmdline.c:761 msgid "Run as separate instance" msgstr "Exécuter en tant qu'instance séparée" -#: src/config/cmdline.c:756 +#: src/config/cmdline.c:763 msgid "" "Run ELinks as a separate instance instead of connecting to an\n" "existing instance. Note that normally no runtime state files\n" @@ -1542,11 +1543,11 @@ msgstr "" "(signets, historique, etc.) n'est modifié quand cette option est\n" "utilisée. Voir aussi -touch-files." -#: src/config/cmdline.c:761 +#: src/config/cmdline.c:768 msgid "Disable use of files in ~/.elinks" msgstr "Ne pas utiliser les fichiers dans ~/.elinks" -#: src/config/cmdline.c:763 +#: src/config/cmdline.c:770 msgid "" "Disables creation and use of files in the user specific home\n" "configuration directory (~/.elinks). It forces default configuration\n" @@ -1557,11 +1558,11 @@ msgstr "" "Cela force l'utilisation des valeurs de configuration par défaut et\n" "désactive la sauvegarde des fichiers d'état lors de l'exécution." -#: src/config/cmdline.c:767 +#: src/config/cmdline.c:774 msgid "Disable link numbering in dump output" msgstr "Ne pas numéroter les liens en sortie (dump)" -#: src/config/cmdline.c:769 +#: src/config/cmdline.c:776 msgid "" "Prevents printing of link number in dump output.\n" "Note that this really affects only -dump, nothing else." @@ -1569,11 +1570,11 @@ msgstr "" "Supprime l'affichage des numéros de liens dans la sortie de -dump.\n" "Notez que cette option ne concerne que -dump et rien d'autre." -#: src/config/cmdline.c:772 +#: src/config/cmdline.c:779 msgid "Disable printing of link references in dump output" msgstr "Ne pas afficher les références des liens dans la sortie (dump)" -#: src/config/cmdline.c:774 +#: src/config/cmdline.c:781 msgid "" "Prevents printing of references (URIs) of document links\n" "in dump output.\n" @@ -1582,11 +1583,11 @@ msgstr "" "Supprime l'affichage des références des liens dans la sortie de -dump.\n" "Notez que cette option ne concerne que -dump et rien d'autre." -#: src/config/cmdline.c:778 +#: src/config/cmdline.c:785 msgid "Control an already running ELinks" msgstr "Contrôler une instance préexistante d'ELinks" -#: src/config/cmdline.c:780 +#: src/config/cmdline.c:787 msgid "" "Control a remote ELinks instance by passing commands to it.\n" "The option takes an additional argument containing the method\n" @@ -1620,11 +1621,11 @@ msgstr "" "\tinfoBox(text) : montre un texte dans un boîte de dialogue\n" "\txfeDoCommand(openBrowser) : ouvre une nouvelle fenêtre" -#: src/config/cmdline.c:796 +#: src/config/cmdline.c:803 msgid "Connect to session ring with given ID" msgstr "Se connecter au groupe de sessions correspondant à cet ID" -#: src/config/cmdline.c:798 +#: src/config/cmdline.c:805 msgid "" "ID of session ring this ELinks session should connect to. ELinks\n" "works in so-called session rings, whereby all instances of ELinks\n" @@ -1655,22 +1656,22 @@ msgstr "" "-no-connect. Dans tous les cas, les fichiers d'état ne sont pas modifiés\n" "sur le disque, sauf si vous utilisez conjointement l'option -touch-files." -#: src/config/cmdline.c:813 +#: src/config/cmdline.c:820 msgid "Print the source of given URLs to stdout" msgstr "Imprimer la source des URLs données sur la sortie standard" -#: src/config/cmdline.c:815 +#: src/config/cmdline.c:822 msgid "Print given URLs in source form to stdout." msgstr "" "Imprimer les URLs données dans leur forme source sur la sortie standard." -#: src/config/cmdline.c:819 +#: src/config/cmdline.c:826 msgid "Touch files in ~/.elinks when running with -no-connect/-session-ring" msgstr "" "Modifier les fichiers dans ~/.elinks avec les options -no-connect/-session-" "ring" -#: src/config/cmdline.c:821 +#: src/config/cmdline.c:828 msgid "" "When enabled, runtime state files (bookmarks, history, etc.) are\n" "written to disk, even when -no-connect or -session-ring is used.\n" @@ -1682,11 +1683,11 @@ msgstr "" "sont utilisées. Cette option n'a aucun effet si elle n'est pas\n" "utilisée en conjonction avec ces options." -#: src/config/cmdline.c:826 +#: src/config/cmdline.c:833 msgid "Verbose level" msgstr "Niveau de verbosité" -#: src/config/cmdline.c:828 +#: src/config/cmdline.c:835 msgid "" "The verbose level controls what messages are shown at\n" "start up and while running:\n" @@ -1700,11 +1701,11 @@ msgstr "" "\t1 pour ne montrer que les erreurs sérieuses et les alertes\n" "\t2 pour montrer tous les messages" -#: src/config/cmdline.c:834 +#: src/config/cmdline.c:841 msgid "Print version information and exit" msgstr "Afficher la version et quitter" -#: src/config/cmdline.c:836 +#: src/config/cmdline.c:843 msgid "Print ELinks version information and exit." msgstr "Afficher la version d'ELinks et quitter." @@ -4015,7 +4016,7 @@ msgstr "Texte" msgid "Dialog text colors." msgstr "Couleurs du texte des dialogues." -#: src/config/options.inc:1074 src/viewer/text/form.c:1800 +#: src/config/options.inc:1074 src/viewer/text/form.c:1801 msgid "Checkbox" msgstr "Case à cocher" @@ -4063,7 +4064,7 @@ msgstr "Raccourci du bouton" msgid "Selected button shortcut" msgstr "Raccourci du bouton sélectionné" -#: src/config/options.inc:1102 src/viewer/text/form.c:1804 +#: src/config/options.inc:1102 src/viewer/text/form.c:1805 msgid "Text field" msgstr "Champ texte" @@ -8525,88 +8526,88 @@ msgstr "Ancre manquante" msgid "The requested fragment \"#%s\" doesn't exist." msgstr "L'ancre recherchée \"#%s\" n'existe pas." -#: src/viewer/text/form.c:1023 +#: src/viewer/text/form.c:1024 msgid "Error while posting form" msgstr "Erreur lors de l'envoi du formulaire" -#: src/viewer/text/form.c:1024 +#: src/viewer/text/form.c:1025 #, c-format msgid "Could not load file %s: %s" msgstr "Impossible de charger le fichier %s: %s" -#: src/viewer/text/form.c:1785 +#: src/viewer/text/form.c:1786 msgid "Reset form" msgstr "Réinitialiser le formulaire" -#: src/viewer/text/form.c:1787 +#: src/viewer/text/form.c:1788 msgid "Harmless button" msgstr "Bouton sans impact" -#: src/viewer/text/form.c:1795 +#: src/viewer/text/form.c:1796 msgid "Submit form to" msgstr "Envoi du formulaire à" -#: src/viewer/text/form.c:1796 +#: src/viewer/text/form.c:1797 msgid "Post form to" msgstr "Transfert du formulaire à" -#: src/viewer/text/form.c:1798 +#: src/viewer/text/form.c:1799 msgid "Radio button" msgstr "Bouton radio" -#: src/viewer/text/form.c:1802 +#: src/viewer/text/form.c:1803 msgid "Select field" msgstr "Liste" -#: src/viewer/text/form.c:1806 +#: src/viewer/text/form.c:1807 msgid "Text area" msgstr "Champ texte multiligne" -#: src/viewer/text/form.c:1808 +#: src/viewer/text/form.c:1809 msgid "File upload" msgstr "Envoi de fichier" -#: src/viewer/text/form.c:1810 +#: src/viewer/text/form.c:1811 msgid "Password field" msgstr "Champ mot de passe" -#: src/viewer/text/form.c:1848 +#: src/viewer/text/form.c:1849 msgid "name" msgstr "Nom" -#: src/viewer/text/form.c:1860 +#: src/viewer/text/form.c:1861 msgid "value" msgstr "Valeur" -#: src/viewer/text/form.c:1873 +#: src/viewer/text/form.c:1874 msgid "read only" msgstr "lecture seule" -#: src/viewer/text/form.c:1884 +#: src/viewer/text/form.c:1885 #, c-format msgid "press %s to navigate" msgstr "pressez %s pour naviguer" -#: src/viewer/text/form.c:1886 +#: src/viewer/text/form.c:1887 #, c-format msgid "press %s to edit" msgstr "pressez %s pour éditer" -#: src/viewer/text/form.c:1922 +#: src/viewer/text/form.c:1923 #, c-format msgid "press %s to submit to %s" msgstr "pressez %s pour soumettre à %s" -#: src/viewer/text/form.c:1924 +#: src/viewer/text/form.c:1925 #, c-format msgid "press %s to post to %s" msgstr "pressez %s pour poster à %s" -#: src/viewer/text/form.c:2026 +#: src/viewer/text/form.c:2027 msgid "Useless button" msgstr "Bouton inutile" -#: src/viewer/text/form.c:2028 +#: src/viewer/text/form.c:2029 msgid "Submit button" msgstr "Bouton Soumettre" From 44537de0c46c3bd738f9c0d3711a562c7cc5e1ae Mon Sep 17 00:00:00 2001 From: Miciah Dashiel Butler Masters Date: Tue, 14 Nov 2006 16:13:11 +0000 Subject: [PATCH 14/20] SMJS (user): Add documentation on the available interfaces Note that the interfaces may change at any time (which is the reason that I've put off committing this file for so long). --- contrib/smjs/README | 248 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 248 insertions(+) create mode 100644 contrib/smjs/README diff --git a/contrib/smjs/README b/contrib/smjs/README new file mode 100644 index 000000000..16c1a00b2 --- /dev/null +++ b/contrib/smjs/README @@ -0,0 +1,248 @@ +Methods +------- + +do_file(path) + + Load and evaluate the file with the given path (string). For example: + + do_file("/home/me/.elinks/hooks.js"); + + will reload your hooks file. + + +elinks.alert(message) + + Display the given message (string) in a message box. For example: + + elinks.alert("Hello, world!"); + + will display a friendly greeting. + + +elinks.execute(command) + + Execute the given command (string) on the current terminal. For example: + + var quoted_uri = "'" + elinks.location.replace(/'/g, "'\\''") + "'"; + elinks.execute("firefox " + quoted_uri); + + will run Firefox with the URI of the current document. + + Note: one must be very careful with elinks.execute, because depending + on the OS, the command may be subject to interpretation by a command shell + language. When constructing the command string, be sure to quote any + dubious parts (such as the URI of the current document, as above). + + +elinks.load_uri(uri, callback) + + Load the given URI (string). When the URI completes loading, ELinks calls + the given callback (function). The callback is passed the cache object + that corresponds to the URI. For example: + + elinks.load_uri("http://www.eldar.org/cgi-bin/fortune.pl?text_format=yes", + function (cached) { elinks.alert(cached.content); }); + + displays a fortune. + + +Properties +---------- + +elinks.home (string) + + ELinks's 'home' directory, where it stores its configuration files. + Read-only. For example, + + do_file(elinks.home + "hooks.js"); + + will reload your hooks file. + + +elinks.location (string) + + The URI of the currently open document. This can be read to get a string + with the URI or set to load a different document. For example, + + elinks.location = elinks.location + "/.."; + + will go up a directory (if the URI doesn't end in a file). + + +elinks.bookmarks (hash) + + This is a hash, the elements of which correspond to the bookmarks. + One can delve into the bookmarks hierarchy in a reasonably nifty + fashion, just by using standard ECMAScript syntax: + + elinks.bookmarks.x.children.y.children.z.children.foo.title + + gets the title of the bookmark titled 'foo' under the folder 'z', + which is a subfolder of 'y', which is a subfolder of 'x'. + + A bookmark object has these properties: + + item.title (string) + + This is the title of the bookmark. It can be read and set. + + item.url (string) + + This is the URI of the bookmark. It can be read and set. + + item.children (hash) + + This is a hash, the elements of which are the bookmarks that + are children to the item. It is read-only. + + +elinks.globhist (hash) + + This is a hash, the elements of which correspond to entries in ELinks's + global history. The hash is indexed by URI. For example, + + elinks.globhist["file:///"] + + will get you the history item for your root directory. + + A history item has these properties: + + item.title (string) + + This is the title of the history item. It can be read and set. + + item.url (string) + + This is the URI of the history item. It can be read and set. + + item.last_visit (number) + + This is the UNIX time of the last visit time for the item. UNIX time + is the number of seconds that have passed between the UNIX epoch (which + is 1970-01-01 00:00:00 UTC) and the represented time. Note that this is + _seconds_ since the epoch, whereas ECMAScript likes to use _milliseconds_ + since the epoch. This property can be set or read. + + +elinks.keybinding (hash) + + This is a hash, the elements of which correspond to ELinks's keymaps. + Currently, there are three: elinks.keybinding.main, elinks.keybinding.edit, + and elinks.keybinding.menu. These elements are also hashes, the elements of + which correspond to bindings. For example, elinks.keymaps.main["q"] is + the binding to the 'q' key in the main map. These bindings can be red, + to get the name of the action to which the key is bound, or set, either + to a string with the name of the ELinks action or to a function, which will + thenceforth be called when the key is pressed. For example, + + elinks.keymaps.main["!"] = function () { elinks.alert("Hello!"); } + + binds the '!' key in the main map to a function that displays a friendly + alert. + + elinks.keymaps.main["/"] = "search-typeahead-text"; + + changes the '/' key to use the nice typeahead search function instead of + opening that ugly old search dialogue box. + + +Hooks +----- + +These are actually properties, but a special case: one assigns functions +to them, which functions are called at certain events. + +Note that the default hooks file assigns functions that provide a mechanism +to register multiple functions to each hook. When these default hooks are +called, they iterate over all functions that are registered to them, calling +each one in serial. + +If you want to register a preformat_html hook, for example, +the preferred way to do so is not this: + + elinks.preformat_html = foo; + +but rather this: + + elinks.preformat_html_hooks.push(foo); + +which adds foo to an array of functions, over which the default +elinks.preformat_html function will iterate. + +If any function in that array returns false, the default hook +will stop iteration, not calling any more handlers. This applies +to all of the default hooks. + + +elinks.preformat_html(cached, vs) + + This function is called every time a document is loaded, before the document + is actually rendered, to give scripts the opportunity to modify it. The + first parameter is the cache object and the second is the view_state object + (documented below). As explained above, it is preferred to add your hook + to elinks.preformat_html_hooks rather than to assign it to + elinks.preformat_html. + + +elinks.goto_url_hook(url) + + This function is called every time the user enters something + in the Go to URL box. The url (string) can be modified or not, + and the returned string is substituted for what the user entered. + If the value false is returned, the URL is not changed and further hooks + in ELinks are not run. As explained above, it is preferred to add your hook + to elinks.goto_url_hooks rather than to assign it to elinks.goto_url_hook. + + +elinks.follow_url_hook(url) + + This function is called every time the user tries to load a document, + whether by following a link, by entering a URI in the Go to URL box, + by setting elinks.location, or whatever. It behaves the same as + elinks.goto_url_hook above. As explained above, it is preferred to add your + hook to elinks.follow_url_hooks rather than to assign it to + elinks.follow_url_hook. + +Other Objects +------------- + +cache + + The cache object mentioned in the descriptions of elinks.load_uri and + elinks.preformat_html is a wrapper for the internal ELinks cache object. + Its properties are: + + cached.content (string) + + This is the content received from the server. It can be read and set. + + cached.type (string) + + This is the MIME type of the cache entry. It can be read and set. + + cached.length (number) + + This is the length of cached.content. It is read-only. + + cached.head (string) + + This is the header received from the server. It can be read and set. + + cached.uri (string) + + This is the URI of the cache entry. It is read-only. + +view_state + + The view_state object mentioned in the description of elinks.preformat_html + is a wrapper for the internal ELinks view_state object. The view state holds + information on how the current document is being displayed. + + vs.plain (boolean) + + Whether the current document is rendered as HTML or displayed + as plaintext. This can be read and set. + + vs.uri (string) + + This is the URI of the current document. It is read-only. From a90588debc2d9b775ef974971603eea51504728a Mon Sep 17 00:00:00 2001 From: Miciah Dashiel Butler Masters Date: Wed, 15 Nov 2006 20:08:02 +0000 Subject: [PATCH 15/20] Fix a grammatical error in the description for document.uri_passing Suggested by Quiznos on IRC. --- src/config/options.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/config/options.inc b/src/config/options.inc index 5755f208c..a78888bc6 100644 --- a/src/config/options.inc +++ b/src/config/options.inc @@ -813,7 +813,7 @@ static struct option_info config_options_info[] = { "an external command. If several rules are defined the link and\n" "tab menu will have a submenu of items for each rule. Note, this\n" "is mostly useful for launching graphical viewers, since there\n" - "is not support for releasing the terminal while the command runs.\n" + "is no support for releasing the terminal while the command runs.\n" "The action and submenus are also available by binding keys to\n" "the frame-external-command, the link-external-command, and\n" "the tab-external-command actions.")), From ca7a70b243bd3fc8324bb617d9030111f92b63bd Mon Sep 17 00:00:00 2001 From: Jonas Fonseca Date: Sat, 18 Nov 2006 11:21:17 +0100 Subject: [PATCH 16/20] Revisit Ruby version checking fix The version checking was recently reworked in commit 14d5ff3b1722ca8df12fbc2739a39a18ebdd4ee6, however use of 'puts' is wrong because it returns nil and thus always causes the check to exit with code 1. The issue was brought up by dalias. Acked on IRC by Thomas Adam. --- config/m4/ruby.m4 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/m4/ruby.m4 b/config/m4/ruby.m4 index eb6fbae14..1effb1e58 100644 --- a/config/m4/ruby.m4 +++ b/config/m4/ruby.m4 @@ -32,7 +32,7 @@ if test "$CONFIG_SCRIPTING_RUBY" = "yes"; then if test "$CONFIG_SCRIPTING_RUBY" != "no"; then AC_MSG_CHECKING(Ruby version) - if $CONFIG_SCRIPTING_RUBY -e 'puts "#{VERSION rescue RUBY_VERSION}" >= "1.6.0" or exit 1' >/dev/null 2>/dev/null; then + if $CONFIG_SCRIPTING_RUBY -e 'exit((VERSION or RUBY_VERSION) >= "1.6.0")' >/dev/null 2>/dev/null; then ruby_version=`$CONFIG_SCRIPTING_RUBY -e 'puts "#{VERSION rescue RUBY_VERSION}"'` AC_MSG_RESULT($ruby_version) From f915c311274925a7d38c8661ddfa243d82739cd9 Mon Sep 17 00:00:00 2001 From: Kalle Olavi Niemitalo Date: Sat, 18 Nov 2006 20:39:01 +0200 Subject: [PATCH 17/20] Bug 841, CVE-2006-5925: Prevent enabling the SMB protocol. src/protocol/smb/smb.c: Added #error directives so that this vulnerable code cannot be accidentally compiled in. features.conf: Disable CONFIG_SMB by default and explain why. configure.in: If CONFIG_SMB is enabled, disable it and warn the user. This is for people who have customized features.conf. --- configure.in | 8 +++++++- features.conf | 10 ++++++++-- src/protocol/smb/smb.c | 3 +++ 3 files changed, 18 insertions(+), 3 deletions(-) diff --git a/configure.in b/configure.in index 1748e1dc8..f3b2f5dad 100644 --- a/configure.in +++ b/configure.in @@ -1246,7 +1246,13 @@ EL_ARG_ENABLE(CONFIG_NNTP, nntp, [NNTP protocol], [ --enable-nntp enable nntp protocol support]) EL_ARG_DEPEND(CONFIG_SMB, smb, [HAVE_SMBCLIENT:yes], [SMB protocol], - [ --disable-smb disable SMB protocol support (requires smbclient)]) + [ --enable-smb not currently allowed]) +dnl [ --disable-smb disable SMB protocol support (requires smbclient)]) +if test "$CONFIG_SMB" != no; then + AC_MSG_WARN([Ignoring --enable-smb because of vulnerability CVE-2006-5925. +If you want to use SMB, please vote for bug 844 or post a patch.]) + CONFIG_SMB=no +fi EL_ARG_ENABLE(CONFIG_MOUSE, mouse, [Mouse handling], diff --git a/features.conf b/features.conf index 067be180d..0a756f74d 100644 --- a/features.conf +++ b/features.conf @@ -373,9 +373,15 @@ CONFIG_NNTP=no # will need to install Samba (or at least just the smbclient part, if you can # install it separately). # -# Default: enabled if smbclient will be found +# Unfortunately, ELinks doesn't yet properly validate the file name passed to +# smbclient, and this caused vulnerability CVE-2006-5925 (bug 841). To close +# the vulnerability, configure.in now disables the SMB protocol regardless +# of what you specify here. If you would like to fix the code so that the +# protocol can be safely enabled again, please see bug 844. +# +# Default: disabled -CONFIG_SMB=yes +CONFIG_SMB=no ### Cascading Style Sheets diff --git a/src/protocol/smb/smb.c b/src/protocol/smb/smb.c index d8b4a93ee..e183baed8 100644 --- a/src/protocol/smb/smb.c +++ b/src/protocol/smb/smb.c @@ -4,6 +4,9 @@ #define _GNU_SOURCE /* Needed for asprintf() */ #endif +#error SMB protocol support is vulnerable to CVE-2006-5925. Do not use. +#error If you want to use SMB, please vote for bug 844 or post a patch. + #ifdef HAVE_CONFIG_H #include "config.h" #endif From 388de7bd6561834b626960530004be1930d9c790 Mon Sep 17 00:00:00 2001 From: Kalle Olavi Niemitalo Date: Sat, 18 Nov 2006 22:17:58 +0200 Subject: [PATCH 18/20] Bug 841, CVE-2006-5925: Disable SMB earlier so that features.log is correct. --- configure.in | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/configure.in b/configure.in index f3b2f5dad..cb08d4c78 100644 --- a/configure.in +++ b/configure.in @@ -1245,14 +1245,17 @@ EL_ARG_ENABLE(CONFIG_GOPHER, gopher, [Gopher protocol], EL_ARG_ENABLE(CONFIG_NNTP, nntp, [NNTP protocol], [ --enable-nntp enable nntp protocol support]) +dnl Force disable SMB before EL_ARG_DEPEND so that it logs the correct value. +if test "${enable_smb-no}" != no || test "${CONFIG_SMB-no}" != no; then + AC_MSG_WARN([Forcing --disable-smb because of vulnerability CVE-2006-5925. +If you want to use SMB, please vote for bug 844 or post a patch.]) +fi +enable_smb=no +CONFIG_SMB=no EL_ARG_DEPEND(CONFIG_SMB, smb, [HAVE_SMBCLIENT:yes], [SMB protocol], [ --enable-smb not currently allowed]) -dnl [ --disable-smb disable SMB protocol support (requires smbclient)]) -if test "$CONFIG_SMB" != no; then - AC_MSG_WARN([Ignoring --enable-smb because of vulnerability CVE-2006-5925. -If you want to use SMB, please vote for bug 844 or post a patch.]) - CONFIG_SMB=no -fi +dnl EL_ARG_DEPEND(CONFIG_SMB, smb, [HAVE_SMBCLIENT:yes], [SMB protocol], +dnl [ --disable-smb disable SMB protocol support (requires smbclient)]) EL_ARG_ENABLE(CONFIG_MOUSE, mouse, [Mouse handling], From c9701c80af9b9c3be27dfe4076280a24aa3059dd Mon Sep 17 00:00:00 2001 From: Jonas Fonseca Date: Tue, 21 Nov 2006 01:50:04 +0100 Subject: [PATCH 19/20] Add a releast check list --- doc/release.txt | 100 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 100 insertions(+) create mode 100644 doc/release.txt diff --git a/doc/release.txt b/doc/release.txt new file mode 100644 index 000000000..710822277 --- /dev/null +++ b/doc/release.txt @@ -0,0 +1,100 @@ +Release check list +================== + +When releasing a new version +---------------------------- + +1. Tasks in the elinks module: + + - Go over the changes since the last release. Use git-shortlog as a template. + Write a small changelog highlighting the most important changes. Changes + by new contributors are always important! + - Update NEWS file and commit. + - Change VERSION in the top of configure.in to hold the new version number. + - Commit only this change. + - Create a signed tag having the version ("ELinks X.X.X") as the subject and + using the changelog create above as the body. Use something like: + + $ cg-tag -s -M changelog.file elinks-X.X.X + + - Append ".GIT" to the VERSION variable in the top of configure.in. + - Commit only this change. + - Push these changes plus tag using: + + $ cg-push -t elinks-X.X.X + +2. Tasks on http://elinks.cz/ (part 1): + + - Wait until the tag etc. has been synced or force a sync of the repository + at http://elinks.cz/elinks.git/. + - Run script to create new tarballs (both .gz and .bz2). + + $ mkdist elinks-X.X.X X.X.X -r + +3. Tasks on localhost: + + - Download new tarballs and create ASCII armored signature files. + + $ gpg -b --armor elinks-X.X.X.tar.bz2 + $ gpg -b --armor elinks-X.X.X.tar.gz + + - Copy the elinks-X.X.X.tar.*.asc files to http://elinks.cz/download/. + - Send announcement to elinks-users mailing list. + +4. Tasks in the elinks-web module: + + - Change the version and release data in the start of website.conf. + - Wait for the announcement to hit the elinks-users mailing list archive. + - Add paraphrased version of the first paragraph of the release announcement + as a news entry in news/latest.txt. Make the entry link to both the + archived announcement from linuxfromscratch.org and gmane.org using the + "magic numbers" expanded by the macro. Possibly, move the cut-off markers + that control which news entries to display on the front page. + - Rebuild index.html, news.html, and news.rss. + - Commit the updates HTML and asciidoc files. + - Push the commits. + +5. Tasks on http://elinks.cz/ (part 2): + + - Wait until the elinks-web module has been synced or force a sync of the + repository. + - Checkout the new updated webpages. + +6. Tasks on http://bugzilla.elinks.cz/: + + - Add the new version. + +7. Tasks external sites and resources: + + - Add a new release to the freshmeat.net page. + - Change topic of #elinks + - (Request update of FSFs free software directory). + - (Update current version on wikipedia). + +When releasing a new stable branch +---------------------------------- + +(I only vaguely remember this process. --jonas) + +1. Tasks on localhost: + + - Locally clone the freezed repository to a new repository that will contain + the new stable branch. + - Unfreeze the repository that was cloned by changing the VERSION variable in + configure.in to the version of the new unstable branch (remember the + ending ".GIT"), commit, and push. + - Add new remote branch that will track the new stable "trunk". It should + basically be the push URL of the cloned repository with "#elinks-X.X" + appended. + - Push to this new remote branch to create it. + - Perform the normal version release tasks described above in this new + repository. + +2. Tasks on http://elinks.cz/: + + - Update http://elinks.cz/download/*-current-* tarball links to point to the + correct versions. + +3. Tasks external sites and resources: + + - Add a new branch to the freshmeat.net page. From a370e7ccacdb5ab945a48d08430f08880dbca328 Mon Sep 17 00:00:00 2001 From: Jonas Fonseca Date: Wed, 22 Nov 2006 20:13:39 +0100 Subject: [PATCH 20/20] Improve CPPFLAGS usage CPPFLAGS was dropped[1] back on 2004-04-24. Then a workaround was introduced by commit 6d7e9bfe5b6379bc5a492208ff735aeb840b17c5 to fix compilation on FreeBSD that used CPPFLAGS to store iconv related flags. The use of CPPFLAGS with respect to the COMPILE "macro" reappeared in 40e257bedd59c35b4a54c5e85e4391383ad6bf84 on 2006-08-05. This commit makes configure.in print CPPFLAGS and LDFLAGS. Before, CPPFLAGS and CFLAGS was mixed together in the feature summary. It also restores the use of CPPFLAGS storing iconv related flags but keeps the use of the SAVE/RESTORE_FLAGS in the iconv macro. Reported by Daniel E. Macks on 2005-11-22 in a mail to elinks-users with the ID: . [1] http://pasky.or.cz/gitweb.cgi?p=elinks-history.git;a=commit;h=ebad0e71572b41dac5376e148fe4b1b5cb9ccc33 --- config/m4/iconv.m4 | 2 +- configure.in | 11 ++++------- 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/config/m4/iconv.m4 b/config/m4/iconv.m4 index ac879e5f1..6d411bb3c 100644 --- a/config/m4/iconv.m4 +++ b/config/m4/iconv.m4 @@ -12,7 +12,7 @@ AC_DEFUN([AM_ICONV], AC_ARG_WITH([libiconv], [ --with-libiconv=DIR search for libiconv in DIR/include and DIR/lib], [ for dir in `echo "$withval" | tr : ' '`; do - if test -d $dir/include; then CFLAGS="$CFLAGS -I$dir/include"; fi + if test -d $dir/include; then CPPFLAGS="$CPPFLAGS -I$dir/include"; fi if test -d $dir/lib; then LDFLAGS="$LDFLAGS -L$dir/lib"; fi done ]) diff --git a/configure.in b/configure.in index cb08d4c78..6e4851ad4 100644 --- a/configure.in +++ b/configure.in @@ -1407,13 +1407,10 @@ if test "x$ac_cv_prog_gcc" = "xyes"; then esac fi -# CFLAGS doesn't contain all compile flags. Some will be added only when -# needed in the respective source directory. To get all compile flags -# easily just add CPPFLAGS. -ALL_CFLAGS="$CFLAGS $CPPFLAGS" - -EL_LOG_CONFIG(ALL_CFLAGS, [Compiler options (CFLAGS)], []) -EL_LOG_CONFIG(LIBS, [Linker options (LIBS)], []) +EL_LOG_CONFIG(CFLAGS, [Compiler flags (CFLAGS)], []) +EL_LOG_CONFIG(CPPFLAGS, [Preprocessor flags (CPPFLAGS)], []) +EL_LOG_CONFIG(LDFLAGS, [Linker flags (LDFLAGS)], []) +EL_LOG_CONFIG(LIBS, [Library flags (LIBS)], []) dnl =================================================================== dnl Colored make output