input_darwin.go 608 B

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. // +build darwin
  2. package liner
  3. import "syscall"
  4. const (
  5. getTermios = syscall.TIOCGETA
  6. setTermios = syscall.TIOCSETA
  7. )
  8. const (
  9. // Input flags
  10. inpck = 0x010
  11. istrip = 0x020
  12. icrnl = 0x100
  13. ixon = 0x200
  14. // Output flags
  15. opost = 0x1
  16. // Control flags
  17. cs8 = 0x300
  18. // Local flags
  19. isig = 0x080
  20. icanon = 0x100
  21. iexten = 0x400
  22. )
  23. type termios struct {
  24. Iflag uintptr
  25. Oflag uintptr
  26. Cflag uintptr
  27. Lflag uintptr
  28. Cc [20]byte
  29. Ispeed uintptr
  30. Ospeed uintptr
  31. }
  32. // Terminal.app needs a column for the cursor when the input line is at the
  33. // bottom of the window.
  34. const cursorColumn = true