From kon at iki.fi Sat Feb 17 03:24:22 2007 From: kon at iki.fi (Kalle Olavi Niemitalo) Date: Sat, 17 Feb 2007 12:24:22 +0200 Subject: [elinks-dev] ELinks 0.12 release plans Message-ID: <874ppldquh.fsf@Astalo.kon.iki.fi> A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 188 bytes Desc: not available Url : http://linuxfromscratch.org/pipermail/elinks-dev/attachments/20070217/3d3c2f4e/attachment.bin From kon at iki.fi Sun Feb 25 01:52:47 2007 From: kon at iki.fi (Kalle Olavi Niemitalo) Date: Sun, 25 Feb 2007 10:52:47 +0200 Subject: [elinks-dev] witekfl branch status In-Reply-To: <87odoj6oq1.fsf@Astalo.kon.iki.fi> References: <87odoj6oq1.fsf@Astalo.kon.iki.fi> Message-ID: <87abz2bov4.fsf@Astalo.kon.iki.fi> A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 188 bytes Desc: not available Url : http://linuxfromscratch.org/pipermail/elinks-dev/attachments/20070225/0ea9900f/attachment.bin From kenny at hittsjunk.net Sun Feb 25 11:14:35 2007 From: kenny at hittsjunk.net (Kenny Hitt) Date: Sun, 25 Feb 2007 12:14:35 -0600 Subject: [elinks-dev] witekfl branch status In-Reply-To: <87abz2bov4.fsf@Astalo.kon.iki.fi> References: <87odoj6oq1.fsf@Astalo.kon.iki.fi> <87abz2bov4.fsf@Astalo.kon.iki.fi> Message-ID: <20070225181435.GA16060@mail.hittsjunk.net> Hi. On Sun, Feb 25, 2007 at 10:52:47AM +0200, Kalle Olavi Niemitalo wrote: > > speech Needs a use case and review. Could then be merged before 0.12pre1. > Is this intended to help blind people? I believe they > usually have screen reader programs; why is this better? > The code may also cause compilation errors on non-POSIX > systems but I think we can sort those out based on test > reports if there is a 0.12pre release after the merge. I can't speak for other blind people, but I use a screen reader for access to elinks. I would also like to know why this feature was added and why it is better than using my screen reader. Kenny From witekfl at poczta.onet.pl Mon Feb 26 10:35:48 2007 From: witekfl at poczta.onet.pl (Witold Filipczyk) Date: Mon, 26 Feb 2007 18:35:48 +0100 Subject: [elinks-dev] witekfl branch status In-Reply-To: <20070225181435.GA16060@mail.hittsjunk.net> References: <87odoj6oq1.fsf@Astalo.kon.iki.fi> <87abz2bov4.fsf@Astalo.kon.iki.fi> <20070225181435.GA16060@mail.hittsjunk.net> Message-ID: <20070226173548.GA905@pldmachine.fixsoftware.pl> On Sun, Feb 25, 2007 at 12:14:35PM -0600, Kenny Hitt wrote: > Hi. > > On Sun, Feb 25, 2007 at 10:52:47AM +0200, Kalle Olavi Niemitalo wrote: > > > > speech Needs a use case and review. Could then be merged before 0.12pre1. > > Is this intended to help blind people? I believe they > > usually have screen reader programs; why is this better? > > The code may also cause compilation errors on non-POSIX > > systems but I think we can sort those out based on test > > reports if there is a 0.12pre release after the merge. > > I can't speak for other blind people, but I use a screen reader for access to > elinks. I would also like to know why this feature was added and why it is better than using my screen reader. This feature does not collide with screen readers. I just want to listen to ELinks sometimes. Witek From witekfl at poczta.onet.pl Mon Feb 26 12:19:52 2007 From: witekfl at poczta.onet.pl (Witold Filipczyk) Date: Mon, 26 Feb 2007 20:19:52 +0100 Subject: [elinks-dev] witekfl branch status In-Reply-To: <87abz2bov4.fsf@Astalo.kon.iki.fi> References: <87odoj6oq1.fsf@Astalo.kon.iki.fi> <87abz2bov4.fsf@Astalo.kon.iki.fi> Message-ID: <20070226191952.GB905@pldmachine.fixsoftware.pl> On Sun, Feb 25, 2007 at 10:52:47AM +0200, Kalle Olavi Niemitalo wrote: > acckey This seems to fix a bug; please advise how to reproduce the bug. Start And ALT-A doesn't work. "Start iterating from the next link": Where there is more links with the same accesskey only the first one was accessible via accesskey. I think starting from the next link is just. > > bug844 Needs review and testing. > > bug916 Needs review and testing. > > bug927 Will merge. > > bug935 If you test this with UTF-8 then I'll merge it. > > epoll I don't think this should be merged. > If ELinks has to keep supporting select() too, I think the > maintenance burden outweighs any advantages epoll may have. > It may be faster; but I don't believe the speedup is > noticeable in practice. It is not limited by FD_SETSIZE; > but threads[] still has that limit. > > fsp Needs review and testing. > > gpm Please add some documentation into gpm-wheel.patch. > Does the patch fix a bug in GPM? > Can it hurt compatibility with programs that use libgpm? > > merged These have already been merged to master. > > nonblk This makes local CGI pipes use nonblocking I/O. Not > using nonblocking I/O is a bug, and local CGI was added > in ELinks 0.9.0. Thus, the stable releases ELinks 0.10.6 > and 0.11.2 may also have this bug. Please add the bug to > bugzilla.elinks.or.cz so that backports can be tracked. > > spaces1 "ftp didn't handle filenames with spaces." > Does it work in 0.10.6 and 0.11.2? If not, please add > this to bugzilla.elinks.or.cz. Do you think that maintaining 3 versions of ELinks is reasonable? > > spaces2 "Decode %20 in local filenames and enclose them with '"'." > This seems suspicious. What if there is '"' or '\' in the > filename? There is add_shell_quoted_to_string for such > purposes. Fixed. Thanks. spaces2 handles mailcap entries like this: application/x-tar; /bin/tar tvf -; print=/bin/tar tvf - | print text/plain:-; copiousoutput Witek From at at altlinux.ru Tue Feb 27 03:32:59 2007 From: at at altlinux.ru (Alexey Tourbin) Date: Tue, 27 Feb 2007 13:32:59 +0300 Subject: [elinks-dev] [PATCH] charsets.c: fix gcc warning Message-ID: <20070227103259.GA2404@localhost.localdomain> Hello, I've got a few patches for elinks-0.11 which make it -Wall -Werror clean against recent gcc-4.1 compiler. Some of them can be applied to elinks-0.12, too. charsets.c: In function 'get_translation_table_to_utf_8': charsets.c:274: warning: value computed is not used charsets.c:274: warning: value computed is not used --- src/intl/charsets.c | 5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/intl/charsets.c b/src/intl/charsets.c index d25c558..309da05 100644 --- a/src/intl/charsets.c +++ b/src/intl/charsets.c @@ -269,9 +269,10 @@ get_translation_table_to_utf_8(int from) if (from == -1) return NULL; from &= ~SYSTEM_CHARSET_FLAG; if (from == lfr) return utf_table; - if (utf_table_init) - memset(utf_table, 0, sizeof(utf_table)), + if (utf_table_init) { + memset(utf_table, 0, sizeof(utf_table)); utf_table_init = 0; + } else free_utf_table(); -- 1.5.0.1.GIT From at at altlinux.ru Tue Feb 27 03:34:10 2007 From: at at altlinux.ru (Alexey Tourbin) Date: Tue, 27 Feb 2007 13:34:10 +0300 Subject: [elinks-dev] [PATCH] osdep.c: fix gcc warning Message-ID: <20070227103410.GB2404@localhost.localdomain> osdep.c: In function 'start_thread': osdep.c:648: warning: ignoring return value of 'write', declared with attribute warn_unused_result --- src/osdep/osdep.c | 5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/osdep/osdep.c b/src/osdep/osdep.c index 374b3e5..c5b5408 100644 --- a/src/osdep/osdep.c +++ b/src/osdep/osdep.c @@ -631,6 +631,7 @@ start_thread(void (*fn)(void *, int), void *ptr, int l) pid = fork(); if (!pid) { struct terminal *term; + int rv; /* Close input in this thread; otherwise, if it will live * longer than its parent, it'll block the terminal until it'll @@ -645,12 +646,12 @@ start_thread(void (*fn)(void *, int), void *ptr, int l) close(p[0]); fn(ptr, p[1]); - write(p[1], "x", 1); + rv = write(p[1], "x", 1); close(p[1]); /* We use _exit() here instead of exit(), see * http://www.erlenstar.demon.co.uk/unix/faq_2.html#SEC6 for * reasons. Fixed by Sven Neumann . */ - _exit(0); + _exit(rv == 1 ? 0 : 1); } if (pid == -1) { close(p[0]); -- 1.5.0.1.GIT From at at altlinux.ru Tue Feb 27 03:35:37 2007 From: at at altlinux.ru (Alexey Tourbin) Date: Tue, 27 Feb 2007 13:35:37 +0300 Subject: [elinks-dev] [PATCH] user.c (save_form_data_to_file): paranoid error handling Message-ID: <20070227103537.GC2404@localhost.localdomain> This is basically to fix gcc warning: user.c: In function 'save_form_data_to_file': user.c:243: warning: ignoring return value of 'fwrite', declared with attribute warn_unused_result Now fwrite() return value must be checked. But I also noticed that temporary file is not being freed on error conditions. And since stdio is buffered, fclose() return value must be checked, too. After a few --amend's I noticed the routine does not look quite the same anymore. --- src/protocol/user.c | 39 +++++++++++++++++++++++++-------------- 1 files changed, 25 insertions(+), 14 deletions(-) diff --git a/src/protocol/user.c b/src/protocol/user.c index e00cf72..fe45968 100644 --- a/src/protocol/user.c +++ b/src/protocol/user.c @@ -217,32 +217,43 @@ static unsigned char * save_form_data_to_file(struct uri *uri) { unsigned char *filename = get_tempdir_filename("elinks-XXXXXX"); - int formfd; - FILE *formfile; + int fd; + FILE *fp; + unsigned char *formdata; + size_t len, nmemb; if (!filename) return NULL; - formfd = safe_mkstemp(filename); - if (formfd < 0) { + fd = safe_mkstemp(filename); + if (fd < 0) { mem_free(filename); return NULL; } - formfile = fdopen(formfd, "w"); - if (!formfile) { + if (!uri->post) return filename; + + /* Jump the content type */ + formdata = strchr(uri->post, '\n'); + formdata = formdata ? formdata + 1 : uri->post; + len = strlen(formdata); + if (len == 0) return filename; + + fp = fdopen(fd, "w"); + if (!fp) { +error: unlink(filename); mem_free(filename); - close(formfd); + close(fd); return NULL; } - if (uri->post) { - /* Jump the content type */ - unsigned char *formdata = strchr(uri->post, '\n'); - - formdata = formdata ? formdata + 1 : uri->post; - fwrite(formdata, strlen(formdata), 1, formfile); + nmemb = fwrite(formdata, len, 1, fp); + if (nmemb != 1) { + fclose(fp); + goto error; } - fclose(formfile); + + if (fclose(fp) != 0) + goto error; return filename; } -- 1.5.0.1.GIT From at at altlinux.ru Tue Feb 27 03:35:59 2007 From: at at altlinux.ru (Alexey Tourbin) Date: Tue, 27 Feb 2007 13:35:59 +0300 Subject: [elinks-dev] [PATCH] search.c: fix gcc warning Message-ID: <20070227103559.GD2404@localhost.localdomain> search.c: In function 'point_intersect': search.c:828: warning: value computed is not used search.c:828: warning: value computed is not used --- src/viewer/text/search.c | 5 ++++- 1 files changed, 4 insertions(+), 1 deletions(-) diff --git a/src/viewer/text/search.c b/src/viewer/text/search.c index 5371688..1f3143e 100644 --- a/src/viewer/text/search.c +++ b/src/viewer/text/search.c @@ -825,7 +825,10 @@ point_intersect(struct point *p1, int l1, struct point *p2, int l2) assert(p2); if_assert_failed return 0; - if (first_time) memset(hash, 0, HASH_SIZE), first_time = 0; + if (first_time) { + memset(hash, 0, HASH_SIZE); + first_time = 0; + } for (i = 0; i < l1; i++) hash[HASH(p1[i])] = 1; -- 1.5.0.1.GIT From at at altlinux.ru Tue Feb 27 03:36:21 2007 From: at at altlinux.ru (Alexey Tourbin) Date: Tue, 27 Feb 2007 13:36:21 +0300 Subject: [elinks-dev] [PATCH] textarea.c (save_textarea_file): paranoid error handling Message-ID: <20070227103621.GE2404@localhost.localdomain> gcc warning as follows: textarea.c: In function 'save_textarea_file': textarea.c:305: warning: ignoring return value of 'fwrite', declared with attribute warn_unused_result Check fwrite() and fclose() return values. Also unlink temporary file on error conditions. This routine is now very similar to user.c:save_form_data_to_file(). Maybe they should be factored. --- src/viewer/text/textarea.c | 33 +++++++++++++++++++++++++-------- 1 files changed, 25 insertions(+), 8 deletions(-) diff --git a/src/viewer/text/textarea.c b/src/viewer/text/textarea.c index bbc58dc..7e2ac2d 100644 --- a/src/viewer/text/textarea.c +++ b/src/viewer/text/textarea.c @@ -292,22 +292,39 @@ static unsigned char * save_textarea_file(unsigned char *value) { unsigned char *filename; - FILE *file = NULL; - int h; + FILE *fp; + int fd; + size_t len, nmemb; filename = get_tempdir_filename("elinks-area-XXXXXX"); if (!filename) return NULL; - h = safe_mkstemp(filename); - if (h >= 0) file = fdopen(h, "w"); + fd = safe_mkstemp(filename); + if (fd < 0) { + mem_free(filename); + return NULL; + } - if (file) { - fwrite(value, strlen(value), 1, file); - fclose(file); - } else { + len = strlen(value); + if (len == 0) return filename; + + fp = fdopen(fd, "w"); + if (!fp) { +error: unlink(filename); mem_free(filename); + close(fd); + return NULL; + } + + nmemb = fwrite(value, len, 1, fp); + if (nmemb != 1) { + fclose(fp); + goto error; } + if (fclose(fp) != 0) + goto error; + return filename; } -- 1.5.0.1.GIT From at at altlinux.ru Tue Feb 27 03:36:51 2007 From: at at altlinux.ru (Alexey Tourbin) Date: Tue, 27 Feb 2007 13:36:51 +0300 Subject: [elinks-dev] [PATCH] smb.c: fix gcc warnings (asprintf) Message-ID: <20070227103651.GF2404@localhost.localdomain> --- src/protocol/smb/smb.c | 12 ++++++++++-- 1 files changed, 10 insertions(+), 2 deletions(-) diff --git a/src/protocol/smb/smb.c b/src/protocol/smb/smb.c index 62550e3..a7cc0dc 100644 --- a/src/protocol/smb/smb.c +++ b/src/protocol/smb/smb.c @@ -627,8 +627,12 @@ smb_protocol_handler(struct connection *conn) if (*share) { /* Construct service path. */ - asprintf((char **) &v[n++], "//%.*s/%s", + int rv = asprintf((char **) &v[n++], "//%.*s/%s", uri->hostlen, uri->host, share); + if (rv < 1) { + perror("asprintf"); + _exit(1); + } /* Add password if any. */ if (uri->passwordlen && !uri->userlen) { @@ -658,9 +662,13 @@ smb_protocol_handler(struct connection *conn) v[n++] = memacpy(uri->user, uri->userlen); } else { /* With password. */ - asprintf((char **) &v[n++], "%.*s%%%.*s", + int rv = asprintf((char **) &v[n++], "%.*s%%%.*s", uri->userlen, uri->user, uri->passwordlen, uri->password); + if (rv < 1) { + perror("asprintf"); + _exit(1); + } } } -- 1.5.0.1.GIT From at at altlinux.ru Tue Feb 27 03:37:14 2007 From: at at altlinux.ru (Alexey Tourbin) Date: Tue, 27 Feb 2007 13:37:14 +0300 Subject: [elinks-dev] [PATCH] error.c: fix gcc warning (vasprintf) Message-ID: <20070227103714.GG2404@localhost.localdomain> --- src/util/error.c | 7 ++++++- 1 files changed, 6 insertions(+), 1 deletions(-) diff --git a/src/util/error.c b/src/util/error.c index 0c2d1cd..8164f82 100644 --- a/src/util/error.c +++ b/src/util/error.c @@ -145,13 +145,18 @@ void elinks_assertm(int x, unsigned char *fmt, ...) { unsigned char *buf = NULL; + int rv; va_list params; if (assert_failed) return; if (!(assert_failed = !x)) return; va_start(params, fmt); - vasprintf((char **) &buf, fmt, params); + rv = vasprintf((char **) &buf, fmt, params); + if (rv < 0) { + perror("vasprintf"); + return; + } va_end(params); elinks_internal("assertion failed: %s", buf); if (buf) free(buf); -- 1.5.0.1.GIT From kon at iki.fi Tue Feb 27 13:43:13 2007 From: kon at iki.fi (Kalle Olavi Niemitalo) Date: Tue, 27 Feb 2007 22:43:13 +0200 Subject: [elinks-dev] [PATCH] error.c: fix gcc warning (vasprintf) In-Reply-To: <20070227103714.GG2404@localhost.localdomain> References: <20070227103714.GG2404@localhost.localdomain> Message-ID: <873b4rjpr2.fsf@Astalo.kon.iki.fi> A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 188 bytes Desc: not available Url : http://linuxfromscratch.org/pipermail/elinks-dev/attachments/20070227/4d774154/attachment.bin From kon at iki.fi Tue Feb 27 13:59:14 2007 From: kon at iki.fi (Kalle Olavi Niemitalo) Date: Tue, 27 Feb 2007 22:59:14 +0200 Subject: [elinks-dev] witekfl branch status In-Reply-To: <20070226191952.GB905@pldmachine.fixsoftware.pl> References: <87odoj6oq1.fsf@Astalo.kon.iki.fi> <87abz2bov4.fsf@Astalo.kon.iki.fi> <20070226191952.GB905@pldmachine.fixsoftware.pl> Message-ID: <87wt23iafx.fsf@Astalo.kon.iki.fi> A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 188 bytes Desc: not available Url : http://linuxfromscratch.org/pipermail/elinks-dev/attachments/20070227/c8cc192f/attachment-0001.bin