groff
[Top][All Lists]
Advanced

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

[Groff] Mysteries of .em request


From: Joachim Walsdorff
Subject: [Groff] Mysteries of .em request
Date: Fri, 17 Apr 2009 17:01:59 +0200
User-agent: Thunderbird 2.0.0.21 (Windows/20090302)

Enclosed is a patch for the file `input.cpp', which removes the strange behavior of `.em xx'. With this patch added it seems that there are no longer any restrictions for the content and function of macro `xx'. Warning: I am not a C-expert and don't understand in depth the code in `input.cpp'. I have tested it for my own need and some other situations, and in all these cases it works fine.
Joachim

--
Dr. Joachim Walsdorff
Hauptstra├če 225
D 69117 Heidelberg
Tel. 06221-28680

--- input.cpp   2009-04-03 14:37:24.000000000 +0200
+++ wffinput.cpp        2009-04-17 16:13:06.000000000 +0200
@@ -2546,7 +2546,7 @@
 
 void exit_troff()
 {
-  exit_started = 1;
+  exit_started = 0;
   topdiv->set_last_page();
   if (!end_macro_name.is_null()) {
     spring_trap(end_macro_name);
@@ -2557,21 +2557,6 @@
   tok.next();
   process_input_stack();
   end_diversions();
-  if (topdiv->get_page_length() > 0) {
-    done_end_macro = 1;
-    topdiv->set_ejecting();
-    static unsigned char buf[2] = { LAST_PAGE_EJECTOR, '\0' };
-    input_stack::push(make_temp_iterator((char *)buf));
-    topdiv->space(topdiv->get_page_length(), 1);
-    tok.next();
-    process_input_stack();
-    seen_last_page_ejector = 1;        // should be set already
-    topdiv->set_ejecting();
-    push_page_ejector();
-    topdiv->space(topdiv->get_page_length(), 1);
-    tok.next();
-    process_input_stack();
-  }
   // This will only happen if a trap-invoked macro starts a diversion,
   // or if vertical position traps have been disabled.
   cleanup_and_exit(0);

reply via email to

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