groff
[Top][All Lists]
Advanced

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

[Groff] g++ -Wall patches


From: Bruno Haible
Subject: [Groff] g++ -Wall patches
Date: Tue, 11 Jan 2000 14:41:58 +0100 (MET)

Hello,

In order to spot programming mistakes, g++ -Wall is a useful tool. But only
if the view is not obscured by a lot of gratuitous warnings. Therefore here
is a patch which removed most warnings occurring if groff is configured with
CXXFLAGS="-Wall -Wno-sign-compare".

The GNU standards say that you need not listen to gcc -Wall, but now I
discovered that one piece of the patch below indeed fixes a build
failure with Sun CC 3.0.1:

"html.cc", line 3221: Error: html_printer::copy_line(text_defn*, text_defn*) is 
expected to return a value.
1 Error(s) detected.

                    Bruno


2000-01-08  Bruno Haible  <address@hidden>

        * eqn/box.cc, eqn/lex.cc, eqn/other.cc, eqn/over.cc, eqn/special.cc,
          eqn/text.cc, grodvi/dvi.cc, grohtml/html.cc, grops/ps.cc,
          grops/psrm.cc, libbib/index.cc, libbib/linear.cc, libbib/search.cc,
          libdriver/printer.cc, libgroff/font.cc, libgroff/string.cc,
          pic/lex.cc, pic/object.cc, refer/label.y, refer/ref.cc, tbl/main.cc,
          tbl/table.cc, tfmtodit/tfmtodit.cc, troff/dictionary.cc,
          troff/div.cc, troff/env.cc, troff/input.cc, troff/node.cc,
          troff/node.h, troff/reg.cc: Avoid most "g++ -Wall -Wno-sign-compare"
          warnings.
        * troff/node.cc (bracket_node::copy): Initialize last to NULL.
        * grohtml/html.cc (html_printer::copy_line): Change return type to
          void.
          (html_printer::~html_printer): Remove useless loop.

diff -r -c3 groff-1.15.orig/eqn/box.cc groff-1.15.wall/eqn/box.cc
*** groff-1.15.orig/eqn/box.cc  Fri May 21 06:50:41 1999
--- groff-1.15.wall/eqn/box.cc  Sat Jan  8 13:49:19 2000
***************
*** 264,270 ****
  
  int box::next_uid = 0;
  
! box::box() : uid(next_uid++), spacing_type(ORDINARY_TYPE)
  {
  }
  
--- 264,270 ----
  
  int box::next_uid = 0;
  
! box::box() : spacing_type(ORDINARY_TYPE), uid(next_uid++)
  {
  }
  
diff -r -c3 groff-1.15.orig/eqn/lex.cc groff-1.15.wall/eqn/lex.cc
*** groff-1.15.orig/eqn/lex.cc  Fri May 21 06:50:42 1999
--- groff-1.15.wall/eqn/lex.cc  Sat Jan  8 13:48:56 2000
***************
*** 471,477 ****
  
  argument_macro_input::argument_macro_input(const char *body, int ac, 
                                           char **av, input *x)
! : input(x), argc(ac), ap(0)
  {
    int i;
    for (i = 0; i < argc; i++)
--- 471,477 ----
  
  argument_macro_input::argument_macro_input(const char *body, int ac, 
                                           char **av, input *x)
! : input(x), ap(0), argc(ac)
  {
    int i;
    for (i = 0; i < argc; i++)
diff -r -c3 groff-1.15.orig/eqn/other.cc groff-1.15.wall/eqn/other.cc
*** groff-1.15.orig/eqn/other.cc        Fri May 21 06:50:42 1999
--- groff-1.15.wall/eqn/other.cc        Sat Jan  8 13:54:12 2000
***************
*** 38,44 ****
    return new accent_box(p, q);
  }
  
! accent_box::accent_box(box *pp, box *qq) : ab(qq), pointer_box(pp)
  {
  }
  
--- 38,44 ----
    return new accent_box(p, q);
  }
  
! accent_box::accent_box(box *pp, box *qq) : pointer_box(pp), ab(qq)
  {
  }
  
***************
*** 386,392 ****
    fprintf(stderr, " } under");
  }
  
! size_box::size_box(char *s, box *pp) : size(s), pointer_box(pp)
  {
  }
  
--- 386,392 ----
    fprintf(stderr, " } under");
  }
  
! size_box::size_box(char *s, box *pp) : pointer_box(pp), size(s)
  {
  }
  
***************
*** 495,501 ****
  }
  
  
! vmotion_box::vmotion_box(int i, box *pp) : n(i), pointer_box(pp)
  {
  }
  
--- 495,501 ----
  }
  
  
! vmotion_box::vmotion_box(int i, box *pp) : pointer_box(pp), n(i)
  {
  }
  
***************
*** 534,540 ****
    fprintf(stderr, " }");
  }
  
! hmotion_box::hmotion_box(int i, box *pp) : n(i), pointer_box(pp)
  {
  }
  
--- 534,540 ----
    fprintf(stderr, " }");
  }
  
! hmotion_box::hmotion_box(int i, box *pp) : pointer_box(pp), n(i)
  {
  }
  
diff -r -c3 groff-1.15.orig/eqn/over.cc groff-1.15.wall/eqn/over.cc
*** groff-1.15.orig/eqn/over.cc Fri May 21 06:50:42 1999
--- groff-1.15.wall/eqn/over.cc Sat Jan  8 13:50:11 2000
***************
*** 46,52 ****
  }
  
  over_box::over_box(int is_small, box *pp, box *qq)
! : num(pp), den(qq), reduce_size(is_small)
  {
    spacing_type = INNER_TYPE;
  }
--- 46,52 ----
  }
  
  over_box::over_box(int is_small, box *pp, box *qq)
! : reduce_size(is_small), num(pp), den(qq)
  {
    spacing_type = INNER_TYPE;
  }
diff -r -c3 groff-1.15.orig/eqn/special.cc groff-1.15.wall/eqn/special.cc
*** groff-1.15.orig/eqn/special.cc      Fri May 21 06:50:42 1999
--- groff-1.15.wall/eqn/special.cc      Sat Jan  8 13:54:36 2000
***************
*** 59,65 ****
    return new special_box(s, p);
  }
  
! special_box::special_box(char *s, box *pp) :macro_name(s), pointer_box(pp)
  {
  }
  
--- 59,65 ----
    return new special_box(s, p);
  }
  
! special_box::special_box(char *s, box *pp) : pointer_box(pp), macro_name(s)
  {
  }
  
diff -r -c3 groff-1.15.orig/eqn/text.cc groff-1.15.wall/eqn/text.cc
*** groff-1.15.orig/eqn/text.cc Fri May 21 06:50:42 1999
--- groff-1.15.wall/eqn/text.cc Sat Jan  8 13:53:11 2000
***************
*** 165,171 ****
  }
  
  char_box::char_box(unsigned char cc)
! : c(cc), prev_is_italic(0), next_is_italic(0)
  {
    spacing_type = char_table[c].spacing_type;
  }
--- 165,171 ----
  }
  
  char_box::char_box(unsigned char cc)
! : c(cc), next_is_italic(0), prev_is_italic(0)
  {
    spacing_type = char_table[c].spacing_type;
  }
diff -r -c3 groff-1.15.orig/grodvi/dvi.cc groff-1.15.wall/grodvi/dvi.cc
*** groff-1.15.orig/grodvi/dvi.cc       Sun Sep 12 09:21:09 1999
--- groff-1.15.wall/grodvi/dvi.cc       Sat Jan  8 14:05:46 2000
***************
*** 186,193 ****
  };
  
  dvi_printer::dvi_printer()
! : byte_count(0), last_bop(-1), page_count(0), cur_font(0), fp(stdout),
!   max_h(0), max_v(0), pushed(0), line_thickness(-1), cur_point_size(-1)
  {
    if (font::res != RES)
      fatal("resolution must be %1", RES);
--- 186,193 ----
  };
  
  dvi_printer::dvi_printer()
