home *** CD-ROM | disk | FTP | other *** search
/ ANews 1 / AnewsCD01.iso / Internet / Newsgroup / THOR_2.6 / THOR26_API.LHA / common / OpenBRLib.c < prev    next >
C/C++ Source or Header  |  1994-12-14  |  667b  |  35 lines

  1. /* OpenBRLib.c
  2.  
  3.     Auto: SC <path>OpenBRLib.c NOSTKCHK IDIR src:bbsread/include DEBUG FULL
  4. */
  5. #define __USE_SYSBASE   1
  6.  
  7. #include <exec/types.h>
  8. #include <proto/exec.h>
  9. #include <proto/dos.h>
  10. #include <libraries/dos.h>
  11.  
  12. #include    <libraries/bbsread.h>
  13.  
  14.  
  15. struct Library *OpenBRLibrary(
  16. struct ExecBase *SysBase,
  17. struct DosLibrary *DOSBase,
  18. LONG version)
  19. {
  20.     TEXT envbuf[256];
  21.     struct Library *BBSReadBase = NULL;
  22.  
  23.     if(GetVar(ENV_THORPATH, envbuf, 256, GVF_GLOBAL_ONLY))
  24.     {
  25.         if(AddPart(envbuf, "libs/" BBSREADNAME, 256))
  26.         {
  27.             BBSReadBase = OpenLibrary(envbuf, version);
  28.         }
  29.  
  30.     }
  31.     if(!BBSReadBase) BBSReadBase = OpenLibrary(BBSREADNAME, version);
  32.  
  33.     return(BBSReadBase);
  34. }
  35.