aboutsummaryrefslogtreecommitdiff
path: root/packages/ncurses/6.5/ncurses-6.5-20241019.patch
blob: 03d9750d6bb88929e45d69f09d2e936ee4a7de82 (plain)
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
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
# ncurses 6.5 - patch 20241019 - Thomas E. Dickey
#
# ------------------------------------------------------------------------------
#
# Ncurses 6.5 is at
#   https://invisible-island.net/archives/ncurses/
#   https://invisible-mirror.net/archives/ncurses/
#   https://ftp.gnu.org/gnu/ncurses/
#
# Patches for ncurses 6.5 can be found at
#   https://invisible-island.net/archives/ncurses/6.5
#   https://invisible-mirror.net/archives/ncurses/6.5
#
# ------------------------------------------------------------------------------
# https://invisible-island.net/archives/ncurses/6.5/ncurses-6.5-20241019.patch.gz
# patch by Thomas E. Dickey <dickey@invisible-island.net>
# created  Sat Oct 19 23:59:17 UTC 2024
# ------------------------------------------------------------------------------
# NEWS                             |    6 ++++-
# VERSION                          |    2 -
# dist.mk                          |    4 +--
# include/nc_win32.h               |    4 +--
# ncurses/base/lib_delch.c         |    6 ++---
# ncurses/base/lib_mouse.c         |    6 ++---
# ncurses/base/lib_set_term.c      |   10 ++++++---
# ncurses/curses.priv.h            |    8 +++----
# ncurses/tinfo/captoinfo.c        |    5 +---
# ncurses/tinfo/entries.c          |    4 +--
# ncurses/tinfo/lib_setup.c        |    4 +--
# ncurses/tinfo/lib_win32con.c     |    4 +--
# ncurses/tinfo/parse_entry.c      |    4 +--
# ncurses/tinfo/trim_sgr0.c        |    6 +++--
# ncurses/tinfo/write_entry.c      |    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 -
# progs/clear.c                    |    6 ++---
# progs/dump_entry.c               |   24 ++++++++++++-----------
# progs/infocmp.c                  |   36 +++++++++++++++++------------------
# progs/tabs.c                     |    8 +++----
# progs/tic.c                      |   38 ++++++++++++++++++-------------------
# progs/toe.c                      |   22 ++++++++++-----------
# progs/tset.c                     |    6 ++---
# test/demo_menus.c                |    4 +--
# 30 files changed, 127 insertions(+), 116 deletions(-)
# ------------------------------------------------------------------------------
Index: NEWS
Prereq:  1.4188 
--- ncurses-6.5-20241006+/NEWS	2024-10-06 08:53:45.000000000 +0000
+++ ncurses-6.5-20241019/NEWS	2024-10-19 21:59:42.000000000 +0000
@@ -26,7 +26,7 @@
 -- sale, use or other dealings in this Software without prior written        --
 -- authorization.                                                            --
 -------------------------------------------------------------------------------
--- $Id: NEWS,v 1.4188 2024/10/06 08:53:45 tom Exp $
+-- $Id: NEWS,v 1.4191 2024/10/19 21:59:42 tom Exp $
 -------------------------------------------------------------------------------
 
 This is a log of changes that ncurses has gone through since Zeyd started
@@ -46,6 +46,10 @@
 Changes through 1.9.9e did not credit all contributions;
 it is not possible to add this information.
 
+20241019
+	+ fixes for compiler warnings/cppcheck.
+	+ build-fixes for DJGPP configuration (patches by Stas Sergeev)
+
 20241006
 	+ fixes for compiler warnings/cppcheck.
 	+ use xterm+alt+title in wezterm -TD
Index: VERSION
--- ncurses-6.5-20241006+/VERSION	2024-10-06 08:53:45.000000000 +0000
+++ ncurses-6.5-20241019/VERSION	2024-10-19 09:59:06.000000000 +0000
@@ -1 +1 @@
-5:0:10	6.5	20241006
+5:0:10	6.5	20241019
Index: dist.mk
Prereq:  1.1636 
--- ncurses-6.5-20241006+/dist.mk	2024-10-06 08:53:45.000000000 +0000
+++ ncurses-6.5-20241019/dist.mk	2024-10-19 09:59:06.000000000 +0000
@@ -26,7 +26,7 @@
 # use or other dealings in this Software without prior written               #
 # authorization.                                                             #
 ##############################################################################
-# $Id: dist.mk,v 1.1636 2024/10/06 08:53:45 tom Exp $
+# $Id: dist.mk,v 1.1637 2024/10/19 09:59:06 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 = 5
-NCURSES_PATCH = 20241006
+NCURSES_PATCH = 20241019
 
 # We don't append the patch to the version, since this only applies to releases
 VERSION = $(NCURSES_MAJOR).$(NCURSES_MINOR)
Index: include/nc_win32.h
Prereq:  1.13 
--- ncurses-6.5-20241006+/include/nc_win32.h	2024-08-31 18:17:21.000000000 +0000
+++ ncurses-6.5-20241019/include/nc_win32.h	2024-10-19 21:06:23.000000000 +0000
@@ -31,7 +31,7 @@
  * Author: Thomas Dickey, 2008-on                                           *
  ****************************************************************************/
 
-/* $Id: nc_win32.h,v 1.13 2024/08/31 18:17:21 tom Exp $ */
+/* $Id: nc_win32.h,v 1.14 2024/10/19 21:06:23 tom Exp $ */
 
 #ifndef NC_WIN32_H
 #define NC_WIN32_H 1
@@ -105,7 +105,7 @@
 extern NCURSES_EXPORT(void)   _nc_console_selectActiveHandle(void);
 extern NCURSES_EXPORT(bool)   _nc_console_get_SBI(void);
 extern NCURSES_EXPORT(void)   _nc_console_set_scrollback(bool normal, CONSOLE_SCREEN_BUFFER_INFO * info);
-extern NCURSES_EXPORT(int)    _nc_console_testmouse(SCREEN *,HANDLE,int EVENTLIST_2nd(_nc_eventlist*));
+extern NCURSES_EXPORT(int)    _nc_console_testmouse(const SCREEN *,HANDLE,int EVENTLIST_2nd(_nc_eventlist*));
 extern NCURSES_EXPORT(int)    _nc_console_keyok(int keycode,int flag);
 extern NCURSES_EXPORT(bool)   _nc_console_keyExist(int keycode);
 extern NCURSES_EXPORT(bool)   _nc_console_checkinit(bool initFlag, bool assumeTermInfo);
