1 /*+ 2 * Name: 3 * ems.h 4 5 * Purpose: 6 * EMS_ C interface header file. 7 8 * Language: 9 * Starlink ANSI C 10 11 * Description: 12 * This include file contains the function prototypes for all 13 * EMS C interface routines and defines EMS__VERSN to be the major 14 * version number 15 16 * Authors: 17 * PCTR: P.C.T. Rees (STARLINK) 18 * AJC: A.J.Chipperfield (STARLINK) 19 * TIMJ: Tim Jenness (JAC, Hawaii) 20 * {enter_new_authors_here} 21 22 * History: 23 * 19-SEP-1990 (PCTR): 24 * Original version. 25 * 21-JUN-1991 (PCTR): 26 * Made all given character strings type "const". 27 * 5-OCT-1993 (PCTR): 28 * Updated for Vn. 1.2-3 29 * 28-SEP-1994 (AJC): 30 * V1.4 Added ems_facer_c and ems_errno_c 31 * 21-JUN-1995 (AJC): 32 * V1.5 Added ems1_starf_c 33 * 13-MAY-1999 (AJC): 34 * Added the emsXxx form of name 35 * and #define old_names = new_names 36 * Removed ems_tune/gtune/show/_c 37 * Added ems1_get_facility_error 38 * 27-JUL-2001 (AJC): 39 * Removed emsFmtx 40 * Add emsExpnd, emsTune 41 * 13-AUG-2001 (AJC): 42 * Removed emsFioer 43 * #define EMS__VERSN 44 * 20-SEP-2001 (AJC): 45 * Added emsSetnc and point ems_setc_c at it 46 * 3-MAR-2006 (TIMJ): 47 * Add emsSetu / emsSetp / emsSeti64 48 * 30-JUL-2008 (PWD): 49 * Added emsGtune. 50 * 31-JUL-2008 (PWD): 51 * Added emsStune and changed emsGtune to return the value as a result. 52 * Marked emsTune as deprecated. 53 * 10-SEP-2008 (TIMJ): 54 * Remove fortran prototypes. Should not be in a public include file. 55 * 16-SEP-2008 (TIMJ): 56 * Remove 3 arg version of emsSetc 57 * {enter_changes_here} 58 59 * Bugs: 60 * {note_any_bugs_here} 61 62 *- */ 63 64 #ifndef EMS_DEFINED 65 #define EMS_DEFINED 66 67 /* ANSI types */ 68 #include <stdarg.h> 69 #include <stddef.h> 70 #include <inttypes.h> 71 72 73 /* EMS Major Version */ 74 #define EMS__VERSN 2 75 76 /* Function Prototypes: */ 77 void emsAnnul( int *status ); 78 79 void emsBegin( int *status ); 80 81 void emsEload( char *param, 82 int *parlen, 83 char *opstr, 84 int *oplen, 85 int *status ); 86 87 void emsEnd( int * status ); 88 89 void emsErrno( const char *token, 90 int errval ); 91 92 void emsExpnd( const char *text, 93 char *opstr, 94 const int maxlen, 95 int *oplen, 96 int *status ); 97 98 void emsFacer( const char *token, 99 int status ); 100 101 int emsGtune( const char *key, 102 int *status ); 103 104 void emsLevel( int *level ); 105 106 void emsMark( void ); 107 108 void emsMload( const char *msg, 109 const char *text, 110 char *opstr, 111 int *oplen, 112 int *status ); 113 114 void emsRenew( void ); 115 116 void emsRep( const char *err, 117 const char *text, 118 int *status ); 119 120 void emsRlse( void ); 121 122 void emsSetc( const char *token, 123 const char *cvalue ); 124 125 void emsSetnc( const char *token, 126 const char *cvalue, 127 int mxchar ); 128 129 void emsSetd( const char *token, 130 double dvalue ); 131 132 void emsSeti( const char *token, 133 int ivalue ); 134 135 void emsSeti64( const char *token, 136 int64_t ivalue ); 137 138 void emsSetl( const char *token, 139 int lvalue ); 140 141 void emsSetr( const char *token, 142 float rvalue ); 143 144 void emsSetp( const char *token, 145 void * pvalue ); 146 147 void emsSetu( const char *token, 148 unsigned int ivalue ); 149 150 void emsStat( int *status ); 151 152 void emsSyser( const char *token, 153 int systat ); 154 155 int emsStune( const char *key, 156 const int value, 157 int *status ); 158 159 /* Deprecated function. */ 160 void emsTune( const char *key, 161 const int value, 162 int *status ); 163 164 /* Internal Functions */ 165 /* Not for general use */ 166 int ems1Starf( const char *envar, 167 const char *relpath, 168 const char *acmode, 169 char **filename, 170 int *pathlen ); 171 172 void ems1_get_facility_error( unsigned int errcode, 173 char **facility_name, 174 char **error_ident, 175 char **error_text ); 176 177 /* Required by MERS. Not to be used by anyone else */ 178 179 void ems1Rform( const char *text, const int maxlen, int *iposn, char *string, int *strlength ); 180 181 void ems1Gesc( const char *escchr, const char *string, int *iposn ); 182 183 void ems1Gnam( const char *string, int *iposn, char *name, int *namlen, int *status); 184 185 #endif /* EMS_DEFINED */ 186