EN JA
curs_ins_wstr(3X)
curs_ins_wstr(3X) curs_ins_wstr(3X)

名称

ins_wstr, ins_nwstr, wins_wstr, wins_nwstr, mvins_wstr, mvins_nwstr, mvwins_wstr, mvwins_nwstr -ワイド文字列を curses ウィンドウに挿入する

書式


#include <curses.h>
 

int ins_wstr(const wchar_t * wstr);
 

int ins_nwstr(const wchar_t * wstr , int n );
 

int wins_wstr(WINDOW * win , const wchar_t * wstr );
 

int wins_nwstr(WINDOW * win , const wchar_t * wstr , int n );
 

int mvins_wstr(int y , int x , const wchar_t * wstr );
 

int mvins_nwstr(int y , int x , const wchar_t * wstr , int n );
 

int mvwins_wstr(WINDOW * win , int y , int x , const wchar_t * wstr );
 

int mvwins_nwstr(WINDOW * win , int y , int x , const wchar_t * wstr , int n );

解説

これらのルーチンは、カーソルの下の文字の前に (行に合うのと同じ文字数の) wchar_t 文字列を挿入します。カーソルの右のすべての文字は、行の一番右の文字が失われる可能性がある状態で、右にシフトされます。行の折り返しは実行されません。 (指定されるなら yx 移動した後に) カーソル位置は変化しません。最後の引数としての n がある 4 つのルーチンは、多くても n wchar_t 文字の先頭の部分文字列を挿入します。 n が 1 未満であるなら、全体の文字列が挿入されます。

wstr の文字がタブ、改行、復帰改行またはバックスペースであるなら、カーソルは、ウィンドウ内で適切に移動されます。また、改行は、移動する前に、 clrtoeol を行います。タブは、8 カラム毎であると見なされます。 wstr の文字が別の制御文字であるなら、 ^X 記法で表現されます。制御文字 (必要なら、それに移動して) を追加した後に win_wch を呼び出すことは、制御文字を返しませんが、代わりに制御文字の ^-表現 (^-representation) の文字を返します。

winsXnwstr のほかはすべてマクロであるかもしれないことに注意してください。

文字列中の最初の文字がスペーシング文字でないなら、これらの関数は失敗します。 XSI は、制御文字にスペーシングでない文字が続くなら、何が起こるかを定義していません。

戻り値

成功して終了すれば、これらの関数は OK を返します。そうでなければ、それらは ERR を返します。

関連項目

curses(3X), curs_insstr(3X), curs_in_wch(3X), curs_ins_wch(3X).