]> ncurses.scripts.mit.edu Git - ncurses.git/blobdiff - man/legacy_coding.3x
ncurses 6.5 - patch 20240504
[ncurses.git] / man / legacy_coding.3x
index 6dfe1bb8c5d400b5fcfa1b8a96faff9bf742a2cb..ccfdd5564bb9cbbfd6dd4ce93a6a0e8c2713c195 100644 (file)
@@ -1,5 +1,5 @@
 .\"***************************************************************************
-.\" Copyright 2020-2022,2023 Thomas E. Dickey                                *
+.\" Copyright 2020-2023,2024 Thomas E. Dickey                                *
 .\" Copyright 2005-2016,2017 Free Software Foundation, Inc.                  *
 .\"                                                                          *
 .\" Permission is hereby granted, free of charge, to any person obtaining a  *
 .\"
 .\" Author: Thomas E. Dickey
 .\"
-.\" $Id: legacy_coding.3x,v 1.17 2023/09/16 23:38:39 tom Exp $
-.TH legacy_coding 3X 2023-09-16 "ncurses 6.4" "Library calls"
+.\" $Id: legacy_coding.3x,v 1.28 2024/04/20 19:13:50 tom Exp $
+.TH legacy_coding 3X 2024-04-20 "ncurses @NCURSES_MAJOR@.@NCURSES_MINOR@" "Library calls"
 .SH NAME
 \fB\%use_legacy_coding\fP \-
 override \fIcurses\fR locale encoding checks
 .SH SYNOPSIS
-\fB#include <curses.h>\fP
-.sp
-\fBint use_legacy_coding(int \fIlevel\fB);\fR
+.nf
+\fB#include <curses.h>
+.PP
+\fBint use_legacy_coding(int \fIlevel\fP);
+.fi
 .SH DESCRIPTION
-The \fBuse_legacy_coding\fP function is an extension to the curses library.
-It allows the caller to change the result of \fBunctrl\fP,
-and suppress related checks within the library that would normally
-cause nonprinting characters to be rendered in visible form.
-This affects only 8-bit characters.
+.B \%use_legacy_coding
+is an extension to the
+.I curses
+library.
+It allows the caller to change the result of \fB\%unctrl\fP(3X),
+suppressing \fI\%isprint\fP(3)-based checks within the library that
+would normally cause nonprinting characters to be rendered in visible
+form.
+The alteration affects only eight-bit characters.
 .PP
-The \fIlevel\fP parameter controls the result:
+The
+.I level
+parameter controls the result.
 .RS
 .TP 5
-0
-the library functions normally,
-rendering nonprinting characters as described in \fBunctrl\fP.
+.B 0
+The library functions normally,
+rendering nonprinting characters as described in \fB\%unctrl\fP(3X),
 .TP
-1
-the library ignores \fBisprintf\fP for codes in the range 160-255.
+.B 1
+the library ignores
+.I \%isprint
+for codes in the range 160-255.
 .TP
-2
-the library ignores \fBisprintf\fP for codes in the range 128-255.
-It also modifies the output of \fBunctrl\fP, showing codes in the
-range 128-159 as is.
+.B 2
+the library ignores
+.I \%isprint
+for codes in the range 128-255.
+It also modifies the output of \fB\%unctrl\fP(3X),
+showing codes in the range 128-159 as is.
 .RE
 .SH RETURN VALUE
 If the screen has not been initialized,
-or the \fIlevel\fP parameter is out of range,
-the function returns \fBERR\fP.
-Otherwise, it returns the previous level: \fB0\fP, \fB1\fP or \fB2\fP.
+or the
+.I level
+parameter is out of range,
+.B \%use_legacy_coding
+returns
+.BR ERR .
+Otherwise,
+it returns the previous level:
+.BR 0 ,
+.BR 1 ,
+or
+.BR 2 .
 .SH PORTABILITY
-This routine is specific to ncurses.
+.B \%use_legacy_coding
+is specific to
+.IR \%ncurses .
 It was not supported on Version 7, BSD or System V implementations.
-It is recommended that any code depending on ncurses extensions
-be conditioned using NCURSES_VERSION.
+Applications employing
+.I \%ncurses
+extensions should condition their use on the visibility of the
+.B \%NCURSES_VERSION
+preprocessor macro.
+.SH AUTHORS
+Thomas Dickey
+(to support \fI\%lynx\fP(1)'s font-switching feature).
 .SH SEE ALSO
-\fBunctrl\fP(3X).
-.SH AUTHOR
-Thomas Dickey (to support lynx's font-switching feature).
+\fB\%unctrl\fP(3X)