]> ncurses.scripts.mit.edu Git - ncurses.git/blobdiff - c++/cursesw.cc
ncurses 5.9 - patch 20110917
[ncurses.git] / c++ / cursesw.cc
index 825d08ddd102ada225d4759d55b9bc464bbd6507..f2e7e94858aa4b16077a10412ae699ebe390cb90 100644 (file)
@@ -1,6 +1,6 @@
 // * this is for making emacs happy: -*-Mode: C++;-*-
 /****************************************************************************
 // * this is for making emacs happy: -*-Mode: C++;-*-
 /****************************************************************************
- * Copyright (c) 2007 Free Software Foundation, Inc.                        *
+ * Copyright (c) 2007-2009,2011 Free Software Foundation, Inc.              *
  *                                                                          *
  * Permission is hereby granted, free of charge, to any person obtaining a  *
  * copy of this software and associated documentation files (the            *
  *                                                                          *
  * Permission is hereby granted, free of charge, to any person obtaining a  *
  * copy of this software and associated documentation files (the            *
@@ -42,7 +42,7 @@
 #include "internal.h"
 #include "cursesw.h"
 
 #include "internal.h"
 #include "cursesw.h"
 
-MODULE_ID("$Id: cursesw.cc,v 1.49 2007/12/15 23:01:57 tom Exp $")
+MODULE_ID("$Id: cursesw.cc,v 1.52 2011/09/17 22:12:10 tom Exp $")
 
 #define COLORS_NEED_INITIALIZATION  -1
 #define COLORS_NOT_INITIALIZED       0
 
 #define COLORS_NEED_INITIALIZATION  -1
 #define COLORS_NOT_INITIALIZED       0
@@ -285,19 +285,19 @@ static RIPOFFINIT* prip = R_INIT;
 NCursesWindow::NCursesWindow(WINDOW *win, int ncols)
   : w(0), alloced(FALSE), par(0), subwins(0), sib(0)
 {
 NCursesWindow::NCursesWindow(WINDOW *win, int ncols)
   : w(0), alloced(FALSE), par(0), subwins(0), sib(0)
 {
+    (void) ncols;
     initialize();
     w = win;
     initialize();
     w = win;
-    assert((w->_maxx +1 ) == ncols);
 }
 
 int _nc_xx_ripoff_init(WINDOW *w, int ncols)
 {
 }
 
 int _nc_xx_ripoff_init(WINDOW *w, int ncols)
 {
+    (void) ncols;
     int res = ERR;
 
     RIPOFFINIT init = *prip++;
     if (init) {
     int res = ERR;
 
     RIPOFFINIT init = *prip++;
     if (init) {
-       NCursesWindow* W = new NCursesWindow(w,ncols);
-       res = init(*W);
+       res = init(*(new NCursesWindow(w,ncols)));
     }
     return res;
 }
     }
     return res;
 }
@@ -464,7 +464,7 @@ NCursesWindow::setcolor(short pair)
 #if HAVE_HAS_KEY
 bool NCursesWindow::has_mouse() const
 {
 #if HAVE_HAS_KEY
 bool NCursesWindow::has_mouse() const
 {
-    return ((::has_key(KEY_MOUSE) || ::_nc_has_mouse())
+    return ((::has_key(KEY_MOUSE) || ::has_mouse())
             ? TRUE : FALSE);
 }
 #endif
             ? TRUE : FALSE);
 }
 #endif