/[groff]/groff/src/devices/grohtml/post-html.cpp
ViewVC logotype

Diff of /groff/src/devices/grohtml/post-html.cpp

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.15 by wl, Wed Nov 24 14:18:21 2004 UTC revision 1.16 by wl, Tue Dec 7 21:23:55 2004 UTC
# Line 694  int text_glob::is_eo_tl (void) Line 694  int text_glob::is_eo_tl (void)
694    
695  int text_glob::is_nf (void)  int text_glob::is_nf (void)
696  {  {
697    return is_tag && (strncmp(text_string, "html-tag:.fi", 12) == 0) &&    return is_tag && (strncmp(text_string, "html-tag:.fi",
698                                strlen("html-tag:.fi")) == 0) &&
699           (get_arg() == 0);           (get_arg() == 0);
700  }  }
701    
# Line 704  int text_glob::is_nf (void) Line 705  int text_glob::is_nf (void)
705    
706  int text_glob::is_fi (void)  int text_glob::is_fi (void)
707  {  {
708    return( is_tag && (strncmp(text_string, "html-tag:.fi", 12) == 0) &&    return( is_tag && (strncmp(text_string, "html-tag:.fi",
709                                 strlen("html-tag:.fi")) == 0) &&
710            (get_arg() == 1) );            (get_arg() == 1) );
711  }  }
712    
# Line 723  int text_glob::is_eo_h (void) Line 725  int text_glob::is_eo_h (void)
725    
726  int text_glob::is_ce (void)  int text_glob::is_ce (void)
727  {  {
728    return is_tag && (strcmp(text_string, "html-tag:.ce") == 0);    return is_tag && (strncmp(text_string, "html-tag:.ce",
729                                strlen("html-tag:.ce")) == 0);
730  }  }
731    
732  /*  /*
# Line 732  int text_glob::is_ce (void) Line 735  int text_glob::is_ce (void)
735    
736  int text_glob::is_in (void)  int text_glob::is_in (void)
737  {  {
738    return is_tag && (strncmp(text_string, "html-tag:.in ", strlen("html-tag:.in ")) == 0);    return is_tag && (strncmp(text_string, "html-tag:.in ",
739                                strlen("html-tag:.in ")) == 0);
740  }  }
741    
742  /*  /*
# Line 741  int text_glob::is_in (void) Line 745  int text_glob::is_in (void)
745    
746  int text_glob::is_po (void)  int text_glob::is_po (void)
747  {  {
748    return is_tag && (strncmp(text_string, "html-tag:.po ", strlen("html-tag:.po ")) == 0);    return is_tag && (strncmp(text_string, "html-tag:.po ",
749                                strlen("html-tag:.po ")) == 0);
750  }  }
751    
752  /*  /*
# Line 750  int text_glob::is_po (void) Line 755  int text_glob::is_po (void)
755    
756  int text_glob::is_ti (void)  int text_glob::is_ti (void)
757  {  {
758    return is_tag && (strncmp(text_string, "html-tag:.ti ", strlen("html-tag:.ti ")) == 0);    return is_tag && (strncmp(text_string, "html-tag:.ti ",
759                                strlen("html-tag:.ti ")) == 0);
760  }  }
761    
762  /*  /*
# Line 2076  class html_printer : public printer { Line 2082  class html_printer : public printer {
2082    void handle_state_assertion         (text_glob *g);    void handle_state_assertion         (text_glob *g);
2083    void do_end_para                    (text_glob *g);    void do_end_para                    (text_glob *g);
2084    int  round_width                    (int x);    int  round_width                    (int x);
2085      void handle_tag_within_title        (text_glob *g);
2086      
2087    // ADD HERE    // ADD HERE
2088    
2089  public:  public:
# Line 2208  void html_printer::emit_raw (text_glob * Line 2216  void html_printer::emit_raw (text_glob *
2216  }  }
2217    
2218  /*  /*
2219     *  handle_tag_within_title - handle a limited number of tags within
2220     *                            the context of a table. Those tags which
2221     *                            set values rather than generate spaces
2222     *                            and paragraphs.
2223     */
2224    
2225    void html_printer::handle_tag_within_title (text_glob *g)
2226    {
2227      if (g->is_in() || g->is_ti() || g->is_po() || g->is_ce() || g->is_ll()
2228          || g->is_fi() || g->is_nf())
2229        troff_tag(g);
2230    }
2231    
2232    /*
2233   *  do_center - handle the .ce commands from troff.   *  do_center - handle the .ce commands from troff.
2234   */   */
2235    
# Line 2353  void html_printer::do_title (void) Line 2375  void html_printer::do_title (void)
2375            title.has_been_found = TRUE;            title.has_been_found = TRUE;
2376            return;            return;
2377          } else if (t->is_a_tag()) {          } else if (t->is_a_tag()) {
2378              handle_tag_within_title(t);
2379            page_contents->glyphs.sub_move_right();         /* move onto next word */            page_contents->glyphs.sub_move_right();         /* move onto next word */
2380            removed_from_head = ((!page_contents->glyphs.is_empty()) &&            removed_from_head = ((!page_contents->glyphs.is_empty()) &&
2381                                 (page_contents->glyphs.is_equal_to_head()));                                 (page_contents->glyphs.is_equal_to_head()));
# Line 2369  void html_printer::do_title (void) Line 2392  void html_printer::do_title (void)
2392            removed_from_head = ((!page_contents->glyphs.is_empty()) &&            removed_from_head = ((!page_contents->glyphs.is_empty()) &&
2393                                 (page_contents->glyphs.is_equal_to_head()));                                 (page_contents->glyphs.is_equal_to_head()));
2394          }          }
2395        } while ((! page_contents->glyphs.is_equal_to_head()) || (removed_from_head));        } while ((! page_contents->glyphs.is_equal_to_head()) ||
2396                   (removed_from_head));
2397      }      }
2398    }    }
2399  }  }

Legend:
Removed from v.1.15  
changed lines
  Added in v.1.16

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26