! : fp(stdout), byte_count(0), last_bop(-1), page_count(0), max_h(0), max_v(0),
!   cur_font(0), cur_point_size(-1), pushed(0), line_thickness(-1)
  {
    if (font::res != RES)
      fatal("resolution must be %1", RES);
diff -r -c3 groff-1.15.orig/grohtml/html.cc groff-1.15.wall/grohtml/html.cc
*** groff-1.15.orig/grohtml/html.cc     Wed Dec 15 00:25:41 1999
--- groff-1.15.wall/grohtml/html.cc     Sat Jan  8 14:29:36 2000
***************
*** 180,186 ****
  }
  
  style::style(font *p, int sz, int h, int sl, int no)
!   : f(p), point_size(sz), height(h), slant(sl), font_no(no)
  {
  }
  
--- 180,186 ----
  }
  
  style::style(font *p, int sz, int h, int sl, int no)
!   : f(p), point_size(sz), font_no(no), height(h), slant(sl)
  {
  }
  
***************
*** 210,216 ****
  };
  
  char_block::char_block()
! : next(0), used(0)
  {
  }
  
--- 210,216 ----
  };
  
  char_block::char_block()
! : used(0), next(0)
  {
  }
  
***************
*** 300,306 ****
                      int min_vertical, int min_horizontal,
                      int max_vertical, int max_horizontal, int is_command, int 
is_html)
    : text_style(*s), text_string(string), text_length(length),
!     minv(min_vertical), minh(min_horizontal), maxv(max_vertical), 
maxh(max_horizontal),
      is_raw_command(is_command), is_html_command(is_html)
  {
  }
--- 300,306 ----
                      int min_vertical, int min_horizontal,
                      int max_vertical, int max_horizontal, int is_command, int 
is_html)
    : text_style(*s), text_string(string), text_length(length),
!     minv(min_vertical), maxv(max_vertical), minh(min_horizontal), 
maxh(max_horizontal),
      is_raw_command(is_command), is_html_command(is_html)
  {
  }
***************
*** 346,352 ****
  };
  
  graphic_glob::graphic_glob ()
!   : minv(-1), maxv(-1), minh(-1), maxh(-1), code(0), size(0), nopoints(0), 
point(0)
  {
  }
  
--- 346,352 ----
  };
  
  graphic_glob::graphic_glob ()
!   : minv(-1), maxv(-1), minh(-1), maxh(-1), nopoints(0), point(0), size(0), 
code(0)
  {
  }
  
***************
*** 358,364 ****
  }
  
  graphic_glob::graphic_glob (int troff_code)
!   : minv(-1), maxv(-1), minh(-1), maxh(-1), code(troff_code), size(0), 
nopoints(0), point(0)
  {
  }
  
--- 358,364 ----
  }
  
  graphic_glob::graphic_glob (int troff_code)
!   : minv(-1), maxv(-1), minh(-1), maxh(-1), nopoints(0), point(0), size(0), 
code(troff_code)
  {
  }
  
***************
*** 789,795 ****
   */
  
  simple_output::simple_output(FILE *f, int n)
! : fp(f), max_line_length(n), col(0), need_space(0), fixed_point(0)
  {
  }
  
--- 789,795 ----
   */
  
  simple_output::simple_output(FILE *f, int n)
! : fp(f), col(0), max_line_length(n), need_space(0), fixed_point(0)
  {
  }
  
***************
*** 928,937 ****
  };
  
  static struct html_2_postscript char_conversions[] = {
!   "+-", "char177",
!   "eq", "=",
!   "mu", "char215",
!   NULL, NULL,
  };
  
  
--- 928,937 ----
  };
  
  static struct html_2_postscript char_conversions[] = {
!   { "+-", "char177" },
!   { "eq", "=" },
!   { "mu", "char215" },
!   { NULL, NULL },
  };
  
  
***************
*** 1053,1059 ****
  
  
  title_desc::title_desc ()
!   : has_been_found(FALSE), has_been_written(FALSE)
  {
  }
  
--- 1053,1059 ----
  
  
  title_desc::title_desc ()
!   : has_been_written(FALSE), has_been_found(FALSE)
  {
  }
  
***************
*** 1274,1280 ****
    void  calculate_right               (struct text_defn *line, int max_words);
    void  determine_right_most_column   (struct text_defn *line, int max_words);
    int   remove_white_using_words      (struct text_defn *next_guess, struct 
text_defn *last_guess, struct text_defn *next_line);
!   int   copy_line                     (struct text_defn *dest, struct 
text_defn *src);
    void  combine_line                  (struct text_defn *dest, struct 
text_defn *src);
    int   conflict_with_words           (struct text_defn *column_guess, struct 
text_defn *words);
    void  remove_entry_in_line          (struct text_defn *line, int j);
--- 1274,1280 ----
    void  calculate_right               (struct text_defn *line, int max_words);
    void  determine_right_most_column   (struct text_defn *line, int max_words);
    int   remove_white_using_words      (struct text_defn *next_guess, struct 
text_defn *last_guess, struct text_defn *next_line);
!   void  copy_line                     (struct text_defn *dest, struct 
text_defn *src);
    void  combine_line                  (struct text_defn *dest, struct 
text_defn *src);
    int   conflict_with_words           (struct text_defn *column_guess, struct 
text_defn *words);
    void  remove_entry_in_line          (struct text_defn *line, int j);
***************
*** 1311,1340 ****
  };
  
  html_printer::html_printer()
! : no_of_printed_pages(0),
    sbuf_len(0),
    output_hpos(-1),
    output_vpos(-1),
-   html(0, MAX_LINE_LENGTH),
-   troff(0, MAX_LINE_LENGTH),
    line_thickness(-1),
-   inside_font_style(0),
    fill(FILL_MAX + 1),
    page_number(0),
    left_margin_indent(0),
    right_margin_indent(0),
-   start_region_vpos(0),
-   start_region_hpos(0),
-   end_region_vpos(0),
-   end_region_hpos(0),
    need_one_newline(0),
    issued_newline(0),
-   image_number(0),
-   graphic_level(0),
-   cutoff_heading(100),
    in_paragraph(0),
    need_paragraph(0),
!   para_type(left_alignment)
  {
    tempfp = xtmpfile();
    html.set_file(tempfp);
--- 1311,1341 ----
  };
  
  html_printer::html_printer()
! :
!   html(0, MAX_LINE_LENGTH),
!   troff(0, MAX_LINE_LENGTH),
!   no_of_printed_pages(0),
    sbuf_len(0),
    output_hpos(-1),
    output_vpos(-1),
    line_thickness(-1),
    fill(FILL_MAX + 1),
+   inside_font_style(0),
    page_number(0),
    left_margin_indent(0),
    right_margin_indent(0),
    need_one_newline(0),
    issued_newline(0),
    in_paragraph(0),
    need_paragraph(0),
