diff options
Diffstat (limited to 'man/curs_ins_wch.3x')
| -rw-r--r-- | man/curs_ins_wch.3x | 110 |
1 files changed, 70 insertions, 40 deletions
diff --git a/man/curs_ins_wch.3x b/man/curs_ins_wch.3x index 90b03f64f4d1..a4194eaf27fb 100644 --- a/man/curs_ins_wch.3x +++ b/man/curs_ins_wch.3x @@ -1,5 +1,5 @@ .\"*************************************************************************** -.\" Copyright 2019-2023,2024 Thomas E. Dickey * +.\" Copyright 2019-2024,2025 Thomas E. Dickey * .\" Copyright 2002-2010,2017 Free Software Foundation, Inc. * .\" * .\" Permission is hereby granted, free of charge, to any person obtaining a * @@ -27,8 +27,8 @@ .\" authorization. * .\"*************************************************************************** .\" -.\" $Id: curs_ins_wch.3x,v 1.30 2024/04/20 19:18:18 tom Exp $ -.TH curs_ins_wch 3X 2024-04-20 "ncurses @NCURSES_MAJOR@.@NCURSES_MINOR@" "Library calls" +.\" $Id: curs_ins_wch.3x,v 1.52 2025/10/21 00:09:49 tom Exp $ +.TH curs_ins_wch 3X 2025-10-20 "ncurses @NCURSES_MAJOR@.@NCURSES_MINOR@" "Library calls" .ie \n(.g \{\ .ds `` \(lq .ds '' \(rq @@ -39,41 +39,64 @@ .ie t .ds '' '' .el .ds '' "" .\} +. +.de bP +.ie n .IP \(bu 4 +.el .IP \(bu 2 +.. .SH NAME \fB\%ins_wch\fP, +\fB\%wins_wch\fP, \fB\%mvins_wch\fP, -\fB\%mvwins_wch\fP, -\fB\%wins_wch\fP \- +\fB\%mvwins_wch\fP \- insert a \fIcurses\fR complex character in a window .SH SYNOPSIS .nf \fB#include <curses.h>\fP .PP -\fBint ins_wch(const cchar_t *\fIwch\fP); -\fBint wins_wch(WINDOW *\fIwin\fP, const cchar_t *\fIwch\fP); -\fBint mvins_wch(int \fIy\fP, int \fIx\fP, const cchar_t *\fIwch\fP); -\fBint mvwins_wch(WINDOW *\fIwin\fP, int \fIy\fP, int \fIx\fP, const cchar_t *\fIwch\fP); +\fBint ins_wch(const cchar_t * \fIwch\fP); +\fBint wins_wch(WINDOW * \fIwin\fP, const cchar_t * \fIwch\fP); +\fBint mvins_wch(int \fIy\fP, int \fIx\fP, const cchar_t * \fIwch\fP); +\fBint mvwins_wch(WINDOW * \fIwin\fP, int \fIy\fP, int \fIx\fP, const cchar_t * \fIwch\fP); .fi .SH DESCRIPTION -These functions insert the +.B \%wins_wch +inserts the .I curses complex character .I wch -at the cursor in the specified window -.I win -(or -.BR \%stdscr ). +at the cursor position in the window +.IR win "." The character previously at the cursor and any to its right move one cell to the right; -the rightmost character on the line is discarded. -The cursor does not advance. +the formerly rightmost character on the line is discarded. +Unlike \fB\%add_wch\fP(3X), +.B \%wins_wch +does not advance the cursor. +\fB\%ncurses\fP(3X) describes the variants of this function. .SH "RETURN VALUE" -These functions return \fBOK\fP on success and \fBERR\fP on failure. +These functions return +.B OK +on success and +.B ERR +on failure. .PP -Functions taking a +In +.IR \%ncurses , +they return +.B ERR +if +.bP +the +.I curses +screen has not been initialized, +or +.bP +(for functions taking a .I \%WINDOW -pointer argument fail if the pointer is -.BR NULL . +pointer argument) +.I win +is a null pointer. .PP Functions prefixed with \*(``mv\*('' first perform cursor movement and fail if the position @@ -81,30 +104,37 @@ fail if the position .IR x ) is outside the window boundaries. .SH NOTES -A terminal's -.B \%insert_character -.RB ( ich1 ) -capability -is not necessarily employed. -.PP -\fB\%ins_wch\fP, -\fB\%mvins_wch\fP, +.BR \%ins_wch "," +.BR \%mvins_wch "," and -\fB\%mvwins_wch\fP +.B \%mvwins_wch may be implemented as macros. -.SH PORTABILITY -X/Open Curses, -Issue 4 describes these functions. .PP -SVr4 describes successful return values only as -\*(``an integer value other than \fBERR\fP\*(''. +.I curses +does not necessarily employ the terminal's +.B \%insert_character +.RB ( ich1 ) +capability to achieve insertion. +.SH PORTABILITY +X/Open Curses Issue\ 4 describes these functions. +It specifies no error conditions for them. .SH HISTORY -SVr4 (1989) implemented these functions under the names -.BR inswch , -.BR winswch , -.BR mvinswch , -and -.BR mvwinswch . +X/Open Curses Issue\ 4 (1995) initially specified these functions. +The System\ V Interface Definition Version\ 4 +of the same year +specified a function named +.I \%winswch +(and the usual variants). +.\" SVID 4, vol 3., p. 512 +This was a later addition to +.RI SVr4. x , +not appearing in the first SVr4 (1989). +It differed from X/Open's later +.I \%wins_wch +in that it took an argument of type +.I \%chtype +instead of +.IR \%cchar_t "." .SH "SEE ALSO" \fB\%curs_insch\fP(3X) describes comparable functions in the non-wide-character |
