[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Groff-commit] groff ChangeLog NEWS doc/groff.texinfo man/grof...
From: |
Werner LEMBERG |
Subject: |
[Groff-commit] groff ChangeLog NEWS doc/groff.texinfo man/grof... |
Date: |
Sat, 02 Sep 2006 21:39:34 +0000 |
CVSROOT: /cvsroot/groff
Module name: groff
Changes by: Werner LEMBERG <wl> 06/09/02 21:39:34
Modified files:
. : ChangeLog NEWS
doc : groff.texinfo
man : groff.man groff_diff.man
src/roff/troff : env.cpp env.h
Log message:
Add a request `pev' to print environment information (similar to
`pnr' and `ptr' to print number registers and traps).
* src/roff/troff/env.h (environment): Add member function print_env.
* src/roff/troff/env.cpp: (environment::print_env): New function to
print a given environment state.
(print_env): New global function to iterate through the
environments, printing each one.
(init_env_requests): Register `pev'.
* doc/groff.texinfo (Debugging), man/groff.man, man/groff_diff.man,
NEWS: Document `pev' request.
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/groff/ChangeLog?cvsroot=groff&r1=1.988&r2=1.989
http://cvs.savannah.gnu.org/viewcvs/groff/NEWS?cvsroot=groff&r1=1.220&r2=1.221
http://cvs.savannah.gnu.org/viewcvs/groff/doc/groff.texinfo?cvsroot=groff&r1=1.246&r2=1.247
http://cvs.savannah.gnu.org/viewcvs/groff/man/groff.man?cvsroot=groff&r1=1.81&r2=1.82
http://cvs.savannah.gnu.org/viewcvs/groff/man/groff_diff.man?cvsroot=groff&r1=1.58&r2=1.59
http://cvs.savannah.gnu.org/viewcvs/groff/src/roff/troff/env.cpp?cvsroot=groff&r1=1.18&r2=1.19
http://cvs.savannah.gnu.org/viewcvs/groff/src/roff/troff/env.h?cvsroot=groff&r1=1.36&r2=1.37
Patches:
Index: ChangeLog
===================================================================
RCS file: /cvsroot/groff/groff/ChangeLog,v
retrieving revision 1.988
retrieving revision 1.989
diff -u -b -r1.988 -r1.989
--- ChangeLog 1 Sep 2006 20:11:11 -0000 1.988
+++ ChangeLog 2 Sep 2006 21:39:33 -0000 1.989
@@ -1,3 +1,20 @@
+2006-09-01 Nick Stoughton <address@hidden>
+ Werner Lemberg <address@hidden>
+
+ Add a request `pev' to print environment information (similar to
+ `pnr' and `ptr' to print number registers and traps).
+
+ * src/roff/troff/env.h (environment): Add member function print_env.
+
+ * src/roff/troff/env.cpp: (environment::print_env): New function to
+ print a given environment state.
+ (print_env): New global function to iterate through the
+ environments, printing each one.
+ (init_env_requests): Register `pev'.
+
+ * doc/groff.texinfo (Debugging), man/groff.man, man/groff_diff.man,
+ NEWS: Document `pev' request.
+
2006-09-01 Bernd Warken
* src/preproc/soelim/soelim.cpp (usage): Fix option argument of
Index: NEWS
===================================================================
RCS file: /cvsroot/groff/groff/NEWS,v
retrieving revision 1.220
retrieving revision 1.221
diff -u -b -r1.220 -r1.221
--- NEWS 11 Aug 2006 10:27:54 -0000 1.220
+++ NEWS 2 Sep 2006 21:39:33 -0000 1.221
@@ -52,6 +52,11 @@
after character). If set, the hyphenation codes of the surrounding
characters are ignored.
+o A new debugging request, `pev', has been added to print all of the current
+ known environments to stderr. It first prints the state of the current
+ environment, then iterates through all of the known environments, printing
+ each except the one that is current.
+
Pic
---
Index: doc/groff.texinfo
===================================================================
RCS file: /cvsroot/groff/groff/doc/groff.texinfo,v
retrieving revision 1.246
retrieving revision 1.247
diff -u -b -r1.246 -r1.247
--- doc/groff.texinfo 11 Aug 2006 10:27:54 -0000 1.246
+++ doc/groff.texinfo 2 Sep 2006 21:39:33 -0000 1.247
@@ -13739,6 +13739,13 @@
output, @code{gtroff} can be forced to suppress formatted output with
the @option{-z} flag.
address@hidden {pev, }
address@hidden dumping environments (@code{pev})
address@hidden environments, dumping (@code{pev})
+Print the contents of the current environment and all the currently
+defined environments (both named and numbered) on @code{stderr}.
address@hidden
+
@Defreq {pm, }
@cindex dumping symbol table (@code{pm})
@cindex symbol table, dumping (@code{pm})
Index: man/groff.man
===================================================================
RCS file: /cvsroot/groff/groff/man/groff.man,v
retrieving revision 1.81
retrieving revision 1.82
diff -u -b -r1.81 -r1.82
--- man/groff.man 12 Jul 2006 19:31:09 -0000 1.81
+++ man/groff.man 2 Sep 2006 21:39:34 -0000 1.82
@@ -2,7 +2,7 @@
.ig
groff.man
-Last update: 11 Jul 2006
+Last update: 1 Sep 2006
This file is part of groff, the GNU roff type-setting system.
@@ -1949,6 +1949,10 @@
.REQ .pc c
Page number character.
.
+.REQ .pev
+Print the current environment and each defined environment
+state to stderr.
+.
.REQ .pi program
Pipe output to
.I program
Index: man/groff_diff.man
===================================================================
RCS file: /cvsroot/groff/groff/man/groff_diff.man,v
retrieving revision 1.58
retrieving revision 1.59
diff -u -b -r1.58 -r1.59
--- man/groff_diff.man 11 Aug 2006 10:27:54 -0000 1.58
+++ man/groff_diff.man 2 Sep 2006 21:39:34 -0000 1.59
@@ -3,7 +3,7 @@
.ig
groff_diff.man
-Last update : 11 Aug 2006
+Last update : 1 Sep 2006
This file is part of groff, the GNU roff type-setting system.
It is the source of the man-page groff_diff(7).
@@ -1890,6 +1890,11 @@
is stripped off to allow initial blanks.
.
.TP
+.B .pev
+Print the current environment and each defined environment state on
+stderr.
+.
+.TP
.B .pnr
Print the names and contents of all currently defined number registers
on stderr.
Index: src/roff/troff/env.cpp
===================================================================
RCS file: /cvsroot/groff/groff/src/roff/troff/env.cpp,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -b -r1.18 -r1.19
--- src/roff/troff/env.cpp 25 Aug 2006 20:00:57 -0000 1.18
+++ src/roff/troff/env.cpp 2 Sep 2006 21:39:34 -0000 1.19
@@ -1558,8 +1558,8 @@
if (nd) {
delete curenv->margin_character_node;
curenv->margin_character_node = nd;
- curenv->margin_character_flags = (MARGIN_CHARACTER_ON
- |MARGIN_CHARACTER_NEXT);
+ curenv->margin_character_flags = MARGIN_CHARACTER_ON
+ | MARGIN_CHARACTER_NEXT;
hunits d;
if (has_arg() && get_hunits(&d, 'm'))
curenv->margin_character_distance = d;
@@ -3229,6 +3229,156 @@
return sptoa(curenv->get_requested_point_size());
}
+void environment::print_env()
+{
+ // at the time of calling .pev, those values are always zero or
+ // meaningless:
+ //
+ // char_height, char_slant,
+ // interrupted
+ // current_tab, tab_width, tab_distance
+ // current_field, field_distance, pre_field_width, field_spaces,
+ // tab_field_spaces, tab_precedes_field
+ // composite
+ //
+ errprint(" previous line length: %1u\n", prev_line_length.to_units());
+ errprint(" line length: %1u\n", line_length.to_units());
+ errprint(" previous title length: %1u\n", prev_title_length.to_units());
+ errprint(" title length: %1u\n", title_length.to_units());
+ errprint(" previous size: %1p (%2s)\n",
+ prev_size.to_points(), prev_size.to_scaled_points());
+ errprint(" size: %1p (%2s)\n",
+ size.to_points(), size.to_scaled_points());
+ errprint(" previous requested size: %1s\n", prev_requested_size);
+ errprint(" requested size: %1s\n", requested_size);
+ errprint(" previous font number: %1\n", prev_fontno);
+ errprint(" font number: %1\n", fontno);
+ errprint(" previous family: `%1'\n", prev_family->nm.contents());
+ errprint(" family: `%1'\n", family->nm.contents());
+ errprint(" space size: %1/36 em\n", space_size);
+ errprint(" sentence space size: %1/36 em\n", sentence_space_size);
+ errprint(" previous line interrupted: %1\n",
+ prev_line_interrupted ? "yes" : "no");
+ errprint(" fill mode: %1\n", fill ? "on" : "off");
+ errprint(" adjust mode: %1\n",
+ adjust_mode == ADJUST_LEFT
+ ? "left"
+ : adjust_mode == ADJUST_BOTH
+ ? "both"
+ : adjust_mode == ADJUST_CENTER
+ ? "center"
+ : "right");
+ if (center_lines)
+ errprint(" lines to center: %1\n", center_lines);
+ if (right_justify_lines)
+ errprint(" lines to right justify: %1\n", right_justify_lines);
+ errprint(" previous vertical spacing: %1u\n",
+ prev_vertical_spacing.to_units());
+ errprint(" vertical spacing: %1u\n", vertical_spacing.to_units());
+ errprint(" previous post-vertical spacing: %1u\n",
+ prev_post_vertical_spacing.to_units());
+ errprint(" post-vertical spacing: %1u\n",
+ post_vertical_spacing.to_units());
+ errprint(" previous line spacing: %1\n", prev_line_spacing);
+ errprint(" line spacing: %1\n", line_spacing);
+ errprint(" previous indentation: %1u\n", prev_indent.to_units());
+ errprint(" indentation: %1u\n", indent.to_units());
+ errprint(" temporary indentation: %1u\n", temporary_indent.to_units());
+ errprint(" have temporary indentation: %1\n",
+ have_temporary_indent ? "yes" : "no");
+ errprint(" currently used indentation: %1u\n", saved_indent.to_units());
+ errprint(" target text length: %1u\n", target_text_length.to_units());
+ if (underline_lines) {
+ errprint(" lines to underline: %1\n", underline_lines);
+ errprint(" font number before underlining: %1\n", pre_underline_fontno);
+ errprint(" underline spaces: %1\n", underline_spaces ? "yes" : "no");
+ }
+ if (input_trap.contents()) {
+ errprint(" input trap macro: `%1'\n", input_trap.contents());
+ errprint(" input trap line counter: %1\n", input_trap_count);
+ errprint(" continued input trap: %1\n",
+ continued_input_trap ? "yes" : "no");
+ }
+ errprint(" previous text length: %1u\n", prev_text_length.to_units());
+ errprint(" total width: %1u\n", width_total.to_units());
+ errprint(" total number of spaces: %1\n", space_total);
+ errprint(" input line start: %1u\n", input_line_start.to_units());
+ errprint(" line tabs: %1\n", line_tabs ? "yes" : "no");
+ errprint(" discarding: %1\n", discarding ? "yes" : "no");
+ errprint(" spread flag set: %1\n", spread_flag ? "yes" : "no"); // \p
+ if (margin_character_node) {
+ errprint(" margin character flags: %1\n",
+ margin_character_flags == MARGIN_CHARACTER_ON
+ ? "on"
+ : margin_character_flags == MARGIN_CHARACTER_NEXT
+ ? "next"
+ : margin_character_flags == MARGIN_CHARACTER_ON
+ | MARGIN_CHARACTER_NEXT
+ ? "on, next"
+ : "none");
+ errprint(" margin character distance: %1u\n",
+ margin_character_distance.to_units());
+ }
+ if (numbering_nodes) {
+ errprint(" line number digit width: %1u\n",
+ line_number_digit_width.to_units());
+ errprint(" separation between number and text: %1 digit spaces\n",
+ number_text_separation);
+ errprint(" line number indentation: %1 digit spaces\n",
+ line_number_indent);
+ errprint(" print line numbers every %1line%1\n",
+ line_number_multiple > 1 ? i_to_a(line_number_multiple) : "",
+ line_number_multiple > 1 ? "s" : "");
+ errprint(" lines not to enumerate: %1\n", no_number_count);
+ }
+ string hf = hyphenation_flags ? "on" : "off";
+ if (hyphenation_flags & HYPHEN_LAST_LINE)
+ hf += ", not last line";
+ if (hyphenation_flags & HYPHEN_LAST_CHARS)
+ hf += ", not last two chars";
+ if (hyphenation_flags & HYPHEN_FIRST_CHARS)
+ hf += ", not first two chars";
+ hf += '\0';
+ errprint(" hyphenation_flags: %1\n", hf.contents());
+ errprint(" number of consecutive hyphenated lines: %1\n",
+ hyphen_line_count);
+ errprint(" maximum number of consecutive hyphenated lines: %1\n",
+ hyphen_line_max);
+ errprint(" hyphenation space: %1u\n", hyphenation_space.to_units());
+ errprint(" hyphenation margin: %1u\n", hyphenation_margin.to_units());
+#ifdef WIDOW_CONTROL
+ errprint(" widow control: %1\n", widow_control ? "yes" : "no");
+#endif /* WIDOW_CONTROL */
+}
+
+void print_env()
+{
+ errprint("Current Environment:\n");
+ curenv->print_env();
+ for (int i = 0; i < NENVIRONMENTS; i++) {
+ if (env_table[i]) {
+ errprint("Environment %1:\n", i);
+ if (env_table[i] != curenv)
+ env_table[i]->print_env();
+ else
+ errprint(" current\n");
+ }
+ }
+ dictionary_iterator iter(env_dictionary);
+ symbol s;
+ environment *e;
+ while (iter.get(&s, (void **)&e)) {
+ assert(!s.is_null());
+ errprint("Environment %1:\n", s.contents());
+ if (e != curenv)
+ e->print_env();
+ else
+ errprint(" current\n");
+ }
+ fflush(stderr);
+ skip_line();
+}
+
#define init_int_env_reg(name, func) \
number_reg_dictionary.define(name, new int_env_reg(&environment::func))
@@ -3277,6 +3427,7 @@
init_request("nh", no_hyphenate);
init_request("nm", number_lines);
init_request("nn", no_number);
+ init_request("pev", print_env);
init_request("ps", point_size);
init_request("pvs", post_vertical_spacing);
init_request("rj", right_justify);
Index: src/roff/troff/env.h
===================================================================
RCS file: /cvsroot/groff/groff/src/roff/troff/env.h,v
retrieving revision 1.36
retrieving revision 1.37
diff -u -b -r1.36 -r1.37
--- src/roff/troff/env.h 12 Jul 2006 19:31:09 -0000 1.36
+++ src/roff/troff/env.h 2 Sep 2006 21:39:34 -0000 1.37
@@ -264,6 +264,7 @@
environment(const environment *); // for temporary environment
~environment();
statem *construct_state(int only_eol);
+ void print_env();
void copy(const environment *);
int is_dummy() { return dummy; }
int is_empty();
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Groff-commit] groff ChangeLog NEWS doc/groff.texinfo man/grof...,
Werner LEMBERG <=