version 1.57, 1998/09/22 21:52:35
|
version 1.58, 1998/12/17 16:56:55
|
Line 304 const char *path;
|
Line 304 const char *path;
|
} |
} |
|
|
/*---------------------------------------------------------------------- |
/*---------------------------------------------------------------------- |
|
IsImageType |
|
returns TRUE if type points to an image resource. |
|
----------------------------------------------------------------------*/ |
|
#ifdef __STDC__ |
|
boolean IsImageType (const char *type) |
|
#else /* __STDC__ */ |
|
boolean IsImageType (type) |
|
const char *type; |
|
#endif /* __STDC__ */ |
|
{ |
|
char temptype[MAX_LENGTH]; |
|
int i; |
|
|
|
if (!type) |
|
return (FALSE); |
|
|
|
strcpy (temptype, type); |
|
/* Normalize the type */ |
|
i = 0; |
|
while (temptype[i] != EOS) |
|
{ |
|
temptype[i] = tolower (temptype[i]); |
|
i++; |
|
} |
|
if ((!strcmp (temptype, "gif")) || (!strcmp (temptype, "x-xbitmap")) || |
|
(!strcmp (temptype, "x-xpixmap")) || (!strcmp (temptype, "jpeg")) || |
|
(!strcmp (temptype, "png"))) |
|
return (TRUE); |
|
return (FALSE); |
|
} |
|
|
|
/*---------------------------------------------------------------------- |
IsTextName |
IsTextName |
----------------------------------------------------------------------*/ |
----------------------------------------------------------------------*/ |
#ifdef __STDC__ |
#ifdef __STDC__ |
Line 371 const char *path;
|
Line 403 const char *path;
|
if (!path) |
if (!path) |
return FALSE; |
return FALSE; |
|
|
if (strncmp (path, "http:", 5) != 0) |
if ((!strncmp (path, "http:", 5) != 0) |
return FALSE; |
|| !strncmp (path, "internal:", 9)) |
return TRUE; |
return TRUE; |
|
return FALSE; |
} |
} |
|
|
/*---------------------------------------------------------------------- |
/*---------------------------------------------------------------------- |
Line 431 boolean IsValidProtocol (url
|
Line 464 boolean IsValidProtocol (url
|
const char *url; |
const char *url; |
#endif /* __STDC__ */ |
#endif /* __STDC__ */ |
{ |
{ |
if (!strncmp (url, "http:", 5)) |
if (!strncmp (url, "http:", 5) |
|
|| !strncmp (url, "internal:", 9)) |
/* experimental */ |
/* experimental */ |
/*** || !strncmp (url, "ftp:", 4)) ***/ |
/*** || !strncmp (url, "ftp:", 4) ***/ |
/*** || !strncmp (path, "news:", 5)***/ |
/*** || !strncmp (path, "news:", 5)***/ |
return (TRUE); |
return (TRUE); |
else |
else |