is_pathname Function (ROM Call 0x3C6)

AMS 1.01 or higher vat.h

short is_pathname (CESI name);

Checks if argument points to a pathname.

name must be a valid SYM_STR constructed with SYMSTR or equivalent.
This function first checks if name is pointing to the last byte of a SYM_STR (it must be 0x00), and searches backwards for character 0x5C ('\'). If is_pathname finds one such character, it immediately retuns TRUE. If name doesn't point to a 0x00, or there is no '\' in the string, it returns FALSE.
Note: this function is flawed, as it doesn't check if there is only one '\'. Indeed, a string such as SYMSTR("main\foo\bar"), while it is a pathname (it contains '\'), is NOT a valid pathname...


Used by: EQU_getNameInfo, push_parse_prgm_or_func_text, cmd_local, push_parse_text, ROM Call 0x468