Alternate Entry Name: .SCAF
B: status = scaf( string, buffer [, catflag, size] );
C: int scaf(const char *string, void *buffer, [int catflag, int size] );
SCAF takes the pathname in "string" and converts it into a format suitable for GCOS/TSS file system calls. The converted pathname is placed in "buffer". SCAF stops scanning "string" when it encounters any one of the characters "*n*r*t*e " and possibly "+".
If an altname is specified (cat/file"alt"), it is put into "buffer" in lower case. In order to make alignment easy, the word immediately after the fence is ignored, and the altname is placed in the next two words. If no explicit altname is given, the file name is used.
If "catflag" is zero or not present and if no errors occur in the scan, a pointer is returned to the altname (two words of ASCII) within "buffer". Bit 17 (1,du) is set if a "quick access" name was found, and bit 16 (2,du) is set if an altname was specified. Bit 17 will not be set if bit 16 is set. A "+" will be considered a normal filename terminator.
If "catflag" is present and non-zero, neither bit 16 nor bit 17 will be set and no altname is generated if none is supplied. However, the "status" returned is a pointer to the place reserved for the altname. A "+" character will be considered illegal if encountered.
In case of error, SCAF returns a status of -28, indicating "bad pathname". Possible causes for error include
illegal character in filename too many catalog levels name longer than 12 characters altname longer than eight characters
Use of a name that looks like a quick access name (i.e. no '/', '$', or altname) but is longer than eight characters will also be treated as an error.
SCAF now makes use of the standard .EPOST facilities for posting error messages, so you may use .STRER to obtain messages for errors detected by SCAF.
Copyright © 1996, Thinkage Ltd.