Diff for /Amaya/amaya/AHTURLTools.c between versions 1.132 and 1.133

version 1.132, 2002/02/15 10:51:42 version 1.133, 2002/03/07 09:05:12
Line 1 Line 1
 /*  /*
  *   *
  *  (c) COPYRIGHT MIT and INRIA, 1996-2001   *  (c) COPYRIGHT MIT and INRIA, 1996-2002
  *  Please first read the full copyright statement in file COPYRIGHT.   *  Please first read the full copyright statement in file COPYRIGHT.
  *   *
  */   */
Line 523  ThotBool IsXMLName (const char *path) Line 523  ThotBool IsXMLName (const char *path)
 }  }
   
 /*----------------------------------------------------------------------  /*----------------------------------------------------------------------
     IsUndisplayedName                                                         
     returns TRUE if path points to an undisplayed resource.
     ----------------------------------------------------------------------*/
   ThotBool IsUndisplayedName (const char *path)
   {
      char                temppath[MAX_LENGTH];
      char                suffix[MAX_LENGTH];
   
      if (!path)
         return (FALSE);
   
      strcpy (temppath, path);
      TtaExtractSuffix (temppath, suffix);
   
      if (!strcasecmp (suffix, "exe") ||
          !strcasecmp (suffix, "pdf") ||
          !strcasecmp (suffix, "tar") ||
          !strcasecmp (suffix, "tgz") ||
          !strcasecmp (suffix, "ddl") ||
          !strcasecmp (suffix, "o"))
        return (TRUE);
      else if (!strcmp (suffix, "gz"))
        {
          /* take into account compressed files */
          TtaExtractSuffix (temppath, suffix);       
          if (!strcasecmp (suffix, "exe") ||
              !strcasecmp (suffix, "pdf") ||
              !strcasecmp (suffix, "tar") ||
              !strcasecmp (suffix, "ddl") ||
              !strcasecmp (suffix, "o"))
            return (TRUE);
          else
            return (FALSE);
        }
      else
        return (FALSE);
   }
   
   /*----------------------------------------------------------------------
   IsMathMLName                                                             IsMathMLName                                                         
   returns TRUE if path points to an MathML resource.    returns TRUE if path points to an MathML resource.
   ----------------------------------------------------------------------*/    ----------------------------------------------------------------------*/
Line 739  ThotBool IsHTTPPath (const char *path) Line 778  ThotBool IsHTTPPath (const char *path)
   IsWithParameters                               IsWithParameters                           
   returns TRUE if url has a concatenated query string.    returns TRUE if url has a concatenated query string.
   ----------------------------------------------------------------------*/    ----------------------------------------------------------------------*/
 ThotBool            IsWithParameters (const char *url)  ThotBool IsWithParameters (const char *url)
 {  {
    int                 i;     int                 i;
   
Line 759  ThotBool            IsWithParameters (co Line 798  ThotBool            IsWithParameters (co
   IsW3Path                                               IsW3Path                                           
   returns TRUE if path is in fact a URL.    returns TRUE if path is in fact a URL.
   ----------------------------------------------------------------------*/    ----------------------------------------------------------------------*/
 ThotBool             IsW3Path (const char *path)  ThotBool IsW3Path (const char *path)
 {  {
   if (strncmp (path, "http:", 5)   &&     if (strncmp (path, "http:", 5)   && 
       strncmp (path, "ftp:", 4)    &&        strncmp (path, "ftp:", 4)    &&
Line 778  ThotBool             IsW3Path (const cha Line 817  ThotBool             IsW3Path (const cha
   IsFilePath                                               IsFilePath                                           
   returns TRUE if path is in fact a URL.    returns TRUE if path is in fact a URL.
   ----------------------------------------------------------------------*/    ----------------------------------------------------------------------*/
 ThotBool             IsFilePath (const char *path)  ThotBool IsFilePath (const char *path)
 {  {
   if (strncmp (path, "file:", 5))    if (strncmp (path, "file:", 5))
     return FALSE;      return FALSE;
Line 789  ThotBool             IsFilePath (const c Line 828  ThotBool             IsFilePath (const c
   IsValidProtocol                                                        IsValidProtocol                                                    
   returns true if the url protocol is supported by Amaya.    returns true if the url protocol is supported by Amaya.
   ----------------------------------------------------------------------*/    ----------------------------------------------------------------------*/
 ThotBool             IsValidProtocol (const char *url)  ThotBool IsValidProtocol (const char *url)
 {  {
    if (!strncmp (url, "http:", 5)     if (!strncmp (url, "http:", 5)
       || !strncmp (url, "internal:", 9)        || !strncmp (url, "internal:", 9)

Removed from v.1.132  
changed lines
  Added in v.1.133


Webmaster