groff-commit
[Top][All Lists]
Advanced

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

[Groff-commit] groff ./ChangeLog doc/groff.texinfo src/devices...


From: Werner LEMBERG
Subject: [Groff-commit] groff ./ChangeLog doc/groff.texinfo src/devices...
Date: Sat, 11 Feb 2006 20:34:37 +0000

CVSROOT:        /cvsroot/groff
Module name:    groff
Branch:         
Changes by:     Werner LEMBERG <address@hidden> 06/02/11 20:34:37

Modified files:
        .              : ChangeLog 
        doc            : groff.texinfo 
        src/devices/grodvi: dvi.cpp 
        src/devices/grohtml: post-html.cpp 
        src/devices/grolbp: lbp.cpp 
        src/devices/grolj4: lj4.cpp 
        src/devices/grops: ps.cpp 
        src/devices/grotty: tty.cpp 
        src/include    : font.h printer.h ptable.h 
        src/libs/libdriver: printer.cpp 
        src/libs/libgroff: font.cpp nametoindex.cpp 
        src/roff/troff : charinfo.h env.cpp input.cpp node.cpp 

Log message:
        * src/include/font.h: s/glyph_t/glyph/.
        Update all callers.
        
        * src/devices/grotty/tty.cpp: s/glyph/tty_glyph/.
        s/output_character_t/output_character/.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/groff/groff/ChangeLog.diff?tr1=1.900&tr2=1.901&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/groff/groff/doc/groff.texinfo.diff?tr1=1.226&tr2=1.227&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/groff/groff/src/devices/grodvi/dvi.cpp.diff?tr1=1.8&tr2=1.9&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/groff/groff/src/devices/grohtml/post-html.cpp.diff?tr1=1.31&tr2=1.32&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/groff/groff/src/devices/grolbp/lbp.cpp.diff?tr1=1.9&tr2=1.10&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/groff/groff/src/devices/grolj4/lj4.cpp.diff?tr1=1.8&tr2=1.9&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/groff/groff/src/devices/grops/ps.cpp.diff?tr1=1.10&tr2=1.11&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/groff/groff/src/devices/grotty/tty.cpp.diff?tr1=1.15&tr2=1.16&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/groff/groff/src/include/font.h.diff?tr1=1.11&tr2=1.12&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/groff/groff/src/include/printer.h.diff?tr1=1.15&tr2=1.16&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/groff/groff/src/include/ptable.h.diff?tr1=1.6&tr2=1.7&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/groff/groff/src/libs/libdriver/printer.cpp.diff?tr1=1.5&tr2=1.6&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/groff/groff/src/libs/libgroff/font.cpp.diff?tr1=1.9&tr2=1.10&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/groff/groff/src/libs/libgroff/nametoindex.cpp.diff?tr1=1.5&tr2=1.6&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/groff/groff/src/roff/troff/charinfo.h.diff?tr1=1.9&tr2=1.10&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/groff/groff/src/roff/troff/env.cpp.diff?tr1=1.14&tr2=1.15&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/groff/groff/src/roff/troff/input.cpp.diff?tr1=1.29&tr2=1.30&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/groff/groff/src/roff/troff/node.cpp.diff?tr1=1.19&tr2=1.20&r1=text&r2=text

Patches:
Index: groff/ChangeLog
diff -u groff/ChangeLog:1.900 groff/ChangeLog:1.901
--- groff/ChangeLog:1.900       Sat Feb 11 17:54:28 2006
+++ groff/ChangeLog     Sat Feb 11 20:34:36 2006
@@ -1,88 +1,119 @@
+2006-02-11  Werner LEMBERG  <address@hidden>
+
+       * src/include/font.h: s/glyph_t/glyph/.
+       Update all callers.
+
+       * src/devices/grotty/tty.cpp: s/glyph/tty_glyph/.
+       s/output_character_t/output_character/.
+
 2006-02-11  Bruno Haible  <address@hidden>
 
        New accessor method glyph_t::glyph_name().
+
        * src/include/ptable.h (declare_ptable): Add a return value to the
-       'define' method, and declare a 'lookupassoc' method.
-       (implement_ptable): Return the stored key in 'define'. Implement
+       `define' method, and declare a `lookupassoc' method.
+       (implement_ptable): Return the stored key in `define'.  Implement
        lookupassoc.
-       * src/include/font.h (glyph_t): Add 'name' field. Add an argument to
-       the constructor.
+       * src/include/font.h (glyph_t): Add `name' field.  Add an argument
+       to the constructor.
        (glyph_t::glyph_name): New method.
+
        * src/libs/libgroff/nametoindex.cpp (character_indexer): Change
        return type of methods and field member type to glyph_t.
        (character_indexer::character_indexer): Update.
-       (character_indexer::ascii_char_index): Allocate a name for the glyph.
+       (character_indexer::ascii_char_index): Allocate a name for the
+       glyph.
        Return a glyph_t with name.
        (character_indexer::numbered_char_index): Return a glyph_t without a
        name.
        (character_indexer::named_char_index): Return a glyph_t with a name.
        (font::number_to_index, font::name_to_index): Update.
+
        * src/roff/troff/input.cpp (charinfo::charinfo): Use the symbol as
        the glyph's name.
 
 2006-02-11  Bruno Haible  <address@hidden>
 
        * src/devices/grotty/tty.cpp (output_character_t): New type.
-       (tty_printer::make_bold, tty_printer::add_char, tty_printer::put_char):
-       Change argument type to output_character_t.
+       (tty_printer::make_bold, tty_printer::add_char,
+       tty_printer::put_char): Change argument type to output_character_t.
        (crossings): Change element type to output_character_t.
 
 2006-02-11  Bruno Haible  <address@hidden>
 
        Make the glyph data type abstract.
+
        * src/include/font.h (glyph_t): New class.
        (name_to_index, number_to_index): Change return type to glyph_t.
        (font::contains, font::get_width, font::get_height, font::get_depth,
        font::get_character_type, font::get_kern, font::get_skew,
        font::get_italic_correction, font::get_left_italic_correction,
        font::get_subscript_correction, font::get_code,
-       font::get_special_device_encoding, font::add_entry, font::copy_entry,
-       font::add_kern, font::hash_kern): Change argument type to glyph_t.
+       font::get_special_device_encoding, font::add_entry,
+       font::copy_entry, font::add_kern, font::hash_kern): Change argument
+       type to glyph_t.
+
        * src/libs/libgroff/font.cpp (struct font_kern_list): Change members
        type and constructor argument types to glyph_t.
        (font::contains, font::get_width, font::get_height, font::get_depth,
        font::get_character_type, font::get_kern, font::get_skew,
        font::get_italic_correction, font::get_left_italic_correction,
        font::get_subscript_correction, font::get_code,
-       font::get_special_device_encoding, font::add_entry, font::copy_entry,
-       font::add_kern, font::hash_kern): Change argument type to glyph_t.
+       font::get_special_device_encoding, font::add_entry,
+       font::copy_entry, font::add_kern, font::hash_kern): Change argument
+       type to glyph_t.
        (font::load): Use glyph_t variables.
-       * src/libs/libgroff/nametoindex.cpp (name_to_index, number_to_index):
-       Change return type to glyph_t.
-       * src/roff/troff/charinfo.h (charinfo::index): Change type to glyph_t.
+
+       * src/libs/libgroff/nametoindex.cpp (name_to_index,
+       number_to_index): Change return type to glyph_t.
+
+       * src/roff/troff/charinfo.h (charinfo::index): Change type to
+       glyph_t.
        (charinfo::get_index): Change return type to glyph_t.
+
        * src/roff/troff/env.cpp: Include font.h.
+
        * src/roff/troff/node.cpp: Include font.h before charinfo.h.
+
        * src/roff/troff/input.cpp: Include font.h before charinfo.h.
        (charinfo::charinfo): Update.
        (name_to_index, number_to_index): Change return type to glyph_t.
+
        * src/include/printer.h (printer::set_char_and_width): Change return
        type to glyph_t.
-       * src/libs/libdriver/printer.cpp (printer::set_char_and_width): Change
-       return type to glyph_t.
-       * src/devices/grodvi/dvi.cpp (dvi_printer::set_char): Change argument
-       type to glyph_t.
+
+       * src/libs/libdriver/printer.cpp (printer::set_char_and_width):
+       Change return type to glyph_t.
+
+       * src/devices/grodvi/dvi.cpp (dvi_printer::set_char): Change
+       argument type to glyph_t.
+
        * src/devices/grohtml/post-html.cpp (page::add_and_encode): Update.
        (html_printer::space_glyph): Renamed from space_char_index.
        (html_printer::add_to_sbuf, html_printer::sbuf_continuation,
-       html_printer::overstrike, html_printer::set_char): Change argument type
-       to glyph_t.
-       (html_printer::set_char_and_width): Change return type to glyph_t.
-       * src/devices/grolbp/lbp.cpp (lbp_printer::set_char): Change argument
-       type to glyph_t.
-       * src/devices/grolj4/lj4.cpp (lj4_printer::set_char): Change argument
+       html_printer::overstrike, html_printer::set_char): Change argument
        type to glyph_t.
