/[cebix]/SheepShaver/src/macos_util.cpp
ViewVC logotype

Diff of /SheepShaver/src/macos_util.cpp

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.6 by cebix, Mon Jan 12 15:37:18 2004 UTC revision 1.7 by gbeauche, Mon May 10 16:16:26 2004 UTC
# Line 58  static inline int16 CloseConnection(uint Line 58  static inline int16 CloseConnection(uint
58  {  {
59          return (int16)CallMacOS1(cc_ptr, cc_tvect, arg1);          return (int16)CallMacOS1(cc_ptr, cc_tvect, arg1);
60  }  }
61    typedef void *(*nps_ptr)(uint32);
62    static uint32 nps_tvect = 0;
63    static inline void *NewPtrSys(uint32 arg1)
64    {
65            return (void *)CallMacOS1(nps_ptr, nps_tvect, arg1);
66    }
67    typedef void (*d_ptr)(void *);
68    static uint32 d_tvect = 0;
69    static inline void DisposePtr(void *arg1)
70    {
71            CallMacOS1(d_ptr, d_tvect, arg1);
72    }
73    
74    
75  /*  /*
# Line 270  void InitCallUniversalProc() Line 282  void InitCallUniversalProc()
282                  printf("FATAL: Can't find CloseConnection()\n");                  printf("FATAL: Can't find CloseConnection()\n");
283                  QuitEmulator();                  QuitEmulator();
284          }          }
285    
286            nps_tvect = (uint32)FindLibSymbol("\014InterfaceLib", "\011NewPtrSys");
287            D(bug("NewPtrSys TVECT at %08lx\n", nps_tvect));
288            if (nps_tvect == 0) {
289                    printf("FATAL: Can't find NewPtrSys()\n");
290                    QuitEmulator();
291            }
292    
293            d_tvect = (uint32)FindLibSymbol("\014InterfaceLib", "\012DisposePtr");
294            D(bug("DisposePtr TVECT at %08lx\n", d_tvect));
295            if (d_tvect == 0) {
296                    printf("FATAL: Can't find DisposePtr()\n");
297                    QuitEmulator();
298            }
299  }  }
300    
301    
# Line 309  uint32 TimeToMacTime(time_t t) Line 335  uint32 TimeToMacTime(time_t t)
335          uint32 days = local->tm_yday + 365 * (local->tm_year - 4) + intervening_leap_days;          uint32 days = local->tm_yday + 365 * (local->tm_year - 4) + intervening_leap_days;
336          return local->tm_sec + 60 * (local->tm_min + 60 * (local->tm_hour + 24 * days));          return local->tm_sec + 60 * (local->tm_min + 60 * (local->tm_hour + 24 * days));
337  }  }
338    
339    
340    /*
341     *  Memory allocators in MacOS system heap zone
342     */
343    
344    void *Mac_sysalloc(uint32 size)
345    {
346            return NewPtrSys(size);
347    }
348    
349    void Mac_sysfree(void *p)
350    {
351            DisposePtr(p);
352    }

Legend:
Removed from v.1.6  
changed lines
  Added in v.1.7

Christian Bauer">Christian Bauer
ViewVC Help
Powered by ViewVC 1.1.15