[liblouis-liblouisxml] [liblouisutdml] push by bertfrees - Avoid empty pages... on 2012-07-30 14:52 GMT

  • From: liblouisutdml@xxxxxxxxxxxxxx
  • To: liblouis-liblouisxml@xxxxxxxxxxxxx
  • Date: Mon, 30 Jul 2012 14:52:47 +0000

Revision: bd3f4ce7fe89
Author:   Bert Frees <bertfrees@xxxxxxxxx>
Date:     Mon Jul 30 07:52:19 2012
Log:      Avoid empty pages

(unless the rightHandPage option is set)
http://code.google.com/p/liblouisutdml/source/detail?r=bd3f4ce7fe89

Modified:
 /liblouisutdml/louisutdml.h
 /liblouisutdml/transcribe_paragraph.c
 /liblouisutdml/transcriber.c

=======================================
--- /liblouisutdml/louisutdml.h Tue Jun 12 09:06:23 2012
+++ /liblouisutdml/louisutdml.h Mon Jul 30 07:52:19 2012
@@ -232,7 +232,6 @@
   int outbuf3_enabled;
   int fill_pages;
   int after_contents;
-  int fill_page_skipped;
   int blank_lines;
   int print_page_numbers_in_contents;
   int braille_page_numbers_in_contents;
=======================================
--- /liblouisutdml/transcribe_paragraph.c       Fri May 25 17:05:55 2012
+++ /liblouisutdml/transcribe_paragraph.c       Mon Jul 30 07:52:19 2012
@@ -59,7 +59,6 @@
 static int saved_line_spacing;
 static int saved_blank_lines;
 static int saved_fill_pages;
-static int saved_fill_page_skipped;
 static char saved_soft_hyphens[2 * BUFSIZE];
 static widechar saved_text_buffer[2 * BUFSIZE];
 static widechar saved_translated_buffer[2 * BUFSIZE];
@@ -95,7 +94,6 @@
   saved_line_spacing = ud->line_spacing;
   saved_blank_lines = ud->blank_lines;
   saved_fill_pages = ud->fill_pages;
-  saved_fill_page_skipped = ud->fill_page_skipped;
   widecharcpy (saved_text_buffer, ud->text_buffer, saved_text_length);
   widecharcpy (saved_translated_buffer, ud->translated_buffer,
               saved_translated_length);
@@ -137,7 +135,6 @@
   ud->line_spacing = saved_line_spacing;
   ud->blank_lines = saved_blank_lines;
   ud->fill_pages = saved_fill_pages;
-  ud->fill_page_skipped = saved_fill_page_skipped;
   widecharcpy (ud->text_buffer, saved_text_buffer, saved_text_length);
   widecharcpy (ud->translated_buffer, saved_translated_buffer,
               saved_translated_length);
=======================================
--- /liblouisutdml/transcriber.c        Tue Jun 26 13:54:10 2012
+++ /liblouisutdml/transcriber.c        Mon Jul 30 07:52:19 2012
@@ -830,13 +830,24 @@
     return 1;
   if (ud->outbuf3_enabled && ud->lines_length <= MAXLINES)
     ud->lines_newpage[ud->lines_length] = 1;
-  if (ud->lines_on_page == 0 && !ud->fill_page_skipped)
-    ud->fill_page_skipped = 1;
-  else
-    {
-      ud->fill_pages++;
-      startLine ();
-    }
+  if (ud->fill_pages == 0 && ud->lines_on_page > 0)
+    ud->fill_pages = 1;
+  if (ud->fill_pages) {
+    startLine ();
+    writeOutbuf ();
+  }
+  return 1;
+}
+
+static int
+fillPageForce ()
+{
+  if (!ud->braille_pages)
+    return 1;
+  if (ud->outbuf3_enabled && ud->lines_length <= MAXLINES)
+    ud->lines_newpage[ud->lines_length] = 1;
+  ud->fill_pages++;
+  startLine ();
   writeOutbuf ();
   return 1;
 }
@@ -1348,7 +1359,6 @@
        {
          ud->lines_on_page++;
          ud->after_contents = 0;
-         ud->fill_page_skipped = 0;
          cellsWritten = 0;

          if (ud->lines_on_page == 1)
For a description of the software, to download it and links to
project pages go to http://www.abilitiessoft.com

Other related posts:

  • » [liblouis-liblouisxml] [liblouisutdml] push by bertfrees - Avoid empty pages... on 2012-07-30 14:52 GMT - liblouisutdml