+       (html_printer::set_char_and_width): Change return type to glyph_t.
+
+       * src/devices/grolbp/lbp.cpp (lbp_printer::set_char): Change
+       argument type to glyph_t.
+
+       * src/devices/grolj4/lj4.cpp (lj4_printer::set_char): Change
+       argument type to glyph_t.
+
        * src/devices/grops/ps.cpp (ps_printer::space_glyph): Renamed from
        space_char_index.
        (ps_printer::set_subencoding, ps_printer::set_char): Change argument
        type to glyph_t.
-       * src/devices/grotty/tty.cpp (tty_printer::set_char): Change argument
-       type to glyph_t.
+
+       * src/devices/grotty/tty.cpp (tty_printer::set_char): Change
+       argument type to glyph_t.
 
 2006-02-11  Bruno Haible  <address@hidden>
 
        * src/roff/troff/input.cpp (font::name_to_index): Never return a
        negative value.
+
        * src/libs/libgroff/font.cpp (font::load): Remove failure tests for
        font::name_to_index.
 
@@ -121,7 +152,7 @@
        special_encoding_encoding column.
        * src/devices/grohtml/post-html.cpp (get_html_entity): New function,
        handling the entity names here.
-       (get_html_translation): Use it.  Change return type to 'const
+       (get_html_translation): Use it.  Change return type to `const
        char *'.
        (page::add_and_encode): Update, removing a useless cast.
 
@@ -886,7 +917,7 @@
 
        Implement the rule
 
-         position: '(' position ')'
+         position: `(' position `)'
 
        in pic.
 
Index: groff/doc/groff.texinfo
diff -u groff/doc/groff.texinfo:1.226 groff/doc/groff.texinfo:1.227
--- groff/doc/groff.texinfo:1.226       Sat Feb 11 08:54:47 2006
+++ groff/doc/groff.texinfo     Sat Feb 11 20:34:36 2006
@@ -586,7 +586,7 @@
 
 @code{groff} should not be confused with a @dfn{word processor}, an
 integrated system of editor and text formatter.  Also, many word
-processors follow the acronym{WYSIWYG} paradigm discussed earlier.
+processors follow the @acronym{WYSIWYG} paradigm discussed earlier.
 
 Although @acronym{WYSIWYG} systems may be easier to use, they have a
 number of disadvantages compared to @code{troff}:
Index: groff/src/devices/grodvi/dvi.cpp
diff -u groff/src/devices/grodvi/dvi.cpp:1.8 
groff/src/devices/grodvi/dvi.cpp:1.9
--- groff/src/devices/grodvi/dvi.cpp:1.8        Sat Feb 11 17:48:09 2006
+++ groff/src/devices/grodvi/dvi.cpp    Sat Feb 11 20:34:36 2006
@@ -175,10 +175,10 @@
   font *make_font(const char *);
   void begin_page(int);
   void end_page(int);
-  void set_char(glyph_t, font *, const environment *, int w, const char *name);
-  void special(char *arg, const environment *env, char type);
+  void set_char(glyph, font *, const environment *, int, const char *);
+  void special(char *, const environment *, char);
   void end_of_line();
-  void draw(int code, int *p, int np, const environment *env);
+  void draw(int, int *, int, const environment *);
 };
 
 
@@ -340,12 +340,12 @@
   do_special(buf);
 }
 
-void dvi_printer::set_char(glyph_t glyph, font *f, const environment *env,
+void dvi_printer::set_char(glyph g, font *f, const environment *env,
                           int w, const char *)
 {
   if (*env->col != cur_color)
     set_color(env->col);
-  int code = f->get_code(glyph);
+  int code = f->get_code(g);
   if (env->size != cur_point_size || f != cur_font) {
     cur_font = f;
     cur_point_size = env->size;
@@ -384,8 +384,8 @@
   }
   possibly_begin_line();
   end_h = env->hpos + w;
-  cur_h += scale(f->get_width(glyph, UNITWIDTH)/MULTIPLIER,
-                cur_point_size*RES_7227);
+  cur_h += scale(f->get_width(g, UNITWIDTH) / MULTIPLIER,
+                cur_point_size * RES_7227);
   if (cur_h > max_h)
     max_h = cur_h;
   if (cur_v > max_v)
Index: groff/src/devices/grohtml/post-html.cpp
diff -u groff/src/devices/grohtml/post-html.cpp:1.31 
groff/src/devices/grohtml/post-html.cpp:1.32
--- groff/src/devices/grohtml/post-html.cpp:1.31        Sat Feb 11 17:48:09 2006
+++ groff/src/devices/grohtml/post-html.cpp     Sat Feb 11 20:34:36 2006
@@ -1417,9 +1417,9 @@
        if (html_glyph)
          html_string += html_glyph;
        else {
-         glyph_t glyph = s->f->name_to_index((troff_charname + 
'\0').contents());
-         if (s->f->contains(glyph))
-           html_string += s->f->get_code(glyph);
+         glyph g = s->f->name_to_index((troff_charname + '\0').contents());
+         if (s->f->contains(g))
+           html_string += s->f->get_code(g);
        }
       }
     } else
@@ -1938,7 +1938,7 @@
   files                file_list;
   simple_output        html;
   int                  res;
-  glyph_t              space_glyph;
+  glyph                space_glyph;
   int                  space_width;
   int                  no_of_printed_pages;
   int                  paper_length;
@@ -2009,9 +2009,9 @@
   void  set_line_thickness            (const environment *);
   void  terminate_current_font        (void);
   void  flush_font                    (void);
-  void  add_to_sbuf                   (glyph_t glyph, const string &s);
+  void  add_to_sbuf                   (glyph g, const string &s);
   void  write_title                   (int in_head);
-  int   sbuf_continuation             (glyph_t glyph, const char *name, const 
environment *env, int w);
+  int   sbuf_continuation             (glyph g, const char *name, const 
environment *env, int w);
   void  flush_page                    (void);
   void  troff_tag                     (text_glob *g);
   void  flush_globs                   (void);
@@ -2062,7 +2062,7 @@
   void  outstanding_eol               (int n);
   int   is_bold                       (font *f);
   font *make_bold                     (font *f);
-  int   overstrike                    (glyph_t glyph, const char *name, const 
environment *env, int w);
+  int   overstrike                    (glyph g, const char *name, const 
environment *env, int w);
   void  do_body                       (void);
   int   next_horiz_pos                (text_glob *g, int nf);
   void  lookahead_for_tables          (void);
@@ -2100,9 +2100,9 @@
 public:
   html_printer          ();
   ~html_printer         ();
-  void set_char         (glyph_t glyph, font *f, const environment *env, int 
w, const char *name);
+  void set_char         (glyph g, font *f, const environment *env, int w, 
const char *name);
   void set_numbered_char(int num, const environment *env, int *widthp);
