GN_Pfs, Parse correctness of filename segment

Register parameters

RST 20H, DEFW $5A09
IN:
     HL = 0,1,2; not allowed (B=0)
     BHL = points to filename segment
     (B = 0 is interpreted as local pointer)

OUT, if call successful:
     Filename syntactically correct
     Fc = 0
     A0 = 1, extension used
     A1 = 1, filename used
     A2 = 1, explicit directory used
     A3 = 1, current directory (".") used
     A4 = 1, parent directory ("..") used
     A5 = 1, wildcard directory ("//") used
     A6 = 1, device specified
     A7 = 1, wildcards used

     BHL = points to terminating character

OUT, if call failed:
     Fc = 1
     A = error code:
          RC_IVF ($17), poor syntax
          RC_EOF ($09), blank segment

Registers changed after return:
     ..BCDE../IXIY same
     AF....HL/.... different 

Notes

The source pointer (BHL) may point to the ":", "/" or "\" at the start of the segment or the start of the name itself.

Related calls

GN_Esa, read & write to filename segments
GN_Fcm, compress a filename
GN_Fex, expand a filename
GN_Opw, Open wildcard handler
GN_Prs, parse filename
GN_Wcl, close wildcard handle
GN_Wfn, fetch next match for wildcard string (handle)
GN_Wsm, match filename segment to wildcard string

web analytics