#include "modgmt.h" #include "modgmt_func.h" #include "modgmt_internals.h" // Initialisation function int gmt_module_init(void* p) { // Fill header and footer void* gmtapi; int ret=0; gmtapi=GMT_Create_Session("gmt_makemap",2,GMTMODE,0); if(0==gmtapi) return 1; if(0==ret) ret=callgmtmodule(gmtapi,"psclip","-C -P -K",&header,gmt_filter_headfoot); if(0==ret) ret=callgmtmodule(gmtapi,"psclip","-C -P -O",&footer,gmt_filter_headfoot); GMT_Destroy_Session(gmtapi); if(0!=ret) return ret; gmt_projection::FillProjNames(); if(!gmt_font::FillFontNames()) return 1; RegisterFunction("GMT_Header",GMT_Header); RegisterFunction("GMT_Footer",GMT_Footer); RegisterFunction("GET",Get); RegisterFunction("GET",Get); RegisterFunction("GET",Get); RegisterFunction("GET",Get); RegisterFunction("GET",Get); RegisterFunction("GET",Get); RegisterFunction("GET",Get); RegisterFunction("GET",Get); RegisterFunction("Coord",GMT_Type); RegisterFunction("Region",GMT_Type); RegisterFunction("Projection",GMT_Type); RegisterFunction("Color",GMT_Type); RegisterFunction("ColorGray",GMT_ColorGray); RegisterFunction("ColorRGB",GMT_ColorRGB); RegisterFunction("ColorHSV",GMT_ColorHSV); RegisterFunction("ColorCMYK",GMT_ColorCMYK); RegisterFunction("Pen",GMT_Type); RegisterFunction("Font",GMT_Type); return 0; }