!   para_type(left_alignment),
!   image_number(0),
!   graphic_level(0),
!   start_region_vpos(0),
!   start_region_hpos(0),
!   end_region_vpos(0),
!   end_region_hpos(0),
!   cutoff_heading(100)
  {
    tempfp = xtmpfile();
    html.set_file(tempfp);
***************
*** 1773,1779 ****
  void html_printer::remove_redundant_regions (void)
  {
    region_glob  *r;
-   graphic_glob *g;
    
    // firstly run through the region making sure that all are needed
    // ie all contain a line or word
--- 1774,1779 ----
***************
*** 2199,2206 ****
    graphic_glob *g=0;
    FILE         *f=0;
    char          name[MAX_TEMP_NAME];
-   char          buffer[1024];
-   int           r=font::res;
    int           something=FALSE;
    int           is_center=FALSE;
  
--- 2199,2204 ----
***************
*** 2573,2579 ****
  void html_printer::build_header (text_glob *g)
  {
    int r            = font::res;
-   int height       = g->text_style.point_size*r/72;
    text_glob *l;
    int current_vpos;
  
--- 2571,2576 ----
***************
*** 3206,3212 ****
   *  copy_line - dest = src
   */
  
! int html_printer::copy_line (struct text_defn *dest, struct text_defn *src)
  { 
    int k;
  
--- 3203,3209 ----
   *  copy_line - dest = src
   */
  
! void html_printer::copy_line (struct text_defn *dest, struct text_defn *src)
  { 
    int k;
  
***************
*** 3465,3471 ****
    struct text_defn   next_guess[MAX_WORDS_PER_LINE];
    int                i     =0;
    int                lines =0;
-   int                mingap=calculate_min_gap(start);
    int                limit;
  
  #if 0
--- 3462,3467 ----
***************
*** 3699,3706 ****
  
  void html_printer::start_table (void)
  {
-   int i;
- 
    end_paragraph();
    html.put_string("\n<table width=\"100%\"  rules=\"none\"  frame=\"none\"  
cols=\"");
    html.put_number(indentation.no_of_columns);
--- 3695,3700 ----
***************
*** 4079,4086 ****
      // we are allowed to check for centered line
      // first check to see whether we might be looking at a set of columns
      struct text_defn   last_guess[MAX_WORDS_PER_LINE];
-     int                limit = collect_columns(last_guess, 0, 
MAX_WORDS_PER_LINE);
  
      rewind_text_to(g);    
      if ((count_columns(last_guess) == 1) && (is_in_middle(last_guess[0].left, 
last_guess[0].right))) {
        write_centered_line(g);
--- 4073,4080 ----
      // we are allowed to check for centered line
      // first check to see whether we might be looking at a set of columns
      struct text_defn   last_guess[MAX_WORDS_PER_LINE];
  
+     collect_columns(last_guess, 0, MAX_WORDS_PER_LINE);
      rewind_text_to(g);    
      if ((count_columns(last_guess) == 1) && (is_in_middle(last_guess[0].left, 
last_guess[0].right))) {
        write_centered_line(g);
***************
*** 4965,4973 ****
      html.begin_comment("CreationDate: ")
         .comment_arg(ctime(&t))
         .end_comment();
-   }
-   for (font_pointer_list *f = font_list; f; f = f->next) {
-     html_font *psf = (html_font *)(f->p);
    }
    html.begin_comment("Total number of pages: 
").comment_arg(itoa(no_of_printed_pages)).end_comment();
    html.end_line();
--- 4959,4964 ----
diff -r -c3 groff-1.15.orig/grops/ps.cc groff-1.15.wall/grops/ps.cc
*** groff-1.15.orig/grops/ps.cc Sun Sep 12 09:21:10 1999
--- groff-1.15.wall/grops/ps.cc Sat Jan  8 13:58:14 2000
***************
*** 70,76 ****
  }
  
  ps_output::ps_output(FILE *f, int n)
! : fp(f), max_line_length(n), col(0), need_space(0), fixed_point(0)
  {
  }
  
--- 70,76 ----
  }
  
  ps_output::ps_output(FILE *f, int n)
! : fp(f), col(0), max_line_length(n), need_space(0), fixed_point(0)
  {
  }
  
***************
*** 381,387 ****
  }
  
  ps_font::ps_font(const char *nm)
! : font(nm), encoding(0), reencoded_name(0), encoding_index(-1)
  {
  }
  
--- 381,387 ----
  }
  
  ps_font::ps_font(const char *nm)
! : font(nm), encoding_index(-1), encoding(0), reencoded_name(0)
  {
  }
  
***************
*** 512,526 ****
  };
  
  ps_printer::ps_printer()
! : pages_output(0),
    sbuf_len(0),
    output_hpos(-1),
    output_vpos(-1),
-   out(0, MAX_LINE_LENGTH),
-   ndefined_styles(0),
-   next_encoding_index(0),
    line_thickness(-1),
    fill(FILL_MAX + 1),
    ndefs(0),
    invis_count(0)
  {
--- 512,526 ----
  };
  
  ps_printer::ps_printer()
! : out(0, MAX_LINE_LENGTH),
!   pages_output(0),
    sbuf_len(0),
    output_hpos(-1),
    output_vpos(-1),
    line_thickness(-1),
    fill(FILL_MAX + 1),
+   ndefined_styles(0),
+   next_encoding_index(0),
    ndefs(0),
    invis_count(0)
  {
diff -r -c3 groff-1.15.orig/grops/psrm.cc groff-1.15.wall/grops/psrm.cc
*** groff-1.15.orig/grops/psrm.cc       Sun Sep 12 12:02:11 1999
--- groff-1.15.wall/grops/psrm.cc       Sat Jan  8 14:01:31 2000
***************
*** 67,73 ****
  };
  
  resource::resource(resource_type t, string &n, string &v, unsigned r)
! : type(t), revision(r), flags (0), filename(0), rank(-1), next(0)
  {
    name.move(n);
    version.move(v);
--- 67,73 ----
  };
  
  resource::resource(resource_type t, string &n, string &v, unsigned r)
! : next(0), type(t), flags(0), revision(r), filename(0), rank(-1)
  {
    name.move(n);
    version.move(v);
***************
*** 96,102 ****
  }
  
  resource_manager::resource_manager()
! : resource_list(0), extensions(0), language_level(0)
  {
    read_download_file();
    string procset_name("grops");
--- 96,102 ----
  }
  
  resource_manager::resource_manager()
! : extensions(0), language_level(0), resource_list(0)
  {
    read_download_file();
    string procset_name("grops");
***************
*** 940,952 ****
          const char *ptr;
          int i;
          for (i = 0; i < NCOMMENTS; i++)
!           if (ptr = matches_comment(buf, comment_table[i].name)) {
              copy_this_line
                = (this->*(comment_table[i].proc))(ptr, rank, fp, outfp);
              break;
            }
          if (i >= NCOMMENTS && in_header) {
!           if (ptr = matches_comment(buf, "EndComments"))
              in_header = 0;
            else if (!had_extensions_comment
                     && (ptr = matches_comment(buf, "Extensions:"))) {
--- 940,952 ----
          const char *ptr;
          int i;
          for (i = 0; i < NCOMMENTS; i++)
!           if ((ptr = matches_comment(buf, comment_table[i].name))) {
              copy_this_line
                = (this->*(comment_table[i].proc))(ptr, rank, fp, outfp);
              break;
            }
          if (i >= NCOMMENTS && in_header) {
!           if ((ptr = matches_comment(buf, "EndComments")))
              in_header = 0;
            else if (!had_extensions_comment
                     && (ptr = matches_comment(buf, "Extensions:"))) {
diff -r -c3 groff-1.15.orig/libbib/index.cc groff-1.15.wall/libbib/index.cc
*** groff-1.15.orig/libbib/index.cc     Fri May 21 06:50:38 1999
--- groff-1.15.wall/libbib/index.cc     Sat Jan  8 12:26:38 2000
***************
*** 105,113 ****
  
  
  index_search_item::index_search_item(const char *filename, int fid)
! : search_item(filename, fid), out_of_date_files(0), key_buffer(0),
!   filename_buffer(0), filename_buflen(0), common_words_table(0),
!   map_addr(0), map_len(0), buffer(0)
  {
  }
  
--- 105,113 ----
  
  
  index_search_item::index_search_item(const char *filename, int fid)
! : search_item(filename, fid), out_of_date_files(0), buffer(0), map_addr(0),
!   map_len(0), key_buffer(0), filename_buffer(0), filename_buflen(0),
!   common_words_table(0)
  {
  }
  
***************
*** 297,305 ****
  
  index_search_item_iterator::index_search_item_iterator(index_search_item *ind,
                                                       const char *q)
! : indx(ind), buf(0), buflen(0), temp_list(0), query(strsave(q)),
    searcher(q, strlen(q), ind->ignore_fields, ind->header.truncate),
!   out_of_date_files_iter(0), next_out_of_date_file(0)
  {
    found_list = indx->search(q, strlen(q), &temp_list);
    if (!found_list) {
--- 297,306 ----
  
  index_search_item_iterator::index_search_item_iterator(index_search_item *ind,
                                                       const char *q)
! : indx(ind), out_of_date_files_iter(0), next_out_of_date_file(0), 
temp_list(0),
!   buf(0), buflen(0),
    searcher(q, strlen(q), ind->ignore_fields, ind->header.truncate),
!   query(strsave(q))
  {
    found_list = indx->search(q, strlen(q), &temp_list);
    if (!found_list) {
diff -r -c3 groff-1.15.orig/libbib/linear.cc groff-1.15.wall/libbib/linear.cc
*** groff-1.15.orig/libbib/linear.cc    Fri May 21 06:50:38 1999
--- groff-1.15.wall/libbib/linear.cc    Sat Jan  8 12:30:58 2000
***************
*** 345,351 ****
  
  linear_searcher::linear_searcher(const char *query, int query_len,
                                 const char *ign, int trunc)
! : keys(0), nkeys(0), truncate_len(trunc), ignore_fields(ign)
  {
    const char *query_end = query + query_len;
    int nk = 0;
--- 345,351 ----
  
  linear_searcher::linear_searcher(const char *query, int query_len,
                                 const char *ign, int trunc)
! : ignore_fields(ign), truncate_len(trunc), keys(0), nkeys(0)
  {
    const char *query_end = query + query_len;
    int nk = 0;
diff -r -c3 groff-1.15.orig/libbib/search.cc groff-1.15.wall/libbib/search.cc
*** groff-1.15.orig/libbib/search.cc    Fri May 21 06:50:38 1999
--- groff-1.15.wall/libbib/search.cc    Sat Jan  8 12:32:03 2000
***************
*** 107,113 ****
  }
  
  search_item::search_item(const char *nm, int fid)
! : next(0), name(strsave(nm)), filename_id(fid)
  {
  }
  
--- 107,113 ----
  }
  
  search_item::search_item(const char *nm, int fid)
! : name(strsave(nm)), filename_id(fid), next(0)
  {
  }
  
diff -r -c3 groff-1.15.orig/libdriver/printer.cc 
groff-1.15.wall/libdriver/printer.cc
*** groff-1.15.orig/libdriver/printer.cc        Sun Sep 12 09:21:13 1999
--- groff-1.15.wall/libdriver/printer.cc        Sat Jan  8 12:21:55 2000
***************
*** 28,34 ****
  }
  
  printer::printer()
! : font_table(0), nfonts(0), font_list(0)
  {
  }
  
--- 28,34 ----
  }
  
  printer::printer()
! : font_list(0), font_table(0), nfonts(0)
  {
  }
  
diff -r -c3 groff-1.15.orig/libgroff/font.cc groff-1.15.wall/libgroff/font.cc
*** groff-1.15.orig/libgroff/font.cc    Sun Sep 12 12:02:12 1999
--- groff-1.15.wall/libgroff/font.cc    Sat Jan  8 12:20:03 2000
***************
*** 80,86 ****
  };
  
  text_file::text_file(FILE *p, char *s) 
! : lineno(0), buf(0), size(0), skip_comments(1), fp(p), path(s)
  {
  }
  
--- 80,86 ----
  };
  
  text_file::text_file(FILE *p, char *s) 
! : fp(p), path(s), lineno(0), size(0), skip_comments(1), buf(0)
  {
  }
  
***************
*** 147,154 ****
  /* font functions */
  
  font::font(const char *s)
! : special(0), ligatures(0), kern_hash_table(0), space_width(0),
!   ch(0), ch_used(0), ch_size(0), ch_index(0), nindices(0), widths_cache(0)
  {
    name = new char[strlen(s) + 1];
    strcpy(name, s);
--- 147,154 ----
  /* font functions */
  
  font::font(const char *s)
! : ligatures(0), kern_hash_table(0), space_width(0), ch_index(0), nindices(0),
!   ch(0), ch_used(0), ch_size(0), special(0), widths_cache(0)
  {
    name = new char[strlen(s) + 1];
    strcpy(name, s);
diff -r -c3 groff-1.15.orig/libgroff/string.cc 
groff-1.15.wall/libgroff/string.cc
*** groff-1.15.orig/libgroff/string.cc  Sat Sep 11 22:32:20 1999
--- groff-1.15.wall/libgroff/string.cc  Sat Jan  8 12:20:45 2000
***************
*** 77,83 ****
    }
  }
  
! string::string() : len(0), ptr(0), sz(0)
  {
  }
  
--- 77,83 ----
    }
  }
  
! string::string() : ptr(0), len(0), sz(0)
  {
  }
  
diff -r -c3 groff-1.15.orig/pic/lex.cc groff-1.15.wall/pic/lex.cc
*** groff-1.15.orig/pic/lex.cc  Fri May 21 06:50:40 1999
--- groff-1.15.wall/pic/lex.cc  Sat Jan  8 13:40:28 2000
***************
*** 65,73 ****
  }
  
  file_input::file_input(FILE *f, const char *fn)
! : lineno(0), ptr(""), filename(fn)
  {
-   fp = f;
  }
  
  file_input::~file_input()
--- 65,72 ----
  }
  
  file_input::file_input(FILE *f, const char *fn)
! : fp(f), filename(fn), lineno(0), ptr("")
  {
  }
  
  file_input::~file_input()
***************
*** 174,180 ****
  
  
  argument_macro_input::argument_macro_input(const char *body, int ac, char 
**av)
! : argc(ac), ap(0)
  {
    for (int i = 0; i < argc; i++)
      argv[i] = av[i];
--- 173,179 ----
  
  
  argument_macro_input::argument_macro_input(const char *body, int ac, char 
**av)
! : ap(0), argc(ac)
  {
    for (int i = 0; i < argc; i++)
      argv[i] = av[i];
***************
*** 1328,1334 ****
  };
  
  for_input::for_input(char *vr, double t, int bim, double b, char *bd)
! : var(vr), to(t), by_is_multiplicative(bim), by(b), body(bd), p(body),
    done_newline(0)
  {
  }
--- 1327,1333 ----
  };
  
  for_input::for_input(char *vr, double t, int bim, double b, char *bd)
! : var(vr), body(bd), to(t), by_is_multiplicative(bim), by(b), p(body),
    done_newline(0)
  {
  }
***************
*** 1441,1447 ****
  
  copy_file_thru_input::copy_file_thru_input(input *i, const char *b,
                                           const char *u)
! : in(i), copy_thru_input(b, u)
  {
  }
  
--- 1440,1446 ----
  
  copy_file_thru_input::copy_file_thru_input(input *i, const char *b,
                                           const char *u)
! : copy_thru_input(b, u), in(i)
  {
  }
  
***************
*** 1604,1610 ****
  };
  
  simple_file_input::simple_file_input(FILE *p, const char *s)
! : filename(s), fp(p), lineno(1)
  {
  }
  
--- 1603,1609 ----
  };
  
  simple_file_input::simple_file_input(FILE *p, const char *s)
! : filename(s), lineno(1), fp(p)
  {
  }
  
diff -r -c3 groff-1.15.orig/pic/object.cc groff-1.15.wall/pic/object.cc
*** groff-1.15.orig/pic/object.cc       Fri May 21 06:50:40 1999
--- groff-1.15.wall/pic/object.cc       Sat Jan  8 13:47:52 2000
***************
*** 29,35 ****
  {
  }
  
! output::output() : desired_height(0.0), desired_width(0.0), args(0)
  {
  }
  
--- 29,35 ----
  {
  }
  
! output::output() : args(0), desired_height(0.0), desired_width(0.0)
  {
  }
  
***************
*** 391,402 ****
  }
  
  segment::segment(const position &a, int n, segment *p)
! : pos(a), is_absolute(n), next(p)
  {
  }
  
  text_item::text_item(char *t, const char *fn, int ln)
! : filename(fn), lineno(ln), text(t), next(0)
  {
    adj.h = CENTER_ADJUST;
    adj.v = NONE_ADJUST;
--- 391,402 ----
  }
  
  segment::segment(const position &a, int n, segment *p)
! : is_absolute(n), pos(a), next(p)
  {
  }
  
  text_item::text_item(char *t, const char *fn, int ln)
! : next(0), text(t), filename(fn), lineno(ln) 
  {
    adj.h = CENTER_ADJUST;
    adj.v = NONE_ADJUST;
***************
*** 855,861 ****
  
  block_object::block_object(const position &d, const object_list &ol,
                           PTABLE(place) *t)
! : oblist(ol), tbl(t), rectangle_object(d)
  {
  }
  
--- 855,861 ----
  
  block_object::block_object(const position &d, const object_list &ol,
                           PTABLE(place) *t)
! : rectangle_object(d), oblist(ol), tbl(t)
  {
  }
  
***************
*** 1194,1200 ****
  };
  
  linear_object::linear_object(const position &s, const position &e)
! : strt(s), en(e), arrow_at_start(0), arrow_at_end(0)
  {
  }
  
--- 1194,1200 ----
  };
  
  linear_object::linear_object(const position &s, const position &e)
