File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1717#include <errno.h>
1818#include <string.h>
1919
20+ /* We may be able to use a std routine in think, don't know */
21+ unsigned char * Pstring (char * );
22+
2023/* Macro to find out whether we can do HFS-only calls: */
2124#define FSFCBLen (* (short *) 0x3f6)
2225#define hfsrunning () (FSFCBLen > 0)
Original file line number Diff line number Diff line change @@ -447,6 +447,18 @@ mac_write(self, args)
447447}
448448#endif /* !__MWERKS__ */
449449
450+ #ifdef MALLOC_DEBUG
451+ static object *
452+ mac_mstats (self , args )
453+ object * self ;
454+ object * args ;
455+ {
456+ mstats ("python" );
457+ INCREF (None );
458+ return None ;
459+ }
460+ #endif MALLOC_DEBUG
461+
450462static struct methodlist mac_methods [] = {
451463 {"chdir" , mac_chdir },
452464#ifndef __MWERKS__
@@ -477,6 +489,9 @@ static struct methodlist mac_methods[] = {
477489#ifndef __MWERKS__
478490 {"write" , mac_write },
479491#endif
492+ #ifdef MALLOC_DEBUG
493+ {"mstats" , mac_mstats },
494+ #endif
480495
481496 {NULL , NULL } /* Sentinel */
482497};
@@ -485,7 +500,7 @@ static struct methodlist mac_methods[] = {
485500void
486501initmac ()
487502{
488- object * m , * d , * v ;
503+ object * m , * d ;
489504
490505 m = initmodule ("mac" , mac_methods );
491506 d = getmoduledict (m );
Original file line number Diff line number Diff line change @@ -17,14 +17,12 @@ guesstabsize(path)
1717 s [0 ] = strlen (path );
1818 memcpy (s + 1 , path , s [0 ]);
1919 refnum = OpenResFile (s );
20- /* printf("%s --> refnum=%d\n", path, refnum); */
2120 if (refnum == -1 )
2221 return 0 ;
2322 UseResFile (refnum );
2423 h = GetIndResource ('ETAB' , 1 );
2524 if (h != 0 ) {
2625 tabsize = (* (short * * )h )[1 ];
27- /* printf("tabsize=%d\n", tabsize); */
2826 }
2927 CloseResFile (refnum );
3028 return tabsize ;
Original file line number Diff line number Diff line change @@ -14,7 +14,7 @@ long creator, type;
1414 FInfo info ;
1515 unsigned char * pname ;
1616
17- pname = (StringPtr ) c2pstr (name );
17+ pname = (StringPtr ) Pstring (name );
1818 if ( GetFInfo (pname , 0 , & info ) < 0 )
1919 return -1 ;
2020 info .fdType = type ;
You can’t perform that action at this time.
0 commit comments