From 0fae7444c66080616eba01f7702bdb2d9b493166 Mon Sep 17 00:00:00 2001 From: Nicholas Noll Date: Tue, 2 Jun 2020 14:54:32 -0700 Subject: prototype of dway. needs testing --- include/libn.h | 5 ++++- include/u.h | 4 ++-- 2 files changed, 6 insertions(+), 3 deletions(-) (limited to 'include') diff --git a/include/libn.h b/include/libn.h index 5201b1c..38f0a3a 100644 --- a/include/libn.h +++ b/include/libn.h @@ -294,7 +294,10 @@ int bufio·read(io·Buffer *buf, int sz, int n, void *out); typedef struct mmap·Reader { vlong len; - void* buf; + union { + byte *buf; + ubyte *ubuf; + }; } mmap·Reader; mmap·Reader mmap·open(byte *name); diff --git a/include/u.h b/include/u.h index d6d6f16..b430cc5 100644 --- a/include/u.h +++ b/include/u.h @@ -14,8 +14,8 @@ // Modern type aliases typedef char byte; -typedef unsigned char ubyte; -typedef signed char sbyte; +typedef unsigned char ubyte, uchar; +typedef signed char sbyte, schar; typedef unsigned long ulong; typedef signed long slong; -- cgit v1.2.1