提交 d50a9d15 编写于 作者: S Shengliang Guan

TD-1090

上级 9f3ccbb2
......@@ -98,9 +98,9 @@ struct _script_t;
typedef struct _cmd_t {
int16_t cmdno;
int16_t nlen;
char name[MAX_SIM_CMD_NAME_LEN];
bool (*parseCmd)(char *, struct _cmd_t *, int);
bool (*executeCmd)(struct _script_t *script, char *option);
char name[MAX_SIM_CMD_NAME_LEN];
bool (*parseCmd)(char *, struct _cmd_t *, int);
bool (*executeCmd)(struct _script_t *script, char *option);
struct _cmd_t *next;
} SCommand;
......@@ -120,7 +120,7 @@ typedef struct _var_t {
} SVariable;
typedef struct _script_t {
int type;
int type;
bool killed;
void *taos;
......@@ -130,10 +130,10 @@ typedef struct _script_t {
char system_exit_code[12];
char system_ret_content[MAX_SYSTEM_RESULT_LEN];
int varLen;
int linePos; // current cmd position
int numOfLines; // number of lines in the script
int bgScriptLen;
int varLen;
int linePos; // current cmd position
int numOfLines; // number of lines in the script
int bgScriptLen;
char fileName[MAX_FILE_NAME_LEN]; // script file name
char error[MAX_ERROR_LEN];
char *optionBuffer;
......
......@@ -33,7 +33,8 @@ enum {
/* label stack */
typedef struct {
int16_t pos[MAX_NUM_LABLES]; /* the position of the label */
char top; /* number of labels */
int16_t pos[MAX_NUM_LABLES]; /* the position of the label */
char label[MAX_NUM_LABLES][MAX_LABEL_LEN]; /* name of the label */
} SLabel;
......@@ -41,12 +42,12 @@ typedef struct {
typedef struct {
char top; /* the number of blocks stacked */
char type[MAX_NUM_BLOCK]; /* the block type */
int16_t *pos[MAX_NUM_BLOCK]; /* position of the jump for if/elif/case */
int16_t back[MAX_NUM_BLOCK]; /* go back, endw and continue */
int16_t *pos[MAX_NUM_BLOCK]; /* position of the jump for if/elif/case */
int16_t back[MAX_NUM_BLOCK]; /* go back, endw and continue */
char numJump[MAX_NUM_BLOCK];
int16_t *jump[MAX_NUM_BLOCK][MAX_NUM_JUMP]; /* break or elif */
char sexp[MAX_NUM_BLOCK][40]; /*switch expression */
char sexpLen[MAX_NUM_BLOCK]; /*switch expression length */
char sexp[MAX_NUM_BLOCK][40]; /*switch expression */
char sexpLen[MAX_NUM_BLOCK]; /*switch expression length */
} SBlock;
bool simParseExpression(char *token, int lineNum);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册