! : arrow_at_start(0), arrow_at_end(0), strt(s), en(e)
  {
  }
  
***************
*** 1214,1220 ****
  
  line_object::line_object(const position &s, const position &e,
                         position *p, int i)
! : v(p), n(i), linear_object(s, e)
  {
  }
  
--- 1214,1220 ----
  
  line_object::line_object(const position &s, const position &e,
                         position *p, int i)
! : linear_object(s, e), v(p), n(i)
  {
  }
  
***************
*** 1743,1749 ****
  Note that `.A.B.C.sw' will work. */
  
  path::path(corner c)
! : label_list(0), crn(c), ypath(0)
  {
  }
  
--- 1743,1749 ----
  Note that `.A.B.C.sw' will work. */
  
  path::path(corner c)
! : crn(c), label_list(0), ypath(0)
  {
  }
  
diff -r -c3 groff-1.15.orig/refer/label.y groff-1.15.wall/refer/label.y
*** groff-1.15.orig/refer/label.y       Fri May 21 06:50:42 1999
--- groff-1.15.wall/refer/label.y       Sat Jan  8 14:11:13 2000
***************
*** 77,83 ****
    int number;
    char name;
  public:
!   field_expr(char nm, int num) : name(nm), number(num) { }
    void evaluate(int, const reference &, string &, substring_position &);
    unsigned analyze() { return CONTAINS_VARIABLE; }
  };
