提交 b1f98271 编写于 作者: S slguan

Modify grammatical errors in some example codes

上级 57492cc1
......@@ -24,7 +24,7 @@
#include <unistd.h>
#include <string.h>
#include <taos/taos.h>
#include <taos.h>
int points = 5;
int numOfTables = 3;
......
......@@ -20,7 +20,7 @@
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <taos/taos.h> // TAOS header file
#include <taos.h> // TAOS header file
void taosMsleep(int mseconds);
......
......@@ -3,7 +3,7 @@
ROOT=./
TARGET=exe
LFLAGS = '-Wl,-rpath,/usr/local/lib/taos/' -ltaos -lpthread -lm -lrt
LFLAGS = '-Wl,-rpath,/usr/local/taos/driver' -ltaos -lpthread -lm -lrt
CFLAGS = -O3 -g -Wall -Wno-deprecated -fPIC -Wno-unused-result -Wconversion -Wno-char-subscripts -D_REENTRANT -Wno-format -D_REENTRANT -DLINUX -msse4.2 -Wno-unused-function -D_M_X64 -std=gnu99
all: $(TARGET)
......
......@@ -16,7 +16,9 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <taos/taos.h> // include TDengine header file
#include <pthread.h>
#include <unistd.h>
#include <taos.h> // include TDengine header file
typedef struct {
char server_ip[64];
......@@ -25,7 +27,7 @@ typedef struct {
} param;
int g_thread_exit_flag = 0;
int insert_rows(void *sarg);
void* insert_rows(void *sarg);
void streamCallBack(void *param, TAOS_RES *res, TAOS_ROW row)
{
......@@ -46,7 +48,6 @@ int main(int argc, char *argv[])
char db_name[64];
char tbl_name[64];
char sql[1024] = { 0 };
char command[1024] = { 0 };
if (argc != 4) {
printf("usage: %s server-ip dbname tblname\n", argv[0]);
......@@ -72,7 +73,7 @@ int main(int argc, char *argv[])
strcpy(t_param->tbl_name, tbl_name);
pthread_t pid;
pthread_create(&pid, NULL, insert_rows, t_param);
pthread_create(&pid, NULL, (void * (*)(void *))insert_rows, t_param);
sleep(3); // waiting for database is created.
// open connection to database
......@@ -118,7 +119,7 @@ int main(int argc, char *argv[])
}
int insert_rows(void *sarg)
void* insert_rows(void *sarg)
{
TAOS *taos;
char command[1024] = { 0 };
......
......@@ -19,7 +19,7 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <taos/taos.h> // include TDengine header file
#include <taos.h> // include TDengine header file
int main(int argc, char *argv[])
{
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册