00001 /* 00002 * mex_api_extras.h: mex header file 00003 * 00004 * function templates for routines/APIs that are NOT in the standard 00005 * matlab API, but that are needed to make mex operable from non-matlab 00006 * environments, like the shell. 00007 * 00008 * Includes function templates for display and range-setting 00009 * 00010 * These routines are distinct from the rest of mexhead.h because 00011 * the underlying functional definitions must change depending on the 00012 * environment (ie, call from matlab or not); the other mextools 00013 * utilities do not. 00014 * Because of this, their definitions are in the mex2c directory. These 00015 * are just the declarations. 00016 * The declarations must appear here because they must be loaded with 00017 * mexhead.h. This is because mexhead.h is the only include file, 00018 * beyond mex.h, that I can be assured an ordinary mex2c-enabled 00019 * function will load. In short: 00020 * declarations in mexhead.h (it's the only non-mex.h required #include) 00021 * definitions in libmex2X.c (it's the only platform-specific library) 00022 * 00023 * Michael Turmon, 2002 00024 * 00025 */ 00026 00027 #ifndef _mex_api_extras_h_ 00028 #define _mex_api_extras_h_ 00029 00030 #ifdef __cplusplus 00031 extern "C" { 00032 #endif 00033 00034 /* 00035 * RANGE-SETTING TEMPLATES 00036 */ 00037 00038 extern 00039 void 00040 setrange(mxArray *pm, double datamin, double datamax); 00041 00042 extern 00043 void 00044 getrange(const mxArray *pm, double *datamin, double *datamax); 00045 00046 #ifdef __cplusplus 00047 } /* extern "C" */ 00048 #endif 00049 00050 #endif /* _mex_api_extras_h_ */ 00051