提交 37c11dd8 编写于 作者: S Shengliang Guan

TD-1090 first version of windows 32 client

上级 3fb64ca0
...@@ -108,7 +108,7 @@ int32_t tscCreateDataBlock(size_t initialSize, int32_t rowSize, int32_t startOff ...@@ -108,7 +108,7 @@ int32_t tscCreateDataBlock(size_t initialSize, int32_t rowSize, int32_t startOff
void tscDestroyDataBlock(STableDataBlocks* pDataBlock); void tscDestroyDataBlock(STableDataBlocks* pDataBlock);
void tscSortRemoveDataBlockDupRows(STableDataBlocks* dataBuf); void tscSortRemoveDataBlockDupRows(STableDataBlocks* dataBuf);
SParamInfo* tscAddParamToDataBlock(STableDataBlocks* pDataBlock, char type, uint8_t timePrec, short bytes, SParamInfo* tscAddParamToDataBlock(STableDataBlocks* pDataBlock, char type, uint8_t timePrec, int16_t bytes,
uint32_t offset); uint32_t offset);
void* tscDestroyBlockArrayList(SArray* pDataBlockList); void* tscDestroyBlockArrayList(SArray* pDataBlockList);
......
...@@ -234,7 +234,7 @@ typedef struct { ...@@ -234,7 +234,7 @@ typedef struct {
char * curSql; // current sql, resume position of sql after parsing paused char * curSql; // current sql, resume position of sql after parsing paused
int8_t parseFinished; int8_t parseFinished;
short numOfCols; int16_t numOfCols;
uint32_t allocSize; uint32_t allocSize;
char * payload; char * payload;
int32_t payloadLen; int32_t payloadLen;
......
...@@ -404,7 +404,7 @@ void tscDestroyDataBlock(STableDataBlocks* pDataBlock) { ...@@ -404,7 +404,7 @@ void tscDestroyDataBlock(STableDataBlocks* pDataBlock) {
taosTFree(pDataBlock); taosTFree(pDataBlock);
} }
SParamInfo* tscAddParamToDataBlock(STableDataBlocks* pDataBlock, char type, uint8_t timePrec, short bytes, SParamInfo* tscAddParamToDataBlock(STableDataBlocks* pDataBlock, char type, uint8_t timePrec, int16_t bytes,
uint32_t offset) { uint32_t offset) {
uint32_t needed = pDataBlock->numOfParams + 1; uint32_t needed = pDataBlock->numOfParams + 1;
if (needed > pDataBlock->numOfAllocedParams) { if (needed > pDataBlock->numOfAllocedParams) {
......
...@@ -63,7 +63,7 @@ typedef struct tstr { ...@@ -63,7 +63,7 @@ typedef struct tstr {
extern const int32_t TYPE_BYTES[11]; extern const int32_t TYPE_BYTES[11];
// TODO: replace and remove code below // TODO: replace and remove code below
#define CHAR_BYTES sizeof(char) #define CHAR_BYTES sizeof(char)
#define SHORT_BYTES sizeof(short) #define SHORT_BYTES sizeof(int16_t)
#define INT_BYTES sizeof(int) #define INT_BYTES sizeof(int)
#define LONG_BYTES sizeof(int64_t) #define LONG_BYTES sizeof(int64_t)
#define FLOAT_BYTES sizeof(float) #define FLOAT_BYTES sizeof(float)
......
...@@ -424,7 +424,10 @@ typedef struct SColumnInfo { ...@@ -424,7 +424,10 @@ typedef struct SColumnInfo {
int16_t type; int16_t type;
int16_t bytes; int16_t bytes;
int16_t numOfFilters; int16_t numOfFilters;
SColumnFilterInfo *filters; union{
int64_t placeholder;
SColumnFilterInfo *filters;
};
} SColumnInfo; } SColumnInfo;
typedef struct STableIdInfo { typedef struct STableIdInfo {
......
...@@ -26,7 +26,7 @@ typedef void* tthread_h; ...@@ -26,7 +26,7 @@ typedef void* tthread_h;
typedef struct { typedef struct {
int numOfThreads; int numOfThreads;
uint32_t serverIp; uint32_t serverIp;
short port; int16_t port;
int bufferSize; int bufferSize;
void (*processBrokenLink)(void *ahandle); void (*processBrokenLink)(void *ahandle);
int (*processIncomingMsg)(void *ahandle, void *buffer); int (*processIncomingMsg)(void *ahandle, void *buffer);
......
...@@ -96,8 +96,8 @@ enum { ...@@ -96,8 +96,8 @@ enum {
struct _script_t; struct _script_t;
typedef struct _cmd_t { typedef struct _cmd_t {
short cmdno; int16_t cmdno;
short nlen; int16_t nlen;
char name[MAX_SIM_CMD_NAME_LEN]; char name[MAX_SIM_CMD_NAME_LEN];
bool (*parseCmd)(char *, struct _cmd_t *, int); bool (*parseCmd)(char *, struct _cmd_t *, int);
bool (*executeCmd)(struct _script_t *script, char *option); bool (*executeCmd)(struct _script_t *script, char *option);
...@@ -105,11 +105,11 @@ typedef struct _cmd_t { ...@@ -105,11 +105,11 @@ typedef struct _cmd_t {
} SCommand; } SCommand;
typedef struct { typedef struct {
short cmdno; int16_t cmdno;
short jump; // jump position int16_t jump; // jump position
short errorJump; // sql jump flag, while '-x' exist in sql cmd, this flag int16_t errorJump; // sql jump flag, while '-x' exist in sql cmd, this flag
// will be SQL_JUMP_TRUE, otherwise is SQL_JUMP_FALSE */ // will be SQL_JUMP_TRUE, otherwise is SQL_JUMP_FALSE */
short lineNum; // correspodning line number in original file int16_t lineNum; // correspodning line number in original file
int optionOffset; // relative option offset int optionOffset; // relative option offset
} SCmdLine; } SCmdLine;
......
...@@ -33,21 +33,20 @@ enum { ...@@ -33,21 +33,20 @@ enum {
/* label stack */ /* label stack */
typedef struct { typedef struct {
char top; /* number of labels */ int16_t pos[MAX_NUM_LABLES]; /* the position of the label */
short pos[MAX_NUM_LABLES]; /* the position of the label */ char label[MAX_NUM_LABLES][MAX_LABEL_LEN]; /* name of the label */
char label[MAX_NUM_LABLES][MAX_LABEL_LEN]; /* name of the label */
} SLabel; } SLabel;
/* block definition */ /* block definition */
typedef struct { typedef struct {
char top; /* the number of blocks stacked */ char top; /* the number of blocks stacked */
char type[MAX_NUM_BLOCK]; /* the block type */ char type[MAX_NUM_BLOCK]; /* the block type */
short *pos[MAX_NUM_BLOCK]; /* position of the jump for if/elif/case */ int16_t *pos[MAX_NUM_BLOCK]; /* position of the jump for if/elif/case */
short back[MAX_NUM_BLOCK]; /* go back, endw and continue */ int16_t back[MAX_NUM_BLOCK]; /* go back, endw and continue */
char numJump[MAX_NUM_BLOCK]; char numJump[MAX_NUM_BLOCK];
short *jump[MAX_NUM_BLOCK][MAX_NUM_JUMP]; /* break or elif */ int16_t *jump[MAX_NUM_BLOCK][MAX_NUM_JUMP]; /* break or elif */
char sexp[MAX_NUM_BLOCK][40]; /*switch expression */ char sexp[MAX_NUM_BLOCK][40]; /*switch expression */
char sexpLen[MAX_NUM_BLOCK]; /*switch expression length */ char sexpLen[MAX_NUM_BLOCK]; /*switch expression length */
} SBlock; } SBlock;
bool simParseExpression(char *token, int lineNum); bool simParseExpression(char *token, int lineNum);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册