ezcgi.inc 959 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. {
  2. $Id$
  3. This file is part of the Free Pascal run time library.
  4. Copyright (c) 1999-2000 by Michael Van Canneyt
  5. See the file COPYING.FPC, included in this distribution,
  6. for details about the copyright.
  7. This program is distributed in the hope that it will be useful,
  8. but WITHOUT ANY WARRANTY; without even the implied warranty of
  9. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  10. **********************************************************************}
  11. Uses
  12. {$ifdef ver1_0}
  13. Linux
  14. {$else}
  15. Unix
  16. {$endif}
  17. ;
  18. { Declared EXPLICITLY with Ansistring, so NO mistaking is possible }
  19. Function Getenv (Var EnvVar : AnsiString): AnsiString;
  20. Var P : Pchar;
  21. begin
  22. // Linux version returns pchar.
  23. p:={$ifdef ver1_0}Linux{$else}Unix{$endif}.getenv(EnvVar);
  24. if P<>nil then
  25. getenv:=strpas(p)
  26. else
  27. getenv:='';
  28. end;
  29. {
  30. $Log$
  31. Revision 1.5 2002-09-07 15:15:29 peter
  32. * old logs removed and tabs fixed
  33. }