From 2e719300a037bbdafdc8a5c38b4812c678d62ddc Mon Sep 17 00:00:00 2001 From: Nicholas Date: Fri, 10 Dec 2021 15:49:00 -0800 Subject: Chore: merge main into laptop --- sys/linux/amd64/arch/constants.h | 2 +- sys/linux/port/os/constants.h | 9 ++++----- sys/linux/port/os/types.h | 13 ++++++++++--- 3 files changed, 15 insertions(+), 9 deletions(-) (limited to 'sys') diff --git a/sys/linux/amd64/arch/constants.h b/sys/linux/amd64/arch/constants.h index f1c1b4c..9ba607c 100644 --- a/sys/linux/amd64/arch/constants.h +++ b/sys/linux/amd64/arch/constants.h @@ -2,7 +2,7 @@ #define sys·OCreate 0100 #define sys·OUnique 0200 -#define sys·ONoTTY 0400 +#define sys·ONoCtlTTY 0400 #define sys·OTrunc 01000 #define sys·OAppend 02000 #define sys·ONoBlock 04000 diff --git a/sys/linux/port/os/constants.h b/sys/linux/port/os/constants.h index 458c2c2..410698a 100644 --- a/sys/linux/port/os/constants.h +++ b/sys/linux/port/os/constants.h @@ -6,7 +6,6 @@ #define sys·FileCanWrite 2 #define sys·FileCanRead 4 - /* device modes */ #define sys·ModeFile 0170000 #define sys·ModeDir 0040000 @@ -18,10 +17,10 @@ #define sys·ModeSocket 0140000 /* ioctl values */ -#define sys·IoCtlTermGet 0x5401 -#define sys·IoCtlTermSet 0x5402 -#define sys·IoCtlTermGetWinSize 0x5413 -#define sys·IoCtlTermSetWinSize 0x5414 +#define sys·IoCtlTermGet 0x5401 +#define sys·IoCtlTermSet 0x5402 +#define sys·IoCtlTermGetWindowSize 0x5413 +#define sys·IoCtlTermSetWindowSize 0x5414 #define sys·TermVInterupt 0 #define sys·TermVQuit 1 diff --git a/sys/linux/port/os/types.h b/sys/linux/port/os/types.h index 9452e39..7f83c3d 100644 --- a/sys/linux/port/os/types.h +++ b/sys/linux/port/os/types.h @@ -1,4 +1,5 @@ #pragma once + #define packed __attribute__((packed)) /* @@ -112,11 +113,10 @@ struct sys·DirEntry * terminal */ -/* termios - * NOTE: this is incorrect for Mips and PowerPC... - */ typedef struct sys·TerminalIO sys·TerminalIO; +typedef struct sys·WindowSize sys·WindowSize; +/* termios NOTE: this is incorrect for Mips and PowerPC... */ struct sys·TerminalIO { uint i,o,c,l; /* input,output,control,local flags */ @@ -126,4 +126,11 @@ struct sys·TerminalIO uint ospeed; /* output speed */ }; +/* screen/window */ +struct sys·WindowSize +{ + ushort row, col; + ushort dx, dy; /* pixels */ +}; + #undef packed -- cgit v1.2.1