]> ncurses.scripts.mit.edu Git - ncurses.git/blobdiff - menu/m_pad.c
ncurses 5.9 - patch 20140524
[ncurses.git] / menu / m_pad.c
index 76083ba36d3468a3554bf007f6ba5022151312ad..0abaf67aee630f12909167f5e3935bf04cdd58a9 100644 (file)
@@ -1,5 +1,5 @@
 /****************************************************************************
- * Copyright (c) 1998-2003,2004 Free Software Foundation, Inc.              *
+ * Copyright (c) 1998-2010,2012 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_pad.c,v 1.10 2004/12/25 21:40:58 tom Exp $")
+MODULE_ID("$Id: m_pad.c,v 1.13 2012/03/10 23:43:41 tom Exp $")
 
 /* Macro to redraw menu if it is posted and changed */
 #define Refresh_Menu(menu) \
    if ( (menu) && ((menu)->status & _POSTED) )\
    {\
       _nc_Draw_Menu( menu );\
-      _nc_Show_Menu( menu );\
+      _nc_Show_Menu( menu ); \
    }
 
 /*---------------------------------------------------------------------------
 |   Facility      :  libnmenu  
-|   Function      :  int set_menu_pad(MENU *menu, int pad)
+|   Function      :  int set_menu_pad(MENUmenu, int pad)
 |   
 |   Description   :  Set the character to be used to separate the item name
 |                    from its description. This must be a printable 
@@ -63,13 +63,13 @@ set_menu_pad(MENU * menu, int pad)
 {
   bool do_refresh = (menu != (MENU *) 0);
 
-  T((T_CALLED("set_menu_pad(%p,%d)"), menu, pad));
+  T((T_CALLED("set_menu_pad(%p,%d)"), (void *)menu, pad));
 
   if (!isprint(UChar(pad)))
     RETURN(E_BAD_ARGUMENT);
 
   Normalize_Menu(menu);
-  menu->pad = pad;
+  menu->pad = (unsigned char)pad;
 
   if (do_refresh)
     Refresh_Menu(menu);
@@ -88,7 +88,7 @@ set_menu_pad(MENU * menu, int pad)
 NCURSES_EXPORT(int)
 menu_pad(const MENU * menu)
 {
-  T((T_CALLED("menu_pad(%p)"), menu));
+  T((T_CALLED("menu_pad(%p)"), (const void *)menu));
   returnCode(Normalize_Menu(menu)->pad);
 }