-  glyph_t set_char_and_width(const char *nm, const environment *env,
+  glyph set_char_and_width(const char *nm, const environment *env,
                         int *widthp, font **f);
   void draw             (int code, int *p, int np, const environment *env);
   void begin_page       (int);
@@ -4234,17 +4234,17 @@
  *  add_to_sbuf - adds character code or name to the sbuf.
  */
 
-void html_printer::add_to_sbuf (glyph_t glyph, const string &s)
+void html_printer::add_to_sbuf (glyph g, const string &s)
 {
   if (sbuf_style.f == NULL)
     return;
 
   const char *html_glyph = NULL;
-  unsigned int code = sbuf_style.f->get_code(glyph);
+  unsigned int code = sbuf_style.f->get_code(g);
 
   if (s.empty()) {
-    if (sbuf_style.f->contains(glyph))
-      html_glyph = get_html_entity(sbuf_style.f->get_code(glyph));
+    if (sbuf_style.f->contains(g))
+      html_glyph = get_html_entity(sbuf_style.f->get_code(g));
     else
       html_glyph = NULL;
     
@@ -4260,7 +4260,7 @@
     sbuf += html_glyph;
 }
 
-int html_printer::sbuf_continuation (glyph_t glyph, const char *name,
+int html_printer::sbuf_continuation (glyph g, const char *name,
                                     const environment *env, int w)
 {
   /*
@@ -4270,7 +4270,7 @@
       || ((sbuf_prev_hpos < sbuf_end_hpos)
          && (env->hpos < sbuf_end_hpos)
          && ((sbuf_end_hpos-env->hpos < env->hpos-sbuf_prev_hpos)))) {
-    add_to_sbuf(glyph, name);
+    add_to_sbuf(g, name);
     sbuf_prev_hpos = sbuf_end_hpos;
     sbuf_end_hpos += w + sbuf_kern;
     return TRUE;
@@ -4282,7 +4282,7 @@
        */
 
       if (env->hpos-sbuf_end_hpos < space_width) {
-       add_to_sbuf(glyph, name);
+       add_to_sbuf(g, name);
        sbuf_prev_hpos = sbuf_end_hpos;
        sbuf_end_hpos = env->hpos + w;
        return TRUE;
@@ -4302,9 +4302,9 @@
   if ((f == 0) || name.empty())
     return NULL;
   else {
-    glyph_t glyph = f->name_to_index((char *)(name + '\0').contents());
-    if (f->contains(glyph))
-      return get_html_entity(f->get_code(glyph));
+    glyph g = f->name_to_index((char *)(name + '\0').contents());
+    if (f->contains(g))
+      return get_html_entity(f->get_code(g));
     else
       return NULL;
   }
@@ -4576,7 +4576,7 @@
  *               is flushed.
  */
 
-int html_printer::overstrike(glyph_t glyph, const char *name, const 
environment *env, int w)
+int html_printer::overstrike(glyph g, const char *name, const environment 
*env, int w)
 {
   if ((env->hpos < sbuf_end_hpos)
       || ((sbuf_kern != 0) && (sbuf_end_hpos - sbuf_kern < env->hpos))) {
@@ -4586,7 +4586,7 @@
     if (overstrike_detected) {
       /* already detected, remove previous glyph and use this glyph */
       sbuf.set_length(last_sbuf_length);
-      add_to_sbuf(glyph, name);
+      add_to_sbuf(g, name);
       sbuf_end_hpos = env->hpos + w;
       return TRUE;
     } else {
@@ -4595,7 +4595,7 @@
       if (! is_bold(sbuf_style.f))
        flush_sbuf();
       overstrike_detected = TRUE;
-      add_to_sbuf(glyph, name);
+      add_to_sbuf(g, name);
       sbuf_end_hpos = env->hpos + w;
       return TRUE;
     }
@@ -4609,7 +4609,7 @@
  *             and add character anew.
  */
 
-void html_printer::set_char(glyph_t glyph, font *f, const environment *env,
+void html_printer::set_char(glyph g, font *f, const environment *env,
                            int w, const char *name)
 {
   style sty(f, env->size, env->height, env->slant, env->fontno, *env->col);
@@ -4620,14 +4620,14 @@
     }
   }
   if (((! sbuf.empty()) && (sty == sbuf_style) && (sbuf_vpos == env->vpos))
-      && (sbuf_continuation(glyph, name, env, w)
-         || overstrike(glyph, name, env, w)))
+      && (sbuf_continuation(g, name, env, w)
+         || overstrike(g, name, env, w)))
     return;
   
   flush_sbuf();
   if (sbuf_style.f == NULL)
     sbuf_style = sty;
-  add_to_sbuf(glyph, name);
+  add_to_sbuf(g, name);
   sbuf_end_hpos = env->hpos + w;
   sbuf_start_hpos = env->hpos;
   sbuf_prev_hpos = env->hpos;
@@ -4650,7 +4650,7 @@
     nbsp_width = -num;
     num = 160;         // &nbsp;
   }
-  glyph_t glyph = font::number_to_index(num);
+  glyph g = font::number_to_index(num);
   int fn = env->fontno;
   if (fn < 0 || fn >= nfonts) {
     error("bad font position `%1'", fn);
@@ -4661,7 +4661,7 @@
     error("no font mounted at `%1'", fn);
     return;
   }
-  if (!f->contains(glyph)) {
+  if (!f->contains(g)) {
     error("font `%1' does not contain numbered character %2",
          f->get_name(),
          num);
@@ -4671,17 +4671,17 @@
   if (nbsp_width)
     w = nbsp_width;
   else
-    w = f->get_width(glyph, env->size);
+    w = f->get_width(g, env->size);
   w = round_width(w);
   if (widthp)
     *widthp = w;
-  set_char(glyph, f, env, w, 0);
+  set_char(g, f, env, w, 0);
 }
 
-glyph_t html_printer::set_char_and_width(const char *nm, const environment 
*env,
-                                        int *widthp, font **f)
+glyph html_printer::set_char_and_width(const char *nm, const environment *env,
+                                      int *widthp, font **f)
 {
-  glyph_t glyph = font::name_to_index(nm);
+  glyph g = font::name_to_index(nm);
   int fn = env->fontno;
   if (fn < 0 || fn >= nfonts) {
     error("bad font position `%1'", fn);
@@ -4692,7 +4692,7 @@
     error("no font mounted at `%1'", fn);
     return UNDEFINED_GLYPH;
   }
-  if (!(*f)->contains(glyph)) {
+  if (!(*f)->contains(g)) {
     if (nm[0] != '\0' && nm[1] == '\0')
       error("font `%1' does not contain ascii character `%2'",
            (*f)->get_name(),
@@ -4703,11 +4703,11 @@
            nm);
     return UNDEFINED_GLYPH;
   }
-  int w = (*f)->get_width(glyph, env->size);
+  int w = (*f)->get_width(g, env->size);
   w = round_width(w);
   if (widthp)
     *widthp = w;
-  return glyph;
+  return g;
 }
 
 /*
Index: groff/src/devices/grolbp/lbp.cpp
diff -u groff/src/devices/grolbp/lbp.cpp:1.9 
groff/src/devices/grolbp/lbp.cpp:1.10
--- groff/src/devices/grolbp/lbp.cpp:1.9        Sat Feb 11 17:48:09 2006
+++ groff/src/devices/grolbp/lbp.cpp    Sat Feb 11 20:34:36 2006
@@ -63,7 +63,7 @@
 public:
   lbp_printer(int, double, double);
   ~lbp_printer();
-  void set_char(glyph_t, font *, const environment *, int, const char *name);
+  void set_char(glyph, font *, const environment *, int, const char *name);
   void draw(int code, int *p, int np, const environment *env);
   void begin_page(int);
   void end_page(int page_length);
@@ -277,10 +277,10 @@
   return bfont_name;
 }
 
-void lbp_printer::set_char(glyph_t glyph, font *f, const environment *env,
+void lbp_printer::set_char(glyph g, font *f, const environment *env,
                           int w, const char *)
 {
-  int code = f->get_code(glyph);
+  int code = f->get_code(g);
   unsigned char ch = code & 0xff;
   unsigned short symbol_set = code >> 8;
   if (f != cur_font) {
Index: groff/src/devices/grolj4/lj4.cpp
diff -u groff/src/devices/grolj4/lj4.cpp:1.8 
groff/src/devices/grolj4/lj4.cpp:1.9
--- groff/src/devices/grolj4/lj4.cpp:1.8        Sat Feb 11 17:48:09 2006
+++ groff/src/devices/grolj4/lj4.cpp    Sat Feb 11 20:34:36 2006
@@ -163,7 +163,7 @@
 public:
   lj4_printer(int);
   ~lj4_printer();
-  void set_char(glyph_t, font *, const environment *, int, const char *name);
+  void set_char(glyph, font *, const environment *, int, const char *name);
   void draw(int code, int *p, int np, const environment *env);
   void begin_page(int);
   void end_page(int page_length);
@@ -278,10 +278,10 @@
   return c < 32 && (c == 0 || (7 <= c && c <= 15) || c == 27);
 }
 
-void lj4_printer::set_char(glyph_t glyph, font *f, const environment *env,
+void lj4_printer::set_char(glyph g, font *f, const environment *env,
                           int w, const char *)
 {
-  int code = f->get_code(glyph);
+  int code = f->get_code(g);
 
   unsigned char ch = code & 0xff;
   unsigned short symbol_set = code >> 8;
Index: groff/src/devices/grops/ps.cpp
diff -u groff/src/devices/grops/ps.cpp:1.10 groff/src/devices/grops/ps.cpp:1.11
--- groff/src/devices/grops/ps.cpp:1.10 Sat Feb 11 17:48:09 2006
+++ groff/src/devices/grops/ps.cpp      Sat Feb 11 20:34:36 2006
@@ -1,5 +1,6 @@
 // -*- C++ -*-
-/* Copyright (C) 1989, 1990, 1991, 1992, 2000, 2001, 2002, 2003, 2004, 2005, 
2006
+/* Copyright (C) 1989, 1990, 1991, 1992, 2000, 2001, 2002, 2003, 2004, 2005,
+                 2006
    Free Software Foundation, Inc.
      Written by James Clark (address@hidden)
 
@@ -523,7 +524,7 @@
   FILE *tempfp;
   ps_output out;
   int res;
-  glyph_t space_glyph;
+  glyph space_glyph;
   int pages_output;
   int paper_length;
   int equalise_spaces;
@@ -560,9 +561,9 @@
 
   void flush_sbuf();
   void set_style(const style &);
-  void set_space_code(unsigned char c);
+  void set_space_code(unsigned char);
   int set_encoding_index(ps_font *);
-  subencoding *set_subencoding(font *, glyph_t, unsigned char *);
+  subencoding *set_subencoding(font *, glyph, unsigned char *);
   char *get_subfont(subencoding *, const char *);
   void do_exec(char *, const environment *);
   void do_import(char *, const environment *);
@@ -577,7 +578,7 @@
   void encode_subfont(subencoding *);
   void define_encoding(const char *, int);
   void reencode_font(ps_font *);
-  void set_color(color *c, int fill = 0);
+  void set_color(color *, int = 0);
 
   const char *media_name();
   int media_width();
@@ -587,12 +588,11 @@
 public:
   ps_printer(double);
   ~ps_printer();
-  void set_char(glyph_t glyph, font *f, const environment *env, int w,
-               const char *name);
-  void draw(int code, int *p, int np, const environment *env);
+  void set_char(glyph, font *, const environment *, int, const char *);
+  void draw(int, int *, int, const environment *);
   void begin_page(int);
   void end_page(int);
-  void special(char *arg, const environment *env, char type);
+  void special(char *, const environment *, char);
   font *make_font(const char *);
   void end_of_line();
 };
@@ -656,9 +656,10 @@
   return f->encoding_index = next_encoding_index++;
 }
 
-subencoding *ps_printer::set_subencoding(font *f, glyph_t glyph, unsigned char 
*codep)
+subencoding *ps_printer::set_subencoding(font *f, glyph g,
+                                        unsigned char *codep)
 {
-  unsigned int idx = f->get_code(glyph);
+  unsigned int idx = f->get_code(g);
   *codep = idx % 256;
   unsigned int num = idx >> 8;
   if (num == 0)
@@ -670,7 +671,7 @@
   if (p == 0)
     p = subencodings = new subencoding(f, num, next_subencoding_index++,
                                       subencodings);
-  p->glyphs[*codep] = f->get_special_device_encoding(glyph);
+  p->glyphs[*codep] = f->get_special_device_encoding(g);
   return p;
 }
 
@@ -685,13 +686,13 @@
   return sub->subfont;
 }
 
-void ps_printer::set_char(glyph_t glyph, font *f, const environment *env, int 
w,
+void ps_printer::set_char(glyph g, font *f, const environment *env, int w,
                          const char *)
 {
-  if (glyph == space_glyph || invis_count > 0)
+  if (g == space_glyph || invis_count > 0)
     return;
   unsigned char code;
-  subencoding *sub = set_subencoding(f, glyph, &code);
+  subencoding *sub = set_subencoding(f, g, &code);
   style sty(f, sub, env->size, env->height, env->slant);
   if (sty.slant != 0) {
     if (sty.slant > 80 || sty.slant < -80) {
Index: groff/src/devices/grotty/tty.cpp
diff -u groff/src/devices/grotty/tty.cpp:1.15 
groff/src/devices/grotty/tty.cpp:1.16
--- groff/src/devices/grotty/tty.cpp:1.15       Sat Feb 11 17:51:09 2006
+++ groff/src/devices/grotty/tty.cpp    Sat Feb 11 20:34:36 2006
@@ -43,7 +43,7 @@
 #define TAB_WIDTH 8
 
 // A character of the output device fits in a 32-bit word.
-typedef unsigned int output_character_t;
+typedef unsigned int output_character;
 
 static int horizontal_tab_flag = 0;
 static int form_feed_flag = 0;
@@ -154,10 +154,10 @@
 }
 #endif
 
-class glyph {
-  static glyph *free_list;
+class tty_glyph {
+  static tty_glyph *free_list;
 public:
-  glyph *next;
+  tty_glyph *next;
   int w;
   int hpos;
   unsigned int code;
@@ -171,34 +171,34 @@
     return mode & (VDRAW_MODE|HDRAW_MODE|CU_MODE|COLOR_CHANGE); }
 };
 
-glyph *glyph::free_list = 0;
+tty_glyph *tty_glyph::free_list = 0;
 
-void *glyph::operator new(size_t)
+void *tty_glyph::operator new(size_t)
 {
   if (!free_list) {
     const int BLOCK = 1024;
-    free_list = (glyph *)new char[sizeof(glyph) * BLOCK];
+    free_list = (tty_glyph *)new char[sizeof(tty_glyph) * BLOCK];
     for (int i = 0; i < BLOCK - 1; i++)
       free_list[i].next = free_list + i + 1;
     free_list[BLOCK - 1].next = 0;
   }
-  glyph *p = free_list;
+  tty_glyph *p = free_list;
   free_list = free_list->next;
   p->next = 0;
   return p;
 }
 
-void glyph::operator delete(void *p)
+void tty_glyph::operator delete(void *p)
 {
   if (p) {
-    ((glyph *)p)->next = free_list;
-    free_list = (glyph *)p;
+    ((tty_glyph *)p)->next = free_list;
+    free_list = (tty_glyph *)p;
   }
 }
 
 class tty_printer : public printer {
   int is_utf8;
-  glyph **lines;
+  tty_glyph **lines;
   int nlines;
   int cached_v;
   int cached_vpos;
@@ -209,24 +209,25 @@
   int cu_flag;
   PTABLE(schar) tty_colors;
   void make_underline(int);
-  void make_bold(output_character_t, int);
-  schar color_to_idx(color *col);
-  void add_char(output_character_t, int, int, int, color *, color *, unsigned 
char);
+  void make_bold(output_character, int);
+  schar color_to_idx(color *);
+  void add_char(output_character, int, int, int, color *, color *,
+               unsigned char);
   char *make_rgb_string(unsigned int, unsigned int, unsigned int);
   int tty_color(unsigned int, unsigned int, unsigned int, schar *,
                schar = DEFAULT_COLOR_IDX);
 public:
-  tty_printer(const char *device);
+  tty_printer(const char *);
   ~tty_printer();
-  void set_char(glyph_t, font *, const environment *, int, const char *name);
-  void draw(int code, int *p, int np, const environment *env);
-  void special(char *arg, const environment *env, char type);
-  void change_color(const environment * const env);
-  void change_fill_color(const environment * const env);
-  void put_char(output_character_t);
+  void set_char(glyph, font *, const environment *, int, const char *);
+  void draw(int, int *, int, const environment *);
+  void special(char *, const environment *, char);
+  void change_color(const environment * const);
+  void change_fill_color(const environment * const);
+  void put_char(output_character);
   void put_color(schar, int);
   void begin_page(int) { }
-  void end_page(int page_length);
+  void end_page(int);
   font *make_font(const char *);
 };
 
@@ -292,7 +293,7 @@
   (void)tty_color(color::MAX_COLOR_VAL, 0, color::MAX_COLOR_VAL, &dummy, 5);
   (void)tty_color(0, color::MAX_COLOR_VAL, color::MAX_COLOR_VAL, &dummy, 6);
   nlines = 66;
-  lines = new glyph *[nlines];
+  lines = new tty_glyph *[nlines];
   for (int i = 0; i < nlines; i++)
     lines[i] = 0;
   cu_flag = 0;
@@ -329,7 +330,7 @@
   }
 }
 
-void tty_printer::make_bold(output_character_t c, int w)
+void tty_printer::make_bold(output_character c, int w)
 {
   if (old_drawing_scheme) {
     if (!w)
@@ -363,18 +364,18 @@
   return idx;
 }
 
-void tty_printer::set_char(glyph_t gly, font *f, const environment *env,
+void tty_printer::set_char(glyph g, font *f, const environment *env,
                           int w, const char *)
 {
   if (w % font::hor != 0)
     fatal("width of character not a multiple of horizontal resolution");
-  add_char(f->get_code(gly), w,
+  add_char(f->get_code(g), w,
           env->hpos, env->vpos,
           env->col, env->fill,
           ((tty_font *)f)->get_mode());
 }
 
-void tty_printer::add_char(output_character_t c, int w,
+void tty_printer::add_char(output_character c, int w,
                           int h, int v,
                           color *fore, color *back,
                           unsigned char mode)
@@ -397,9 +398,9 @@
       fatal("vertical position not a multiple of vertical resolution");
     vpos = v / font::vert;
     if (vpos > nlines) {
-      glyph **old_lines = lines;
-      lines = new glyph *[vpos + 1];
-      memcpy(lines, old_lines, nlines * sizeof(glyph *));
+      tty_glyph **old_lines = lines;
+      lines = new tty_glyph *[vpos + 1];
+      memcpy(lines, old_lines, nlines * sizeof(tty_glyph *));
       for (int i = nlines; i <= vpos; i++)
        lines[i] = 0;
       a_delete old_lines;
@@ -414,7 +415,7 @@
     cached_v = v;
     cached_vpos = vpos;
   }
-  glyph *g = new glyph;
+  tty_glyph *g = new tty_glyph;
   g->w = w;
   g->hpos = hpos;
   g->code = c;
@@ -427,7 +428,7 @@
   // HDRAW characters before VDRAW characters before normal characters
   // at each hpos, and otherwise in order of occurrence.
 
-  glyph **pp;
+  tty_glyph **pp;
   for (pp = lines + (vpos - 1); *pp; pp = &(*pp)->next)
     if ((*pp)->hpos < hpos
        || ((*pp)->hpos == hpos && (*pp)->order() >= g->order()))
@@ -549,7 +550,7 @@
   }
 }
 
-void tty_printer::put_char(output_character_t wc)
+void tty_printer::put_char(output_character wc)
 {
   if (is_utf8 && wc >= 0x80) {
     char buf[6 + 1];
@@ -613,7 +614,7 @@
 // `  ' = 0, ` ' = 1, `|' = 2, `|' = 3
 //            |                 |
 
-static output_character_t crossings[4*4] = {
+static output_character crossings[4*4] = {
   0x0000, 0x2577, 0x2575, 0x2502,
   0x2576, 0x250C, 0x2514, 0x251C,
   0x2574, 0x2510, 0x2518, 0x2524,
@@ -635,7 +636,7 @@
     do {
       --last_line;
       while (lines[last_line]) {
-       glyph *tem = lines[last_line];
+       tty_glyph *tem = lines[last_line];
        lines[last_line] = tem->next;
        delete tem;
       }
@@ -643,17 +644,17 @@
   }
 #endif
   for (int i = 0; i < last_line; i++) {
-    glyph *p = lines[i];
+    tty_glyph *p = lines[i];
     lines[i] = 0;
-    glyph *g = 0;
+    tty_glyph *g = 0;
     while (p) {
-      glyph *tem = p->next;
+      tty_glyph *tem = p->next;
       p->next = g;
       g = p;
       p = tem;
     }
     int hpos = 0;
-    glyph *nextp;
+    tty_glyph *nextp;
     curr_fore_idx = DEFAULT_COLOR_IDX;
     curr_back_idx = DEFAULT_COLOR_IDX;
     is_underline = 0;
Index: groff/src/include/font.h
diff -u groff/src/include/font.h:1.11 groff/src/include/font.h:1.12
--- groff/src/include/font.h:1.11       Sat Feb 11 17:54:28 2006
+++ groff/src/include/font.h    Sat Feb 11 20:34:36 2006
@@ -26,64 +26,67 @@
                                     const char *,      // file
                                     int);              // lineno
 
-// A glyph is represented by a font-independent glyph_t object.
+// A glyph is represented by a font-independent `glyph' object.
 // The functions font::name_to_index and font::number_to_index return such
 // an object.
+//
 // There are two types of glyphs:
+//
 //   - those with a name, and among these in particular:
-//     "charNNN" denoting a single 'char' in the input character set,
-//     "uXXXX" denoting a Unicode character,
+//     `charNNN' denoting a single `char' in the input character set,
+//     `uXXXX' denoting a Unicode character,
+//
 //   - those with a number, referring to the the font-dependent glyph with
 //     the given number.
-struct glyph_t {
+struct glyph {
 private:
-  int index;           // A font-independent integer value.
-  const char *name;    // Glyph name, statically allocated.
+  int index;                   // A font-independent integer value.
+  const char *name;            // Glyph name, statically allocated.
   friend class font;
   friend class character_indexer;
   friend class charinfo;
-  glyph_t(int, const char *);  // Glyph with given index and name.
+  glyph(int, const char *);    // Glyph with given index and name.
 public:
-  glyph_t();           // Uninitialized glyph.
-  static glyph_t undefined_glyph(); // Undefined glyph.
+  glyph();                     // Uninitialized glyph.
+  static glyph undefined_glyph();      // Undefined glyph.
   int glyph_index();
   const char *glyph_name();
-  int operator==(const glyph_t&) const;
-  int operator!=(const glyph_t&) const;
+  int operator==(const glyph &) const;
+  int operator!=(const glyph &) const;
 };
 
-inline glyph_t::glyph_t(int idx, const char *nm)
+inline glyph::glyph(int idx, const char *nm)
 : index (idx), name (nm)
 {
 }
 
-inline glyph_t::glyph_t()
+inline glyph::glyph()
 : index (0xdeadbeef), name (NULL)
 {
 }
 
-inline glyph_t glyph_t::undefined_glyph()
+inline glyph glyph::undefined_glyph()
 {
-  return glyph_t(-1, NULL);
+  return glyph(-1, NULL);
 }
-#define UNDEFINED_GLYPH glyph_t::undefined_glyph()
+#define UNDEFINED_GLYPH glyph::undefined_glyph()
 
-inline int glyph_t::glyph_index()
+inline int glyph::glyph_index()
 {
   return index;
 }
 
-inline const char *glyph_t::glyph_name()
+inline const char *glyph::glyph_name()
 {
   return name;
 }
 
-inline int glyph_t::operator==(const glyph_t &other) const
+inline int glyph::operator==(const glyph &other) const
 {
   return index == other.index;
 }
 
-inline int glyph_t::operator!=(const glyph_t &other) const
+inline int glyph::operator!=(const glyph &other) const
 {
   return index != other.index;
 }
@@ -107,23 +110,23 @@
   };
 
   virtual ~font();     // Destructor.
-  int contains(glyph_t);       // Return 1 if this font contains the given
+  int contains(glyph); // Return 1 if this font contains the given
                        // glyph, 0 otherwise.
   int is_special();    // Return 1 if this font is special, 0 otherwise. 
                        // See section `Special Fonts' in the info file of
                        // groff.  Used by make_glyph_node().
-  int get_width(glyph_t, int); // A rectangle represents the shape of the
+  int get_width(glyph, int);   // A rectangle represents the shape of the
                        // given glyph (arg1) at the given point size
                        // (arg2).  Return the horizontal dimension of this
                        // rectangle.
-  int get_height(glyph_t, int);        // A rectangle represents the shape of 
the
+  int get_height(glyph, int);  // A rectangle represents the shape of the
                        // given glyph (arg1) at the given point size
                        // (arg2).  Return the distance between the base
                        // line and the top of this rectangle.
                        // This is often also called the `ascent' of the
                        // glyph.  If the top is above the base line, this
                        // value is positive.
-  int get_depth(glyph_t, int); // A rectangle represents the shape of the
+  int get_depth(glyph, int);   // A rectangle represents the shape of the
                        // given glyph (arg1) at the given point size
                        // (arg2).  Return the distance between the base
                        // line and the bottom of this rectangle. 
@@ -132,15 +135,15 @@
                        // this value is positive.
   int get_space_width(int);    // Return the normal width of a space at the
                        // given point size.
-  int get_character_type(glyph_t);     // Return a bit mask describing the
+  int get_character_type(glyph);       // Return a bit mask describing the
                        // shape of the given glyph.  Bit 0 is set if the
-                       // haracter has a descender.  Bit 1 is set if the
+                       // character has a descender.  Bit 1 is set if the
                        // character has a tall glyph.  See groff manual,
                        // description of \w and the `ct' register.
-  int get_kern(glyph_t, glyph_t, int); // Return the kerning between the
+  int get_kern(glyph, glyph, int);     // Return the kerning between the
                        // given glyphs (arg1 and arg2), both at the given
                        // point size (arg3).
-  int get_skew(glyph_t, int, int);     // A rectangle represents the shape
+  int get_skew(glyph, int, int);       // A rectangle represents the shape
                        // of the given glyph (arg1) at the given point size
                        // (arg2).  For slanted fonts like Times-Italic, the
                        // optical vertical axis is naturally slanted.  The
@@ -163,27 +166,27 @@
   int has_ligature(int);       // Return a non-zero value if this font has
                        // the given ligature type (one of LIG_ff, LIG_fi,
                        // etc.), 0 otherwise.
-  int get_italic_correction(glyph_t, int);     // If the given glyph (arg1)
+  int get_italic_correction(glyph, int);       // If the given glyph (arg1)
                        // at the given point size (arg2) is followed by an
                        // unslanted glyph, some horizontal white space may
                        // need to be inserted in between.  See the groff
                        // manual, description of \/.  Return the amount
                        // (width) of this white space.
-  int get_left_italic_correction(glyph_t, int);        // If the given glyph 
(arg1)
+  int get_left_italic_correction(glyph, int);  // If the given glyph (arg1)
                        // at the given point size (arg2) is preceded by an
                        // unslanted roman glyph, some horizontal white
                        // space may need to be inserted in between.  See
                        // the groff manual, description of \,.  Return the
                        // amount (width) of this white space.
-  int get_subscript_correction(glyph_t, int);  // If the given glyph (arg1)
+  int get_subscript_correction(glyph, int);    // If the given glyph (arg1)
                        // at the given point size (arg2)is followed by a
                        // subscript glyph, the horizontal position may need
                        // to be advanced by some (possibly negative)
                        // amount.  See groff manual, description of \w and
                        // the `ssc' register.  Return this amount.
-  int get_code(glyph_t);       // Return the code point in the physical
+  int get_code(glyph); // Return the code point in the physical
                        // font of the given glyph.
-  const char *get_special_device_encoding(glyph_t);    // Return special
+  const char *get_special_device_encoding(glyph);      // Return special
                        // device dependent information about the given
                        // glyph.  Return NULL if there is no special
                        // information.
@@ -224,19 +227,20 @@
                        // device) and initialize some static variables with
                        // info from there.
 
-  // The next two functions exist in two versions: one in roff/troff/input.cpp
-  // for troff, and one for libs/libgroff/nametoindex.cpp for the preprocessors
-  // and the postprocessors.
-  static glyph_t name_to_index(const char *);  // Convert the glyph with
-                       // the given name (arg1) to a glyph_t.  This has
-                       // the same semantics as the groff escape sequence
-                       // \C'name'.  If such a glyph_t does not yet exist, a
-                       // new one is allocated.
-  static glyph_t number_to_index(int); // Convert the font-dependent glyph
-                       // with the given number (in the font) to a glyph_t.
-                       // This has the same semantics as the groff escape
-                       // sequence \N'number'.  If such a glyph_t does not
-                       // yet exist, a new one is allocated.
+  // The next two functions exist in two versions: one in
+  // roff/troff/input.cpp for troff, and one for
+  // libs/libgroff/nametoindex.cpp for the preprocessors and the
+  // postprocessors.
+  static glyph name_to_index(const char *);    // Convert the glyph with
+                       // the given name (arg1) to a `glyph' object.  This
+                       // has the same semantics as the groff escape sequence
+                       // \C'name'.  If such a `glyph' object does not yet
+                       // exist, a new one is allocated.
+  static glyph number_to_index(int);   // Convert the font-dependent glyph
+                       // with the given number (in the font) to a `glyph'
+                       // object.  This has the same semantics as the groff
+                       // escape sequence \N'number'.  If such a `glyph'
+                       // object does not yet exist, a new one is allocated.
 
   static FONT_COMMAND_HANDLER
     set_unknown_desc_command_handler(FONT_COMMAND_HANDLER);    // Register
@@ -309,18 +313,18 @@
                        // pairs.
 
   // These methods add new characters to the ch_index[] and ch[] arrays.
-  void add_entry(glyph_t,                      // glyph
+  void add_entry(glyph,                                // glyph
                 const font_char_metric &);     // metric
-  void copy_entry(glyph_t,                     // new_glyph
-                 glyph_t);                     // old_glyph
+  void copy_entry(glyph,                       // new_glyph
+                 glyph);                       // old_glyph
   void alloc_ch_index(int);                    // index
   void extend_ch();
   void compact();
 
-  void add_kern(glyph_t, glyph_t, int);        // Add to the kerning table a
+  void add_kern(glyph, glyph, int);    // Add to the kerning table a
                        // kerning amount (arg3) between two given glyphs
                        // (arg1 and arg2).
-  static int hash_kern(glyph_t, glyph_t);      // Return a hash code for
+  static int hash_kern(glyph, glyph);  // Return a hash code for
                        // the pair of glyphs (arg1 and arg2).
 
   /* Returns w * pointsize / unitwidth, rounded to the nearest integer.  */
Index: groff/src/include/printer.h
diff -u groff/src/include/printer.h:1.15 groff/src/include/printer.h:1.16
--- groff/src/include/printer.h:1.15    Sat Feb 11 17:48:09 2006
+++ groff/src/include/printer.h Sat Feb 11 20:34:36 2006
@@ -7,7 +7,7 @@
 
    Written by James Clark (address@hidden)
 
-   Last update: 15 Dec 2004
+   Last update: 11 Feb 2006
 
    This file is part of groff.
 
@@ -62,29 +62,23 @@
 public:
   printer();
   virtual ~printer();
-  void load_font(int i, const char *name);
-  void set_ascii_char(unsigned char c, const environment *env,
-                     int *widthp = 0);
-  void set_special_char(const char *nm, const environment *env,
-                       int *widthp = 0);
-  virtual void set_numbered_char(int n, const environment *env,
-                                int *widthp = 0);
-  glyph_t set_char_and_width(const char *nm, const environment *env,
-                            int *widthp, font **f);
-  font *get_font_from_index(int fontno);
-  virtual void draw(int code, int *p, int np, const environment *env);
+  void load_font(int, const char *);
+  void set_ascii_char(unsigned char, const environment *, int * = 0);
+  void set_special_char(const char *, const environment *, int * = 0);
+  virtual void set_numbered_char(int, const environment *, int * = 0);
+  glyph set_char_and_width(const char *, const environment *, int *, font **);
+  font *get_font_from_index(int);
+  virtual void draw(int, int *, int, const environment *);
   // perform change of line color (text, outline) in the print-out 
-  virtual void change_color(const environment * const env);
+  virtual void change_color(const environment * const);
   // perform change of fill color in the print-out 
-  virtual void change_fill_color(const environment * const env);
+  virtual void change_fill_color(const environment * const);
   virtual void begin_page(int) = 0;
-  virtual void end_page(int page_length) = 0;
-  virtual font *make_font(const char *nm);
+  virtual void end_page(int) = 0;
+  virtual font *make_font(const char *);
   virtual void end_of_line();
-  virtual void special(char *arg, const environment *env,
-                      char type = 'p');
-  virtual void devtag(char *arg, const environment *env,
-                     char type = 'p');
+  virtual void special(char *, const environment *, char = 'p');
+  virtual void devtag(char *, const environment *, char = 'p');
 
 protected:
   font_pointer_list *font_list;
@@ -100,8 +94,8 @@
 
 private:
   font *find_font(const char *);
-  virtual void set_char(glyph_t glyph, font *f, const environment *env,
-                       int w, const char *name) = 0;
+  virtual void set_char(glyph, font *, const environment *, int,
+                       const char *) = 0;
 };
 
 printer *make_printer();
Index: groff/src/include/ptable.h
diff -u groff/src/include/ptable.h:1.6 groff/src/include/ptable.h:1.7
--- groff/src/include/ptable.h:1.6      Sat Feb 11 17:54:28 2006
+++ groff/src/include/ptable.h  Sat Feb 11 20:34:36 2006
@@ -32,8 +32,10 @@
 
 // `class PTABLE(T)' is the type of a hash table mapping a string
 // (const char *) to an object of type T.
+//
 // `struct PASSOC(T)' is the type of a association (pair) between a
 // string (const char *) and an object of type T.
+//
 // `class PTABLE_ITERATOR(T)' is the type of an iterator iterating through a
 // `class PTABLE(T)'.
 //
Index: groff/src/libs/libdriver/printer.cpp
diff -u groff/src/libs/libdriver/printer.cpp:1.5 
groff/src/libs/libdriver/printer.cpp:1.6
--- groff/src/libs/libdriver/printer.cpp:1.5    Sat Feb 11 17:48:09 2006
+++ groff/src/libs/libdriver/printer.cpp        Sat Feb 11 20:34:36 2006
@@ -182,8 +182,8 @@
   buf[0] = c;
   buf[1] = '\0';
 
-  glyph_t glyph = set_char_and_width(buf, env, &w, &f);
-  set_char(glyph, f, env, w, 0);
+  glyph g = set_char_and_width(buf, env, &w, &f);
+  set_char(g, f, env, w, 0);
   if (widthp) {
     *widthp = w;
   }
@@ -194,18 +194,18 @@
 {
   font *f;
   int w;
-  glyph_t glyph = set_char_and_width(nm, env, &w, &f);
-  if (glyph != UNDEFINED_GLYPH) {
-    set_char(glyph, f, env, w, nm);
+  glyph g = set_char_and_width(nm, env, &w, &f);
+  if (g != UNDEFINED_GLYPH) {
+    set_char(g, f, env, w, nm);
     if (widthp)
       *widthp = w;
   }
 }
 
-glyph_t printer::set_char_and_width(const char *nm, const environment *env,
-                                   int *widthp, font **f)
+glyph printer::set_char_and_width(const char *nm, const environment *env,
+                                 int *widthp, font **f)
 {
-  glyph_t glyph = font::name_to_index(nm);
+  glyph g = font::name_to_index(nm);
   int fn = env->fontno;
   if (fn < 0 || fn >= nfonts) {
     error("bad font position `%1'", fn);
@@ -216,7 +216,7 @@
     error("no font mounted at `%1'", fn);
     return UNDEFINED_GLYPH;
   }
-  if (!(*f)->contains(glyph)) {
+  if (!(*f)->contains(g)) {
     if (nm[0] != '\0' && nm[1] == '\0')
       error("font `%1' does not contain ascii character `%2'",
            (*f)->get_name(),
@@ -227,15 +227,15 @@
            nm);
     return UNDEFINED_GLYPH;
   }
-  int w = (*f)->get_width(glyph, env->size);
+  int w = (*f)->get_width(g, env->size);
   if (widthp)
     *widthp = w;
-  return glyph;
+  return g;
 }
 
 void printer::set_numbered_char(int num, const environment *env, int *widthp)
 {
-  glyph_t glyph = font::number_to_index(num);
+  glyph g = font::number_to_index(num);
   int fn = env->fontno;
   if (fn < 0 || fn >= nfonts) {
     error("bad font position `%1'", fn);
@@ -246,16 +246,16 @@
     error("no font mounted at `%1'", fn);
     return;
   }
-  if (!f->contains(glyph)) {
+  if (!f->contains(g)) {
     error("font `%1' does not contain numbered character %2",
          f->get_name(),
          num);
     return;
   }
-  int w = f->get_width(glyph, env->size);
+  int w = f->get_width(g, env->size);
   if (widthp)
     *widthp = w;
-  set_char(glyph, f, env, w, 0);
+  set_char(g, f, env, w, 0);
 }
 
 font *printer::get_font_from_index(int fontno)
Index: groff/src/libs/libgroff/font.cpp
diff -u groff/src/libs/libgroff/font.cpp:1.9 
groff/src/libs/libgroff/font.cpp:1.10
--- groff/src/libs/libgroff/font.cpp:1.9        Sat Feb 11 17:48:09 2006
+++ groff/src/libs/libgroff/font.cpp    Sat Feb 11 20:34:37 2006
@@ -47,12 +47,12 @@
 };
 
 struct font_kern_list {
-  glyph_t glyph1;
-  glyph_t glyph2;
+  glyph glyph1;
+  glyph glyph2;
   int amount;
   font_kern_list *next;
 
-  font_kern_list(glyph_t, glyph_t, int, font_kern_list * = 0);
+  font_kern_list(glyph, glyph, int, font_kern_list * = 0);
 };
 
 struct font_widths_cache {
@@ -239,15 +239,15 @@
   return 0;
 }
 
-int font::get_skew(glyph_t c, int point_size, int sl)
+int font::get_skew(glyph g, int point_size, int sl)
 {
-  int h = get_height(c, point_size);
-  return int(h*tan((slant+sl)*PI/180.0) + .5);
+  int h = get_height(g, point_size);
+  return int(h * tan((slant + sl) * PI / 180.0) + .5);
 }
 
-int font::contains(glyph_t c)
+int font::contains(glyph g)
 {
-  int idx = c.glyph_index();
+  int idx = g.glyph_index();
   assert(idx >= 0);
   return idx < nindices && ch_index[idx] >= 0;
 }
@@ -271,9 +271,9 @@
   a_delete width;
 }
 
-int font::get_width(glyph_t c, int point_size)
+int font::get_width(glyph g, int point_size)
 {
-  int idx = c.glyph_index();
+  int idx = g.glyph_index();
   assert(idx >= 0 && idx < nindices);
   int i = ch_index[idx];
   assert(i >= 0);
@@ -303,37 +303,37 @@
   return w;
 }
 
-int font::get_height(glyph_t c, int point_size)
+int font::get_height(glyph g, int point_size)
 {
-  int idx = c.glyph_index();
+  int idx = g.glyph_index();
   assert(idx >= 0 && idx < nindices && ch_index[idx] >= 0);
   return scale(ch[ch_index[idx]].height, point_size);
 }
 
-int font::get_depth(glyph_t c, int point_size)
+int font::get_depth(glyph g, int point_size)
 {
-  int idx = c.glyph_index();
+  int idx = g.glyph_index();
   assert(idx >= 0 && idx < nindices && ch_index[idx] >= 0);
   return scale(ch[ch_index[idx]].depth, point_size);
 }
 
-int font::get_italic_correction(glyph_t c, int point_size)
+int font::get_italic_correction(glyph g, int point_size)
 {
-  int idx = c.glyph_index();
+  int idx = g.glyph_index();
   assert(idx >= 0 && idx < nindices && ch_index[idx] >= 0);
   return scale(ch[ch_index[idx]].italic_correction, point_size);
 }
 
-int font::get_left_italic_correction(glyph_t c, int point_size)
+int font::get_left_italic_correction(glyph g, int point_size)
 {
-  int idx = c.glyph_index();
+  int idx = g.glyph_index();
   assert(idx >= 0 && idx < nindices && ch_index[idx] >= 0);
   return scale(ch[ch_index[idx]].pre_math_space, point_size);
 }
 
-int font::get_subscript_correction(glyph_t c, int point_size)
+int font::get_subscript_correction(glyph g, int point_size)
 {
-  int idx = c.glyph_index();
+  int idx = g.glyph_index();
   assert(idx >= 0 && idx < nindices && ch_index[idx] >= 0);
   return scale(ch[ch_index[idx]].subscript_correction, point_size);
 }
@@ -343,33 +343,35 @@
   return scale(space_width, point_size);
 }
 
-font_kern_list::font_kern_list(glyph_t c1, glyph_t c2, int n, font_kern_list 
*p)
-: glyph1(c1), glyph2(c2), amount(n), next(p)
+font_kern_list::font_kern_list(glyph g1, glyph g2, int n, font_kern_list *p)
+: glyph1(g1), glyph2(g2), amount(n), next(p)
 {
 }
 
-inline int font::hash_kern(glyph_t glyph1, glyph_t glyph2)
+inline int font::hash_kern(glyph g1, glyph g2)
 {
-  int n = ((glyph1.glyph_index() << 10) + glyph2.glyph_index()) % 
KERN_HASH_TABLE_SIZE;
+  int n = ((g1.glyph_index() << 10) + g2.glyph_index())
+         % KERN_HASH_TABLE_SIZE;
   return n < 0 ? -n : n;
 }
 
-void font::add_kern(glyph_t glyph1, glyph_t glyph2, int amount)
+void font::add_kern(glyph g1, glyph g2, int amount)
 {
   if (!kern_hash_table) {
     kern_hash_table = new font_kern_list *[int(KERN_HASH_TABLE_SIZE)];
     for (int i = 0; i < KERN_HASH_TABLE_SIZE; i++)
       kern_hash_table[i] = 0;
   }
-  font_kern_list **p = kern_hash_table + hash_kern(glyph1, glyph2);
-  *p = new font_kern_list(glyph1, glyph2, amount, *p);
+  font_kern_list **p = kern_hash_table + hash_kern(g1, g2);
+  *p = new font_kern_list(g1, g2, amount, *p);
 }
 
-int font::get_kern(glyph_t glyph1, glyph_t glyph2, int point_size)
+int font::get_kern(glyph g1, glyph g2, int point_size)
 {
   if (kern_hash_table) {
-    for (font_kern_list *p = kern_hash_table[hash_kern(glyph1, glyph2)]; p; p 
= p->next)
-      if (glyph1 == p->glyph1 && glyph2 == p->glyph2)
+    for (font_kern_list *p = kern_hash_table[hash_kern(g1, g2)]; p;
+        p = p->next)
+      if (g1 == p->glyph1 && g2 == p->glyph2)
        return scale(p->amount, point_size);
   }
   return 0;
@@ -380,16 +382,16 @@
   return mask & ligatures;
 }
 
-int font::get_character_type(glyph_t c)
+int font::get_character_type(glyph g)
 {
-  int idx = c.glyph_index();
+  int idx = g.glyph_index();
   assert(idx >= 0 && idx < nindices && ch_index[idx] >= 0);
   return ch[ch_index[idx]].type;
 }
 
-int font::get_code(glyph_t c)
+int font::get_code(glyph g)
 {
-  int idx = c.glyph_index();
+  int idx = g.glyph_index();
   assert(idx >= 0 && idx < nindices && ch_index[idx] >= 0);
   return ch[ch_index[idx]].code;
 }
@@ -404,9 +406,9 @@
   return internalname;
 }
 
-const char *font::get_special_device_encoding(glyph_t c)
+const char *font::get_special_device_encoding(glyph g)
 {
-  int idx = c.glyph_index();
+  int idx = g.glyph_index();
   assert(idx >= 0 && idx < nindices && ch_index[idx] >= 0);
   return ch[ch_index[idx]].special_device_coding;
 }
@@ -477,9 +479,9 @@
   }
 }
 
-void font::add_entry(glyph_t glyph, const font_char_metric &metric)
+void font::add_entry(glyph g, const font_char_metric &metric)
 {
-  int idx = glyph.glyph_index();
+  int idx = g.glyph_index();
   assert(idx >= 0);
   if (idx >= nindices)
     alloc_ch_index(idx);
@@ -491,7 +493,7 @@
   ch[ch_used++] = metric;
 }
 
-void font::copy_entry(glyph_t new_glyph, glyph_t old_glyph)
+void font::copy_entry(glyph new_glyph, glyph old_glyph)
 {
   int new_index = new_glyph.glyph_index();
   int old_index = old_glyph.glyph_index();
@@ -691,14 +693,14 @@
          t.error("bad kern amount `%1'", p);
          return 0;
        }
-       glyph_t glyph1 = name_to_index(c1);
-       glyph_t glyph2 = name_to_index(c2);
-       add_kern(glyph1, glyph2, n);
+       glyph g1 = name_to_index(c1);
+       glyph g2 = name_to_index(c2);
+       add_kern(g1, g2, n);
       }
     }
     else if (strcmp(command, "charset") == 0) {
       had_charset = 1;
-      glyph_t last_glyph;
+      glyph last_glyph;
       int got_last_glyph = 0;
       for (;;) {
        if (!t.next()) {
@@ -722,8 +724,8 @@
            t.error("unnamed character cannot be duplicate");
            return 0;
          }
-         glyph_t glyph = name_to_index(nm);
-         copy_entry(glyph, last_glyph);
+         glyph g = name_to_index(nm);
+         copy_entry(g, last_glyph);
        }
        else {
          font_char_metric metric;
@@ -794,7 +796,8 @@
       }
     }
     else {
-      t.error("unrecognised command `%1' after `kernpairs' or `charset' 
command", command);
+      t.error("unrecognised command `%1' after `kernpairs' or `charset' 
command",
+             command);
       return 0;
     }
   }
Index: groff/src/libs/libgroff/nametoindex.cpp
diff -u groff/src/libs/libgroff/nametoindex.cpp:1.5 
groff/src/libs/libgroff/nametoindex.cpp:1.6
--- groff/src/libs/libgroff/nametoindex.cpp:1.5 Sat Feb 11 17:54:28 2006
+++ groff/src/libs/libgroff/nametoindex.cpp     Sat Feb 11 20:34:37 2006
@@ -36,14 +36,14 @@
 public:
   character_indexer();
   ~character_indexer();
-  glyph_t ascii_char_index(unsigned char);
-  glyph_t named_char_index(const char *);
-  glyph_t numbered_char_index(int);
+  glyph ascii_char_index(unsigned char);
+  glyph named_char_index(const char *);
+  glyph numbered_char_index(int);
 private:
   enum { NSMALL = 256 };
   int next_index;
-  glyph_t ascii_index[256];
-  glyph_t small_number_index[NSMALL];
+  glyph ascii_index[256];
+  glyph small_number_index[NSMALL];
   PTABLE(int) table;
 };
 
