You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
31 lines
661 B
31 lines
661 B
9 years ago
|
#include <pthread.h>
|
||
|
#include <unistd.h>
|
||
|
#include <gmt.h>
|
||
|
#include <string.h>
|
||
|
#include "common.h"
|
||
|
|
||
|
// Workaround exit() in GMT_Call_Module. May need because return mode of gmt api is not very reliable
|
||
|
#if defined MODGMT_WORKAROUND_EXIT
|
||
|
#define GMTMODE 0
|
||
|
#else
|
||
|
#define GMTMODE 3
|
||
|
#endif
|
||
|
|
||
|
// here we save header and footer of gmt-produced eps files
|
||
|
std::string header,footer;
|
||
|
|
||
|
// Parameters for working thread
|
||
|
struct gmtworkthreadpars
|
||
|
{
|
||
|
void* api;
|
||
|
const char* module;
|
||
|
struct GMT_OPTION* opts;
|
||
|
int fd;
|
||
|
int ret;
|
||
|
};
|
||
|
|
||
|
extern "C" {
|
||
|
EXPORT int gmt_module_init(void* p);
|
||
|
}
|
||
|
|
||
|
int callgmtmodule(void *api, const char *module, struct GMT_OPTION *opts, std::string& res);
|