home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1999 July: Mac OS SDK / Dev.CD Jul 99 SDK1.toast / Development Kits / Mac OS / Apple Shared Library Manager / ASLM Developer Tools / MPW Libraries Support / Interfaces / MPWSharedLibs.h < prev   
Encoding:
C/C++ Source or Header  |  1996-11-19  |  3.4 KB  |  95 lines  |  [TEXT/MPS ]

  1. /*    File:        MPWSharedLibs.h
  2.  
  3.     Contains:    Declarations to use MPW shared library functions.
  4.  
  5.     Copyright:    © 1993-1994 by Apple Computer, Inc., all rights reserved.
  6.  
  7.  
  8. */
  9.  
  10. #ifndef __MPWSHAREDLIBS__
  11. #define __MPWSHAREDLIBS__
  12.  
  13. #ifdef __cplusplus
  14. extern "C" {
  15. #endif
  16.  
  17. #define kMPWMath1FuncsID    "aslm:mpw$Math1,3.3.1"
  18. #define kMPWMath1FuncsID    "aslm:mpw$Math1,3.3.1"
  19. #define kMPWMath2FuncsID    "aslm:mpw$Math2,3.3.1"
  20. #define kMPWComplexFuncsID    "aslm:mpw$Complex,3.3.1"
  21. #define kMPWStdCLib1FuncsID    "aslm:mpw$StdCLib1,3.3.1"
  22. #define kMPWStdCLib2FuncsID    "aslm:mpw$StdCLib2,3.3.1"
  23.  
  24. #define kErrnoCallbacksID    "aslm:mpw$ErrnoCallbacks,3.3.1"
  25. #define kSystemCallbacksID    "aslm:mpw$SystemCB,3.3.1"
  26. #define kStdIOCallbacksID    "aslm:mpw$StdIOCB,3.3.1"
  27. #define kLocaleCallbacksID    "aslm:mpw$LocaleCB,3.3.1"
  28.  
  29. /*******************************************************************************
  30. ** CleanupMPWLibraries()
  31. **
  32. ** This routine is linked with clients of the MPW Libraries, both applications
  33. ** and other shared libraries. It will allow the MPW Libraries to unload when
  34. ** they currently are not in use by any client, but are being kept loaded
  35. ** because of the circular dependencies that they have on each other. Calling
  36. ** this routine will cause each of the MPW Libraries to do a ResetFunctionSet(NULL)
  37. ** so their cirucular dependencies are released. It also makes the client do a
  38. ** reset function set on each of the MPW Libraries. If no clients are using the
  39. ** MPW Libraries at this piont then they will unload.
  40. **
  41. ** Call this routine either when you are finished using the MPW Libraries or
  42. ** just before calling CleanupLibraryManager.
  43. ********************************************************************************/
  44.  
  45. void CleanupMPWLibraries(void);
  46.  
  47. /*******************************************************************************
  48. ** InitSystemCallbacks()
  49. **
  50. ** This function sets up callbacks for the following routines:
  51. **    malloc, free, calloc, realloc
  52. **    getenv, atexit, exit, _exit, signal, raise
  53. **    getpid, strtol, strtoul
  54. **    _getIOPort, _uerror, _faccess, _coRead, _coWrite (used by non-stream file I/O)
  55. **
  56. ** In addition it sets things up so that errno and MacOSErr are available to
  57. ** the library, if it included ASLMCLib.h
  58. ********************************************************************************/
  59.  
  60. OSErr InitSystemCallbacks(void);
  61.  
  62. /*******************************************************************************
  63. ** InitStdIOCallbacks()
  64. **
  65. ** This function calls InitSystemCallbacs, then sets up callbacks for the
  66. ** following routines:
  67. **    perror, __assertprint, fflush, gets, puts, scanf, printf, vprintf
  68. **    _filbuf, _findbuf, _findiop
  69. **
  70. ** In addition it sets things up so that errno and MacOSErr are available to
  71. ** the library, if it included ASLMCLib.h.
  72. ** It also sets things up so that stdin, stdout, and stderr are available to
  73. ** the library, if it included ASLMCLib.h
  74. ********************************************************************************/
  75.  
  76. OSErr InitStdIOCallbacks(void);
  77.  
  78.  
  79. /*******************************************************************************
  80. ** InitLocaleCallbacks()
  81. **
  82. ** This function sets up callbacks for the following routines:
  83. **    localeconv, setlocale, strftime
  84. **
  85. ** In addition it sets things up so that errno and MacOSErr are available to
  86. ** the library, if it included ASLMCLib.h.
  87. ********************************************************************************/
  88.  
  89. OSErr InitLocaleCallbacks(void);
  90.  
  91. #ifdef __cplusplus
  92. };
  93. #endif
  94.  
  95. #endif