diff options
author | rafan <rafan@FreeBSD.org> | 2007-01-20 07:32:02 +0000 |
---|---|---|
committer | rafan <rafan@FreeBSD.org> | 2007-01-20 07:32:02 +0000 |
commit | a35ca3ffa07d253f729abfe49e019438658f9333 (patch) | |
tree | 1351fbc560fb430cd5e493287f4950d583f23af3 /contrib/ncurses/menu/m_spacing.c | |
parent | 61ebc4fdc6ffaff63296473b0fef0ff5e17067f7 (diff) | |
parent | de9cbef68d4c3ea6cd003ce086e2d3487600ace7 (diff) | |
download | FreeBSD-src-a35ca3ffa07d253f729abfe49e019438658f9333.zip FreeBSD-src-a35ca3ffa07d253f729abfe49e019438658f9333.tar.gz |
This commit was generated by cvs2svn to compensate for changes in r166124,
which included commits to RCS files with non-trunk default branches.
Diffstat (limited to 'contrib/ncurses/menu/m_spacing.c')
-rw-r--r-- | contrib/ncurses/menu/m_spacing.c | 41 |
1 files changed, 24 insertions, 17 deletions
diff --git a/contrib/ncurses/menu/m_spacing.c b/contrib/ncurses/menu/m_spacing.c index b384ef3..039bbe4 100644 --- a/contrib/ncurses/menu/m_spacing.c +++ b/contrib/ncurses/menu/m_spacing.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 1998,2000 Free Software Foundation, Inc. * + * Copyright (c) 1998-2003,2004 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 * @@ -27,7 +27,7 @@ ****************************************************************************/ /**************************************************************************** - * Author: Juergen Pfeifer <juergen.pfeifer@gmx.net> 1995,1997 * + * Author: Juergen Pfeifer, 1995,1997 * ****************************************************************************/ /*************************************************************************** @@ -37,7 +37,7 @@ #include "menu.priv.h" -MODULE_ID("$Id: m_spacing.c,v 1.12 2000/12/10 02:16:48 tom Exp $") +MODULE_ID("$Id: m_spacing.c,v 1.17 2004/12/11 23:29:34 tom Exp $") #define MAX_SPC_DESC ((TABSIZE) ? (TABSIZE) : 8) #define MAX_SPC_COLS ((TABSIZE) ? (TABSIZE) : 8) @@ -47,15 +47,17 @@ MODULE_ID("$Id: m_spacing.c,v 1.12 2000/12/10 02:16:48 tom Exp $") | Facility : libnmenu | Function : int set_menu_spacing(MENU *menu,int desc, int r, int c); | -| Description : Set the spacing between entried +| Description : Set the spacing between entries | | Return Values : E_OK - on success +--------------------------------------------------------------------------*/ NCURSES_EXPORT(int) -set_menu_spacing -(MENU *menu, int s_desc, int s_row, int s_col ) +set_menu_spacing(MENU * menu, int s_desc, int s_row, int s_col) { - MENU *m; /* split for ATAC workaround */ + MENU *m; /* split for ATAC workaround */ + + T((T_CALLED("set_menu_spacing(%p,%d,%d,%d)"), menu, s_desc, s_row, s_col)); + m = Normalize_Menu(menu); assert(m); @@ -63,19 +65,18 @@ set_menu_spacing RETURN(E_POSTED); if (((s_desc < 0) || (s_desc > MAX_SPC_DESC)) || - ((s_row < 0) || (s_row > MAX_SPC_ROWS)) || - ((s_col < 0) || (s_col > MAX_SPC_COLS))) + ((s_row < 0) || (s_row > MAX_SPC_ROWS)) || + ((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_rows = s_row ? s_row : 1; + m->spc_cols = s_col ? s_col : 1; _nc_Calculate_Item_Length_and_Width(m); RETURN(E_OK); } - /*--------------------------------------------------------------------------- | Facility : libnmenu | Function : int menu_spacing (const MENU *,int *,int *,int *); @@ -85,15 +86,21 @@ set_menu_spacing | Return Values : E_OK - on success +--------------------------------------------------------------------------*/ NCURSES_EXPORT(int) -menu_spacing ( const MENU *menu, int* s_desc, int* s_row, int* s_col) +menu_spacing(const MENU * menu, int *s_desc, int *s_row, int *s_col) { - const MENU *m; /* split for ATAC workaround */ + const MENU *m; /* split for ATAC workaround */ + + T((T_CALLED("menu_spacing(%p,%p,%p,%p)"), menu, s_desc, s_row, s_col)); + m = Normalize_Menu(menu); assert(m); - if (s_desc) *s_desc = m->spc_desc; - if (s_row) *s_row = m->spc_rows; - if (s_col) *s_col = m->spc_cols; + if (s_desc) + *s_desc = m->spc_desc; + if (s_row) + *s_row = m->spc_rows; + if (s_col) + *s_col = m->spc_cols; RETURN(E_OK); } |