X-Git-Url: http://ncurses.scripts.mit.edu/?p=ncurses.git;a=blobdiff_plain;f=test%2Fdemo_menus.c;h=02f7ca3312fffb7ec5bebb46a20a0b2b9caa8110;hp=6e94b44b3b1ac738803be433369765d5ee30f290;hb=bec710451bd1f286840c4e7e18fc646bd63adeba;hpb=9d37907c2305ee3dc7b829e98a465c3def2074f0 diff --git a/test/demo_menus.c b/test/demo_menus.c index 6e94b44b..02f7ca33 100644 --- a/test/demo_menus.c +++ b/test/demo_menus.c @@ -1,5 +1,6 @@ /**************************************************************************** - * Copyright (c) 2005-2017,2019 Free Software Foundation, Inc. * + * Copyright 2019,2020 Thomas E. Dickey * + * Copyright 2003-2016,2017 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 * @@ -26,7 +27,7 @@ * authorization. * ****************************************************************************/ /* - * $Id: demo_menus.c,v 1.68 2019/08/17 21:45:32 tom Exp $ + * $Id: demo_menus.c,v 1.71 2020/02/02 23:34:34 tom Exp $ * * Demonstrate a variety of functions from the menu library. * Thomas Dickey - 2005/4/9 @@ -139,7 +140,7 @@ wGetchar(WINDOW *win) } else { _nc_tracing = save_trace; } - trace(_nc_tracing); + curses_trace(_nc_tracing); if (_nc_tracing) Trace(("TOGGLE-TRACING ON")); } @@ -586,13 +587,14 @@ static bool update_trace_menu(MENU * m) { ITEM **items; - ITEM *i, **p; + ITEM *i; bool changed = FALSE; items = menu_items(m); i = current_item(m); if (i == items[0]) { if (item_value(i)) { + ITEM **p; for (p = items + 1; *p != 0; p++) if (item_value(*p)) { set_item_value(*p, FALSE); @@ -630,7 +632,7 @@ perform_trace_menu(int cmd) newtrace |= td->mask; } } - trace(newtrace); + curses_trace(newtrace); Trace(("trace level interactively set to %s", tracetrace(_nc_tracing))); MvWPrintw(status, 1, 0, @@ -1015,7 +1017,7 @@ main(int argc, char *argv[]) #endif /* HAVE_RIPOFFLINE */ #ifdef TRACE case 't': - trace((unsigned) strtoul(optarg, 0, 0)); + curses_trace((unsigned) strtoul(optarg, 0, 0)); break; #endif default: