diff --git a/test/gmttest.cpp b/test/gmttest.cpp index beaf607..1dbe498 100644 --- a/test/gmttest.cpp +++ b/test/gmttest.cpp @@ -3,6 +3,7 @@ #include #include #include +#include int print_func(FILE* fd, const char* str) { @@ -10,57 +11,27 @@ int print_func(FILE* fd, const char* str) return 0; } - -int main() +void* thr(void* p) { - char* text="GMT"; - //void* out; - void* gmtapi; - std::string args="-R130/160/40/60 -JM12c -Xa2c -Ya2c -B5/5/swNE --GMT_HISTORY=f --FONT_ANNOT_PRIMARY=14p,Times-Bold,red"; - struct GMT_OPTION* opts; - int io,ret; - char fname[16]; - int pipefd[2]; - std::string out; - char buffer[4096]; - pid_t pid; - - gmtapi=GMT_Create_Session(text,2,0,print_func); - //io=GMT_Register_IO(gmtapi,GMT_IS_TEXTSET,GMT_IS_DUPLICATE,GMT_IS_NONE,GMT_OUT,0,0); - //GMT_Encode_ID(gmtapi,fname,io); - opts=GMT_Create_Options(gmtapi,0,(void*)args.c_str()); - //ret=GMT_Init_IO(gmtapi,GMT_IS_TEXTSET,GMT_IS_NONE,GMT_OUT,5,0,opts); - std::cout<