Index: ncurses/base/lib_delch.c
Prereq:  1.15 
--- ncurses-6.5-20241006+/ncurses/base/lib_delch.c	2024-07-27 19:23:21.000000000 +0000
+++ ncurses-6.5-20241019/ncurses/base/lib_delch.c	2024-10-19 21:20:46.000000000 +0000
@@ -41,7 +41,7 @@
 
 #include <curses.priv.h>
 
-MODULE_ID("$Id: lib_delch.c,v 1.15 2024/07/27 19:23:21 tom Exp $")
+MODULE_ID("$Id: lib_delch.c,v 1.16 2024/10/19 21:20:46 tom Exp $")
 
 NCURSES_EXPORT(int)
 wdelch(WINDOW *win)
@@ -54,8 +54,8 @@
 	NCURSES_CH_T blank = win->_nc_bkgd;
 	struct ldat *line = &(win->_line[win->_cury]);
 	NCURSES_CH_T *end = &(line->text[win->_maxx]);
-	NCURSES_CH_T *temp2 = &(line->text[win->_curx + 1]);
-	NCURSES_CH_T *temp1 = temp2 - 1;
+	NCURSES_CH_T *temp1 = &(line->text[win->_curx]);
+	const NCURSES_CH_T *temp2 = temp1 + 1;
 
 	CHANGED_TO_EOL(line, win->_curx, win->_maxx);
 	while (temp1 < end)
Index: ncurses/base/lib_mouse.c
Prereq:  1.200 
--- ncurses-6.5-20241006+/ncurses/base/lib_mouse.c	2024-02-17 21:13:01.000000000 +0000
+++ ncurses-6.5-20241019/ncurses/base/lib_mouse.c	2024-10-19 21:03:19.000000000 +0000
@@ -85,7 +85,7 @@
 #define CUR SP_TERMTYPE
 #endif
 
-MODULE_ID("$Id: lib_mouse.c,v 1.200 2024/02/17 21:13:01 tom Exp $")
+MODULE_ID("$Id: lib_mouse.c,v 1.201 2024/10/19 21:03:19 tom Exp $")
 
 #include <tic.h>
 
@@ -1219,7 +1219,7 @@
 } SGR_DATA;
 
 static bool
