Rev 192 | Rev 203 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 192 | Rev 194 | ||
---|---|---|---|
Line 53... | Line 53... | ||
53 | 53 | ||
54 | if(!e && h){ |
54 | if(!e && h){ |
55 | n = PIGETHANDLESIZE(h); |
55 | n = PIGETHANDLESIZE(h); |
56 | p = PILOCKHANDLE(h,false); |
56 | p = PILOCKHANDLE(h,false); |
57 | //sprintf(str,"get_cstring: token=%#x s=%#x h=%#x p=%#x n=%d",token,s,h,p,n); dbg(str); |
57 | //sprintf(str,"get_cstring: token=%#x s=%#x h=%#x p=%#x n=%d",token,s,h,p,n); dbg(str); |
58 | if( (str = malloc(n+1)) ){ |
58 | if( (str = (char*)malloc(n+1)) ){ |
59 | memcpy(str,p,n); |
59 | memcpy(str,p,n); |
60 | str[n] = 0; |
60 | str[n] = 0; |
61 | } |
61 | } |
62 | PIUNLOCKHANDLE(h); |
62 | PIUNLOCKHANDLE(h); |
63 | /* FIXME: not sure if we are supposed to dispose of handle */ |
63 | /* FIXME: not sure if we are supposed to dispose of handle */ |
Line 72... | Line 72... | ||
72 | PIReadDescriptor token; |
72 | PIReadDescriptor token; |
73 | DescriptorKeyID key; |
73 | DescriptorKeyID key; |
74 | DescriptorTypeID type; |
74 | DescriptorTypeID type; |
75 | DescriptorKeyIDArray array = { NULLID }; |
75 | DescriptorKeyIDArray array = { NULLID }; |
76 | int32 flags; |
76 | int32 flags; |
77 | OSErr stickyError; |
77 | //OSErr stickyError; |
78 | int32 v; |
78 | int32 v; |
79 | 79 | ||
80 | if (DescriptorAvailable(NULL)){ /* playing back. Do our thing. */ |
80 | if (DescriptorAvailable(NULL)){ /* playing back. Do our thing. */ |
81 | token = OpenReader(array); |
81 | token = OpenReader(array); |
82 | if (token){ |
82 | if (token){ |
Line 93... | Line 93... | ||
93 | } |
93 | } |
94 | break; |
94 | break; |
95 | } |
95 | } |
96 | } |
96 | } |
97 | 97 | ||
98 | stickyError = CloseReader(&token); // closes & disposes. |
98 | /*stickyError =*/ CloseReader(&token); // closes & disposes. |
99 | 99 | ||
100 | // all Filter Foundry parameters are optional, |
100 | // all Filter Foundry parameters are optional, |
101 | // so we needn't worry if any are missing |
101 | // so we needn't worry if any are missing |
102 | } |
102 | } |
103 | 103 | ||
Line 161... | Line 161... | ||
161 | return procs != NULL |
161 | return procs != NULL |
162 | && procs->descriptorParametersVersion == kCurrentDescriptorParametersVersion |
162 | && procs->descriptorParametersVersion == kCurrentDescriptorParametersVersion |
163 | 163 | ||
164 | && procs->readDescriptorProcs != NULL |
164 | && procs->readDescriptorProcs != NULL |
165 | && procs->readDescriptorProcs->readDescriptorProcsVersion == kCurrentReadDescriptorProcsVersion |
165 | && procs->readDescriptorProcs->readDescriptorProcsVersion == kCurrentReadDescriptorProcsVersion |
166 | && procs->readDescriptorProcs->numReadDescriptorProcs >= kCurrentReadDescriptorProcsCount |
166 | && (unsigned int)(procs->readDescriptorProcs->numReadDescriptorProcs) >= kCurrentReadDescriptorProcsCount |
167 | && procs->readDescriptorProcs->openReadDescriptorProc != NULL |
167 | && procs->readDescriptorProcs->openReadDescriptorProc != NULL |
168 | && procs->readDescriptorProcs->closeReadDescriptorProc != NULL |
168 | && procs->readDescriptorProcs->closeReadDescriptorProc != NULL |
169 | && procs->readDescriptorProcs->getKeyProc != NULL |
169 | && procs->readDescriptorProcs->getKeyProc != NULL |
170 | && procs->readDescriptorProcs->getTextProc != NULL |
170 | && procs->readDescriptorProcs->getTextProc != NULL |
171 | && procs->readDescriptorProcs->getIntegerProc != NULL |
171 | && procs->readDescriptorProcs->getIntegerProc != NULL |
172 | 172 | ||
173 | && procs->writeDescriptorProcs != NULL |
173 | && procs->writeDescriptorProcs != NULL |
174 | && procs->writeDescriptorProcs->writeDescriptorProcsVersion == kCurrentWriteDescriptorProcsVersion |
174 | && procs->writeDescriptorProcs->writeDescriptorProcsVersion == kCurrentWriteDescriptorProcsVersion |
175 | && procs->writeDescriptorProcs->numWriteDescriptorProcs >= kCurrentWriteDescriptorProcsCount |
175 | && (unsigned int)(procs->writeDescriptorProcs->numWriteDescriptorProcs) >= kCurrentWriteDescriptorProcsCount |
176 | && procs->writeDescriptorProcs->openWriteDescriptorProc != NULL |
176 | && procs->writeDescriptorProcs->openWriteDescriptorProc != NULL |
177 | && procs->writeDescriptorProcs->closeWriteDescriptorProc != NULL |
177 | && procs->writeDescriptorProcs->closeWriteDescriptorProc != NULL |
178 | && procs->writeDescriptorProcs->putTextProc != NULL |
178 | && procs->writeDescriptorProcs->putTextProc != NULL |
179 | && procs->writeDescriptorProcs->putIntegerProc != NULL ; |
179 | && procs->writeDescriptorProcs->putIntegerProc != NULL ; |
180 | } |
180 | } |