summaryrefslogtreecommitdiff
path: root/i386/i386at
diff options
context:
space:
mode:
Diffstat (limited to 'i386/i386at')
-rw-r--r--i386/i386at/autoconf.c24
-rw-r--r--i386/i386at/blit.c116
-rw-r--r--i386/i386at/conf.c52
-rw-r--r--i386/i386at/fd.c106
-rw-r--r--i386/i386at/idt.h4
-rw-r--r--i386/i386at/immc.c5
-rw-r--r--i386/i386at/kd.c226
-rw-r--r--i386/i386at/kd_event.c54
-rw-r--r--i386/i386at/kd_mouse.c64
-rw-r--r--i386/i386at/model_dep.c20
-rw-r--r--i386/i386at/rtc.c44
11 files changed, 357 insertions, 358 deletions
diff --git a/i386/i386at/autoconf.c b/i386/i386at/autoconf.c
index 50eec98..8542a96 100644
--- a/i386/i386at/autoconf.c
+++ b/i386/i386at/autoconf.c
@@ -1,29 +1,29 @@
-/*
+/*
* Mach Operating System
* Copyright (c) 1993,1992,1991,1990,1989 Carnegie Mellon University
* All Rights Reserved.
- *
+ *
* Permission to use, copy, modify and distribute this software and its
* documentation is hereby granted, provided that both the copyright
* notice and this permission notice appear in all copies of the
* software, derivative works or modified versions, and any portions
* thereof, and that both notices appear in supporting documentation.
- *
+ *
* CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
* CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR
* ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
- *
+ *
* Carnegie Mellon requests users of this software to return to
- *
+ *
* Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU
* School of Computer Science
* Carnegie Mellon University
* Pittsburgh PA 15213-3890
- *
+ *
* any improvements or extensions that they make and grant Carnegie Mellon
* the rights to redistribute these changes.
*/
-
+
#ifdef MACH_KERNEL
#include <mach_ttd.h>
#include <mach/std_types.h>
@@ -81,7 +81,7 @@ extern int pc586intr();
#if NNE > 0
extern struct bus_driver nedriver;
extern int neintr();
-#endif NNE
+#endif /* NNE */
#include <ns8390.h>
#if NNS8390 > 0
@@ -133,7 +133,7 @@ extern int wtintr();
struct bus_ctlr bus_master_init[] = {
-/* driver name unit intr address len phys_address
+/* driver name unit intr address len phys_address
adaptor alive flags spl pic */
#ifndef LINUX_DEV
@@ -226,7 +226,7 @@ struct bus_ctlr bus_master_init[] = {
struct bus_device bus_device_init[] = {
-/* driver name unit intr address am phys_address
+/* driver name unit intr address am phys_address
adaptor alive ctlr slave flags *mi *next sysdep sysdep */
#ifndef LINUX_DEV
@@ -331,7 +331,7 @@ struct bus_device bus_device_init[] = {
'?', 0, -1, -1, 0, 0, 0, SPL_SIX, 5},
{&nedriver, "ne", 1, neintr, 0x300,0x4000,0xd0000,
'?', 0, -1, -1, 0, 0, 0, SPL_SIX, 10},
-#endif NNE > 0
+#endif /* NNE > 0 */
#if NNS8390 > 0
/* "wd" and "el" */
@@ -463,7 +463,7 @@ void take_dev_irq(
dev->sysdep, dev->sysdep1);
while (1);
}
-
+
}
void take_ctlr_irq(
diff --git a/i386/i386at/blit.c b/i386/i386at/blit.c
index e97b0ee..32cc0a2 100644
--- a/i386/i386at/blit.c
+++ b/i386/i386at/blit.c
@@ -1,29 +1,29 @@
-/*
+/*
* Mach Operating System
* Copyright (c) 1991,1990,1989 Carnegie Mellon University
* All Rights Reserved.
- *
+ *
* Permission to use, copy, modify and distribute this software and its
* documentation is hereby granted, provided that both the copyright
* notice and this permission notice appear in all copies of the
* software, derivative works or modified versions, and any portions
* thereof, and that both notices appear in supporting documentation.
- *
+ *
* CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
* CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR
* ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
- *
+ *
* Carnegie Mellon requests users of this software to return to
- *
+ *
* Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU
* School of Computer Science
* Carnegie Mellon University
* Pittsburgh PA 15213-3890
- *
+ *
* any improvements or extensions that they make and grant Carnegie Mellon
* the rights to redistribute these changes.
*/
-
+
/* **********************************************************************
File: blit.c
Description: Device Driver for Bell Tech Blit card
@@ -81,14 +81,14 @@ WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
#ifdef MACH_KERNEL
#include <sys/types.h>
#include <device/errno.h>
-#else MACH_KERNEL
+#else /* MACH_KERNEL */
#include <sys/types.h>
#include <sys/errno.h>
#include <sys/param.h>
#include <sys/dir.h>
#include <sys/signal.h>
#include <sys/user.h>
-#endif MACH_KERNEL
+#endif /* MACH_KERNEL */
#include <vm/vm_kern.h>
#include <mach/vm_param.h>
#include <machine/machspl.h>
@@ -115,7 +115,7 @@ WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#define MAXBLITS 1
-#if NBLIT > MAXBLITS
+#if NBLIT > MAXBLITS
/* oh, no, you don't want to do this...; */
#else
@@ -166,14 +166,14 @@ struct mb_driver blitdriver = {
/*
* Per-card bookkeeping information for driver.
- *
- * "scrstrip" and "dpctlregs" point to data areas that are passed to
- * the Display Processor. They are allocated out of the spare
- * graphics memory. "scrstrip" is used to describe an entire screen.
- * "dpctlregs" contains assorted parameters for the display
- * controller.
- *
- * "firstfree" is an offset into the graphics memory. Memory starting
+ *
+ * "scrstrip" and "dpctlregs" point to data areas that are passed to
+ * the Display Processor. They are allocated out of the spare
+ * graphics memory. "scrstrip" is used to describe an entire screen.
+ * "dpctlregs" contains assorted parameters for the display
+ * controller.
+ *
+ * "firstfree" is an offset into the graphics memory. Memory starting
* there can be allocated by users.
*/
@@ -187,7 +187,7 @@ struct blitsoft {
} blitsoft[NBLIT];
-/*
+/*
* The following array contains the initial settings for
* the Display Processor Control Block Registers.
* The video timing signals in this array are for the
@@ -221,9 +221,9 @@ DPCONTROLBLK blit_mparm = {
DP_CURSOR_CROSSHAIR, /* cursor style & mode */
0x00A0, 0x0050, /* cursor x & y loc. */
/* cursor pattern */
- 0xfffe, 0xfffc, 0xc018, 0xc030, 0xc060, 0xc0c0, 0xc0c0, 0xc060,
- 0xc430, 0xce18, 0xdb0c, 0xf186, 0xe0c3, 0xc066, 0x803c, 0x0018
-};
+ 0xfffe, 0xfffc, 0xc018, 0xc030, 0xc060, 0xc0c0, 0xc0c0, 0xc060,
+ 0xc430, 0xce18, 0xdb0c, 0xf186, 0xe0c3, 0xc066, 0x803c, 0x0018
+};
void blitreboot();
@@ -234,7 +234,7 @@ void blitreboot();
***********/
-/*
+/*
* Probe - is the board there?
*
* in: reg = start of mapped Blit memory.
@@ -242,7 +242,7 @@ void blitreboot();
* out: returns size of mapped Blit memory if the board is present,
* 0 otherwise.
*
- * effects: if the board is present, it is reset and left visible in
+ * effects: if the board is present, it is reset and left visible in
* Unix mode.
*/
@@ -277,7 +277,7 @@ blitinit()
}
-/*
+/*
* Allocate needed objects from Blit's memory.
*/
blit_memory_init(bs)
@@ -311,14 +311,14 @@ blit_memory_init(bs)
}
-/*
+/*
* Reset the Blit board and leave it visible.
*/
blit_reset_board()
{
union blit_config_reg config;
-
+
config.byte = inb(BLIT_CONFIG_ADDR);
config.reg.reset = 1;
outb(BLIT_CONFIG_ADDR, config.byte);
@@ -331,7 +331,7 @@ blit_reset_board()
#if AUTOINIT
-/*
+/*
* Attach - finish initialization by setting up the 786.
*/
@@ -357,7 +357,7 @@ init_biu(blt)
/* WRITEREG16(blt, DRAM_REFRESH, 0x003f); */
WRITEREG16(blt, DRAM_REFRESH, 0x0018); /* refresh rate */
- WRITEREG16(blt, DRAM_CONTROL,
+ WRITEREG16(blt, DRAM_CONTROL,
MEMROWS1 | FASTPG_INTERLV | HEIGHT_256K);
WRITEREG16(blt, DP_PRIORITY, (7 << 3) | 7); /* max pri */
WRITEREG16(blt, GP_PRIORITY, (1 << 3) | 1); /* almost min pri */
@@ -371,7 +371,7 @@ init_biu(blt)
}
-/*
+/*
* Initialize the Display Processor.
* XXX - assumes only 1 card is installed, assumes monochrome display.
*/
@@ -383,9 +383,9 @@ init_dp(bs)
struct blitmem *bm = (struct blitmem *)blt->graphmem;
/*
- * Set up strip header and tile descriptor for the whole
- * screen. It's not clear why the C bit should be turned on,
- * but it seems to get rid of the nasty flickering you can get
+ * Set up strip header and tile descriptor for the whole
+ * screen. It's not clear why the C bit should be turned on,
+ * but it seems to get rid of the nasty flickering you can get
* by positioning an xterm window along the top of the screen.
*/
bs->scrstrip->strip.lines = BLIT_MONOHEIGHT - 1;
@@ -398,7 +398,7 @@ init_dp(bs)
BLIT_MONOWIDTH, /* width of bitmap */
VM_TO_ADDR786(bm->fb.mono_fb, blt), /* the actual bitmap */
1); /* bits per pixel */
-
+
/* Copy into DP register block. */
*(bs->dpctlregs) = blit_mparm;
bs->dpctlregs->descl = DP_ADDRLOW(VM_TO_ADDR786(bs->scrstrip, blt));
@@ -448,7 +448,7 @@ tiledesc(tile, x, y, w, ww, adx, bpp)
/*
- * Cause the Display Processor to load its Control Registers from
+ * Cause the Display Processor to load its Control Registers from
* "vm_addr".
*/
@@ -463,7 +463,7 @@ DPCONTROLBLK *vm_addr;
/* set up dp address */
WRITEREG16(blt, DP_PARM1_REG, DP_ADDRLOW(blit_addr));
WRITEREG16(blt, DP_PARM2_REG, DP_ADDRHIGH(blit_addr));
-
+
/* set blanking video */
WRITEREG16(blt, DEF_VIDEO_REG, 0);
@@ -556,9 +556,9 @@ int length; /* num bytes to map */
vm_offset_t vmaddr;
#ifdef MACH_KERNEL
vm_offset_t io_map();
-#else MACH_KERNEL
+#else /* MACH_KERNEL */
vm_offset_t pmap_map_bd();
-#endif MACH_KERNEL
+#endif /* MACH_KERNEL */
if (physaddr != (caddr_t)trunc_page(physaddr))
panic("Blit card not on page boundary");
@@ -566,11 +566,11 @@ int length; /* num bytes to map */
#ifdef MACH_KERNEL
vmaddr = io_map((vm_offset_t)physaddr, length);
if (vmaddr == 0)
-#else MACH_KERNEL
+#else /* MACH_KERNEL */
if (kmem_alloc_pageable(kernel_map,
&vmaddr, round_page(BLIT_MAPPED_SIZE))
!= KERN_SUCCESS)
-#endif MACH_KERNEL
+#endif /* MACH_KERNEL */
panic("can't alloc VM for Blit card");
(void)pmap_map_bd(vmaddr, (vm_offset_t)physaddr,
@@ -595,8 +595,8 @@ int length;
/*
* blit_init: initialize globals & hardware, and set cursor. Could be
* called twice, once as part of kd initialization and once as part of
- * blit initialization. Should not be called before blit_present() is
- * called.
+ * blit initialization. Should not be called before blit_present() is
+ * called.
*/
void
@@ -644,7 +644,7 @@ blit_init()
/*
* Use generic bitmap routines, no 786 assist (see
- * blit_memory_init).
+ * blit_memory_init).
*/
kd_dput = bmpput;
kd_dmvup = bmpmvup;
@@ -723,7 +723,7 @@ getfontinfo(blt)
char_white = BLIT_WHITE_BYTE;
font_start = rom + fontoffset;
-
+
/*
* Check byte-alignment assumption.
* XXX - does it do any good to panic when initializing the
@@ -755,8 +755,8 @@ pick_cursor_height()
int scl_avail; /* scan lines available for console */
int scl_per_line; /* scan lines per console line */
- /*
- * scan lines avail. = total lines - top margin;
+ /*
+ * scan lines avail. = total lines - top margin;
* no bottom margin (XXX).
*/
scl_avail = BLIT_MONOHEIGHT - ystart;
@@ -769,9 +769,9 @@ pick_cursor_height()
}
-/*
- * setstatus: Give a status indication to the user. Ideally, we'd
- * just set the 3 user-controlled LED's. Unfortunately, that doesn't
+/*
+ * setstatus: Give a status indication to the user. Ideally, we'd
+ * just set the 3 user-controlled LED's. Unfortunately, that doesn't
* seem to work. So, we ring the bell.
*/
@@ -780,7 +780,7 @@ setstatus(val)
int val;
{
union blit_diag_reg diag;
-
+
diag.byte = inb(BLIT_DIAG_ADDR);
diag.reg.led0 = (val & 1) ? BLIT_LED_ON : BLIT_LED_OFF;
diag.reg.led1 = (val & 2) ? BLIT_LED_ON : BLIT_LED_OFF;
@@ -807,8 +807,8 @@ setstatus(val)
***********/
-/*
- * Open - Verify that minor device is OK and not in use, then clear
+/*
+ * Open - Verify that minor device is OK and not in use, then clear
* the screen.
*/
@@ -850,7 +850,7 @@ blitclose(dev, flag)
}
-/*
+/*
* Mmap.
*/
@@ -869,7 +869,7 @@ blitmmap(dev, off, prot)
}
-/*
+/*
* Ioctl.
*/
@@ -894,7 +894,7 @@ io_return_t blit_get_stat(dev, flavor, data, count)
}
return (D_SUCCESS);
}
-#else MACH_KERNEL
+#else /* MACH_KERNEL */
/*ARGSUSED*/
int
blitioctl(dev, cmd, data, flag)
@@ -916,7 +916,7 @@ blitioctl(dev, cmd, data, flag)
return(err);
}
-#endif MACH_KERNEL
+#endif /* MACH_KERNEL */
/*
* clear_blit: clear blit's screen.
@@ -929,7 +929,7 @@ clear_blit(blt)
(*kd_dclear)(0, kd_lines*kd_cols, KA_NORMAL);
}
-/*
+/*
* Put the board into DOS mode in preparation for rebooting.
*/
@@ -937,7 +937,7 @@ void
blitreboot()
{
union blit_config_reg config;
-
+
config.byte = inb(BLIT_CONFIG_ADDR);
config.reg.mode = BLIT_DOS_MODE;
config.reg.invisible = BLIT_VISIBLE;
diff --git a/i386/i386at/conf.c b/i386/i386at/conf.c
index 1fc0dfa..40df714 100644
--- a/i386/i386at/conf.c
+++ b/i386/i386at/conf.c
@@ -1,25 +1,25 @@
-/*
+/*
* Mach Operating System
* Copyright (c) 1993-1989 Carnegie Mellon University
* All Rights Reserved.
- *
+ *
* Permission to use, copy, modify and distribute this software and its
* documentation is hereby granted, provided that both the copyright
* notice and this permission notice appear in all copies of the
* software, derivative works or modified versions, and any portions
* thereof, and that both notices appear in supporting documentation.
- *
+ *
* CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
* CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR
* ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
- *
+ *
* Carnegie Mellon requests users of this software to return to
- *
+ *
* Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU
* School of Computer Science
* Carnegie Mellon University
* Pittsburgh PA 15213-3890
- *
+ *
* any improvements or extensions that they make and grant Carnegie Mellon
* the rights to redistribute these changes.
*/
@@ -47,7 +47,7 @@ extern int pchdopen(),pchdread(),pchdwrite(),pchdgetstat(),pchdsetstat();
#define pchdname "pchd"
#endif
-#endif NHD > 0
+#endif /* NHD > 0 */
#include <aha.h>
#if NAHA > 0
@@ -66,20 +66,20 @@ int cd_open(), cd_close(), cd_read(), cd_write();
extern int fdopen(), fdclose(), fdread(), fdwrite();
extern int fdgetstat(), fdsetstat(), fddevinfo();
#define fdname "fd"
-#endif NFD > 0
+#endif /* NFD > 0 */
#include <wt.h>
#if NWT > 0
extern int wtopen(), wtread(), wtwrite(), wtclose();
#define wtname "wt"
-#endif NWT > 0
+#endif /* NWT > 0 */
#include <pc586.h>
#if NPC586 > 0
extern int pc586open(), pc586output(), pc586getstat(), pc586setstat(),
pc586setinput();
#define pc586name "pc"
-#endif NPC586 > 0
+#endif /* NPC586 > 0 */
#include <ne.h>
#if NNE > 0
@@ -88,16 +88,16 @@ extern int neopen(), neoutput(), negetstat(), nesetstat(), nesetinput();
extern int nefoutput();
#endif /* FIPC */
#define nename "ne"
-#endif NNE > 0
+#endif /* NNE > 0 */
#include <ns8390.h>
#if NNS8390 > 0
extern int wd8003open(), eliiopen();
-extern int ns8390output(), ns8390getstat(), ns8390setstat(),
+extern int ns8390output(), ns8390getstat(), ns8390setstat(),
ns8390setinput();
#define ns8390wdname "wd"
#define ns8390elname "el"
-#endif NNS8390 > 0
+#endif /* NNS8390 > 0 */
#include <at3c501.h>
#if NAT3C501 > 0
@@ -105,21 +105,21 @@ extern int at3c501open(), at3c501output(),
at3c501getstat(), at3c501setstat(),
at3c501setinput();
#define at3c501name "et"
-#endif NAT3C501 > 0
+#endif /* NAT3C501 > 0 */
#include <ul.h>
#if NUL > 0
extern int ulopen(), uloutput(), ulgetstat(), ulsetstat(),
ulsetinput();
#define ulname "ul"
-#endif NUL > 0
+#endif /* NUL > 0 */
#include <wd.h>
#if NWD > 0
extern int wdopen(), wdoutput(), wdgetstat(), wdsetstat(),
wdsetinput();
#define wdname "wd"
-#endif NWD > 0
+#endif /* NWD > 0 */
#include <hpp.h>
#if NHPP > 0
@@ -133,14 +133,14 @@ extern int hppopen(), hppoutput(), hppgetstat(), hppsetstat(),
extern int paropen(), paroutput(), pargetstat(), parsetstat(),
parsetinput();
#define parname "par"
-#endif NPAR > 0
+#endif /* NPAR > 0 */
#include <de6c.h>
#if NDE6C > 0
extern int de6copen(), de6coutput(), de6cgetstat(), de6csetstat(),
de6csetinput();
#define de6cname "de"
-#endif NDE6C > 0
+#endif /* NDE6C > 0 */
extern int kdopen(), kdclose(), kdread(), kdwrite();
extern int kdgetstat(), kdsetstat(), kdportdeath();
@@ -152,14 +152,14 @@ extern vm_offset_t kdmmap();
extern int comopen(), comclose(), comread(), comwrite();
extern int comgetstat(), comsetstat(), comportdeath();
#define comname "com"
-#endif NCOM > 0
+#endif /* NCOM > 0 */
#include <lpr.h>
#if NLPR > 0
extern int lpropen(), lprclose(), lprread(), lprwrite();
extern int lprgetstat(), lprsetstat(), lprportdeath();
#define lprname "lpr"
-#endif NLPR > 0
+#endif /* NLPR > 0 */
#include <blit.h>
#if NBLIT > 0
@@ -219,7 +219,7 @@ struct dev_ops dev_name_list[] =
hdwrite, hdgetstat, hdsetstat, nomap,
nodev, nulldev, nulldev, 1024,
hddevinfo },
-#endif NHD > 0
+#endif /* NHD > 0 */
#if NAHA > 0
{ rzname, rz_open, rz_close, rz_read,
@@ -249,14 +249,14 @@ struct dev_ops dev_name_list[] =
fdwrite, fdgetstat, fdsetstat, nomap,
nodev, nulldev, nulldev, 64,
fddevinfo },
-#endif NFD > 0
+#endif /* NFD > 0 */
#if NWT > 0
{ wtname, wtopen, wtclose, wtread,
wtwrite, nulldev, nulldev, nomap,
nodev, nulldev, nulldev, 0,
nodev },
-#endif NWT > 0
+#endif /* NWT > 0 */
#if NPC586 > 0
{ pc586name, pc586open, nulldev, nulldev,
@@ -373,7 +373,7 @@ struct dev_ops dev_name_list[] =
pchdwrite, pchdgetstat, pchdsetstat, nomap,
nodev, nulldev, nulldev, 16,
hddevinfo },
-#endif NHD > 0
+#endif /* NHD > 0 */
#endif
#if 0
@@ -382,8 +382,8 @@ struct dev_ops dev_name_list[] =
hdwrite, hdgetstat, hdsetstat, nomap,
nodev, nulldev, nulldev, 16,
hddevinfo },
-#endif NHD > 0
-#endif 0 /* Kevin doesn't know why this was here. */
+#endif /* NHD > 0 */
+#endif /* Kevin doesn't know why this was here. */
#ifdef MACH_KMSG
{ kmsgname, kmsgopen, kmsgclose, kmsgread,
diff --git a/i386/i386at/fd.c b/i386/i386at/fd.c
index 773411b..82c4077 100644
--- a/i386/i386at/fd.c
+++ b/i386/i386at/fd.c
@@ -1,25 +1,25 @@
-/*
+/*
* Mach Operating System
* Copyright (c) 1993,1991,1990,1989 Carnegie Mellon University
* All Rights Reserved.
- *
+ *
* Permission to use, copy, modify and distribute this software and its
* documentation is hereby granted, provided that both the copyright
* notice and this permission notice appear in all copies of the
* software, derivative works or modified versions, and any portions
* thereof, and that both notices appear in supporting documentation.
- *
+ *
* CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
* CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR
* ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
- *
+ *
* Carnegie Mellon requests users of this software to return to
- *
+ *
* Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU
* School of Computer Science
* Carnegie Mellon University
* Pittsburgh PA 15213-3890
- *
+ *
* any improvements or extensions that they make and grant Carnegie Mellon
* the rights to redistribute these changes.
*/
@@ -57,12 +57,12 @@ WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
#include <sys/ioctl.h>
#include <device/buf.h>
#include <device/errno.h>
-#else MACH_KERNEL
+#else /* MACH_KERNEL */
#include <sys/buf.h>
#include <sys/errno.h>
#include <sys/user.h>
#include <sys/ioctl.h>
-#endif MACH_KERNEL
+#endif /* MACH_KERNEL */
#include <i386/pio.h>
#include <i386/machspl.h>
#include <chips/busses.h>
@@ -127,15 +127,15 @@ vm_offset_t FdDmaPage = (vm_offset_t) 0;
vm_offset_t fd_std[NFD] = { 0 };
struct bus_device *fd_dinfo[NFD*2];
struct bus_ctlr *fd_minfo[NFD];
-struct bus_driver fddriver =
+struct bus_driver fddriver =
{fdprobe, fdslave, fdattach, 0, fd_std, "fd", fd_dinfo, "fdc", fd_minfo, 0};
int m765verify[MAXUNIT] = {1,1,1,1}; /* write after read flag */
- /* 0 != verify mode */
+ /* 0 != verify mode */
/* 0 == not verify mode */
#ifdef MACH_KERNEL
extern struct buf *geteblk();
-#endif MACH_KERNEL
+#endif /* MACH_KERNEL */
#define trfrate(uip, type) outb(VFOREG(uip->addr),(((type)&RATEMASK)>>6))
#define rbskrate(uip, type) trfrate(uip,(type)&RAPID?RPSEEK:NMSEEK)
@@ -170,7 +170,7 @@ struct bus_ctlr *ctlr;
return 0;
}
(void)pmap_map(cip->b_vbuf,
- (vm_offset_t)cip->b_pbuf,
+ (vm_offset_t)cip->b_pbuf,
(vm_offset_t)cip->b_pbuf+PAGE_SIZE,
VM_PROT_READ | VM_PROT_WRITE);
}
@@ -208,7 +208,7 @@ struct bus_device *dev;
uip->b_unitf=uip;
cip->b_unitf=uip;
}
- uip->d_drtab.dr_type &= ~OKTYPE;
+ uip->d_drtab.dr_type &= ~OKTYPE;
printf(", port = %x, spl = %d, pic = %d.",
dev->address, dev->sysdep, dev->sysdep1);
@@ -220,7 +220,7 @@ struct bus_device *dev;
*
* TITLE: fdopen
*
- * ABSTRACT: Open a unit.
+ * ABSTRACT: Open a unit.
*
****************************************************************************/
fdopen(dev, flag, otyp)
@@ -247,7 +247,7 @@ int otyp; /* not used */
chkbusy(cmdp);
cmdp->c_stsflag |= MTRFLAG;
mtr_on(uip);
- if(inb(VFOREG(uip->addr))&OPENBIT ||
+ if(inb(VFOREG(uip->addr))&OPENBIT ||
!(uip->d_drtab.dr_type&OKTYPE)){
uip->d_drtab.dr_type &= ~OKTYPE;
if(!rbrate(RAPID, uip))
@@ -290,7 +290,7 @@ int otyp; /* not used */
* Called on last close. mark the unit closed and not-ready.
*
* Unix doesn't actually "open" an inode for rootdev, swapdev or pipedev.
- * If UNIT(swapdev) != UNIT(rootdev), then must add code in init() to
+ * If UNIT(swapdev) != UNIT(rootdev), then must add code in init() to
* "open" swapdev. These devices should never be closed.
*
*****************************************************************************/
@@ -305,10 +305,10 @@ off_t offset; /* not used */
spl_t s;
#ifdef MACH_KERNEL
-#else MACH_KERNEL
+#else /* MACH_KERNEL */
if ((dev == rootdev) || (dev == swapdev)) /* never close these */
return(0);
-#endif MACH_KERNEL
+#endif /* MACH_KERNEL */
/* Clear the bit.
* If last close of drive insure drtab queue is empty before returning.
@@ -321,9 +321,9 @@ off_t offset; /* not used */
splx(s);
#ifdef MACH_KERNEL
return(0);
-#else MACH_KERNEL
+#else /* MACH_KERNEL */
close(0);
-#endif MACH_KERNEL
+#endif /* MACH_KERNEL */
}
/*****************************************************************************
*
@@ -357,7 +357,7 @@ struct buf *bp; /* buffer header */
bp->b_error = 0;
/* set b_resid to b_bcount because we haven't done anything yet */
bp->b_resid = bp->b_bcount;
- if (!(dr->dr_type & OKTYPE) ||
+ if (!(dr->dr_type & OKTYPE) ||
((sdr = getparm(MEDIATYPE(bp->b_dev)))==(struct fddrtab *)ERROR) ||
/* wrong parameters */
(sdr->dr_ncyl != dr->dr_ncyl) || (sdr->dr_nsec != dr->dr_nsec) ||
@@ -433,7 +433,7 @@ struct fdcmd *cmdp;
while(cmdp->c_devflag & STRCHK){
cmdp->c_devflag |= STRWAIT;
sleep(&cmdp->c_devflag,PZERO);
- }
+ }
}
/***************************************************************************
*
@@ -446,7 +446,7 @@ struct fdcmd *cmdp;
while(cmdp->c_devflag & FDMCHK ){
cmdp->c_devflag |= FDWAIT;
sleep(&cmdp->c_devflag,PZERO);
- }
+ }
}
/***************************************************************************
*
@@ -538,12 +538,12 @@ struct unit_info *uip;
cmdp->c_rwdata[0] = RDMV;
break;
case B_FORMAT:
- cmdp->c_dcount = FMTCNT;
+ cmdp->c_dcount = FMTCNT;
cmdp->c_rwdata[0] = FMTM;
cmdp->c_saddr = cip->b_sector / uip->d_drtab.dr_spc;
resid = cip->b_sector % uip->d_drtab.dr_spc;
cmdp->c_rwdata[1] = slave|((resid/uip->d_drtab.dr_nsec)<<2);
- cmdp->c_rwdata[2] =
+ cmdp->c_rwdata[2] =
((struct fmttbl *)cip->b_buf->b_un.b_addr)->s_type;
cmdp->c_rwdata[3] = uip->d_drtab.dr_nsec;
cmdp->c_rwdata[4] = uip->d_drtab.dr_fgpl;
@@ -563,7 +563,7 @@ struct unit_info *uip;
resid = cip->b_sector % uip->d_drtab.dr_spc;
cmdp->c_rwdata[3] = resid / uip->d_drtab.dr_nsec;
cmdp->c_rwdata[1] = slave|(cmdp->c_rwdata[3]<<2);
- cmdp->c_rwdata[2] = cmdp->c_saddr =
+ cmdp->c_rwdata[2] = cmdp->c_saddr =
cip->b_sector / uip->d_drtab.dr_spc;
cmdp->c_rwdata[4] = (resid % uip->d_drtab.dr_nsec) + 1;
cmdp->c_rwdata[5] = 2;
@@ -591,13 +591,13 @@ struct unit_info *uip;
fdread(dev, uio)
register dev_t dev;
struct uio *uio;
-{
+{
#ifdef MACH_KERNEL
/* no need for page-size restriction */
return (block_io(fdstrategy, minphys, uio));
-#else MACH_KERNEL
+#else /* MACH_KERNEL */
return(physio(fdstrategy,&fdrbuf[UNIT(dev)],dev,B_READ,fdminphys,uio));
-#endif MACH_KERNEL
+#endif /* MACH_KERNEL */
}
/*****************************************************************************
*
@@ -615,9 +615,9 @@ struct uio *uio;
#ifdef MACH_KERNEL
/* no need for page-size restriction */
return (block_io(fdstrategy, minphys, uio));
-#else MACH_KERNEL
+#else /* MACH_KERNEL */
return(physio(fdstrategy,&fdrbuf[UNIT(dev)],dev,B_WRITE,fdminphys,uio));
-#endif MACH_KERNEL
+#endif /* MACH_KERNEL */
}
/*****************************************************************************
*
@@ -720,7 +720,7 @@ char *info;
return(result);
}
-#else MACH_KERNEL
+#else /* MACH_KERNEL */
/*****************************************************************************
*
* TITLE: fdioctl
@@ -730,7 +730,7 @@ char *info;
* CALLING ROUTINES: kernel
*
****************************************************************************/
-int
+int
fdioctl(dev, cmd, cmdarg, flag)
dev_t dev; /* major, minor numbers */
int cmd; /* command code */
@@ -751,10 +751,10 @@ int flag; /* not used */
}
return(EINVAL);
}
-#endif MACH_KERNEL
+#endif /* MACH_KERNEL */
/****************************************************************************
*
- * set fd parameters
+ * set fd parameters
*
****************************************************************************/
int
@@ -782,7 +782,7 @@ long cmdarg;
}
/****************************************************************************
*
- * get fd parameters
+ * get fd parameters
*
****************************************************************************/
int
@@ -821,7 +821,7 @@ int *cmdarg;
register struct fddrtab *dr = &unit_info[UNIT(dev)].d_drtab;
if(!(dr->dr_type & OKTYPE))
- return(EINVAL);
+ return(EINVAL);
varg = (union io_arg *)cmdarg;
num_trks = varg->ia_fmt.num_trks;
track = (daddr_t)(varg->ia_fmt.start_trk*dr->dr_nsec);
@@ -832,7 +832,7 @@ int *cmdarg;
bp->b_flags &= ~B_DONE;
bp->b_dev = dev;
bp->b_error = 0; bp->b_resid = 0;
- bp->b_flags = B_FORMAT;
+ bp->b_flags = B_FORMAT;
bp->b_bcount = dr->dr_nsec * FMTID;
bp->b_blkno = (daddr_t)((track << 9) / NBPSCTR);
if(makeidtbl(bp->b_un.b_addr,dr,
@@ -841,7 +841,7 @@ int *cmdarg;
fdstrategy(bp);
biowait(bp);
if(bp->b_error)
- if((bp->b_error == (char)EBBHARD) ||
+ if((bp->b_error == (char)EBBHARD) ||
(bp->b_error == (char)EBBSOFT))
return(EIO);
else
@@ -904,11 +904,11 @@ int ctrl;
struct fdcmd *cmdp = &ctrl_info[ctrl].b_cmd;
if(cmdp->c_stsflag & INTROUT)
untimeout(fdintr, ctrl);
- cmdp->c_stsflag &= ~INTROUT;
+ cmdp->c_stsflag &= ~INTROUT;
switch(cmdp->c_intr){
case RWFLAG:
rwintr(uip);
- break;
+ break;
case SKFLAG:
case SKEFLAG|SKFLAG:
case RBFLAG:
@@ -1000,7 +1000,7 @@ rwend: outb(0x0a, 0x06);
D(printf("\n->rwierr %x ", rtn));
rwierr(uip);
} else { /* write command */
- if(((cip->b_buf->b_flags&(B_FORMAT|B_READ|B_WRITE))==B_WRITE)
+ if(((cip->b_buf->b_flags&(B_FORMAT|B_READ|B_WRITE))==B_WRITE)
&& !(cip->b_buf->b_flags & B_VERIFY)) {
D(printf("->w/v "));
cip->b_buf->b_flags |= B_VERIFY;
@@ -1175,7 +1175,7 @@ register char seekpoint;
*
* TITLE: m765sweep
*
- * ABSTRACT: Perform an initialization sweep.
+ * ABSTRACT: Perform an initialization sweep.
*
**************************************************************************/
m765sweep(uip, cdr)
@@ -1248,7 +1248,7 @@ struct unit_info *uip;
cmdp->c_intr = CMDRST;
if(((cip->b_buf->b_flags&(B_READ|B_VERIFY))!=(B_READ|B_VERIFY)) &&
uip->dev->slave)
- dr->dr_type &= ~OKTYPE;
+ dr->dr_type &= ~OKTYPE;
bp = cip->b_buf;
bp->b_flags |= B_ERROR;
switch(cip->b_status&BYTEMASK){
@@ -1438,7 +1438,7 @@ register int cylno;
cmdp->c_intr |= WUPFLAG;
outb(DATAREG(uip->addr), cylno); /* seek count */
rtn = ERROR;
- while(rtn){
+ while(rtn){
uip->wakeme = 1;
sleep(uip, PZERO);
if((rtn = sis(uip)) == ST0OK)
@@ -1455,7 +1455,7 @@ register int cylno;
* seek commnd routine(use interrupt)
*
*****************************************************************************/
-fdiseek(uip, cylno)
+fdiseek(uip, cylno)
struct unit_info *uip;
int cylno;
{
@@ -1476,7 +1476,7 @@ int cylno;
cylno = cylno * 2;
uip->b_cmd->c_intr |= SKFLAG;
outb(DATAREG(uip->addr), cylno); /* seek count */
-fdiend:
+fdiend:
if(rtn)
rtn |= SEEKCMD<<8;
return(rtn);
@@ -1542,7 +1542,7 @@ struct unit_info *uip;
dmalen = i386_trunc_page(address) + I386_PGBYTES - address;
if ( (cip->b_rwerr&MRMASK) >= 0x10)
dmalen = 0x200;
- if (dmalen<=cip->b_xferdma)
+ if (dmalen<=cip->b_xferdma)
cip->b_xferdma = dmalen;
else
dmalen = cip->b_xferdma;
@@ -1588,9 +1588,9 @@ struct unit_info *uip;
(B_READ|B_VERIFY))?TOUT:ITOUT;
#ifdef MACH_KERNEL
timeout(fdintr,uip->dev->ctlr,cnt0);
-#else MACH_KERNEL
+#else /* MACH_KERNEL */
cmdp->c_timeid = timeout(fdintr,uip->dev->ctlr,cnt0);
-#endif MACH_KERNEL
+#endif /* MACH_KERNEL */
}
return(rtn);
}
@@ -1631,7 +1631,7 @@ struct unit_info *uip;
int cnt0 = STSCHKCNT;
while(cnt0--)
- if(((ind=inb(STSREG(uip->addr))) & DATAOK) &&
+ if(((ind=inb(STSREG(uip->addr))) & DATAOK) &&
((ind & DTOCPU) == mode))
return(0);
return(TIMEOUT);
@@ -1655,9 +1655,9 @@ struct unit_info *uip;
cmdp->c_stsflag |= MTROFF;
#ifdef MACH_KERNEL
timeout(mtr_off,uip,MTRSTOP);
-#else MACH_KERNEL
+#else /* MACH_KERNEL */
cmdp->c_mtrid = timeout(mtr_off,uip,MTRSTOP);
-#endif MACH_KERNEL
+#endif /* MACH_KERNEL */
}
/*****************************************************************************
*
diff --git a/i386/i386at/idt.h b/i386/i386at/idt.h
index 7903310..72c4ad0 100644
--- a/i386/i386at/idt.h
+++ b/i386/i386at/idt.h
@@ -1,4 +1,4 @@
-/*
+/*
* Copyright (c) 1994 The University of Utah and
* the Computer Systems Laboratory at the University of Utah (CSL).
* All rights reserved.
@@ -34,4 +34,4 @@
#include "idt-gen.h"
-#endif _I386AT_IDT_
+#endif /* _I386AT_IDT_ */
diff --git a/i386/i386at/immc.c b/i386/i386at/immc.c
index d6756e3..a59209e 100644
--- a/i386/i386at/immc.c
+++ b/i386/i386at/immc.c
@@ -1,4 +1,4 @@
-/*
+/*
* Copyright (c) 1995-1994 The University of Utah and
* the Computer Systems Laboratory at the University of Utah (CSL).
* All rights reserved.
@@ -73,5 +73,4 @@ int immc_cnmaygetc(void)
return -1;
}
-#endif ENABLE_IMMEDIATE_CONSOLE
-
+#endif /* ENABLE_IMMEDIATE_CONSOLE */
diff --git a/i386/i386at/kd.c b/i386/i386at/kd.c
index 7c87729..f17c48b 100644
--- a/i386/i386at/kd.c
+++ b/i386/i386at/kd.c
@@ -1,34 +1,34 @@
-/*
+/*
* Mach Operating System
* Copyright (c) 1991,1990,1989 Carnegie Mellon University
* All Rights Reserved.
- *
+ *
* Permission to use, copy, modify and distribute this software and its
* documentation is hereby granted, provided that both the copyright
* notice and this permission notice appear in all copies of the
* software, derivative works or modified versions, and any portions
* thereof, and that both notices appear in supporting documentation.
- *
+ *
* CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
* CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR
* ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
- *
+ *
* Carnegie Mellon requests users of this software to return to
- *
+ *
* Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU
* School of Computer Science
* Carnegie Mellon University
* Pittsburgh PA 15213-3890
- *
+ *
* any improvements or extensions that they make and grant Carnegie Mellon
* the rights to redistribute these changes.
*/
-/*
+/*
* Olivetti Mach Console driver v0.0
* Copyright Ing. C. Olivetti & C. S.p.A. 1988, 1989
* All rights reserved.
*
- */
+ */
/*
Copyright 1988, 1989 by Olivetti Advanced Technology Center, Inc.,
Cupertino, California.
@@ -132,7 +132,7 @@ int kdcninit(struct consdev *cp);
int kdcngetc(dev_t dev, int wait);
int kdcnputc(dev_t dev, int c);
-/*
+/*
* These routines define the interface to the device-specific layer.
* See kdsoft.h for a more complete description of what each routine does.
*/
@@ -154,15 +154,15 @@ unsigned char kd_getdata(), state2leds();
*/
vm_offset_t kd_bitmap_start = (vm_offset_t)0xa0000; /* XXX - put in kd.h */
-u_char *vid_start = (u_char *)EGA_START;
+u_char *vid_start = (u_char *)EGA_START;
/* VM start of video RAM or frame buffer */
csrpos_t kd_curpos = 0; /* set indirectly by kd_setpos--see kdsoft.h */
short kd_lines = 25;
short kd_cols = 80;
char kd_attr = KA_NORMAL; /* current attribute */
-/*
- * kd_state shows the state of the modifier keys (ctrl, caps lock,
+/*
+ * kd_state shows the state of the modifier keys (ctrl, caps lock,
* etc.) It should normally be changed by calling set_kd_state(), so
* that the keyboard status LEDs are updated correctly.
*/
@@ -176,18 +176,18 @@ int kd_kbd_mouse = 0;
int kd_kbd_magic_scale = 6;
int kd_kbd_magic_button = 0;
-/*
- * Some keyboard commands work by sending a command, waiting for an
- * ack (handled by kdintr), then sending data, which generates a
+/*
+ * Some keyboard commands work by sending a command, waiting for an
+ * ack (handled by kdintr), then sending data, which generates a
* second ack. If we are in the middle of such a sequence, kd_ack
* shows what the ack is for.
- *
- * When a byte is sent to the keyboard, it is kept around in last_sent
+ *
+ * When a byte is sent to the keyboard, it is kept around in last_sent
* in case it needs to be resent.
- *
+ *
* The rest of the variables here hold the data required to complete
* the sequence.
- *
+ *
* XXX - the System V driver keeps a command queue, I guess in case we
* want to start a command while another is in progress. Is this
* something we should worry about?
@@ -214,7 +214,7 @@ u_char *esc_spt = (u_char *)0;
/*
* This array maps scancodes to Ascii characters (or character
- * sequences).
+ * sequences).
* Each row corresponds to one key. There are NUMOUTPUT bytes per key
* state. The states are ordered: Normal, SHIFT, CTRL, ALT,
* SHIFT/ALT.
@@ -400,10 +400,10 @@ short font_byte_width = 0; /* num bytes in 1 scan line of font */
int kd_pollc = 0;
#ifdef DEBUG
-/*
+/*
* feep:
*
- * Ring the bell for a short time.
+ * Ring the bell for a short time.
* Warning: uses outb(). You may prefer to use kd_debug_put.
*/
feep()
@@ -424,9 +424,9 @@ pause()
;
}
-/*
+/*
* Put a debugging character on the screen.
- * LOC=0 means put it in the bottom right corner, LOC=1 means put it
+ * LOC=0 means put it in the bottom right corner, LOC=1 means put it
* one column to the left, etc.
*/
kd_debug_put(loc, c)
@@ -505,7 +505,7 @@ kdopen(dev, flag, ior)
/*
* Special support for boot-time rc scripts, which don't
* stty the console.
- */
+ */
tp->t_oproc = kdstart;
tp->t_stop = kdstop;
tp->t_ospeed = tp->t_ispeed = B9600;
@@ -531,7 +531,7 @@ kdopen(dev, flag, ior)
* closing the line discipline.
*
* input: device number 'dev', and flag
- *
+ *
* output: device is closed
*
*/
@@ -575,7 +575,7 @@ int dev;
struct uio *uio;
{
struct tty *tp;
-
+
tp = &kd_tty;
tp->t_state |= TS_CARR_ON;
return((*linesw[kd_tty.t_line].l_read)(tp, uio));
@@ -601,7 +601,7 @@ struct uio *uio;
return((*linesw[kd_tty.t_line].l_write)(&kd_tty, uio));
}
-/*
+/*
* Mmap.
*/
@@ -687,10 +687,10 @@ io_return_t kdsetstat(dev, flavor, data, count)
-/*
+/*
* kdsetbell:
- *
- * Turn the bell on or off. Returns error code, if given bogus
+ *
+ * Turn the bell on or off. Returns error code, if given bogus
* on/off value.
*/
kdsetbell(val, flags)
@@ -711,9 +711,9 @@ int flags; /* flags set for console */
}
-/*
+/*
* kdgetkbent:
- *
+ *
* Get entry from key mapping table. Returns error code, if any.
*/
kdgetkbent(kbent)
@@ -731,9 +731,9 @@ struct kbentry * kbent;
}
-/*
+/*
* kdsetkbent:
- *
+ *
* Set entry in key mapping table. Return error code, if any.
*/
int
@@ -758,8 +758,8 @@ int flags; /* flags set for console */
*
* This function is the interrupt code for the driver. Since this is
* a special tty (console), interrupts are only for input, so we read in
- * the character. If in ascii mode, we then do the mapping translation
- * from the keyboard switch table and place the characters on the tty's
+ * the character. If in ascii mode, we then do the mapping translation
+ * from the keyboard switch table and place the characters on the tty's
* input switch table. If in event mode, we create and queue a kd_event.
*
* input: interrupt vector 'vec'
@@ -785,29 +785,29 @@ int regs;
tp = &kd_tty;
#ifdef old
while ((inb(K_STATUS) & K_OBUF_FUL) == 0); /* this should never loop */
-#else old
+#else /* old */
{
/*
- * Allow for keyboards that raise interrupt before
+ * Allow for keyboards that raise interrupt before
* the character gets to the buffer. But don't wait
* forever if grabbing the character by polling leaves
* the interrupt on but buffer empty.
*/
/*
- * Micronics VLB motherboard with 486DX2 can report keyboard
+ * Micronics VLB motherboard with 486DX2 can report keyboard
* interrupt before K_STATUS register indicates that the
* output buffer is full. Moreover, the bus won't settle w
* while we poll K_STATUS at speed. Temporary fix is to break
- * out after safety runs out and pick up keyboard event. This
- * should be fixed eventually by putting a 1us timout between
- * inb's to K_STATUS and fix the pic initialization order to
+ * out after safety runs out and pick up keyboard event. This
+ * should be fixed eventually by putting a 1us timout between
+ * inb's to K_STATUS and fix the pic initialization order to
* avoid bootup keyboard wedging (ie make kd a real device)
*/
int safety = 1000;
while ((inb(K_STATUS) & K_OBUF_FUL) == 0)
if (!safety--) break; /* XXX */
}
-#endif old
+#endif /* old */
/*
* We may have seen a mouse event.
*/
@@ -885,13 +885,13 @@ int regs;
}
}
- /*
+ /*
* here's where we actually put the char (or
* char sequence, for function keys) onto the
* input queue.
*/
- for ( ; (c != K_DONE) && (char_idx <= max);
- c = key_map[scancode][char_idx++]) {
+ for ( ; (c != K_DONE) && (char_idx <= max);
+ c = key_map[scancode][char_idx++]) {
(*linesw[tp->t_line].l_rint)(c, tp);
}
kd_extended = FALSE;
@@ -902,10 +902,10 @@ int regs;
return;
}
-/*
+/*
* kd_handle_ack:
- *
- * For pending commands, complete the command. For data bytes,
+ *
+ * For pending commands, complete the command. For data bytes,
* drop the ack on the floor.
*/
kd_handle_ack()
@@ -927,14 +927,14 @@ kd_handle_ack()
}
}
-/*
+/*
* kd_resend:
*
* Resend a missed keyboard command or data byte.
*/
kd_resend()
{
- if (kd_ack == NOT_WAITING)
+ if (kd_ack == NOT_WAITING)
printf("unexpected RESEND from keyboard\n");
else
kd_senddata(last_sent);
@@ -947,9 +947,9 @@ kd_resend()
* Change keyboard state according to which modifier key and
* whether it went down or up.
*
- * input: the current state, the key, and the key's direction.
+ * input: the current state, the key, and the key's direction.
* The key can be any key, not just a modifier key.
- *
+ *
* output: the new state
*/
do_modifier(state, c, up)
@@ -967,7 +967,7 @@ boolean_t up;
break;
#ifndef ORC
case (K_CLCKSC):
-#endif ORC
+#endif /* ORC */
case (K_CTLSC):
if (up)
state &= ~KS_CTLED;
@@ -980,7 +980,7 @@ boolean_t up;
if (!up)
state ^= KS_CLKED;
break;
-#endif ORC
+#endif /* ORC */
case (K_NLCKSC):
if (!up)
state ^= KS_NLKED;
@@ -999,21 +999,21 @@ boolean_t up;
}
-/*
+/*
* kdcheckmagic:
- *
- * Check for magic keystrokes for invoking the debugger or
+ *
+ * Check for magic keystrokes for invoking the debugger or
* rebooting or ...
*
* input: an unprocessed scancode
- *
- * output: TRUE if a magic key combination was recognized and
+ *
+ * output: TRUE if a magic key combination was recognized and
* processed. FALSE otherwise.
*
- * side effects:
+ * side effects:
* various actions possible, depending on which keys are
- * pressed. If the debugger is called, steps are taken
- * to ensure that the system doesn't think the magic keys
+ * pressed. If the debugger is called, steps are taken
+ * to ensure that the system doesn't think the magic keys
* are still held down.
*/
boolean_t
@@ -1056,7 +1056,7 @@ int *regs;
}
return(TRUE);
break;
-#endif MACH_KDB
+#endif /* MACH_KDB */
case K_DELSC: /* ctl-alt-del */
/* if rebootflag is on, reboot the system */
if (rebootflag)
@@ -1071,7 +1071,7 @@ int *regs;
/*
* kdstate2idx:
*
- * Return the value for the 2nd index into key_map that
+ * Return the value for the 2nd index into key_map that
* corresponds to the given state.
*/
kdstate2idx(state, extended)
@@ -1119,11 +1119,11 @@ struct tty *tp;
spl_t o_pri;
int ch;
unsigned char c;
-
+
if (tp->t_state & TS_TTSTOP)
return;
for ( ; ; ) {
- tp->t_state &= ~TS_BUSY;
+ tp->t_state &= ~TS_BUSY;
if (tp->t_state & TS_TTSTOP)
break;
if ((tp->t_outq.c_cc <= 0) || (ch = getc(&tp->t_outq)) == -1)
@@ -1177,7 +1177,7 @@ kdstop(tp, flags)
* kdinit:
*
* This code initializes the structures and sets up the port registers
- * for the console driver.
+ * for the console driver.
*
* Each bitmap-based graphics card is likely to require a unique
* way to determine the card's presence. The driver runs through
@@ -1207,7 +1207,7 @@ kdinit()
if (!evc1init())
if (blit_present())
blit_init();
- else
+ else
kd_xga_init();
/* get rid of any garbage in output buffer */
@@ -1309,11 +1309,11 @@ u_char ch;
if ((!ch) && sit_for_0)
return;
- switch (ch) {
+ switch (ch) {
case ((K_LF)):
kd_down();
break;
- case ((K_CR)):
+ case ((K_CR)):
kd_cr();
break;
case ((K_BS)):
@@ -1428,7 +1428,7 @@ kd_scrolldn()
count = ONE_LINE/ONE_SPACE;
(*kd_dclear)(to, count, kd_attr);
return;
-
+
}
@@ -1436,7 +1436,7 @@ kd_scrolldn()
* kd_parseesc:
*
* This routine begins the parsing of an escape sequence. It uses the
- * escape sequence array and the escape spot pointer to handle
+ * escape sequence array and the escape spot pointer to handle
* asynchronous parsing of escape sequences.
*
* input : String of characters prepended by an escape
@@ -1598,14 +1598,14 @@ u_char *cp;
if (newpos < 0)
newpos = 0; /* upper left */
if (newpos > ONE_PAGE)
- newpos = (ONE_PAGE - ONE_SPACE);
+ newpos = (ONE_PAGE - ONE_SPACE);
/* lower right */
if (*cp == '\0')
break; /* not ready yet */
if (*cp == 'H') {
kd_setpos(newpos);
esc_spt = esc_seq; /* done, reset */
- }
+ }
else
esc_spt = esc_seq;
break; /* done or not ready */
@@ -1615,12 +1615,12 @@ u_char *cp;
case 0:
kd_cltobcur(); /* clears from current
pos to bottom.
- */
+ */
break;
case 1:
kd_cltopcur(); /* clears from top to
current pos.
- */
+ */
break;
case 2:
kd_cls();
@@ -1636,7 +1636,7 @@ u_char *cp;
case 0:
kd_cltoecur(); /* clears from current
pos to eoln.
- */
+ */
break;
case 1:
kd_clfrbcur(); /* clears from begin
@@ -1695,7 +1695,7 @@ u_char *cp;
else
kd_erase(number);
esc_spt = esc_seq;
- break;
+ break;
case '\0':
break; /* not enough yet */
default:
@@ -1919,7 +1919,7 @@ kd_cltopcur()
/*
* kd_cltoecur:
*
- * This function clears from the current cursor position to eoln.
+ * This function clears from the current cursor position to eoln.
*
* input : None
* output : Line is cleared from current cursor position to eoln
@@ -2037,7 +2037,7 @@ int number;
/*
* kd_delch:
*
- * This function deletes a number of characters from the current
+ * This function deletes a number of characters from the current
* position in the line.
*
* input : number of characters to delete
@@ -2091,7 +2091,7 @@ int number;
csrpos_t i;
csrpos_t stop;
- stop = kd_curpos + (ONE_SPACE * number);
+ stop = kd_curpos + (ONE_SPACE * number);
if (stop > BEG_OF_LINE(kd_curpos) + ONE_LINE)
stop = BEG_OF_LINE(kd_curpos) + ONE_LINE;
for (i = kd_curpos; i < stop; i += ONE_SPACE) {
@@ -2116,7 +2116,7 @@ kd_eraseln()
csrpos_t stop;
stop = BEG_OF_LINE(kd_curpos) + ONE_LINE;
- for (i = BEG_OF_LINE(kd_curpos); i < stop; i += ONE_SPACE) {
+ for (i = BEG_OF_LINE(kd_curpos); i < stop; i += ONE_SPACE) {
(*kd_dput)(i, K_SPACE, kd_attr);
}
return;
@@ -2225,12 +2225,12 @@ unsigned char ch;
}
-/*
+/*
* kd_getdata:
- *
- * This function returns a data byte from the keyboard RDWR port,
- * after waiting until the port is flagged as having something to
- * read.
+ *
+ * This function returns a data byte from the keyboard RDWR port,
+ * after waiting until the port is flagged as having something to
+ * read.
*/
unsigned char
kd_getdata()
@@ -2269,9 +2269,9 @@ kd_mouse_drain()
printf("kbd: S = %x D = %x\n", i, inb(K_RDWR));
}
-/*
+/*
* set_kd_state:
- *
+ *
* Set kd_state and update the keyboard status LEDs.
*/
@@ -2282,10 +2282,10 @@ int newstate;
kd_setleds1(state2leds(newstate));
}
-/*
+/*
* state2leds:
- *
- * Return a byte containing LED settings for the keyboard, given
+ *
+ * Return a byte containing LED settings for the keyboard, given
* a state vector.
*/
u_char
@@ -2301,10 +2301,10 @@ int state;
return(result);
}
-/*
+/*
* kd_setleds[12]:
- *
- * Set the keyboard LEDs according to the given byte.
+ *
+ * Set the keyboard LEDs according to the given byte.
*/
kd_setleds1(val)
u_char val;
@@ -2325,11 +2325,11 @@ kd_setleds2()
}
-/*
+/*
* cnsetleds:
- *
+ *
* like kd_setleds[12], but not interrupt-based.
- * Currently disabled because cngetc ignores caps lock and num
+ * Currently disabled because cngetc ignores caps lock and num
* lock anyway.
*/
cnsetleds(val)
@@ -2349,9 +2349,9 @@ kdreboot()
kd_sendcmd(0xFE); /* XXX - magic # */
delay(1000000); /* wait to see if anything happens */
#endif
- /*
+ /*
* If that didn't work, then we'll just have to try and
- * do it the hard way.
+ * do it the hard way.
*/
cpu_shutdown();
}
@@ -2472,7 +2472,7 @@ kd_xga_init()
* memory location for these cards.
*
*/
-
+
vid_start = (u_char *)phystokv(EGA_START);
kd_index_reg = EGA_IDX_REG;
kd_io_reg = EGA_IO_REG;
@@ -2623,9 +2623,9 @@ char chattr;
}
-/*
+/*
* kd_noopreset:
- *
+ *
* No-op reset routine for kd_dreset.
*/
static void
@@ -2726,7 +2726,7 @@ int count;
count /= kd_cols; /* num lines */
count *= fb_byte_width * (char_height+cursor_height);
kd_slmscu(bit2fbptr(from_xbit, from_ybit),
- bit2fbptr(to_xbit, to_ybit),
+ bit2fbptr(to_xbit, to_ybit),
count/SLAMBPW);
bmppaintcsr(kd_curpos, char_white);
} else {
@@ -2795,7 +2795,7 @@ char chattr; /* reverse or normal */
/* fast case - entire page */
kd_slmwd(vid_start, (fb_byte_width * fb_height)/SLAMBPW,
clearval);
- } else
+ } else
/* slow case */
for (i = 0; i < count; ++i) {
bmpput(to, K_SPACE, chattr);
@@ -2884,7 +2884,7 @@ kdcnprobe(struct consdev *cp)
maj = 0;
unit = 0;
pri = CN_INTERNAL;
-
+
cp->cn_dev = makedev(maj, unit);
cp->cn_pri = pri;
}
@@ -2923,13 +2923,13 @@ kdcnputc(dev_t dev, int c)
kd_putc(c);
}
-/*
+/*
* kdcnmaygetc:
- *
- * Get one character using polling, rather than interrupts. Used
+ *
+ * Get one character using polling, rather than interrupts. Used
* by the kernel debugger. Note that Caps Lock is ignored.
- * Normally this routine is called with interrupts already
- * disabled, but there is code in place so that it will be more
+ * Normally this routine is called with interrupts already
+ * disabled, but there is code in place so that it will be more
* likely to work even if interrupts are turned on.
*/
int
diff --git a/i386/i386at/kd_event.c b/i386/i386at/kd_event.c
index 304bd7f..898fd24 100644
--- a/i386/i386at/kd_event.c
+++ b/i386/i386at/kd_event.c
@@ -1,25 +1,25 @@
-/*
+/*
* Mach Operating System
* Copyright (c) 1991,1990,1989 Carnegie Mellon University
* All Rights Reserved.
- *
+ *
* Permission to use, copy, modify and distribute this software and its
* documentation is hereby granted, provided that both the copyright
* notice and this permission notice appear in all copies of the
* software, derivative works or modified versions, and any portions
* thereof, and that both notices appear in supporting documentation.
- *
+ *
* CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
* CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR
* ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
- *
+ *
* Carnegie Mellon requests users of this software to return to
- *
+ *
* Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU
* School of Computer Science
* Carnegie Mellon University
* Pittsburgh PA 15213-3890
- *
+ *
* any improvements or extensions that they make and grant Carnegie Mellon
* the rights to redistribute these changes.
*/
@@ -59,7 +59,7 @@ WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
#ifdef MACH_KERNEL
#include <device/errno.h>
#include <device/io_req.h>
-#else MACH_KERNEL
+#else /* MACH_KERNEL */
#include <sys/file.h>
#include <sys/errno.h>
#include <kern/thread.h>
@@ -68,7 +68,7 @@ WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
#include <sys/kernel.h>
#include <sys/ioctl.h>
#include <sys/tty.h>
-#endif MACH_KERNEL
+#endif /* MACH_KERNEL */
#include <i386/machspl.h>
#include <i386at/kd.h>
#include <i386at/kd_queue.h>
@@ -87,7 +87,7 @@ WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
kd_event_queue kbd_queue; /* queue of keyboard events */
#ifdef MACH_KERNEL
queue_head_t kbd_read_queue = { &kbd_read_queue, &kbd_read_queue };
-#else MACH_KERNEL
+#else /* MACH_KERNEL */
struct proc *kbd_sel = 0; /* selecting process, if any */
short kbdpgrp = 0; /* process group leader when dev is open */
@@ -95,14 +95,14 @@ int kbdflag = 0;
#define KBD_COLL 1 /* select collision */
#define KBD_ASYNC 2 /* user wants asynch notification */
#define KBD_NBIO 4 /* user wants non-blocking I/O */
-#endif MACH_KERNEL
+#endif /* MACH_KERNEL */
void kbd_enqueue();
#ifdef MACH_KERNEL
io_return_t X_kdb_enter_init();
io_return_t X_kdb_exit_init();
-#endif MACH_KERNEL
+#endif /* MACH_KERNEL */
static boolean_t initialized = FALSE;
@@ -114,7 +114,7 @@ static boolean_t initialized = FALSE;
kbdinit()
{
spl_t s = SPLKD();
-
+
if (!initialized) {
kdq_reset(&kbd_queue);
initialized = TRUE;
@@ -136,13 +136,13 @@ kbdopen(dev, flags)
kbdinit();
#ifdef MACH_KERNEL
-#else MACH_KERNEL
+#else /* MACH_KERNEL */
if (flags & FWRITE)
return(ENODEV);
-
+
if (kbdpgrp == 0)
kbdpgrp = u.u_procp->p_pgrp;
-#endif MACH_KERNEL
+#endif /* MACH_KERNEL */
return(0);
}
@@ -161,11 +161,11 @@ kbdclose(dev, flags)
kb_mode = KB_ASCII;
#ifdef MACH_KERNEL
-#else MACH_KERNEL
+#else /* MACH_KERNEL */
kbdpgrp = 0;
kbdflag = 0;
kbd_sel = 0;
-#endif MACH_KERNEL
+#endif /* MACH_KERNEL */
kdq_reset(&kbd_queue);
splx(s);
}
@@ -220,7 +220,7 @@ io_return_t kbdsetstat(dev, flavor, data, count)
return (D_SUCCESS);
}
-#else MACH_KERNEL
+#else /* MACH_KERNEL */
/*
* kbdioctl - handling for asynch & non-blocking I/O.
*/
@@ -291,11 +291,11 @@ kbdselect(dev, rw)
else
kbd_sel = (struct proc *)current_thread();
/* eeeyuck */
-
+
splx(s);
return(0);
}
-#endif MACH_KERNEL
+#endif /* MACH_KERNEL */
/*
@@ -374,7 +374,7 @@ boolean_t kbd_read_done(ior)
return (TRUE);
}
-#else MACH_KERNEL
+#else /* MACH_KERNEL */
/*ARGSUSED*/
kbdread(dev, uio)
dev_t dev;
@@ -390,7 +390,7 @@ kbdread(dev, uio)
if (kbdflag & KBD_NBIO) {
err = EWOULDBLOCK;
goto done;
- } else
+ } else
while (kdq_empty(&kbd_queue)) {
splx(s);
sleep((caddr_t)&kbd_queue, TTIPRI);
@@ -411,7 +411,7 @@ done:
splx(s);
return(err);
}
-#endif MACH_KERNEL
+#endif /* MACH_KERNEL */
/*
@@ -451,7 +451,7 @@ kbd_enqueue(ev)
while ((ior = (io_req_t)dequeue_head(&kbd_read_queue)) != 0)
iodone(ior);
}
-#else MACH_KERNEL
+#else /* MACH_KERNEL */
if (kbd_sel) {
selwakeup(kbd_sel, kbdflag & KBD_COLL);
kbd_sel = 0;
@@ -460,7 +460,7 @@ kbd_enqueue(ev)
if (kbdflag & KBD_ASYNC)
gsignal(kbdpgrp, SIGIO);
wakeup((caddr_t)&kbd_queue);
-#endif MACH_KERNEL
+#endif /* MACH_KERNEL */
}
u_int X_kdb_enter_str[512], X_kdb_exit_str[512];
@@ -544,7 +544,7 @@ X_kdb_exit_init(data, count)
X_kdb_exit_len = count;
return D_SUCCESS;
}
-#else MACH_KERNEL
+#else /* MACH_KERNEL */
X_kdb_enter_init(kp)
struct X_kdb *kp;
{
@@ -566,4 +566,4 @@ struct X_kdb *kp;
X_kdb_exit_len = kp->size>>2;
}
-#endif MACH_KERNEL
+#endif /* MACH_KERNEL */
diff --git a/i386/i386at/kd_mouse.c b/i386/i386at/kd_mouse.c
index 28114d4..0c104d3 100644
--- a/i386/i386at/kd_mouse.c
+++ b/i386/i386at/kd_mouse.c
@@ -1,25 +1,25 @@
-/*
+/*
* Mach Operating System
* Copyright (c) 1991,1990,1989 Carnegie Mellon University
* All Rights Reserved.
- *
+ *
* Permission to use, copy, modify and distribute this software and its
* documentation is hereby granted, provided that both the copyright
* notice and this permission notice appear in all copies of the
* software, derivative works or modified versions, and any portions
* thereof, and that both notices appear in supporting documentation.
- *
+ *
* CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
* CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR
* ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
- *
+ *
* Carnegie Mellon requests users of this software to return to
- *
+ *
* Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU
* School of Computer Science
* Carnegie Mellon University
* Pittsburgh PA 15213-3890
- *
+ *
* any improvements or extensions that they make and grant Carnegie Mellon
* the rights to redistribute these changes.
*/
@@ -69,7 +69,7 @@ WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
#ifdef MACH_KERNEL
#include <device/errno.h>
#include <device/io_req.h>
-#else MACH_KERNEL
+#else /* MACH_KERNEL */
#include <sys/file.h>
#include <sys/errno.h>
#include <kern/thread.h>
@@ -78,7 +78,7 @@ WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
#include <sys/kernel.h>
#include <sys/ioctl.h>
#include <sys/tty.h>
-#endif MACH_KERNEL
+#endif /* MACH_KERNEL */
#include <i386/ipl.h>
#include <chips/busses.h>
#include <i386at/kd.h>
@@ -94,18 +94,18 @@ kd_event_queue mouse_queue; /* queue of mouse events */
boolean_t mouse_in_use = FALSE;
#ifdef MACH_KERNEL
queue_head_t mouse_read_queue = { &mouse_read_queue, &mouse_read_queue };
-#else MACH_KERNEL
+#else /* MACH_KERNEL */
struct proc *mouse_sel = 0; /* selecting process, if any */
short mousepgrp = 0; /* process group leader when dev is open */
-#endif MACH_KERNEL
+#endif /* MACH_KERNEL */
#ifdef MACH_KERNEL
-#else MACH_KERNEL
+#else /* MACH_KERNEL */
int mouseflag = 0;
#define MOUSE_COLL 1 /* select collision */
#define MOUSE_ASYNC 2 /* user wants asynch notification */
#define MOUSE_NBIO 4 /* user wants non-blocking I/O */
-#endif MACH_KERNEL
+#endif /* MACH_KERNEL */
/*
* The state of the 3 buttons is encoded in the low-order 3 bits (both
@@ -168,19 +168,19 @@ mouseopen(dev, flags)
int flags;
{
#ifdef MACH_KERNEL
-#else MACH_KERNEL
+#else /* MACH_KERNEL */
if (flags & FWRITE)
return(ENODEV);
-#endif MACH_KERNEL
+#endif /* MACH_KERNEL */
if (mouse_in_use)
return(EBUSY);
mouse_in_use = TRUE; /* locking? */
kdq_reset(&mouse_queue);
lastbuttons = MOUSE_ALL_UP;
#ifdef MACH_KERNEL
-#else MACH_KERNEL
+#else /* MACH_KERNEL */
mousepgrp = u.u_procp->p_pgrp;
-#endif MACH_KERNEL
+#endif /* MACH_KERNEL */
switch (mouse_type = ((minor(dev) & 0xf8) >> 3)) {
case MICROSOFT_MOUSE7:
@@ -203,7 +203,7 @@ mouseopen(dev, flags)
init_mouse_hw(dev&7, LC7);
track_man[0] = comgetc(dev&7);
track_man[1] = comgetc(dev&7);
- if (track_man[0] != 0x4d &&
+ if (track_man[0] != 0x4d &&
track_man[1] != 0x33) {
printf("LOGITECH_TRACKMAN: NOT M3");
}
@@ -252,7 +252,7 @@ kd_mouse_open(dev, mouse_pic)
}
/*
- * mouseclose - Disable interrupts on the serial port, reset driver flags,
+ * mouseclose - Disable interrupts on the serial port, reset driver flags,
* and restore the serial port interrupt vector.
*/
mouseclose(dev, flags)
@@ -277,11 +277,11 @@ mouseclose(dev, flags)
kdq_reset(&mouse_queue); /* paranoia */
mouse_in_use = FALSE;
#ifdef MACH_KERNEL
-#else MACH_KERNEL
+#else /* MACH_KERNEL */
mousepgrp = 0;
mouseflag = 0;
mouse_sel = 0;
-#endif MACH_KERNEL
+#endif /* MACH_KERNEL */
}
/*ARGSUSED*/
@@ -334,7 +334,7 @@ io_return_t mousegetstat(dev, flavor, data, count)
return D_SUCCESS;
}
-#else MACH_KERNEL
+#else /* MACH_KERNEL */
/*
* mouseioctl - handling for asynch & non-blocking I/O.
*/
@@ -391,11 +391,11 @@ mouseselect(dev, rw)
else
mouse_sel = (struct proc *)current_thread();
/* eeeyuck */
-
+
splx(s);
return(0);
}
-#endif MACH_KERNEL
+#endif /* MACH_KERNEL */
/*
* mouseread - dequeue and return any queued events.
@@ -472,7 +472,7 @@ boolean_t mouse_read_done(ior)
return (TRUE);
}
-#else MACH_KERNEL
+#else /* MACH_KERNEL */
/*ARGSUSED*/
mouseread(dev, uio)
dev_t dev;
@@ -488,7 +488,7 @@ mouseread(dev, uio)
if (mouseflag & MOUSE_NBIO) {
err = EWOULDBLOCK;
goto done;
- } else
+ } else
while (kdq_empty(&mouse_queue)) {
splx(s);
sleep((caddr_t)&mouse_queue, TTIPRI);
@@ -509,7 +509,7 @@ done:
splx(s);
return(err);
}
-#endif MACH_KERNEL
+#endif /* MACH_KERNEL */
/*
@@ -547,7 +547,7 @@ mouseintr(unit)
*/
int show_mouse_byte = 0;
/*
- X down; middle down; middle up; X up 50 0 0; 50 0 0 22; 50 0 0 02; 40 0 0
+ X down; middle down; middle up; X up 50 0 0; 50 0 0 22; 50 0 0 02; 40 0 0
X down; middle down; X up; middle up 50 0 0; 50 0 0 22; 40 0 0 22; 40 0 0 2
*
* The trick here is that all the while the middle button is down you get 4 byte
@@ -616,7 +616,7 @@ mouse_handle_byte(ch)
mousebuf[mousebufindex++] = ch;
if (mousebufindex < mousebufsize)
return;
-
+
/* got a packet */
mousebufindex = 0;
@@ -752,9 +752,9 @@ int kd_mouse_read(void)
#ifdef MACH_KERNEL
assert_wait((event_t) &mouse_char, FALSE);
thread_block((void (*)()) 0);
-#else MACH_KERNEL
+#else /* MACH_KERNEL */
sleep(&mouse_char, PZERO);
-#endif MACH_KERNEL
+#endif /* MACH_KERNEL */
}
ch = mouse_char;
@@ -910,7 +910,7 @@ mouse_enqueue(ev)
while ((ior = (io_req_t)dequeue_head(&mouse_read_queue)) != 0)
iodone(ior);
}
-#else MACH_KERNEL
+#else /* MACH_KERNEL */
if (mouse_sel) {
selwakeup(mouse_sel, mouseflag & MOUSE_COLL);
mouse_sel = 0;
@@ -919,5 +919,5 @@ mouse_enqueue(ev)
if (mouseflag & MOUSE_ASYNC)
gsignal(mousepgrp, SIGIO);
wakeup((caddr_t)&mouse_queue);
-#endif MACH_KERNEL
+#endif /* MACH_KERNEL */
}
diff --git a/i386/i386at/model_dep.c b/i386/i386at/model_dep.c
index 21f0785..f730c5b 100644
--- a/i386/i386at/model_dep.c
+++ b/i386/i386at/model_dep.c
@@ -1,25 +1,25 @@
-/*
+/*
* Mach Operating System
* Copyright (c) 1991,1990,1989, 1988 Carnegie Mellon University
* All Rights Reserved.
- *
+ *
* Permission to use, copy, modify and distribute this software and its
* documentation is hereby granted, provided that both the copyright
* notice and this permission notice appear in all copies of the
* software, derivative works or modified versions, and any portions
* thereof, and that both notices appear in supporting documentation.
- *
+ *
* CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
* CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR
* ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
- *
+ *
* Carnegie Mellon requests users of this software to return to
- *
+ *
* Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU
* School of Computer Science
* Carnegie Mellon University
* Pittsburgh PA 15213-3890
- *
+ *
* any improvements or extensions that they make and grant Carnegie Mellon
* the rights to redistribute these changes.
*/
@@ -330,7 +330,7 @@ void c_boot_entry(vm_offset_t bi)
kern_sym_start, kern_sym_end,
symtab_size, strtab_size);
}
-#endif MACH_KDB
+#endif /* MACH_KDB */
/*
* Do basic VM initialization
@@ -356,7 +356,7 @@ void c_boot_entry(vm_offset_t bi)
cninit(); /* need console for debugger */
Debugger();
}
-#endif MACH_KDB
+#endif /* MACH_KDB */
machine_slot[0].is_cpu = TRUE;
machine_slot[0].running = TRUE;
@@ -381,7 +381,7 @@ void c_boot_entry(vm_offset_t bi)
}
#else
machine_slot[0].cpu_type = CPU_TYPE_I386;
-#endif
+#endif
/*
@@ -402,7 +402,7 @@ timemmap(dev,off,prot)
#ifdef lint
dev++; off++;
-#endif lint
+#endif /* lint */
if (prot & VM_PROT_WRITE) return (-1);
diff --git a/i386/i386at/rtc.c b/i386/i386at/rtc.c
index 7a8d1d7..96aa86d 100644
--- a/i386/i386at/rtc.c
+++ b/i386/i386at/rtc.c
@@ -1,25 +1,25 @@
-/*
+/*
* Mach Operating System
* Copyright (c) 1991,1990,1989 Carnegie Mellon University
* All Rights Reserved.
- *
+ *
* Permission to use, copy, modify and distribute this software and its
* documentation is hereby granted, provided that both the copyright
* notice and this permission notice appear in all copies of the
* software, derivative works or modified versions, and any portions
* thereof, and that both notices appear in supporting documentation.
- *
+ *
* CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
* CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR
* ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
- *
+ *
* Carnegie Mellon requests users of this software to return to
- *
+ *
* Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU
* School of Computer Science
* Carnegie Mellon University
* Pittsburgh PA 15213-3890
- *
+ *
* any improvements or extensions that they make and grant Carnegie Mellon
* the rights to redistribute these changes.
*/
@@ -72,14 +72,14 @@ unsigned char *regs;
rtcinit();
first_rtcopen_ever = 0;
}
- outb(RTC_ADDR, RTC_D);
+ outb(RTC_ADDR, RTC_D);
if (inb(RTC_DATA) & RTC_VRT == 0) return(-1);
- outb(RTC_ADDR, RTC_A);
+ outb(RTC_ADDR, RTC_A);
while (inb(RTC_DATA) & RTC_UIP) /* busy wait */
- outb(RTC_ADDR, RTC_A);
+ outb(RTC_ADDR, RTC_A);
load_rtc(regs);
return(0);
-}
+}
rtcput(regs)
unsigned char *regs;
@@ -93,10 +93,10 @@ unsigned char *regs;
outb(RTC_ADDR, RTC_B);
x = inb(RTC_DATA);
outb(RTC_ADDR, RTC_B);
- outb(RTC_DATA, x | RTC_SET);
+ outb(RTC_DATA, x | RTC_SET);
save_rtc(regs);
outb(RTC_ADDR, RTC_B);
- outb(RTC_DATA, x & ~RTC_SET);
+ outb(RTC_DATA, x & ~RTC_SET);
}
@@ -136,9 +136,9 @@ readtodc(tp)
#ifdef MACH_KERNEL
ospl = splclock();
-#else MACH_KERNEL
+#else /* MACH_KERNEL */
ospl = spl5();
-#endif MACH_KERNEL
+#endif /* MACH_KERNEL */
if (rtcget(&rtclk)) {
splx(ospl);
return(-1);
@@ -166,11 +166,11 @@ readtodc(tp)
n += days * 3600 * 24;
#ifdef MACH_KERNEL
-#else MACH_KERNEL
+#else /* MACH_KERNEL */
n += tz.tz_minuteswest * 60;
if (tz.tz_dsttime)
n -= 3600;
-#endif MACH_KERNEL
+#endif /* MACH_KERNEL */
*tp = n;
@@ -186,9 +186,9 @@ writetodc()
#ifdef MACH_KERNEL
ospl = splclock();
-#else MACH_KERNEL
+#else /* MACH_KERNEL */
ospl = spl5();
-#endif MACH_KERNEL
+#endif /* MACH_KERNEL */
if (rtcget(&rtclk)) {
splx(ospl);
return(-1);
@@ -197,11 +197,11 @@ writetodc()
#ifdef MACH_KERNEL
diff = 0;
-#else MACH_KERNEL
+#else /* MACH_KERNEL */
diff = tz.tz_minuteswest * 60;
if (tz.tz_dsttime)
diff -= 3600;
-#endif MACH_KERNEL
+#endif /* MACH_KERNEL */
n = (time.tv_sec - diff) % (3600 * 24); /* hrs+mins+secs */
rtclk.rtc_sec = dectohexdec(n%60);
n /= 60;
@@ -227,9 +227,9 @@ writetodc()
#ifdef MACH_KERNEL
ospl = splclock();
-#else MACH_KERNEL
+#else /* MACH_KERNEL */
ospl = spl5();
-#endif MACH_KERNEL
+#endif /* MACH_KERNEL */
rtcput(&rtclk);
splx(ospl);