Term.Mod 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. MODULE Term;
  2. (* Copyright 2017-2020 Arthur Yefimov
  3. This file is part of Free Oberon.
  4. Free Oberon is free software: you can redistribute it and/or modify
  5. it under the terms of the GNU General Public License as published by
  6. the Free Software Foundation, either version 3 of the License, or
  7. (at your option) any later version.
  8. Free Oberon is distributed in the hope that it will be useful,
  9. but WITHOUT ANY WARRANTY; without even the implied warranty of
  10. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  11. GNU General Public License for more details.
  12. You should have received a copy of the GNU General Public License
  13. along with Foobar. If not, see <http://www.gnu.org/licenses/>.
  14. *)
  15. IMPORT SYSTEM;
  16. PROCEDURE -AAIncludeTermh* '#include "Term/Term.h"';
  17. PROCEDURE -StartProcess*
  18. (cmd: ARRAY OF CHAR): BOOLEAN
  19. "StartProcess(cmd)";
  20. PROCEDURE -StartProcessDir*
  21. (cmd, dir: ARRAY OF CHAR): BOOLEAN
  22. "StartProcessDir(cmd, dir)";
  23. PROCEDURE -ProcessFinished*(VAR err: INTEGER): BOOLEAN
  24. "ProcessFinished(err)";
  25. PROCEDURE -WriteToProcess*
  26. (buf: ARRAY OF CHAR; len: INTEGER)
  27. "WriteToProcess(buf, len)";
  28. PROCEDURE -ReadFromProcess*
  29. (VAR buf: ARRAY OF CHAR; VAR len: INTEGER; limit: INTEGER)
  30. "ReadFromProcess(buf, len, limit)";
  31. PROCEDURE -RunProcess*
  32. (cmd: ARRAY OF CHAR; VAR buf: ARRAY OF CHAR;
  33. limit: INTEGER; VAR len, err: INTEGER): INTEGER
  34. "(int)RunProcess((char *)cmd, (char *)buf, limit, len, err)";
  35. PROCEDURE -SearchPath*
  36. (filename: ARRAY OF CHAR; VAR result: ARRAY OF CHAR): LONGINT
  37. "(int)MySearchPath((char *)filename, (char *)result, result__len)";
  38. END Term.