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