lynx-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: LYNX-DEV FONT color tagging


From: Foteos Macrides
Subject: Re: LYNX-DEV FONT color tagging
Date: Wed, 19 Feb 1997 13:19:16 -0500 (EST)

Alan Cox <address@hidden> wrote:
>Im in the middle of adding some proper color support to Lynx stuff, I've
>got it parsing <BODY bgcolor=""> and <FONT color="">. The background
>stuff doesnt quite work right yet (need to make it explicitly write
>the fill characters), and the foreground is happy, except that I cannot
>figure out what extra magic is needed to persuade it to call my FONT
>handler for the </FONT> tag. It simply appears not to be calling
>anything.
>
>I've also btw put lynx-2.7-ssl-gpm up on shadow.cabi.net as a Linux
>RPM and SRPM package.

        Look at this section of SGML.c;
        
[...]
                } else if (tag_OK &&
                           !strcasecomp(string->data, "FONT")) {
                    /*
                    **  Treat a FONT end tag as a FONT start tag with
                    **  a dummy END attribute.  It's too likely to be
                    **  interdigited and mess up the parsing, so we've
                    **  declared FONT as SGML_EMPTY and will handle the
                    **  end tag in HTML_start_element. - FM
                    */
                    if (TRACE)
                        fprintf(stderr,
                                "SGML: `</%s%c' found!  Treating as '<%s%c'.\n",
                                string->data, c, string->data, c);
                    {
                        int i;
                        for (i = 0;
                             i < context->current_tag->number_of_attributes;
                             i++) {
                            context->present[i] = (i == HTML_FONT_END);
                        }
                    }
                    string->size = 0;
                    context->current_attribute_number = INVALID;
                    if (context->current_tag->name)
                        start_element(context);
                    if (c != '>') {
                        context->state = S_junk_tag;
                    } else {
                        context->state = S_text;
                    }
                    break;
                } else {
[...]


        Under  case HTML_FONT:  in HTML_start_element() of HTML.c,
check for  (present && present[HTML_FONT_END])

        Are you aware of, and have you looked at, Rob's LynxRP code
set at http://lynx.browser.org/  ?

                                Fote

=========================================================================
 Foteos Macrides            Worcester Foundation for Biomedical Research
 address@hidden         222 Maple Avenue, Shrewsbury, MA 01545
=========================================================================
;
; To UNSUBSCRIBE:  Send a mail message to address@hidden
;                  with "unsubscribe lynx-dev" (without the
;                  quotation marks) on a line by itself.
;

reply via email to

[Prev in Thread] Current Thread [Next in Thread]