summaryrefslogblamecommitdiff
path: root/system/ncurses/ncurses-6.3-20211219.patch
blob: d4ffd19e2ba375ec534b51e816d683c6e23c069b (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784















































































































































































































































































































































































































































































































































































































































































































































































































                                                                                                                                               
# ncurses 6.3 - patch 20211219 - Thomas E. Dickey
#
# ------------------------------------------------------------------------------
#
# Ncurses 6.3 is at
# 	ftp://ftp.invisible-island.net/ncurses/
#	https://invisible-mirror.net/archives/ncurses/
#	https://ftp.gnu.org/gnu/ncurses/
#
# Patches for ncurses 6.3 can be found at
# 	ftp://ftp.invisible-island.net/ncurses/6.3
#	https://invisible-mirror.net/archives/ncurses/6.3
#
# ------------------------------------------------------------------------------
# ftp://ftp.invisible-island.net/ncurses/6.3/ncurses-6.3-20211219.patch.gz
# patch by Thomas E. Dickey <dickey@invisible-island.net>
# created  Mon Dec 20 00:46:47 UTC 2021
# ------------------------------------------------------------------------------
# NEWS                               |    7 +-
# VERSION                            |    2 
# dist.mk                            |    4 -
# package/debian-mingw/changelog     |    4 -
# package/debian-mingw64/changelog   |    4 -
# package/debian/changelog           |    4 -
# package/mingw-ncurses.nsi          |    4 -
# package/mingw-ncurses.spec         |    2 
# package/ncurses.spec               |    2 
# package/ncursest.spec              |    2 
# test/Makefile.in                   |   13 ++-
# test/combine.c                     |  117 ++++++++++++++++++++++++++++++++---
# test/mk-test.awk                   |   40 +++++++++--
# test/movewindow.c                  |   12 ---
# test/package/debian/rules          |   15 ++--
# test/package/ncurses-examples.spec |   27 ++++----
# test/popup_msg.c                   |    6 -
# test/programs                      |    4 -
# test/test.priv.h                   |   10 ++
# 19 files changed, 207 insertions(+), 72 deletions(-)
# ------------------------------------------------------------------------------
Index: NEWS
Prereq:  1.3755 
--- ncurses-6.3-20211211+/NEWS	2021-12-11 21:46:44.000000000 +0000
+++ ncurses-6.3-20211219/NEWS	2021-12-19 11:24:57.000000000 +0000
@@ -26,7 +26,7 @@
 -- sale, use or other dealings in this Software without prior written        --
 -- authorization.                                                            --
 -------------------------------------------------------------------------------
--- $Id: NEWS,v 1.3755 2021/12/11 21:46:44 tom Exp $
+-- $Id: NEWS,v 1.3759 2021/12/19 11:24:57 tom Exp $
 -------------------------------------------------------------------------------
 
 This is a log of changes that ncurses has gone through since Zeyd started
@@ -46,6 +46,11 @@
 Changes through 1.9.9e did not credit all contributions;
 it is not possible to add this information.
 
+20211219
+	+ install ncurses-examples programs in libexecdir, adding a wrapper
+	  script to invoke those.
+	+ add help-screen and screen-dump to test/combine.c
+
 20211211
 	+ add test/combine.c, to demo/test combining characters.
 
Index: VERSION
--- ncurses-6.3-20211211+/VERSION	2021-12-11 13:00:34.000000000 +0000
+++ ncurses-6.3-20211219/VERSION	2021-12-19 11:24:57.000000000 +0000
@@ -1 +1 @@
-5:0:10	6.3	20211211
+5:0:10	6.3	20211219
Index: dist.mk
Prereq:  1.1454 
--- ncurses-6.3-20211211+/dist.mk	2021-12-11 13:00:34.000000000 +0000
+++ ncurses-6.3-20211219/dist.mk	2021-12-19 11:24:57.000000000 +0000
@@ -26,7 +26,7 @@
 # use or other dealings in this Software without prior written               #
 # authorization.                                                             #
 ##############################################################################
-# $Id: dist.mk,v 1.1454 2021/12/11 13:00:34 tom Exp $
+# $Id: dist.mk,v 1.1456 2021/12/19 11:24:57 tom Exp $
 # Makefile for creating ncurses distributions.
 #
 # This only needs to be used directly as a makefile by developers, but
@@ -38,7 +38,7 @@
 # These define the major/minor/patch versions of ncurses.
 NCURSES_MAJOR = 6
 NCURSES_MINOR = 3
-NCURSES_PATCH = 20211211
+NCURSES_PATCH = 20211219
 
 # We don't append the patch to the version, since this only applies to releases
 VERSION = $(NCURSES_MAJOR).$(NCURSES_MINOR)
Index: package/debian-mingw/changelog
--- ncurses-6.3-20211211+/package/debian-mingw/changelog	2021-12-11 13:00:34.000000000 +0000
+++ ncurses-6.3-20211219/package/debian-mingw/changelog	2021-12-19 11:24:57.000000000 +0000
@@ -1,8 +1,8 @@
-ncurses6 (6.3+20211211) unstable; urgency=low
+ncurses6 (6.3+20211219) unstable; urgency=low
 
   * latest weekly patch
 
- -- Thomas E. Dickey <dickey@invisible-island.net>  Sat, 11 Dec 2021 08:00:34 -0500
+ -- Thomas E. Dickey <dickey@invisible-island.net>  Sun, 19 Dec 2021 06:24:57 -0500
 
 ncurses6 (5.9-20131005) unstable; urgency=low
 
Index: package/debian-mingw64/changelog
--- ncurses-6.3-20211211+/package/debian-mingw64/changelog	2021-12-11 13:00:34.000000000 +0000
+++ ncurses-6.3-20211219/package/debian-mingw64/changelog	2021-12-19 11:24:57.000000000 +0000
@@ -1,8 +1,8 @@
-ncurses6 (6.3+20211211) unstable; urgency=low
+ncurses6 (6.3+20211219) unstable; urgency=low
 
   * latest weekly patch
 
- -- Thomas E. Dickey <dickey@invisible-island.net>  Sat, 11 Dec 2021 08:00:34 -0500
+ -- Thomas E. Dickey <dickey@invisible-island.net>  Sun, 19 Dec 2021 06:24:57 -0500
 
 ncurses6 (5.9-20131005) unstable; urgency=low
 
Index: package/debian/changelog
--- ncurses-6.3-20211211+/package/debian/changelog	2021-12-11 13:00:34.000000000 +0000
+++ ncurses-6.3-20211219/package/debian/changelog	2021-12-19 11:24:57.000000000 +0000
@@ -1,8 +1,8 @@
-ncurses6 (6.3+20211211) unstable; urgency=low
+ncurses6 (6.3+20211219) unstable; urgency=low
 
   * latest weekly patch
 
- -- Thomas E. Dickey <dickey@invisible-island.net>  Sat, 11 Dec 2021 08:00:34 -0500
+ -- Thomas E. Dickey <dickey@invisible-island.net>  Sun, 19 Dec 2021 06:24:57 -0500
 
 ncurses6 (5.9-20120608) unstable; urgency=low
 
Index: package/mingw-ncurses.nsi
Prereq:  1.496 
--- ncurses-6.3-20211211+/package/mingw-ncurses.nsi	2021-12-11 13:00:34.000000000 +0000
+++ ncurses-6.3-20211219/package/mingw-ncurses.nsi	2021-12-19 11:24:57.000000000 +0000
@@ -1,4 +1,4 @@
-; $Id: mingw-ncurses.nsi,v 1.496 2021/12/11 13:00:34 tom Exp $
+; $Id: mingw-ncurses.nsi,v 1.498 2021/12/19 11:24:57 tom Exp $
 
 ; TODO add examples
 ; TODO bump ABI to 6
@@ -10,7 +10,7 @@
 !define VERSION_MAJOR "6"
 !define VERSION_MINOR "3"
 !define VERSION_YYYY  "2021"
-!define VERSION_MMDD  "1211"
+!define VERSION_MMDD  "1219"
 !define VERSION_PATCH ${VERSION_YYYY}${VERSION_MMDD}
 
 !define MY_ABI   "5"
Index: package/mingw-ncurses.spec
--- ncurses-6.3-20211211+/package/mingw-ncurses.spec	2021-12-11 13:00:34.000000000 +0000
+++ ncurses-6.3-20211219/package/mingw-ncurses.spec	2021-12-19 11:24:57.000000000 +0000
@@ -3,7 +3,7 @@
 Summary: shared libraries for terminal handling
 Name: mingw32-ncurses6
 Version: 6.3
-Release: 20211211
+Release: 20211219
 License: X11
 Group: Development/Libraries
 Source: ncurses-%{version}-%{release}.tgz
Index: package/ncurses.spec
--- ncurses-6.3-20211211+/package/ncurses.spec	2021-12-11 13:00:34.000000000 +0000
+++ ncurses-6.3-20211219/package/ncurses.spec	2021-12-19 11:24:57.000000000 +0000
@@ -1,7 +1,7 @@
 Summary: shared libraries for terminal handling
 Name: ncurses6
 Version: 6.3
-Release: 20211211
+Release: 20211219
 License: X11
 Group: Development/Libraries
 Source: ncurses-%{version}-%{release}.tgz
Index: package/ncursest.spec
--- ncurses-6.3-20211211+/package/ncursest.spec	2021-12-11 13:00:34.000000000 +0000
+++ ncurses-6.3-20211219/package/ncursest.spec	2021-12-19 11:24:57.000000000 +0000
@@ -1,7 +1,7 @@
 Summary: Curses library with POSIX thread support.
 Name: ncursest6
 Version: 6.3
-Release: 20211211
+Release: 20211219
 License: X11
 Group: Development/Libraries
 Source: ncurses-%{version}-%{release}.tgz
Index: test/Makefile.in
Prereq:  1.129 
--- ncurses-6.3-20211211+/test/Makefile.in	2021-07-03 15:45:33.000000000 +0000
+++ ncurses-6.3-20211219/test/Makefile.in	2021-12-18 23:00:28.000000000 +0000
@@ -1,4 +1,4 @@
-# $Id: Makefile.in,v 1.129 2021/07/03 15:45:33 tom Exp $
+# $Id: Makefile.in,v 1.130 2021/12/18 23:00:28 tom Exp $
 ##############################################################################
 # Copyright 2020,2021 Thomas E. Dickey                                       #
 # Copyright 1998-2017,2018 Free Software Foundation, Inc.                    #
@@ -44,6 +44,8 @@
 x		= @EXEEXT@
 o		= .@OBJEXT@
 
+PACKAGE		= @PACKAGE@
+
 MODEL		= ../@DFT_OBJ_SUBDIR@
 top_srcdir	= @top_srcdir@
 srcdir		= @srcdir@
@@ -52,18 +54,19 @@
 datarootdir	= @datarootdir@
 
 bindir		= @bindir@
+libexecdir	= @libexecdir@
 libdir		= @libdir@
-includedir	= @includedir@
-includesubdir	= @includesubdir@
 datarootdir	= @datarootdir@
 datadir		= @datadir@
 
+real_bindir	= $(libexecdir)/$(PACKAGE)
+
 BINDIR		= $(DESTDIR)$(bindir)
+LIBEXECDIR	= $(DESTDIR)$(libexecdir)
 LIBDIR		= $(DESTDIR)$(libdir)
-INCLUDEDIR	= $(DESTDIR)$(includedir)$(includesubdir)
 DATADIR		= $(DESTDIR)$(datadir)
 
-PACKAGE		= @PACKAGE@
+REAL_BINDIR	= $(LIBEXECDIR)/$(PACKAGE)
 
 LIBTOOL		= @LIBTOOL@
 LIBTOOL_OPTS	= @LIBTOOL_OPTS@
Index: test/combine.c
Prereq:  1.7 
--- ncurses-6.3-20211211+/test/combine.c	2021-12-12 01:10:28.000000000 +0000
+++ ncurses-6.3-20211219/test/combine.c	2021-12-18 21:04:00.000000000 +0000
@@ -26,13 +26,16 @@
  * authorization.                                                           *
  ****************************************************************************/
 /*
- * $Id: combine.c,v 1.7 2021/12/12 01:10:28 tom Exp $
+ * $Id: combine.c,v 1.17 2021/12/18 21:04:00 tom Exp $
  */
 
 #include <test.priv.h>
 
 #if USE_WIDEC_SUPPORT
 
+#include <dump_window.h>
+#include <popup_msg.h>
+
 static int c_opt;
 static int r_opt;
 
@@ -45,6 +48,15 @@
     return value;
 }
 
