]> ncurses.scripts.mit.edu Git - ncurses.git/blobdiff - test/lrtest.c
ncurses 6.1 - patch 20191207
[ncurses.git] / test / lrtest.c
index e40b0c1f1c9fcabe05916a811c3c14d43a096476..0215c2a4fba8f48736dcf88319e7c5775892daa1 100644 (file)
@@ -1,5 +1,5 @@
 /****************************************************************************
 /****************************************************************************
- * Copyright (c) 1998-2004,2005 Free Software Foundation, Inc.              *
+ * Copyright (c) 1998-2017,2019 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            *
  *                                                                          *
  * Permission is hereby granted, free of charge, to any person obtaining a  *
  * copy of this software and associated documentation files (the            *
@@ -34,7 +34,7 @@
  * This can't be part of the ncurses test-program, because ncurses rips off the
  * bottom line to do labels.
  *
  * This can't be part of the ncurses test-program, because ncurses rips off the
  * bottom line to do labels.
  *
- * $Id: lrtest.c,v 1.21 2005/12/31 16:51:53 tom Exp $
+ * $Id: lrtest.c,v 1.25 2019/12/07 18:07:04 tom Exp $
  */
 
 #include <test.priv.h>
  */
 
 #include <test.priv.h>
@@ -51,7 +51,7 @@ typedef struct {
 static void
 show(MARK *m)
 {
 static void
 show(MARK *m)
 {
-    mvaddch(m->y, m->x, m->value);
+    MvAddCh(m->y, m->x, m->value);
     if (m->mode == 0) {                /* along the x-direction */
        m->x += m->inc;
        if (m->x >= COLS) {
     if (m->mode == 0) {                /* along the x-direction */
        m->x += m->inc;
        if (m->x >= COLS) {
@@ -148,9 +148,9 @@ main(
                nodelay(stdscr, TRUE);
 #ifdef TRACE
            else if (ch == 'T')
                nodelay(stdscr, TRUE);
 #ifdef TRACE
            else if (ch == 'T')
-               trace(0);
+               curses_trace(0);
            else if (ch == 't')
            else if (ch == 't')
-               trace(TRACE_CALLS | TRACE_ICALLS | TRACE_UPDATE);
+               curses_trace(TRACE_CALLS | TRACE_ICALLS | TRACE_UPDATE);
 #endif
 #ifdef KEY_RESIZE
            else if (ch == KEY_RESIZE) {
 #endif
 #ifdef KEY_RESIZE
            else if (ch == KEY_RESIZE) {
@@ -174,8 +174,7 @@ main(
        refresh();
     }
 
        refresh();
     }
 
-    curs_set(1);
-    endwin();
+    exit_curses();
     ExitProgram(EXIT_SUCCESS);
 }
 
     ExitProgram(EXIT_SUCCESS);
 }