146 for(i=le->
cur_pos; i<(j-1); i++) {
147 le->
buf[i] = le->
buf[i+1];
181 le->
buf[i-1] = le->
buf[i];
260 for(i=j; i>=(int)le->
cur_pos; i--) {
261 le->
buf[i] = le->
buf[i-1];
267 for(i=le->
cur_pos; i<=j; i++) {
323 if(le->
buf[i] != 0) {
342 if(le->
buf[i] != 0) {
355 void insert_str_lineedit(
struct st_lineedit *le,
uchar *str,
unsigned int len)
359 for(i=0; i<len; i++) {
unsigned char uchar
GadgetSeedの文字(列)は unsigned char 型となる
unsigned int cur_pos
カーソル位置
uchar buf[GSC_SHELL_MAX_LINE_COLUMS+1]
編集中文字列
void init_lineedit(struct st_lineedit *le)
lineeditを初期化する
int do_lineedit(struct st_lineedit *le, uchar ch)
リターンを受けるまでの1行編集を行う 1文字づつデータを入れる
unsigned int strleng(const uchar *str)
文字列長
int cputc(unsigned char td)
標準出力より1文字を出力する
void set_str_lineedit(struct st_lineedit *le, uchar *str)
編集文字列を設定する
void new_lineedit(struct st_lineedit *le)
編集中のエディタを初期化(コマンド実行後にバッファ破棄)
#define GSC_SHELL_MAX_LINE_COLUMS
$gsc shellコマンドラインの最大文字数
void draw_lineedit(struct st_lineedit *le)
表示する