--- 77,83 ----
    int number;
    char name;
  public:
!   field_expr(char nm, int num) : number(num), name(nm) { }
    void evaluate(int, const reference &, string &, substring_position &);
    unsigned analyze() { return CONTAINS_VARIABLE; }
  };
***************
*** 136,149 ****
  public:
    enum { BEFORE = +1, MATCH = 0, AFTER = -1 };
    extractor_expr(expression *e, extractor_func *f, int pt)
!     : unary_expr(e), func(f), part(pt) { }
    void evaluate(int, const reference &, string &, substring_position &);
  };
  
  class truncate_expr : public unary_expr {
    int n;
  public:
!   truncate_expr(expression *e, int i) : n(i), unary_expr(e) { } 
    void evaluate(int, const reference &, string &, substring_position &);
  };
  
--- 136,149 ----
  public:
    enum { BEFORE = +1, MATCH = 0, AFTER = -1 };
    extractor_expr(expression *e, extractor_func *f, int pt)
!     : unary_expr(e), part(pt), func(f) { }
    void evaluate(int, const reference &, string &, substring_position &);
  };
  
  class truncate_expr : public unary_expr {
    int n;
  public:
!   truncate_expr(expression *e, int i) : unary_expr(e), n(i) { } 
    void evaluate(int, const reference &, string &, substring_position &);
  };
  
***************
*** 928,934 ****
  string label_pool;
  
  label_info::label_info(const string &s)
! : count(0), total(1), length(s.length()), start(label_pool.length())
  {
    label_pool += s;
  }
--- 928,934 ----
  string label_pool;
  
  label_info::label_info(const string &s)
! : start(label_pool.length()), length(s.length()), count(0), total(1)
  {
    label_pool += s;
  }
diff -r -c3 groff-1.15.orig/refer/ref.cc groff-1.15.wall/refer/ref.cc
*** groff-1.15.orig/refer/ref.cc        Fri May 21 06:50:42 1999
--- groff-1.15.wall/refer/ref.cc        Sat Jan  8 14:12:29 2000
***************
*** 51,57 ****
  static string temp_fields[256];
  
  reference::reference(const char *start, int len, reference_id *ridp)
! : no(-1), field(0), nfields(0), h(0), merged(0), label_ptr(0),
    computed_authors(0), last_needed_author(-1), nauthors(-1)
  {
    int i;
--- 51,57 ----
  static string temp_fields[256];
  
  reference::reference(const char *start, int len, reference_id *ridp)
! : h(0), merged(0), no(-1), field(0), nfields(0), label_ptr(0),
    computed_authors(0), last_needed_author(-1), nauthors(-1)
  {
    int i;
diff -r -c3 groff-1.15.orig/tbl/main.cc groff-1.15.wall/tbl/main.cc
*** groff-1.15.orig/tbl/main.cc Sun Sep 12 09:21:14 1999
--- groff-1.15.wall/tbl/main.cc Sat Jan  8 13:27:37 2000
***************
*** 334,340 ****
  };
  
  options::options()
! : flags(0), tab_char('\t'), decimal_point_char('.'), linesize(0)
  {
    delim[0] = delim[1] = '\0';
  }
--- 334,340 ----
  };
  
  options::options()
! : flags(0), linesize(0), tab_char('\t'), decimal_point_char('.')
  {
    delim[0] = delim[1] = '\0';
  }
diff -r -c3 groff-1.15.orig/tbl/table.cc groff-1.15.wall/tbl/table.cc
*** groff-1.15.orig/tbl/table.cc        Sun Sep 12 12:02:13 1999
--- groff-1.15.wall/tbl/table.cc        Sat Jan  8 13:35:53 2000
***************
*** 326,333 ****
  };
  
  table_entry::table_entry(const entry_modifier *m)
! : next(0), start_row(-1), end_row(-1), start_col(-1), end_col(-1), mod(m),
!   input_lineno(-1), input_filename(0)
  {
  }
  
--- 326,333 ----
  };
  
  table_entry::table_entry(const entry_modifier *m)
! : next(0), input_lineno(-1), input_filename(0),
!   start_row(-1), end_row(-1), start_col(-1), end_col(-1), mod(m)
  {
  }
  
***************
*** 445,451 ****
  }
  
  text_entry::text_entry(char *s, const entry_modifier *m)
! : contents(s), simple_entry(m)
  {
  }
  
--- 445,451 ----
  }
  
  text_entry::text_entry(char *s, const entry_modifier *m)
! : simple_entry(m), contents(s)
  {
  }
  
***************
*** 1009,1015 ****
    virtual int is_double_line() { return 0; };
  };
  
! stuff::stuff(int r) : row(r), next(0), printed(0)
  {
  }
  
--- 1009,1015 ----
    virtual int is_double_line() { return 0; };
  };
  
! stuff::stuff(int r) : next(0), row(r), printed(0)
  {
  }
  
***************
*** 1029,1035 ****
  
  
  text_stuff::text_stuff(const string &s, int r, const char *fn, int ln)
! : contents(s), stuff(r), filename(fn), lineno(ln)
  {
  }
  
--- 1029,1035 ----
  
  
  text_stuff::text_stuff(const string &s, int r, const char *fn, int ln)
! : stuff(r), contents(s), filename(fn), lineno(ln)
  {
  }
  
***************
*** 1105,1111 ****
  };
  
  vertical_rule::vertical_rule(int sr, int er, int c, int dbl, vertical_rule *p)
! : start_row(sr), end_row(er), col(c), is_double(dbl), next(p)
  {
  }
  
