Update interpreters to latest Garglk codebase
[projects/chimara/chimara.git] / interpreters / nitfol / io.c
index dafa47aa2071e45eb72e1a5e7f453a6334c7170a..41d62f335a32a2e580cb6678dfd7d9e069ed4a14 100644 (file)
 
     You should have received a copy of the GNU General Public License
     along with this program; if not, write to the Free Software
-    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111, USA.
+    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
 
     The author can be reached at nitfol@deja.com
 */
 #include "nitfol.h"
-#include "io.h"
+#include "nio.h"
 
 #ifdef HEADER
 
@@ -502,7 +502,7 @@ void z_kill_window(zwinid win)
 void kill_windows(void)
 {
   int i;
-  
+
   for(i = 0; i < num_z_windows; i++)
     z_clear_window(&game_windows[i]);
 
@@ -688,7 +688,7 @@ void z_flush_fixed(zwinid window)
   if(window->biggest_height > window->last_height &&
      window->biggest_height > window->height)
     end_line = window->biggest_height;
-  
+
   /* For v3 games, there's a callback function to draw the room name and
      score; if this is present, we start drawing at a lower position */
   start_line = 0;
@@ -697,8 +697,15 @@ void z_flush_fixed(zwinid window)
   end_line += start_line;
 
   o = glk_window_get_parent(window->win);
-  glk_window_set_arrangement(o, window->method,
-                            end_line, window->win);
+#if 0
+  glk_window_get_size(window->win, &winx, &winy);
+  if (!(window->method & winmethod_Above || window->method & winmethod_Below)
+      || winy != end_line)
+    glk_window_set_arrangement(o, window->method,
+                              end_line, window->win);
+#else
+  glk_window_set_arrangement(o, window->method, end_line, window->win);
+#endif
   glk_window_get_size(window->win, &winx, &winy);
 
   if(window->draw_callback) {