unix98pty.pp 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. { This file is part of fpterm - a terminal emulator, written in Free Pascal
  2. Copyright (C) 2021, 2024 Nikolay Nikolov <[email protected]>
  3. This library is free software; you can redistribute it and/or modify it
  4. under the terms of the GNU Library General Public License as published by
  5. the Free Software Foundation; either version 2 of the License, or (at your
  6. option) any later version with the following modification:
  7. As a special exception, the copyright holders of this library give you
  8. permission to link this library with independent modules to produce an
  9. executable, regardless of the license terms of these independent modules,and
  10. to copy and distribute the resulting executable under terms of your choice,
  11. provided that you also meet, for each linked independent module, the terms
  12. and conditions of the license of that module. An independent module is a
  13. module which is not derived from or based on this library. If you modify
  14. this library, you may extend this exception to your version of the library,
  15. but you are not obligated to do so. If you do not wish to do so, delete this
  16. exception statement from your version.
  17. This program is distributed in the hope that it will be useful, but WITHOUT
  18. ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  19. FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License
  20. for more details.
  21. You should have received a copy of the GNU Library General Public License
  22. along with this library; if not, write to the Free Software Foundation,
  23. Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1335, USA.
  24. }
  25. {$IFNDEF FPC_DOTTEDUNITS}
  26. unit unix98pty;
  27. {$ENDIF FPC_DOTTEDUNITS}
  28. interface
  29. uses
  30. {$IFDEF FPC_DOTTEDUNITS}
  31. System.CTypes;
  32. {$ELSE FPC_DOTTEDUNITS}
  33. ctypes;
  34. {$ENDIF FPC_DOTTEDUNITS}
  35. function fpposix_openpt(flags: cint): cint; external 'c' name 'posix_openpt';
  36. function fpgrantpt(fd: cint): cint; external 'c' name 'grantpt';
  37. function fpunlockpt(fd: cint): cint; external 'c' name 'unlockpt';
  38. function fpptsname(fd: cint): PAnsiChar; external 'c' name 'ptsname';
  39. implementation
  40. end.