]> ncurses.scripts.mit.edu Git - ncurses.git/blobdiff - panel/p_delete.c
ncurses 5.3
[ncurses.git] / panel / p_delete.c
index aabccdc428f15b8700f0b80d257bd18378248fa8..1d4670effc06cbbaf09d29a3967f3424e26506ed 100644 (file)
@@ -1,5 +1,5 @@
 /****************************************************************************
 /****************************************************************************
- * Copyright (c) 1998 Free Software Foundation, Inc.                        *
+ * Copyright (c) 1998,2000 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            *
  */
 #include "panel.priv.h"
 
  */
 #include "panel.priv.h"
 
-MODULE_ID("$Id: p_delete.c,v 1.2 1998/02/11 12:14:01 tom Exp $")
+MODULE_ID("$Id: p_delete.c,v 1.6 2001/02/24 23:46:41 tom Exp $")
 
 
-int
-del_panel(PANEL *pan)
+NCURSES_EXPORT(int)
+del_panel (PANEL *pan)
 {
 {
+  int err = OK;
   if(pan)
     {
       dBug(("--> del_panel %s", USER_PTR(pan->user)));
   if(pan)
     {
       dBug(("--> del_panel %s", USER_PTR(pan->user)));
-      if(_nc_panel_is_linked(pan))
-       (void)hide_panel(pan);
+      HIDE_PANEL(pan,err,OK);
       free((void *)pan);
       free((void *)pan);
-      return(OK);
     }
     }
-  return(ERR);
+  else
+    err = ERR;
+  return(err);
 }
 }