|
|
@ -44,8 +44,9 @@ int callgmtmodule(void *api, const char *module, struct GMT_OPTION *opts, std::s |
|
|
|
pthread_t wthr; |
|
|
|
pthread_t wthr; |
|
|
|
struct gmtworkthreadpars p; |
|
|
|
struct gmtworkthreadpars p; |
|
|
|
int *pret; |
|
|
|
int *pret; |
|
|
|
|
|
|
|
int ret=0; |
|
|
|
|
|
|
|
|
|
|
|
if(0!=pipe(pipefd)) {*pret=-1; goto end;} |
|
|
|
if(0!=pipe(pipefd)) {ret=-1; goto end;} |
|
|
|
p.api=api; |
|
|
|
p.api=api; |
|
|
|
p.module=module; |
|
|
|
p.module=module; |
|
|
|
p.opts=opts; |
|
|
|
p.opts=opts; |
|
|
@ -60,6 +61,7 @@ int callgmtmodule(void *api, const char *module, struct GMT_OPTION *opts, std::s |
|
|
|
pthread_join(wthr,reinterpret_cast<void**>(&pret)); |
|
|
|
pthread_join(wthr,reinterpret_cast<void**>(&pret)); |
|
|
|
|
|
|
|
|
|
|
|
end: |
|
|
|
end: |
|
|
|
|
|
|
|
if(0!=ret) return ret; |
|
|
|
return *pret; |
|
|
|
return *pret; |
|
|
|
} |
|
|
|
} |
|
|
|
// Overloaded variant with opts as std::string
|
|
|
|
// Overloaded variant with opts as std::string
|
|
|
|