Diff for /Amaya/amaya/AHTURLTools.c between versions 1.100 and 1.101

version 1.100, 2000/06/27 14:44:39 version 1.101, 2000/08/29 15:01:40
Line 345  ThotBool             IsHTMLName (path) Line 345  ThotBool             IsHTMLName (path)
 const CHAR_T*        path;  const CHAR_T*        path;
 #endif /* __STDC__ */  #endif /* __STDC__ */
 {  {
    CHAR_T            temppath[MAX_LENGTH];    CHAR_T            temppath[MAX_LENGTH];
    CHAR_T            suffix[MAX_LENGTH];    CHAR_T            suffix[MAX_LENGTH];
    CHAR_T            nsuffix[MAX_LENGTH];    CHAR_T            nsuffix[MAX_LENGTH];
    int               i;     int               i; 
   
    if (!path)    if (!path)
       return (FALSE);      return (FALSE);
   
    ustrcpy (temppath, path);    ustrcpy (temppath, path);
    ExtractSuffix (temppath, suffix);    ExtractSuffix (temppath, suffix);
    /* while (suffix[0] != WC_EOS) { */    i = 0;
    i = 0;    while (suffix[i] != WC_EOS)
    while (suffix[i] != WC_EOS) {      {
          /* Normalize the suffix */        /* Normalize the suffix */
          i = 0;        i = 0;
          while (suffix[i] != WC_EOS && i < MAX_LENGTH -1) {        while (suffix[i] != WC_EOS && i < MAX_LENGTH -1)
                nsuffix[i] = utolower (suffix[i]);          {
                i++;            nsuffix[i] = utolower (suffix[i]);
                  }            i++;
          nsuffix[i] = WC_EOS;          }
          if (!ustrcmp (nsuffix, TEXT("html")) ||        nsuffix[i] = WC_EOS;
              !ustrcmp (nsuffix, TEXT("htm")) ||        if (!ustrcmp (nsuffix, TEXT("html")) ||
              !ustrcmp (nsuffix, TEXT("shtml")) ||            !ustrcmp (nsuffix, TEXT("htm")) ||
              !ustrcmp (nsuffix, TEXT("jsp")) ||            !ustrcmp (nsuffix, TEXT("shtml")) ||
              !ustrcmp (nsuffix, TEXT("xht")) ||            !ustrcmp (nsuffix, TEXT("jsp")) ||
              !ustrcmp (nsuffix, TEXT("xhtm")) ||            !ustrcmp (nsuffix, TEXT("xht")) ||
              !ustrcmp (nsuffix, TEXT("xhtml")))            !ustrcmp (nsuffix, TEXT("xhtm")) ||
             return (TRUE);            !ustrcmp (nsuffix, TEXT("xhtml")))
          else if (!ustrcmp (nsuffix, TEXT("gz"))) {          return (TRUE);
               /* take into account compressed files */        else if (!ustrcmp (nsuffix, TEXT("gz")))
               ExtractSuffix (temppath, suffix);                 {
               /* Normalize the suffix */            /* take into account compressed files */
               i = 0;            ExtractSuffix (temppath, suffix);       
               while (suffix[i] != WC_EOS && i < MAX_LENGTH -1) {            /* Normalize the suffix */
                     nsuffix[i] = utolower (suffix[i]);            i = 0;
                     i++;            while (suffix[i] != WC_EOS && i < MAX_LENGTH -1)
                           }              {
               nsuffix[i] = WC_EOS;                nsuffix[i] = utolower (suffix[i]);
               if (!ustrcmp (nsuffix, TEXT("html")) ||                i++;
                   !ustrcmp (nsuffix, TEXT("htm")) ||              }
                   !ustrcmp (nsuffix, TEXT("shtml")) ||            nsuffix[i] = WC_EOS;
                   !ustrcmp (nsuffix, TEXT("jsp")) ||            if (!ustrcmp (nsuffix, TEXT("html")) ||
                   !ustrcmp (nsuffix, TEXT("xht")) ||                !ustrcmp (nsuffix, TEXT("htm")) ||
                   !ustrcmp (nsuffix, TEXT("xhtm")) ||                !ustrcmp (nsuffix, TEXT("shtml")) ||
                   !ustrcmp (nsuffix, TEXT("xhtml")))                !ustrcmp (nsuffix, TEXT("jsp")) ||
                  return (TRUE);                !ustrcmp (nsuffix, TEXT("xht")) ||
               else                !ustrcmp (nsuffix, TEXT("xhtm")) ||
                    return (FALSE);                !ustrcmp (nsuffix, TEXT("xhtml")))
                  } else              return (TRUE);
                /* check if there is another suffix */            else
                ExtractSuffix (temppath, suffix);              return (FALSE);
    }          }
            else
           /* check if there is another suffix */
           ExtractSuffix (temppath, suffix);
       }
    return (FALSE);     return (FALSE);
 }  }
   

Removed from v.1.100  
changed lines
  Added in v.1.101


Webmaster