]> ncurses.scripts.mit.edu Git - ncurses.git/blobdiff - panel/p_hide.c
ncurses 6.1 - patch 20191123
[ncurses.git] / panel / p_hide.c
index ecc9eed2226f5e078707c9a2bf047565bd19badf..7b780d464e166829869f1b4e330bb6456a42213a 100644 (file)
@@ -1,5 +1,5 @@
 /****************************************************************************
- * Copyright (c) 1998 Free Software Foundation, Inc.                        *
+ * Copyright (c) 1998-2005,2010 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            *
  */
 #include "panel.priv.h"
 
-MODULE_ID("$Id: p_hide.c,v 1.5 1999/11/25 13:49:26 juergen Exp $")
+MODULE_ID("$Id: p_hide.c,v 1.11 2010/01/23 21:22:16 tom Exp $")
 
-int
-hide_panel(register PANEL *pan)
+NCURSES_EXPORT(int)
+hide_panel(register PANEL * pan)
 {
-  int err = OK;
+  int err = ERR;
 
-  if(!pan)
-    return(ERR);
+  T((T_CALLED("hide_panel(%p)"), (void *)pan));
 
-  dBug(("--> hide_panel %s", USER_PTR(pan->user)));
-  dStack("<u%d>",1,pan);
+  if (pan)
+    {
+      GetHook(pan);
 
-  HIDE_PANEL(pan,err,TRUE);
+      dBug(("--> hide_panel %s", USER_PTR(pan->user)));
+      dStack("<u%d>", 1, pan);
 
-  dStack("<u%d>",9,pan);
+      HIDE_PANEL(pan, err, ERR);
 
-  return(err);
+      err = OK;
+
+      dStack("<u%d>", 9, pan);
+    }
+  returnCode(err);
 }