File: termios_solaris.go

package info (click to toggle)
golang-github-charmbracelet-x 0.0~git20240809.9ab0ca0%2Bds-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 2,004 kB
  • sloc: sh: 55; makefile: 5
file content (26 lines) | stat: -rw-r--r-- 776 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
//go:build solaris
// +build solaris

package termios

import "golang.org/x/sys/unix"

// see https://src.illumos.org/source/xref/illumos-gate/usr/src/lib/libc/port/gen/isatty.c
// see https://github.com/omniti-labs/illumos-omnios/blob/master/usr/src/uts/common/sys/termios.h
const (
	ioctlSets       = unix.TCSETA
	ioctlGets       = unix.TCGETA
	ioctlSetWinSize = (int('T') << 8) | 103
	ioctlGetWinSize = (int('T') << 8) | 104
)

func setSpeed(*unix.Termios, uint32, uint32) {
	// TODO: support setting speed on Solaris?
	// see cfgetospeed(3C) and cfsetospeed(3C)
	// see cfgetispeed(3C) and cfsetispeed(3C)
	// https://github.com/omniti-labs/illumos-omnios/blob/master/usr/src/uts/common/sys/termios.h#L103
}

func getSpeed(*unix.Termios) (uint32, uint32) {
	return 0, 0
}