get9.pas 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. {
  2. This file is part of the Free Pascal run time library.
  3. Copyright (c) 2004 Karoly Balogh
  4. get9.library interface unit for MorphOS/PowerPC
  5. Free Pascal MorphOS port was done on a free Pegasos II/G4 machine
  6. provided by Genesi S.a.r.l. <www.genesi.lu>
  7. See the file COPYING.FPC, included in this distribution,
  8. for details about the copyright.
  9. This program is distributed in the hope that it will be useful,
  10. but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  12. **********************************************************************}
  13. unit get9;
  14. interface
  15. uses exec;
  16. var
  17. Get9Base: Pointer;
  18. const
  19. GET9NAME : PChar = 'get9.library';
  20. procedure DNetCheck(force: boolean);
  21. SysCall BaseSysV Get9Base 28;
  22. function InitGet9Library : boolean;
  23. implementation
  24. var
  25. Get9_exit : Pointer;
  26. const
  27. LIBVERSION=1;
  28. procedure CloseGet9Library;
  29. begin
  30. ExitProc := Get9_exit;
  31. if Get9Base <> nil then begin
  32. CloseLibrary(PLibrary(Get9Base));
  33. Get9Base := nil;
  34. end;
  35. end;
  36. function InitGet9Library : boolean;
  37. begin
  38. Get9Base := nil;
  39. Get9Base := OpenLibrary(GET9NAME,LIBVERSION);
  40. if Get9Base <> nil then begin
  41. Get9_exit := ExitProc;
  42. ExitProc := @CloseGet9Library;
  43. InitGet9Library:=True;
  44. end else begin
  45. InitGet9Library:=False;
  46. end;
  47. end;
  48. begin
  49. end.