ezcgi.inc 769 B

123456789101112131415161718192021222324252627
  1. {
  2. This file is part of the Free Component Library (FCL)
  3. Copyright (c) 1999-2000 by Michael Van Canneyt and Florian Klaempfl
  4. Classes unit for OS/2
  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 DosCalls;
  12. { Declared EXPLICITLY with Ansistring, so NO mistaking is possible }
  13. function GetEnv (var EnvVar: AnsiString): AnsiString;
  14. var P: PChar;
  15. begin
  16. if DosScanEnv (PChar (EnvVar), P) = 0 then GetEnv := P else GetEnv := '';
  17. end;