X-Git-Url: http://ncurses.scripts.mit.edu/?a=blobdiff_plain;f=menu%2Fm_spacing.c;h=9bb746a0810b284c465e76ea3a2cea3937715362;hb=c0f109a299a82a33c16bd7af942a12ce9aefaaf0;hp=039bbe4d59b17c7d3e4b9352a2a04c195aa5978f;hpb=55ccd2b959766810cf7db8d1c4462f338ce0afc8;p=ncurses.git diff --git a/menu/m_spacing.c b/menu/m_spacing.c index 039bbe4d..9bb746a0 100644 --- a/menu/m_spacing.c +++ b/menu/m_spacing.c @@ -1,5 +1,6 @@ /**************************************************************************** - * Copyright (c) 1998-2003,2004 Free Software Foundation, Inc. * + * Copyright 2020 Thomas E. Dickey * + * Copyright 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 * @@ -37,7 +38,7 @@ #include "menu.priv.h" -MODULE_ID("$Id: m_spacing.c,v 1.17 2004/12/11 23:29:34 tom Exp $") +MODULE_ID("$Id: m_spacing.c,v 1.20 2020/02/02 23:34:34 tom Exp $") #define MAX_SPC_DESC ((TABSIZE) ? (TABSIZE) : 8) #define MAX_SPC_COLS ((TABSIZE) ? (TABSIZE) : 8) @@ -56,7 +57,8 @@ set_menu_spacing(MENU * menu, int s_desc, int s_row, int s_col) { MENU *m; /* split for ATAC workaround */ - T((T_CALLED("set_menu_spacing(%p,%d,%d,%d)"), menu, s_desc, s_row, s_col)); + T((T_CALLED("set_menu_spacing(%p,%d,%d,%d)"), + (void *)menu, s_desc, s_row, s_col)); m = Normalize_Menu(menu); @@ -69,9 +71,9 @@ set_menu_spacing(MENU * menu, int s_desc, int s_row, int s_col) ((s_col < 0) || (s_col > MAX_SPC_COLS))) RETURN(E_BAD_ARGUMENT); - m->spc_desc = s_desc ? s_desc : 1; - m->spc_rows = s_row ? s_row : 1; - m->spc_cols = s_col ? s_col : 1; + m->spc_desc = (short)(s_desc ? s_desc : 1); + m->spc_rows = (short)(s_row ? s_row : 1); + m->spc_cols = (short)(s_col ? s_col : 1); _nc_Calculate_Item_Length_and_Width(m); RETURN(E_OK); @@ -90,7 +92,11 @@ menu_spacing(const MENU * menu, int *s_desc, int *s_row, int *s_col) { const MENU *m; /* split for ATAC workaround */ - T((T_CALLED("menu_spacing(%p,%p,%p,%p)"), menu, s_desc, s_row, s_col)); + T((T_CALLED("menu_spacing(%p,%p,%p,%p)"), + (const void *)menu, + (void *)s_desc, + (void *)s_row, + (void *)s_col)); m = Normalize_Menu(menu);