X-Git-Url: https://ncurses.scripts.mit.edu/?p=ncurses.git;a=blobdiff_plain;f=menu%2Fm_item_new.c;h=f218d3ef4ef767c9167c37676d514c10dcfc988e;hp=b2f4646f72821cbfd4b6f1d172d7f993f1ec4931;hb=8b06e371ed1bce3dd6f37138e6becb5e1a562fe0;hpb=3996fe0bf797f113d6abc4329cc869951735a4d8 diff --git a/menu/m_item_new.c b/menu/m_item_new.c index b2f4646f..f218d3ef 100644 --- a/menu/m_item_new.c +++ b/menu/m_item_new.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 1998-2006,2009 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 * @@ -44,7 +44,7 @@ #endif #endif -MODULE_ID("$Id: m_item_new.c,v 1.29 2009/12/12 18:31:28 tom Exp $") +MODULE_ID("$Id: m_item_new.c,v 1.31 2012/02/23 10:02:15 tom Exp $") /*--------------------------------------------------------------------------- | Facility : libnmenu @@ -162,7 +162,7 @@ new_item(const char *name, const char *description) NCURSES_EXPORT(int) free_item(ITEM * item) { - T((T_CALLED("free_item(%p)"), item)); + T((T_CALLED("free_item(%p)"), (void *)item)); if (!item) RETURN(E_BAD_ARGUMENT); @@ -197,7 +197,7 @@ set_menu_mark(MENU * menu, const char *mark) { unsigned l; - T((T_CALLED("set_menu_mark(%p,%s)"), menu, _nc_visbuf(mark))); + T((T_CALLED("set_menu_mark(%p,%s)"), (void *)menu, _nc_visbuf(mark))); if (mark && (*mark != '\0') && Is_Printable_String(mark)) l = strlen(mark); @@ -222,7 +222,6 @@ set_menu_mark(MENU * menu, const char *mark) menu->mark = strdup(mark); if (menu->mark) { - strcpy(menu->mark, mark); if (menu != &_nc_Default_Menu) menu->status |= _MARK_ALLOCATED; } @@ -268,7 +267,7 @@ set_menu_mark(MENU * menu, const char *mark) NCURSES_EXPORT(const char *) menu_mark(const MENU * menu) { - T((T_CALLED("menu_mark(%p)"), menu)); + T((T_CALLED("menu_mark(%p)"), (const void *)menu)); returnPtr(Normalize_Menu(menu)->mark); }