ezcgi.inc 787 B

1234567891011121314151617181920212223242526272829303132
  1. {
  2. This file is part of the Free Pascal run time library.
  3. Copyright (c) 1999-2000 by Michael Van Canneyt
  4. See the file COPYING.FPC, included in this distribution,
  5. for details about the copyright.
  6. This program is distributed in the hope that it will be useful,
  7. but WITHOUT ANY WARRANTY; without even the implied warranty of
  8. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  9. **********************************************************************}
  10. Uses
  11. baseUnix;
  12. { Declared EXPLICITLY with Ansistring, so NO mistaking is possible }
  13. Function Getenv (Var EnvVar : AnsiString): AnsiString;
  14. Var P : Pchar;
  15. begin
  16. // Linux version returns pchar.
  17. p:=BaseUnix.fpgetenv(EnvVar);
  18. if P<>nil then
  19. getenv:=strpas(p)
  20. else
  21. getenv:='';
  22. end;