@@ -52,31 +52,31 @@
 {
   int i;
   for (i = 0; i < 256; i++)
-    ascii_index[i] = glyph_t(-1, NULL);
+    ascii_index[i] = glyph(-1, NULL);
   for (i = 0; i < NSMALL; i++)
-    small_number_index[i] = glyph_t(-1, NULL);
+    small_number_index[i] = glyph(-1, NULL);
 }
 
 character_indexer::~character_indexer()
 {
 }
 
-glyph_t character_indexer::ascii_char_index(unsigned char c)
+glyph character_indexer::ascii_char_index(unsigned char c)
 {
   if (ascii_index[c].index < 0) {
     char buf[4+3+1];
     memcpy(buf, "char", 4);
     strcpy(buf + 4, i_to_a(c));
-    ascii_index[c] = glyph_t(next_index++, strsave(buf));
+    ascii_index[c] = glyph(next_index++, strsave(buf));
   }
   return ascii_index[c];
 }
 
-glyph_t character_indexer::numbered_char_index(int n)
+glyph character_indexer::numbered_char_index(int n)
 {
   if (n >= 0 && n < NSMALL) {
     if (small_number_index[n].index < 0)
-      small_number_index[n] = glyph_t(next_index++, NULL);
+      small_number_index[n] = glyph(next_index++, NULL);
     return small_number_index[n];
   }
   // Not the most efficient possible implementation.
@@ -89,10 +89,10 @@
     *np = next_index++;
     table.define(buf, np);
   }
