]> ncurses.scripts.mit.edu Git - ncurses.git/blobdiff - test/sp_tinfo.c
ncurses 6.4 - patch 20230902
[ncurses.git] / test / sp_tinfo.c
index 68c88e6ec1a219618890808b17b070417190b113..72b20cfb0c1da7d018101329acab146b6d98457d 100644 (file)
@@ -1,5 +1,5 @@
 /****************************************************************************
- * Copyright 2019-2020,2022 Thomas E. Dickey                                *
+ * Copyright 2019-2022,2023 Thomas E. Dickey                                *
  * Copyright 2017 Free Software Foundation, Inc.                            *
  *                                                                          *
  * Permission is hereby granted, free of charge, to any person obtaining a  *
@@ -28,7 +28,7 @@
  ****************************************************************************/
 
 /*
- * $Id: sp_tinfo.c,v 1.27 2022/12/04 00:40:11 tom Exp $
+ * $Id: sp_tinfo.c,v 1.29 2023/06/24 14:14:56 tom Exp $
  *
  * TOTO: add option for non-sp-funcs interface
  */
@@ -339,14 +339,18 @@ main(int argc, char *argv[])
     do_stuff(my_out);
     do_stuff(my_err);
 
-    cleanup(my_out);
-    cleanup(my_err);
+    if (my_out != my_err) {
+       cleanup(my_out);
+       cleanup(my_err);
+    } else {
+       cleanup(my_out);
+    }
 
     ExitProgram(EXIT_SUCCESS);
 }
 #else
 int
-main(int argc GCC_UNUSED, char *argv[]GCC_UNUSED)
+main(void)
 {
     fprintf(stderr,
            "This program requires the low-level ncurses sp-funcs tputs_sp\n");