get9.pas 1.4 KB

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