fix: typos
This commit is contained in:
parent
f7169103c8
commit
c85da8dc3a
|
@ -24,13 +24,13 @@ void pressTabKey(SShellCmd* cmd);
|
|||
// press othr key
|
||||
void pressOtherKey(char c);
|
||||
|
||||
// init shell auto funciton , shell start call once
|
||||
// init shell auto function , shell start call once
|
||||
bool shellAutoInit();
|
||||
|
||||
// set conn
|
||||
void shellSetConn(TAOS* conn);
|
||||
|
||||
// exit shell auto funciton, shell exit call once
|
||||
// exit shell auto function, shell exit call once
|
||||
void shellAutoExit();
|
||||
|
||||
// callback autotab module
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
//
|
||||
// The prefix search tree is a efficient storage words and search words tree, it support 95 visible ascii code character
|
||||
//
|
||||
#define FIRST_ASCII 40 // first visiable char is '0'
|
||||
#define FIRST_ASCII 40 // first visible char is '0'
|
||||
#define LAST_ASCII 122 // last visilbe char is 'z'
|
||||
|
||||
// capacity save char is 95
|
||||
|
|
|
@ -264,7 +264,7 @@ char* key_tags[] = {"tags("};
|
|||
char* key_select[] = {"select "};
|
||||
|
||||
//
|
||||
// ------- gobal variant define ---------
|
||||
// ------- global variant define ---------
|
||||
//
|
||||
int32_t firstMatchIndex = -1; // first match shellCommands index
|
||||
int32_t lastMatchIndex = -1; // last match shellCommands index
|
||||
|
@ -603,7 +603,7 @@ void GenerateVarType(int type, char** p, int count) {
|
|||
// -------------------- shell auto ----------------
|
||||
//
|
||||
|
||||
// init shell auto funciton , shell start call once
|
||||
// init shell auto function , shell start call once
|
||||
bool shellAutoInit() {
|
||||
// command
|
||||
int32_t count = SHELL_COMMAND_COUNT();
|
||||
|
@ -636,7 +636,7 @@ bool shellAutoInit() {
|
|||
// set conn
|
||||
void shellSetConn(TAOS* conn) { varCon = conn; }
|
||||
|
||||
// exit shell auto funciton, shell exit call once
|
||||
// exit shell auto function, shell exit call once
|
||||
void shellAutoExit() {
|
||||
// free command
|
||||
int32_t count = SHELL_COMMAND_COUNT();
|
||||
|
@ -653,7 +653,7 @@ void shellAutoExit() {
|
|||
}
|
||||
}
|
||||
taosThreadMutexUnlock(&tiresMutex);
|
||||
// destory
|
||||
// destroy
|
||||
taosThreadMutexDestroy(&tiresMutex);
|
||||
|
||||
// free threads
|
||||
|
@ -674,7 +674,7 @@ void shellAutoExit() {
|
|||
//
|
||||
// ------------------- auto ptr for tires --------------------------
|
||||
//
|
||||
bool setNewAuotPtr(int type, STire* pNew) {
|
||||
bool setNewAutoPtr(int type, STire* pNew) {
|
||||
if (pNew == NULL) return false;
|
||||
|
||||
taosThreadMutexLock(&tiresMutex);
|
||||
|
@ -717,7 +717,7 @@ void putBackAutoPtr(int type, STire* tire) {
|
|||
if (tires[type] != tire) {
|
||||
// update by out, can't put back , so free
|
||||
if (--tire->ref == 1) {
|
||||
// support multi thread getAuotPtr
|
||||
// support multi thread getAutoPtr
|
||||
freeTire(tire);
|
||||
}
|
||||
|
||||
|
@ -775,7 +775,7 @@ int writeVarNames(int type, TAOS_RES* tres) {
|
|||
} while (row != NULL);
|
||||
|
||||
// replace old tire
|
||||
setNewAuotPtr(type, tire);
|
||||
setNewAutoPtr(type, tire);
|
||||
|
||||
return numOfRows;
|
||||
}
|
||||
|
@ -1043,7 +1043,7 @@ SWords* matchCommand(SWords* input, bool continueSearch) {
|
|||
for (int32_t i = 0; i < count; i++) {
|
||||
SWords* shellCommand = shellCommands + i;
|
||||
if (continueSearch && lastMatchIndex != -1 && i <= lastMatchIndex) {
|
||||
// new match must greate than lastMatchIndex
|
||||
// new match must greater than lastMatchIndex
|
||||
if (varMode && i == lastMatchIndex) {
|
||||
// do nothing, var match on lastMatchIndex
|
||||
} else {
|
||||
|
@ -1172,7 +1172,7 @@ void createInputFromFirst(SWords* input, SWords* firstMatch) {
|
|||
for (int i = 0; i < firstMatch->matchIndex && word; i++) {
|
||||
// combine source from each word
|
||||
strncpy(input->source + input->source_len, word->word, word->len);
|
||||
strcat(input->source, " "); // append blank splite
|
||||
strcat(input->source, " "); // append blank space
|
||||
input->source_len += word->len + 1; // 1 is blank length
|
||||
// move next
|
||||
word = word->next;
|
||||
|
@ -1401,7 +1401,7 @@ bool appendAfterSelect(TAOS* con, SShellCmd* cmd, char* sql, int32_t len) {
|
|||
return true;
|
||||
}
|
||||
|
||||
// fill funciton
|
||||
// fill function
|
||||
if (fieldEnd) {
|
||||
// fields is end , need match keyword
|
||||
ret = fillWithType(con, cmd, last, WT_VAR_KEYWORD);
|
||||
|
@ -1584,7 +1584,7 @@ bool matchCreateTable(TAOS* con, SShellCmd* cmd) {
|
|||
|
||||
// tb options
|
||||
if (!ret) {
|
||||
// find like create talbe st (...) tags(..) <here is fill tb option area>
|
||||
// find like create table st (...) tags(..) <here is fill tb option area>
|
||||
char* p1 = strchr(ps, ')'); // first ')' end
|
||||
if (p1) {
|
||||
if (strchr(p1 + 1, ')')) { // second ')' end
|
||||
|
|
|
@ -1128,7 +1128,7 @@ int32_t shellExecute() {
|
|||
}
|
||||
|
||||
if (tsem_init(&shell.cancelSem, 0, 0) != 0) {
|
||||
printf("failed to create cancel semphore\r\n");
|
||||
printf("failed to create cancel semaphore\r\n");
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue