]> ncurses.scripts.mit.edu Git - ncurses.git/blobdiff - test/extended_color.c
ncurses 6.1 - patch 20191214
[ncurses.git] / test / extended_color.c
index 63426e81ea0ec78d2427ccaba397d7caf285bfde..d588284de544555145658286ab5349d2d69c563d 100644 (file)
@@ -1,5 +1,5 @@
 /****************************************************************************
- * Copyright (c) 2017,2018 Free Software Foundation, Inc.                   *
+ * Copyright (c) 2017-2018,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            *
  * authorization.                                                           *
  ****************************************************************************/
 /*
- * $Id: extended_color.c,v 1.11 2018/12/29 21:50:33 tom Exp $
+ * $Id: extended_color.c,v 1.14 2019/08/24 23:09:18 tom Exp $
  */
 
 #include <test.priv.h>
 
-#if HAVE_INIT_EXTENDED_COLOR
+#if USE_EXTENDED_COLOR
 
 #define SHOW(n) ((n) == ERR ? "ERR" : "OK")
 
@@ -209,11 +209,11 @@ main(int argc GCC_UNUSED, char *argv[]GCC_UNUSED)
 
     printw("Drawing soft-key tabs with pair 2\n");
     slk_attrset(A_BOLD);       /* reverse-video is hard to see */
-    i = if_opt_s(extended_slk_color_sp(sp, 2),
-                extended_slk_color(2));
+    (void) if_opt_s(extended_slk_color_sp(sp, 2),
+                   extended_slk_color(2));
     for (i = 1; i <= 8; ++i) {
        char temp[80];
-       sprintf(temp, "(SLK-%d)", i);
+       _nc_SPRINTF(temp, _nc_SLIMIT(sizeof(temp)) "(SLK-%d)", i);
        slk_set(i, temp, 0);
     }
     slk_touch();