Lines Matching refs:suff

527     HTSuffix *suff;  in HTSetSuffix5()  local
531 suff = &no_suffix; in HTSetSuffix5()
533 suff = &unknown_suffix; in HTSetSuffix5()
537 while (NULL != (suff = (HTSuffix *) HTList_nextObject(cur))) { in HTSetSuffix5()
538 if (suff->suffix && 0 == strcmp(suff->suffix, suffix) && in HTSetSuffix5()
539 ((trivial_enc && IsUnityEnc(suff->encoding)) || in HTSetSuffix5()
540 (!trivial_enc && !IsUnityEnc(suff->encoding) && in HTSetSuffix5()
541 strcmp(encoding, HTAtom_name(suff->encoding)) == 0))) in HTSetSuffix5()
544 if (!suff) { /* Not found -- create a new node */ in HTSetSuffix5()
545 suff = typecalloc(HTSuffix); in HTSetSuffix5()
546 if (suff == NULL) in HTSetSuffix5()
549 assert(suff != NULL); in HTSetSuffix5()
558 HTList_addObject(HTSuffixes, suff); in HTSetSuffix5()
560 StrAllocCopy(suff->suffix, suffix); in HTSetSuffix5()
565 suff->rep = HTAtom_for(representation); in HTSetSuffix5()
572 suff->encoding = HTAtom_for(encoding); in HTSetSuffix5()
574 StrAllocCopy(suff->desc, desc); in HTSetSuffix5()
576 suff->quality = (float) value; in HTSetSuffix5()
591 HTSuffix *suff = NULL; in free_suffixes() local
600 suff = (HTSuffix *) HTList_removeLastObject(HTSuffixes); in free_suffixes()
601 FREE(suff->suffix); in free_suffixes()
602 FREE(suff->desc); in free_suffixes()
603 FREE(suff); in free_suffixes()
794 HTSuffix *suff; in HTFileSuffix() local
812 suff = (HTSuffix *) HTList_objectAt(HTSuffixes, i); in HTFileSuffix()
813 if (suff->rep == rep && in HTFileSuffix()
818 (!suff->suffix || !suff->suffix[0] || suff->suffix[0] != '.' || in HTFileSuffix()
819 (strchr(suff->suffix + 1, '.') == NULL && in HTFileSuffix()
820 strchr(suff->suffix + 1, '*') == NULL)) && in HTFileSuffix()
822 ((trivial_enc && IsUnityEnc(suff->encoding)) || in HTFileSuffix()
823 (!trivial_enc && !IsUnityEnc(suff->encoding) && in HTFileSuffix()
824 strcmp(enc, HTAtom_name(suff->encoding)) == 0))) { in HTFileSuffix()
826 if (suff->suffix && (strlen(suff->suffix) <= 4)) { in HTFileSuffix()
831 return suff->suffix; in HTFileSuffix()
833 first_found = suff; /* remember this one */ in HTFileSuffix()
836 return suff->suffix; /* OK -- found */ in HTFileSuffix()
885 HTSuffix *suff; in HTFileFormat() local
910 suff = (HTSuffix *) HTList_objectAt(HTSuffixes, i); in HTFileFormat()
911 ls = (int) strlen(suff->suffix); in HTFileFormat()
912 if ((ls <= lf) && 0 == strcasecomp(suff->suffix, filename + lf - ls)) { in HTFileFormat()
916 *pencoding = suff->encoding; in HTFileFormat()
918 *pdesc = suff->desc; in HTFileFormat()
919 if (suff->rep) { in HTFileFormat()
920 return suff->rep; /* OK -- found */ in HTFileFormat()
925 suff = (HTSuffix *) HTList_objectAt(HTSuffixes, j); in HTFileFormat()
926 ls2 = (int) strlen(suff->suffix); in HTFileFormat()
928 !strncasecomp(suff->suffix, in HTFileFormat()
930 if (suff->rep) { in HTFileFormat()
932 *pdesc = suff->desc; in HTFileFormat()
935 !IsUnityEnc(suff->encoding)) in HTFileFormat()
936 *pencoding = suff->encoding; in HTFileFormat()
937 return suff->rep; in HTFileFormat()
947 suff = (strchr(filename, '.') in HTFileFormat()
957 *pencoding = (suff->encoding in HTFileFormat()
958 ? suff->encoding in HTFileFormat()
961 return suff->rep ? suff->rep : WWW_BINARY; in HTFileFormat()
1210 HTSuffix *suff; in HTFileValue() local
1223 suff = (HTSuffix *) HTList_objectAt(HTSuffixes, i); in HTFileValue()
1224 ls = (int) strlen(suff->suffix); in HTFileValue()
1225 if ((ls <= lf) && 0 == strcmp(suff->suffix, filename + lf - ls)) { in HTFileValue()
1227 filename, suff->quality)); in HTFileValue()
1228 return suff->quality; /* OK -- found */ in HTFileValue()