Changeset 248 for trunk/dll/avl.c
- Timestamp:
- Aug 14, 2005, 1:32:09 AM (20 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/dll/avl.c
r247 r248 11 11 01 Aug 04 SHL Rework lstrip/rstrip usage 12 12 13 Aug 05 SHL Beautify with indent 13 13 Aug 05 SHL find_type: correct no sig exists bypass logic 13 14 14 15 ***********************************************************************/ … … 61 62 { 62 63 HFILE handle; 63 ULONG action, len, l; 64 ULONG action; 65 ULONG len; 66 ULONG l; 64 67 ARC_TYPE *info; 65 CHAR *p, buffer[80]; /* Read buffer for the signatures. */ 68 CHAR *p; 69 CHAR buffer[80]; 66 70 67 71 if (!loadedarcs) 68 72 load_archivers(); 69 if ( topsig == NULL)73 if (!topsig) 70 74 topsig = arcsighead; 71 75 DosError(FERR_DISABLEHARDERR); … … 84 88 0L)) 85 89 return NULL; 86 info = topsig; /* start of signatures */87 while (info)90 // Scan signatures 91 for (info = topsig; info; info = info -> next) 88 92 { 89 if (!info -> signature || 90 !*info -> signature)91 { /* no signature -- work on extension only */93 if (!info -> signature || !*info -> signature) 94 { 95 // No signature -- check extension 92 96 p = strrchr(filespec, '.'); 93 97 if (p) … … 97 101 *(info -> ext) && 98 102 !stricmp(p, info -> ext)) 99 break; 100 } 103 break; // Matched 104 } 105 continue; // Next sig 101 106 } 102 l = strlen(info -> signature); /* Get the signature length. */ 107 // Try signature match 108 l = strlen(info -> signature); 103 109 l = min(l, 79); 104 110 if (!DosChgFilePtr(handle, … … 118 124 buffer, 119 125 l)) 120 break; 126 break; // Matched 121 127 } 122 128 } 123 info = info -> next; 124 } 129 } // for 125 130 DosClose(handle); /* Either way, we're done for now */ 126 131 return info; /* return signature, if any */
Note:
See TracChangeset
for help on using the changeset viewer.