v0.4.0: scroll log, worker slots, disk skip, color gradient, parallel export

This commit is contained in:
Ein Anderssono
2026-06-12 14:03:18 +02:00
parent e888f7cad1
commit 3d3c4a4742
15 changed files with 1609 additions and 181 deletions
+23
View File
@@ -0,0 +1,23 @@
//go:build !test
package main
import (
"syscall"
"unsafe"
)
func termSize() (int, int) {
type winsize struct {
Rows uint16
Cols uint16
Xpixels uint16
Ypixels uint16
}
var ws winsize
_, _, errno := syscall.Syscall(syscall.SYS_IOCTL, uintptr(syscall.Stdout), syscall.TIOCGWINSZ, uintptr(unsafe.Pointer(&ws)))
if errno != 0 || ws.Cols == 0 || ws.Rows == 0 {
return 80, 24
}
return int(ws.Cols), int(ws.Rows)
}