Source-Changes-HG archive

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

[src/trunk]: src/lib/libform * Remove code that created the subwin if it did ...



details:   https://anonhg.NetBSD.org/src/rev/347f09f2de66
branches:  trunk
changeset: 507559:347f09f2de66
user:      blymn <blymn%NetBSD.org@localhost>
date:      Sun Mar 25 12:34:47 2001 +0000

description:
* Remove code that created the subwin if it did not exist as this is
   not the correct behaviour.
 * Mods to support new curses window behaviour.

diffstat:

 lib/libform/post.c |  22 +++++-----------------
 1 files changed, 5 insertions(+), 17 deletions(-)

diffs (53 lines):

diff -r 20c72cf39946 -r 347f09f2de66 lib/libform/post.c
--- a/lib/libform/post.c        Sun Mar 25 12:32:53 2001 +0000
+++ b/lib/libform/post.c        Sun Mar 25 12:34:47 2001 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: post.c,v 1.6 2001/01/22 01:05:34 blymn Exp $   */
+/*     $NetBSD: post.c,v 1.7 2001/03/25 12:34:47 blymn Exp $   */
 
 /*-
  * Copyright (c) 1998-2000 Brett Lymn
@@ -40,7 +40,7 @@
 {
        int rows, cols, status;
        
-       if ((form == NULL) || (form->win == NULL))
+       if (form == NULL)
                return E_BAD_ARGUMENT;
 
        if (form->posted == 1)
@@ -55,19 +55,11 @@
        if (scale_form(form, &rows, &cols) != E_OK)
                return E_SYSTEM_ERROR;
        
-       if ((form->subwin != NULL) && ((rows > getmaxy(form->subwin))
-                                      || (cols > getmaxx(form->subwin)))) {
+       if ((form->scrwin != NULL) && ((rows > getmaxy(form->scrwin))
+                                      || (cols > getmaxx(form->scrwin)))) {
                return E_NO_ROOM;
        }
 
-       if (form->subwin == NULL) {
-               form->subwin_created = 1;
-               form->subwin = derwin(form->win, rows, cols, 0, 0);
-               if (form->subwin == NULL)
-                       return E_SYSTEM_ERROR;
-
-       }
-       
 #ifdef DEBUG
        if (_formi_create_dbg_file() != E_OK)
                return E_SYSTEM_ERROR;
@@ -115,11 +107,7 @@
                form->form_term(form);
        form->in_init = 0;
 
-       wclear(form->subwin);
-       if (form->subwin_created == 1) {
-               delwin(form->subwin);
-               form->subwin_created = 0;
-       }
+       wclear(form->scrwin);
 
        form->posted = 0;
 



Home | Main Index | Thread Index | Old Index