+static int
+prev_char(int value)
+{
+    do {
+	--value;
+    } while (!iswprint((wint_t) value));
+    return value;
+}
+
 static void
 do_row(int row, int base_ch, int over_ch)
 {
@@ -62,18 +74,18 @@
 
 	    source[1] = 0;
 
-	    source[0] = base_ch;
+	    source[0] = (wchar_t) base_ch;
 	    setcchar(&target, source, attr, 0, NULL);
 	    add_wch(&target);
 
-	    source[0] = over_ch;
+	    source[0] = (wchar_t) over_ch;
 	    setcchar(&target, source, attr, 0, NULL);
 	    add_wch(&target);
 	} else {
 	    wchar_t data[3];
 
-	    data[0] = base_ch;
-	    data[1] = over_ch;
+	    data[0] = (wchar_t) base_ch;
+	    data[1] = (wchar_t) over_ch;
 	    data[2] = 0;
 	    if (reverse)
 		attr_on(A_REVERSE, NULL);
@@ -106,17 +118,68 @@
 }
 
 static void
-do_all(int over_it)
+do_all(int left_at, int over_it)
 {
     int row;
 
     for (row = 0; row < LINES; ++row) {
-	do_row(row, ' ', 0x300 + over_it);
+	do_row(row, left_at, 0x300 + over_it);
 	over_it = next_over(over_it);
     }
 }
 
 static void
