#include #include #include #include #include "export.h" #include "idl2f77.h" /* int IDL_Load(void) * Define message codes and their corresponding printf(3) format * strings. Note that message codes start at zero and each one is * one less that the previous one. Codes must be monotonic and * contiguous. Must match the corresponding entries in IDLtoC.h */ static IDL_MSG_DEF msg_arr[] = { {"F77_ERROR", "%NError: %s."}, {"F77_NOSTRINGARRAY", "%NString arrays not allowed %s"}, }; /* * The load function fills in this message block handle with the * opaque handle to the message block used for this module. The other * routines can then use it to throw errors from this block. */ IDL_MSG_BLOCK msg_block; int IDL_Load(void) { /*define the message block*/ if (!(msg_block = IDL_MessageDefineBlock("IDL2F77", ARRLEN(msg_arr), msg_arr))) { return IDL_FALSE; } /*Call the startup function to add the routines to IDL.*/ if (!F77_start()){ IDL_MessageFromBlock(msg_block, F77_ERROR, IDL_MSG_RET,"Unable to initialize IDL2F77 dlm"); } return IDL_TRUE; }