--- 1105,1111 ----
  };
  
  vertical_rule::vertical_rule(int sr, int er, int c, int dbl, vertical_rule *p)
! : next(p), start_row(sr), end_row(er), col(c), is_double(dbl)
  {
  }
  
***************
*** 1199,1209 ****
  }
  
  table::table(int nc, unsigned f, int ls, char dpc)
! : ncolumns(nc), flags(f), linesize(ls), decimal_point_char(dpc),
!   nrows(0), allocated_rows(0), entry(0), entry_list(0),
!   entry_list_tailp(&entry_list),
!   left_separation(0), right_separation(0), stuff_list(0), vline(0),
!   vrule_list(0), row_is_all_lines(0), span_list(0)
  {
    minimum_width = new string[ncolumns];
    column_separation = ncolumns > 1 ? new int[ncolumns - 1] : 0;
--- 1199,1209 ----
  }
  
  table::table(int nc, unsigned f, int ls, char dpc)
! : flags(f), nrows(0), ncolumns(nc), linesize(ls), decimal_point_char(dpc),
!   vrule_list(0), stuff_list(0), span_list(0),
!   entry_list(0), entry_list_tailp(&entry_list), entry(0),
!   vline(0), row_is_all_lines(0), left_separation(0), right_separation(0),
!   allocated_rows(0)
  {
    minimum_width = new string[ncolumns];
    column_separation = ncolumns > 1 ? new int[ncolumns - 1] : 0;
***************
*** 1969,1975 ****
  }
  
  horizontal_span::horizontal_span(int sc, int ec, horizontal_span *p)
! : start_col(sc), end_col(ec), next(p)
  {
  }
  
--- 1969,1975 ----
  }
  
  horizontal_span::horizontal_span(int sc, int ec, horizontal_span *p)
! : next(p), start_col(sc), end_col(ec)
  {
  }
  
diff -r -c3 groff-1.15.orig/tfmtodit/tfmtodit.cc 
groff-1.15.wall/tfmtodit/tfmtodit.cc
*** groff-1.15.orig/tfmtodit/tfmtodit.cc        Sun Sep 12 12:02:13 1999
--- groff-1.15.wall/tfmtodit/tfmtodit.cc        Sat Jan  8 14:06:56 2000
***************
*** 125,131 ****
  
  
  kern_iterator::kern_iterator(tfm *p)
! : t(p), i(-1), c(t->bc)
  {
  }
  
--- 125,131 ----
  
  
  kern_iterator::kern_iterator(tfm *p)
! : t(p), c(t->bc), i(-1)
  {
  }
  
diff -r -c3 groff-1.15.orig/troff/dictionary.cc 
groff-1.15.wall/troff/dictionary.cc
*** groff-1.15.orig/troff/dictionary.cc Fri May 21 06:50:38 1999
--- groff-1.15.wall/troff/dictionary.cc Sat Jan  8 13:25:28 2000
***************
*** 38,44 ****
    return 1;
  }
  
! dictionary::dictionary(int n) : threshold(0.5), factor(1.5), used(0), size(n)
  {
    table = new association[n];
  }
--- 38,44 ----
    return 1;
  }
  
! dictionary::dictionary(int n) : size(n), used(0), threshold(0.5), factor(1.5)
  {
    table = new association[n];
  }
diff -r -c3 groff-1.15.orig/troff/div.cc groff-1.15.wall/troff/div.cc
*** groff-1.15.orig/troff/div.cc        Fri May 21 06:50:38 1999
--- groff-1.15.wall/troff/div.cc        Sat Jan  8 13:21:12 2000
***************
*** 48,54 ****
  static vunits needed_space;
  
  diversion::diversion(symbol s) 
! : nm(s), prev(0), vertical_position(V0), marked_place(V0), high_water_mark(V0)
  {
  }
  
--- 48,54 ----
  static vunits needed_space;
  
  diversion::diversion(symbol s) 
! : prev(0), nm(s), vertical_position(V0), high_water_mark(V0), marked_place(V0)
  {
  }
  
***************
*** 284,293 ****
  }
  
  top_level_diversion::top_level_diversion()
! : page_count(0), have_next_page_number(0), page_length(units_per_inch*11), 
!   page_offset(units_per_inch), prev_page_offset(units_per_inch), 
!   ejecting_page(0), page_trap_list(0), before_first_page(1), no_space_mode(0),
!   page_number(0), last_page_count(-1)
  {
  }
  
--- 284,294 ----
  }
  
  top_level_diversion::top_level_diversion()
! : page_number(0), page_count(0), last_page_count(-1),
!   page_length(units_per_inch*11),
!   prev_page_offset(units_per_inch), page_offset(units_per_inch),
!   page_trap_list(0), have_next_page_number(0),
!   ejecting_page(0), before_first_page(1), no_space_mode(0)
  {
  }
  
***************
*** 437,443 ****
  }
  
  trap::trap(symbol s, vunits n, trap *p)
!      : nm(s), next(p), position(n)
  {
  }
  
--- 438,444 ----
  }
  
  trap::trap(symbol s, vunits n, trap *p)
!      : next(p), position(n), nm(s)
  {
  }
  
diff -r -c3 groff-1.15.orig/troff/env.cc groff-1.15.wall/troff/env.cc
*** groff-1.15.orig/troff/env.cc        Fri May 21 06:50:38 1999
--- groff-1.15.wall/troff/env.cc        Sat Jan  8 12:56:35 2000
***************
*** 511,517 ****
  }
  
  environment::environment(symbol nm)
! : name(nm),
    prev_line_length((units_per_inch*13)/2),
    line_length((units_per_inch*13)/2),
    prev_title_length((units_per_inch*13)/2),
--- 511,517 ----
  }
  
  environment::environment(symbol nm)
! : dummy(0),
    prev_line_length((units_per_inch*13)/2),
    line_length((units_per_inch*13)/2),
    prev_title_length((units_per_inch*13)/2),
***************
*** 538,582 ****
    line_spacing(1),
    prev_indent(0),
    indent(0),
-   have_temporary_indent(0),
    temporary_indent(0),
    underline_lines(0),
    input_trap_count(0),
    prev_text_length(0),
    width_total(0),
    space_total(0),
    input_line_start(0),
-   control_char('.'),
-   no_break_control_char('\''),
-   hyphen_indicator_char(0),
-   spread_flag(0),
-   line(0),
-   pending_lines(0),
-   discarding(0),
    tabs(units_per_inch/2, TAB_LEFT),
    current_tab(TAB_NONE),
    current_field(0),
    margin_character_flags(0),
    margin_character_node(0),
    margin_character_distance(points_to_units(10)),
    numbering_nodes(0),
    number_text_separation(1),
-   line_number_multiple(1),
    line_number_indent(0),
    no_number_count(0),
-   tab_char(0),
-   leader_char(charset_table['.']),
    hyphenation_flags(1),
-   dummy(0),
-   leader_node(0),
- #ifdef WIDOW_CONTROL
-   widow_control(0),
- #endif /* WIDOW_CONTROL */
    hyphen_line_count(0),
    hyphen_line_max(-1),
    hyphenation_space(H0),
    hyphenation_margin(H0),