-  return glyph_t(*np, NULL);
+  return glyph(*np, NULL);
 }
 
-glyph_t character_indexer::named_char_index(const char *s)
+glyph character_indexer::named_char_index(const char *s)
 {
   int *np = table.lookupassoc(&s);
   if (!np) {
@@ -100,28 +100,27 @@
     *np = next_index++;
     s = table.define(s, np);
   }
-  return glyph_t(*np, s);
+  return glyph(*np, s);
 }
 
 static character_indexer indexer;
 
-glyph_t font::number_to_index(int n)
+glyph font::number_to_index(int n)
 {
-  return glyph_t(indexer.numbered_char_index(n));
+  return glyph(indexer.numbered_char_index(n));
 }
 
-glyph_t font::name_to_index(const char *s)
+glyph font::name_to_index(const char *s)
 {
   assert(s != 0 && s[0] != '\0' && s[0] != ' ');
   if (s[1] == '\0')
-    return glyph_t(indexer.ascii_char_index(s[0]));
+    return glyph(indexer.ascii_char_index(s[0]));
   /* char128 and \200 are synonyms */
   if (s[0] == 'c' && s[1] == 'h' && s[2] == 'a' && s[3] == 'r') {
     char *val;
     long n = strtol(s + 4, &val, 10);
     if (val != s + 4 && *val == '\0' && n >= 0 && n < 256)
-      return glyph_t(indexer.ascii_char_index((unsigned char)n));
+      return glyph(indexer.ascii_char_index((unsigned char)n));
   }
-  return glyph_t(indexer.named_char_index(s));
+  return glyph(indexer.named_char_index(s));
 }
