30,13 → 30,8 |
OSErr putstr(Handle h,char *s){ |
Ptr p; |
OSErr e; |
size_t size, n; |
size_t size = PIGETHANDLESIZE(h),n = strlen(s); |
|
if (!h) return nilHandleErr; |
|
size = PIGETHANDLESIZE(h); |
n = strlen(s); |
|
if(!(e = PISETHANDLESIZE(h,(int32)(size+n)))){ |
p = PILOCKHANDLE(h,false); |
memcpy(p+size,s,n); |
53,7 → 48,7 |
size_t est; |
static char afs_sig[] = "%RGB-1.0\r"; |
|
if (!h) return nilHandleErr; |
if(!h) DBG("saveparams_afs_pff: Null handle!"); |
|
est = strlen(expr[0]) + strlen(expr[1]) + strlen(expr[2]) + strlen(expr[3]); |
// do not be tempted to combine into one expression: 'est' is referenced below |
111,7 → 106,7 |
OSErr e; |
size_t est; |
|
if (!h) return nilHandleErr; |
if (!h) DBG("saveparams_picotxt: Null handle!"); |
|
est = strlen(expr[0]) + strlen(expr[1]) + strlen(expr[2]) + strlen(expr[3]); |
// do not be tempted to combine into one expression: 'est' is referenced below |
197,14 → 192,9 |
} |
|
OSErr savehandleintofile(Handle h,FILEREF r){ |
Ptr p; |
long n; |
OSErr e; |
|
if (!h) return nilHandleErr; |
p = PILOCKHANDLE(h,false); |
n = PIGETHANDLESIZE(h); |
e = FSWrite(r,&n,p); |
Ptr p = PILOCKHANDLE(h,false); |
long n = PIGETHANDLESIZE(h); |
OSErr e = FSWrite(r,&n,p); |
PIUNLOCKHANDLE(h); |
return e; |
} |