Fri Jan 10 11:29:24 2014 UTC ()
Use format strings.


(joerg)
diff -r1.1.1.3 -r1.2 src/gnu/dist/groff/src/devices/grohtml/post-html.cpp
diff -r1.2 -r1.3 src/gnu/dist/groff/src/roff/troff/node.cpp

cvs diff -r1.1.1.3 -r1.2 src/gnu/dist/groff/src/devices/grohtml/Attic/post-html.cpp (expand / switch to unified diff)

--- src/gnu/dist/groff/src/devices/grohtml/Attic/post-html.cpp 2006/02/06 18:14:50 1.1.1.3
+++ src/gnu/dist/groff/src/devices/grohtml/Attic/post-html.cpp 2014/01/10 11:29:24 1.2
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: post-html.cpp,v 1.1.1.3 2006/02/06 18:14:50 wiz Exp $ */ 1/* $NetBSD: post-html.cpp,v 1.2 2014/01/10 11:29:24 joerg Exp $ */
2 2
3// -*- C++ -*- 3// -*- C++ -*-
4/* Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005 4/* Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005
5 * Free Software Foundation, Inc. 5 * Free Software Foundation, Inc.
6 * 6 *
7 * Gaius Mulley (gaius@glam.ac.uk) wrote post-html.cpp 7 * Gaius Mulley (gaius@glam.ac.uk) wrote post-html.cpp
8 * but it owes a huge amount of ideas and raw code from 8 * but it owes a huge amount of ideas and raw code from
9 * James Clark (jjc@jclark.com) grops/ps.cpp. 9 * James Clark (jjc@jclark.com) grops/ps.cpp.
10 */ 10 */
11 11
12/* 12/*
13This file is part of groff. 13This file is part of groff.
14 14
@@ -1579,27 +1579,27 @@ void header_desc::write_headings (FILE * @@ -1579,27 +1579,27 @@ void header_desc::write_headings (FILE *
1579 do { 1579 do {
1580 g = headers.get_data(); 1580 g = headers.get_data();
1581 fputs("<a href=\"", f); 1581 fputs("<a href=\"", f);
1582 if (multiple_files && (! header_filename.is_empty())) { 1582 if (multiple_files && (! header_filename.is_empty())) {
1583 text_glob *fn = header_filename.get_data(); 1583 text_glob *fn = header_filename.get_data();
1584 fputs(fn->text_string, f); 1584 fputs(fn->text_string, f);
1585 } 1585 }
1586 fputs("#", f); 1586 fputs("#", f);
1587 if (simple_anchors) { 1587 if (simple_anchors) {
1588 string buffer(ANCHOR_TEMPLATE); 1588 string buffer(ANCHOR_TEMPLATE);
1589 1589
1590 buffer += as_string(h); 1590 buffer += as_string(h);
1591 buffer += '\0'; 1591 buffer += '\0';
1592 fprintf(f, buffer.contents()); 1592 fprintf(f, "%s", buffer.contents());
1593 } else 1593 } else
1594 fputs(g->text_string, f); 1594 fputs(g->text_string, f);
1595 h++; 1595 h++;
1596 fputs("\">", f); 1596 fputs("\">", f);
1597 fputs(g->text_string, f); 1597 fputs(g->text_string, f);
1598 fputs("</a><br>\n", f); 1598 fputs("</a><br>\n", f);
1599 headers.move_right(); 1599 headers.move_right();
1600 if (multiple_files && (! header_filename.is_empty())) 1600 if (multiple_files && (! header_filename.is_empty()))
1601 header_filename.move_right(); 1601 header_filename.move_right();
1602 } while (! headers.is_equal_to_head()); 1602 } while (! headers.is_equal_to_head());
1603 fputs("\n", f); 1603 fputs("\n", f);
1604 } 1604 }
1605 } 1605 }

cvs diff -r1.2 -r1.3 src/gnu/dist/groff/src/roff/troff/Attic/node.cpp (expand / switch to unified diff)

--- src/gnu/dist/groff/src/roff/troff/Attic/node.cpp 2012/01/06 15:16:03 1.2
+++ src/gnu/dist/groff/src/roff/troff/Attic/node.cpp 2014/01/10 11:29:24 1.3
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: node.cpp,v 1.2 2012/01/06 15:16:03 joerg Exp $ */ 1/* $NetBSD: node.cpp,v 1.3 2014/01/10 11:29:24 joerg Exp $ */
2 2
3// -*- C++ -*- 3// -*- C++ -*-
4/* Copyright (C) 1989, 1990, 1991, 1992, 2000, 2001, 2002, 2003, 2004, 2005 4/* Copyright (C) 1989, 1990, 1991, 1992, 2000, 2001, 2002, 2003, 2004, 2005
5 Free Software Foundation, Inc. 5 Free Software Foundation, Inc.
6 Written by James Clark (jjc@jclark.com) 6 Written by James Clark (jjc@jclark.com)
7 7
8This file is part of groff. 8This file is part of groff.
9 9
10groff is free software; you can redistribute it and/or modify it under 10groff is free software; you can redistribute it and/or modify it under
11the terms of the GNU General Public License as published by the Free 11the terms of the GNU General Public License as published by the Free
12Software Foundation; either version 2, or (at your option) any later 12Software Foundation; either version 2, or (at your option) any later
13version. 13version.
14 14
@@ -2149,27 +2149,27 @@ void glyph_node::ascii_print(ascii_outpu @@ -2149,27 +2149,27 @@ void glyph_node::ascii_print(ascii_outpu
2149 if (c != 0) 2149 if (c != 0)
2150 ascii->outc(c); 2150 ascii->outc(c);
2151 else 2151 else
2152 ascii->outs(ci->nm.contents()); 2152 ascii->outs(ci->nm.contents());
2153} 2153}
2154 2154
2155void glyph_node::debug_node() 2155void glyph_node::debug_node()
2156{ 2156{
2157 unsigned char c = ci->get_ascii_code(); 2157 unsigned char c = ci->get_ascii_code();
2158 fprintf(stderr, "{ %s [", type()); 2158 fprintf(stderr, "{ %s [", type());
2159 if (c) 2159 if (c)
2160 fprintf(stderr, "%c", c); 2160 fprintf(stderr, "%c", c);
2161 else 2161 else
2162 fprintf(stderr, ci->nm.contents()); 2162 fprintf(stderr, "%s", ci->nm.contents());
2163 if (push_state) 2163 if (push_state)
2164 fprintf(stderr, " <push_state>"); 2164 fprintf(stderr, " <push_state>");
2165 if (state) 2165 if (state)
2166 state->display_state(); 2166 state->display_state();
2167 fprintf(stderr, " nest level %d", div_nest_level); 2167 fprintf(stderr, " nest level %d", div_nest_level);
2168 fprintf(stderr, "]}\n"); 2168 fprintf(stderr, "]}\n");
2169 fflush(stderr); 2169 fflush(stderr);
2170} 2170}
2171 2171
2172ligature_node::ligature_node(charinfo *c, tfont *t, color *gc, color *fc, 2172ligature_node::ligature_node(charinfo *c, tfont *t, color *gc, color *fc,
2173 node *gn1, node *gn2, statem *s, 2173 node *gn1, node *gn2, statem *s,
2174 int pop, node *x) 2174 int pop, node *x)
2175: glyph_node(c, t, gc, fc, s, pop, x), n1(gn1), n2(gn2) 2175: glyph_node(c, t, gc, fc, s, pop, x), n1(gn1), n2(gn2)