GadgetSeed  0.9.6
history.h
[詳解]
1 /** @file
2  @brief コマンドヒストリ
3 
4  @date 2007.03.18
5  @author Takashi SHUDO
6 */
7 
8 #ifndef HISTORY_H
9 #define HISTORY_H
10 
11 #include "sysconfig.h"
12 #include "lineedit.h"
13 
14 #ifndef GSC_SHELL_MAX_COM_HIS
15 #define GSC_SHELL_MAX_COM_HIS 8 ///< $gsc shellコマンドヒストリの数
16 #endif
17 
18 struct st_history {
19  uchar his_buf[GSC_SHELL_MAX_COM_HIS+1][GSC_SHELL_MAX_LINE_COLUMS+1]; ///< ヒストリバッファ
20  short pos; ///< 現在表示編集中のヒストリ
21  short num; ///< 記録されているヒストリ数
22 }; ///< コマンドヒストリ
23 
24 void init_history(struct st_history *his);
25 void save_history(struct st_history *his, uchar *com);
26 void foward_history(struct st_history *his, struct st_lineedit *le);
27 void back_history(struct st_history *his, struct st_lineedit *le);
28 
29 #endif // HISTORY_H
unsigned char uchar
GadgetSeedの文字(列)は unsigned char 型となる
Definition: str.h:13
ラインエディタ
Definition: lineedit.h:30
ラインエディタ
コマンドヒストリ
Definition: history.h:18
short num
記録されているヒストリ数
Definition: history.h:21
short pos
現在表示編集中のヒストリ
Definition: history.h:20
uchar his_buf[GSC_SHELL_MAX_COM_HIS+1][GSC_SHELL_MAX_LINE_COLUMS+1]
ヒストリバッファ
Definition: history.h:19
#define GSC_SHELL_MAX_LINE_COLUMS
$gsc shellコマンドラインの最大文字数
Definition: lineedit.h:16