-read_SGR(SCREEN *sp, SGR_DATA * result)
+read_SGR(const SCREEN *sp, SGR_DATA * result)
 {
     char kbuf[80];		/* bigger than any possible mouse response */
     int grabbed = 0;
@@ -2042,7 +2042,7 @@
 /* This may be used by other routines to ask for the existence of mouse
    support */
 NCURSES_EXPORT(bool)
-_nc_has_mouse(SCREEN *sp)
+_nc_has_mouse(const SCREEN *sp)
 {
     return (((0 == sp) || (sp->_mouse_type == M_NONE)) ? FALSE : TRUE);
 }
Index: ncurses/base/lib_set_term.c
Prereq:  1.184 
--- ncurses-6.5-20241006+/ncurses/base/lib_set_term.c	2022-12-10 21:34:12.000000000 +0000
+++ ncurses-6.5-20241019/ncurses/base/lib_set_term.c	2024-10-19 19:41:09.000000000 +0000
@@ -1,5 +1,5 @@
 /****************************************************************************
- * Copyright 2018-2021,2022 Thomas E. Dickey                                *
+ * Copyright 2018-2022,2024 Thomas E. Dickey                                *
  * Copyright 1998-2016,2017 Free Software Foundation, Inc.                  *
  *                                                                          *
  * Permission is hereby granted, free of charge, to any person obtaining a  *
@@ -47,6 +47,10 @@
 #include <tic.h>
 #include <new_pair.h>
 
+#ifdef __DJGPP__
+#include <io.h>
+#endif
+
 #if USE_GPM_SUPPORT
 #ifdef HAVE_LIBDL
 /* use dynamic loader to avoid linkage dependency */
@@ -57,7 +61,7 @@
 #undef CUR
 #define CUR SP_TERMTYPE
 
-MODULE_ID("$Id: lib_set_term.c,v 1.184 2022/12/10 21:34:12 tom Exp $")
+MODULE_ID("$Id: lib_set_term.c,v 1.186 2024/10/19 19:41:09 tom Exp $")
 
 #ifdef USE_TERM_DRIVER
 #define MaxColors      InfoOf(sp).maxcolors
@@ -423,7 +427,7 @@
 #ifdef __DJGPP__
     T(("setting output mode to binary"));
     fflush(output);
-    setmode(output, O_BINARY);
+    setmode(fileno(output), O_BINARY);
 #endif
 #if defined(EXP_WIN32_DRIVER)
     T(("setting output mode to binary"));
Index: ncurses/curses.priv.h
Prereq:  1.692 
--- ncurses-6.5-20241006+/ncurses/curses.priv.h	2024-10-05 21:01:50.000000000 +0000
+++ ncurses-6.5-20241019/ncurses/curses.priv.h	2024-10-19 21:23:40.000000000 +0000
@@ -35,7 +35,7 @@
  ****************************************************************************/
 
 /*
- * $Id: curses.priv.h,v 1.692 2024/10/05 21:01:50 tom Exp $
+ * $Id: curses.priv.h,v 1.694 2024/10/19 21:23:40 tom Exp $
  *
  *	curses.priv.h
  *
@@ -208,7 +208,7 @@
  * the path separator in configure doesn't work properly. So, if building
  * for MinGW, we enforce the correct Windows PATH separator
  */
-#if defined(_NC_WINDOWS_NATIVE)
+#if defined(_NC_WINDOWS_NATIVE) || defined(__DJGPP__)
 #  ifdef NCURSES_PATHSEP
 #    undef NCURSES_PATHSEP
 #  endif
@@ -2059,7 +2059,7 @@
 extern NCURSES_EXPORT(void) _nc_screen_wrap (void);
 
 /* lib_mouse.c */
-extern NCURSES_EXPORT(bool) _nc_has_mouse (SCREEN *);
+extern NCURSES_EXPORT(bool) _nc_has_mouse (const SCREEN *);
 
 /* lib_mvcur.c */
 #define INFINITY	1000000	/* cost: too high to use */
@@ -2175,7 +2175,7 @@
 extern NCURSES_EXPORT(void) _nc_init_termtype (TERMTYPE2 *const);
 extern NCURSES_EXPORT(void) _nc_do_color (int, int, int, NCURSES_OUTC);
 extern NCURSES_EXPORT(void) _nc_flush (void);
-extern NCURSES_EXPORT(void) _nc_free_entry (ENTRY *, TERMTYPE2 *);
+extern NCURSES_EXPORT(void) _nc_free_entry (ENTRY *, const TERMTYPE2 *);
 extern NCURSES_EXPORT(void) _nc_freeall (void);
 extern NCURSES_EXPORT(void) _nc_hash_map (void);
 extern NCURSES_EXPORT(void) _nc_init_keytry (SCREEN *);
Index: ncurses/tinfo/captoinfo.c
Prereq:  1.103 
--- ncurses-6.5-20241006+/ncurses/tinfo/captoinfo.c	2024-07-27 19:22:23.000000000 +0000
+++ ncurses-6.5-20241019/ncurses/tinfo/captoinfo.c	2024-10-19 21:18:54.000000000 +0000
@@ -98,7 +98,7 @@
 #include <ctype.h>
 #include <tic.h>
 
-MODULE_ID("$Id: captoinfo.c,v 1.103 2024/07/27 19:22:23 tom Exp $")
+MODULE_ID("$Id: captoinfo.c,v 1.104 2024/10/19 21:18:54 tom Exp $")
 
 #if 0
 #define DEBUG_THIS(p) DEBUG(9, p)
@@ -535,8 +535,7 @@
 static int
 bcd_expression(const char *str)
 {
-    /* leave this non-const for HPUX */
-    static char fmt[] = "%%p%c%%{10}%%/%%{16}%%*%%p%c%%{10}%%m%%+";
+    static const char fmt[] = "%%p%c%%{10}%%/%%{16}%%*%%p%c%%{10}%%m%%+";
     int len = 0;
     char ch1, ch2;
 
Index: ncurses/tinfo/entries.c
Prereq:  1.36 
--- ncurses-6.5-20241006+/ncurses/tinfo/entries.c	2024-07-27 19:22:23.000000000 +0000
+++ ncurses-6.5-20241019/ncurses/tinfo/entries.c	2024-10-19 21:23:31.000000000 +0000
@@ -38,7 +38,7 @@
 
 #include <tic.h>
 
-MODULE_ID("$Id: entries.c,v 1.36 2024/07/27 19:22:23 tom Exp $")
+MODULE_ID("$Id: entries.c,v 1.37 2024/10/19 21:23:31 tom Exp $")
 
 /****************************************************************************
  *
@@ -91,7 +91,7 @@
 }
 
 NCURSES_EXPORT(void)
-_nc_free_entry(ENTRY * headp, TERMTYPE2 *tterm)
+_nc_free_entry(ENTRY * headp, const TERMTYPE2 *tterm)
 /* free the allocated storage consumed by the given list entry */
 {
     ENTRY *ep;
Index: ncurses/tinfo/lib_setup.c
Prereq:  1.244 
--- ncurses-6.5-20241006+/ncurses/tinfo/lib_setup.c	2024-08-31 21:15:54.000000000 +0000
+++ ncurses-6.5-20241019/ncurses/tinfo/lib_setup.c	2024-10-19 21:17:36.000000000 +0000
@@ -49,7 +49,7 @@
 #include <locale.h>
 #endif
 
-MODULE_ID("$Id: lib_setup.c,v 1.244 2024/08/31 21:15:54 tom Exp $")
+MODULE_ID("$Id: lib_setup.c,v 1.245 2024/10/19 21:17:36 tom Exp $")
 
 /****************************************************************************
  *
@@ -320,7 +320,7 @@
 }
 
 static bool
-get_position(TERMINAL *termp, int fd, int *row, int *col)
+get_position(const TERMINAL *termp, int fd, int *row, int *col)
 {
     bool result = FALSE;
     size_t need = strlen(user7);
Index: ncurses/tinfo/lib_win32con.c
Prereq:  1.15 
--- ncurses-6.5-20241006+/ncurses/tinfo/lib_win32con.c	2024-08-31 15:55:10.000000000 +0000
+++ ncurses-6.5-20241019/ncurses/tinfo/lib_win32con.c	2024-10-19 21:06:11.000000000 +0000
@@ -38,7 +38,7 @@
 
 #include <curses.priv.h>
 
-MODULE_ID("$Id: lib_win32con.c,v 1.15 2024/08/31 15:55:10 tom Exp $")
+MODULE_ID("$Id: lib_win32con.c,v 1.16 2024/10/19 21:06:11 tom Exp $")
 
 #if defined(_NC_WINDOWS)
 
@@ -996,7 +996,7 @@
 
 NCURSES_EXPORT(int)
 _nc_console_testmouse(
-			 SCREEN *sp,
+			 const SCREEN *sp,
 			 HANDLE hdl,
 			 int delay
 			 EVENTLIST_2nd(_nc_eventlist * evl))
Index: ncurses/tinfo/parse_entry.c
Prereq:  1.109 
--- ncurses-6.5-20241006+/ncurses/tinfo/parse_entry.c	2024-07-27 19:22:23.000000000 +0000
+++ ncurses-6.5-20241019/ncurses/tinfo/parse_entry.c	2024-10-19 21:22:04.000000000 +0000
@@ -48,7 +48,7 @@
 #include <ctype.h>
 #include <tic.h>
 
-MODULE_ID("$Id: parse_entry.c,v 1.109 2024/07/27 19:22:23 tom Exp $")
+MODULE_ID("$Id: parse_entry.c,v 1.110 2024/10/19 21:22:04 tom Exp $")
 
 #ifdef LINT
 static short const parametrized[] =
@@ -707,7 +707,7 @@
 }
 
 static void
-append_acs(string_desc * dst, int code, char *src)
+append_acs(string_desc * dst, int code, const char *src)
 {
     if (VALID_STRING(src) && strlen(src) == 1) {
 	append_acs0(dst, code, src, 0);
Index: ncurses/tinfo/trim_sgr0.c
Prereq:  1.24 
--- ncurses-6.5-20241006+/ncurses/tinfo/trim_sgr0.c	2024-10-05 20:53:48.000000000 +0000
+++ ncurses-6.5-20241019/ncurses/tinfo/trim_sgr0.c	2024-10-19 21:18:18.000000000 +0000
@@ -37,7 +37,7 @@
 
 #include <tic.h>
 
-MODULE_ID("$Id: trim_sgr0.c,v 1.24 2024/10/05 20:53:48 tom Exp $")
+MODULE_ID("$Id: trim_sgr0.c,v 1.25 2024/10/19 21:18:18 tom Exp $")
 
 #undef CUR
 #define CUR tp->
@@ -254,7 +254,7 @@
 	} else if (similar_sgr(off, end)
 		   && !similar_sgr(off, on)) {
 	    bool found = FALSE;
-	    size_t i, j, k;
+	    size_t i, j;
 
 	    TR(TRACE_DATABASE, ("adjusting sgr(9:off) : %s", _nc_visbuf(off)));
 	    result = off;
@@ -262,6 +262,8 @@
 	     * If rmacs is a substring of sgr(0), remove that chunk.
 	     */
 	    if (PRESENT(exit_alt_charset_mode)) {
+		size_t k;
+
 		TR(TRACE_DATABASE, ("scan for rmacs %s", _nc_visbuf(exit_alt_charset_mode)));
 		j = strlen(off);
 		k = strlen(exit_alt_charset_mode);
Index: ncurses/tinfo/write_entry.c
Prereq:  1.135 
--- ncurses-6.5-20241006+/ncurses/tinfo/write_entry.c	2024-09-28 17:31:09.000000000 +0000
+++ ncurses-6.5-20241019/ncurses/tinfo/write_entry.c	2024-10-19 21:19:32.000000000 +0000
@@ -42,7 +42,7 @@
 
 #include <tic.h>
 
-MODULE_ID("$Id: write_entry.c,v 1.135 2024/09/28 17:31:09 tom Exp $")
+MODULE_ID("$Id: write_entry.c,v 1.136 2024/10/19 21:19:32 tom Exp $")
 
 #if 1
 #define TRACE_OUT(p) DEBUG(2, p)
@@ -125,12 +125,12 @@
     static const char dirnames[] = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";
     static bool verified[sizeof(dirnames)];
 
-    char dir[sizeof(LEAF_FMT)];
     const char *s = 0;
 
     if (code == 0 || (s = (strchr) (dirnames, code)) == 0) {
 	_nc_err_abort("Illegal terminfo subdirectory \"" LEAF_FMT "\"", code);
     } else if (!verified[s - dirnames]) {
+	char dir[sizeof(LEAF_FMT)];
 	_nc_SPRINTF(dir, _nc_SLIMIT(sizeof(dir)) LEAF_FMT, code);
 	if (make_db_root(dir) < 0) {
 	    _nc_err_abort("%s/%s: permission denied", _nc_tic_dir(NULL), dir);
Index: package/debian-mingw/changelog
--- ncurses-6.5-20241006+/package/debian-mingw/changelog	2024-10-06 08:53:45.000000000 +0000
+++ ncurses-6.5-20241019/package/debian-mingw/changelog	2024-10-19 09:59:06.000000000 +0000
@@ -1,8 +1,8 @@
-ncurses6td (6.5+20241006) unstable; urgency=low
+ncurses6td (6.5+20241019) unstable; urgency=low
 
   * latest weekly patch
 
- -- Thomas E. Dickey <dickey@invisible-island.net>  Sun, 06 Oct 2024 04:53:45 -0400
+ -- Thomas E. Dickey <dickey@invisible-island.net>  Sat, 19 Oct 2024 05:59:06 -0400
 
 ncurses6 (5.9+20131005) unstable; urgency=low
 
Index: package/debian-mingw64/changelog
--- ncurses-6.5-20241006+/package/debian-mingw64/changelog	2024-10-06 08:53:45.000000000 +0000
+++ ncurses-6.5-20241019/package/debian-mingw64/changelog	2024-10-19 09:59:06.000000000 +0000
@@ -1,8 +1,8 @@
-ncurses6td (6.5+20241006) unstable; urgency=low
+ncurses6td (6.5+20241019) unstable; urgency=low
 
   * latest weekly patch
 
- -- Thomas E. Dickey <dickey@invisible-island.net>  Sun, 06 Oct 2024 04:53:45 -0400
+ -- Thomas E. Dickey <dickey@invisible-island.net>  Sat, 19 Oct 2024 05:59:06 -0400
 
 ncurses6 (5.9+20131005) unstable; urgency=low
 
Index: package/debian/changelog
--- ncurses-6.5-20241006+/package/debian/changelog	2024-10-06 08:53:45.000000000 +0000
+++ ncurses-6.5-20241019/package/debian/changelog	2024-10-19 09:59:06.000000000 +0000
@@ -1,8 +1,8 @@
-ncurses6td (6.5+20241006) unstable; urgency=low
+ncurses6td (6.5+20241019) unstable; urgency=low
 
   * latest weekly patch
 
- -- Thomas E. Dickey <dickey@invisible-island.net>  Sun, 06 Oct 2024 04:53:45 -0400
+ -- Thomas E. Dickey <dickey@invisible-island.net>  Sat, 19 Oct 2024 05:59:06 -0400
 
 ncurses6 (5.9+20120608) unstable; urgency=low
 
Index: package/mingw-ncurses.nsi
Prereq:  1.671 
--- ncurses-6.5-20241006+/package/mingw-ncurses.nsi	2024-10-06 08:53:45.000000000 +0000
+++ ncurses-6.5-20241019/package/mingw-ncurses.nsi	2024-10-19 09:59:06.000000000 +0000
@@ -1,4 +1,4 @@
-; $Id: mingw-ncurses.nsi,v 1.671 2024/10/06 08:53:45 tom Exp $
+; $Id: mingw-ncurses.nsi,v 1.672 2024/10/19 09:59:06 tom Exp $
 
 ; TODO add examples
 ; TODO bump ABI to 6
@@ -10,7 +10,7 @@
 !define VERSION_MAJOR "6"
 !define VERSION_MINOR "5"
 !define VERSION_YYYY  "2024"
-!define VERSION_MMDD  "1006"
+!define VERSION_MMDD  "1019"
 !define VERSION_PATCH ${VERSION_YYYY}${VERSION_MMDD}
 
 !define MY_ABI   "5"
Index: package/mingw-ncurses.spec
--- ncurses-6.5-20241006+/package/mingw-ncurses.spec	2024-10-06 08:53:45.000000000 +0000
+++ ncurses-6.5-20241019/package/mingw-ncurses.spec	2024-10-19 09:59:06.000000000 +0000
@@ -3,7 +3,7 @@
 Summary: shared libraries for terminal handling
 Name: mingw32-ncurses6
 Version: 6.5
-Release: 20241006
+Release: 20241019
 License: X11
 Group: Development/Libraries
 URL: https://invisible-island.net/ncurses/
Index: package/ncurses.spec
--- ncurses-6.5-20241006+/package/ncurses.spec	2024-10-06 08:53:45.000000000 +0000
+++ ncurses-6.5-20241019/package/ncurses.spec	2024-10-19 09:59:06.000000000 +0000
@@ -1,7 +1,7 @@
 Summary: shared libraries for terminal handling
 Name: ncurses6
 Version: 6.5
-Release: 20241006
+Release: 20241019
 License: X11
 Group: Development/Libraries
 URL: https://invisible-island.net/ncurses/
Index: package/ncursest.spec
--- ncurses-6.5-20241006+/package/ncursest.spec	2024-10-06 08:53:45.000000000 +0000
+++ ncurses-6.5-20241019/package/ncursest.spec	2024-10-19 09:59:06.000000000 +0000
@@ -1,7 +1,7 @@
 Summary: Curses library with POSIX thread support.
 Name: ncursest6
 Version: 6.5
-Release: 20241006
+Release: 20241019
 License: X11
 Group: Development/Libraries
 Source: ncurses-%{version}-%{release}.tgz
Index: progs/clear.c
Prereq:  1.24 
--- ncurses-6.5-20241006+/progs/clear.c	2021-03-20 18:23:14.000000000 +0000
+++ ncurses-6.5-20241019/progs/clear.c	2024-10-19 22:00:53.000000000 +0000
@@ -1,5 +1,5 @@
 /****************************************************************************
- * Copyright 2020,2021 Thomas E. Dickey                                     *
+ * Copyright 2020-2021,2024 Thomas E. Dickey                                *
  * Copyright 1998-2016,2017 Free Software Foundation, Inc.                  *
  *                                                                          *
  * Permission is hereby granted, free of charge, to any person obtaining a  *
@@ -41,7 +41,7 @@
 #include <clear_cmd.h>
 #include <tty_settings.h>
 
-MODULE_ID("$Id: clear.c,v 1.24 2021/03/20 18:23:14 tom Exp $")
+MODULE_ID("$Id: clear.c,v 1.25 2024/10/19 22:00:53 tom Exp $")
 
 const char *_nc_progname = "clear";
 
@@ -71,7 +71,7 @@
     TTY tty_settings;
     int fd;
     int c;
-    char *term;
+    NCURSES_CONST char *term;
     bool opt_x = FALSE;		/* clear scrollback if possible */
 
     _nc_progname = _nc_rootname(argv[0]);
Index: progs/dump_entry.c
Prereq:  1.196 
--- ncurses-6.5-20241006+/progs/dump_entry.c	2023-05-27 20:13:10.000000000 +0000
+++ ncurses-6.5-20241019/progs/dump_entry.c	2024-10-19 22:00:53.000000000 +0000
@@ -1,5 +1,5 @@
 /****************************************************************************
- * Copyright 2018-2022,2023 Thomas E. Dickey                                *
+ * Copyright 2018-2023,2024 Thomas E. Dickey                                *
  * Copyright 1998-2016,2017 Free Software Foundation, Inc.                  *
  *                                                                          *
  * Permission is hereby granted, free of charge, to any person obtaining a  *
@@ -40,7 +40,7 @@
 #include <termsort.h>		/* this C file is generated */
 #include <parametrized.h>	/* so is this */
 
-MODULE_ID("$Id: dump_entry.c,v 1.196 2023/05/27 20:13:10 tom Exp $")
+MODULE_ID("$Id: dump_entry.c,v 1.197 2024/10/19 22:00:53 tom Exp $")
 
 #define DISCARD(string) string = ABSENT_STRING
 #define PRINTF (void) printf
@@ -725,7 +725,7 @@
  * given leading text.
  */
 static bool
-leading_DYN(DYNBUF * buffer, const char *leading)
+leading_DYN(const DYNBUF * buffer, const char *leading)
 {
     bool result = FALSE;
     size_t need = strlen(leading);
@@ -1118,7 +1118,7 @@
 			      : ((*srccap == 'k')
 				 ? 0
 				 : has_params(srccap, FALSE)));
-		char *cv = _nc_infotocap(name, srccap, params);
+		const char *cv = _nc_infotocap(name, srccap, params);
 
 		if (cv == 0) {
 		    if (outform == F_TCONVERR) {
@@ -1129,7 +1129,8 @@
 		    } else if (suppress_untranslatable) {
 			continue;
 		    } else {
-			char *s = srccap, *d = buffer;
+			const char *s = srccap;
+			char *d = buffer;
 			int need = 3 + (int) strlen(name);
 			while ((*d = *s++) != 0) {
 			    if ((d - buffer + 2) >= (int) sizeof(buffer)) {
@@ -1210,7 +1211,8 @@
 	    bool box_ok = TRUE;
 	    const char *acstrans = "lqkxjmwuvtn";
 	    const char *cp;
-	    char *tp, *sp, boxchars[11];
+	    const char *sp;
+	    char *tp, boxchars[11];
 
 	    tp = boxchars;
 	    for (cp = acstrans; *cp; cp++) {
@@ -1324,7 +1326,7 @@
 }
 
 static char *
-find_string(TERMTYPE2 *tterm, char *name)
+find_string(TERMTYPE2 *tterm, const char *name)
 {
     PredIdx n;
     for (n = 0; n < NUM_STRINGS(tterm); ++n) {
@@ -1352,7 +1354,7 @@
     char name[20];
 
     for (n = 0; n <= 10; ++n) {
-	char *cap;
+	const char *cap;
 
 	_nc_SPRINTF(name, _nc_SLIMIT(sizeof(name)) "lf%d", n);
 	cap = find_string(tterm, name);
@@ -1379,7 +1381,7 @@
     char name[20];
 
     for (n = 60; n >= 0; --n) {
-	char *cap;
+	const char *cap;
 
 	_nc_SPRINTF(name, _nc_SLIMIT(sizeof(name)) "kf%d", n);
 	cap = find_string(tterm, name);
@@ -1444,7 +1446,7 @@
 }
 
 static void
-encode_b64(char *target, char *source, unsigned state, int *saved)
+encode_b64(char *target, const char *source, unsigned state, int *saved)
 {
     /* RFC-4648 */
     static const char data[] =
@@ -1509,7 +1511,7 @@
 		}
 	    }
 	    if (quickdump & 2) {
-		static char padding[] =
+		static const char padding[] =
 		{0, 0};
 		int value = 0;
 
Index: progs/infocmp.c
Prereq:  1.165 
--- ncurses-6.5-20241006+/progs/infocmp.c	2024-09-28 20:26:22.000000000 +0000
+++ ncurses-6.5-20241019/progs/infocmp.c	2024-10-19 21:43:11.000000000 +0000
@@ -43,7 +43,7 @@
 
 #include <dump_entry.h>
 
-MODULE_ID("$Id: infocmp.c,v 1.165 2024/09/28 20:26:22 Branden.Robinson Exp $")
+MODULE_ID("$Id: infocmp.c,v 1.166 2024/10/19 21:43:11 tom Exp $")
 
 #ifndef ACTUAL_TIC
 #define ACTUAL_TIC "tic"
@@ -132,7 +132,7 @@
 }
 
 static void
-canonical_name(char *source, char *target)
+canonical_name(const char *source, char *target)
 /* extract the terminal type's primary name */
 {
     int limit = NAMESIZE;
@@ -214,8 +214,6 @@
     switch (type) {
     case BOOLEAN:
 	{
-	    int is_set = FALSE;
-
 	    /*
 	     * This assumes that multiple use entries are supposed
 	     * to contribute the logical or of their boolean capabilities.
@@ -228,6 +226,8 @@
 	     * recorded in the terminfo database.
 	     */
 	    if (idx < NUM_BOOLEANS(&(entries[0].tterm))) {
+		int is_set = FALSE;
+
 		for (ep = &entries[1]; ep < entries + termcount; ep++) {
 		    if (idx < NUM_BOOLEANS(&(ep->tterm))
 			&& (is_set = ep->tterm.Booleans[idx])) {
@@ -242,14 +242,14 @@
 
     case NUMBER:
 	{
-	    int value = ABSENT_NUMERIC;
-
 	    /*
 	     * We take the semantics of multiple uses to be 'each
 	     * capability gets the first non-default value found
 	     * in the sequence of use entries'.
 	     */
 	    if (idx < NUM_NUMBERS(&(entries[0].tterm))) {
+		int value = ABSENT_NUMERIC;
+
 		for (ep = &entries[1]; ep < entries + termcount; ep++)
 		    if (idx < NUM_NUMBERS(&(ep->tterm))
 			&& VALID_NUMERIC(ep->tterm.Numbers[idx])) {
@@ -265,8 +265,8 @@
 
     case STRING:
 	{
-	    char *termstr = entries[0].tterm.Strings[idx];
-	    char *usestr = ABSENT_STRING;
+	    const char *termstr = entries[0].tterm.Strings[idx];
+	    const char *usestr = ABSENT_STRING;
 
 	    /*
 	     * We take the semantics of multiple uses to be 'each
@@ -302,7 +302,7 @@
 }
 
 static bool
-useeq(ENTRY * e1, ENTRY * e2)
+useeq(const ENTRY * e1, const ENTRY * e2)
 /* are the use references in two entries equivalent? */
 {
     unsigned i, j;
@@ -329,7 +329,7 @@
 }
 
 static bool
-entryeq(TERMTYPE2 *t1, TERMTYPE2 *t2)
+entryeq(const TERMTYPE2 *t1, const TERMTYPE2 *t2)
 /* are two entries equivalent? */
 {
     unsigned i;
@@ -352,7 +352,7 @@
 #define TIC_EXPAND(result) _nc_tic_expand(result, outform==F_TERMINFO, numbers)
 
 static void
-print_uses(ENTRY * ep, FILE *fp)
+print_uses(const ENTRY * ep, FILE *fp)
 /* print an entry's use references */
 {
     if (!ep->nuses) {
@@ -404,7 +404,7 @@
 }
 
 static void
-dump_string(char *val, char *buf)
+dump_string(const char *val, char *buf)
 /* display the value of a string capability */
 {
     if (val == ABSENT_STRING)
@@ -479,13 +479,13 @@
 compare_predicate(PredType type, PredIdx idx, const char *name)
 /* predicate function to use for entry difference reports */
 {
-    ENTRY *e1 = &entries[0];
-    ENTRY *e2 = &entries[1];
+    const ENTRY *e1 = &entries[0];
+    const ENTRY *e2 = &entries[1];
     char buf1[MAX_STRING];
     char buf2[MAX_STRING];
     int b1, b2;
     int n1, n2;
-    char *s1, *s2;
+    const char *s1, *s2;
     bool found;
     int extra = 1;
 
@@ -866,7 +866,7 @@
 
 	/* first, check other capabilities in this entry */
 	for (i = 0; i < STRCOUNT; i++) {
-	    char *cp = tp->Strings[i];
+	    const char *cp = tp->Strings[i];
 
 	    /* don't use function-key capabilities */
 	    if (strnames[i] == NULL)
@@ -1331,7 +1331,7 @@
 
 /* dump C initializers for the terminal type */
 static void
-dump_initializers(TERMTYPE2 *term)
+dump_initializers(const TERMTYPE2 *term)
 {
     unsigned n;
     const char *str = 0;
@@ -1455,7 +1455,7 @@
 
 /* dump C initializers for the terminal type */
 static void
-dump_termtype(TERMTYPE2 *term)
+dump_termtype(const TERMTYPE2 *term)
 {
     (void) printf("\t%s\n\t\t%s,\n", L_CURL, name_initializer("alias"));
     (void) printf("\t\t(char *)0,\t/* pointer to string table */\n");
Index: progs/tabs.c
Prereq:  1.54 
--- ncurses-6.5-20241006+/progs/tabs.c	2024-08-24 22:56:43.000000000 +0000
+++ ncurses-6.5-20241019/progs/tabs.c	2024-10-19 21:45:18.000000000 +0000
@@ -39,7 +39,7 @@
 #include <progs.priv.h>
 #include <tty_settings.h>
 
-MODULE_ID("$Id: tabs.c,v 1.54 2024/08/24 22:56:43 tom Exp $")
+MODULE_ID("$Id: tabs.c,v 1.55 2024/10/19 21:45:18 tom Exp $")
 
 static GCC_NORETURN void usage(void);
 
@@ -78,7 +78,7 @@
 {
     bool result = FALSE;
     if (VALID_STRING(clear_all_tabs)) {
-	char *param = skip_csi(clear_all_tabs);
+	const char *param = skip_csi(clear_all_tabs);
 	if (!strcmp(param, "3g"))
 	    result = TRUE;
     }
@@ -86,7 +86,7 @@
 }
 
 static void
-do_tabs(int *tab_list)
+do_tabs(const int *tab_list)
 {
     int last = 1;
     int stop;
@@ -229,7 +229,7 @@
  * ruler.
  */
 static void
-write_tabs(int *tab_list, const char *new_line)
+write_tabs(const int *tab_list, const char *new_line)
 {
     int stop;
 
Index: progs/tic.c
Prereq:  1.325 
--- ncurses-6.5-20241006+/progs/tic.c	2024-03-02 19:33:22.000000000 +0000
+++ ncurses-6.5-20241019/progs/tic.c	2024-10-19 21:31:50.000000000 +0000
@@ -49,7 +49,7 @@
 #include <parametrized.h>
 #include <transform.h>
 
-MODULE_ID("$Id: tic.c,v 1.325 2024/03/02 19:33:22 tom Exp $")
+MODULE_ID("$Id: tic.c,v 1.326 2024/10/19 21:31:50 tom Exp $")
 
 #define STDIN_NAME "<stdin>"
 
@@ -203,7 +203,8 @@
 {
     unsigned n;
     int ch;
-    char *s, *d, *t;
+    char *s, *d;
+    const char *t;
     char result[MAX_ENTRY_SIZE];
 
     /*
@@ -411,7 +412,6 @@
     char my_altfile[PATH_MAX];
     FILE *result = 0;
     FILE *target;
-    int ch;
 
     if (alt_file == NULL)
 	alt_file = my_altfile;
@@ -423,7 +423,7 @@
     } else {
 	clearerr(source);
 	for (;;) {
-	    ch = fgetc(source);
+	    int ch = fgetc(source);
 	    if (feof(source)) {
 		break;
 	    } else if (ferror(source)) {
@@ -1119,7 +1119,7 @@
  * Check if the alternate character-set capabilities are consistent.
  */
 static void
-check_acs(TERMTYPE2 *tp)
+check_acs(const TERMTYPE2 *tp)
 {
     int vt100_smacs = 0;
     int vt100_rmacs = 0;
@@ -1332,7 +1332,7 @@
 
     if ((ch = keypad_final(string)) != '\0') {
 	const char *list = "PQRSwxymtuvlqrsPpn";	/* app-keypad except "Enter" */
-	char *test = (strchr) (list, ch);
+	const char *test = (strchr) (list, ch);
 	if (test != 0)
 	    result = (long) (test - list);
     }
@@ -1363,7 +1363,7 @@
 	}
     }
     if (!repeated) {
-	char *up = list[1];
+	const char *up = list[1];
 	size_t prefix = (size_t) csi_length(up);
 	size_t suffix;
 
@@ -1410,7 +1410,7 @@
 #define UNEXPECTED(name) if (PRESENT(name)) _nc_warning("unexpected " #name ", for %s", why)
 
 static void
-check_noaddress(TERMTYPE2 *tp, const char *why)
+check_noaddress(const TERMTYPE2 *tp, const char *why)
 {
     UNEXPECTED(column_address);
     UNEXPECTED(cursor_address);
@@ -1541,7 +1541,7 @@
  * is mapped inconsistently.
  */
 static void
-check_keypad(TERMTYPE2 *tp)
+check_keypad(const TERMTYPE2 *tp)
 {
     char show[80];
 
@@ -1727,7 +1727,7 @@
 	bool have_kmouse = FALSE;
 	bool use_sgr_39_49 = FALSE;
 	const char *name_39_49 = "orig_pair or orig_colors";
-	char *name = _nc_first_name(tp->term_names);
+	const char *name = _nc_first_name(tp->term_names);
 	bool is_screen = !strncmp(name, "screen", 6);
 	bool screen_base = (is_screen
 			    && strchr(name, '.') == NULL);
@@ -1985,7 +1985,7 @@
  * markers.
  */
 static void
-check_params(TERMTYPE2 *tp, const char *name, const char *value, int extended)
+check_params(const TERMTYPE2 *tp, const char *name, const char *value, int extended)
 {
     int expected = expected_params(name);
     int actual = 0;
@@ -2149,7 +2149,7 @@
 }
 
 static void
-check_delays(TERMTYPE2 *tp, const char *name, const char *value)
+check_delays(const TERMTYPE2 *tp, const char *name, const char *value)
 {
     const char *p, *q;
     const char *first = 0;
@@ -2575,7 +2575,7 @@
 similar_sgr(int num, char *a, char *b)
 {
     char *base_a = a;
-    char *base_b = b;
+    const char *base_b = b;
     int delaying = 0;
 
     while (*b != 0) {
@@ -2631,7 +2631,7 @@
 }
 
 static char *
-check_sgr(TERMTYPE2 *tp, char *zero, int num, char *cap, const char *name)
+check_sgr(const TERMTYPE2 *tp, const char *zero, int num, char *cap, const char *name)
 {
     char *test;
 
@@ -2731,7 +2731,7 @@
 }
 
 static void
-show_fkey_name(NAME_VALUE * data)
+show_fkey_name(const NAME_VALUE * data)
 {
     if (data->keycode > 0) {
 	fprintf(stderr, " %s", keyname(data->keycode));
@@ -2909,7 +2909,7 @@
  * Check if the given capability contains a given SGR attribute.
  */
 static void
-check_sgr_param(TERMTYPE2 *tp, int code, const char *name, char *value)
+check_sgr_param(TERMTYPE2 *tp, int code, const char *name, const char *const value)
 {
     if (VALID_STRING(value)) {
 	int ncv = ((code != 0) ? (1 << (code - 1)) : 0);
@@ -3111,7 +3111,7 @@
 }
 
 static int
-guess_ANSI_VTxx(TERMTYPE2 *tp)
+guess_ANSI_VTxx(const TERMTYPE2 *tp)
 {
     int result = -1;
     int checks = 0;
@@ -3151,7 +3151,7 @@
  */
 #if defined(user6) && defined(user7) && defined(user8) && defined(user9)
 static void
-check_user_6789(TERMTYPE2 *tp)
+check_user_6789(const TERMTYPE2 *tp)
 {
     /*
      * Check if the terminal is known to not 
@@ -3200,7 +3200,7 @@
     check_conflict(tp);
 
     for_each_string(j, tp) {
-	char *a = tp->Strings[j];
+	const char *a = tp->Strings[j];
 	if (VALID_STRING(a)) {
 	    const char *name = ExtStrname(tp, (int) j, strnames);
 	    /*
Index: progs/toe.c
Prereq:  1.89 
--- ncurses-6.5-20241006+/progs/toe.c	2023-07-01 17:04:46.000000000 +0000
+++ ncurses-6.5-20241019/progs/toe.c	2024-10-19 22:00:53.000000000 +0000
@@ -1,5 +1,5 @@
 /****************************************************************************
- * Copyright 2018-2022,2023 Thomas E. Dickey                                *
+ * Copyright 2018-2023,2024 Thomas E. Dickey                                *
  * Copyright 1998-2013,2017 Free Software Foundation, Inc.                  *
  *                                                                          *
  * Permission is hereby granted, free of charge, to any person obtaining a  *
@@ -45,7 +45,7 @@
 #include <hashed_db.h>
 #endif
 
-MODULE_ID("$Id: toe.c,v 1.89 2023/07/01 17:04:46 tom Exp $")
+MODULE_ID("$Id: toe.c,v 1.90 2024/10/19 22:00:53 tom Exp $")
 
 #define isDotname(name) (!strcmp(name, ".") || !strcmp(name, ".."))
 
@@ -265,10 +265,10 @@
 typedef void (DescHook) (int /* db_index */ ,
 			 int /* db_limit */ ,
 			 const char * /* term_name */ ,
-			 TERMTYPE2 * /* term */ );
+			 const TERMTYPE2 * /* term */ );
 
 static const char *
-term_description(TERMTYPE2 *tp)
+term_description(const TERMTYPE2 *tp)
 {
     const char *desc;
 
@@ -283,7 +283,7 @@
 
 /* display a description for the type */
 static void
-deschook(int db_index, int db_limit, const char *term_name, TERMTYPE2 *tp)
+deschook(int db_index, int db_limit, const char *term_name, const TERMTYPE2 *tp)
 {
     (void) db_index;
     (void) db_limit;
@@ -307,7 +307,7 @@
 }
 
 static unsigned long
-checksum_of(TERMTYPE2 *tp)
+checksum_of(const TERMTYPE2 *tp)
 {
     unsigned long result = string_sum(tp->term_names);
     unsigned i;
@@ -326,7 +326,7 @@
 
 /* collect data, to sort before display */
 static void
-sorthook(int db_index, int db_limit, const char *term_name, TERMTYPE2 *tp)
+sorthook(int db_index, int db_limit, const char *term_name, const TERMTYPE2 *tp)
 {
     TERMDATA *data = new_termdata();
 
@@ -385,7 +385,7 @@
 
 #if NCURSES_USE_DATABASE
 static char *
-copy_entryname(DIRENT * src)
+copy_entryname(const DIRENT * src)
 {
     size_t len = NAMLEN(src);
     char *result = malloc(len + 1);
@@ -411,7 +411,7 @@
 	if (_nc_is_dir_path(eargv[i])) {
 	    char *cwd_buf = 0;
 	    DIR *termdir;
-	    DIRENT *subdir;
+	    const DIRENT *subdir;
 
 	    if ((termdir = opendir(eargv[i])) == 0) {
 		(void) fflush(stdout);
@@ -428,7 +428,7 @@
 		size_t cwd_len;
 		char *name_1;
 		DIR *entrydir;
-		DIRENT *entry;
+		const DIRENT *entry;
 
 		name_1 = copy_entryname(subdir);
 		if (isDotname(name_1)) {
@@ -605,7 +605,7 @@
     bool direct_dependencies = FALSE;
     bool invert_dependencies = FALSE;
     bool header = FALSE;
-    char *report_file = 0;
+    const char *report_file = 0;
     int code;
     int this_opt, last_opt = '?';
     unsigned v_opt = 0;
Index: progs/tset.c
Prereq:  1.135 
--- ncurses-6.5-20241006+/progs/tset.c	2024-04-20 22:20:41.000000000 +0000
+++ ncurses-6.5-20241019/progs/tset.c	2024-10-19 21:40:28.000000000 +0000
@@ -98,7 +98,7 @@
 char *ttyname(int fd);
 #endif
 
-MODULE_ID("$Id: tset.c,v 1.135 2024/04/20 22:20:41 tom Exp $")
+MODULE_ID("$Id: tset.c,v 1.136 2024/10/19 21:40:28 tom Exp $")
 
 #ifndef environ
 extern char **environ;
@@ -543,7 +543,7 @@
 get_termcap_entry(int fd, char *userarg)
 {
     int errret;
-    char *p;
+    const char *p;
     const char *ttype;
 #if HAVE_PATH_TTYS
 #if HAVE_GETTTYNAM
@@ -676,7 +676,7 @@
 obsolete(char **argv)
 {
     for (; *argv; ++argv) {
-	char *parm = argv[0];
+	const char *parm = argv[0];
 
 	if (parm[0] == '-' && parm[1] == '\0') {
 	    argv[0] = strdup("-q");
Index: test/demo_menus.c
Prereq:  1.82 
--- ncurses-6.5-20241006+/test/demo_menus.c	2024-10-06 19:58:28.000000000 +0000
+++ ncurses-6.5-20241019/test/demo_menus.c	2024-10-19 21:53:57.000000000 +0000
@@ -27,7 +27,7 @@
  * authorization.                                                           *
  ****************************************************************************/
 /*
- * $Id: demo_menus.c,v 1.82 2024/10/06 19:58:28 tom Exp $
+ * $Id: demo_menus.c,v 1.83 2024/10/19 21:53:57 tom Exp $
  *
  * Demonstrate a variety of functions from the menu library.
  * Thomas Dickey - 2005/4/9
@@ -755,7 +755,7 @@
  * Move the menus around on the screen, to test mvwin().
  */
 static void
-move_menus(MENU * current, int by_y, int by_x)
+move_menus(NCURSES_CONST MENU * current, int by_y, int by_x)
 {
     if (move_menu(mpBanner, current, by_y, by_x) != ERR) {
 	erase();