-
Index: groff/src/roff/troff/charinfo.h
diff -u groff/src/roff/troff/charinfo.h:1.9 groff/src/roff/troff/charinfo.h:1.10
--- groff/src/roff/troff/charinfo.h:1.9 Sat Feb 11 17:48:09 2006
+++ groff/src/roff/troff/charinfo.h     Sat Feb 11 20:34:37 2006
@@ -24,7 +24,7 @@
 class charinfo {
   static int next_index;
   charinfo *translation;
-  glyph_t index;
+  glyph index;
   int number;
   macro *mac;
   unsigned char special_translation;
@@ -57,7 +57,7 @@
   };
   symbol nm;
   charinfo(symbol s);
-  glyph_t get_index();
+  glyph get_index();
   int ends_sentence();
   int overlaps_vertically();
   int overlaps_horizontally();
@@ -171,7 +171,7 @@
   flags = c;
 }
 
-inline glyph_t charinfo::get_index()
+inline glyph charinfo::get_index()
 {
   return index;
 }
Index: groff/src/roff/troff/env.cpp
diff -u groff/src/roff/troff/env.cpp:1.14 groff/src/roff/troff/env.cpp:1.15
--- groff/src/roff/troff/env.cpp:1.14   Sat Feb 11 17:48:09 2006
+++ groff/src/roff/troff/env.cpp        Sat Feb 11 20:34:37 2006
@@ -1,5 +1,6 @@
 // -*- C++ -*-
