version 1.222, 2009/02/09 13:49:20
|
version 1.223, 2009/06/18 10:35:57
|
Line 1
|
Line 1
|
/* |
/* |
* |
* |
* (c) COPYRIGHT INRIA and W3C, 1996-2008 |
* (c) COPYRIGHT INRIA and W3C, 1996-2009 |
* Please first read the full copyright statement in file COPYRIGHT. |
* Please first read the full copyright statement in file COPYRIGHT. |
* |
* |
*/ |
*/ |
Line 849 ThotBool IsXTiger (const char *path)
|
Line 849 ThotBool IsXTiger (const char *path)
|
} |
} |
|
|
/*---------------------------------------------------------------------- |
/*---------------------------------------------------------------------- |
IsUndisplayedName |
IsResourceName |
|
returns TRUE if path points to an undisplayed resource. |
|
----------------------------------------------------------------------*/ |
|
ThotBool IsResourceName (const char *path) |
|
{ |
|
char *temppath, *suffix = NULL, *ptr = NULL; |
|
ThotBool ret = FALSE; |
|
|
|
temppath = TtaStrdup ((char *)path); |
|
if (temppath == NULL) |
|
return FALSE; |
|
|
|
if (!strncmp (temppath, "http://", 7)) |
|
ptr = &temppath[7]; |
|
else if (!strncmp (temppath, "http://", 8)) |
|
ptr = &temppath[8]; |
|
else |
|
ptr = temppath; |
|
if (ptr != temppath) |
|
{ |
|
// skip the host name |
|
while (*ptr != EOS && *ptr != '/') |
|
ptr++; |
|
} |
|
if (*ptr == EOS) |
|
// no name |
|
return FALSE; |
|
|
|
suffix = (char *)TtaGetMemory (strlen (ptr) + 1); |
|
TtaExtractSuffix (ptr, suffix); |
|
if (*suffix == EOS || *suffix == '/' || |
|
!strncasecmp (suffix, "htm", 3) || |
|
!strncasecmp (suffix,"xhtm", 4) || |
|
!strncasecmp (suffix, "php", 3) || |
|
!strncasecmp (suffix, "mml", 3) || |
|
!strncasecmp (suffix, "svg", 3) || |
|
!strncasecmp (suffix, "xml", 3)) |
|
ret = FALSE; |
|
else |
|
ret = TRUE; |
|
|
|
TtaFreeMemory (temppath); |
|
TtaFreeMemory (suffix); |
|
return ret; |
|
} |
|
|
|
/*---------------------------------------------------------------------- |
|
IsUndisplayedName |
returns TRUE if path points to an undisplayed resource. |
returns TRUE if path points to an undisplayed resource. |
----------------------------------------------------------------------*/ |
----------------------------------------------------------------------*/ |
ThotBool IsUndisplayedName (const char *path) |
ThotBool IsUndisplayedName (const char *path) |
Line 881 ThotBool IsUndisplayedName (const char *
|
Line 928 ThotBool IsUndisplayedName (const char *
|
!strcasecmp (suffix, "rpm") || |
!strcasecmp (suffix, "rpm") || |
!strcasecmp (suffix, "wmv") || |
!strcasecmp (suffix, "wmv") || |
!strcasecmp (suffix, "wma") || |
!strcasecmp (suffix, "wma") || |
|
!strcasecmp (suffix, "doc") || |
|
!strcasecmp (suffix, "odt") || |
!strcasecmp (suffix, "o")) |
!strcasecmp (suffix, "o")) |
ret = TRUE; |
ret = TRUE; |
else if (!strcmp (suffix, "gz")) |
else if (!strcmp (suffix, "gz")) |
Line 900 ThotBool IsUndisplayedName (const char *
|
Line 949 ThotBool IsUndisplayedName (const char *
|
!strcasecmp (suffix, "mpeg") || |
!strcasecmp (suffix, "mpeg") || |
!strcasecmp (suffix, "wmv") || |
!strcasecmp (suffix, "wmv") || |
!strcasecmp (suffix, "wma") || |
!strcasecmp (suffix, "wma") || |
|
!strcasecmp (suffix, "doc") || |
|
!strcasecmp (suffix, "odt") || |
!strcasecmp (suffix, "o")) |
!strcasecmp (suffix, "o")) |
ret = TRUE; |
ret = TRUE; |
else |
else |
Line 2172 char *AmayaParseUrl (const char *aName
|
Line 2223 char *AmayaParseUrl (const char *aName
|
which might be the old one or a new one. |
which might be the old one or a new one. |
|
|
----------------------------------------------------------------------*/ |
----------------------------------------------------------------------*/ |
static char *HTCanon (char **filename, char *host) |
static char *HTCanon (char **filename, char *host) |
{ |
{ |
char *newname = NULL; |
char *newname = NULL; |
char used_sep; |
char used_sep; |
Line 2291 static char *HTCanon (char **filename,
|
Line 2342 static char *HTCanon (char **filename,
|
|
|
Returns: A string which might be the old one or a new one. |
Returns: A string which might be the old one or a new one. |
----------------------------------------------------------------------*/ |
----------------------------------------------------------------------*/ |
void SimplifyUrl (char **url) |
void SimplifyUrl (char **url) |
{ |
{ |
char *path; |
char *path; |
char *access; |
char *access; |