home *** CD-ROM | disk | FTP | other *** search
/ Gold Fish 2 / goldfish_vol2_cd1.bin / files / util / misc / multiuser / src / library / stdlibfunc.c < prev    next >
C/C++ Source or Header  |  1994-06-29  |  2KB  |  105 lines

  1. /************************************************************
  2. * MultiUser - MultiUser Task/File Support System                *
  3. * ---------------------------------------------------------    *
  4. * Standard Library Functions                                            *
  5. * ---------------------------------------------------------    *
  6. * © Copyright 1993-1994 Geert Uytterhoeven                        *
  7. * All Rights Reserved.                                                    *
  8. ************************************************************/
  9.  
  10.  
  11. #include <exec/execbase.h>
  12. #include <exec/semaphores.h>
  13. #include <exec/alerts.h>
  14. #include <exec/initializers.h>
  15. #include <proto/exec.h>
  16.  
  17. #include "Config.h"
  18. #include "Locale.h"
  19. #include "LibHeader.h"
  20. #include "StdLibFunc.h"
  21. #include "Misc.h"
  22.  
  23.  
  24.     /*
  25.      *        Library initialisation
  26.      */
  27.  
  28. struct muBase __asm __saveds *muInit(register __d0 struct muBase *mubase,
  29.                                                  register __a0 BPTR seglist,
  30.                                                  register __a6 struct ExecBase *sysbase)
  31. {
  32.     SysBase = sysbase;
  33.     muBase = mubase;
  34.     muBase->LibNode.lib_Node.ln_Type = NT_LIBRARY;
  35.     muBase->LibNode.lib_Node.ln_Name = MultiUserName;
  36.     muBase->LibNode.lib_Flags = LIBF_SUMUSED|LIBF_CHANGED;
  37.     muBase->LibNode.lib_Version = MultiUserVersion;
  38.     muBase->LibNode.lib_Revision = MultiUserRevision;
  39.     muBase->LibNode.lib_IdString = MultiUserIDString;
  40.     muBase->SegList = seglist;
  41.  
  42.     if (!Init()) {
  43.         CleanUp();
  44.         FreeMem((APTR)((ULONG)muBase-(ULONG)(muBase->LibNode.lib_NegSize)),
  45.                   muBase->LibNode.lib_NegSize+muBase->LibNode.lib_PosSize);
  46.         return(NULL);
  47.     } else
  48.         return(mubase);
  49. }
  50.  
  51.  
  52.     /*
  53.      *        Library Open() (Called by OpenLibrary())
  54.      *
  55.      *        Standard Library Function
  56.      */
  57.  
  58. struct muBase __asm *muOpen(register __a6 struct muBase *muBase)
  59. {
  60.     muBase->LibNode.lib_OpenCnt++;
  61.     muBase->Flags &= -1-LIBF_DELEXP;
  62.     return(muBase);
  63. }
  64.  
  65.  
  66.     /*
  67.      *        Library Close() (Called by CloseLibrary())
  68.      *
  69.      *        Standard Library Function
  70.      *
  71.      *        The multiuser.library will NEVER be expunged!!
  72.      */
  73.  
  74. BPTR __asm muClose(register __a6 struct muBase *muBase)
  75. {
  76.     muBase->LibNode.lib_OpenCnt--;
  77.     return(NULL);
  78. }
  79.  
  80.  
  81.     /*
  82.      *        Library Expunge() (Called by RemLibrary())
  83.      *
  84.      *        Standard Library Function
  85.      *
  86.      *        The multiuser.library will NEVER be expunged!!
  87.      */
  88.  
  89. BPTR __asm muExpunge(void)
  90. {
  91.     return(NULL);
  92. }
  93.  
  94.  
  95.     /*
  96.      *        Library ExtFunc() (Called by ??)
  97.      *
  98.      *        Standard Library Function
  99.      */
  100.  
  101. ULONG __asm muExtFunc(void)
  102. {
  103.     return(NULL);
  104. }
  105.