Rev 145 | Rev 149 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 145 | Rev 147 | ||
---|---|---|---|
Line 58... | Line 58... | ||
58 | static Boolean read8bfplugin(StandardFileReply *sfr,char **reason){ |
58 | static Boolean read8bfplugin(StandardFileReply *sfr,char **reason){ |
59 | unsigned char magic[2]; |
59 | unsigned char magic[2]; |
60 | long count; |
60 | long count; |
61 | Handle h; |
61 | Handle h; |
62 | Boolean res = false; |
62 | Boolean res = false; |
63 | short refnum; |
63 | FILEREF refnum; |
64 | int i; |
64 | int i; |
65 | 65 | ||
66 | if(!FSpOpenDF(&sfr->sfFile,fsRdPerm,&refnum)){ |
66 | if(!FSpOpenDF(&sfr->sfFile,fsRdPerm,&refnum)){ |
67 | // check DOS EXE magic number |
67 | // check DOS EXE magic number |
68 | count = 2; |
68 | count = 2; |
Line 101... | Line 101... | ||
101 | 101 | ||
102 | if(!FSpGetFInfo(&sfr->sfFile,&fndrInfo)){ |
102 | if(!FSpGetFInfo(&sfr->sfFile,&fndrInfo)){ |
103 | // first try to read text parameters (AFS, TXT, PFF) |
103 | // first try to read text parameters (AFS, TXT, PFF) |
104 | if( (readok = readfile(sfr,reason)) ) |
104 | if( (readok = readfile(sfr,reason)) ) |
105 | gdata->parmloaded = false; |
105 | gdata->parmloaded = false; |
106 | // then try plugin formats (Mac first, then Windows .8bf DLL) |
106 | // then try plugin formats (Mac first, then Windows .8bf or .prm DLL) |
107 | else if( (readok = readmacplugin(sfr,reason) || read8bfplugin(sfr,reason)) ){ |
107 | else if( (readok = readmacplugin(sfr,reason) || read8bfplugin(sfr,reason)) ){ |
108 | if(gdata->parm.iProtected){ |
108 | if(gdata->parm.iProtected){ |
109 | *reason = "The filter is protected."; |
109 | *reason = "The filter is protected."; |
110 | return false; |
110 | return false; |
111 | }else |
111 | }else |