+show_help(WINDOW *current)
+{
+    /* *INDENT-OFF* */
+    static struct {
+	int	key;
+	CONST_FMT char * msg;
+    } help[] = {
+	{ HELP_KEY_1,	"Show this screen" },
+	{ CTRL('L'),	"Repaint screen" },
+	{ '$',		"Scroll to end of combining-character range" },
+	{ '+',		"Scroll to next combining-character in range" },
+	{ KEY_DOWN,	"(same as \"+\")" },
+	{ '-',		"Scroll to previous combining-character in range" },
+	{ KEY_UP,	"(same as \"-\")" },
+	{ '0',		"Scroll to beginning of combining-character range" },
+	{ 'c',		"Toggle command-line option \"-c\"" },
+	{ 'd',		"Dump screen using scr_dump unless \"-l\" option used" },
+	{ 'h',		"Scroll test-data left one column" },
+	{ 'j',		"Scroll test-data down one row" },
+	{ 'k',		"Scroll test-data up one row" },
+	{ 'l',		"Scroll test-data right one column" },
+	{ 'q',		"Quit" },
+	{ ESCAPE,	"(same as \"q\")" },
+	{ QUIT,		"(same as \"q\")" },
+	{ 'r',		"Toggle command-line option \"-r\"" },
+    };
+    /* *INDENT-ON* */
+
+    char **msgs = typeCalloc(char *, SIZEOF(help) + 3);
+    size_t s;
+    int d = 0;
+
+    msgs[d++] = strdup("Test diacritic combining-characters range "
+		       "U+0300..U+036F");
+    msgs[d++] = strdup("");
+    for (s = 0; s < SIZEOF(help); ++s) {
+	char *name = strdup(keyname(help[s].key));
+	size_t need = (11 + strlen(name) + strlen(help[s].msg));
+	msgs[d] = typeMalloc(char, need);
+	_nc_SPRINTF(msgs[d], _nc_SLIMIT(need) "%-10s%s", name, help[s].msg);
+	free(name);
+	++d;
+    }
+    popup_msg2(current, msgs);
+    for (s = 0; msgs[s] != 0; ++s) {
+	free(msgs[s]);
+    }
+    free(msgs);
+}
+
+static void
 usage(void)
 {
     static const char *msg[] =
@@ -127,6 +190,7 @@
 	"",
 	"Options:",
 	" -c       use cchar_t data rather than wchar_t string",
+	" -l FILE  log window-dumps to this file",
 	" -r       draw even-numbered rows in reverse-video",
     };
     unsigned n;
