]> ncurses.scripts.mit.edu Git - ncurses.git/blobdiff - menu/m_global.c
ncurses 6.2 - patch 20210313
[ncurses.git] / menu / m_global.c
index 044958c564506038ec52396c623002b573304501..2e5211468a86e80f420f0c8c26f23fc296a3452d 100644 (file)
@@ -38,7 +38,7 @@
 
 #include "menu.priv.h"
 
-MODULE_ID("$Id: m_global.c,v 1.31 2020/05/24 01:40:20 anonymous.maarten Exp $")
+MODULE_ID("$Id: m_global.c,v 1.32 2020/12/12 00:38:02 tom Exp $")
 
 static char mark[] = "-";
 /* *INDENT-OFF* */
@@ -108,7 +108,7 @@ MENU_EXPORT_VAR(ITEM) _nc_Default_Item = {
 |   Return Values :  -
 +--------------------------------------------------------------------------*/
 NCURSES_INLINE static void
-ComputeMaximum_NameDesc_Lengths(MENU * menu)
+ComputeMaximum_NameDesc_Lengths(MENU *menu)
 {
   unsigned MaximumNameLength = 0;
   unsigned MaximumDescriptionLength = 0;
@@ -142,7 +142,7 @@ ComputeMaximum_NameDesc_Lengths(MENU * menu)
 |   Return Values :  -
 +--------------------------------------------------------------------------*/
 NCURSES_INLINE static void
-ResetConnectionInfo(MENU * menu, ITEM ** items)
+ResetConnectionInfo(MENU *menu, ITEM **items)
 {
   ITEM **item;
 
@@ -150,13 +150,13 @@ ResetConnectionInfo(MENU * menu, ITEM ** items)
   for (item = items; *item; item++)
     {
       (*item)->index = 0;
-      (*item)->imenu = (MENU *) 0;
+      (*item)->imenu = (MENU *)0;
     }
   if (menu->pattern)
     free(menu->pattern);
   menu->pattern = (char *)0;
   menu->pindex = 0;
-  menu->items = (ITEM **) 0;
+  menu->items = (ITEM **)0;
   menu->nitems = 0;
 }
 
@@ -172,7 +172,7 @@ ResetConnectionInfo(MENU * menu, ITEM ** items)
 |                    FALSE      - connection failed
 +--------------------------------------------------------------------------*/
 MENU_EXPORT(bool)
-_nc_Connect_Items(MENU * menu, ITEM ** items)
+_nc_Connect_Items(MENU *menu, ITEM **items)
 {
   ITEM **item;
   unsigned int ItemCount = 0;
@@ -234,7 +234,7 @@ _nc_Connect_Items(MENU * menu, ITEM ** items)
 |   Return Values :  -
 +--------------------------------------------------------------------------*/
 MENU_EXPORT(void)
-_nc_Disconnect_Items(MENU * menu)
+_nc_Disconnect_Items(MENU *menu)
 {
   if (menu && menu->items)
     ResetConnectionInfo(menu, menu->items);
@@ -249,7 +249,7 @@ _nc_Disconnect_Items(MENU * menu)
 |   Return Values :  the width
 +--------------------------------------------------------------------------*/
 MENU_EXPORT(int)
-_nc_Calculate_Text_Width(const TEXT * item /*FIXME: limit length */ )
+_nc_Calculate_Text_Width(const TEXT *item /*FIXME: limit length */ )
 {
 #if USE_WIDEC_SUPPORT
   int result = item->length;
@@ -289,7 +289,7 @@ _nc_Calculate_Text_Width(const TEXT * item /*FIXME: limit length */ )
  */
 #if USE_WIDEC_SUPPORT
 static int
-calculate_actual_width(MENU * menu, bool name)
+calculate_actual_width(MENU *menu, bool name)
 {
   int width = 0;
   int check = 0;
@@ -338,7 +338,7 @@ calculate_actual_width(MENU * menu, bool name)
 |   Return Values :  -
 +--------------------------------------------------------------------------*/
 MENU_EXPORT(void)
-_nc_Calculate_Item_Length_and_Width(MENU * menu)
+_nc_Calculate_Item_Length_and_Width(MENU *menu)
 {
   int l;
 
@@ -377,7 +377,7 @@ _nc_Calculate_Item_Length_and_Width(MENU * menu)
 |   Return Values :  -
 +--------------------------------------------------------------------------*/
 MENU_EXPORT(void)
-_nc_Link_Items(MENU * menu)
+_nc_Link_Items(MENU *menu)
 {
   if (menu && menu->items && *(menu->items))
     {
@@ -408,14 +408,14 @@ _nc_Link_Items(MENU * menu)
                (cycle ? menu->items[(Last_in_Row >= Number_Of_Items) ?
                                     Number_Of_Items - 1 :
                                     Last_in_Row] :
-                (ITEM *) 0);
+                (ITEM *)0);
 
              item->right = ((col < (Number_Of_Columns - 1)) &&
                             ((i + 1) < Number_Of_Items)
                )?
                menu->items[i + 1] :
                (cycle ? menu->items[row * Number_Of_Columns] :
-                (ITEM *) 0
+                (ITEM *)0
                );
 
              Last_in_Column = (menu->rows - 1) * Number_Of_Columns + col;
@@ -424,14 +424,14 @@ _nc_Link_Items(MENU * menu)
                (cycle ? menu->items[(Last_in_Column >= Number_Of_Items) ?
                                     Number_Of_Items - 1 :
                                     Last_in_Column] :
-                (ITEM *) 0);
+                (ITEM *)0);
 
              item->down = ((i + Number_Of_Columns) < Number_Of_Items)
                ?
                menu->items[i + Number_Of_Columns] :
                (cycle ? menu->items[(row + 1) < menu->rows ?
                                     Number_Of_Items - 1 : col] :
-                (ITEM *) 0);
+                (ITEM *)0);
              item->x = (short)col;
              item->y = (short)row;
              if (++col == Number_Of_Columns)
@@ -456,12 +456,12 @@ _nc_Link_Items(MENU * menu)
                (cycle ? (Last_in_Column >= Number_Of_Items) ?
                 menu->items[Last_in_Column - Number_Of_Rows] :
                 menu->items[Last_in_Column] :
-                (ITEM *) 0);
+                (ITEM *)0);
 
              item->right = ((i + Number_Of_Rows) < Number_Of_Items)
                ?
                menu->items[i + Number_Of_Rows] :
-               (cycle ? menu->items[row] : (ITEM *) 0);
+               (cycle ? menu->items[row] : (ITEM *)0);
 
              Last_in_Row = col * Number_Of_Rows + (Number_Of_Rows - 1);
 
@@ -471,7 +471,7 @@ _nc_Link_Items(MENU * menu)
                 menu->items[(Last_in_Row >= Number_Of_Items) ?
                             Number_Of_Items - 1 :
                             Last_in_Row] :
-                (ITEM *) 0);
+                (ITEM *)0);
 
              item->down = (row < (Number_Of_Rows - 1))
                ?
@@ -480,7 +480,7 @@ _nc_Link_Items(MENU * menu)
                             (col - 1) * Number_Of_Rows + row + 1]) :
                (cycle ?
                 menu->items[col * Number_Of_Rows] :
-                (ITEM *) 0
+                (ITEM *)0
                );
 
              item->x = (short)col;
@@ -504,7 +504,7 @@ _nc_Link_Items(MENU * menu)
 |   Return Values :  -
 +--------------------------------------------------------------------------*/
 MENU_EXPORT(void)
-_nc_Show_Menu(const MENU * menu)
+_nc_Show_Menu(const MENU *menu)
 {
   WINDOW *win;
   int maxy, maxx;
@@ -545,9 +545,9 @@ _nc_Show_Menu(const MENU * menu)
 +--------------------------------------------------------------------------*/
 MENU_EXPORT(void)
 _nc_New_TopRow_and_CurrentItem(
-                               MENU * menu,
+                               MENU *menu,
                                int new_toprow,
-                               ITEM * new_current_item)
+                               ITEM *new_current_item)
 {
   ITEM *cur_item;
   bool mterm_called = FALSE;