_SCAF - convert ASCII pathname to BCD catfile stack.
(GCOS-8 Only)
Usage:
status = _scaf(stack,altname,string,levels);
Where:
- char *stack;
- points to an area of memory that will contain the
converted string. The amount of memory required is four
words per catalog or file, plus two other words used in
the conversion process.
- char *altname;
- points to a two-word area that will be filled in with the
altname (in lower case ASCII). If "altname" is
a null pointer, the name in "string" is taken
to be the name of a catalog (not a quick access file).
- char *string;
- points to an ASCII string that contains a valid pathname.
This string may have the format
pathname
pathname"altname"
If an altname is explicitly given, it will be filled
into the "altname" area; otherwise,
"_scaf" generates its own altname. This will be
the file name part of the pathname.
- int levels;
- is the number of "levels" (i.e. catalog names
plus the file name) in the given pathname string. This is
used to calculate the size of the "stack"
buffer. The size of "stack" is 2+4*levels.
- int status;
- is positive to indicate success, non-positive if the
operation failed.
Description:
"_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 "stack".
"_scaf" stops scanning "string" when it
encounters any one of the characters
'\n' '\r' '\t' '\0' '+' ' '
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.
Copyright © 1996, Thinkage Ltd.