w3m

Unnamed repository; edit this file to name it for gitweb.
git clone https://logand.com/git/w3m.git/
Log | Files | Refs | README

commit 4a2bd70876e7d04a2e65f6f00d0c69153c0b25d6
parent c41e16da608dfdf77eea904832f96005b585172f
Author: ukai <ukai>
Date:   Thu,  4 Nov 2004 17:25:44 +0000

[w3m-dev 04117] Re: start attribute and value attribute on ordered lists
* file.c (HTMLtagproc1): allow negative value for start attr
From: Hiroyuki Ito <ZXB01226@nifty.com>

Diffstat:
MChangeLog | 5+++++
Mfile.c | 6++++--
2 files changed, 9 insertions(+), 2 deletions(-)

diff --git a/ChangeLog b/ChangeLog @@ -1,3 +1,8 @@ +2004-11-05 Hiroyuki Ito <ZXB01226@nifty.com> + + * [w3m-dev 04117] Re: start attribute and value attribute on ordered lists + * file.c (HTMLtagproc1): allow negative value for start attr + 2004-10-14 Fumitoshi UKAI <ukai@debian.or.jp> * Bug#276246: w3m's locale parsing should at least see '@euro' modifier diff --git a/file.c b/file.c @@ -4180,7 +4180,7 @@ HTMLtagproc1(struct parsed_tag *tag, struct html_feed_environ *h_env) } PUSH_ENV(cmd); if (cmd == HTML_UL || cmd == HTML_OL) { - if (parsedtag_get_value(tag, ATTR_START, &count) && count > 0) { + if (parsedtag_get_value(tag, ATTR_START, &count)) { envs[h_env->envc].count = count - 1; } } @@ -4239,6 +4239,8 @@ HTMLtagproc1(struct parsed_tag *tag, struct html_feed_environ *h_env) count = atoi(p); if (count > 0) envs[h_env->envc].count = count; + else + envs[h_env->envc].count = 0; } switch (envs[h_env->envc].env) { case HTML_UL: @@ -4272,7 +4274,7 @@ HTMLtagproc1(struct parsed_tag *tag, struct html_feed_environ *h_env) case HTML_OL: if (parsedtag_get_value(tag, ATTR_TYPE, &p)) envs[h_env->envc].type = (int)*p; - switch (envs[h_env->envc].type) { + switch ((envs[h_env->envc].count > 0)? envs[h_env->envc].type: '1') { case 'i': num = romanNumeral(envs[h_env->envc].count); break;