]> ncurses.scripts.mit.edu Git - ncurses.git/blobdiff - menu/m_spacing.c
ncurses 6.2 - patch 20201017
[ncurses.git] / menu / m_spacing.c
index 1cfa2e166571c262bc20cba7c17db32c05234604..ff32c86b4795ef9fa2a0dd3a8f24f5fd80a07db8 100644 (file)
@@ -1,5 +1,6 @@
 /****************************************************************************
- * Copyright (c) 1998-2004,2010 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.18 2010/01/23 21:20:10 tom Exp $")
+MODULE_ID("$Id: m_spacing.c,v 1.21 2020/05/24 01:40:20 anonymous.maarten Exp $")
 
 #define MAX_SPC_DESC ((TABSIZE) ? (TABSIZE) : 8)
 #define MAX_SPC_COLS ((TABSIZE) ? (TABSIZE) : 8)
@@ -51,7 +52,7 @@ MODULE_ID("$Id: m_spacing.c,v 1.18 2010/01/23 21:20:10 tom Exp $")
 |
 |   Return Values :  E_OK                 - on success
 +--------------------------------------------------------------------------*/
-NCURSES_EXPORT(int)
+MENU_EXPORT(int)
 set_menu_spacing(MENU * menu, int s_desc, int s_row, int s_col)
 {
   MENU *m;                     /* split for ATAC workaround */
@@ -70,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);
@@ -86,7 +87,7 @@ set_menu_spacing(MENU * menu, int s_desc, int s_row, int s_col)
 |
 |   Return Values :  E_OK             - on success
 +--------------------------------------------------------------------------*/
-NCURSES_EXPORT(int)
+MENU_EXPORT(int)
 menu_spacing(const MENU * menu, int *s_desc, int *s_row, int *s_col)
 {
   const MENU *m;               /* split for ATAC workaround */