ncurses 6.2 - patch 20200606
[ncurses.git] / progs / tput.c
index da90dcf07be2b5a564b5e5468583f053d96cedfd..4bb771478d255964d7cd46d743c5224f1649d5ee 100644 (file)
@@ -1,5 +1,6 @@
 /****************************************************************************
- * Copyright (c) 1998-2018,2019 Free Software Foundation, Inc.              *
+ * Copyright 2018-2019,2020 Thomas E. Dickey                                *
+ * Copyright 1998-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            *
@@ -50,7 +51,7 @@
 #include <transform.h>
 #include <tty_settings.h>
 
-MODULE_ID("$Id: tput.c,v 1.80 2019/07/28 18:18:41 tom Exp $")
+MODULE_ID("$Id: tput.c,v 1.83 2020/05/27 23:47:51 tom Exp $")
 
 #define PUTS(s)                fputs(s, stdout)
 
@@ -62,7 +63,7 @@ static bool is_reset = FALSE;
 static bool is_clear = FALSE;
 
 static void
-quit(int status, const char *fmt,...)
+quit(int status, const char *fmt, ...)
 {
     va_list argp;
 
@@ -250,6 +251,19 @@ tput_cmd(int fd, TTY * saved_settings, bool opt_x, int argc, char *argv[])
                s = TPARM_3(s, numbers[1], strings[2], strings[3]);
                break;
            case Numbers:
+#define myParam(n) numbers[n]
+               s = TIPARM_9(s,
+                            myParam(1),
+                            myParam(2),
+                            myParam(3),
+                            myParam(4),
+                            myParam(5),
+                            myParam(6),
+                            myParam(7),
+                            myParam(8),
+                            myParam(9));
+#undef myParam
+               break;
            default:
                (void) _nc_tparm_analyze(s, p_is_s, &ignored);
 #define myParam(n) (p_is_s[n - 1] != 0 ? ((TPARM_ARG) strings[n]) : numbers[n])
@@ -263,6 +277,7 @@ tput_cmd(int fd, TTY * saved_settings, bool opt_x, int argc, char *argv[])
                            myParam(7),
                            myParam(8),
                            myParam(9));
+#undef myParam
                break;
            }
        }