]> ncurses.scripts.mit.edu Git - ncurses.git/blobdiff - menu/m_scale.c
ncurses 6.2 - patch 20210619
[ncurses.git] / menu / m_scale.c
index 04110defa02476ea08841689fc0c3c735b7e3abd..9e7f81d515eee804e4b5a3b800bc22696230934c 100644 (file)
@@ -1,5 +1,6 @@
 /****************************************************************************
- * Copyright (c) 1998,2000 Free Software Foundation, Inc.                   *
+ * Copyright 2020,2021 Thomas E. Dickey                                     *
+ * Copyright 1998-2004,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 "menu.priv.h"
 
-MODULE_ID("$Id: m_scale.c,v 1.7 2003/10/25 14:54:48 tom Exp $")
+MODULE_ID("$Id: m_scale.c,v 1.14 2021/06/17 21:20:30 tom Exp $")
 
 /*---------------------------------------------------------------------------
-|   Facility      :  libnmenu  
+|   Facility      :  libnmenu
 |   Function      :  int scale_menu(const MENU *menu)
-|   
+|
 |   Description   :  Returns the minimum window size necessary for the
-|                    subwindow of menu.  
+|                    subwindow of menu.
 |
 |   Return Values :  E_OK                  - success
 |                    E_BAD_ARGUMENT        - invalid menu pointer
 |                    E_NOT_CONNECTED       - no items are connected to menu
 +--------------------------------------------------------------------------*/
-NCURSES_EXPORT(int)
-scale_menu (const MENU *menu, int *rows, int *cols)
+MENU_EXPORT(int)
+scale_menu(const MENU *menu, int *rows, int *cols)
 {
-  if (!menu) 
-    RETURN( E_BAD_ARGUMENT );
-  
+  T((T_CALLED("scale_menu(%p,%p,%p)"),
+     (const void *)menu,
+     (void *)rows,
+     (void *)cols));
+
+  if (!menu)
+    RETURN(E_BAD_ARGUMENT);
+
   if (menu->items && *(menu->items))
     {
       if (rows)
@@ -65,8 +71,7 @@ scale_menu (const MENU *menu, int *rows, int *cols)
       RETURN(E_OK);
     }
   else
-    RETURN( E_NOT_CONNECTED );
+    RETURN(E_NOT_CONNECTED);
 }
 
 /* m_scale.c ends here */
-