X-Git-Url: http://ncurses.scripts.mit.edu/?a=blobdiff_plain;f=man%2Fcurs_insch.3x;h=73c34a908746cc6df4193ab6ad6611fa430db2ef;hb=725169bda4d3b4c3fde0d4a94f76d017812c7ea6;hp=37903968e1d69c95cba7858ee588965e5a753f58;hpb=894a177fd5228cdbe790bd1dc9435bd435c29681;p=ncurses.git diff --git a/man/curs_insch.3x b/man/curs_insch.3x index 37903968..73c34a90 100644 --- a/man/curs_insch.3x +++ b/man/curs_insch.3x @@ -1,5 +1,5 @@ .\"*************************************************************************** -.\" Copyright 2018-2022,2023 Thomas E. Dickey * +.\" Copyright 2018-2023,2024 Thomas E. Dickey * .\" Copyright 1998-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_insch.3x,v 1.33 2023/10/07 21:19:07 tom Exp $ -.TH curs_insch 3X 2023-10-07 "ncurses 6.4" "Library calls" +.\" $Id: curs_insch.3x,v 1.38 2024/03/16 15:35:01 tom Exp $ +.TH curs_insch 3X 2024-03-16 "ncurses @NCURSES_MAJOR@.@NCURSES_MINOR@" "Library calls" .ie \n(.g \{\ .ds `` \(lq .ds '' \(rq @@ -47,39 +47,61 @@ insert a \fIcurses\fR character in a window .SH SYNOPSIS .nf -\fB#include +\fB#include \fP .PP \fBint insch(chtype \fIch\fP); \fBint winsch(WINDOW *\fIwin\fP, chtype \fIch\fP); -.PP \fBint mvinsch(int \fIy\fP, int \fIx\fP, chtype \fIch\fP); \fBint mvwinsch(WINDOW *\fIwin\fP, int \fIy\fP, int \fIx\fP, chtype \fIch\fP); .fi .SH DESCRIPTION -These routines insert the character \fIch\fP before the character under the -cursor. -All characters to the right of the cursor are moved one space to the -right, with the possibility of the rightmost character on the line being lost. -The insertion operation does not change the cursor position. -.SH RETURN VALUE -All routines that return an integer return \fBERR\fP upon failure and \fBOK\fP -(SVr4 specifies only "an integer value other than \fBERR\fP") -upon successful completion, -unless otherwise noted in the preceding routine descriptions. +These functions insert the +.I curses +character +.I ch +at the cursor in the specified window +.I win +(or +.BR \%stdscr ). +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. +.SH "RETURN VALUE" +These functions return \fBOK\fP on success and \fBERR\fP on failure. +.PP +Functions taking a +.I \%WINDOW +pointer argument fail if the pointer is +.BR NULL . .PP -Functions with a \*(``mv\*('' prefix first perform a cursor movement using -\fBwmove\fP, and return an error if the position is outside the window, -or if the window pointer is null. +Functions prefixed with \*(``mv\*('' first perform cursor movement using +\fB\%wmove\fP and fail if the position +.RI ( y , +.IR x ) +is outside the window. .SH NOTES -These routines do not necessarily imply use of a hardware insert character -feature. +A terminal's +.B \%insert_character +.RB ( ich1 ) +capability +is not necessarily employed. .PP -Note that \fBinsch\fP, \fBmvinsch\fP, and \fBmvwinsch\fP may be macros. +\fB\%insch\fP, +\fB\%mvinsch\fP, +and +\fB\%mvwinsch\fP +may be implemented as macros. .SH PORTABILITY -These functions are described in the XSI Curses standard, Issue 4. -.SH SEE ALSO -\fB\%curses\fP(3X) +X/Open Curses, Issue 4, describes these functions. +.PP +SVr4 describes successful return values only as +\*(``an integer value other than \fBERR\fP\*(''. +.SH "SEE ALSO" +\fB\%curs_ins_wch\fP(3X) describes comparable functions in the +wide-character +.I curses +configuration. .PP -Comparable functions in the wide-character (ncursesw) library are -described in -\fB\%curs_ins_wch\fP(3X). +\fB\%curses\fP(3X), +\fB\%terminfo\fP(5)