Jump to content United States-English
HP.com Home Products and Services Support and Drivers Solutions How to Buy
» Contact HP
More options
HP.com home
HP-UX Reference > I


HP-UX 11i Version 3: February 2007

Technical documentation

» Feedback
Content starts here

 » Table of Contents

 » Index


innstr, instr, mvinnstr, mvinstr, mvwinnstr, mvwinstr, winnstr, winstr — input a multi-byte character string from a window


#include <curses.h>

int innstr(char *str, int n);

int instr(char *str);

int mvinnstr(int y, int x, char *str, int n);

int mvinstr(int y, int x, char *str);

int mvwinnstr(WINDOW *win, int y, int x, char *str, int n);

int mvwinstr(WINDOW *win, int y, int x, char *str);

int winnstr(WINDOW *win, char *str, int n);

int winstr(WINDOW *win, char *str);


These functions place a string of characters from the current or specified window into the array pointed to by str, starting at the current or specified position and ending at the end of the line.

The innstr(), mvinnstr(), mvwinnstr() and winnstr() functions store at most n bytes in the string pointed to by str.

The innstr(), mvinnstr(), mvwinnstr() and winnstr() functions will only store the entire multi-byte sequence associated with a character. If the array is large enough to contain at least one character the array is filled with complete characters. If the array is not large enough to contain any complete characters, the function fails.


Upon successful completion, instr(), mvinstr(), mvwinstr() and winstr() return OK.

Upon successful completion, innstr(), mvinnstr(), mvwinnstr() and winnstr() return the number of characters actually read into the string.

Otherwise, all these functions return ERR.


No errors are defined.


Since multi-byte characters may be processed, there might not be a one-to-one correspondence between the number of column positions on the screen and the number of bytes returned.

These functions do not return rendition information.

Reading a line that overflows the array pointed to by str with instr(), mvinstr(), mvwinstr() or winstr() causes undefined results. The use of innstr(), mvinnstr(), mvwinnstr() or winnstr(), respectively, is recommended.




First released in X/Open Curses, Issue 4.

Printable version
Privacy statement Using this site means you accept its terms Feedback to webmaster
© 1983-2007 Hewlett-Packard Development Company, L.P.