forked from cvpcs/android_external_libncurses
-
Notifications
You must be signed in to change notification settings - Fork 47
/
Copy pathannounce.html.in
2421 lines (1947 loc) · 77.4 KB
/
announce.html.in
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
<!--
$Id: announce.html.in,v 1.91 2015/08/08 19:27:17 tom Exp $
****************************************************************************
* Copyright (c) 1998-2013,2015 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 *
* "Software"), to deal in the Software without restriction, including *
* without limitation the rights to use, copy, modify, merge, publish, *
* distribute, distribute with modifications, sublicense, and/or sell *
* copies of the Software, and to permit persons to whom the Software is *
* furnished to do so, subject to the following conditions: *
* *
* The above copyright notice and this permission notice shall be included *
* in all copies or substantial portions of the Software. *
* *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
* IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
* DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
* OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
* THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
* *
* Except as contained in this notice, the name(s) of the above copyright *
* holders shall not be used in advertising or otherwise to promote the *
* sale, use or other dealings in this Software without prior written *
* authorization. *
****************************************************************************
-->
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta name="generator" content=
"HTML Tidy for Linux (vers 25 March 2009), see www.w3.org">
<title>Announcing ncurses @VERSION@</title>
<link rev="made" href="mailto:[email protected]">
<meta http-equiv="Content-Type" content=
"text/html; charset=us-ascii">
<style type="text/css">
p,li { max-width:700px; }
dd { max-width:630px; }
</style>
</head>
<body>
<h1 class="no-header">Announcing ncurses @VERSION@</h1>
<h2><a name="h2-overview" id="h2-overview">Overview</a></h2>
<p>The <em class="small-caps">ncurses</em> (new curses) library
is a free software emulation of curses in System V Release 4.0
(SVr4), and more. It uses terminfo format, supports pads and
color and multiple highlights and forms characters and
function-key mapping, and has all the other SVr4-curses
enhancements over BSD curses. SVr4 curses is better known today
as X/Open Curses.</p>
<p>In mid-June 1995, the maintainer of 4.4BSD curses declared
that he considered 4.4BSD curses obsolete, and encouraged the
keepers of <em class="small-caps">unix</em> releases such as
BSD/OS, FreeBSD and NetBSD to switch over to <em class=
"small-caps">ncurses</em>.</p>
<p>Since 1995, <em class="small-caps">ncurses</em> has been
ported to many systems:</p>
<ul>
<li>It is used in almost every system based on the Linux kernel
(aside from some embedded applications).</li>
<li>It is used as the system curses library on OpenBSD, FreeBSD
and OSX.</li>
<li>It is used in environments such as Cygwin and MinGW. The
first of these was EMX on OS/2 Warp.</li>
<li>It is used (though usually not as the <em>system</em>
curses) on all of the vendor <em class="small-caps">unix</em>
systems, e.g., AIX, HP-UX, IRIX64, SCO, Solaris, Tru64.</li>
<li>It should work readily on any ANSI/POSIX-conforming
<em class="small-caps">unix</em>.</li>
</ul>
<p>The distribution includes the library and support utilities,
including</p>
<ul>
<li><a href=
"http://invisible-island.net/ncurses/man/captoinfo.1m.html">captoinfo</a>,
a termcap conversion tool</li>
<li><a href=
"http://invisible-island.net/ncurses/man/clear.1.html">clear</a>,
utility for clearing the screen</li>
<li><a href=
"http://invisible-island.net/ncurses/man/infocmp.1m.html">infocmp</a>,
the terminfo decompiler</li>
<li><a href=
"http://invisible-island.net/ncurses/man/tabs.1.html">tabs</a>,
set tabs on a terminal</li>
<li><a href=
"http://invisible-island.net/ncurses/man/tic.1m.html">tic</a>,
the terminfo compiler</li>
<li><a href=
"http://invisible-island.net/ncurses/man/toe.1m.html">toe</a>,
list (table of) terminfo entries</li>
<li><a href=
"http://invisible-island.net/ncurses/man/tput.1.html">tput</a>,
utility for retrieving terminal capabilities in shell
scripts</li>
<li><a href=
"http://invisible-island.net/ncurses/man/tset.1.html">tset</a>,
to initialize the terminal</li>
</ul>
<p>Full manual pages are provided for the library and tools.</p>
<p>The <em class="small-caps">ncurses</em> distribution is
available via anonymous FTP at the GNU distribution site</p>
<blockquote>
<p><a href=
"ftp://ftp.gnu.org/gnu/ncurses/">ftp://ftp.gnu.org/gnu/ncurses/</a> .</p>
</blockquote>It is also available at
<blockquote>
<p><a href=
"ftp://invisible-island.net/ncurses/">ftp://invisible-island.net/ncurses/</a> .</p>
</blockquote>
<h2><a name="h2-release-notes" id="h2-release-notes">Release
Notes</a></h2>
<p>These notes are for <em class="small-caps">ncurses</em>
@VERSION@, released <strong>August 8, 2015</strong>.</p>
<p>This release is designed to be source-compatible with
<em class="small-caps">ncurses</em> 5.0 through 5.9; providing a
new application binary interface (ABI). Although the source can
still be configured to support the <em class=
"small-caps">ncurses</em> 5 ABI, the intent of the release is to
provide extensions which are generally useful, but
binary-incompatible with <em class="small-caps">ncurses</em>
5:</p>
<ul>
<li>
<p>Extend the <code>cchar_t</code> structure to allow more
than 16 colors to be encoded.</p>
</li>
<li>
<p>Modify the encoding of mouse state to make room for a 5th
mouse button. That allows one to use <em class=
"small-caps">ncurses</em> with a wheel mouse with xterm or
similar X terminal emulators.</p>
</li>
</ul>
<p>There are, of course, numerous other improvements,
including</p>
<ul>
<li>
<p>fixes made based on the Clang and Coverity static
analyzers.</p>
</li>
<li>
<p>memory leak fixes using Valgrind</p>
</li>
</ul>
<p>The release notes mention some bug-fixes, but are focused on
new features and improvements to existing features log since
<em class="small-caps">ncurses</em> 5.9 release.</p>
<p>While the intent of the release is to provide a new stable
ABI, there are other development activities which are summarized
below.</p>
<ul>
<li>
<p>The original release plan, e.g., for "5.10" was to improve
the MinGW port. Ultimately that was completed (wide-character
support, mouse, etc), but was deferred to focus on termcap
support and performance issues. Also, pinpointing the
problems with <code>Console2</code> took a while.</p>
</li>
<li>
<p>A review of termcap compatibility in 2011 led to several
minor fixes in the library and improvements to utilities. To
do this properly, a review of the various extent termcap
implementations was needed.</p>
<p>The <a href=
"http://invisible-island.net/ncurses/tctest.html">termcap
library checker (tctest)</a> (not part of <em class=
"small-caps">ncurses</em>) was one result. A followup review
of performance using <a href=
"http://invisible-island.net/ncurses/ncurses-examples.html">ncurses-examples</a>
in 2014 led to additional improvements.</p>
</li>
<li>
<p>Output buffering provided a further, but worthwhile
distraction. A bug report in 2012 regarding the use of signal
handlers in <em class="small-caps">ncurses</em>) pointed out
<a href=
"http://lists.gnu.org/archive/html/bug-ncurses/2012-07/msg00029.html">
a problem</a> with the use of unsafe functions for handling
<code>SIGTSTP</code>. Other signals could be addressed with
workarounds; repairing <code>SIGTSTP</code> required a
different approach. The solution required changing internal
behavior of the library: how it handles output buffering.</p>
<p>Now <em class="small-caps">ncurses</em> buffers its own
output, independently of the standard output. A few
applications relied upon the library's direct reuse of the
standard output buffering; however that is
<em>unspecified</em> behavior and has never been a
recommended practice. Identifying these applications as well
as refining the change to permit low-level applications to
work consistently took time.</p>
</li>
<li>
<p>Since the introduction of the experimental support for 256
colors early in <a href=
"http://invisible-island.net/ncurses/NEWS.html#t20050101">2005</a>
(released in <a href=
"http://invisible-island.net/ncurses/announce-5.5.html">ncurses
5.5</a>), there has been increased user interest. Almost all
packagers continue providing the ncurses ABI 5 which cannot
support 256 colors.</p>
</li>
<li>
<p>Symbol versioning, or the lack of it in ncurses, is the
main reason why packagers would be reluctant to add a new
ncurses ABI.</p>
<p>This release provides the new ABI along with
script-generated lists of versioned symbols which can be used
for both ABI 5 and 6 (with distinct names to keep the two
separate). This took time to development, as reported in
<a href=
"http://invisible-island.net/ncurses/ncurses-mapsyms.html">Symbol
versioning in <em class="small-caps">ncurses</em></a>.</p>
</li>
</ul>
<h3><a name="h3-library" id="h3-library">Library
improvements</a></h3>
<h3><a name="h3-lib-setbuf" id="h3-lib-setbuf">Output
buffering</a></h3>
<p>X/Open curses provides more than one initialization
function:</p>
<ul>
<li><a href=
"http://invisible-island.net/ncurses/man/curs_initscr.3x.html#h3-initscr">
initscr</a> (the simplest) accepts no parameters.</li>
<li><a href=
"http://invisible-island.net/ncurses/man/curs_initscr.3x.html#h3-newterm">
newterm</a> accepts parameters for the stream input and
output</li>
<li><a href=
"http://invisible-island.net/ncurses/man/curs_terminfo.3x.html#h3-Initialization">
setupterm</a> (the low-level function) accepts a parameter for
the <em>file descriptor</em> of the output.</li>
</ul>
<p>They are documented in X/Open <em>as if</em>
<code>initscr</code> calls <code>newterm</code> using
<code>stdout</code> for output stream, and in turn
<code>newterm</code> calls <code>setupterm</code> using
<code>fileno(stdout)</code> for the file descriptor. As long as
an implementation acts <em>as if</em> it does this, it conforms.
In practice, implementations do what is implied. This creates a
problem: the low-level <code>setupterm</code> function's file
descriptor is unbuffered, while <code>newterm</code> implies
buffered output. X/Open Curses says that all output is done
through the file descriptor, and does not say how the output
stream is actually used.</p>
<p>Initially, <em class="small-caps">ncurses</em> used the file
descriptor (obtained from the output stream passed to
<code>newterm</code>) for changing the terminal modes, and relied
upon the output parameter of <code>newterm</code> for buffered
output. Later (to avoid using unsafe buffered I/O in signal
handlers), <em class="small-caps">ncurses</em> was modified to
use the file descriptor (unbuffered output) when cleaning up on
receipt of a signal. Otherwise (when not handling a signal), it
continued to use the buffered output.</p>
<p>That approach worked reasonably well and as a side effect,
using the same buffered output as an application might use for
<code>printf</code> meant that no flushing was needed when
switching between normal- and screen-modes.</p>
<p>There were a couple of problems:</p>
<ul>
<li>
<p>to get good performance, curses (not only <em class=
"small-caps">ncurses</em>, but SVr4 curses in general) set an
output buffer using <code>setbuf</code> or similar function.
There is no standard (or portable) way to turn that output
buffer off, and revert to line-buffering. The <code><a href=
"http://invisible-island.net/ncurses/man/ncurses.3x.html#h3-NCURSES_NO_SETBUF">
NCURSES_NO_SETBUF</a></code> environment variable did make it
optional.</p>
</li>
<li>
<p>to handle <code>SIGTSTP</code> (the “stop”
signal), <em class="small-caps">ncurses</em> relied upon
unsafe functions. That is, due to the complexity of the
feature, it relied upon reusing existing functions which
should not have been called via the signal handler.</p>
</li>
</ul>
<p>Conveniently, solving the second problem (by making <em class=
"small-caps">ncurses</em> do its <em>own</em> output buffering)
also fixed the first one. But there were special cases to
resolve: <a href=
"http://invisible-island.net/ncurses/man/curs_terminfo.3x.html"><em>
low-level</em></a> functions such as mvcur, putp, vidattr
explicitly use the standard output. Those functions were reused
internally, and required modification to distinguish whether they
were used by the high-level or low-level interfaces.</p>
<p>Finally, there may still be a few programs which should be
modified to improve their portability, e.g., adding an</p>
<blockquote>
<pre class="code-block">
fflush(stdout);
</pre>
</blockquote>
<p>when switching from “<a href=
"http://invisible-island.net/ncurses/man/curs_kernel.3x.html#h3-reset_prog_mode_-reset_shell_mode">shell</a>”
mode to “<a href=
"http://invisible-island.net/ncurses/man/curs_kernel.3x.html#h3-reset_prog_mode_-reset_shell_mode">program</a>”
(curses) mode. Those are fairly rare because most programmers
have learned not to mix <code>printf</code> and <code><a href=
"http://invisible-island.net/ncurses/man/curs_printw.3x.html">printw</a></code>.</p>
<h3><a name="h3-lib-versioning" id="h3-lib-versioning">Symbol
versioning</a></h3>
<p>This release introduces symbol-versioning to <em class=
"small-caps">ncurses</em> because without it, the change of ABI
would be less successful. A lengthy discussion will be presented
in <a href=
"http://invisible-island.net/ncurses/ncurses-mapsyms.html">Symbol
versioning in <em class="small-caps">ncurses</em></a>. These
notes summarize what has changed, and what can be done with the
new release.</p>
<p>Symbol-versioning allows the developers of a library to mark
each public symbol (both data and functions) with an identifier
denoting the library name and the version for which it was built.
By doing this, users of the library have a way to help ensure
that applications do not accidentally load an incompatible
library. In addition, private symbols can be hidden entirely.</p>
<p>This release provides sample files for the four principal
configurations of <em class="small-caps">ncurses</em> libraries:
<code>ncurses</code>, <code>ncursesw</code>,
<code>ncursest</code> and <code>ncursestw</code>. Each sample is
given in two forms:</p>
<blockquote>
<dl>
<dt>“<code>.map</code>”</dt>
<dd>These list all public symbols, together with version
names.</dd>
<dt>“<code>.sym</code>”</dt>
<dd>These list all public symbols, without version
names.</dd>
</dl>
</blockquote>
<p>The sample files are <em>generated</em> by scripts which take
into account a few special cases such as <a href=
"http://invisible-island.net/ncurses/tack.html">tack</a> to omit
many of the <em class="small-caps">ncurses</em> private symbols
(beginning with “<code>_nc_</code>”). Here are
counts of globals versus locals:</p>
<blockquote>
<table border="1" summary="Total global and local symbols">
<tr>
<th>Config</th>
<th>Symbols</th>
<th>Globals</th>
<th>Locals</th>
<th>"_nc_"</th>
</tr>
<tr>
<td>ncurses</td>
<td align="right">976</td>
<td align="right">796</td>
<td align="right">180</td>
<td align="right">332</td>
</tr>
<tr>
<td>ncursesw</td>
<td align="right">1089</td>
<td align="right">905</td>
<td align="right">184</td>
<td align="right">343</td>
</tr>
<tr>
<td>ncursest</td>
<td align="right">979</td>
<td align="right">804</td>
<td align="right">175</td>
<td align="right">358</td>
</tr>
<tr>
<td>ncursestw</td>
<td align="right">1098</td>
<td align="right">914</td>
<td align="right">184</td>
<td align="right">372</td>
</tr>
</table>
</blockquote>
<p>Although only four sample configurations are presented, each
is formed by merging symbols from several combinations of
configure-script options, taking into account advice from
downstream packagers. Because they are formed by merging, the
sample files may list a symbol which is not in a given package.
That is expected. The samples have been tested and are working
with systems (such as Fedora, FreeBSD and Debian) which fully
support this feature. There are other systems which do
<em>not</em> support the feature, and a few (such as Solaris)
which provide incomplete support.</p>
<p>The version-naming convention used allows these sample files
to build distinct libraries for ABI 5 and 6. Version names
consist of</p>
<ul>
<li>
<p>configuration name, e.g.,
“<code>NCURSESW</code>” for the wide-character
libraries</p>
</li>
<li>
<p>ABI version (if not 5)</p>
</li>
<li>
<p>library name for two special cases which have the same
interface across configurations:
“<code>TINFO</code>” and
“<code>TIC</code>”</p>
</li>
<li>
<p>release version</p>
</li>
<li>
<p>patch date (for the release version)</p>
</li>
</ul>
<p>For example, running <code>nm -D</code> on the libraries in
the ncurses6 test package shows these symbol-versions:</p>
<blockquote>
<pre class="code-block">
0000000000000000 A NCURSES6_TIC_5.0.19991023
0000000000000000 A NCURSES6_TIC_5.1.20000708
0000000000000000 A NCURSES6_TIC_5.5.20051010
0000000000000000 A NCURSES6_TIC_5.7.20081102
0000000000000000 A NCURSES6_TIC_5.9.20150530
0000000000000000 A NCURSES6_TINFO_5.0.19991023
0000000000000000 A NCURSES6_TINFO_5.1.20000708
0000000000000000 A NCURSES6_TINFO_5.2.20001021
0000000000000000 A NCURSES6_TINFO_5.3.20021019
0000000000000000 A NCURSES6_TINFO_5.4.20040208
0000000000000000 A NCURSES6_TINFO_5.5.20051010
0000000000000000 A NCURSES6_TINFO_5.6.20061217
0000000000000000 A NCURSES6_TINFO_5.7.20081102
0000000000000000 A NCURSES6_TINFO_5.8.20110226
0000000000000000 A NCURSES6_TINFO_5.9.20150530
0000000000000000 A NCURSESW6_5.1.20000708
0000000000000000 A NCURSESW6_5.3.20021019
0000000000000000 A NCURSESW6_5.4.20040208
0000000000000000 A NCURSESW6_5.5.20051010
0000000000000000 A NCURSESW6_5.6.20061217
0000000000000000 A NCURSESW6_5.7.20081102
0000000000000000 A NCURSESW6_5.8.20110226
0000000000000000 A NCURSESW6_5.9.20150530
</pre>
</blockquote>
<p>As a special case, this release (which makes the final change
for ABI 5) is marked with release version 5.9 and patch date
20150530.</p>
<h3><a name="h3-lib-other" id=
"h3-lib-other">Miscellaneous</a></h3>
<p>The new release has several improvements for performance and
building. For instance:</p>
<ul>
<li>
<p>several files in ncurses- and progs-directories were
modified to allow <code>const</code> data used in internal
tables to be put by the linker into the readonly text
segment.</p>
</li>
<li>
<p>various improvements were made to building the Ada95
binding, both in simplifying the generated files as well as
improving the way it uses <code>gnatmake</code></p>
</li>
</ul>
<p>There are also new features in the libraries:</p>
<ul>
<li>added <a href=
"http://invisible-island.net/ncurses/man/curs_util.3x.html#h3-use_tioctl">
use_tioctl</a> function</li>
<li>
<p>added <a href=
"http://invisible-island.net/ncurses/man/curs_opaque.3x.html">
wgetdelay</a> to retrieve _delay member of WINDOW if it
happens to be opaque, e.g., in the pthread configuration.</p>
</li>
<li>
<p>added <a href=
"http://invisible-island.net/ncurses/man/curs_attr.3x.html#h2-PORTABILITY">
A_ITALIC</a> extension.</p>
</li>
<li>
<p>added form library extension <a href=
"http://invisible-island.net/ncurses/man/form_field_opts.3x.html">
O_DYNAMIC_JUSTIFY</a> option which can be used to override
the different treatment of justification for static versus
dynamic fields .</p>
</li>
<li>
<p>rewrote <a href=
"http://invisible-island.net/ncurses/man/curs_util.3x.html#h3-putwin_getwin">
putwin</a> and <a href=
"http://invisible-island.net/ncurses/man/curs_util.3x.html#h3-putwin_getwin">
getwin</a>, making an extended version which is capable of
reading screen-dumps between the wide/normal <em class=
"small-caps">ncurses</em> configurations. These are text
files, except for a <em>magic</em> code at the beginning:</p>
<blockquote>
<pre class="code-block">
0 string \210\210 Screen-dump (ncurses)
</pre>
</blockquote>
</li>
<li>
<p>several changes to mouse support include:</p>
<ul>
<li>added decoder for xterm SGR 1006 mouse mode.</li>
<li>added experimental support for
“<code>%u</code>” format to terminfo.</li>
<li>improved behavior of wheel-mice for xterm protocol:
noting that there are only button-presses for buttons
“4” and “5”, so there is no need to
wait to combine events into double-clicks .</li>
</ul>
</li>
</ul>
<p>There are a few new configure options dealing with library
customization:</p>
<ul>
<li>
<p>add “<code>--enable-ext-putwin</code>”
configure option to turn on the extended putwin/getwin. By
default, this is enabled for ABI 6 and disabled with ABI
5.</p>
</li>
<li>
<p>add “<code>--enable-string-hacks</code>”
option to control whether strlcat and strlcpy may be used.
Because <em class="small-caps">ncurses</em> already does the
requisite buffer-limit checks, this feature is mainly of
interest to quiet compiler-warnings on a few systems.</p>
</li>
<li>
<p>add configure option
“<code>--with-tparm-arg</code>” to allow <a href=
"http://invisible-island.net/ncurses/man/curs_terminfo.3x.html#h3-Formatting-Output">
tparm</a>'s parameters to be something more likely to be the
same size as a pointer, e.g., <code>intptr_t</code> (again,
the default is set for ABI 6).</p>
</li>
</ul>
<h3><a name="h3-programs" id="h3-programs">Program
improvements</a></h3>
<h4><a name="h4-utilities" id="h4-utilities">Utilities</a></h4>
<p>Most of the termcap-related changes based on development of
<a href="http://invisible-island.net/ncurses/tctest.html">tctest
(termcap library checker)</a> are implemented in the tic and
infocmp programs rather than affecting the library. As noted in
the <a href=
"http://invisible-island.net/ncurses/tctest.html#my-better-translation">
discussion</a> of <code>tctest</code>, <em class=
"small-caps">ncurses</em>'s ability to translate between terminfo
and termcap formats has been improved at different times, but
subject to feedback from "real" termcap users. There are very few
of those. Nowadays, virtually all <em>termcap</em> users are
using <em class="small-caps">ncurses</em> (or NetBSD, with its
own terminfo library) and their programs are actually using
terminfo rather than termcap data.</p>
<p>Still, there are a few. A comment about the translation of the
ASCII <code>NUL</code> character prompted a review:</p>
<ul>
<li>
<p>Both terminfo and termcap store string capabilities as
<code>NUL</code>-terminated strings.</p>
</li>
<li>
<p>In terminfo, a <code>\0</code> in a terminal description
is stored as <code>\200</code>.</p>
</li>
<li>
<p>There are no (known) terminals which would behave
differently when sent <code>\0</code> or
<code>\200</code>.</p>
</li>
<li>
<p>When translating to terminfo format (or displaying a
printable version of an entry using infocmp), <em class=
"small-caps">ncurses</em> shows <code>\200</code> as
<code>\0</code>.</p>
</li>
<li>
<p>It has done this since 1998 (quoting from the NEWS
file):</p>
<blockquote>
<pre class="code-block">
<a href=
"http://invisible-island.net/ncurses/NEWS.html#t980103">980103</a>
...
+ modify _nc_tic_expand() to generate \0 rather than \200.
...
+ correct translation of terminfo "^@", to \200, like \0.
</pre>
</blockquote>
</li>
<li>
<p>However, the <code>_nc_tic_expand</code> function (which
optionally produces terminfo or termcap format) did not
address this special case for termcap. Even the later 4.4BSD
<a href=
"https://svnweb.freebsd.org/base/head/lib/libc/gen/getcap.c?revision=244092&view=markup#l784">
cgetstr</a> interprets a <code>\0</code> literally, ending
<em>that</em> string (rather than using the terminfo
improvement).</p>
</li>
</ul>
<p>As a result of the review, several improvements were made to
<em class="small-caps">ncurses</em> translation to/from termcap
format — and improving the checks made in tic for
consistency of entries. Most of these are not of general
interest, except for two new command-line options for tic and
infocmp:</p>
<ul>
<li>
<p>the “<code>-0</code>” option generates
termcap/terminfo source on a single line.</p>
</li>
<li>
<p>the “<code>-K</code>” option provides stricter
BSD-compatibility for termcap output.</p>
</li>
</ul>
<p>Other user-visible improvements and new features include:</p>
<ul>
<li>
<p>added “<code>-D</code>” option to tic and
infocmp, to show the database locations that it could
use.</p>
</li>
<li>
<p>added “<code>-s</code>” option to toe, to sort
its output.</p>
</li>
<li>
<p>extended “<code>-c</code>” and
“<code>-n</code>” options of infocmp to allow
comparing more than two entries.</p>
</li>
<li>
<p>modified toe's report when “<code>-a</code>”
and “<code>-s</code>” options are combined, to
add a column showing which entries belong to a given
database.</p>
</li>
<li>
<p>modified the clear program to take into account the
“<code>E3</code>” extended capability to clear
the terminal's scrollback buffer.</p>
</li>
</ul>
<h4><a name="h4-examples" id="h4-examples">Examples</a></h4>
<p>Along with the library and utilities, many improvements were
made to the <a href=
"http://invisible-island.net/ncurses/ncurses-examples.html">ncurses-examples</a>.
Some were made to allow building (and comparison-testing) against
NetBSD curses and PDCurses. Both lack some of the X/Open Curses
features, necessitating customization. But this activity was
useful because it showed some remaining performance issues (which
have been resolved in this release).</p>
<p>These changes were made to verify compatibility or compare
performance of <em class="small-caps">ncurses</em>:</p>
<ul>
<li>
<p>made workarounds for compiling test-programs with NetBSD
curses, though it lacks some common functions such as
<a href="http://invisible-island.net/ncurses/man/curs_util.3x.html#h3-use_env">
use_env</a>.</p>
</li>
<li>
<p>added dots_termcap test-program</p>
</li>
<li>
<p>added dots_curses test-program, for comparison with the
low-level examples.</p>
</li>
<li>
<p>added test_setupterm test-proram to demonstrate
normal/error returns from the setupterm and restartterm
functions.</p>
</li>
<li>
<p>added “<code>-d</code>”,
“<code>-e</code>” and
“<code>-q</code>” options to the demo_terminfo
and demo_termcap test-programs.</p>
</li>
<li>
<p>added “<code>-y</code>” option to demo_termcap
and test/demo_terminfo test-programs to demonstrate behavior
with/without extended capabilities.</p>
</li>
<li>
<p>modified demo_termcap and demo_terminfo test-programs to
make their options more directly comparable, and add
“<code>-i</code>” option to specify a terminal
description filename to parse for names to lookup.</p>
</li>
<li>
<p>rewrote the tests for <a href=
"http://invisible-island.net/ncurses/man/curs_window.3x.html#h3-derwin">
mvderwin</a> and test for recursive <a href=
"http://invisible-island.net/ncurses/man/curs_window.3x.html#h3-mvwin">
mvwin</a> in the movewindow test-program.</p>
</li>
</ul>
<p>These changes were made to help with the MinGW port:</p>
<ul>
<li>
<p>added test-screens to the ncurses test-program to show
256-characters at a time, to help with MinGW port.</p>
</li>
<li>
<p>modified the view test-program to load UTF-8 when built
with MinGW by using regular win32 API because the MinGW
functions mblen and mbtowc do not work.</p>
</li>
<li>
<p>added “<code>-s</code>” option to the view
test-program to allow it to start in single-step mode,
reducing size of trace files when it is used for debugging
MinGW changes.</p>
</li>
</ul>
<p>These changes were made to verify new extensions in <em class=
"small-caps">ncurses</em>:</p>
<ul>
<li>
<p>added <a href=
"http://invisible-island.net/ncurses/man/form_driver.3x.html#h3-form_driver_w">
form_driver_w</a> entrypoint to wide-character forms library,
as well as form_driver_w test-program.</p>
</li>
<li>
<p>modified ncurses test-program's b/B tests to display lines
only for the attributes which a given terminal supports, to
make room for an italics test.</p>
</li>
<li>
<p>modified ncurses test-program, adding
“<code>-E</code>” and
“<code>-T</code>” options to demonstrate use_env
versus use_tioctl.</p>
</li>
<li>
<p>modified ncurses test-program's c/C tests to cycle through
subsets of the total number of colors, to better illustrate
8/16/88/256-colors by providing directly comparable
screens.</p>
</li>
<li>
<p>modified the ncurses test-program to also show position
reports in 'a' test.</p>
</li>
</ul>
<p>These changes were made to make the examples more useful:</p>
<ul>
<li>
<p>added scripts for building dpkg and rpm test-packages</p>
</li>
<li>
<p>modified the hanoi test-program to show the minimum number
of moves possible for the given number of tiles.</p>
</li>
<li>
<p>modified the knight test-program to show the number of
choices possible for each position in automove option, e.g.,
to allow user to follow Warnsdorff's rule to solve the
puzzle.</p>
</li>
</ul>
<h3><a name="h3-database" id="h3-database">Terminal
database</a></h3>
<p>This release provides improvements to tic's
“<code>-c</code>” checking option, which was used for
example to</p>
<ul>
<li>
<p>make <code>sgr</code> in several entries agree with other
caps.</p>
</li>
<li>
<p>correct padding in some entries where earlier versions had
miscounted the number of octal digits.</p>
</li>
</ul>
<p>There are several new terminal descriptions:</p>
<ul>
<li><a href=
"http://invisible-island.net/ncurses/terminfo.src.html#toc-_M_L_T_E_R_M">
mlterm</a> is now aliased to mlterm3</li>
<li><a href=
"http://invisible-island.net/ncurses/terminfo.src.html#tic-nsterm">
nsterm</a> is now derived from nsterm-256color</li>
<li><a href=
"http://invisible-island.net/ncurses/terminfo.src.html#tic-putty-sco">
putty-sco</a></li>
<li><a href=
"http://invisible-island.net/ncurses/terminfo.src.html#tic-teken">
teken</a> is FreeBSD's "xterm" console.</li>
<li><a href=
"http://invisible-island.net/ncurses/terminfo.src.html#toc-_T_E_R_M_I_N_A_T_O_R">
terminator</a></li>
<li><a href=
"http://invisible-island.net/ncurses/terminfo.src.html#toc-_T_E_R_M_I_N_O_L_O_G_Y">
terminology</a></li>
<li><a href=
"http://invisible-island.net/ncurses/terminfo.src.html#tic-tmux">
tmux</a> is derived from screen.</li>
<li>several screen.XXX entries support the respective
variations for 256 colors.</li>
<li><a href=
"http://invisible-island.net/ncurses/terminfo.src.html#toc-_S_I_M_P_L_E_T_E_R_M">
simpleterm</a> is now 0.5</li>
<li><a href=
"http://invisible-island.net/ncurses/terminfo.src.html#tic-vte">
vte</a> is aliased to vte-2012</li>
<li><a href=