Subversion Repositories filter_foundry

Compare Revisions

Regard whitespace Rev 188 → Rev 189

/trunk/read.c
143,7 → 143,7
photoshop->map_used[i] = premiere->map_used[i];
for (i=0;i<8;++i)
photoshop->ctl_used[i] = premiere->ctl_used[i];
sprintf(photoshop->category, "Filter Factory"); // Premiere plugins do not have a category attribute
sprintf((char*)photoshop->category, "Filter Factory"); // Premiere plugins do not have a category attribute
photoshop->iProtected = 0; // Premiere plugins do not have a protect flag
memcpy((void*)photoshop->title, (void*)premiere->title, sizeof(photoshop->title));
memcpy((void*)photoshop->copyright, (void*)premiere->copyright, sizeof(photoshop->copyright));
168,7 → 168,7
 
Boolean read8bfplugin(StandardFileReply *sfr,char **reason){
unsigned char magic[2];
long count;
FILECOUNT count;
Handle h;
Boolean res = false;
FILEREF refnum;
178,7 → 178,7
// check DOS EXE magic number
count = 2;
if(FSRead(refnum,&count,magic) == noErr /*&& magic[0]=='M' && magic[1]=='Z'*/){
if(GetEOF(refnum,&count) == noErr && count < 256L<<10){ // sanity check file size < 256K
if(GetEOF(refnum,(FILEPOS*)&count) == noErr && count < 256L<<10){ // sanity check file size < 256K
if( (h = readfileintohandle(refnum)) ){
long *q = (long*)PILOCKHANDLE(h,false);
 
267,13 → 267,13
}
 
Handle readfileintohandle(FILEREF r){
long n;
FILEPOS n;
Handle h;
Ptr p;
 
if( GetEOF(r,&n) == noErr && (h = PINEWHANDLE(n)) ){
p = PILOCKHANDLE(h,false);
if(SetFPos(r,fsFromStart,0) == noErr && FSRead(r,&n,p) == noErr){
if(SetFPos(r,fsFromStart,0) == noErr && FSRead(r,(FILECOUNT*)&n,p) == noErr){
PIUNLOCKHANDLE(h);
return h;
}