]> ncurses.scripts.mit.edu Git - ncurses.git/blobdiff - ncurses/base/lib_overlay.c
ncurses 5.7 - patch 20100424
[ncurses.git] / ncurses / base / lib_overlay.c
index 26314de5e5fba0d604cfbf5c7b7b1bb2c14c03a9..bfb817bc310833782222362024d067de4fa917b4 100644 (file)
@@ -1,5 +1,5 @@
 /****************************************************************************
- * Copyright (c) 1998-2006,2007 Free Software Foundation, Inc.              *
+ * Copyright (c) 1998-2008,2009 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            *
@@ -40,7 +40,7 @@
 
 #include <curses.priv.h>
 
-MODULE_ID("$Id: lib_overlay.c,v 1.25 2008/04/12 17:21:59 tom Exp $")
+MODULE_ID("$Id: lib_overlay.c,v 1.29 2009/10/24 23:21:31 tom Exp $")
 
 static int
 overlap(const WINDOW *const src, WINDOW *const dst, int const flag)
@@ -52,11 +52,10 @@ overlap(const WINDOW *const src, WINDOW *const dst, int const flag)
     int dminrow, dmincol;
     int dmaxrow, dmaxcol;
 
-    T((T_CALLED("overlap(%p,%p,%d)"), src, dst, flag));
+    T((T_CALLED("overlap(%p,%p,%d)"), (const void *) src, (void *) dst, flag));
 
     if (src != 0 && dst != 0) {
-       _nc_lock_window(src);
-       _nc_lock_window(dst);
+       _nc_lock_global(curses);
 
        T(("src : begy %ld, begx %ld, maxy %ld, maxx %ld",
           (long) src->_begy,
@@ -93,8 +92,7 @@ overlap(const WINDOW *const src, WINDOW *const dst, int const flag)
                         dmaxrow, dmaxcol,
                         flag);
        }
-       _nc_unlock_window(dst);
-       _nc_unlock_window(src);
+       _nc_unlock_global(curses);
     }
     returnCode(rc);
 }
@@ -112,7 +110,7 @@ overlap(const WINDOW *const src, WINDOW *const dst, int const flag)
 NCURSES_EXPORT(int)
 overlay(const WINDOW *win1, WINDOW *win2)
 {
-    T((T_CALLED("overlay(%p,%p)"), win1, win2));
+    T((T_CALLED("overlay(%p,%p)"), (const void *) win1, (void *) win2));
     returnCode(overlap(win1, win2, TRUE));
 }
 
@@ -129,7 +127,7 @@ overlay(const WINDOW *win1, WINDOW *win2)
 NCURSES_EXPORT(int)
 overwrite(const WINDOW *win1, WINDOW *win2)
 {
-    T((T_CALLED("overwrite(%p,%p)"), win1, win2));
+    T((T_CALLED("overwrite(%p,%p)"), (const void *) win1, (void *) win2));
     returnCode(overlap(win1, win2, FALSE));
 }
 
@@ -147,12 +145,14 @@ copywin(const WINDOW *src, WINDOW *dst,
     attr_t mask;
 
     T((T_CALLED("copywin(%p, %p, %d, %d, %d, %d, %d, %d, %d)"),
-       src, dst, sminrow, smincol, dminrow, dmincol, dmaxrow, dmaxcol, over));
+       (const void *) src,
+       (void *) dst,
+       sminrow, smincol,
+       dminrow, dmincol,
+       dmaxrow, dmaxcol, over));
 
     if (src && dst) {
-
-       _nc_lock_window(src);
-       _nc_lock_window(dst);
+       _nc_lock_global(curses);
 
        bk = AttrOf(dst->_nc_bkgd);
        mask = ~(attr_t) ((bk & A_COLOR) ? A_COLOR : 0);
@@ -204,8 +204,7 @@ copywin(const WINDOW *src, WINDOW *dst,
                rc = OK;
            }
        }
-       _nc_unlock_window(dst);
-       _nc_unlock_window(src);
+       _nc_unlock_global(curses);
     }
     returnCode(rc);
 }