00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038 #pragma ident "@(#) libf/fio/rnlutil.c 92.1 06/21/99 10:37:55"
00039
00040 #include <liberrno.h>
00041 #include <fortran.h>
00042 #include "fio.h"
00043 #ifndef _UNICOS
00044 #include "rnl90def.h"
00045 #else
00046 #include "rnl.h"
00047 #endif
00048
00049 extern char _getfchar();
00050
00051
00052
00053
00054
00055
00056
00057
00058
00059
00060
00061 #ifdef _UNICOS
00062 void
00063 RNLSKIP(_f_int *mode)
00064 {
00065 _SKP_MESS = *mode;
00066 }
00067 #else
00068 void
00069 rnlskip_(_f_int *mode)
00070 {
00071 _SKP_MESS = (long) *mode;
00072 }
00073 #endif
00074
00075
00076
00077
00078
00079
00080
00081
00082
00083
00084 #ifdef _UNICOS
00085 void RNLTYPE(_f_int *mode)
00086 {
00087 _TYP_CONV = *mode;
00088 }
00089 #else
00090 void rnltype_(_f_int *mode)
00091 {
00092 _TYP_CONV = (long) *mode;
00093 }
00094 #endif
00095
00096
00097
00098
00099
00100
00101
00102
00103
00104
00105
00106
00107
00108
00109
00110 #ifdef _UNICOS
00111 void
00112 RNLECHO(_f_int *unum)
00113 {
00114 _OUT_UNIT = *unum;
00115
00116 return;
00117 }
00118 #else
00119 void
00120 rnlecho_(_f_int *unum)
00121 {
00122 _OUT_UNIT = *unum;
00123
00124 return;
00125 }
00126 #endif
00127
00128
00129
00130
00131
00132
00133
00134
00135
00136
00137
00138
00139
00140
00141 #ifdef _UNICOS
00142 void
00143 RNLFLAG(_fcd chr, _f_int *mode)
00144 {
00145 int thechar;
00146
00147 if (_numargs() != (sizeof(_fcd) + sizeof(long*))/sizeof(long))
00148 _lerror(_LELVL_ABORT,FEARGLST, "RNLFLAG");
00149 thechar = _getfchar(chr);
00150 TOGGLE_CHAR(thechar, MRNLFLAG, *mode);
00151
00152 return;
00153 }
00154 #else
00155 void
00156 rnlflag_(char *chr, _f_int *mode, _f_int clen)
00157 {
00158 _f_int thechar;
00159
00160 thechar = (_f_int) _getfchar(_cptofcd(chr, (long)clen));
00161 TOGGLE_CHAR(thechar, MRNLFLAG, *mode);
00162
00163 return;
00164 }
00165 #endif
00166
00167
00168
00169
00170
00171 #ifdef _UNICOS
00172 void
00173 RNLDELM(_fcd chr, long *mode)
00174 {
00175 int thechar;
00176
00177 if (_numargs() != (sizeof(_fcd) + sizeof(long*))/sizeof(long))
00178 _lerror(_LELVL_ABORT,FEARGLST, "RNLDELM");
00179 thechar = _getfchar(chr);
00180 TOGGLE_CHAR(thechar, MRNLDELIM, *mode);
00181
00182 return;
00183 }
00184 #else
00185 void
00186 rnldelm_(char *chr, _f_int *mode, _f_int clen)
00187 {
00188 _f_int thechar;
00189
00190 thechar = (_f_int) _getfchar(_cptofcd(chr, (long)clen));
00191 TOGGLE_CHAR(thechar, MRNLDELIM, *mode);
00192
00193 return;
00194 }
00195 #endif
00196
00197
00198
00199
00200
00201 #ifdef _UNICOS
00202 void
00203 RNLSEP(_fcd chr, _f_int *mode)
00204 {
00205 int thechar;
00206
00207 if (_numargs() != (sizeof(_fcd) + sizeof(long*))/sizeof(long))
00208 _lerror(_LELVL_ABORT,FEARGLST, "RNLSEP");
00209 thechar = _getfchar(chr);
00210 if (thechar == ' ')
00211 _BLNKSEP = *mode;
00212 TOGGLE_CHAR(thechar, MRNLSEP, *mode);
00213
00214 return;
00215 }
00216 #else
00217 void
00218 rnlsep_(char *chr, _f_int *mode, _f_int clen)
00219 {
00220 int thechar;
00221
00222 thechar = (_f_int) _getfchar(_cptofcd(chr, (long)clen));
00223 if (thechar == ' ')
00224 _BLNKSEP = (long) *mode;
00225 TOGGLE_CHAR(thechar, MRNLSEP, *mode);
00226
00227 return;
00228 }
00229 #endif
00230
00231
00232
00233
00234
00235 #ifdef _UNICOS
00236 void
00237 RNLREP(_fcd chr, _f_int *mode)
00238 {
00239 int thechar;
00240
00241 if (_numargs() != (sizeof(_fcd) + sizeof(long*))/sizeof(long))
00242 _lerror(_LELVL_ABORT,FEARGLST, "RNLREP");
00243 thechar = _getfchar(chr);
00244 TOGGLE_CHAR(thechar, MRNLREP, *mode);
00245
00246 return;
00247 }
00248 #else
00249 void
00250 rnlrep_(char *chr, _f_int *mode, _f_int clen)
00251 {
00252 _f_int thechar;
00253
00254 thechar = (_f_int) _getfchar(_cptofcd(chr, (long)clen));
00255 TOGGLE_CHAR(thechar, MRNLREP, *mode);
00256
00257 return;
00258 }
00259 #endif
00260
00261
00262
00263
00264
00265 #ifdef _UNICOS
00266 void
00267 RNLCOMM(_fcd chr, _f_int *mode)
00268 {
00269 int thechar;
00270
00271 if (_numargs() != (sizeof(_fcd) + sizeof(long *))/ sizeof(long))
00272 _lerror(_LELVL_ABORT,FEARGLST, "RNLCOMM");
00273 thechar = _getfchar(chr);
00274 TOGGLE_CHAR(thechar, MRNLCOMM, *mode);
00275
00276 return;
00277 }
00278 #else
00279 void
00280 rnlcomm_(char *chr, _f_int *mode, _f_int clen)
00281 {
00282 _f_int thechar;
00283
00284 thechar = (_f_int) _getfchar(_cptofcd(chr, (long)clen));
00285 TOGGLE_CHAR(thechar, MRNLCOMM, *mode);
00286
00287 return;
00288 }
00289 #endif