diff options
author | Michael Shalayeff <mickey@cvs.openbsd.org> | 1996-10-23 09:02:55 +0000 |
---|---|---|
committer | Michael Shalayeff <mickey@cvs.openbsd.org> | 1996-10-23 09:02:55 +0000 |
commit | 1694f084732e3fd41b2594922184771d8217f4b8 (patch) | |
tree | cb1d608eaa5f091da1732a65977c39c74ad4af7e /sys/lib/libsa/stand.h | |
parent | 8828bb30112279b5b23ddfdbd09842da6451e73e (diff) |
introduce multiconsoles.
add btochs macro.
Diffstat (limited to 'sys/lib/libsa/stand.h')
-rw-r--r-- | sys/lib/libsa/stand.h | 20 |
1 files changed, 18 insertions, 2 deletions
diff --git a/sys/lib/libsa/stand.h b/sys/lib/libsa/stand.h index 9e3e105af8a..ccdb0d2f184 100644 --- a/sys/lib/libsa/stand.h +++ b/sys/lib/libsa/stand.h @@ -1,4 +1,4 @@ -/* $OpenBSD: stand.h,v 1.11 1996/10/17 06:49:58 mickey Exp $ */ +/* $OpenBSD: stand.h,v 1.12 1996/10/23 09:02:54 mickey Exp $ */ /* $NetBSD: stand.h,v 1.13 1996/01/13 22:25:42 leo Exp $ */ /*- @@ -94,6 +94,17 @@ struct devsw { extern struct devsw devsw[]; /* device array */ extern int ndevs; /* number of elements in devsw[] */ +struct consw { + char *name; /* console driver name */ + int (*cn_probe) __P((void)); /* probe device for presence */ + void (*cn_putc) __P((int c)); /* print char */ + int (*cn_getc) __P((void)); /* read char */ + int (*cn_ischar) __P((void)); /* check input */ +}; + +extern struct consw consw[]; +extern int ncons; + struct open_file { int f_flags; /* see F_* below */ struct devsw *f_dev; /* pointer to device operations */ @@ -119,7 +130,11 @@ extern struct open_file files[]; #define isspace(c) ((c) == ' ' || (c) == '\t') #define isdigit(c) ((c) >= '0' && (c) <= '9') -int devopen __P((struct open_file *, const char *, char **)); +#define btochs(b,c,h,s,nh,ns) \ + c = (b) / ((nh) * (ns)); \ + h = ((b) % ((nh) * (ns))) / (ns); \ + s = ((b) % ((nh) * (ns))) % (ns); + void *alloc __P((unsigned int)); void free __P((void *, unsigned int)); struct disklabel; @@ -167,6 +182,7 @@ int null_stat __P((struct open_file *f, struct stat *sb)); int null_readdir __P((struct open_file *f, char *name)); /* Machine dependent functions */ +int devopen __P((struct open_file *, const char *, char **)); void machdep_start __P((char *, int, char *, char *, char *)); int getchar __P((void)); void putchar __P((int)); |