SUBROUTINE BATCH(LBATCH) Input Arguments: ----------------- None Output Arguments: ----------------- LBATCH (Logical) : .TRUE. if running in Batch, .FALSE. otherwise.
INTEGER FUNCTION BITPAK(MODE,NDATA,DATA,NBIT) Input Arguments: ---------------- MODE (Integer*4) : =0 no data checking; =1 report an error if any (datum.GT.2**nbit); =2 report an error if any (datum.GE.2**nbit); =3 as for 2 but error is fatal. NDATA (Integer*4) : Number of data to be packed DATA (Integer*4) : Array of NDATA data NBIT (Integer*4) : Array of bit widths of NDATA data fields Output Arguments: ----------------- None
SUBROUTINE BITUPK(WORD,NFIELD,DAT,NBIT) Input Arguments: ---------------- WORD (Integer*4) : Word to unpack NFIELD (Integer*4) : Number of data fields NBIT (Integer*4) : Number of bit of each field Output Arguments: ----------------- DAT (Integer*4) : Array of NFIELD data
SUBROUTINE CHKLOG(LOGNAM,DEFTRN,LOGTRN,IERROR) Input Arguments: ---------------- LOGNAM (Character*(*)) The logical name to be translated. DEFTRN (Character*(*)) The default name to be used. Output Arguments: ----------------- LOGTRN (Character*(*)) The translation of "CDFINP". IERROR (Integer*4) Error status flag.
SUBROUTINE CRELOG(LGCLNM,EQLNAM,IERROR) Input Arguments: ---------------- LGCLNM (Character*(*)) : logical name to be defined. Maximum of 132 characters in length. EQLNAM (Character*(*)) : equivalence name. Maximum of 132 characters in length. Blank characters are not allowed - the first blank character signifies the end of the equivalence name. Output Arguments: ----------------- IERROR (Integer*4) : Error code as defined in C$INC:ERLEVL.INC.
SUBROUTINE DEBUG(LDEBUG) Input Arguments: ---------------- None Output Arguments: ----------------- LDEBUG (Logical): .TRUE. if running under the Debugger, .FALSE. otherwise.
SUBROUTINE DECLEX(EXIHND) Input Arguments: ---------------- EXIHND (external) : Name of routine to be called upon termination of the main program. Output Arguments: ----------------- None
SUBROUTINE DISMOU(DEVNAM,IERROR) Input Arguments: ---------------- DEVNAM (Character*(*)): The device to be dismounted. Output Arguments: ----------------- IERROR (Integer*4): Error condition flag.
int ftnstrlen(const char *str, int maxlen) Input Arguments: ---------------- str (const char *str): The input string (really it is a character buffer) maxlength (int): The maximum string length. Output Arguments: ----------------- None Function Value: -------------- The number of characters before a blank occurs or maxlength if there are no blanks.
SUBROUTINE I2PAK(I2,J2,K4) Input Arguments: --------------- I2 - (INTEGER*2) : first word to be packed J2 - (INTEGER*2) : second word to be packed Output Arguments: ---------------- K4 - (INTEGER*4) : packed word whose least significant 16 bits are I2 and most significant 16 bits are J2.
SUBROUTINE I2UPAK(I2,J2,K4) Input Arguments: ---------------- K4 - (INTEGER*4) : word to be unpacked. Output Arguments: ----------------- I2 - (INTEGER*2) : result of unpacking least significant 16 bits of K4 J2 - (INTEGER*2) : result of unpacking most significant 16 bits of K4
SUBROUTINE INITIM(NAM,IERR) Input Arguments: ---------------- NAM (Character*(4)) : char string labeling routine to be timed (20 or less char) Output Arguments: ---------------- IERR (INTEGER*4) : error code: 0 = success 1 = too many routine names (this routine will not be timed)
INTEGER FUNCTION ITIMER(IMODE) Input Arguments: ---------------- IMODE (Integer*4) : Flag indicating when timing is with respect to. 0 return elapsed CPU time since begin of process. 1 return elapsed CPU time since last ITIMER call with IMODE = 0. Output Arguments: ----------------- ITIMER (Integer*4) : Elaspsed CPU time in units of miliseconds. Resolution is 10 msec.
SUBROUTINE MOUNT(DEVNAM,VOLNAM,IERROR) Input Arguments: ---------------- DEVNAM (Character*(*)) : The name of the device to be mounted. VOLNAM (Character*(*)) : The name of the volume to be mounted. Output Arguments: ----------------- IERROR (Integer*4) : Error condition flag. ERSUCC - Success ERWARN - Warning EREROR - Failure ERSEVR - Severe Error
INTEGER FUNCTION N$A() Input Arguments: ---------------- None Output Arguments: ----------------- None
LOGICAL FUNCTION SICPRN(PATT, STRNG) Input Arguments: ---------------- PATT (Character*(*)): Pattern STRNG (Character*(*)): String Output Arguments: ----------------- None Function Value: -------------- SICPRN .TRUE. - If PATT is found in STRNG .FALSE. - If PATT is not found in STRNG
UNIX FORTRAN context : Called via "status = sicscl(sock)"; sock is an integer socket index. VAX FORTRAN context : Called via "status = sicscl(sock)"; sock is an integer socket index. sicscl returns: SKCLOSE_SUC for success, or SKCLOSE_ERR for failure The return codes are defined in s_i$library:siernt.h.
UNIX FORTRAN context : Called via "status = sicsop(server,port)"; server is a character VAX node name passed by reference and port is an integer port number passed by reference. VAX FORTRAN context : Called via "status = sicsop(server,port)"; server is a character VAX node name passed by address of descriptor and port is an integer port number passed by reference. sicsop returns: Function Value :A valid socket index, or SKOPEN_ERR.
UNIX FORTRAN context : Called via "status = sicsrd(sock,reclen,buffer)"; sock is an integer socket index passed by reference, reclen is an integer record length (passed by ref) in bytes , buffer is an integer buffer array (passed by ref) of length reclen/4 longwords.
INTEGER SIDATI(RESPONSE) Input Arguments: ---------------- None Output Arguments: ----------------- RESPONSE (Integer): Returns an array of 6 integers as follows, with FORTRAN 1-based indexing: [1]: seconds after the minute - [0, 59] [2]: minutes after the hour - [0, 59] [3]: hour since midnight - [0, 23] [4]: day of the month - [1, 31] [5]: month number (January is 1, etc.) [6]: year number, e.g. 1994 The conversion to formated time is by the algorithms within the operating system library. All entries will be set to -1 if the current time could not be obtained or converted. Function Value: ----------------- SISUCC Success SIFAIL Failure
[1]: The name for the file
Input Arguments: --------------- FILENAME (Character): File name output Arguments: ---------------- SIDELE (Integer): SISUCC Success SIFAIL Generic Failure
[1]: integer containing a FILE *.
N.B. This is a subroutine; there is no return value.
SUBROUTINE SIFCER(FD) Input Arguments: --------------- FD (Integer): FILE * output Arguments: ---------------- None
[1]: integer containing a FILE *.
INTEGER FUNCTION SIFEOF(FD) Input Arguments: --------------- FD (Integer): FILE * Output Arguments: ---------------- None Function Value: ---------------- SIFEOF (Integer): 0 Not EOF 1 EOF
[1]: integer containing a FILE *.
INTEGER FUNCTION SIFERR(FD) Input Arguments: ---------------- FD (Integer): FILE * Output Arguments: ---------------- None Function Value: ---------------- SIFERR (Integer): 0 No error 1 Error
INTEGER FUNCTION SIFISC(FILNAM,FIFUNC,FICOMP) Input Arguments: ---------------- FILNAM (Character): File Name VAX Format FIFUNC (Character): Function Code: NODE,DEVICE,DIRECTORY, NAME,TYPE,VERSION Output Arguments: ----------------- FICOMP (Character): File Name Component. Function Value: -------------- SIFISC SISUCC Success SIFAIL Generic failure
[1]: integer containing a FILE *.This routine is in the file SIFILEOPS.C.
INTEGER FUNCTION SIFLCL(FD) Input Arguments: ----------------- FD (Integer): FILE * Output Arguments: ----------------- None Function Value: ----------------- SIFLCL (Integer): 0 Success -1 Generic Failure
[1]: integer to contain a FILE *. [2]: The file name [3]: The I/O mode, e.g. 'r', 'w', 'w+', 'rw'
See `man fopen' or VAX C RTL equivalent.
This routine is in the file SIFILEOPS.C.
INTEGER FUNCTION SIFLOP(FD,FILENAME,FILEMODE) Input Arguments: ----------------- FILENAME (Character): File name FILEMODE (Character): File access mode Output Arguments: ----------------- FD (Integer): FILE * Function Value: ----------------- SIFLOP (Integer): 0 Success -1 Generic Failure
[1]: integer containing a FILE *. [2]: buffer area (not a character string) [3]: integer record length expected [4]: integer to contain amount actually read [5]: integer: 0 for fread, 1 for fgets
This routine is in the file SIFILEOPS.C.
INTEGER FUNCTION SIFLRD(FD,BUFFER,LRECL,NDAT,MODE) Input Arguments: ---------------- FD (Integer): FILE * BUFFER (Character): buffer area (not a character string) LRECL (Integer): amount to be read MODE (Integer): mode: 0 - fread, 1 - fgets Output Arguments: ---------------- NDAT (Integer): amount actually read in characters Function Value: ---------------- SIFLRD (Integer): 0 Success -1 Generic Failure
[1]: integer containing a FILE *.
This routine is in the file SIFILEOPS.C.
INTEGER FUNCTION SIFLSH(FD) Input Arguments: ---------------- FD (Integer) FILE * Output Arguments: ---------------- None Function Value: ---------------- SIFLSH (Integer) 0 Success
[1]: integer containing a FILE *. [2]: buffer area (not a character string) Use %REF(character_string) [3]: integer record length to be written [4]: integer to contain amount actually written less line termination for fputs mode. [5]: integer: 0 for fwrite, 1 for fputsThis routine is in the file SIFILEOPS.C.
INTEGER FUNCTION SIFLWT(FD,BUFFER,LRECL,NDAT,MODE) Input Arguments: ---------------- FD (Integer): FILE * BUFFER (Character): buffer area (not a character string) LRECL (Integer): amount to be written MODE (Integer): mode: 0 - fwrite, 1 - fputs Output Arguments: ---------------- NDAT (Integer) amount actually written in characters Function Value: ---------------- SIFLWT (Integer) 0 Success -1 Generic Failure
[1]: integer containing a FILE *.
This routine is in the file SINFILEOPS.C.
INTEGER FUNCTION SIFSIZ(FD) Input Arguments: ---------------- FD (Integer) FILE * Output Arguments: ---------------- None Function Value: ---------------- SIFSIZ (Integer) >=0 Success -1 Generic Failure Usually means no file
INTEGER FUNCTION SIGPID(PROCESS_IDENTIFIER) Input Arguments: ---------------- None Output Arguments: ---------------- PROCESS_IDENTIFIER (Integer): This is the process identifier returned by the routine Function Value: --------------- SISUCC Success
INTEGER FUNCTION SIGTIP(ADDRESS) Input Arguments: ---------------- None Output Arguments: ---------------- ADDRESS (Integer): This is Internet IP address of the machine Function Value: --------------- SISUCC Success SIFAIL Failure
SUBROUTINE SIIOST(IOCODE,STRING) Input Arguments: ---------------- IOCODE (Integer): Error Code Output Arguments: ---------------- STRING (Character*(*)): Error Message returned
INTEGER FUNCTION SILDIR(DIRNAME, PAT, FILELIST, NUMNAMES) Input Arguments: ---------------- DIRNAME (Character(*)): String containing the name of directory which we are reading. PAT (Character(*)): String holding the pattern. FILELIST(Character(*)): User supplied array of empty strings, of fixed size and dimension (NUMNAMES). NUMNAMES(Integer): The dimension of the array. Output Arguments: ---------------- FILELIST(Character(*)): The list of directory entries that match the pattern (size NUMNAMES). NUMNAMES(Integer): The number of such a directory entries. Function Value: -------------- SISUCC: If the directory has been successfully read. SITRUN: If there is not enough space on the array. The directory list has been truncated. SIFAIL: If for any reason it is impossible to read the directory, or if there is an entry which size is bigger than the fixed size of string on array.
INTEGER FUNCTION SINACK(ITEM) Input Arguments: ---------------- ITEM: Item Output Arguments: ---------------- None Function Value: -------------- SINACK (Integer*4): %LOC(ITEM) Address of Item SIMSAR: Missing Argument
[1]: The current name for the file. [2]: The new name for the file.This subroutine is in the file SIFILEOPS.C.
INTEGER FUNCTION SIRENA(OLDNAM,NEWNAM) Input Arguments: ----------------- OLDNAM (Character): Old file name NEWNAM (Character): New file name Output Arguments: ---------------- None Function Value: ---------------- SIRENA: SISUCC Success SIFAIL Generic Failure
INTEGER FUNCTION SIRNDX (SRCSTR,SUBSTR,LENSRC,LENSUB) Input Arguments: ---------------- SRCSTR (Character): Source string SUBSTR (Character): Sub string to find LENSRC (Integer): Length of srcstr string LENSUB (Integer): Length of substr string Output Arguments: ---------------- None Function Value: -------------- SIRNDX (Integer): Index of the begining of the last occurance of substr in stcstr 0 indicates that no match found -1 indicates either source or substr has a negative length
[1]: integer containing a FILE *. [2]: integer containing positioning amount [3]: integer containing positioning methodThis subroutine is in the file SIFILEOPS.C.
INTEGER FUNCTION SISEEK(FD,OFFSET,RELATIVE) Input Arguments: ---------------- FD (Integer): FILE * OFFSET (Integer): positioning amount RELATIVE(Integer): method: 0 -- forward from beginning 1 -- from current location 2 -- backwards from end Output Arguments: ---------------- None Output Arguments: ---------------- SISEEK (Integer) 0 Success -1 Generic Failure
INTEGER FUNCTION SISHUT(TIMELEFT) Input Arguments: ---------------- None Output Arguments: ---------------- TIMELEFT (Integer) Array of 6 integers Function Value: ---------------- SISUCC Success SIFAIL Failure
[1]: A file nameThis subroutine is in the file SIFILEOPS.C.
INTEGER FUNCTION SISIZE(FILENAME) Input Arguments: ---------------- FILENAME(Character): File name Output Arguments: ---------------- None Function Value: ---------------- SISIZE (Integer): >=0 Success -1 Generic Failure Usually means no file
[1]: integer containing a number of seconds to sleepThis subroutine is in the file SIFILEOPS.C.
INTEGER FUNCTION SISLEP(SECONDS) Input Arguments: ---------------- SECONDS(Integer) Sleep time in seconds Output Arguments: ---------------- None Function Value: ---------------- SISLEP (Integer) 0 Success
INTEGER FUNCTION SISSCL(SCH) Input Arguments: ---------------- SCH (Integer): Pointer socket channel Id* Output Arguments: ---------------- none Function Value: -------------- SCLOSE_SUC: For success, or SCLOSE_ERR: For failure
INTEGER FUNCTION SISSOP(NETDCR) Input Arguments: ---------------- NETDCR (Character) Output Arguments: ---------------- none Function Value: -------------- SKOPEN_ERR: A valid socket chan. id
INTEGER FUNCTION SISSWT(SCH,RECLEN,BUFFER) Input Arguments: ----------------- SCH (Integer) Pointer to socket chan. id RECLEN (Integer) Pointer to record length in bytes BUFFER (Integer) Integer buffer reclen bytes Output Arguments: ---------------- None Funtion value: ------------- SWRT_SUC: For success, or SWRT_ERR: For failure.
SUBROUTINE SISTLC(DSTSTR,SRCSTR) Input Arguments: ----------------- SRCSTR (Character) Source Character String Output Arguments: ---------------- DSTSTR (Character) Destination Character String
INTEGER FUNCTION SISTLE(STRING) Input Arguments: ----------------- STRING (Character) Character String Output Arguments: ---------------- None Function Value: ---------------- SISTLE (Integer) Length of the string
SUBROUTINE SISTUC(DSTSTR,SRCSTR) Input Arguments: ----------------- SRCSTR (Character) Source Character String Output Arguments: ---------------- DSTSTR (Character) Destination Character String
[1]: integer containing a FILE *.This routine is in the file SIFILEOPS.C.
INTEGER FUNCTION SITELL(FD) Input Arguments: ---------------- FD (Integer) FILE * Output Arguments: ---------------- None Function Value: ---------------- SITELL (Integer) 0 Success -1 Generic Failure
INTEGER FUNCTION SITRFN(VFILNAM,UFILNAM,UFILLEN) Input Arguments: ---------------- VFILNAM (Character): File Name VAX Format Output Arguments: ---------------- UFILNAM (Character): File Name UNIX Format UFILLEN (Integer): File Name UNIX Format Length Function Value: -------------- SITRFN SISUCC Success SIINFN Invalid Filename SITRUN Unix Filename Truncated SIFAIL No Unix Filename
INTEGER FUNCTION SIWAIT(SECS) Input Arguments: ---------------- SECS (Real) Output Arguments: ---------------- None Function Value: -------------- SISUCC (Integer): If the required time has elapsed SIFAIL (Integer): If the required time has not elapsed for any reason.
INTEGER FUNCTION SIWFSNE(SEARCH) Input Arguments: ---------------- SEARCH (Character(*)): String containing the name of directory which we are reading. Output Arguments: ---------------- None Function Value: -------------- SISUCC (Integer): If cleanup successful SIFAIL (Integer): Otherwise
INTEGER FUNCTION SIWFSNI(SEARCH,DOTFLAG) Input Arguments: ---------------- SEARCH (Character(*)):String containing the name of directory which we are reading. DOTFLAG 0 -> omit dot files, 1 -> include dot file.A file is included if any of the following are true: a. The filename base component does not start with a dot. b. The pattern base component does start with a dot. c. The dotflag integer is nonzero. This argument is ignored on OpenVMS. Output Arguments: ---------------- None Function Value: --------------- SISUCC (Integer): If setup is successful SIFAIL (Integer): Otherwise
INTEGER FUNCTION SIWFSNN(RESPONSE) Input Arguments: ---------------- None Output Arguments: ---------------- RESPONSE String to contain a response Function Value: -------------- SISUCC (Integer): If the entry has been successfully read. SITRUN (Integer): If the entry name is longer than the response area SIFAIL (Integer): If for any reason it is impossible to read a entry
SUBROUTINE STRUPC(OUSTRG,INSTRG) Input Arguments: ---------------- INSTRG (Character(*)): Input string to upper case. Output Arguments: ---------------- OUSTRG (Character(*)): Output string.
SUBROUTINE SUMTIM(LUNIT) Input Arguments: ---------------- LUNIT (Logical): Logical unit number for timing summary Output Arguments: ---------------- None
SUBROUTINE TRNLOG(LGCLNM,TRANSL,IERROR) Input Arguments: --------------- LGCLNM (Character(*)):Logical name to be translated. Max of 132 characters in length. Output Arguments: ---------------- TRANSL (Character(*)):Translation. Max of 132 characters in length. IERROR (Integer*4): Error code as defined in C$INC:ERLEVL. INC.
SUBROUTINE UP1TIM(NAM) Input Arguments: --------------- NAM (Character): Char string labeling code block to be timed (20 or less char) Output Arguments: ---------------- None
SUBROUTINE UP2TIM(NAM) Input Arguments: --------------- NAM (Character): Char string labeling code block to be timed (20 or less char) Output Arguments: ---------------- None
LOGICAL FUNCTION ZPRINT(IUSER,LEVEL) Input Arguments: --------------- IUSER (Character): Variable specifying the location or type of print diagnostic LEVEL (Integer): Variable specifying the diagnostic level of the print statement Output Arguments: ---------------- None Function Value: ---------------- ZPRINT .TRUE. to cause printing of the statement