SchOS/include
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Nexoniarz a5b0d5a0ef tty: the grid was 80x24 on a 160x50 screen, and wrapping was eager
Three symptoms, two causes, both in the terminal layer.

**The grid and TIOCGWINSZ disagreed about the size.** vt_init() sizes every
grid from gfx_cols()/gfx_rows(), and it runs at main.c:75 -- while the display
driver attaches its scanout from the PCI bus walk at main.c:99. So the grids
were the 80x24 fallback, and TIOCGWINSZ, which computed its own answer live,
said 160x50.

That one disagreement produced all three things visible in the report: text
stopped two thirds of the way down the screen, `ls` laid out 160 columns into
an 80-column grid so words split across the wrap ("vers" / "ion"), and zsh's
cursor tracking was wrong on every line.

Fixed in two places, because either alone would leave the trap set:
gfx_attach_scanout() now calls vt_resize(), so the grids learn the real screen
the moment there is one; and TIOCGWINSZ reports v->cols/v->rows rather than
measuring again. One number, from the terminal being asked.

**Wrapping was eager.** A glyph printed in the last column moved the cursor to
the next line immediately. Real terminals set a pending-wrap flag and wrap when
the *next* glyph arrives -- which is why a line exactly as wide as the screen
takes one row and not two, and why a program can write the bottom-right cell
without scrolling.

zsh's partial-line marker depends on that rule directly: it writes exactly
COLUMNS-1 spaces and expects to still be on the line. With eager wrap it left a
reverse-video '#' above every prompt, which is the hashtag in the report. Both
are gone.

Verified by screendump: `ls /proc` now fits one line with "version" intact, no
markers, and output fills the screen to the last row. schfs-check passes.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VQ7Qx8E1q1M1bbCq8QLHS2
2026-09-13 12:49:13 +02:00
..
asm.h Initial commit: Schunix as it stands before the SchOS rename 2026-08-09 13:47:01 +02:00
buf.h Raise the disk ceiling: 64-bit blocks, no FSSIZE panic, LBA48 2026-08-10 18:50:31 +02:00
config_sinit.h Initial commit: Schunix as it stands before the SchOS rename 2026-08-09 13:47:01 +02:00
date.h Initial commit: Schunix as it stands before the SchOS rename 2026-08-09 13:47:01 +02:00
defs.h tty: six virtual terminals, and the plumbing that makes them terminals 2026-09-13 00:08:00 +02:00
device.h docs: four directories, and a rule for when a thing leaves the roadmap 2026-09-12 17:13:35 +02:00
display.h Initial commit: Schunix as it stands before the SchOS rename 2026-08-09 13:47:01 +02:00
dma.h Initial commit: Schunix as it stands before the SchOS rename 2026-08-09 13:47:01 +02:00
elf.h Initial commit: Schunix as it stands before the SchOS rename 2026-08-09 13:47:01 +02:00
errno.h schfs: a format version policy, and refusing is not falling back 2026-09-12 17:13:59 +02:00
fb.h Rename Schunix to SchOS; the kernel becomes SchIFT 2026-08-09 14:09:59 +02:00
fcntl.h Rename Schunix to SchOS; the kernel becomes SchIFT 2026-08-09 14:09:59 +02:00
file.h fs: devtmpfs, so /dev is generated rather than written to a disk 2026-09-12 20:18:30 +02:00
font.h Rename Schunix to SchOS; the kernel becomes SchIFT 2026-08-09 14:09:59 +02:00
fs.h init survives stray signals; commands are 4-34x faster 2026-08-09 15:54:05 +02:00
fsstat.h fs: timestamps come from the clock, and /proc/fsstat says how full the tables are 2026-09-12 17:14:14 +02:00
gfx.h tty: six virtual terminals, and the plumbing that makes them terminals 2026-09-13 00:08:00 +02:00
input.h usb-hid: bind an absolute pointer, and plumb EV_ABS through 2026-08-10 18:27:01 +02:00
irq.h Initial commit: Schunix as it stands before the SchOS rename 2026-08-09 13:47:01 +02:00
kbd.h tty: six virtual terminals, and the plumbing that makes them terminals 2026-09-13 00:08:00 +02:00
logo.h docs: a branding folder, and the three marks are not interchangeable 2026-09-12 18:19:09 +02:00
memlayout.h Free every usable memory region, not one contiguous run 2026-08-09 20:03:51 +02:00
mmu.h Initial commit: Schunix as it stands before the SchOS rename 2026-08-09 13:47:01 +02:00
mp.h Initial commit: Schunix as it stands before the SchOS rename 2026-08-09 13:47:01 +02:00
netdev.h net: a frame wakes the stack, instead of waiting for the clock 2026-09-12 17:23:46 +02:00
param.h kernel: processes have an environment now, and zsh is the shell 2026-09-12 23:26:50 +02:00
pci.h net: a network *class*, so the stack stops knowing what an e1000 is 2026-08-15 16:42:34 +02:00
posix.h tty: six virtual terminals, and the plumbing that makes them terminals 2026-09-13 00:08:00 +02:00
proc.h tty: six virtual terminals, and the plumbing that makes them terminals 2026-09-13 00:08:00 +02:00
qr.h docs: four directories, and a rule for when a thing leaves the roadmap 2026-09-12 17:13:35 +02:00
schboot.h boot/uefi: the memory map the kernel gets is the one the firmware agreed to 2026-08-11 11:42:22 +02:00
schfs.h schfs: records at arbitrary offsets are packed, and the compiler is told 2026-09-12 17:56:36 +02:00
sleeplock.h Initial commit: Schunix as it stands before the SchOS rename 2026-08-09 13:47:01 +02:00
socket.h net: AF_NETLINK, so getifaddrs() works for everything and not just one program 2026-09-12 19:23:34 +02:00
spinlock.h Initial commit: Schunix as it stands before the SchOS rename 2026-08-09 13:47:01 +02:00
stat.h Initial commit: Schunix as it stands before the SchOS rename 2026-08-09 13:47:01 +02:00
syscall.h Initial commit: Schunix as it stands before the SchOS rename 2026-08-09 13:47:01 +02:00
text.h Initial commit: Schunix as it stands before the SchOS rename 2026-08-09 13:47:01 +02:00
theme.h gfx: the console and the crash screen stop drawing on a driver by name 2026-08-15 17:04:10 +02:00
traps.h Initial commit: Schunix as it stands before the SchOS rename 2026-08-09 13:47:01 +02:00
ttf.h Initial commit: Schunix as it stands before the SchOS rename 2026-08-09 13:47:01 +02:00
types.h Initial commit: Schunix as it stands before the SchOS rename 2026-08-09 13:47:01 +02:00
uaccess.h Rename Schunix to SchOS; the kernel becomes SchIFT 2026-08-09 14:09:59 +02:00
usb.h usb-hid: bind an absolute pointer, and plumb EV_ABS through 2026-08-10 18:27:01 +02:00
user.h kernel: processes have an environment now, and zsh is the shell 2026-09-12 23:26:50 +02:00
vt.h tty: the grid was 80x24 on a 160x50 screen, and wrapping was eager 2026-09-13 12:49:13 +02:00
x86.h schfs: the commit barrier, reflink, and attributes with an index over them 2026-08-15 16:02:02 +02:00