16 #define MAXINT INT_MAX 17 #define MAXLONG LONG_MAX 20 #define MAXINT INT_MAX 32 #define YYYYMMDD_chk(x) (((x) >= 19000000) && ((x) <= 21000000)) 33 #define HHmmss_chk(x) ((x) <= 999999) 46 memcpy (f, file, file_len);
48 for (i = file_len-1; i >= 0; i--)
59 nr = fread (isect1,
sizeof (
integer64), 22, fp);
67 jswap_ (isect1, isect1, &t, &
n);
76 if (! YYYYMMDD_chk (isect1[13]))
79 if (! HHmmss_chk (isect1[14]))
87 fseek (fp, 0, SEEK_SET);
88 nr = fread (cmagic, 1, 8, fp);
91 if (memcmp (
"LFI_ALTM", cmagic, 8))
118 static int iscan (
const char ** str,
int * val)
121 const char * s = *str;
134 for ( ; isdigit (*s); s++)
135 j = 10 * j + (*s -
'0');
149 const char * str = (
const char *)getenv (
"LFI_HNDL_SPEC");
160 int rmin =
iscan (&str, &umin);
162 if (strncmp (str,
"..", 2) == 0)
172 if (strncmp (str,
":", 1) != 0)
178 if ((umin <= unit) && (unit <= umax))
199 lfi_abor (
"Could not parse LFI_HNDL_SPEC =`%s'", str);
lfi_grok_t lfi_grok(const character *file, character_len file_len)
void lfi_abor(const char *fmt,...)
int lfi_unum(integer64 *KNUMER)
static int iscan(const char **str, int *val)
INTERFACE SUBROUTINE FACILO KNUMER
void jswap_(void *, const void *, const int *, const int *)
subroutine t(CDPREF, CDSUFF, KCODPA, LDNIVA, PMULTI)