!   composite(0)
  {
    prev_family = family = lookup_family(default_family);
    prev_fontno = fontno = 1;
--- 538,582 ----
    line_spacing(1),
    prev_indent(0),
    indent(0),
    temporary_indent(0),
+   have_temporary_indent(0),
    underline_lines(0),
    input_trap_count(0),
+   line(0),
    prev_text_length(0),
    width_total(0),
    space_total(0),
    input_line_start(0),
    tabs(units_per_inch/2, TAB_LEFT),
    current_tab(TAB_NONE),
+   leader_node(0),
+   tab_char(0),
+   leader_char(charset_table['.']),
    current_field(0),
+   discarding(0),
+   spread_flag(0),
    margin_character_flags(0),
    margin_character_node(0),
    margin_character_distance(points_to_units(10)),
    numbering_nodes(0),
    number_text_separation(1),
    line_number_indent(0),
+   line_number_multiple(1),
    no_number_count(0),
    hyphenation_flags(1),
    hyphen_line_count(0),
    hyphen_line_max(-1),
    hyphenation_space(H0),
    hyphenation_margin(H0),
!   composite(0),
!   pending_lines(0),
! #ifdef WIDOW_CONTROL
!   widow_control(0),
! #endif /* WIDOW_CONTROL */
!   name(nm),
!   control_char('.'),
!   no_break_control_char('\''),
!   hyphen_indicator_char(0)
  {
    prev_family = family = lookup_family(default_family);
    prev_fontno = fontno = 1;
***************
*** 588,604 ****
  }
  
  environment::environment(const environment *e)
! : name(e->name),              // so that eg `.if "\n[.ev]"0"' works
    prev_line_length(e->prev_line_length),
    line_length(e->line_length),
    prev_title_length(e->prev_title_length),
    title_length(e->title_length),
    prev_size(e->prev_size),
    size(e->size),
-   prev_requested_size(e->prev_requested_size),
    requested_size(e->requested_size),
    char_height(e->char_height),
    char_slant(e->char_slant),
    space_size(e->space_size),
    sentence_space_size(e->sentence_space_size),
    adjust_mode(e->adjust_mode),
--- 588,608 ----
  }
  
  environment::environment(const environment *e)
! : dummy(1),
    prev_line_length(e->prev_line_length),
    line_length(e->line_length),
    prev_title_length(e->prev_title_length),
    title_length(e->title_length),
    prev_size(e->prev_size),
    size(e->size),
    requested_size(e->requested_size),
+   prev_requested_size(e->prev_requested_size),
    char_height(e->char_height),
    char_slant(e->char_slant),
+   prev_fontno(e->prev_fontno),
+   fontno(e->fontno),
+   prev_family(e->prev_family),
+   family(e->family),
    space_size(e->space_size),
    sentence_space_size(e->sentence_space_size),
    adjust_mode(e->adjust_mode),
***************
*** 615,663 ****
    line_spacing(e->line_spacing),
    prev_indent(e->prev_indent),
    indent(e->indent),
-   have_temporary_indent(0),
    temporary_indent(0),
    underline_lines(0),
    input_trap_count(0),
    prev_text_length(e->prev_text_length),
    width_total(0),
    space_total(0),
    input_line_start(0),
-   control_char(e->control_char),
-   no_break_control_char(e->no_break_control_char),
-   hyphen_indicator_char(e->hyphen_indicator_char),
-   spread_flag(0),
-   line(0),
-   pending_lines(0),
-   discarding(0),
    tabs(e->tabs),
    current_tab(TAB_NONE),
    current_field(0),
    margin_character_flags(e->margin_character_flags),
    margin_character_node(e->margin_character_node),
    margin_character_distance(e->margin_character_distance),
    numbering_nodes(0),
    number_text_separation(e->number_text_separation),
-   line_number_multiple(e->line_number_multiple),
    line_number_indent(e->line_number_indent),
    no_number_count(e->no_number_count),
-   tab_char(e->tab_char),
-   leader_char(e->leader_char),
    hyphenation_flags(e->hyphenation_flags),
-   fontno(e->fontno),
-   prev_fontno(e->prev_fontno),
-   dummy(1),
-   family(e->family),
-   prev_family(e->prev_family),
-   leader_node(0),
- #ifdef WIDOW_CONTROL
-   widow_control(e->widow_control),
- #endif /* WIDOW_CONTROL */
-   hyphen_line_max(e->hyphen_line_max),
    hyphen_line_count(0),
    hyphenation_space(e->hyphenation_space),
    hyphenation_margin(e->hyphenation_margin),
!   composite(0)
  {
  }
  
--- 619,663 ----
    line_spacing(e->line_spacing),
    prev_indent(e->prev_indent),
    indent(e->indent),
    temporary_indent(0),
+   have_temporary_indent(0),
    underline_lines(0),
    input_trap_count(0),
+   line(0),
    prev_text_length(e->prev_text_length),
    width_total(0),
    space_total(0),
    input_line_start(0),
    tabs(e->tabs),
    current_tab(TAB_NONE),
+   leader_node(0),
+   tab_char(e->tab_char),
+   leader_char(e->leader_char),
    current_field(0),
+   discarding(0),
+   spread_flag(0),
    margin_character_flags(e->margin_character_flags),
    margin_character_node(e->margin_character_node),
    margin_character_distance(e->margin_character_distance),
    numbering_nodes(0),
    number_text_separation(e->number_text_separation),
    line_number_indent(e->line_number_indent),
+   line_number_multiple(e->line_number_multiple),
    no_number_count(e->no_number_count),
    hyphenation_flags(e->hyphenation_flags),
    hyphen_line_count(0),
+   hyphen_line_max(e->hyphen_line_max),
    hyphenation_space(e->hyphenation_space),
    hyphenation_margin(e->hyphenation_margin),
!   composite(0),
!   pending_lines(0),
! #ifdef WIDOW_CONTROL
!   widow_control(e->widow_control),
! #endif /* WIDOW_CONTROL */
!   name(e->name),              // so that eg `.if "\n[.ev]"0"' works
!   control_char(e->control_char),
!   no_break_control_char(e->no_break_control_char),
!   hyphen_indicator_char(e->hyphen_indicator_char)
  {
  }
  
***************
*** 2872,2878 ****
  };
  
  trie_node::trie_node(char ch, trie_node *p) 
! : c(ch), right(p), down(0), val(0)
  {
  }
  
--- 2872,2878 ----
  };
  
  trie_node::trie_node(char ch, trie_node *p) 
! : c(ch), down(0), right(p), val(0)
  {
  }
  
***************
*** 2941,2947 ****
  };
  
  operation::operation(int i, int j, operation *op)
! : num(i), distance(j), next(op)
  {
  }
  
--- 2941,2947 ----
  };
  
  operation::operation(int i, int j, operation *op)
! : next(op), distance(j), num(i)
  {
  }
  
diff -r -c3 groff-1.15.orig/troff/input.cc groff-1.15.wall/troff/input.cc
*** groff-1.15.orig/troff/input.cc      Tue Dec 28 09:27:27 1999
--- groff-1.15.wall/troff/input.cc      Sat Jan  8 14:39:54 2000
***************
*** 263,269 ****
  };
  
  file_iterator::file_iterator(FILE *f, const char *fn, int po)
! : fp(f), filename(fn), lineno(1), newline_flag(0), popened(po)
  {
  }
  
--- 263,269 ----
  };
  
  file_iterator::file_iterator(FILE *f, const char *fn, int po)
! : fp(f), lineno(1), filename(fn), popened(po), newline_flag(0)
  {
  }
  
***************
*** 2300,2306 ****
  };
  
  char_list::char_list()
! : head(0), tail(0), ptr(0), len(0)
  {
  }
  
--- 2300,2306 ----
  };
  
  char_list::char_list()
! : ptr(0), len(0), head(0), tail(0)
  {
  }
  
***************
*** 2413,2419 ****
  }
  
  macro::macro(const macro &m) 
! : filename(m.filename), lineno(m.lineno), p(m.p), length(m.length)
  { 
    if (p != 0)
      p->count++;
--- 2413,2419 ----
  }
  
  macro::macro(const macro &m) 
! : p(m.p), filename(m.filename), lineno(m.lineno), length(m.length)
  { 
    if (p != 0)
      p->count++;
***************
*** 2530,2536 ****
  };
  
  string_iterator::string_iterator(const macro &m, const char *p, symbol s) 
