X-Git-Url: http://ncurses.scripts.mit.edu/?a=blobdiff_plain;f=man%2Flegacy_coding.3x;h=ccfdd5564bb9cbbfd6dd4ce93a6a0e8c2713c195;hb=00dd248b527ad47f0fc3b0776a0889da0ac926d0;hp=0fbd5c96d99411968410350671a26f59cdc25506;hpb=16fbf3f4f7d96b6ee6bf9159b22f26e05962aa3d;p=ncurses.git diff --git a/man/legacy_coding.3x b/man/legacy_coding.3x index 0fbd5c96..ccfdd556 100644 --- a/man/legacy_coding.3x +++ b/man/legacy_coding.3x @@ -1,5 +1,5 @@ .\"*************************************************************************** -.\" Copyright 2020-2021,2022 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 * @@ -29,47 +29,75 @@ .\" .\" Author: Thomas E. Dickey .\" -.\" $Id: legacy_coding.3x,v 1.11 2022/02/12 20:07:56 tom Exp $ -.TH legacy_coding 3X "" +.\" $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 -\fBuse_legacy_coding\fP \- override locale-encoding checks +\fB\%use_legacy_coding\fP \- +override \fIcurses\fR locale encoding checks .SH SYNOPSIS -\fB#include \fP -.sp -\fBint use_legacy_coding(int \fIlevel\fB);\fR +.nf +\fB#include +.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)