@@ -140,14 +204,22 @@
 main(int argc GCC_UNUSED, char *argv[]GCC_UNUSED)
 {
     int n;
+    int left_at = ' ';
     int over_it = 0;
     bool done = FALSE;
+    bool log_option = FALSE;
+    const char *dump_log = "combine.log";
 
-    while ((n = getopt(argc, argv, "cr")) != -1) {
+    while ((n = getopt(argc, argv, "cl:r")) != -1) {
 	switch (n) {
 	case 'c':
 	    c_opt = TRUE;
 	    break;
+	case 'l':
+	    log_option = TRUE;
+	    if (!open_dump(optarg))
+		usage();
+	    break;
 	case 'r':
 	    r_opt = TRUE;
 	    break;
@@ -164,13 +236,38 @@
     keypad(stdscr, TRUE);
 
     do {
-	do_all(over_it);
+	do_all(left_at, over_it);
 	switch (getch()) {
+	case HELP_KEY_1:
+	    show_help(stdscr);
+	    break;
 	case 'q':
 	case QUIT:
 	case ESCAPE:
 	    done = TRUE;
 	    break;
+	case CTRL('L'):
+	    redrawwin(stdscr);
+	    break;
+	case 'd':
+	    if (log_option)
+		dump_window(stdscr);
+	    else
+		scr_dump(dump_log);
+	    break;
+	case 'h':
+	    if (left_at > ' ')
+		left_at = prev_char(left_at);
+	    break;
+	case 'l':
+	    left_at = next_char(left_at);
+	    break;
+	case 'c':
+	    c_opt = !c_opt;
+	    break;
+	case 'r':
+	    r_opt = !r_opt;
+	    break;
 	case KEY_HOME:
 	case '0':
 	    over_it = 0;
@@ -180,10 +277,12 @@
 	    over_it = LAST_OVER;
 	    break;
 	case KEY_UP:
+	case 'k':
 	case '-':
 	    over_it = prev_over(over_it);
 	    break;
 	case KEY_DOWN:
+	case 'j':
 	case '+':
 	    over_it = next_over(over_it);
 	    break;
Index: test/mk-test.awk
Prereq:  1.25 
--- ncurses-6.3-20211211+/test/mk-test.awk	2021-04-24 23:10:40.000000000 +0000
+++ ncurses-6.3-20211219/test/mk-test.awk	2021-12-19 16:54:36.000000000 +0000
@@ -1,4 +1,4 @@
-# $Id: mk-test.awk,v 1.25 2021/04/24 23:10:40 tom Exp $
+# $Id: mk-test.awk,v 1.30 2021/12/19 16:54:36 tom Exp $
 ##############################################################################
 # Copyright 2019-2020,2021 Thomas E. Dickey                                  #
 # Copyright 2006-2017,2018 Free Software Foundation, Inc.                    #
@@ -93,19 +93,38 @@
 	print	""
 	if (INSTALL == "yes") {
 		print	"# we might install the test-programs"
+		print	"$(PACKAGE) :"
+		print	"	@echo \"creating $(PACKAGE) script\""
+		print	"	@$(SHELL) -c '\\"
+		print	"	L=$(real_bindir);                            \\"
+		print	"	rm -f $@;                                    \\"
+		print	"	echo \"#!$(SHELL)\" >                     $@;\\"
+		print	"	echo \"PATH=\\\"$$L\\\":\\$$PATH\"      >>$@;\\"
+		print	"	echo \"export PATH\"                    >>$@;\\"
+		print	"	echo \"if test \\$$# != 0; then\"       >>$@;\\"
+		print	"	echo \"  exec \\\"\\$$@\\\"\"           >>$@;\\"
+		print	"	echo \"elif test -t 1; then\"           >>$@;\\"
+		print	"	echo \"  cd \\\"$$L\\\" || exit\"       >>$@;\\"
+		print	"	echo \"  ls -l | \\$${PAGER:-less}\"    >>$@;\\"
+		print	"	echo \"fi\"                             >>$@;\\"
+		print	"	echo \"echo \\\"usage: $@ [program]\\\"\" >>$@'"
+		print	""
 		print	"install \\"
-		print	"install.test: $(BINDIR) $(DATADIR) $(TESTS)"
+		print	"install.test: $(PACKAGE) $(BINDIR) $(REAL_BINDIR) $(DATADIR) $(TESTS)"
+
+		print	"	@echo \"installing $(PACKAGE) -> $(BINDIR)/\""
+		print	"	@$(INSTALL_SCRIPT) $(PACKAGE) $(BINDIR)"
 
 		print	"	@$(SHELL) -c 'for src in $(TESTS); do \\"
 		print	"	dst=`echo $$src | $(TRANSFORM)`; \\"
-		print	"	echo \"installing $$src -> $(BINDIR)/$$dst\"; \\"
-		print	"	$(INSTALL_PROG) $$src $(BINDIR)/$$dst; \\"
+		print	"	echo \"installing $$src -> $(REAL_BINDIR)/$$dst\"; \\"
+		print	"	$(INSTALL_PROG) $$src $(REAL_BINDIR)/$$dst; \\"
 		print	"	done'"
 
 		print	"	@$(SHELL) -c 'for src in $(SCRIPTS); do \\"
 		print	"	dst=`echo $$src | sed -e 's,^.*/,,' | $(TRANSFORM)`; \\"
-		print	"	echo \"installing $$src -> $(BINDIR)/$$dst\"; \\"
-		print	"	$(INSTALL_SCRIPT) $$src $(BINDIR)/$$dst; \\"
+		print	"	echo \"installing $$src -> $(REAL_BINDIR)/$$dst\"; \\"
+		print	"	$(INSTALL_SCRIPT) $$src $(REAL_BINDIR)/$$dst; \\"
 		print	"	done'"
 
 		print	"	@$(SHELL) -c 'for src in $(DATAFILES); do \\"
@@ -117,14 +136,16 @@
 		print	"uninstall \\"
 		print	"uninstall.test:"
 
+		print	"	-rm -f $(BINDIR)/$(PACKAGE)"
+
 		print	"	@$(SHELL) -c 'for src in $(TESTS); do \\"
 		print	"	dst=`echo $$src | $(TRANSFORM)`; \\"
-		print	"	rm -f $(BINDIR)/$$dst; \\"
+		print	"	rm -f $(REAL_BINDIR)/$$dst; \\"
 		print	"	done'"
 
 		print	"	@$(SHELL) -c 'for src in $(SCRIPTS); do \\"
 		print	"	dst=`echo $$src | sed -e 's,^.*/,,' | $(TRANSFORM)`; \\"
-		print	"	rm -f $(BINDIR)/$$dst; \\"
+		print	"	rm -f $(REAL_BINDIR)/$$dst; \\"
 		print	"	done'"
 
 		print	"	@$(SHELL) -c 'for src in $(DATAFILES); do \\"
@@ -144,6 +165,7 @@
 	print	"clean :: mostlyclean"
 	print	"	-$(SHELL) -c \"if test -n '$x' ; then $(MAKE) clean x=''; fi\""
 	print	"	-rm -rf *$o screendump *.lis $(TESTS) .libs *.dSYM"
+	print	"	-rm -f $(PACKAGE)"
 	print	""
 	print	"distclean :: clean"
 	print	"	-rm -f Makefile ncurses_cfg.h config.status config.log"
@@ -152,7 +174,7 @@
 	print	""
 	print	"lint:"
 	print	"	$(SHELL) -c 'for N in $(TESTS); do echo LINT:$$N; $(LINT) $(LINT_OPTS) $(CPPFLAGS) $(srcdir)/$$N.c $(LINT_LIBS); done'"
-	print	"$(BINDIR) $(DATADIR) :"
+	print	"$(BINDIR) $(REAL_BINDIR) $(DATADIR) :"
 	print	"	mkdir -p $@"
 
 
Index: test/movewindow.c
Prereq:  1.51 
--- ncurses-6.3-20211211+/test/movewindow.c	2020-02-02 23:34:34.000000000 +0000
+++ ncurses-6.3-20211219/test/movewindow.c	2021-12-18 18:57:55.000000000 +0000
@@ -1,5 +1,5 @@
 /****************************************************************************
- * Copyright 2018-2019,2020 Thomas E. Dickey                                *
+ * Copyright 2018-2020,2021 Thomas E. Dickey                                *
  * Copyright 2006-2013,2017 Free Software Foundation, Inc.                  *
  *                                                                          *
  * Permission is hereby granted, free of charge, to any person obtaining a  *
@@ -27,7 +27,7 @@
  * authorization.                                                           *
  ****************************************************************************/
 /*
- * $Id: movewindow.c,v 1.51 2020/02/02 23:34:34 tom Exp $
+ * $Id: movewindow.c,v 1.52 2021/12/18 18:57:55 tom Exp $
  *
  * Demonstrate move functions for windows and derived windows from the curses
  * library.
@@ -55,14 +55,6 @@
 #undef derwin
 #endif
 
-#if defined(NCURSES_CONST)
-#define CONST_FMT NCURSES_CONST
-#elif defined(PDCURSES)
-#define CONST_FMT const
-#else
-#define CONST_FMT		/* nothing */
-#endif
-
 #undef LINE_MAX
 
 #define LINE_MIN	2
Index: test/package/debian/rules
--- ncurses-6.3-20211211+/test/package/debian/rules	2017-08-11 14:52:01.000000000 +0000
+++ ncurses-6.3-20211219/test/package/debian/rules	2021-12-19 00:23:00.000000000 +0000
@@ -74,8 +74,7 @@
 	mkdir -p t/ncurses6
 
 	cd t/ncurses6; $(configure) \
-		--bindir=\$${prefix}/bin/$(NCURSES_PKG) \
-		--datadir=\$${prefix}/share/$(NCURSES_PKG) \
+		--datadir=\$${datarootdir}/$(NCURSES_PKG) \
 		--with-screen=ncursesw6
 
 	touch $@
@@ -87,8 +86,7 @@
 	mkdir -p t/ncursest6
 
 	cd t/ncursest6; $(configure) \
-		--bindir=\$${prefix}/bin/$(NCURSEST_PKG) \
-		--datadir=\$${prefix}/share/$(NCURSEST_PKG) \
+		--datadir=\$${datarootdir}/$(NCURSEST_PKG) \
 		--with-screen=ncursestw6
 
 	touch $@
@@ -113,7 +111,9 @@
 	dh_installdirs $(verbose)
 	dh_prep        $(verbose) -p$(NCURSES_PKG)
 
-	$(MAKE) -C t/ncurses6 install DESTDIR=$(CURDIR)/debian/$(NCURSES_PKG)
+	$(MAKE) -C t/ncurses6 install \
+		PACKAGE=$(NCURSES_PKG) \
+		DESTDIR=$(CURDIR)/debian/$(NCURSES_PKG)
 
 	touch $@
 
@@ -123,7 +123,9 @@
 	dh_installdirs $(verbose)
 	dh_prep        $(verbose) -p$(NCURSEST_PKG)
 
-	$(MAKE) -C t/ncursest6 install DESTDIR=$(CURDIR)/debian/$(NCURSEST_PKG)
+	$(MAKE) -C t/ncursest6 install \
+		PACKAGE=$(NCURSEST_PKG) \
+		DESTDIR=$(CURDIR)/debian/$(NCURSEST_PKG)
 
 	touch $@
 
@@ -151,6 +153,7 @@
 	rm -f $(PACKAGES.arch:%=install-%-stamp)
 	dh_testdir
 	dh_testroot
+	dh_installdocs       $(verbose) $(PACKAGES.arch:%=-p%)
 	dh_installchangelogs $(verbose) $(PACKAGES.arch:%=-p%)  NEWS
 	dh_strip             $(verbose) $(PACKAGES.arch:%=-p%)
 	dh_compress          $(verbose) $(PACKAGES.arch:%=-p%)
Index: test/package/ncurses-examples.spec
Prereq:  1.16 
--- ncurses-6.3-20211211+/test/package/ncurses-examples.spec	2019-11-23 21:11:34.000000000 +0000
+++ ncurses-6.3-20211219/test/package/ncurses-examples.spec	2021-12-19 00:13:46.000000000 +0000
@@ -3,13 +3,13 @@
 %global AltProgram ncursest-examples
 %global AppVersion MAJOR.MINOR
 %global AppRelease YYYYMMDD
-# $Id: ncurses-examples.spec,v 1.16 2019/11/23 21:11:34 tom Exp $
+# $Id: ncurses-examples.spec,v 1.21 2021/12/19 00:13:46 tom Exp $
 Name: %{AppProgram}
 Version: %{AppVersion}
 Release: %{AppRelease}
 License: MIT
 Group: Applications/Development
-URL: ftp://ftp.invisible-island.net/%{AppProgram}
+URL: ftp://ftp.invisible-island.net/pub/%{AppProgram}
 Source0: %{AppProgram}-%{AppRelease}.tgz
 Packager: Thomas Dickey <dickey@invisible-island.net>
 
@@ -50,8 +50,7 @@
 %configure \
 	--target %{_target_platform} \
 	--prefix=%{_prefix} \
-	--bindir=%{_bindir}/%{AppProgram} \
-	--datadir=%{_datadir}/%{AppProgram} \
+	--datadir=%{_datarootdir}/%{AppProgram} \
 	--with-screen=ncursesw6dev \
 	--disable-rpath-hack
 
@@ -66,8 +65,7 @@
 %configure \
 	--target %{_target_platform} \
 	--prefix=%{_prefix} \
-	--bindir=%{_bindir}/%{AltProgram} \
-	--datadir=%{_datadir}/%{AltProgram} \
+	--datadir=%{_datarootdir}/%{AltProgram} \
 	--with-screen=ncursestw6dev \
 	--disable-rpath-hack
 
@@ -78,11 +76,11 @@
 [ "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT
 
 pushd BUILD-%{AppProgram}
-make install DESTDIR=$RPM_BUILD_ROOT
+make install PACKAGE=%{AppProgram} DESTDIR=$RPM_BUILD_ROOT
 popd
 
 pushd BUILD-%{AltProgram}
-make install DESTDIR=$RPM_BUILD_ROOT
+make install PACKAGE=%{AltProgram} DESTDIR=$RPM_BUILD_ROOT
 popd
 
 %clean
@@ -95,17 +93,22 @@
 
 %files -n %{AppProgram}
 %defattr(-,root,root)
-%{_bindir}/%{AppProgram}/*
-%{_datadir}/%{AppProgram}/*
+%{_bindir}/%{AppProgram}
+%{_libexecdir}/%{AppProgram}/*
+%{_datarootdir}/%{AppProgram}/*
 
 %files -n %{AltProgram}
 %defattr(-,root,root)
-%{_bindir}/%{AltProgram}/*
-%{_datadir}/%{AltProgram}/*
+%{_bindir}/%{AltProgram}
+%{_libexecdir}/%{AltProgram}/*
+%{_datarootdir}/%{AltProgram}/*
 
 %changelog
 # each patch should add its ChangeLog entries here
 
+* Sat Dec 18 2021 Thomas Dickey
+- use libexecdir for programs rather than subdir of bindir
+
 * Sat Nov 16 2019 Thomas Dickey
 - modify clean-rule to work around Fedora NFS bugs.
 
Index: test/popup_msg.c
Prereq:  1.10 
--- ncurses-6.3-20211211+/test/popup_msg.c	2020-02-02 23:34:34.000000000 +0000
+++ ncurses-6.3-20211219/test/popup_msg.c	2021-12-18 21:19:19.000000000 +0000
@@ -1,5 +1,5 @@
 /****************************************************************************
- * Copyright 2018,2020 Thomas E. Dickey                                     *
+ * Copyright 2018-2020,2021 Thomas E. Dickey                                *
  * Copyright 2017 Free Software Foundation, Inc.                            *
  *                                                                          *
  * Permission is hereby granted, free of charge, to any person obtaining a  *
@@ -27,7 +27,7 @@
  * authorization.                                                           *
  ****************************************************************************/
 /*
- * $Id: popup_msg.c,v 1.10 2020/02/02 23:34:34 tom Exp $
+ * $Id: popup_msg.c,v 1.11 2021/12/18 21:19:19 tom Exp $
  *
  * Show a multi-line message in a window which may extend beyond the screen.
  *
@@ -87,7 +87,7 @@
 
     if ((help = newwin(high, wide, y0, x0)) == 0)
 	return;
-    if ((data = newpad(length + 1, width)) == 0) {
+    if ((data = newpad(length + 1, width + 1)) == 0) {
 	delwin(help);
 	return;
     }
Index: test/programs
Prereq:  1.50 
--- ncurses-6.3-20211211+/test/programs	2021-12-11 17:46:18.000000000 +0000
+++ ncurses-6.3-20211219/test/programs	2021-12-18 18:46:56.000000000 +0000
@@ -1,4 +1,4 @@
-# $Id: programs,v 1.50 2021/12/11 17:46:18 tom Exp $
+# $Id: programs,v 1.51 2021/12/18 18:46:56 tom Exp $
 ##############################################################################
 # Copyright 2018-2020,2021 Thomas E. Dickey                                  #
 # Copyright 2006-2016,2017 Free Software Foundation, Inc.                    #
@@ -40,7 +40,7 @@
 clip_printw	$(LDFLAGS_CURSES)	$(LOCAL_LIBS)	clip_printw popup_msg
 color_content	$(LDFLAGS_CURSES)	$(LOCAL_LIBS)	color_content
 color_set	$(LDFLAGS_CURSES)	$(LOCAL_LIBS)	color_set
-combine		$(LDFLAGS_CURSES)	$(LOCAL_LIBS)	combine popup_msg
+combine		$(LDFLAGS_CURSES)	$(LOCAL_LIBS)	combine dump_window popup_msg
 demo_altkeys	$(LDFLAGS_CURSES)	$(LOCAL_LIBS)	demo_altkeys
 demo_defkey	$(LDFLAGS_CURSES)	$(LOCAL_LIBS)	demo_defkey
 demo_forms	$(LDFLAGS_DEFAULT)	$(LOCAL_LIBS)	demo_forms edit_field popup_msg
Index: test/test.priv.h
Prereq:  1.197 
--- ncurses-6.3-20211211+/test/test.priv.h	2021-04-25 00:00:24.000000000 +0000
+++ ncurses-6.3-20211219/test/test.priv.h	2021-12-18 18:55:10.000000000 +0000
@@ -30,7 +30,7 @@
 /****************************************************************************
  *  Author: Thomas E. Dickey                    1996-on                     *
  ****************************************************************************/
-/* $Id: test.priv.h,v 1.197 2021/04/25 00:00:24 tom Exp $ */
+/* $Id: test.priv.h,v 1.198 2021/12/18 18:55:10 tom Exp $ */
 
 #ifndef __TEST_PRIV_H
 #define __TEST_PRIV_H 1
@@ -1148,6 +1148,14 @@
 #define CONST_MENUS		/* nothing */
 #endif
 
+#if defined(NCURSES_CONST)
+#define CONST_FMT NCURSES_CONST
+#elif defined(PDCURSES)
+#define CONST_FMT const
+#else
+#define CONST_FMT		/* nothing */
+#endif
+
 /*
  * Simplify setting up demo of threading with these macros.
  */