! : lineno(1), mac(m), newline_flag(0), how_invoked(p), nm(s)
  {
    count = mac.length;
    if (count != 0) {
--- 2530,2536 ----
  };
  
  string_iterator::string_iterator(const macro &m, const char *p, symbol s) 
! : mac(m), how_invoked(p), newline_flag(0), lineno(1), nm(s)
  {
    count = mac.length;
    if (count != 0) {
***************
*** 5988,5996 ****
  int charinfo::next_index = 0;
  
  charinfo::charinfo(symbol s)
! : nm(s), hyphenation_code(0), translation(0), flags(0), ascii_code(0),
!   special_translation(TRANSLATE_NONE), mac(0), not_found(0),
!   transparent_translate(1)
  {
    index = next_index++;
  }
--- 5988,5996 ----
  int charinfo::next_index = 0;
  
  charinfo::charinfo(symbol s)
! : translation(0), mac(0), special_translation(TRANSLATE_NONE),
!   hyphenation_code(0), flags(0), ascii_code(0), not_found(0),
!   transparent_translate(1), nm(s)
  {
    index = next_index++;
  }
diff -r -c3 groff-1.15.orig/troff/node.cc groff-1.15.wall/troff/node.cc
*** groff-1.15.orig/troff/node.cc       Sat Sep 11 22:32:22 1999
--- groff-1.15.wall/troff/node.cc       Sat Jan  8 14:39:09 2000
***************
*** 180,190 ****
  static int font_table_size = 0;
  
  font_info::font_info(symbol nm, int n, symbol enm, font *f)
! : internal_name(nm), external_name(enm), fm(f), number(n),
!   is_constant_spaced(CONSTANT_SPACE_NONE),
!   sf(0), is_bold(0), cond_bold_list(0),
!   last_ligature_mode(1), last_kern_mode(1),
!   last_tfont(0), last_size(0)
  {
  }
  
--- 180,189 ----
  static int font_table_size = 0;
  
  font_info::font_info(symbol nm, int n, symbol enm, font *f)
! : last_tfont(0), number(n), last_size(0),
!   internal_name(nm), external_name(enm), fm(f),
!   is_bold(0), is_constant_spaced(CONSTANT_SPACE_NONE), last_ligature_mode(1),
!   last_kern_mode(1), cond_bold_list(0), sf(0)
  {
  }
  
***************
*** 298,304 ****
  }
  
  conditional_bold::conditional_bold(int f, hunits h, conditional_bold *x)
!      : fontno(f), offset(h), next(x)
  {
  }
  
--- 297,303 ----
  }
  
  conditional_bold::conditional_bold(int f, hunits h, conditional_bold *x)
!      : next(x), fontno(f), offset(h)
  {
  }
  
***************
*** 1142,1148 ****
  }
  
  troff_output_file::troff_output_file()
! : current_height(0), current_slant(0), tbuf_len(0), nfont_positions(10),
    begun_page(0)
  {
    font_position = new symbol[nfont_positions];
--- 1141,1147 ----
  }
  
  troff_output_file::troff_output_file()
! : current_slant(0), current_height(0), nfont_positions(10), tbuf_len(0),
    begun_page(0)
  {
    font_position = new symbol[nfont_positions];
***************
*** 1324,1330 ****
  };
  
  charinfo_node::charinfo_node(charinfo *c, node *x)
! : ci(c), node(x)
  {
  }
  
--- 1323,1329 ----
  };
  
  charinfo_node::charinfo_node(charinfo *c, node *x)
! : node(x), ci(c)
  {
  }
  
***************
*** 1697,1703 ****
  }
  
  kern_pair_node::kern_pair_node(hunits n, node *first, node *second, node *x)
!      : node(x), n1(first), n2(second), amount(n)
  {
  }
  
--- 1696,1702 ----
  }
  
  kern_pair_node::kern_pair_node(hunits n, node *first, node *second, node *x)
!      : node(x), amount(n), n1(first), n2(second)
  {
  }
  
***************
*** 2044,2050 ****
  }
  
  italic_corrected_node::italic_corrected_node(node *nn, hunits xx, node *p)
! : n(nn), x(xx), node(p)
  {
    assert(n != 0);
  }
--- 2043,2049 ----
  }
  
  italic_corrected_node::italic_corrected_node(node *nn, hunits xx, node *p)
! : node(p), n(nn), x(xx)
  {
    assert(n != 0);
  }
***************
*** 2380,2386 ****
    node_list_vertical_extent(n, min, max);
  }
  
! overstrike_node::overstrike_node() : max_width(H0), list(0)
  {
  }
  
--- 2379,2385 ----
    node_list_vertical_extent(n, min, max);
  }
  
! overstrike_node::overstrike_node() : list(0), max_width(H0)
  {
  }
  
***************
*** 2416,2422 ****
    return max_width;
  }
  
! bracket_node::bracket_node() : max_width(H0), list(0)
  {
  }
  
--- 2415,2421 ----
    return max_width;
  }
  
! bracket_node::bracket_node() : list(0), max_width(H0)
  {
  }
  
***************
*** 2428,2434 ****
  node *bracket_node::copy()
  {
    bracket_node *on = new bracket_node;
!   node *last, *tem;
    for (tem = list; tem; tem = tem->next) {
      if (tem->next)
        tem->next->last = tem;
--- 2427,2434 ----
  node *bracket_node::copy()
  {
    bracket_node *on = new bracket_node;
!   node *last = 0;
!   node *tem;
    for (tem = list; tem; tem = tem->next) {
      if (tem->next)
        tem->next->last = tem;
***************
*** 3293,3299 ****
  }
  
  draw_node::draw_node(char c, hvpair *p, int np, font_size s)
!      : code(c), npoints(np), sz(s)
  {
    point = new hvpair[npoints];
    for (int i = 0; i < npoints; i++)
--- 3293,3299 ----
  }
  
  draw_node::draw_node(char c, hvpair *p, int np, font_size s)
!      : npoints(np), sz(s), code(c)
  {
    point = new hvpair[npoints];
    for (int i = 0; i < npoints; i++)
***************
*** 3969,3975 ****
  
  
  left_italic_corrected_node::left_italic_corrected_node(node *x)
! : n(0), node(x)
  {
  }
  
--- 3969,3975 ----
  
  
  left_italic_corrected_node::left_italic_corrected_node(node *x)
! : node(x), n(0)
  {
  }
  
***************
*** 4396,4402 ****
  }
  
  font_family::font_family(symbol s)
! : nm(s), map_size(10)
  {
    map = new int[map_size];
    for (int i = 0; i < map_size; i++)
--- 4396,4402 ----
  }
  
  font_family::font_family(symbol s)
! : map_size(10), nm(s)
  {
    map = new int[map_size];
    for (int i = 0; i < map_size; i++)
diff -r -c3 groff-1.15.orig/troff/node.h groff-1.15.wall/troff/node.h
*** groff-1.15.orig/troff/node.h        Sat Sep 11 22:32:22 1999
--- groff-1.15.wall/troff/node.h        Sat Jan  8 12:33:30 2000
***************
*** 440,446 ****
  int get_bold_fontno(int f);
  
  inline hyphen_list::hyphen_list(unsigned char code, hyphen_list *p)
! : hyphenation_code(code), next(p), hyphen(0), breakable(0)
  {
  }
  
--- 440,446 ----
  int get_bold_fontno(int f);
  
  inline hyphen_list::hyphen_list(unsigned char code, hyphen_list *p)
! : hyphen(0), breakable(0), hyphenation_code(code), next(p)
  {
  }
  
diff -r -c3 groff-1.15.orig/troff/reg.cc groff-1.15.wall/troff/reg.cc
*** groff-1.15.orig/troff/reg.cc        Fri May 21 06:50:39 1999
--- groff-1.15.wall/troff/reg.cc        Sat Jan  8 13:26:26 2000
***************
*** 74,80 ****
      if (width <= 0)
        return itoa(value);
      else if (width > sizeof(buf) - 2)
!       sprintf(buf, "%.*d", sizeof(buf) - 2, int(value));
      else
        sprintf(buf, "%.*d", width, int(value));
      break;
--- 74,80 ----
      if (width <= 0)
        return itoa(value);
      else if (width > sizeof(buf) - 2)
!       sprintf(buf, "%.*d", int(sizeof(buf) - 2), int(value));
      else
        sprintf(buf, "%.*d", width, int(value));
      break;



reply via email to

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