53 static struct proto {
const char *pHdr;
int pHsz;
PType pVal;}
54 pTab[] = {{
"xroot://", 8,
isXroot},
62 static int pTnum =
sizeof(pTab)/
sizeof(
struct proto);
79 while(i)
if (
Path[i-1] !=
'/' || (i > 1 &&
Path[i-2] !=
'/'))
break;
84 if (!strcmp(
Path,
"-"))
91 for (i = 0; i < pTnum; i++)
92 {
if (!strncmp(FSpec, pTab[i].pHdr, pTab[i].pHsz))
94 memcpy(
ProtName, pTab[i].pHdr, pTab[i].pHsz-3);
102 if (!strncmp(
Path,
"file://", 7))
103 {
char *pP =
Path + 7;
104 if (!strncmp(pP,
"localhost", 9)) memmove(
Path, pP + 9, strlen( pP + 9 ) + 1 );
105 else if (*pP ==
'/') memmove(
Path, pP, strlen( pP ) + 1 );