version 1.135, 2002/03/15 11:49:23
|
version 1.136, 2002/03/26 16:54:51
|
Line 420 char *DocImageMimeType (Document doc)
|
Line 420 char *DocImageMimeType (Document doc)
|
return (mime_type); |
return (mime_type); |
} |
} |
|
|
|
|
/*---------------------------------------------------------------------- |
/*---------------------------------------------------------------------- |
IsHTMLName |
IsHTMLName |
returns TRUE if path points to an HTML resource. |
returns TRUE if path points to an HTML resource. |
----------------------------------------------------------------------*/ |
----------------------------------------------------------------------*/ |
ThotBool IsHTMLName (const char *path) |
ThotBool IsHTMLName (const char *path) |
{ |
{ |
char temppath[MAX_LENGTH]; |
char temppath[MAX_LENGTH]; |
char suffix[MAX_LENGTH]; |
char suffix[MAX_LENGTH]; |
char nsuffix[MAX_LENGTH]; |
char nsuffix[MAX_LENGTH]; |
int i; |
int i; |
|
|
if (!path) |
if (!path) |
return (FALSE); |
return (FALSE); |
Line 487 ThotBool IsHTMLName (const char *path)
|
Line 486 ThotBool IsHTMLName (const char *path)
|
} |
} |
|
|
/*---------------------------------------------------------------------- |
/*---------------------------------------------------------------------- |
IsXMLName |
IsMathMLName |
returns TRUE if path points to an XML resource. |
returns TRUE if path points to an MathML resource. |
----------------------------------------------------------------------*/ |
----------------------------------------------------------------------*/ |
ThotBool IsXMLName (const char *path) |
ThotBool IsMathMLName (const char *path) |
{ |
{ |
char temppath[MAX_LENGTH]; |
char temppath[MAX_LENGTH]; |
char suffix[MAX_LENGTH]; |
char suffix[MAX_LENGTH]; |
|
|
if (!path) |
if (!path) |
return (FALSE); |
return (FALSE); |
Line 501 ThotBool IsXMLName (const char *path)
|
Line 500 ThotBool IsXMLName (const char *path)
|
strcpy (temppath, path); |
strcpy (temppath, path); |
TtaExtractSuffix (temppath, suffix); |
TtaExtractSuffix (temppath, suffix); |
|
|
if (!strcasecmp (suffix, "xml") || |
if (!strcasecmp (suffix, "mml")) |
!strcasecmp (suffix, "xht") || |
|
!strcmp (suffix, "xhtm") || |
|
!strcmp (suffix, "xhtml")) |
|
return (TRUE); |
return (TRUE); |
else if (!strcmp (suffix, "gz")) |
else if (!strcmp (suffix, "gz")) |
{ |
{ |
/* take into account compressed files */ |
/* take into account compressed files */ |
TtaExtractSuffix (temppath, suffix); |
TtaExtractSuffix (temppath, suffix); |
if (!strcasecmp (suffix, "xml") || |
if (!strcasecmp (suffix, "mml")) |
!strcasecmp (suffix, "xht") || |
|
!strcmp (suffix, "xhtm") || |
|
!strcmp (suffix, "xhtml")) |
|
return (TRUE); |
return (TRUE); |
else |
else |
return (FALSE); |
return (FALSE); |
Line 523 ThotBool IsXMLName (const char *path)
|
Line 516 ThotBool IsXMLName (const char *path)
|
} |
} |
|
|
/*---------------------------------------------------------------------- |
/*---------------------------------------------------------------------- |
IsUndisplayedName |
IsSVGName |
returns TRUE if path points to an undisplayed resource. |
returns TRUE if path points to an SVG resource. |
----------------------------------------------------------------------*/ |
----------------------------------------------------------------------*/ |
ThotBool IsUndisplayedName (const char *path) |
ThotBool IsSVGName (const char *path) |
{ |
{ |
char temppath[MAX_LENGTH]; |
char temppath[MAX_LENGTH]; |
char suffix[MAX_LENGTH]; |
char suffix[MAX_LENGTH]; |
|
|
if (!path) |
if (!path) |
return (FALSE); |
return (FALSE); |
Line 537 ThotBool IsUndisplayedName (const char *
|
Line 530 ThotBool IsUndisplayedName (const char *
|
strcpy (temppath, path); |
strcpy (temppath, path); |
TtaExtractSuffix (temppath, suffix); |
TtaExtractSuffix (temppath, suffix); |
|
|
if (!strcasecmp (suffix, "exe") || |
if (!strcasecmp (suffix, "svg")) |
!strcasecmp (suffix, "zip") || |
|
!strcasecmp (suffix, "ppt") || |
|
!strcasecmp (suffix, "pdf") || |
|
!strcasecmp (suffix, "ps") || |
|
!strcasecmp (suffix, "eps") || |
|
!strcasecmp (suffix, "tar") || |
|
!strcasecmp (suffix, "tgz") || |
|
!strcasecmp (suffix, "ddl") || |
|
!strcasecmp (suffix, "o")) |
|
return (TRUE); |
return (TRUE); |
else if (!strcmp (suffix, "gz")) |
else if (!strcmp (suffix, "gz")) |
{ |
{ |
/* take into account compressed files */ |
/* take into account compressed files */ |
TtaExtractSuffix (temppath, suffix); |
TtaExtractSuffix (temppath, suffix); |
if (!strcasecmp (suffix, "exe") || |
if (!strcasecmp (suffix, "svg")) |
!strcasecmp (suffix, "zip") || |
|
!strcasecmp (suffix, "ppt") || |
|
!strcasecmp (suffix, "pdf") || |
|
!strcasecmp (suffix, "ps") || |
|
!strcasecmp (suffix, "eps") || |
|
!strcasecmp (suffix, "tar") || |
|
!strcasecmp (suffix, "ddl") || |
|
!strcasecmp (suffix, "o")) |
|
return (TRUE); |
return (TRUE); |
else |
else |
return (FALSE); |
return (FALSE); |
Line 570 ThotBool IsUndisplayedName (const char *
|
Line 546 ThotBool IsUndisplayedName (const char *
|
} |
} |
|
|
/*---------------------------------------------------------------------- |
/*---------------------------------------------------------------------- |
IsMathMLName |
IsXMLName |
returns TRUE if path points to an MathML resource. |
returns TRUE if path points to an XML resource. |
----------------------------------------------------------------------*/ |
----------------------------------------------------------------------*/ |
ThotBool IsMathMLName (const char *path) |
ThotBool IsXMLName (const char *path) |
{ |
{ |
char temppath[MAX_LENGTH]; |
char temppath[MAX_LENGTH]; |
char suffix[MAX_LENGTH]; |
char suffix[MAX_LENGTH]; |
|
|
if (!path) |
if (!path) |
return (FALSE); |
return (FALSE); |
Line 584 ThotBool IsMathMLName (const char *path)
|
Line 560 ThotBool IsMathMLName (const char *path)
|
strcpy (temppath, path); |
strcpy (temppath, path); |
TtaExtractSuffix (temppath, suffix); |
TtaExtractSuffix (temppath, suffix); |
|
|
if (!strcasecmp (suffix, "mml")) |
if (!strcasecmp (suffix, "xml") || |
|
!strcasecmp (suffix, "xht") || |
|
!strcmp (suffix, "xhtm") || |
|
!strcmp (suffix, "xhtml")) |
return (TRUE); |
return (TRUE); |
else if (!strcmp (suffix, "gz")) |
else if (!strcmp (suffix, "gz")) |
{ |
{ |
/* take into account compressed files */ |
/* take into account compressed files */ |
TtaExtractSuffix (temppath, suffix); |
TtaExtractSuffix (temppath, suffix); |
if (!strcasecmp (suffix, "mml")) |
if (!strcasecmp (suffix, "xml") || |
|
!strcasecmp (suffix, "xht") || |
|
!strcmp (suffix, "xhtm") || |
|
!strcmp (suffix, "xhtml")) |
return (TRUE); |
return (TRUE); |
else |
else |
return (FALSE); |
return (FALSE); |
Line 600 ThotBool IsMathMLName (const char *path)
|
Line 582 ThotBool IsMathMLName (const char *path)
|
} |
} |
|
|
/*---------------------------------------------------------------------- |
/*---------------------------------------------------------------------- |
IsSVGName |
IsUndisplayedName |
returns TRUE if path points to an SVG resource. |
returns TRUE if path points to an undisplayed resource. |
----------------------------------------------------------------------*/ |
----------------------------------------------------------------------*/ |
ThotBool IsSVGName (const char *path) |
ThotBool IsUndisplayedName (const char *path) |
{ |
{ |
char temppath[MAX_LENGTH]; |
char temppath[MAX_LENGTH]; |
char suffix[MAX_LENGTH]; |
char suffix[MAX_LENGTH]; |
Line 614 ThotBool IsSVGName (const char *path)
|
Line 596 ThotBool IsSVGName (const char *path)
|
strcpy (temppath, path); |
strcpy (temppath, path); |
TtaExtractSuffix (temppath, suffix); |
TtaExtractSuffix (temppath, suffix); |
|
|
if (!strcasecmp (suffix, "svg")) |
if (!strcasecmp (suffix, "exe") || |
|
!strcasecmp (suffix, "zip") || |
|
!strcasecmp (suffix, "ppt") || |
|
!strcasecmp (suffix, "pdf") || |
|
!strcasecmp (suffix, "ps") || |
|
!strcasecmp (suffix, "eps") || |
|
!strcasecmp (suffix, "tar") || |
|
!strcasecmp (suffix, "tgz") || |
|
!strcasecmp (suffix, "ddl") || |
|
!strcasecmp (suffix, "o")) |
return (TRUE); |
return (TRUE); |
else if (!strcmp (suffix, "gz")) |
else if (!strcmp (suffix, "gz")) |
{ |
{ |
/* take into account compressed files */ |
/* take into account compressed files */ |
TtaExtractSuffix (temppath, suffix); |
TtaExtractSuffix (temppath, suffix); |
if (!strcasecmp (suffix, "svg")) |
if (!strcasecmp (suffix, "exe") || |
|
!strcasecmp (suffix, "zip") || |
|
!strcasecmp (suffix, "ppt") || |
|
!strcasecmp (suffix, "pdf") || |
|
!strcasecmp (suffix, "ps") || |
|
!strcasecmp (suffix, "eps") || |
|
!strcasecmp (suffix, "tar") || |
|
!strcasecmp (suffix, "ddl") || |
|
!strcasecmp (suffix, "o")) |
return (TRUE); |
return (TRUE); |
else |
else |
return (FALSE); |
return (FALSE); |