-/* Copyright (C) 1989, 1990, 1991, 1992, 2000, 2001, 2002, 2003, 2004, 2005, 
2006
+/* Copyright (C) 1989, 1990, 1991, 1992, 2000, 2001, 2002, 2003, 2004, 2005,
+                 2006
    Free Software Foundation, Inc.
      Written by James Clark (address@hidden)
 
Index: groff/src/roff/troff/input.cpp
diff -u groff/src/roff/troff/input.cpp:1.29 groff/src/roff/troff/input.cpp:1.30
--- groff/src/roff/troff/input.cpp:1.29 Sat Feb 11 17:54:28 2006
+++ groff/src/roff/troff/input.cpp      Sat Feb 11 20:34:37 2006
@@ -8094,7 +8094,7 @@
   not_found(0), transparent_translate(1), translate_input(0),
   mode(CHAR_NORMAL), nm(s)
 {
-  index = glyph_t(next_index++, s.contents());
+  index = glyph(next_index++, s.contents());
 }
 
 void charinfo::set_hyphenation_code(unsigned char c)
@@ -8194,7 +8194,7 @@
   }
 }
 
-glyph_t font::name_to_index(const char *nm)
+glyph font::name_to_index(const char *nm)
 {
   charinfo *ci;
   if (nm[1] == 0)
@@ -8209,7 +8209,7 @@
     return ci->get_index();
 }
 
-glyph_t font::number_to_index(int n)
+glyph font::number_to_index(int n)
 {
   return get_charinfo_by_number(n)->get_index();
 }
Index: groff/src/roff/troff/node.cpp
diff -u groff/src/roff/troff/node.cpp:1.19 groff/src/roff/troff/node.cpp:1.20
--- groff/src/roff/troff/node.cpp:1.19  Sat Feb 11 17:48:10 2006
+++ groff/src/roff/troff/node.cpp       Sat Feb 11 20:34:37 2006
@@ -1,5 +1,6 @@
 // -*- C++ -*-
-/* Copyright (C) 1989, 1990, 1991, 1992, 2000, 2001, 2002, 2003, 2004, 2005, 
2006
+/* Copyright (C) 1989, 1990, 1991, 1992, 2000, 2001, 2002, 2003, 2004, 2005,
+                 2006
    Free Software Foundation, Inc.
      Written by James Clark (address@hidden)
 




reply via email to

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