summaryrefslogtreecommitdiffstats
path: root/sys/i386/isa
diff options
context:
space:
mode:
authorrgrimes <rgrimes@FreeBSD.org>1995-05-30 08:16:23 +0000
committerrgrimes <rgrimes@FreeBSD.org>1995-05-30 08:16:23 +0000
commitc86f0c7a71e7ade3e38b325c186a9cf374e0411e (patch)
tree176f04f674860c7cfae9ac5d2ff4d4e1d73cb2b7 /sys/i386/isa
parent423ba8f9bc23d93bfc244aca9b12563b1c9de90d (diff)
downloadFreeBSD-src-c86f0c7a71e7ade3e38b325c186a9cf374e0411e.zip
FreeBSD-src-c86f0c7a71e7ade3e38b325c186a9cf374e0411e.tar.gz
Remove trailing whitespace.
Diffstat (limited to 'sys/i386/isa')
-rw-r--r--sys/i386/isa/aha1542.c46
-rw-r--r--sys/i386/isa/aha1742.c28
-rw-r--r--sys/i386/isa/aic6360.c160
-rw-r--r--sys/i386/isa/aic7770.c24
-rw-r--r--sys/i386/isa/b004.c20
-rw-r--r--sys/i386/isa/b004.h12
-rw-r--r--sys/i386/isa/bt742a.c52
-rw-r--r--sys/i386/isa/clock.c18
-rw-r--r--sys/i386/isa/cronyx.c14
-rw-r--r--sys/i386/isa/ctx.c20
-rw-r--r--sys/i386/isa/ctxreg.h8
-rw-r--r--sys/i386/isa/cx.c14
-rw-r--r--sys/i386/isa/cxreg.h2
-rw-r--r--sys/i386/isa/cy.c16
-rw-r--r--sys/i386/isa/elink.c4
-rw-r--r--sys/i386/isa/fd.c42
-rw-r--r--sys/i386/isa/ft.c30
-rw-r--r--sys/i386/isa/gpib.c110
-rw-r--r--sys/i386/isa/gpib.h26
-rw-r--r--sys/i386/isa/gpibreg.h2
-rw-r--r--sys/i386/isa/gsc.c68
-rw-r--r--sys/i386/isa/gscreg.h2
-rw-r--r--sys/i386/isa/ic/Am7990.h34
-rw-r--r--sys/i386/isa/ic/am7990.h2
-rw-r--r--sys/i386/isa/ic/i82365.h2
-rw-r--r--sys/i386/isa/ic/i8237.h4
-rw-r--r--sys/i386/isa/ic/lemac.h4
-rw-r--r--sys/i386/isa/ic/ncr5380.h6
-rw-r--r--sys/i386/isa/if_cx.c2
-rw-r--r--sys/i386/isa/if_ed.c22
-rw-r--r--sys/i386/isa/if_edreg.h10
-rw-r--r--sys/i386/isa/if_eg.c72
-rw-r--r--sys/i386/isa/if_egreg.h6
-rw-r--r--sys/i386/isa/if_el.c14
-rw-r--r--sys/i386/isa/if_ep.c30
-rw-r--r--sys/i386/isa/if_epreg.h26
-rw-r--r--sys/i386/isa/if_fe.c18
-rw-r--r--sys/i386/isa/if_ie.c98
-rw-r--r--sys/i386/isa/if_ix.c26
-rw-r--r--sys/i386/isa/if_ixreg.h6
-rw-r--r--sys/i386/isa/if_le.c58
-rw-r--r--sys/i386/isa/if_lnc.c82
-rw-r--r--sys/i386/isa/if_ze.c74
-rw-r--r--sys/i386/isa/if_zereg.h8
-rw-r--r--sys/i386/isa/if_zp.c26
-rw-r--r--sys/i386/isa/if_zpreg.h4
-rw-r--r--sys/i386/isa/isa.c40
-rw-r--r--sys/i386/isa/joy.c12
-rw-r--r--sys/i386/isa/kbd.h6
-rw-r--r--sys/i386/isa/labpc.c16
-rw-r--r--sys/i386/isa/lpt.c84
-rw-r--r--sys/i386/isa/matcd/audio.c8
-rw-r--r--sys/i386/isa/matcd/creative.h8
-rw-r--r--sys/i386/isa/matcd/matcd.c70
-rw-r--r--sys/i386/isa/matcd/matcd.h6
-rw-r--r--sys/i386/isa/matcd/options.h18
-rw-r--r--sys/i386/isa/mcd.c44
-rw-r--r--sys/i386/isa/mcdreg.h4
-rw-r--r--sys/i386/isa/mse.c20
-rw-r--r--sys/i386/isa/ncr5380.c2
-rw-r--r--sys/i386/isa/npx.c6
-rw-r--r--sys/i386/isa/pcaudio.c30
-rw-r--r--sys/i386/isa/pcic.c2
-rw-r--r--sys/i386/isa/pcic.h10
-rw-r--r--sys/i386/isa/pcvt/pcvt_conf.h28
-rw-r--r--sys/i386/isa/pcvt/pcvt_drv.c84
-rw-r--r--sys/i386/isa/pcvt/pcvt_ext.c554
-rw-r--r--sys/i386/isa/pcvt/pcvt_hdr.h16
-rw-r--r--sys/i386/isa/pcvt/pcvt_kbd.c168
-rw-r--r--sys/i386/isa/pcvt/pcvt_kbd.h272
-rw-r--r--sys/i386/isa/pcvt/pcvt_out.c380
-rw-r--r--sys/i386/isa/pcvt/pcvt_sup.c148
-rw-r--r--sys/i386/isa/pcvt/pcvt_tbl.h2
-rw-r--r--sys/i386/isa/pcvt/pcvt_vtf.c298
-rw-r--r--sys/i386/isa/psm.c18
-rw-r--r--sys/i386/isa/readMBR.c16
-rw-r--r--sys/i386/isa/scd.c46
-rw-r--r--sys/i386/isa/seagate.c4
-rw-r--r--sys/i386/isa/sio.c24
-rw-r--r--sys/i386/isa/sound/dev_table.h18
-rw-r--r--sys/i386/isa/sound/dmabuf.c12
-rw-r--r--sys/i386/isa/sound/finetune.h30
-rw-r--r--sys/i386/isa/sound/midi_ctrl.h2
-rw-r--r--sys/i386/isa/sound/opl3.h8
-rw-r--r--sys/i386/isa/sound/os.h28
-rw-r--r--sys/i386/isa/sound/pas.h10
-rw-r--r--sys/i386/isa/sound/pas2_card.c2
-rw-r--r--sys/i386/isa/sound/sb_mixer.h16
-rw-r--r--sys/i386/isa/sound/sound_calls.h4
-rw-r--r--sys/i386/isa/sound/sound_config.h10
-rw-r--r--sys/i386/isa/sound/soundcard.c12
-rw-r--r--sys/i386/isa/sound/tuning.h30
-rw-r--r--sys/i386/isa/sound/ulaw.h128
-rw-r--r--sys/i386/isa/sound/vat_audio.c6
-rw-r--r--sys/i386/isa/spigot.c6
-rw-r--r--sys/i386/isa/spkr.c6
-rw-r--r--sys/i386/isa/syscons.c360
-rw-r--r--sys/i386/isa/syscons.h4
-rw-r--r--sys/i386/isa/tw.c8
-rw-r--r--sys/i386/isa/ultra14f.c18
-rw-r--r--sys/i386/isa/wd7000.c64
-rw-r--r--sys/i386/isa/wt.c14
-rw-r--r--sys/i386/isa/wtreg.h12
103 files changed, 2302 insertions, 2302 deletions
diff --git a/sys/i386/isa/aha1542.c b/sys/i386/isa/aha1542.c
index 68948d1..d8a5bf0 100644
--- a/sys/i386/isa/aha1542.c
+++ b/sys/i386/isa/aha1542.c
@@ -12,7 +12,7 @@
* on the understanding that TFS is not responsible for the correct
* functioning of this software in any circumstances.
*
- * $Id: aha1542.c,v 1.43 1995/04/12 20:47:32 wollman Exp $
+ * $Id: aha1542.c,v 1.44 1995/04/14 15:13:46 dufault Exp $
*/
/*
@@ -118,7 +118,7 @@ struct aha_cmd_buf {
#define AHA_MBIF 0x01 /* MBX in full */
/*
- * Mail box defs
+ * Mail box defs
*/
#define AHA_MBX_SIZE 16 /* mail box size */
@@ -295,7 +295,7 @@ struct aha_data {
short aha_base; /* base port for each board */
/*
* xor this with a physaddr to get a kv addr and visa versa
- * for items in THIS STRUCT only.
+ * for items in THIS STRUCT only.
* Used to get the CCD's physical and kv addresses from each
* other.
*/
@@ -335,7 +335,7 @@ struct scsi_adapter aha_switch =
0,
aha_adapter_info,
"aha",
- { 0, 0 }
+ { 0, 0 }
};
/* the below structure is so we have a default dev struct for out link struct */
@@ -596,7 +596,7 @@ ahaprobe(dev)
* to change addresses within the structure
* from physical to virtual easily, as long as
* the structure is less than 1 page in size.
- * This is used to recognise CCBs which are in
+ * This is used to recognise CCBs which are in
* this struct and which are refered to by the
* hardware using physical addresses.
* (assumes malloc returns a chunk that doesn't
@@ -646,7 +646,7 @@ ahaattach(dev)
* Return some information to the caller about the adapter and its
* capabilities.
*/
-u_int32
+u_int32
aha_adapter_info(unit)
int unit;
{
@@ -669,7 +669,7 @@ ahaintr(unit)
#endif /*AHADEBUG */
/*
* First acknowledge the interrupt, Then if it's not telling about
- * a completed operation just return.
+ * a completed operation just return.
*/
stat = inb(AHA_INTR_PORT);
outb(AHA_CTRL_STAT_PORT, AHA_IRST);
@@ -767,7 +767,7 @@ ahaintr(unit)
}
/*
- * A ccb (and hence a mbx-out) is put onto the
+ * A ccb (and hence a mbx-out) is put onto the
* free list.
*/
void
@@ -991,7 +991,7 @@ aha_init(unit)
aha->sg_opcode = AHA_INIT_SCAT_GATH_CCB;
/*
- * reset board, If it doesn't respond, assume
+ * reset board, If it doesn't respond, assume
* that it's not there.. good for the probe
*/
@@ -1190,7 +1190,7 @@ aha_init(unit)
#ifdef TUNE_1542
/*
* Initialize memory transfer speed
- * Not compiled in by default because it breaks some machines
+ * Not compiled in by default because it breaks some machines
*/
if (!(aha_set_bus_speed(unit))) {
return (EIO);
@@ -1199,7 +1199,7 @@ aha_init(unit)
printf (" (bus speed defaulted)\n");
#endif /*TUNE_1542*/
/*
- * Initialize mail box
+ * Initialize mail box
*/
scsi_uto3b(KVTOPHYS(&aha->aha_mbx), ad);
@@ -1227,7 +1227,7 @@ aha_init(unit)
return 0;
}
-void
+void
ahaminphys(bp)
struct buf *bp;
{
@@ -1256,7 +1256,7 @@ int aha_escape(xs, ccb)
case SCSI_OP_TARGET:
s= splbio();
- aha_cmd(xs->sc_link->adapter_unit, 2, 0, 0, 0, AHA_TARGET_EN,
+ aha_cmd(xs->sc_link->adapter_unit, 2, 0, 0, 0, AHA_TARGET_EN,
(int)xs->cmd->bytes[0], (int)1);
splx(s);
ret = COMPLETE;
@@ -1328,7 +1328,7 @@ static int physcontig(int kv, int len)
* the data address. Also needs the unit, target
* and lu
*/
-int32
+int32
aha_scsi_cmd(xs)
struct scsi_xfer *xs;
{
@@ -1589,7 +1589,7 @@ aha_scsi_cmd(xs)
/*
* Poll a particular unit, looking for a particular xs
*/
-int
+int
aha_poll(unit, xs, ccb)
int unit;
struct scsi_xfer *xs;
@@ -1619,7 +1619,7 @@ aha_poll(unit, xs, ccb)
/*
* We timed out, so call the timeout handler
* manually, accout for the fact that the
- * clock is not running yet by taking out the
+ * clock is not running yet by taking out the
* clock queue entry it makes
*/
aha_timeout((caddr_t)ccb);
@@ -1665,7 +1665,7 @@ aha_poll(unit, xs, ccb)
* speed that fails, back off one notch from the last working
* speed (unless there is no other notch).
* Returns the nSEC value of the time used
- * or 0 if it could get a working speed (or the NEXT speed
+ * or 0 if it could get a working speed (or the NEXT speed
* failed)
*/
static struct bus_speed
@@ -1684,7 +1684,7 @@ static struct bus_speed
{0xff,450}
};
-int
+int
aha_set_bus_speed(unit)
int unit;
{
@@ -1734,7 +1734,7 @@ static char aha_test_string[] = "ABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890abcdefghijk
u_char aha_scratch_buf[256];
-int
+int
aha_bus_speed_check(unit, speed)
int unit, speed;
{
@@ -1770,20 +1770,20 @@ aha_bus_speed_check(unit, speed)
* board.
*/
bzero(aha_scratch_buf, 54); /* 54 bytes transfered by test */
-
+
aha_cmd(unit, 3, 0, 0, 0, AHA_READ_FIFO, ad[0], ad[1], ad[2]);
-
+
/*
* Compare the original data and the final data and
* return the correct value depending upon the result
*/
- if (strcmp(aha_test_string, aha_scratch_buf))
+ if (strcmp(aha_test_string, aha_scratch_buf))
return 0; /* failed test */
}
/* copy succeded assume speed ok */
return (aha_bus_speeds[speed].nsecs);
-
+
}
#endif /*TUNE_1542*/
diff --git a/sys/i386/isa/aha1742.c b/sys/i386/isa/aha1742.c
index 0d31e01..727b9a4 100644
--- a/sys/i386/isa/aha1742.c
+++ b/sys/i386/isa/aha1742.c
@@ -14,7 +14,7 @@
*
* commenced: Sun Sep 27 18:14:01 PDT 1992
*
- * $Id: aha1742.c,v 1.32 1995/05/09 12:25:50 rgrimes Exp $
+ * $Id: aha1742.c,v 1.33 1995/05/11 19:26:15 rgrimes Exp $
*/
#include <sys/types.h>
@@ -561,7 +561,7 @@ ahb_attach(dev)
* Return some information to the caller about
* the adapter and it's capabilities
*/
-u_int32
+u_int32
ahb_adapter_info(unit)
int unit;
{
@@ -590,7 +590,7 @@ ahbintr(unit)
while (inb(port + G2STAT) & G2STAT_INT_PEND) {
/*
- * First get all the information and then
+ * First get all the information and then
* acknowlege the interrupt
*/
ahbstat = inb(port + G2INTST);
@@ -712,7 +712,7 @@ ahb_done(unit, ecb, state)
printf("unexpected ha_status: %x\n",
stat->ha_status);
}
-#endif /*AHBDEBUG */
+#endif /*AHBDEBUG */
}
} else {
switch (stat->targ_status) {
@@ -741,7 +741,7 @@ done: xs->flags |= ITSDONE;
}
/*
- * A ecb (and hence a mbx-out is put onto the
+ * A ecb (and hence a mbx-out is put onto the
* free list.
*/
void
@@ -770,7 +770,7 @@ ahb_free_ecb(unit, ecb, flags)
}
/*
- * Get a free ecb
+ * Get a free ecb
* If there are none, see if we can allocate a
* new one. If so, put it in the hash table too
* otherwise either return an error or sleep
@@ -863,7 +863,7 @@ ahb_init(unit)
#define NO_NO 1
#ifdef NO_NO
/*
- * reset board, If it doesn't respond, assume
+ * reset board, If it doesn't respond, assume
* that it's not there.. good for the probe
*/
outb(port + EBCTRL, CDEN); /* enable full card */
@@ -944,7 +944,7 @@ ahb_init(unit)
#ifndef min
#define min(x,y) (x < y ? x : y)
-#endif /* min */
+#endif /* min */
void
ahbminphys(bp)
@@ -960,7 +960,7 @@ ahbminphys(bp)
* the data address. Also needs the unit, target
* and lu
*/
-int32
+int32
ahb_scsi_cmd(xs)
struct scsi_xfer *xs;
{
@@ -1001,7 +1001,7 @@ ahb_scsi_cmd(xs)
/*
* If it's a reset, we need to do an 'immediate'
* command, and store it's ecb for later
- * if there is already an immediate waiting,
+ * if there is already an immediate waiting,
* then WE must wait
*/
if (flags & SCSI_RESET) {
@@ -1091,8 +1091,8 @@ ahb_scsi_cmd(xs)
nextphys = thisphys;
while ((datalen) && (thisphys == nextphys)) {
/*
- * This page is contiguous (physically) with
- * the the last, just extend the length
+ * This page is contiguous (physically) with
+ * the the last, just extend the length
*/
/* how far to the end of the page */
nextphys = (thisphys & (~(PAGESIZ - 1)))
@@ -1111,7 +1111,7 @@ ahb_scsi_cmd(xs)
thisphys = KVTOPHYS(thiskv);
}
/*
- * next page isn't contiguous, finish the seg
+ * next page isn't contiguous, finish the seg
*/
SC_DEBUGN(xs->sc_link, SDEV_DB4,
("(0x%x)", bytes_this_seg));
@@ -1194,7 +1194,7 @@ ahb_timeout(void *arg1)
#endif /*AHBDEBUG */
/*
- * If it's immediate, don't try abort it
+ * If it's immediate, don't try abort it
*/
if (ecb->flags & ECB_IMMED) {
ecb->xs->retries = 0; /* I MEAN IT ! */
diff --git a/sys/i386/isa/aic6360.c b/sys/i386/isa/aic6360.c
index daa9885..2e8912c 100644
--- a/sys/i386/isa/aic6360.c
+++ b/sys/i386/isa/aic6360.c
@@ -14,7 +14,7 @@
* 3. All advertising materials mentioning features or use of this software
* must display the following acknowledgement:
* This product includes software developed by Jarle Greipsland
- * 4. The name of the author may not be used to endorse or promote products
+ * 4. The name of the author may not be used to endorse or promote products
* derived from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
@@ -31,7 +31,7 @@
*/
/*
- * $Id: aic6360.c,v 1.7 1995/03/28 07:55:24 bde Exp $
+ * $Id: aic6360.c,v 1.8 1995/04/12 20:47:35 wollman Exp $
*
* Acknowledgements: Many of the algorithms used in this driver are
* inspired by the work of Julian Elischer (julian@tfs.com) and
@@ -43,7 +43,7 @@
/* TODO list:
* 1) Get the DMA stuff working.
* 2) Get the iov/uio stuff working. Is this a good thing ???
- * 3) Get the synch stuff working.
+ * 3) Get the synch stuff working.
* 4) Rewrite it to use malloc for the acb structs instead of static alloc.?
*/
@@ -56,7 +56,7 @@
#define AIC_SCSI_HOSTID 7
#endif
-/* Use doubleword transfers to/from SCSI chip. Note: This requires
+/* Use doubleword transfers to/from SCSI chip. Note: This requires
* motherboard support. Basicly, some motherboard chipsets are able to
* split a 32 bit I/O operation into two 16 bit I/O operations,
* transparently to the processor. This speeds up some things, notably long
@@ -94,9 +94,9 @@
#define AIC_MSGI_SPIN 1 /* Will spinwait upto ?ms for a new msg byte */
#define AIC_MSGO_SPIN 1
-/* Include debug functions? At the end of this file there are a bunch of
- * functions that will print out various information regarding queued SCSI
- * commands, driver state and chip contents. You can call them from the
+/* Include debug functions? At the end of this file there are a bunch of
+ * functions that will print out various information regarding queued SCSI
+ * commands, driver state and chip contents. You can call them from the
* kernel debugger. If you set AIC_DEBUG to 0 they are not included (the
* kernel uses less memory) but you lose the debugging facilities.
*/
@@ -290,8 +290,8 @@
* mismatch and phase change interrupts. But more important: If there is a
* phase mismatch the chip will not transfer any data! This is actually a nice
* feature as it gives us a bit more control over what is happening when we are
- * bursting data (in) through the FIFOs and the phase suddenly changes from
- * DATA IN to STATUS or MESSAGE IN. The transfer will stop and wait for the
+ * bursting data (in) through the FIFOs and the phase suddenly changes from
+ * DATA IN to STATUS or MESSAGE IN. The transfer will stop and wait for the
* proper phase to be set in this register instead of dumping the bits into the
* FIFOs.
*/
@@ -521,7 +521,7 @@ extern int delaycount;
#define AIC_NSEG 16
#define NUM_CONCURRENT 7 /* Only one per target for now */
-/*
+/*
* ACB. Holds additional information for each SCSI command Comments: We
* need a separate scsi command block because we may need to overwrite it
* with a request sense command. Basicly, we refrain from fiddling with
@@ -546,9 +546,9 @@ struct acb {
int stat; /* SCSI status byte */
};
-/*
- * Some info about each (possible) target on the SCSI bus. This should
- * probably have been a "per target+lunit" structure, but we'll leave it at
+/*
+ * Some info about each (possible) target on the SCSI bus. This should
+ * probably have been a "per target+lunit" structure, but we'll leave it at
* this for now. Is there a way to reliably hook it up to sc->fordriver??
*/
struct aic_tinfo {
@@ -655,7 +655,7 @@ struct aic_softc { /* One of these per adapter */
#define AIC_SHOWMISC 0x08
#define AIC_SHOWTRAC 0x10
#define AIC_SHOWSTART 0x20
-int aic_debug = 0; /* AIC_SHOWSTART|AIC_SHOWMISC|AIC_SHOWTRAC; */
+int aic_debug = 0; /* AIC_SHOWSTART|AIC_SHOWMISC|AIC_SHOWTRAC; */
#if AIC_DEBUG
#define AIC_ACBS(str) do {if (aic_debug & AIC_SHOWACBS) printf str;} while (0)
@@ -771,7 +771,7 @@ aic_registerdev(struct isa_device *id)
dev_attach(&kdc_aic[id->id_unit]);
}
-/*
+/*
* INITIALIZATION ROUTINES (probe, attach ++)
*/
@@ -779,7 +779,7 @@ aic_registerdev(struct isa_device *id)
* aicprobe: probe for AIC6360 SCSI-controller
* returns non-zero value if a controller is found.
*/
-int
+int
#ifdef __FreeBSD__
aicprobe(dev)
struct isa_device *dev;
@@ -797,7 +797,7 @@ aicprobe(parent, self, aux)
struct isa_attach_args *ia = aux;
#endif
int i, len, ic;
-
+
#ifdef __FreeBSD__
if (unit >= NAIC) {
printf("aic%d: unit number too high\n", unit);
@@ -862,7 +862,7 @@ aicprobe(parent, self, aux)
#endif
}
-/* Do the real search-for-device.
+/* Do the real search-for-device.
* Prerequisite: aic->iobase should be set to the proper value
*/
int
@@ -872,23 +872,23 @@ aic_find(aic)
#else
struct aic_softc *aic;
#endif
-{
+{
u_short iobase = aic->iobase;
char chip_id[sizeof(IDSTRING)]; /* For chips that support it */
char *start;
int i;
-
+
/* Remove aic6360 from possible powerdown mode */
outb(DMACNTRL0, 0);
- /* Thanks to mark@aggregate.com for the new method for detecting
- * whether the chip is present or not. Bonus: may also work for
+ /* Thanks to mark@aggregate.com for the new method for detecting
+ * whether the chip is present or not. Bonus: may also work for
* the AIC-6260!
*/
AIC_TRACE(("aic: probing for aic-chip at port 0x%x\n",(int)iobase));
- /*
+ /*
* Linux also init's the stack to 1-16 and then clears it,
- * 6260's don't appear to have an ID reg - mpg
+ * 6260's don't appear to have an ID reg - mpg
*/
/* Push the sequence 0,1,..,15 on the stack */
#define STSIZE 16
@@ -927,7 +927,7 @@ aicprint()
* Attach the AIC6360, fill out some high and low level data structures
*/
#ifdef __FreeBSD__
-int
+int
aicattach(dev)
struct isa_device *dev;
#else
@@ -990,7 +990,7 @@ aicattach(parent, self, aux)
* aicprobe should have succeeded, i.e. the iobase address in aic_data must
* be valid.
*/
-static void
+static void
aic6360_reset(aic)
#ifdef __FreeBSD__
struct aic_data *aic;
@@ -1005,7 +1005,7 @@ aic6360_reset(aic)
/* Reset SCSI-FIFO and abort any transfers */
outb(SXFRCTL0, CHEN|CLRCH|CLRSTCNT);
-
+
/* Reset DMA-FIFO */
outb(DMACNTRL0, RSTFIFO);
outb(DMACNTRL1, 0);
@@ -1018,11 +1018,11 @@ aic6360_reset(aic)
outb(SIMODE1, 0x00); /* Disable some more interrupts */
outb(CLRSINT1, 0xef); /* Clear another slew of interrupts */
-
+
outb(SCSIRATE, 0); /* Disable synchronous transfers */
outb(CLRSERR, 0x07); /* Haven't seen ant errors (yet) */
-
+
outb(SCSIID, AIC_SCSI_HOSTID << OID_S); /* Set our SCSI-ID */
outb(BRSTCNTRL, EISA_BRST_TIM);
}
@@ -1067,7 +1067,7 @@ aic_init(aic)
u_short iobase = aic->iobase;
struct acb *acb;
int r;
-
+
/* Reset the SCSI-bus itself */
aic_scsi_reset(aic);
@@ -1102,7 +1102,7 @@ aic_init(aic)
aic_done(acb);
}
}
-
+
aic->phase = aic->prevphase = PH_INVALID;
aic->hp = 0;
for (r = 0; r < 7; r++) {
@@ -1145,7 +1145,7 @@ aic_init(aic)
* SCSI-commands.
*/
#ifdef __FreeBSD__
-int32
+int32
#else
int
#endif
@@ -1163,10 +1163,10 @@ aic_scsi_cmd(xs)
int s = 0;
int flags;
u_short iobase = aic->iobase;
-
+
SC_DEBUG(sc, SDEV_DB2, ("aic_scsi_cmd\n"));
AIC_TRACE(("aic_scsi_cmd\n"));
- AIC_MISC(("[0x%x, %d]->%d ", (int)xs->cmd->opcode, xs->cmdlen,
+ AIC_MISC(("[0x%x, %d]->%d ", (int)xs->cmd->opcode, xs->cmdlen,
sc->target));
flags = xs->flags;
@@ -1186,7 +1186,7 @@ aic_scsi_cmd(xs)
TAILQ_REMOVE(&aic->free_list, acb, chain);
}
}
-
+
if (acb == NULL) {
xs->error = XS_DRIVER_STUFFUP;
AIC_MISC(("TRY_AGAIN_LATER"));
@@ -1201,7 +1201,7 @@ aic_scsi_cmd(xs)
acb->daddr = xs->data;
acb->dleft = xs->datalen;
acb->stat = 0;
-
+
if (!(flags & SCSI_NOMASK))
s = splbio();
@@ -1228,7 +1228,7 @@ aic_scsi_cmd(xs)
/*
* Adjust transfer size in buffer structure
*/
-void
+void
aic_minphys(bp)
struct buf *bp;
{
@@ -1240,7 +1240,7 @@ aic_minphys(bp)
#ifdef __FreeBSD__
-u_int32
+u_int32
aic_adapter_info(unit)
int unit;
#else
@@ -1310,7 +1310,7 @@ aic_poll(aic, acb)
* Also peek at SSTAT0[SELDO|SELDI] to detect a passing BUSFREE condition.
* No longer detect SCSI RESET or PERR here. They are tested for separately
* in the interrupt handler.
- * Note: If an exception occur at some critical time during the phase
+ * Note: If an exception occur at some critical time during the phase
* determination we'll most likely return something wildly erronous....
*/
static inline u_short
@@ -1323,11 +1323,11 @@ aicphase(aic)
{
register u_short iobase = aic->iobase;
register u_char sstat0, sstat1, scsisig;
-
+
sstat1 = inb(SSTAT1); /* Look for REQINIT (REQ asserted) */
scsisig = inb(SCSISIGI); /* Get the SCSI bus signals */
sstat0 = inb(SSTAT0); /* Get the selection valid status bits */
-
+
if (!(inb(SSTAT0) & (SELDO|SELDI))) /* Selection became invalid? */
return PH_BUSFREE;
@@ -1359,7 +1359,7 @@ aic_sched(aic)
u_short iobase = aic->iobase;
int t, l;
u_char simode0, simode1, scsiseq;
-
+
AIC_TRACE(("aic_sched\n"));
simode0 = ENSELDI;
simode1 = ENSCSIRST|ENSCSIPERR|ENREQINIT;
@@ -1376,7 +1376,7 @@ aic_sched(aic)
TAILQ_REMOVE(&aic->ready_list, acb, chain);
aic->nexus = acb;
aic->state = AIC_SELECTING;
- /*
+ /*
* Start selection process. Always enable
* reselections. Note: we don't have a nexus yet, so
* cannot set aic->state = AIC_HASNEXUS.
@@ -1423,10 +1423,10 @@ aic_done(acb)
AIC_TRACE(("aic_done "));
/*
- * Now, if we've come here with no error code, i.e. we've kept the
+ * Now, if we've come here with no error code, i.e. we've kept the
* initial XS_NOERROR, and the status code signals that we should
- * check sense, we'll need to set up a request sense cmd block and
- * push the command back into the ready queue *before* any other
+ * check sense, we'll need to set up a request sense cmd block and
+ * push the command back into the ready queue *before* any other
* commands for this target/lunit, else we lose the sense info.
* We don't support chk sense conditions for the request sense cmd.
*/
@@ -1457,7 +1457,7 @@ aic_done(acb)
return;
}
}
-
+
if (xs->flags & SCSI_ERR_OK) {
xs->resid = 0;
xs->error = XS_NOERROR;
@@ -1467,7 +1467,7 @@ aic_done(acb)
xs->resid = acb->dleft;
}
xs->flags |= ITSDONE;
-
+
#if AIC_DEBUG
if (aic_debug & AIC_SHOWMISC) {
printf("err=0x%02x ",xs->error);
@@ -1581,19 +1581,19 @@ aic_msgin(aic)
register u_short iobase = aic->iobase;
int spincount, extlen;
u_char sstat1;
-
+
AIC_TRACE(("aic_msgin "));
outb(SCSISIGO, PH_MSGI);
/* Prepare for a new message. A message should (according to the SCSI
- * standard) be transmitted in one single message_in phase.
+ * standard) be transmitted in one single message_in phase.
* If we have been in some other phase, then this is a new message.
*/
if (aic->prevphase != PH_MSGI) {
aic->flags &= ~AIC_DROP_MSGI;
aic->imlen = 0;
}
- /*
- * Read a whole message but the last byte. If we shall reject the
+ /*
+ * Read a whole message but the last byte. If we shall reject the
* message, we shall have to do it, by asserting ATNO, during the
* message transfer phase itself.
*/
@@ -1613,7 +1613,7 @@ aic_msgin(aic)
if (!(aic->flags & AIC_DROP_MSGI)) {
/* Get next message byte */
aic->imess[aic->imlen] = inb(SCSIDAT);
- /*
+ /*
* This testing is suboptimal, but most messages will
* be of the one byte variety, so it should not effect
* performance significantly.
@@ -1642,7 +1642,7 @@ aic_msgin(aic)
aic->imlen++;
/*
- * We expect the bytes in a multibyte message to arrive
+ * We expect the bytes in a multibyte message to arrive
* relatively close in time, a few microseconds apart.
* Therefore we will spinwait for some small amount of time
* waiting for the next byte.
@@ -1659,7 +1659,7 @@ aic_msgin(aic)
return;
}
/* Now we should have a complete message (1 byte, 2 byte and moderately
- * long extended messages). We only handle extended messages which
+ * long extended messages). We only handle extended messages which
* total length is shorter than AIC_MAX_MSG_LEN. Longer messages will
* be amputated. (Return XS_BOBBITT ?)
*/
@@ -1774,7 +1774,7 @@ aic_msgin(aic)
/* Search wait queue for disconnected cmd
* The list should be short, so I haven't bothered with
* any more sophisticated structures than a simple
- * singly linked list.
+ * singly linked list.
*/
lunit = aic->imess[0] & 0x07;
for (acb = aic->nexus_list.tqh_first; acb;
@@ -1821,11 +1821,11 @@ aic_msgin(aic)
/* The message out (and in) stuff is a bit complicated:
- * If the target requests another message (sequence) without
- * having changed phase in between it really asks for a
+ * If the target requests another message (sequence) without
+ * having changed phase in between it really asks for a
* retransmit, probably due to parity error(s).
* The following messages can be sent:
- * IDENTIFY @ These 3 stems from scsi command activity
+ * IDENTIFY @ These 3 stems from scsi command activity
* BUS_DEV_RESET @
* IDENTIFY + SDTR @
* MESSAGE_REJECT if MSGI doesn't make sense
@@ -1845,7 +1845,7 @@ aic_msgout(aic)
struct acb *acb;
u_char dmastat, scsisig;
- /* First determine what to send. If we haven't seen a
+ /* First determine what to send. If we haven't seen a
* phasechange this is a retransmission request.
*/
outb(SCSISIGO, PH_MSGO);
@@ -1896,7 +1896,7 @@ aic_msgout(aic)
}
aic->omp = aic->omess;
} else if (aic->omp == &aic->omess[aic->omlen]) {
- /* Have sent the message at least once, this is a retransmit.
+ /* Have sent the message at least once, this is a retransmit.
*/
AIC_MISC(("retransmitting "));
if (aic->omlen > 1)
@@ -1925,7 +1925,7 @@ aic_msgout(aic)
;
} while (aic->omp != &aic->omess[aic->omlen]);
aic->progress = aic->omp != aic->omess;
- /* We get here in two ways:
+ /* We get here in two ways:
* a) phase != MSGO. Target is probably going to reject our message
* b) aic->omp == &aic->omess[aic->omlen], i.e. the message has been
* transmitted correctly and accepted by the target.
@@ -1976,7 +1976,7 @@ aic_dataout(aic)
outb(SIMODE1, ENPHASEMIS|ENSCSIRST|ENBUSFREE|ENPHASECHG);
/* I have tried to make the main loop as tight as possible. This
- * means that some of the code following the loop is a bit more
+ * means that some of the code following the loop is a bit more
* complex than otherwise.
*/
while (aic->dleft) {
@@ -2045,7 +2045,7 @@ phasechange:
aic->dp -= amount;
AIC_MISC(("+%d ", amount));
}
-
+
outb(DMACNTRL0, RSTFIFO|INTEN);
LOGLINE(aic);
while (inb(SXFRCTL0) & SCSIEN)
@@ -2062,7 +2062,7 @@ phasechange:
* Precondition: The SCSI bus should be in the DIN phase, with REQ asserted
* and ACK deasserted (i.e. at least one byte is ready).
* For now, uses a pretty dumb algorithm, hangs around until all data has been
- * transferred. This, is OK for fast targets, but not so smart for slow
+ * transferred. This, is OK for fast targets, but not so smart for slow
* targets which don't disconnect or for huge transfers.
*/
void
@@ -2078,7 +2078,7 @@ aic_datain(aic)
struct acb *acb = aic->nexus;
int amount, olddleft = aic->dleft;
#define DINAMOUNT 128 /* Default amount of data to transfer */
-
+
/* Enable DATA IN transfers */
outb(SCSISIGO, PH_DIN);
outb(CLRSINT1, CLRPHASECHG);
@@ -2154,7 +2154,7 @@ aic_datain(aic)
aic->progress = olddleft != aic->dleft;
/* Some SCSI-devices are rude enough to transfer more data than what
- * was requested, e.g. 2048 bytes from a CD-ROM instead of the
+ * was requested, e.g. 2048 bytes from a CD-ROM instead of the
* requested 512. Test for progress, i.e. real transfers. If no real
* transfers have been performed (acb->dleft is probably already zero)
* and the FIFO is not empty, waste some bytes....
@@ -2193,7 +2193,7 @@ aic_datain(aic)
* 2) doesn't support synchronous transfers properly (yet)
*/
-int
+int
#ifdef __FreeBSD__
aicintr(int unit)
#else
@@ -2216,14 +2216,14 @@ aicintr(aic)
LOGLINE(aic);
- /* Clear INTEN. This is important if we're running with edge
+ /* Clear INTEN. This is important if we're running with edge
* triggered interrupts as we don't guarantee that all interrupts will
* be served during one single invocation of this routine, i.e. we may
* need another edge.
*/
outb(DMACNTRL0, 0);
AIC_TRACE(("aicintr\n"));
-
+
/*
* 1st check for abnormal conditions, such as reset or parity errors
*/
@@ -2241,18 +2241,18 @@ aicintr(aic)
outb(CLRSINT1, CLRSCSIPERR);
if (aic->prevphase == PH_MSGI)
aic_sched_msgout(SEND_PARITY_ERROR);
- else
+ else
aic_sched_msgout(SEND_INIT_DET_ERR);
}
}
- /*
+ /*
* If we're not already busy doing something test for the following
* conditions:
* 1) We have been reselected by something
* 2) We have selected something successfully
* 3) Our selection process has timed out
- * 4) This is really a bus free interrupt just to get a new command
+ * 4) This is really a bus free interrupt just to get a new command
* going?
* 5) Spurious interrupt?
*/
@@ -2270,7 +2270,7 @@ aicintr(aic)
* queue.
*/
AIC_MISC(("reselect "));
- /* If we're trying to select a target ourselves,
+ /* If we're trying to select a target ourselves,
* push our command back into the rdy list.
*/
if (aic->state == AIC_SELECTING) {
@@ -2351,7 +2351,7 @@ aicintr(aic)
sstat0 = inb(SSTAT0);
if (sstat0 & SELDO) { /* Still selected!? */
outb(SIMODE0, 0);
- outb(SIMODE1, ENSCSIRST|ENSCSIPERR|
+ outb(SIMODE1, ENSCSIRST|ENSCSIPERR|
ENBUSFREE|ENREQINIT);
aic->state = AIC_HASNEXUS;
aic->flags = 0;
@@ -2378,7 +2378,7 @@ aicintr(aic)
return 1;
} else if (sstat1 & SELTO) {
/* Selection timed out. What to do:
- * Disable selections out and fail the command with
+ * Disable selections out and fail the command with
* code XS_TIMEOUT.
*/
acb = aic->nexus;
@@ -2413,7 +2413,7 @@ aicintr(aic)
}
}
/* Driver is now in state AIC_HASNEXUS, i.e. we have a current command
- * working the SCSI bus.
+ * working the SCSI bus.
*/
acb = aic->nexus;
if (aic->state != AIC_HASNEXUS || acb == NULL) {
@@ -2421,7 +2421,7 @@ aicintr(aic)
Debugger("aic6360");
fatal_if_no_DDB();
}
-
+
/* What sort of transfer does the bus signal? */
aic->phase = aicphase(aic);
if (!(aic->phase & PH_PSBIT)) /* not a pseudo phase */
@@ -2659,7 +2659,7 @@ aic_dump6360()
printf(" SIMODE0=%x SIMODE1=%x DMACNTRL0=%x DMACNTRL1=%x DMASTAT=%x\n",
inb(SIMODE0), inb(SIMODE1), inb(DMACNTRL0), inb(DMACNTRL1),
inb(DMASTAT));
- printf(" FIFOSTAT=%d SCSIBUS=0x%x\n",
+ printf(" FIFOSTAT=%d SCSIBUS=0x%x\n",
inb(FIFOSTAT), inb(SCSIBUS));
}
@@ -2673,7 +2673,7 @@ aic_dump_driver()
#endif
struct aic_tinfo *ti;
int i;
-
+
printf("nexus=%x phase=%x prevphase=%x\n", aic->nexus, aic->phase,
aic->prevphase);
printf("state=%x msgin=%x msgpriq=%x msgout=%x imlen=%d omlen=%d\n",
diff --git a/sys/i386/isa/aic7770.c b/sys/i386/isa/aic7770.c
index 2cfb904..ce4f948 100644
--- a/sys/i386/isa/aic7770.c
+++ b/sys/i386/isa/aic7770.c
@@ -19,7 +19,7 @@
* 4. Modifications may be freely made to this file if the above conditions
* are met.
*
- * $Id: aic7770.c,v 1.12 1995/03/31 13:36:57 gibbs Exp $
+ * $Id: aic7770.c,v 1.13 1995/04/12 20:47:36 wollman Exp $
*/
#include <sys/param.h>
@@ -32,16 +32,16 @@
#include <machine/cpufunc.h>
#include <i386/scsi/aic7xxx.h>
-int aic7770probe __P((struct isa_device *dev));
+int aic7770probe __P((struct isa_device *dev));
int aic7770_attach __P((struct isa_device *dev));
-/*
+/*
* Standard EISA Host ID regs (Offset from slot base)
*/
#define HID0 0xC80 /* 0,1: msb of ID2, 2-7: ID1 */
-#define HID1 0xC81 /* 0-4: ID3, 5-7: LSB ID2 */
-#define HID2 0xC82 /* product */
+#define HID1 0xC81 /* 0-4: ID3, 5-7: LSB ID2 */
+#define HID2 0xC82 /* product */
#define HID3 0xC83 /* firmware revision */
#define CHAR1(B1,B2) (((B1>>2) & 0x1F) | '@')
@@ -78,11 +78,11 @@ aic7770_registerdev(struct isa_device *id)
kdc_aic7770[id->id_unit].kdc_unit = id->id_unit;
kdc_aic7770[id->id_unit].kdc_parentdata = id;
dev_attach(&kdc_aic7770[id->id_unit]);
-}
+}
int
aic7770probe(struct isa_device *dev)
-{
+{
u_long port;
int i;
u_char sig_id[4];
@@ -101,7 +101,7 @@ aic7770probe(struct isa_device *dev)
port = 0x1000 * ahc_slot;
for( i = 0; i < sizeof(sig_id); i++ )
{
- /*
+ /*
* An outb is required to prime these registers on
* VL cards
*/
@@ -124,13 +124,13 @@ aic7770probe(struct isa_device *dev)
#ifndef DEV_LKM
aic7770_registerdev(dev);
#endif /* DEV_LKM */
- if(ahcprobe(unit, port,
- valid_ids[i].type)){
+ if(ahcprobe(unit, port,
+ valid_ids[i].type)){
/*
- * If it's there, put in it's
+ * If it's there, put in it's
* interrupt vectors
*/
- dev->id_irq = (1 <<
+ dev->id_irq = (1 <<
ahcdata[unit]->vect);
dev->id_drq = -1; /* EISA dma */
ahc_unit++;
diff --git a/sys/i386/isa/b004.c b/sys/i386/isa/b004.c
index 654d04d..92757f3 100644
--- a/sys/i386/isa/b004.c
+++ b/sys/i386/isa/b004.c
@@ -50,7 +50,7 @@
#include <sys/param.h>
#include <sys/systm.h> /* for min(), SELWAIT */
-/* #include "proc.h" /* for pid_t */
+/* #include "proc.h" /* for pid_t */
/* #include "user.h" */
/* #include "buf.h" */
/* #include "kernel.h" */
@@ -76,7 +76,7 @@ static struct kern_devconf kdc_bqu[NBQU] = { {
DC_CLS_MISC
} };
-#define IOCTL_OUT(arg, ret) *(int*)arg = ret
+#define IOCTL_OUT(arg, ret) *(int*)arg = ret
#define B004PRI (PZERO+8)
@@ -85,7 +85,7 @@ static struct kern_devconf kdc_bqu[NBQU] = { {
/*
* Define these symbols if you want to debug the code.
*/
-#undef B004_DEBUG
+#undef B004_DEBUG
#undef B004_DEBUG_2
#ifdef B004_DEBUG
@@ -231,7 +231,7 @@ bquanalyse( const int dev_min )
* If the interface is still not ready, repeats as above incrementing NO.
* Once almost one byte is read N0 is set to 1.
* If B004_TIMEOUT != 0 and the link-interface is not ready for more than
- * B004_TIMEOUT ticks read aborts returnig with the number of bytes read
+ * B004_TIMEOUT ticks read aborts returnig with the number of bytes read
* or with an error if no byte was read.
*
* By default, B004_TIMEOUT is = 0 (read is blocking)
@@ -277,7 +277,7 @@ bquread(dev_t dev, struct uio *uio, int flag)
"push %%es\n\t"
"movw %%ss, %%ax\n\t" /** prepare ES, DF for transfer */
"movw %%ax, %%es\n\t"
- "cld\n\t"
+ "cld\n\t"
"movb $1, %%ah\n\t"
"1:\tinb %%dx, %%al\n\t"
@@ -298,7 +298,7 @@ bquread(dev_t dev, struct uio *uio, int flag)
if (inb(isr)&B004_READBYTE) *p++ =(char) inb(idr);
#endif
if (last!=p) {
- sleep_ticks = 0;
+ sleep_ticks = 0;
} else {
/*** no new data read, must sleep ***/
sleep_ticks= (sleep_ticks<20 ? sleep_ticks+1 : sleep_ticks);
@@ -371,7 +371,7 @@ bquwrite(dev_t dev, struct uio *uio, int flag)
"push %%ds\n\t"
"movw %%ss, %%ax\n\t" /** prepare DS, DF for transfer */
"movw %%ax, %%ds\n\t"
- "cld\n\t"
+ "cld\n\t"
"movb $1, %%ah\n\t"
"movw $100, %%di\n\t"
@@ -487,7 +487,7 @@ bquselect(dev_t dev, int rw, struct proc *p)
* - set timeout
*/
-int
+int
bquioctl(dev_t dev, int cmd, caddr_t addr, int flag, struct proc *p)
{
unsigned int dev_min = minor(dev) & 7;
@@ -509,10 +509,10 @@ bquioctl(dev_t dev, int cmd, caddr_t addr, int flag, struct proc *p)
DEB(printf("B004 ioctl B004RESET, done\n" );)
break;
case B004WRITEABLE: /* can we write a byte to the C012 ? */
- IOCTL_OUT (addr, ((in(B004_OSR(dev_min))&B004_WRITEBYTE) != 0 ));
+ IOCTL_OUT (addr, ((in(B004_OSR(dev_min))&B004_WRITEBYTE) != 0 ));
break;
case B004READABLE: /* can we read a byte from C012 ? */
- IOCTL_OUT (addr, ((in(B004_ISR(dev_min)) & B004_READBYTE) != 0 ));
+ IOCTL_OUT (addr, ((in(B004_ISR(dev_min)) & B004_READBYTE) != 0 ));
break;
case B004ANALYSE: /* switch transputer to analyse mode */
bquanalyse(dev_min);
diff --git a/sys/i386/isa/b004.h b/sys/i386/isa/b004.h
index 8c82eda..ee80d46 100644
--- a/sys/i386/isa/b004.h
+++ b/sys/i386/isa/b004.h
@@ -46,22 +46,22 @@
/*
* device status FLAGS
*/
-#define B004_EXIST 0x0001 /* Is a B004-Board with at least one
+#define B004_EXIST 0x0001 /* Is a B004-Board with at least one
Transputer present ? */
#define B004_BUSY 0x0002 /* Is the B004-board in use ? */
/*
* IOCTL numbers
*/
-#define B004RESET _IO ('Q', 0)
+#define B004RESET _IO ('Q', 0)
/* Reset transputer(s) */
-#define B004WRITEABLE _IOR ('Q', 1, int)
+#define B004WRITEABLE _IOR ('Q', 1, int)
/* Return C012 Output Ready */
-#define B004READABLE _IOR ('Q', 2, int)
+#define B004READABLE _IOR ('Q', 2, int)
/* Return C012 Data Present */
-#define B004ANALYSE _IO ('Q', 3)
+#define B004ANALYSE _IO ('Q', 3)
/* Switch transputer(s) to ANALYSE mode */
-#define B004ERROR _IOR ('Q', 4, int)
+#define B004ERROR _IOR ('Q', 4, int)
/* Return 1 on ERROR set */
#define B004TIMEOUT _IOW ('Q', 5, int)
/* Set TIMEOUT for subsequent writing or
diff --git a/sys/i386/isa/bt742a.c b/sys/i386/isa/bt742a.c
index b2fed05..cda418b 100644
--- a/sys/i386/isa/bt742a.c
+++ b/sys/i386/isa/bt742a.c
@@ -12,13 +12,13 @@
* on the understanding that TFS is not responsible for the correct
* functioning of this software in any circumstances.
*
- * $Id: bt742a.c,v 1.34 1995/04/23 21:58:35 gibbs Exp $
+ * $Id: bt742a.c,v 1.35 1995/05/11 19:26:16 rgrimes Exp $
*/
/*
* Bulogic/Bustek 32 bit Addressing Mode SCSI driver.
*
- * NOTE: 1. Some bt5xx card can NOT handle 32 bit addressing mode.
+ * NOTE: 1. Some bt5xx card can NOT handle 32 bit addressing mode.
* 2. OLD bt445s Revision A,B,C,D(nowired) + any firmware version
* has broken busmaster for handling 32 bit addressing on H/W bus
* side.
@@ -599,7 +599,7 @@ bt_cmd(unit, icnt, ocnt, wait, retval, opcode, args)
}
if (i == 0) {
if(!btprobing)
- printf("bt%d: bt_cmd, host not finished(0x%x)\n",
+ printf("bt%d: bt_cmd, host not finished(0x%x)\n",
unit, sts);
return (ENXIO);
}
@@ -693,7 +693,7 @@ btattach(dev)
{
int unit = dev->id_unit;
struct bt_data *bt = btdata[unit];
-
+
btprobing = 0;
/*
* fill in the prototype scsi_link.
@@ -717,7 +717,7 @@ btattach(dev)
* Return some information to the caller about the adapter and its
* capabilities.
*/
-u_int32
+u_int32
bt_adapter_info(unit)
int unit;
{
@@ -745,7 +745,7 @@ btintr(unit)
/*
* First acknowlege the interrupt, Then if it's
* not telling about a completed operation
- * just return.
+ * just return.
*/
stat = inb(BT_INTR_PORT);
@@ -824,7 +824,7 @@ btintr(unit)
,wmbi->stat, wmbi);
printf("addr = 0x%x\n", ccb);
}
-#endif
+#endif
}
wmbi->stat = BT_MBI_FREE;
if (ccb) {
@@ -885,7 +885,7 @@ bt_free_ccb(unit, ccb, flags)
}
/*
- * Get a free ccb
+ * Get a free ccb
*
* If there are none, see if we can allocate a new one. If so, put it in
* the hash table too otherwise either return an error or sleep.
@@ -968,7 +968,7 @@ bt_ccb_phys_kv(bt, ccb_phys)
}
/*
- * Get a MBO and then Send it
+ * Get a MBO and then Send it
*/
BT_MBO *
bt_send_mbo(int unit, int flags, int cmd, struct bt_ccb *ccb)
@@ -988,7 +988,7 @@ bt_send_mbo(int unit, int flags, int cmd, struct bt_ccb *ccb)
wmbx->tmbo = (wmbo == &(wmbx->mbo[BT_MBX_SIZE - 1]) ?
&(wmbx->mbo[0]) : wmbo + 1);
- /*
+ /*
* Check the outmail box is free or not.
* Note: Under the normal operation, it shuld NOT happen to wait.
*/
@@ -1102,7 +1102,7 @@ bt_init(unit)
struct bt_board_info binfo;
/*
- * reset board, If it doesn't respond, assume
+ * reset board, If it doesn't respond, assume
* that it's not there.. good for the probe
*/
@@ -1131,7 +1131,7 @@ bt_init(unit)
*/
i = bt_cmd(unit, 1, sizeof(binfo),0,
&binfo,BT_GET_BOARD_INFO,sizeof(binfo));
- if(i)
+ if(i)
return i;
printf("bt%d: Bt%c%c%c%c/%c%d-", unit,
binfo.id[0],
@@ -1152,10 +1152,10 @@ bt_init(unit)
switch (info.bus_type) {
case BT_BUS_TYPE_24bit: /* PC/AT 24 bit address bus */
printf("ISA(24bit) bus\n");
- break;
+ break;
case BT_BUS_TYPE_32bit: /* EISA/VLB/PCI 32 bit bus */
printf("PCI/EISA/VLB(32bit) bus\n");
- break;
+ break;
case BT_BUS_TYPE_MCA: /* forget it right now */
printf("MCA bus architecture...");
printf("giving up\n");
@@ -1170,7 +1170,7 @@ bt_init(unit)
if ( binfo.id[0] == '5' ) {
printf("bt%d: This driver is designed for using 32 bit addressing\n",unit);
printf("bt%d: mode firmware and EISA/PCI/VLB bus architectures\n",unit);
- printf("bt%d: Bounce-buffering will be used (and is necessary)\n", unit);
+ printf("bt%d: Bounce-buffering will be used (and is necessary)\n", unit);
printf("bt%d: if you have more than 16MBytes memory.\n",unit);
} else if ( info.bus_type == BT_BUS_TYPE_24bit ) {
printf("bt%d: Your board should report a 32bit bus architecture type..\n",unit);
@@ -1247,7 +1247,7 @@ bt_init(unit)
/* who are we on the scsi bus */
bt->bt_scsi_dev = conf.scsi_dev;
/*
- * Initialize mail box
+ * Initialize mail box
*/
*((physaddr *) ad) = KVTOPHYS(&bt->bt_mbx);
bt_cmd(unit, 5, 0, 0, 0, BT_MBX_INIT_EXTENDED
@@ -1307,7 +1307,7 @@ bt_inquire_setup_information(
* Get a SCSI Synchronous value
*/
if ( info->s.sync ) {
- bt_cmd(unit, 1, sizeof(sync), 100,
+ bt_cmd(unit, 1, sizeof(sync), 100,
&sync,BT_GET_SYNC_VALUE,sizeof(sync));
}
@@ -1359,7 +1359,7 @@ bt_inquire_setup_information(
/*
* Displayi SCSI negotiation value by each target.
- * amurai@spec.co.jp
+ * amurai@spec.co.jp
*/
for (i = 0; i < 8; i++) {
if (!setup.sync[i].valid )
@@ -1377,9 +1377,9 @@ bt_inquire_setup_information(
}
}
- /*
+ /*
* Enable round-robin scheme - appeared at firmware rev. 3.31
- * Below rev 3.XX firmware has a problem for issuing
+ * Below rev 3.XX firmware has a problem for issuing
* BT_ROUND_ROBIN command amurai@spec.co.jp
*/
if ( bID.firm_revision >= '3' ) {
@@ -1395,7 +1395,7 @@ bt_inquire_setup_information(
#define min(x,y) (x < y ? x : y)
#endif /* min */
-void
+void
btminphys(bp)
struct buf *bp;
{
@@ -1408,7 +1408,7 @@ btminphys(bp)
* start a scsi operation given the command and the data address. Also needs
* the unit, target and lu.
*/
-int32
+int32
bt_scsi_cmd(xs)
struct scsi_xfer *xs;
{
@@ -1512,8 +1512,8 @@ bt_scsi_cmd(xs)
nextphys = thisphys;
while ((datalen) && (thisphys == nextphys))
/*
- * This page is contiguous (physically) with
- * the the last, just extend the length
+ * This page is contiguous (physically) with
+ * the the last, just extend the length
*/
{
/* how far to the end of the page */
@@ -1589,7 +1589,7 @@ bt_scsi_cmd(xs)
/*
* Poll a particular unit, looking for a particular xs
*/
-int
+int
bt_poll(unit, xs, ccb)
int unit;
struct scsi_xfer *xs;
@@ -1700,7 +1700,7 @@ bt_timeout(void *arg1)
ccb->xfer->retries = 0; /* I MEAN IT ! */
ccb->host_stat = BT_ABORTED;
bt_done(unit, ccb);
- } else {
+ } else {
/* abort the operation that has timed out */
printf("bt%d: Try to abort\n", unit);
bt_send_mbo(unit, ~SCSI_NOMASK,
diff --git a/sys/i386/isa/clock.c b/sys/i386/isa/clock.c
index 196d34c..e1bc372 100644
--- a/sys/i386/isa/clock.c
+++ b/sys/i386/isa/clock.c
@@ -34,7 +34,7 @@
* SUCH DAMAGE.
*
* from: @(#)clock.c 7.2 (Berkeley) 5/12/91
- * $Id: clock.c,v 1.32 1995/03/16 18:11:58 bde Exp $
+ * $Id: clock.c,v 1.33 1995/05/11 07:44:40 bde Exp $
*/
/*
@@ -193,7 +193,7 @@ int
acquire_timer0(int rate, void (*function) __P((struct clockframe *frame)))
{
if (timer0_state || TIMER_DIV(rate) < TIMER0_MIN_MAX_COUNT ||
- !function)
+ !function)
return -1;
new_function = function;
new_rate = rate;
@@ -204,7 +204,7 @@ acquire_timer0(int rate, void (*function) __P((struct clockframe *frame)))
int
acquire_timer2(int mode)
{
- if (timer2_state)
+ if (timer2_state)
return -1;
timer2_state = 1;
outb(TIMER_MODE, TIMER_SEL2 | (mode &0x3f));
@@ -265,7 +265,7 @@ printrtc(void)
#endif
static int
-getit()
+getit()
{
int high, low;
@@ -307,7 +307,7 @@ calibrate_cyclecounter(void)
/*
* Wait "n" microseconds.
- * Relies on timer 1 counting down from (TIMER_FREQ / hz)
+ * Relies on timer 1 counting down from (TIMER_FREQ / hz)
* Note: timer had better have been programmed before this is first used!
*/
void
@@ -339,7 +339,7 @@ DELAY(int n)
prev_tick = getit(0, 0);
n -= 20;
/*
- * Calculate (n * (TIMER_FREQ / 1e6)) without using floating point
+ * Calculate (n * (TIMER_FREQ / 1e6)) without using floating point
* and without any avoidable overflows.
*/
sec = n / 1000000;
@@ -375,11 +375,11 @@ sysbeepstop(void *chan)
beeping = 0;
}
-int
+int
sysbeep(int pitch, int period)
{
- if (acquire_timer2(TIMER_SQWAVE|TIMER_16BIT))
+ if (acquire_timer2(TIMER_SQWAVE|TIMER_16BIT))
return -1;
disable_intr();
outb(TIMER_CNTR2, pitch);
@@ -426,7 +426,7 @@ readrtc(int port)
* XXX initialization of other timers is unintentionally left blank.
*/
void
-startrtclock()
+startrtclock()
{
timer0_max_count = hardclock_max_count = TIMER_DIV(hz);
timer0_overflow_threshold = timer0_max_count - TIMER0_LATCH_COUNT;
diff --git a/sys/i386/isa/cronyx.c b/sys/i386/isa/cronyx.c
index 941daf9..391376e 100644
--- a/sys/i386/isa/cronyx.c
+++ b/sys/i386/isa/cronyx.c
@@ -223,7 +223,7 @@ static int cx_probe_chip (int base)
newrev = inb (GFRCR(base));
if (newrev != rev)
return (0); /* revision changed */
-
+
/* Yes, we really have CD2400 chip here. */
return (1);
}
@@ -872,7 +872,7 @@ void cx_clock (long hz, long ba, int *clk, int *div)
}
}
/* Incorrect baud rate. Return some meaningful values. */
- *clk = 0;
+ *clk = 0;
*div = 255;
}
@@ -889,7 +889,7 @@ cx_chan_opt_t chan_opt_dflt = { /* mode-independent options */
0, /* don't detect 1 to 0 on CTS */
1, /* detect 1 to 0 on CD */
0, /* detect 1 to 0 on DSR */
- },
+ },
{ /* cor5 */
0, /* receive flow control FIFO threshold */
0,
@@ -920,7 +920,7 @@ cx_opt_async_t opt_async_dflt = { /* default async options */
0, /* don't ignore parity */
PARM_NOPAR, /* no parity */
PAR_EVEN, /* even parity */
- },
+ },
{ /* cor2 */
0, /* disable automatic DSR */
1, /* enable automatic CTS */
@@ -930,7 +930,7 @@ cx_opt_async_t opt_async_dflt = { /* default async options */
0, /* disable embedded cmds */
0, /* disable XON/XOFF */
0, /* disable XANY */
- },
+ },
{ /* cor3 */
STOPB_1, /* 1 stop bit */
0,
@@ -992,7 +992,7 @@ cx_opt_bisync_t opt_bisync_dflt = { /* default bisync options */
0, /* don't ignore parity */
PARM_NOPAR, /* no parity */
PAR_EVEN, /* even parity */
- },
+ },
{ /* cor2 */
3-2, /* send three SYN chars */
CRC_DONT_INVERT,/* don't invert CRC (CRC-16) */
@@ -1020,7 +1020,7 @@ cx_opt_x21_t opt_x21_dflt = { /* default x21 options */
0, /* don't ignore parity */
PARM_NOPAR, /* no parity */
PAR_EVEN, /* even parity */
- },
+ },
{ /* cor2 */
0,
0, /* disable embedded transmitter cmds */
diff --git a/sys/i386/isa/ctx.c b/sys/i386/isa/ctx.c
index 3c7f1f3..1124471 100644
--- a/sys/i386/isa/ctx.c
+++ b/sys/i386/isa/ctx.c
@@ -8,7 +8,7 @@
* of this software, nor does the author assume any responsibility
* for damages incurred with its use.
*
- * $Id: ctx.c,v 1.4 1994/10/23 21:27:11 wollman Exp $
+ * $Id: ctx.c,v 1.5 1995/04/12 20:47:40 wollman Exp $
*/
/*
@@ -59,7 +59,7 @@
* the benefits to me are great (I need more than one board
* in my machine, and 0xE0000 is the only address choice that
* doesn't conflict with anything) so I adopt this strategy here.
- *
+ *
* XXX-Note... this driver has only been tested for the
* XXX base = 0xE0000 case!
*
@@ -175,7 +175,7 @@ ctx_registerdev(struct isa_device *id)
dev_attach(&kdc_ctx[id->id_unit]);
}
-int
+int
ctxprobe(struct isa_device * devp)
{
int status;
@@ -189,7 +189,7 @@ ctxprobe(struct isa_device * devp)
return (status);
}
-int
+int
ctxattach(struct isa_device * devp)
{
struct ctx_soft_registers *sr;
@@ -205,7 +205,7 @@ ctxattach(struct isa_device * devp)
return (1);
}
-int
+int
ctxopen(dev_t dev, int flag)
{
struct ctx_soft_registers *sr;
@@ -261,7 +261,7 @@ ctxopen(dev_t dev, int flag)
return (0); /* successful open. All ready to go. */
}
-int
+int
ctxclose(dev_t dev, int flag)
{
int unit;
@@ -274,7 +274,7 @@ ctxclose(dev_t dev, int flag)
return (0);
}
-int
+int
ctxwrite(dev_t dev, struct uio * uio)
{
int unit, status = 0;
@@ -319,7 +319,7 @@ ctxwrite(dev_t dev, struct uio * uio)
return (status);
}
-int
+int
ctxread(dev_t dev, struct uio * uio)
{
int unit, status = 0;
@@ -362,7 +362,7 @@ ctxread(dev_t dev, struct uio * uio)
return (status);
}
-int
+int
ctxioctl(dev_t dev, int cmd, caddr_t data, int flag)
{
int error;
@@ -425,7 +425,7 @@ ctxioctl(dev_t dev, int cmd, caddr_t data, int flag)
return (error);
}
-int
+int
waitvb(short port)
{ /* wait for a vertical blank, */
if (inb(port) == 0xff) /* 0xff means no board present */
diff --git a/sys/i386/isa/ctxreg.h b/sys/i386/isa/ctxreg.h
index 28b644a..043bb15 100644
--- a/sys/i386/isa/ctxreg.h
+++ b/sys/i386/isa/ctxreg.h
@@ -1,13 +1,13 @@
/*
*
- * Copyright (C) 1994, Paul S. LaFollette, Jr. This software may be used,
- * modified, copied, distributed, and sold, in both source and binary form
- * provided that the above copyright and these terms are retained. Under
+ * Copyright (C) 1994, Paul S. LaFollette, Jr. This software may be used,
+ * modified, copied, distributed, and sold, in both source and binary form
+ * provided that the above copyright and these terms are retained. Under
* no circumstances is the author responsible for the proper functioning
* of this software, nor does the author assume any responsibility
* for damages incurred with its use
*
- * $Id$
+ * $Id: ctxreg.h,v 1.1 1994/10/01 17:59:42 davidg Exp $
*/
/*
diff --git a/sys/i386/isa/cx.c b/sys/i386/isa/cx.c
index c075baa..c66f645 100644
--- a/sys/i386/isa/cx.c
+++ b/sys/i386/isa/cx.c
@@ -93,7 +93,7 @@ int cxopen (dev_t dev, int flag, int mode, struct proc *p)
unsigned short port;
struct tty *tp;
int error = 0;
-
+
if (unit == UNIT_CTL) {
print (("cx: cxopen /dev/cronyx\n"));
return (0);
@@ -226,7 +226,7 @@ int cxclose (dev_t dev, int flag, int mode, struct proc *p)
cx_chan_t *c = cxchan[unit];
struct tty *tp;
int s;
-
+
if (unit == UNIT_CTL)
return (0);
tp = c->ttyp;
@@ -260,18 +260,18 @@ int cxread (dev_t dev, struct uio *uio, int flag)
{
int unit = UNIT (dev);
struct tty *tp;
-
+
if (unit == UNIT_CTL)
return (EIO);
tp = cxchan[unit]->ttyp;
return ((*linesw[tp->t_line].l_read) (tp, uio, flag));
}
-
+
int cxwrite (dev_t dev, struct uio *uio, int flag)
{
int unit = UNIT (dev);
struct tty *tp;
-
+
if (unit == UNIT_CTL)
return (EIO);
tp = cxchan[unit]->ttyp;
@@ -569,7 +569,7 @@ int cxparam (struct tty *tp, struct termios *t)
unsigned short port = c->chip->port;
int clock, period, s;
cx_cor1_async_t cor1;
-
+
if (t->c_ospeed == 0) {
/* Clear DTR and RTS. */
s = spltty ();
@@ -684,7 +684,7 @@ struct tty *cxdevtotty (dev_t dev)
return (cxchan[unit]->ttyp);
}
-
+
int cxselect (dev_t dev, int flag, struct proc *p)
{
int unit = UNIT (dev);
diff --git a/sys/i386/isa/cxreg.h b/sys/i386/isa/cxreg.h
index 491c7fb..df1f743 100644
--- a/sys/i386/isa/cxreg.h
+++ b/sys/i386/isa/cxreg.h
@@ -29,7 +29,7 @@
#define BCR1(p) ((p) | 0x2000) /* board command register 1, write only */
/*
- * Chip register address, B is chip base port, R is chip register number.
+ * Chip register address, B is chip base port, R is chip register number.
*/
#define R(b,r) ((b) | (((r)<<6 & 0x3c00) | ((r) & 0xf)))
diff --git a/sys/i386/isa/cy.c b/sys/i386/isa/cy.c
index a37292e..fd898f2 100644
--- a/sys/i386/isa/cy.c
+++ b/sys/i386/isa/cy.c
@@ -27,7 +27,7 @@
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
- * $Id: cy.c,v 1.5 1995/03/28 07:55:25 bde Exp $
+ * $Id: cy.c,v 1.6 1995/03/28 12:29:11 bde Exp $
*/
/*
@@ -99,7 +99,7 @@
#define PollMode /* use polling-based irq service routine, not the
* hardware svcack lines. Must be defined for
* cyclom-16y boards.
- *
+ *
* XXX cyclom-8y doesn't work without this defined
* either (!)
*/
@@ -172,7 +172,7 @@ void delay(int delay);
/* Better get rid of this until the core people agree on kernel interfaces.
At least it will then compile on both WhichBSDs.
- */
+ */
#if 0
extern unsigned int delaycount; /* calibrated 1 ms cpu-spin delay */
#endif
@@ -546,7 +546,7 @@ service_upper_rx(int unit)
#ifdef FastRawInput
/* try to avoid calling the line discipline stuff if we can */
if ((tp->t_line == 0) &&
- !(tp->t_iflag & (ICRNL | IMAXBEL | INLCR)) &&
+ !(tp->t_iflag & (ICRNL | IMAXBEL | INLCR)) &&
!(tp->t_lflag & (ECHO | ECHONL | ICANON | IEXTEN |
ISIG | PENDIN)) &&
!(tp->t_state & (TS_CNTTB | TS_LNCH))) {
@@ -1321,11 +1321,11 @@ cyparam(struct tty *tp, struct termios *t)
if (iflag & IXOFF)
opt |= 1 << 6; /* auto XOFF output flow-control */
#endif
-#ifndef ALWAYS_RTS_CTS
+#ifndef ALWAYS_RTS_CTS
if (cflag & CCTS_OFLOW)
#endif
opt |= 1 << 1; /* auto CTS flow-control */
-
+
if (opt != infop->cor[1]) {
cor_change |= 1 << 2;
*(base + CD1400_COR2) = opt;
@@ -1560,7 +1560,7 @@ cyspeed(int speed, int *prescaler_io)
static void
cd1400_channel_cmd(cy_addr base, u_char cmd)
{
- /* XXX hsu@clinet.fi: This is always more dependent on ISA bus speed,
+ /* XXX hsu@clinet.fi: This is always more dependent on ISA bus speed,
as the card is probed every round? Replaced delaycount with 8k.
Either delaycount has to be implemented in FreeBSD or more sensible
way of doing these should be implemented. DELAY isn't enough here.
@@ -1570,7 +1570,7 @@ cd1400_channel_cmd(cy_addr base, u_char cmd)
/* wait for processing of previous command to complete */
while (*(base + CD1400_CCR) && maxwait--)
;
-
+
if (!maxwait)
log(LOG_ERR, "cy: channel command timeout (%d loops) - arrgh\n",
5 * 8 * 1024);
diff --git a/sys/i386/isa/elink.c b/sys/i386/isa/elink.c
index 4bf0016..07b2516 100644
--- a/sys/i386/isa/elink.c
+++ b/sys/i386/isa/elink.c
@@ -26,7 +26,7 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
- * $Id: elink.c,v 1.3 1994/09/17 16:51:47 se Exp $
+ * $Id: elink.c,v 1.4 1995/02/26 05:14:46 bde Exp $
*/
/*
@@ -47,7 +47,7 @@
*/
void
elink_reset()
-{
+{
static int x = 0;
if (x == 0) {
diff --git a/sys/i386/isa/fd.c b/sys/i386/isa/fd.c
index 49d7fdc..be36035 100644
--- a/sys/i386/isa/fd.c
+++ b/sys/i386/isa/fd.c
@@ -43,7 +43,7 @@
* SUCH DAMAGE.
*
* from: @(#)fd.c 7.4 (Berkeley) 5/25/91
- * $Id: fd.c,v 1.59 1995/05/06 19:34:25 joerg Exp $
+ * $Id: fd.c,v 1.60 1995/05/09 12:25:52 rgrimes Exp $
*
*/
@@ -370,7 +370,7 @@ fdc_err(fdcu_t fdcu, const char *s)
else if(fdc_data[fdcu].fdc_errs == FDC_ERRMAX)
printf("fdc%d: too many errors, not logging any more\n",
fdcu);
-
+
return FD_FAILED;
}
@@ -378,7 +378,7 @@ fdc_err(fdcu_t fdcu, const char *s)
* fd_cmd: Send a command to the chip. Takes a varargs with this structure:
* Unit number,
* # of output bytes, output bytes as ints ...,
- * # of input bytes, input bytes as ints ...
+ * # of input bytes, input bytes as ints ...
*/
int
@@ -604,7 +604,7 @@ fdattach(struct isa_device *dev)
unithasfd = 1;
if (ftattach(dev, fdup, unithasfd))
continue;
- if (fdsu < DRVS_PER_CTLR)
+ if (fdsu < DRVS_PER_CTLR)
fd->type = NO_TYPE;
#endif
continue;
@@ -683,9 +683,9 @@ fdattach(struct isa_device *dev)
break; /* already probed succesfully */
}
}
-
+
set_motor(fdcu, fdsu, TURNOFF);
-
+
if (st0 & NE7_ST0_EC) /* no track 0 -> no drive present */
continue;
@@ -694,13 +694,13 @@ fdattach(struct isa_device *dev)
fd->fdsu = fdsu;
fd->options = 0;
printf("fd%d: ", fdu);
-
+
fd_registerdev(fdcu, fdu);
switch (fdt) {
case RTCFDT_12M:
printf("1.2MB 5.25in\n");
fd->type = FD_1200;
- kdc_fd[fdu].kdc_description =
+ kdc_fd[fdu].kdc_description =
"1.2MB (1200K) 5.25in floppy disk drive";
#ifdef DEVFS
sprintf(name,"fd%d.1200",fdu);
@@ -787,9 +787,9 @@ set_motor(fdcu_t fdcu, int fdsu, int turnon)
{
int fdout = fdc_data[fdcu].fdout;
int needspecify = 0;
-
+
if(turnon) {
- fdout &= ~FDO_FDSEL;
+ fdout &= ~FDO_FDSEL;
fdout |= (FDO_MOEN0 << fdsu) + fdsu;
} else
fdout &= ~(FDO_MOEN0 << fdsu);
@@ -856,7 +856,7 @@ fd_motor_on(void *arg1)
}
static void
-fd_turnon(fdu_t fdu)
+fd_turnon(fdu_t fdu)
{
fd_p fd = fd_data + fdu;
if(!(fd->flags & FD_MOTOR))
@@ -871,7 +871,7 @@ static void
fdc_reset(fdc_p fdc)
{
fdcu_t fdcu = fdc->fdcu;
-
+
/* Try a reset, keep motor on */
outb(fdc->baseport + FDOUT, fdc->fdout & ~(FDO_FRST|FDO_FDMAEN));
TRACE1("[0x%x->FDOUT]", fdc->fdout & ~(FDO_FRST|FDO_FDMAEN));
@@ -978,7 +978,7 @@ Fdopen(dev_t dev, int flags, int mode, struct proc *p)
return(ftopen(dev, flags));
#endif
/* check bounds */
- if (fdu >= NFD)
+ if (fdu >= NFD)
return(ENXIO);
fdc = fd_data[fdu].fdc;
if ((fdc == NULL) || (fd_data[fdu].type == NO_TYPE))
@@ -1093,7 +1093,7 @@ fdstrategy(struct buf *bp)
if (fdc->flags & FDC_TAPE_BUSY) {
bp->b_error = EBUSY;
bp->b_flags |= B_ERROR;
- goto bad;
+ goto bad;
}
#endif
if (!(bp->b_flags & B_FORMAT)) {
@@ -1111,7 +1111,7 @@ fdstrategy(struct buf *bp)
goto bad;
}
}
-
+
/*
* Set up block calculations.
*/
@@ -1262,7 +1262,7 @@ fdstate(fdcu_t fdcu, fdc_p fdc)
dp = &(fdc->head);
bp = dp->b_actf;
- if(!bp)
+ if(!bp)
{
/***********************************************\
* nothing left for this controller to do *
@@ -1469,7 +1469,7 @@ fdstate(fdcu_t fdcu, fdc_p fdc)
if(format)
{
/* formatting */
- if(fd_cmd(fdcu, 6,
+ if(fd_cmd(fdcu, 6,
NE7CMD_FORMAT,
head << 2 | fdu,
finfo->fd_formb_secshift,
@@ -1482,7 +1482,7 @@ fdstate(fdcu_t fdcu, fdc_p fdc)
fdc->retry = 6;
return(retrier(fdcu));
}
- }
+ }
else
{
if (fd_cmd(fdcu, 9,
@@ -1761,7 +1761,7 @@ fdformat(dev, finfo, p)
bp->b_bcount = sizeof(struct fd_idfield_data) * finfo->fd_formb_nsecs;
bp->b_un.b_addr = (caddr_t)finfo;
-
+
/* now do the format */
fdstrategy(bp);
@@ -1774,7 +1774,7 @@ fdformat(dev, finfo, p)
break;
}
splx(s);
-
+
if(rv == EWOULDBLOCK) {
/* timed out */
rv = EIO;
@@ -1890,7 +1890,7 @@ fdioctl(dev, cmd, addr, flag, p)
case FD_GOPTS: /* get drive options */
*(int *)addr = fd_data[FDUNIT(minor(dev))].options;
break;
-
+
case FD_SOPTS: /* set drive options */
fd_data[FDUNIT(minor(dev))].options = *(int *)addr;
break;
diff --git a/sys/i386/isa/ft.c b/sys/i386/isa/ft.c
index f1dd370..a56a84f 100644
--- a/sys/i386/isa/ft.c
+++ b/sys/i386/isa/ft.c
@@ -17,7 +17,7 @@
* POSSIBILITY OF SUCH DAMAGE.
*
* ft.c - QIC-40/80 floppy tape driver
- * $Id: ft.c,v 1.20 1995/04/12 20:47:43 wollman Exp $
+ * $Id: ft.c,v 1.21 1995/05/06 19:34:28 joerg Exp $
*
* 01/19/95 ++sg
* Cleaned up recalibrate/seek code at attach time for FreeBSD 2.x.
@@ -34,9 +34,9 @@
* Got rid of the hard coded device selection. Moved (some of) the
* static variables into a structure for support of multiple devices.
* ( still has a way to go for 2 controllers - but closer )
- * Changed the interface with fd.c so we no longer 'steal' it's
+ * Changed the interface with fd.c so we no longer 'steal' it's
* driver routine vectors.
- *
+ *
* 10/30/93 v0.3
* Fixed a couple more bugs. Reading was sometimes looping when an
* an error such as address-mark-missing was encountered. Both
@@ -92,7 +92,7 @@
/* Enable or disable debugging messages. */
#define FTDBGALL 0 /* 1 if you want everything */
/*#define DPRT(a) printf a */
-#define DPRT(a)
+#define DPRT(a)
/* Constants private to the driver */
#define FTPRI (PRIBIO) /* sleep priority */
@@ -401,7 +401,7 @@ segio_free(ft_p ft, SegReq *sp)
DPRT(("segio_free: nfree=%d ndone=%d nreq=%d\n", ft->nfreelist, ft->ndoneq, ft->nsegq));
}
-static int ft_externalize(struct proc *, struct kern_devconf *, void *,
+static int ft_externalize(struct proc *, struct kern_devconf *, void *,
size_t);
extern struct kern_devconf kdc_fdc[];
@@ -503,7 +503,7 @@ ftattach(isadev, fdup, unithasfd)
* enabled and therefore risks attached floppy disk drives to jam.
* Probe only if explicitly requested by a flag 0x1 from config
*/
-
+
/*
* FT_INSIGHT - insight style
*
@@ -519,7 +519,7 @@ ftattach(isadev, fdup, unithasfd)
goto out;
}
}
-
+
out:
tape_end(ftu);
if (ft->type != NO_TYPE) {
@@ -697,7 +697,7 @@ restate:
} else {
DPRT(("ft%d: async_status failed: retval=$%04x nbits=%d\n",
ftu, retval,nbits));
- async_ret = -2;
+ async_ret = -2;
}
goto complete;
}
@@ -1335,7 +1335,7 @@ restate:
/*
* Retries failed. Note the unrecoverable error.
* Marking the block as bad is useless right now.
- */
+ */
printf("ft%d: unrecoverable write error on block %d\n",
ftu, ft->xblk);
ft->segh->reqcrc |= (1 << ft->xcnt);
@@ -1756,7 +1756,7 @@ tape_end(ftu_t ftu)
/* set transfer speed */
outb(fdc->baseport+FDCTL, FDC_500KBPS);
DELAY(10);
- fdc->flags &= ~FDC_TAPE_BUSY;
+ fdc->flags &= ~FDC_TAPE_BUSY;
DPRT(("tape_end end\n"));
}
@@ -1905,7 +1905,7 @@ set_fdcmode(dev_t dev, int newmode)
/* Wake up the tape drive */
switch (ft->type) {
case NO_TYPE:
- fdc->flags &= ~FDC_TAPE_BUSY;
+ fdc->flags &= ~FDC_TAPE_BUSY;
return(ENXIO);
case FT_NONE:
tape_start(ftu, 0);
@@ -2089,19 +2089,19 @@ ftopen(dev_t dev, int arg2) {
fdc_p fdc;
/* check bounds */
- if (ftu >= NFT)
+ if (ftu >= NFT)
return(ENXIO);
fdc = ft_data[ftu].fdc;
if ((fdc == NULL) || (ft_data[ftu].type == NO_TYPE))
return(ENXIO);
/* check for controller already busy with tape */
if (fdc->flags & FDC_TAPE_BUSY)
- return(EBUSY);
+ return(EBUSY);
/* make sure we found a tape when probed */
if (!(fdc->flags & FDC_HASFTAPE))
return(ENODEV);
fdc->fdu = ftu;
- fdc->flags |= FDC_TAPE_BUSY;
+ fdc->flags |= FDC_TAPE_BUSY;
kdc_ft[ftu].kdc_state = DC_BUSY;
return(set_fdcmode(dev, FDC_TAPE_MODE)); /* try to switch to tape */
}
@@ -2541,7 +2541,7 @@ ftreq_hdr(ftu_t ftu, int cmd, QIC_Segment *sp)
if (h->qh_sig != QCV_HDRMAGIC) return(EIO);
copyout(ft->hdr->buff, sp->sg_data, QCV_SEGSIZE);
}
- return(0);
+ return(0);
}
/*
diff --git a/sys/i386/isa/gpib.c b/sys/i386/isa/gpib.c
index 34e83bb..5d1d1a2 100644
--- a/sys/i386/isa/gpib.c
+++ b/sys/i386/isa/gpib.c
@@ -2,10 +2,10 @@
/*
* GPIB driver for FreeBSD.
* Version 0.1 (No interrupts, no DMA)
- * Supports National Instruments AT-GPIB and AT-GPIB/TNT boards.
+ * Supports National Instruments AT-GPIB and AT-GPIB/TNT boards.
* (AT-GPIB not tested, but it should work)
- *
- * Written by Fred Cawthorne (fcawth@delphi.umd.edu)
+ *
+ * Written by Fred Cawthorne (fcawth@delphi.umd.edu)
* Some sections were based partly on the lpt driver.
* (some remnants may remain)
*
@@ -22,7 +22,7 @@
#include "gp.h"
-#if NGP > 0
+#if NGP > 0
#include "param.h"
#include "buf.h"
@@ -44,9 +44,9 @@
#define MIN(a,b) ((a < b) ? a : b)
-#define GPIBPRI (PZERO+8)|PCATCH
+#define GPIBPRI (PZERO+8)|PCATCH
#define SLEEP_MAX 1000
-#define SLEEP_MIN 4
+#define SLEEP_MIN 4
int initgpib(void);
void closegpib(void);
@@ -73,7 +73,7 @@ struct isa_driver gpdriver = {gpprobe, gpattach, "gp"};
#define BUFSIZE 1024
#define ATTACHED 0x08
#define OPEN 0x04
-#define INIT 0x02
+#define INIT 0x02
static struct gpib_softc {
@@ -81,7 +81,7 @@ static struct gpib_softc {
int sc_count; /* bytes queued in sc_inbuf */
int sc_type; /* Type of gpib controller */
u_char sc_flags; /* flags (open and internal) */
- char sc_unit; /* gpib device number */
+ char sc_unit; /* gpib device number */
char *sc_inbuf; /* buffer for data */
} gpib_sc;
static int oldcount;
@@ -112,7 +112,7 @@ else if ((inb(KSR)&0xF7)==0x14) sc->sc_type=1;
/*
* gpattach()
- * Attach device and print the type of card to the screen.
+ * Attach device and print the type of card to the screen.
*/
int
gpattach(isdp)
@@ -121,13 +121,13 @@ gpattach(isdp)
struct gpib_softc *sc = &gpib_sc;
sc->sc_unit = isdp->id_unit;
- if (sc->sc_type==3)
- printf ("gp%d: type AT-GPIB/TNT\n",sc->sc_unit);
+ if (sc->sc_type==3)
+ printf ("gp%d: type AT-GPIB/TNT\n",sc->sc_unit);
if (sc->sc_type==2)
- printf ("gp%d: type AT-GPIB chip NAT4882B\n",sc->sc_unit);
+ printf ("gp%d: type AT-GPIB chip NAT4882B\n",sc->sc_unit);
if (sc->sc_type==1)
- printf ("gp%d: type AT-GPIB chip NAT4882A\n",sc->sc_unit);
- sc->sc_flags |=ATTACHED;
+ printf ("gp%d: type AT-GPIB chip NAT4882A\n",sc->sc_unit);
+ sc->sc_flags |=ATTACHED;
return (1);
}
@@ -149,7 +149,7 @@ gpopen(dev, flag)
u_char sta, unit;
int status;
int counter;
-
+
unit= minor(dev);
/* minor number out of limits ? */
@@ -170,8 +170,8 @@ gpopen(dev, flag)
sc->sc_inbuf = malloc(BUFSIZE, M_DEVBUF, M_WAITOK);
if (sc->sc_inbuf == 0)
return(ENOMEM);
-
- if (initgpib()) return(EBUSY);
+
+ if (initgpib()) return(EBUSY);
sc->sc_flags |= OPEN;
sc->sc_count = 0;
oldcount=0;
@@ -215,13 +215,13 @@ enableremote(unit);
/*
* gpclose()
- * Close gpib device.
+ * Close gpib device.
*/
int
gpclose(dev, flag)
dev_t dev;
int flag;
-
+
{
struct gpib_softc *sc = &gpib_sc;
unsigned char unit;
@@ -241,7 +241,7 @@ if (unit!=0) { /*Here we need to send the last character with EOS*/
while ((inb(ISR3)&0x04)&&status==EWOULDBLOCK); /*Fifo is not empty*/
outb(CMDR,0x08); /*Issue STOP to TURBO488*/
-
+
/*Wait for DONE and STOP*/
if (status==EWOULDBLOCK) do {
status=tsleep((caddr_t)&gpib_sc,GPIBPRI,"gpibpoll",1);
@@ -256,7 +256,7 @@ if (unit!=0) { /*Here we need to send the last character with EOS*/
/*Send last byte with EOI set*/
/*Send second to last byte if there are 2 bytes left*/
-if (status==EWOULDBLOCK) {
+if (status==EWOULDBLOCK) {
do
if (!(inb(ISR1)&2)) status=tsleep((caddr_t)&gpib_sc, GPIBPRI,"gpibpoll",1);
@@ -265,19 +265,19 @@ if (oldcount==2){
outb(CDOR,oldbytes[0]); /*Send second to last byte*/
while (!(inb(ISR1)&2)&&(status==EWOULDBLOCK));
status=tsleep((caddr_t)&gpib_sc, GPIBPRI,"gpibpoll",1);
- }
+ }
outb(AUXMR,seoi); /*Set EOI for the last byte*/
outb(AUXMR,0x5E); /*Clear SYNC*/
if (oldcount==1)
outb(CDOR,oldbytes[0]);
- else
+ else
if (oldcount==2)
outb(CDOR,oldbytes[1]);
else {
outb (CDOR,13); /*Send a CR.. we've got trouble*/
printf("gpib: Warning: gpclose called with nothing left in buffer\n");
- }
+ }
}
do
@@ -330,8 +330,8 @@ gpwrite(dev, uio)
while ((gpib_sc.sc_count = MIN(BUFSIZE-1, uio->uio_resid)) > 0) {
/* If there were >1 bytes left over, send them */
if (oldcount==2)
- sendrawgpibfifo(minor(dev),oldbytes,2);
-
+ sendrawgpibfifo(minor(dev),oldbytes,2);
+
/*If there was 1 character left, put it at the beginning
of the new buffer*/
if (oldcount==1){
@@ -339,7 +339,7 @@ gpwrite(dev, uio)
gpib_sc.sc_cp = gpib_sc.sc_inbuf;
/* get from user-space */
uiomove(gpib_sc.sc_inbuf+1, gpib_sc.sc_count, uio);
- gpib_sc.sc_count++;
+ gpib_sc.sc_count++;
}
else {
gpib_sc.sc_cp = gpib_sc.sc_inbuf;
@@ -348,7 +348,7 @@ gpwrite(dev, uio)
}
/*NOTE we always leave one byte in case this is the last write
- so close can send EOI with the last byte There may be 2 bytes
+ so close can send EOI with the last byte There may be 2 bytes
since we are doing 16 bit transfers.(note the -1 in the count below)*/
/*If count<=2 we'll either pick it up on the next write or on close*/
if (gpib_sc.sc_count>2) {
@@ -357,12 +357,12 @@ gpwrite(dev, uio)
if (err)
return(1);
oldcount=gpib_sc.sc_count-count; /*Set # of remaining bytes*/
- gpib_sc.sc_count-=count;
+ gpib_sc.sc_count-=count;
gpib_sc.sc_cp+=count; /*point char pointer to remaining bytes*/
}
else oldcount=gpib_sc.sc_count;
oldbytes[0]=gpib_sc.sc_cp[0];
- if (oldcount==2)
+ if (oldcount==2)
oldbytes[1]=gpib_sc.sc_cp[1];
}
return(0);
@@ -384,7 +384,7 @@ gpioctl(dev_t dev, int cmd, struct gpibdata *gd)
break;
case GPIBREAD:
result=readgpibfifo(gd->address,gd->data,*(gd->count));
- *(gd->count)=result;
+ *(gd->count)=result;
error=0;
break;
case GPIBINIT:
@@ -490,11 +490,11 @@ int initgpib() {
outb(EOSR,10); /*set EOS message to newline*/
/*should I make the default to interpret END as EOS?*/
- /*It isn't now. The following changes this*/
+ /*It isn't now. The following changes this*/
outb(AUXMR,0x80); /*No special EOS handling*/
/*outb(AUXMR,0x88) */ /* Transmit END with EOS*/
/*outb(AUXMR,0x84) */ /* Set END on EOS received*/
- /*outb(AUXMR,0x8C) */ /* Do both of the above*/
+ /*outb(AUXMR,0x8C) */ /* Do both of the above*/
/* outb(AUXMR,hldi); */ /*Perform RFD Holdoff for all data in*/
@@ -502,7 +502,7 @@ int initgpib() {
outb(AUXMR,pon);
outb(AUXMR,sic_rsc);
- tsleep((caddr_t)&gpib_sc,GPIBPRI,"gpibpoll",1);
+ tsleep((caddr_t)&gpib_sc,GPIBPRI,"gpibpoll",1);
outb(AUXMR,sic_rsc_off);
@@ -519,12 +519,12 @@ void closegpib() {
/*GPIB ROUTINES:
These will also make little sense unless you have a data sheet.
- Note that the routines with an "m" in the beginning are for
+ Note that the routines with an "m" in the beginning are for
accessing multiple devices in one call*/
/*This is one thing I could not figure out how to do correctly.
- I tried to use the auxilary command to enable remote, but it
+ I tried to use the auxilary command to enable remote, but it
never worked. Here, I bypass everything and write to the BSR
to enable the remote line. NOTE that these lines are effectively
"OR'ed" with the actual lines, so writing a 1 to the bit in the BSR
@@ -559,9 +559,9 @@ status=EWOULDBLOCK;
while (!(inb(ISR2)&0x08)&&status==EWOULDBLOCK); /*Wait to send next cmd*/
}
-/*This does not release the REM line on the gpib port, because if it did,
- all the remote devices would go to local mode. This only sends the
- gotolocal message to one device. Currently, REM is always held true
+/*This does not release the REM line on the gpib port, because if it did,
+ all the remote devices would go to local mode. This only sends the
+ gotolocal message to one device. Currently, REM is always held true
after enableremote is called, and is reset only on a close of the
gpib device */
@@ -573,7 +573,7 @@ void gotolocal(unsigned char device)
status=tsleep((caddr_t)&gpib_sc,GPIBPRI,"gpibpoll",2);
}
while (!(inb(ISR2)&0x08)&&status==EWOULDBLOCK); /*Wait to send next cmd*/
-
+
outb(CDOR,(device&31)+32);
if (status==EWOULDBLOCK) do {
@@ -852,7 +852,7 @@ do{
if (!(status&2)&&!counter2) done=tsleep((caddr_t)&gpib_sc, GPIBPRI,"gpibpoll",1);
}
while (!(status&2)&&(done==EWOULDBLOCK));
- if (done!=EWOULDBLOCK) return(done);
+ if (done!=EWOULDBLOCK) return(done);
if ((data[counter+1]==0)||(count+1)==0){
@@ -873,7 +873,7 @@ return(counter-1);
}
/*Send data through the TURBO488 FIFOS to a device that is already
- addressed to listen. This is used by the write call when someone is
+ addressed to listen. This is used by the write call when someone is
writing to a printer or plotter, etc... */
/*The last byte of each write is held off until either the next
write or close, so it can be sent with EOI set*/
@@ -901,7 +901,7 @@ status=EWOULDBLOCK;
if (sleeptime<SLEEP_MAX) sleeptime=sleeptime*2;
}
while (!(inb(ISR3)&0x08)&&(status==EWOULDBLOCK)); /*Fifo is full*/
-
+
if((count>1)&&(inb(ISR3)&0x08)){
outw(FIFOB,*(unsigned*)(data+counter));
/* printf ("gpib: sent:%c,%c\n",data[counter],data[counter+1]);*/
@@ -911,7 +911,7 @@ status=EWOULDBLOCK;
}
}
while ((count>1)&&(status==EWOULDBLOCK));
-/*The write routine and close routine must check if there is 1
+/*The write routine and close routine must check if there is 1
byte left and handle it accordingly*/
@@ -933,7 +933,7 @@ int sendgpibfifo(unsigned char device,char *data,int count)
int counter;
int fifopos;
int sleeptime;
-
+
outb(IMR2,0x30); /*we have to enable DMA (0x30) for turbo488 to work*/
outb(CNT0,0);
outb(CNT1,0);
@@ -950,7 +950,7 @@ status=EWOULDBLOCK;
status=tsleep((caddr_t)&gpib_sc,GPIBPRI,"gpibpoll",1);
while (!(inb(ISR2)&8)&&status==EWOULDBLOCK);
outb (CDOR,64); /*Address controller (me) to talk*/
-
+
if (!(inb(ISR2)&8)&&status==EWOULDBLOCK) do
status=tsleep((caddr_t)&gpib_sc,GPIBPRI,"gpibpoll",1);
while (!(inb(ISR2)&8)&&status==EWOULDBLOCK);
@@ -978,7 +978,7 @@ status=EWOULDBLOCK;
if (sleeptime<SLEEP_MAX) sleeptime=sleeptime*2;
}
while (!(inb(ISR3)&0x08)&&(status==EWOULDBLOCK)); /*Fifo is full*/
-
+
if((count>1)&&(inb(ISR3)&0x08)){
/*if(count==2) outb(CFG,15+0x40); *//*send eoi when done*/
outw(FIFOB,*(unsigned*)(data+counter));
@@ -1011,7 +1011,7 @@ status=EWOULDBLOCK;
while ((inb(ISR3)&0x04)&&status==EWOULDBLOCK); /*Fifo is not empty*/
outb(CMDR,0x08); /*Issue STOP to TURBO488*/
-
+
/*Wait for DONE and STOP*/
if (status==EWOULDBLOCK) do {
status=tsleep((caddr_t)&gpib_sc,GPIBPRI,"gpibpoll",1);
@@ -1061,7 +1061,7 @@ while (!(inb(ISR1)&2)&&(status==EWOULDBLOCK));
if (!(inb(ISR2)&8)&&status==EWOULDBLOCK) do
status=tsleep((caddr_t)&gpib_sc,GPIBPRI,"gpibpoll",1);
while (!(inb(ISR2)&8)&&status==EWOULDBLOCK);
-
+
outb(AUXMR,0x5E); /*Clear SYNC*/
outb (CDOR,95);/*untalk*/
@@ -1097,7 +1097,7 @@ int readgpibfifo(unsigned char device,char *data,int count)
-status=EWOULDBLOCK;
+status=EWOULDBLOCK;
do
status=tsleep((caddr_t)&gpib_sc,GPIBPRI,"gpibpoll",1);
while (!(inb(ISR2)&8)&&status==EWOULDBLOCK);
@@ -1129,7 +1129,7 @@ do
status2=inb(STS2);
inword=inw(FIFOB);
*(unsigned*)(data+counter)=inword;
- /* printf ("Read:%c,%c\n",data[counter],data[counter+1]);*/
+ /* printf ("Read:%c,%c\n",data[counter],data[counter+1]);*/
counter+=2;
}
else {
@@ -1149,7 +1149,7 @@ do
}
while(!(inb(ISR3)&0x11)&&status==EWOULDBLOCK); /*wait for DONE and STOP*/
outb(AUXMR,0x55);
-
+
outb(IMR2,0x00); /*we have to enable DMA (0x30) for turbo488 to work*/
outb(CMDR,0x20); /*soft reset turbo488*/
outb(CMDR,0x10); /*reset fifos*/
@@ -1168,7 +1168,7 @@ do
do
status=tsleep((caddr_t)&gpib_sc,GPIBPRI,"gpibpoll",1);
while (!(inb(ISR2)&8)&&status==EWOULDBLOCK);
-
+
outb(AUXMR,0x5E); /*Clear SYNC*/
outb (CDOR,95);/*untalk*/
do
@@ -1209,7 +1209,7 @@ char spoll(unsigned char device)
if (!(inb(ISR2)&8)&&status==EWOULDBLOCK) do
status=tsleep((caddr_t)&gpib_sc,GPIBPRI,"gpibpoll",1);
while (!(inb(ISR2)&8)&&status==EWOULDBLOCK);
-
+
/*wait for bus to be synced*/
if (!(inb(ISR0)&1)&&status==EWOULDBLOCK) do
status=tsleep((caddr_t)&gpib_sc,GPIBPRI,"gpibpoll",1);
@@ -1239,7 +1239,7 @@ char spoll(unsigned char device)
if (!(inb(ISR2)&8)&&status==EWOULDBLOCK) do
status=tsleep((caddr_t)&gpib_sc,GPIBPRI,"gpibpoll",1);
while (!(inb(ISR2)&8)&&status==EWOULDBLOCK);
-
+
outb(CDOR,95); /*untalk*/
if (!(inb(ISR2)&8)&&status==EWOULDBLOCK) do
diff --git a/sys/i386/isa/gpib.h b/sys/i386/isa/gpib.h
index d479e78..557880a 100644
--- a/sys/i386/isa/gpib.h
+++ b/sys/i386/isa/gpib.h
@@ -1,19 +1,19 @@
/* gpib data structures */
struct gpibdata {
char *data; /* data string for ins and outs */
- unsigned char address; /* gpib address */
- int *count;
- } ;
+ unsigned char address; /* gpib address */
+ int *count;
+ } ;
/* IOCTL commands */
-#define GPIBWRITE _IOW('g',1,struct gpibdata)
-#define GPIBREAD _IOW('g',2,struct gpibdata)
-#define GPIBINIT _IOW('g',3,struct gpibdata)
-#define GPIBTRIGGER _IOW('g',4,struct gpibdata)
-#define GPIBREMOTE _IOW('g',5,struct gpibdata)
-#define GPIBLOCAL _IOW('g',6,struct gpibdata)
-#define GPIBMTRIGGER _IOW('g',7,struct gpibdata)
-#define GPIBMREMOTE _IOW('g',8,struct gpibdata)
-#define GPIBMLOCAL _IOW('g',9,struct gpibdata)
-#define GPIBSPOLL _IOW('g',10,struct gpibdata)
+#define GPIBWRITE _IOW('g',1,struct gpibdata)
+#define GPIBREAD _IOW('g',2,struct gpibdata)
+#define GPIBINIT _IOW('g',3,struct gpibdata)
+#define GPIBTRIGGER _IOW('g',4,struct gpibdata)
+#define GPIBREMOTE _IOW('g',5,struct gpibdata)
+#define GPIBLOCAL _IOW('g',6,struct gpibdata)
+#define GPIBMTRIGGER _IOW('g',7,struct gpibdata)
+#define GPIBMREMOTE _IOW('g',8,struct gpibdata)
+#define GPIBMLOCAL _IOW('g',9,struct gpibdata)
+#define GPIBSPOLL _IOW('g',10,struct gpibdata)
diff --git a/sys/i386/isa/gpibreg.h b/sys/i386/isa/gpibreg.h
index d517e0a..2ab2acc 100644
--- a/sys/i386/isa/gpibreg.h
+++ b/sys/i386/isa/gpibreg.h
@@ -1,5 +1,5 @@
static short gpib_port=0x2c0;
-#define IEEE gpib_port
+#define IEEE gpib_port
/*NAT4882 Registers*/
diff --git a/sys/i386/isa/gsc.c b/sys/i386/isa/gsc.c
index 221571a..9cb8f0d 100644
--- a/sys/i386/isa/gsc.c
+++ b/sys/i386/isa/gsc.c
@@ -152,14 +152,14 @@ struct gsc_unit {
int height; /* height, for pnm modes */
size_t bcount; /* bytes to read, for pnm modes */
struct _sbuf hbuf; /* buffer for pnm header data */
-} unittab[NGSC];
+} unittab[NGSC];
/* I could not find a reasonable buffer size limit other than by
* experiments. MAXPHYS is obviously too much, while DEV_BSIZE and
* PAGE_SIZE are really too small. There must be something wrong
* with isa_dmastart/isa_dmarangecheck HELP!!!
*/
-#define MAX_BUFSIZE 0x3000
+#define MAX_BUFSIZE 0x3000
#define DEFAULT_BLEN 59
/***********************************************************************
@@ -197,7 +197,7 @@ lookup_geometry(struct gsc_geom geom, const struct gsc_unit *scu)
for(i=0; i<GEOMTAB_SIZE; i++)
{
tab = geomtab[i];
-
+
if ( ( ( geom.dpi != INVALID ) && ( tab.dpi == geom.dpi ) ) ||
( ( geom.dpl != INVALID ) && ( tab.dpl == geom.dpl ) ) ||
( ( geom.g_res != INVALID ) && ( tab.g_res == geom.g_res ) ) ||
@@ -213,7 +213,7 @@ lookup_geometry(struct gsc_geom geom, const struct gsc_unit *scu)
lprintf("gsc.lookup_geometry: "
"geometry lookup failed on {%d, %d, 0x%02x, 0x%02x}\n",
geom.dpi, geom.dpl, geom.g_res, geom.s_res);
-
+
return INVALID;
}
@@ -229,12 +229,12 @@ static int
get_geometry(const struct gsc_unit *scu)
{
struct gsc_geom geom = NEW_GEOM;
-
+
lprintf("gsc.get_geometry: get geometry at 0x%03x\n", scu->stat);
if ( ( geom.g_res = inb(scu->stat) ) == FAIL )
- return INVALID;
-
+ return INVALID;
+
geom.g_res &= GSC_RES_MASK;
return lookup_geometry(geom, scu);
@@ -306,7 +306,7 @@ buffer_read(struct gsc_unit *scu)
int delay;
lprintf("gsc.buffer_read: begin\n");
-
+
if (scu->ctrl_byte == INVALID)
{
lprintf("gsc.buffer_read: invalid ctrl_byte\n");
@@ -318,9 +318,9 @@ buffer_read(struct gsc_unit *scu)
outb( scu->ctrl, scu->ctrl_byte | GSC_POWER_ON );
outb( scu->clrp, 0 );
stb = inb( scu->stat );
-
+
isa_dmastart(B_READ, scu->sbuf.base, scu->sbuf.size, scu->channel);
-
+
chan_bit = 0x01 << scu->channel;
for(delay=0; !(inb(DMA1_READY) & 0x01 << scu->channel); delay += LONG)
@@ -331,7 +331,7 @@ buffer_read(struct gsc_unit *scu)
lprintf("gsc.buffer_read: timeout\n");
res = EWOULDBLOCK;
break;
- }
+ }
res = tsleep((caddr_t)scu, GSCPRI | PCATCH, "gscread", LONG);
if ( ( res == 0 ) || ( res == EWOULDBLOCK ) )
res = SUCCESS;
@@ -390,7 +390,7 @@ gscprobe (struct isa_device *isdp)
isdp->id_drq,
isdp->id_maddr,
isdp->id_msize);
-
+
if ( isdp->id_iobase < 0 )
{
lprintf("gsc%d.probe: no iobase given\n", unit);
@@ -451,7 +451,7 @@ gscprobe (struct isa_device *isdp)
lprintf("gsc%d.probe: status 0x%02x, %ddpi\n",
unit, stb, geomtab[scu->geometry].dpi);
- outb(scu->ctrl, scu->ctrl_byte & ~GSC_POWER_ON);
+ outb(scu->ctrl, scu->ctrl_byte & ~GSC_POWER_ON);
}
lprintf("gsc%d.probe: ok\n", unit);
@@ -485,7 +485,7 @@ gscattach(struct isa_device *isdp)
isdp->id_drq,
isdp->id_maddr,
isdp->id_msize);
-
+
printf("gsc%d: GeniScan GS-4500 at %ddpi\n",
unit, geomtab[scu->geometry].dpi);
@@ -516,7 +516,7 @@ int gscopen (dev_t dev, int flag)
{
int unit = UNIT(minor(dev)) & UNIT_MASK;
struct gsc_unit *scu = unittab + unit;
-
+
if ( minor(dev) & DBUG_MASK )
scu->flags |= DEBUG;
else
@@ -535,7 +535,7 @@ int gscopen (dev_t dev, int flag)
lprintf("gsc%d.open: gray maps are not yet supported", unit);
return ENXIO;
}
-
+
lprintf("gsc%d.open: minor %d\n",
unit, minor(dev));
@@ -545,15 +545,15 @@ int gscopen (dev_t dev, int flag)
unit, scu->flags);
return ENXIO;
}
-
+
if ( scu->flags & OPEN )
{
lprintf("gsc%d.open: already open", unit);
return EBUSY;
}
- scu->flags |= OPEN;
-
+ scu->flags |= OPEN;
+
return SUCCESS;
}
@@ -579,7 +579,7 @@ int gscclose (dev_t dev, int flag)
unit, scu->flags);
return ENXIO;
}
-
+
outb(scu->ctrl, scu->ctrl_byte & ~GSC_POWER_ON);
if ( scu->sbuf.base != NULL ) free( scu->sbuf.base, M_DEVBUF );
@@ -589,7 +589,7 @@ int gscclose (dev_t dev, int flag)
scu->sbuf.poi = INVALID;
scu->flags &= ~(DEBUG | OPEN | READING);
-
+
return SUCCESS;
}
@@ -604,7 +604,7 @@ int gscread (dev_t dev, struct uio *uio)
struct gsc_unit *scu = unittab + unit;
size_t nbytes;
int res;
-
+
lprintf("gsc%d.read: minor %d\n", unit, minor(dev));
if ( unit >= NGSC || !( scu->flags & ATTACHED ) )
@@ -645,7 +645,7 @@ int gscread (dev_t dev, struct uio *uio)
}
}
}
-
+
lprintf("gsc%d.read(before buffer_read): "
"size 0x%x, pointer 0x%x, bcount 0x%x, ok\n",
unit, scu->sbuf.size, scu->sbuf.poi, scu->bcount);
@@ -653,7 +653,7 @@ int gscread (dev_t dev, struct uio *uio)
if ( scu->sbuf.poi == scu->sbuf.size )
if ( (res = buffer_read(scu)) != SUCCESS )
return res;
-
+
lprintf("gsc%d.read(after buffer_read): "
"size 0x%x, pointer 0x%x, bcount 0x%x, ok\n",
unit, scu->sbuf.size, scu->sbuf.poi, scu->bcount);
@@ -662,22 +662,22 @@ int gscread (dev_t dev, struct uio *uio)
if ( (scu->flags & PBM_MODE) )
nbytes = MIN( nbytes, scu->bcount );
-
+
lprintf("gsc%d.read: transferring 0x%x bytes", nbytes);
-
+
res = uiomove(scu->sbuf.base + scu->sbuf.poi, nbytes, uio);
if ( res != SUCCESS )
{
lprintf("gsc%d.read: uiomove failed %d", unit, res);
return res;
}
-
+
scu->sbuf.poi += nbytes;
if ( scu->flags & PBM_MODE ) scu->bcount -= nbytes;
-
+
lprintf("gsc%d.read: size 0x%x, pointer 0x%x, bcount 0x%x, ok\n",
unit, scu->sbuf.size, scu->sbuf.poi, scu->bcount);
-
+
return SUCCESS;
}
@@ -701,12 +701,12 @@ int gscioctl (dev_t dev, int cmd, caddr_t data, int flag, struct proc *p)
unit, scu->flags);
return ENXIO;
}
-
+
switch(cmd) {
case GSC_SRESSW:
lprintf("gsc%d.ioctl:GSC_SRESSW\n", unit);
if ( scu->flags & READING )
- {
+ {
lprintf("gsc%d:ioctl on already reading unit\n", unit);
return EBUSY;
}
@@ -715,11 +715,11 @@ int gscioctl (dev_t dev, int cmd, caddr_t data, int flag, struct proc *p)
case GSC_GRES:
*(int *)data=geomtab[scu->geometry].dpi;
lprintf("gsc%d.ioctl:GSC_GRES %ddpi\n", unit, *(int *)data);
- return SUCCESS;
+ return SUCCESS;
case GSC_GWIDTH:
*(int *)data=geomtab[scu->geometry].dpl;
lprintf("gsc%d.ioctl:GSC_GWIDTH %d\n", unit, *(int *)data);
- return SUCCESS;
+ return SUCCESS;
case GSC_SRES:
case GSC_SWIDTH:
lprintf("gsc%d.ioctl:GSC_SRES or GSC_SWIDTH %d\n",
@@ -742,7 +742,7 @@ int gscioctl (dev_t dev, int cmd, caddr_t data, int flag, struct proc *p)
case GSC_SHEIGHT:
lprintf("gsc%d.ioctl:GSC_SHEIGHT %d\n", unit, *(int *)data);
if ( scu->flags & READING )
- {
+ {
lprintf("gsc%d:ioctl on already reading unit\n", unit);
return EBUSY;
}
diff --git a/sys/i386/isa/gscreg.h b/sys/i386/isa/gscreg.h
index f8cafcd..9a7960c 100644
--- a/sys/i386/isa/gscreg.h
+++ b/sys/i386/isa/gscreg.h
@@ -1,4 +1,4 @@
-/* gscreg.h - port and bit definitions for the Genius GS-4500 interface
+/* gscreg.h - port and bit definitions for the Genius GS-4500 interface
*
*
* Copyright (c) 1995 Gunther Schadow. All rights reserved.
diff --git a/sys/i386/isa/ic/Am7990.h b/sys/i386/isa/ic/Am7990.h
index bbc6c63..fe146ee 100644
--- a/sys/i386/isa/ic/Am7990.h
+++ b/sys/i386/isa/ic/Am7990.h
@@ -1,6 +1,6 @@
/*
* Am7990, Local Area Network Controller for Ethernet (LANCE)
- *
+ *
* Copyright (c) 1994, Paul Richards. This software may be used,
* modified, copied, distributed, and sold, in both source and binary
* form provided that the above copyright and these terms are retained.
@@ -35,18 +35,18 @@
#define MISS 0x1000
#define MERR 0x0800
#define RINT 0x0400
-#define TINT 0x0200
-#define IDON 0x0100
+#define TINT 0x0200
+#define IDON 0x0100
#define INTR 0x0080
#define INEA 0x0040
#define RXON 0x0020
#define TXON 0x0010
#define TDMD 0x0008
-#define STOP 0x0004
+#define STOP 0x0004
#define STRT 0x0002
-#define INIT 0x0001
+#define INIT 0x0001
-/*
+/*
* CSR3
*
* Bits 3-15 are reserved.
@@ -54,12 +54,12 @@
*/
#define BSWP 0x0004
-#define ACON 0x0002
+#define ACON 0x0002
#define BCON 0x0001
/* Initialisation block */
-struct init_block {
+struct init_block {
u_short mode; /* Mode register */
u_char padr[6]; /* Ethernet address */
u_char ladrf[8]; /* Logical address filter (multicast) */
@@ -88,7 +88,7 @@ struct init_block {
#define DTX 0x0002 /* Disable the transmitter */
#define DRX 0x0001 /* Disable the receiver */
-/*
+/*
* Message Descriptor Structure
*
* Each transmit or receive descriptor ring entry (RDRE's and TDRE's)
@@ -100,14 +100,14 @@ struct init_block {
* 3. The status information for that particular buffer. The eight most
* significant bits of md1 are collectively termed the STATUS of the
* descriptor.
- *
+ *
* Descriptor md0 contains LADR 0-15, the low order 16 bits of the 24-bit
- * address of the actual data buffer. Bits 0-7 of descriptor md1 contain
+ * address of the actual data buffer. Bits 0-7 of descriptor md1 contain
* HADR, the high order 8-bits of the 24-bit data buffer address. Bits 8-15
* of md1 contain the status flags of the buffer. Descriptor md2 contains the
- * buffer byte count in bits 0-11 as a two's complement number and must have
+ * buffer byte count in bits 0-11 as a two's complement number and must have
* 1's written to bits 12-15. For the receive entry md3 has the Message Byte
- * Count in bits 0-11, this is the length of the received message and is valid
+ * Count in bits 0-11, this is the length of the received message and is valid
* only when ERR is cleared and ENP is set. For the transmit entry it contains
* more status information.
*
@@ -116,8 +116,8 @@ struct init_block {
struct mds {
u_short md0;
u_short md1;
- short md2;
- u_short md3;
+ short md2;
+ u_short md3;
};
/* Receive STATUS flags for md1 */
@@ -147,8 +147,8 @@ struct mds {
#define ONE 0x0800 /* Exactly one retry was needed */
#define DEF 0x0400 /* Packet transmit deferred -- channel busy */
-/*
- * Transmit status flags for md2
+/*
+ * Transmit status flags for md2
*
* Same as for receive descriptor.
*
diff --git a/sys/i386/isa/ic/am7990.h b/sys/i386/isa/ic/am7990.h
index ea8a0e6..ce007a1 100644
--- a/sys/i386/isa/ic/am7990.h
+++ b/sys/i386/isa/ic/am7990.h
@@ -62,7 +62,7 @@ typedef struct {
unsigned short d_status;
#define LN_DSTS_RxLENMASK 0x0FFF /* (R ) Recieve Length */
#define LN_DSTS_TxTDRMASK 0x03FF /* (R ) Transmit - Time Domain Reflectometer */
-#define LN_DSTS_TxEXCCOLL 0x0400 /* (R ) Transmit - Excessive Collisions */
+#define LN_DSTS_TxEXCCOLL 0x0400 /* (R ) Transmit - Excessive Collisions */
#define LN_DSTS_TxCARRLOSS 0x0800 /* (R ) Transmit - Carrier Loss */
#define LN_DSTS_TxLATECOLL 0x1000 /* (R ) Transmit - Late Collision */
#define LN_DSTS_TxUNDERFLOW 0x4000 /* (R ) Transmit - Underflow */
diff --git a/sys/i386/isa/ic/i82365.h b/sys/i386/isa/ic/i82365.h
index ab38125..b86812e 100644
--- a/sys/i386/isa/ic/i82365.h
+++ b/sys/i386/isa/ic/i82365.h
@@ -16,7 +16,7 @@
* PCIC Registers
* Each register is given a name, and most of the bits are named too.
* I should really name them all.
- *
+ *
* Finally, since the banks can be addressed with a regular syntax,
* some macros are provided for that purpose.
*/
diff --git a/sys/i386/isa/ic/i8237.h b/sys/i386/isa/ic/i8237.h
index 722194c..5493ca8 100644
--- a/sys/i386/isa/ic/i8237.h
+++ b/sys/i386/isa/ic/i8237.h
@@ -1,7 +1,7 @@
/*
* Intel 8237 DMA Controller
*
- * $Id: i8237.h,v 1.2 1993/10/16 13:48:48 rgrimes Exp $
+ * $Id: i8237.h,v 1.3 1994/11/01 17:26:47 ache Exp $
*/
#define DMA37MD_SINGLE 0x40 /* single pass mode */
@@ -9,4 +9,4 @@
#define DMA37MD_AUTO 0x50 /* autoinitialise single pass mode */
#define DMA37MD_WRITE 0x04 /* read the device, write memory operation */
#define DMA37MD_READ 0x08 /* write the device, read memory operation */
-
+
diff --git a/sys/i386/isa/ic/lemac.h b/sys/i386/isa/ic/lemac.h
index 2c919d8..4eee86f 100644
--- a/sys/i386/isa/ic/lemac.h
+++ b/sys/i386/isa/ic/lemac.h
@@ -21,7 +21,7 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
- * $Id: lemac.h,v 1.1 1994/08/01 16:03:42 thomas Exp $
+ * $Id: lemac.h,v 1.1 1994/08/12 06:51:12 davidg Exp $
*/
#ifndef _LEMAC_H_
#define _LEMAC_H_
@@ -128,7 +128,7 @@
/* Transmit Done Queue Status Definitions */
-#define LEMAC_TDQ_COL 0x03 /* Collision Mask */
+#define LEMAC_TDQ_COL 0x03 /* Collision Mask */
#define LEMAC_TDQ_NOCOL 0x00 /* No Collisions */
#define LEMAC_TDQ_ONECOL 0x01 /* One Collision */
#define LEMAC_TDQ_MULCOL 0x02 /* Multiple Collisions */
diff --git a/sys/i386/isa/ic/ncr5380.h b/sys/i386/isa/ic/ncr5380.h
index f4eec05..ce14fec 100644
--- a/sys/i386/isa/ic/ncr5380.h
+++ b/sys/i386/isa/ic/ncr5380.h
@@ -14,8 +14,8 @@
* Derived from "NCR 53C80 Family SCSI Protocol Controller Data Manual"
*/
-#ifndef _IC_NCR_5380_H_
-#define _IC_NCR_5380_H_
+#ifndef _IC_NCR_5380_H_
+#define _IC_NCR_5380_H_
#define C80_CSDR 0 /* ro - Current SCSI Data Reg. */
#define C80_ODR 0 /* wo - Output Data Reg. */
@@ -33,7 +33,7 @@
#define ICR_ASSERT_DATA_BUS 0x01
#define ICR_BITS "\20\1dbus\2atn\3sel\4bsy\5ack\6arblost\7arb\10rst"
-/*
+/*
* The mask to use when doing read_modify_write on ICR.
*/
#define ICR_MASK (~(ICR_DIFF_ENABLE | ICR_TRI_STATE_MODE))
diff --git a/sys/i386/isa/if_cx.c b/sys/i386/isa/if_cx.c
index 113578b..f4adf10 100644
--- a/sys/i386/isa/if_cx.c
+++ b/sys/i386/isa/if_cx.c
@@ -771,7 +771,7 @@ void cxinput (cx_chan_t *c, void *buf, unsigned len)
#if NBPFILTER > 0
/*
* Check if there's a BPF listener on this interface.
- * If so, hand off the raw packet to bpf.
+ * If so, hand off the raw packet to bpf.
*/
if (c->bpf)
bpf_tap (c->bpf, buf, len);
diff --git a/sys/i386/isa/if_ed.c b/sys/i386/isa/if_ed.c
index d4d29f8..100d8f7 100644
--- a/sys/i386/isa/if_ed.c
+++ b/sys/i386/isa/if_ed.c
@@ -13,7 +13,7 @@
* the SMC Elite Ultra (8216), the 3Com 3c503, the NE1000 and NE2000,
* and a variety of similar clones.
*
- * $Id: if_ed.c,v 1.71 1995/05/12 22:39:40 davidg Exp $
+ * $Id: if_ed.c,v 1.72 1995/05/14 11:01:20 davidg Exp $
*/
#include "ed.h"
@@ -363,11 +363,11 @@ ed_probe_WD80x3(isa_dev)
isa16bit = 1;
memsize = 16384;
sc->type_str = "WD8013EP";
- sc->kdc.kdc_description =
+ sc->kdc.kdc_description =
"Ethernet adapter: WD 8013EP";
} else {
sc->type_str = "WD8003EP";
- sc->kdc.kdc_description =
+ sc->kdc.kdc_description =
"Ethernet adapter: WD 8003EP";
}
break;
@@ -407,7 +407,7 @@ ed_probe_WD80x3(isa_dev)
break;
case ED_TYPE_SMC8216T:
sc->type_str = "SMC8216T";
- sc->kdc.kdc_description =
+ sc->kdc.kdc_description =
"Ethernet adapter: SMC 8216T";
outb(sc->asic_addr + ED_WD790_HWR,
@@ -1376,7 +1376,7 @@ ed_init(unit)
/*
* Enable the following interrupts: receive/transmit complete,
* receive/transmit error, and Receiver OverWrite.
- *
+ *
* Counter overflow and Remote DMA complete are *not* enabled.
*/
outb(sc->nic_addr + ED_P0_IMR,
@@ -2060,8 +2060,8 @@ ed_ioctl(ifp, command, data)
ed_init(ifp->if_unit);
}
/* UP controls BUSY/IDLE */
- sc->kdc.kdc_state = ((ifp->if_flags & IFF_UP)
- ? DC_BUSY
+ sc->kdc.kdc_state = ((ifp->if_flags & IFF_UP)
+ ? DC_BUSY
: DC_IDLE);
#if NBPFILTER > 0
@@ -2327,7 +2327,7 @@ ed_pio_write_mbufs(sc, m, dst)
outb(sc->nic_addr + ED_P0_CR, ED_CR_RD1 | ED_CR_STA);
/*
- * Transfer the mbuf chain to the NIC memory.
+ * Transfer the mbuf chain to the NIC memory.
* 16-bit cards require that data be transferred as words, and only words.
* So that case requires some extra code to patch over odd-length mbufs.
*/
@@ -2336,7 +2336,7 @@ ed_pio_write_mbufs(sc, m, dst)
/* NE1000s are easy */
while (m) {
if (m->m_len) {
- outsb(sc->asic_addr + ED_NOVELL_DATA,
+ outsb(sc->asic_addr + ED_NOVELL_DATA,
m->m_data, m->m_len);
}
m = m->m_next;
@@ -2346,7 +2346,7 @@ ed_pio_write_mbufs(sc, m, dst)
unsigned char *data;
int len, wantbyte;
unsigned char savebyte[2];
-
+
wantbyte = 0;
while (m) {
@@ -2363,7 +2363,7 @@ ed_pio_write_mbufs(sc, m, dst)
}
/* output contiguous words */
if (len > 1) {
- outsw(sc->asic_addr + ED_NOVELL_DATA,
+ outsw(sc->asic_addr + ED_NOVELL_DATA,
data, len >> 1);
data += len & ~1;
len &= 1;
diff --git a/sys/i386/isa/if_edreg.h b/sys/i386/isa/if_edreg.h
index 31f7879..430fa93 100644
--- a/sys/i386/isa/if_edreg.h
+++ b/sys/i386/isa/if_edreg.h
@@ -6,10 +6,10 @@
* of this software, nor does the author assume any responsibility
* for damages incurred with its use.
*
- * $Id: if_edreg.h,v 1.16 1994/08/04 17:42:35 davidg Exp $
+ * $Id: if_edreg.h,v 1.17 1995/01/23 19:06:08 davidg Exp $
*/
/*
- * National Semiconductor DS8390 NIC register definitions
+ * National Semiconductor DS8390 NIC register definitions
*
*
* Modification history
@@ -26,10 +26,10 @@
* changed double buffering flag to multi buffering
* made changes/additions for 3c503 multi-buffering
* ...companion to Rev. 2.0 of 'ed' driver.
- *
+ *
* Revision 1.1 93/06/23 03:01:07 davidg
* Initial revision
- *
+ *
*/
/*
@@ -378,7 +378,7 @@
* algorithm to allow prioritization of nodes.
*/
#define ED_TCR_OFST 0x10
-
+
/*
* bits 5, 6, and 7 are unused/reserved
*/
diff --git a/sys/i386/isa/if_eg.c b/sys/i386/isa/if_eg.c
index 00b5038..ec02037 100644
--- a/sys/i386/isa/if_eg.c
+++ b/sys/i386/isa/if_eg.c
@@ -27,7 +27,7 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
- * $Id: if_eg.c,v 1.2 1995/04/12 07:50:44 phk Exp $
+ * $Id: if_eg.c,v 1.3 1995/04/12 20:47:47 wollman Exp $
*/
/* To do:
@@ -101,8 +101,8 @@ struct eg_softc {
int eg_ctl; /* Control register R/W (EG_CTL_*) */
int eg_stat; /* Status register R/O (EG_STAT_*) */
int eg_data; /* Data register R/W (16 bits) */
- u_char eg_rom_major; /* Cards ROM version (major number) */
- u_char eg_rom_minor; /* Cards ROM version (minor number) */
+ u_char eg_rom_major; /* Cards ROM version (major number) */
+ u_char eg_rom_minor; /* Cards ROM version (minor number) */
short eg_ram; /* Amount of RAM on the card */
u_char eg_pcb[64]; /* Primary Command Block buffer */
u_char eg_incount; /* Number of buffers currently used */
@@ -152,13 +152,13 @@ static void egstop __P((struct eg_softc *));
/*
* Support stuff
*/
-
+
static inline void
egprintpcb(sc)
struct eg_softc *sc;
{
int i;
-
+
for (i = 0; i < sc->eg_pcb[1] + 2; i++)
dprintf(("eg#: pcb[%2d] = %x\n", i, sc->eg_pcb[i]));
}
@@ -168,7 +168,7 @@ static inline void
egprintstat(b)
u_char b;
{
- dprintf(("eg#: %s %s %s %s %s %s %s\n",
+ dprintf(("eg#: %s %s %s %s %s %s %s\n",
(b & EG_STAT_HCRE)?"HCRE":"",
(b & EG_STAT_ACRF)?"ACRF":"",
(b & EG_STAT_DIR )?"DIR ":"",
@@ -195,7 +195,7 @@ egoutPCB(sc, b)
dprintf(("eg#: egoutPCB failed\n"));
return 1;
}
-
+
static int
egreadPCBstat(sc, statb)
struct eg_softc *sc;
@@ -204,7 +204,7 @@ egreadPCBstat(sc, statb)
int i;
for (i=0; i < 5000; i++) {
- if (EG_PCB_STAT(inb(sc->eg_stat)))
+ if (EG_PCB_STAT(inb(sc->eg_stat)))
break;
DELAY(10);
}
@@ -227,7 +227,7 @@ egreadPCBready(sc)
dprintf(("eg#: PCB read not ready\n"));
return 1;
}
-
+
static int
egwritePCB(sc)
struct eg_softc *sc;
@@ -240,7 +240,7 @@ egwritePCB(sc)
len = sc->eg_pcb[1] + 2;
for (i = 0; i < len; i++)
egoutPCB(sc, sc->eg_pcb[i]);
-
+
for (i=0; i < 4000; i++) {
if (inb(sc->eg_stat) & EG_STAT_HCRE)
break;
@@ -252,15 +252,15 @@ egwritePCB(sc)
if (egreadPCBstat(sc, EG_PCB_ACCEPT))
return 1;
return 0;
-}
-
+}
+
static int
egreadPCB(sc)
struct eg_softc *sc;
{
int i;
u_char b;
-
+
outb(sc->eg_ctl, EG_PCB_MASK(inb(sc->eg_ctl)));
bzero(sc->eg_pcb, sizeof(sc->eg_pcb));
@@ -269,7 +269,7 @@ egreadPCB(sc)
return 1;
sc->eg_pcb[0] = inb(sc->eg_cmd);
-
+
if (egreadPCBready(sc))
return 1;
@@ -279,7 +279,7 @@ egreadPCB(sc)
dprintf(("eg#: len %d too large\n", sc->eg_pcb[1]));
return 1;
}
-
+
for (i = 0; i < sc->eg_pcb[1]; i++) {
if (egreadPCBready(sc))
return 1;
@@ -315,14 +315,14 @@ egprobe(struct isa_device * id)
dprintf(("eg#: Weird iobase %x\n", id->id_iobase));
return 0;
}
-
+
sc->eg_cmd = id->id_iobase + EG_COMMAND;
sc->eg_ctl = id->id_iobase + EG_CONTROL;
sc->eg_stat = id->id_iobase + EG_STATUS;
sc->eg_data = id->id_iobase + EG_DATA;
/* hard reset card */
- outb(sc->eg_ctl, EG_CTL_RESET);
+ outb(sc->eg_ctl, EG_CTL_RESET);
if (inb(sc->eg_ctl) != 0xc0)
return 0;
DELAY(5000);
@@ -342,7 +342,7 @@ egprobe(struct isa_device * id)
sc->eg_pcb[1] = 0;
if (egwritePCB(sc) != 0)
return 0;
-
+
if (egreadPCB(sc) != 0) {
egprintpcb(sc);
return 0;
@@ -356,7 +356,7 @@ egprobe(struct isa_device * id)
sc->eg_rom_major = sc->eg_pcb[3];
sc->eg_rom_minor = sc->eg_pcb[2];
sc->eg_ram = sc->eg_pcb[6] | (sc->eg_pcb[7] << 8);
-
+
return 8;
}
@@ -365,7 +365,7 @@ egattach (struct isa_device *id)
{
struct eg_softc *sc = &eg_softc[id->id_unit];
struct ifnet *ifp = &sc->sc_arpcom.ac_if;
-
+
egstop(sc);
sc->eg_pcb[0] = EG_CMD_GETEADDR; /* Get Station address */
@@ -373,7 +373,7 @@ egattach (struct isa_device *id)
if (egwritePCB(sc) != 0) {
dprintf(("eg#: write error\n"));
return 0;
- }
+ }
if (egreadPCB(sc) != 0) {
dprintf(("eg#: read error\n"));
egprintpcb(sc);
@@ -381,7 +381,7 @@ egattach (struct isa_device *id)
}
/* check Get station address response */
- if (sc->eg_pcb[0] != EG_RSP_GETEADDR || sc->eg_pcb[1] != 0x06) {
+ if (sc->eg_pcb[0] != EG_RSP_GETEADDR || sc->eg_pcb[1] != 0x06) {
dprintf(("eg#: parse error\n"));
egprintpcb(sc);
return 0;
@@ -420,18 +420,18 @@ egattach (struct isa_device *id)
ifp->if_ioctl = egioctl;
ifp->if_reset = egreset;
ifp->if_flags = IFF_BROADCAST | IFF_SIMPLEX | IFF_NOTRAILERS;
-
+
/* Now we can attach the interface. */
if_attach(ifp);
/* device attach does transition from UNCONFIGURED to IDLE state */
sc->kdc.kdc_state = DC_IDLE;
-
+
#if NBPFILTER > 0
bpfattach(&ifp->if_bpf, ifp, DLT_EN10MB, sizeof(struct ether_header));
#endif
-
+
return 1;
}
@@ -474,7 +474,7 @@ eginit(sc)
if (sc->eg_outbuf == NULL)
sc->eg_outbuf = malloc(EG_BUFLEN, M_TEMP, M_NOWAIT);
-
+
ifp->if_flags |= IFF_RUNNING;
ifp->if_flags &= ~IFF_OACTIVE;
@@ -523,7 +523,7 @@ egstart(ifp)
IF_DEQUEUE(&sc->sc_arpcom.ac_if.if_snd, m0);
if (m0 == NULL)
return;
-
+
sc->sc_arpcom.ac_if.if_flags |= IFF_OACTIVE;
/* Copy the datagram to the buffer. */
@@ -546,13 +546,13 @@ egstart(ifp)
bpf_mtap(sc->sc_arpcom.ac_if.if_bpf, m0);
#endif
m_freem(m0);
-
+
/* length must be a minimum of ETHER_MIN_LEN bytes */
len = max(len, ETHER_MIN_LEN);
/* set direction bit: host -> adapter */
- outb(sc->eg_ctl, inb(sc->eg_ctl) & ~EG_CTL_DIR);
-
+ outb(sc->eg_ctl, inb(sc->eg_ctl) & ~EG_CTL_DIR);
+
sc->eg_pcb[0] = EG_CMD_SENDPACKET;
sc->eg_pcb[1] = 0x06;
sc->eg_pcb[2] = 0; /* address not used, we send zero */
@@ -572,9 +572,9 @@ egstart(ifp)
sc->sc_arpcom.ac_if.if_oerrors++;
sc->sc_arpcom.ac_if.if_flags &= ~IFF_OACTIVE;
}
-
+
/* Set direction bit : Adapter -> host */
- outb(sc->eg_ctl, inb(sc->eg_ctl) | EG_CTL_DIR);
+ outb(sc->eg_ctl, inb(sc->eg_ctl) | EG_CTL_DIR);
return;
}
@@ -625,7 +625,7 @@ egintr(int unit)
dprintf(("\tno resources errors %d\n", *(short*) &sc->eg_pcb[14]));
dprintf(("\toverrun errors %d\n", *(short*) &sc->eg_pcb[16]));
break;
-
+
default:
dprintf(("eg#: egintr: Unknown response %x??\n",
sc->eg_pcb[0]));
@@ -649,7 +649,7 @@ egread(sc, buf, len)
struct ifnet *ifp;
struct mbuf *m;
struct ether_header *eh;
-
+
if (len <= sizeof(struct ether_header) ||
len > ETHER_MAX_LEN) {
dprintf(("eg#: Unacceptable packet size %d\n", len));
@@ -729,7 +729,7 @@ egioctl(ifp, command, data)
case AF_NS:
{
register struct ns_addr *ina = &IA_SNS(ifa)->sns_addr;
-
+
if (ns_nullhost(*ina))
ina->x_host =
*(union ns_host *)(sc->sc_arpcom.ac_enaddr);
@@ -806,6 +806,6 @@ static void
egstop(sc)
register struct eg_softc *sc;
{
-
+
outb(sc->eg_ctl, 0);
}
diff --git a/sys/i386/isa/if_egreg.h b/sys/i386/isa/if_egreg.h
index 81a1a87..c4647a0 100644
--- a/sys/i386/isa/if_egreg.h
+++ b/sys/i386/isa/if_egreg.h
@@ -27,7 +27,7 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
- * $Id$
+ * $Id: if_egreg.h,v 1.1 1995/04/08 09:39:36 phk Exp $
*/
/*
@@ -63,7 +63,7 @@
/*
* Host Status Register bits
- * EG_STAT_HRDY - Data Register ready
+ * EG_STAT_HRDY - Data Register ready
* EG_STAT_HCRE - Host Command Register empty
* EG_STAT_ACRF - Adapter Command register full
* EG_STAT_DIR - Direction flag, 0 = host -> adapter, 1 = adapter -> host
@@ -82,7 +82,7 @@
#define EG_STAT_ASF2 0x02
#define EG_STAT_ASF1 0x01
-#define EG_PCB_ACCEPT 1
+#define EG_PCB_ACCEPT 1
#define EG_PCB_REJECT 2
#define EG_PCB_DONE 3
#define EG_PCB_STAT(x) ((x)&3)
diff --git a/sys/i386/isa/if_el.c b/sys/i386/isa/if_el.c
index baaa3ba..2232a70 100644
--- a/sys/i386/isa/if_el.c
+++ b/sys/i386/isa/if_el.c
@@ -5,8 +5,8 @@
* portions thereof.
*
* Questions, comments, bug reports and fixes to kimmel@cs.umass.edu.
- *
- * $Id: if_el.c,v 1.11 1995/03/28 07:55:29 bde Exp $
+ *
+ * $Id: if_el.c,v 1.12 1995/04/12 20:47:48 wollman Exp $
*/
/* Except of course for the portions of code lifted from other FreeBSD
* drivers (mainly elread, elget and el_ioctl)
@@ -223,7 +223,7 @@ int el_attach(struct isa_device *idev)
* entry, if any.
*/
ifa = ifp->if_addrlist;
- while ((ifa != NULL) && (ifa->ifa_addr != NULL) &&
+ while ((ifa != NULL) && (ifa->ifa_addr != NULL) &&
(ifa->ifa_addr->sa_family != AF_LINK))
ifa = ifa->ifa_next;
if((ifa != NULL) && (ifa->ifa_addr != NULL)) {
@@ -427,7 +427,7 @@ void el_start(struct ifnet *ifp)
}
else
done = 1;
- }
+ }
else {
sc->arpcom.ac_if.if_opackets++;
done = 1;
@@ -558,7 +558,7 @@ void elintr(int unit)
stat = inb(base+EL_AS);
/* If so, do it all again (i.e. don't set done to 1) */
- if(!(stat & EL_AS_RXBUSY))
+ if(!(stat & EL_AS_RXBUSY))
dprintf(("<rescan> "));
else
done = 1;
@@ -723,8 +723,8 @@ el_ioctl(ifp, command, data)
ina->x_host =
*(union ns_host *)(sc->arpcom.ac_enaddr);
else {
- /*
- *
+ /*
+ *
*/
bcopy((caddr_t)ina->x_host.c_host,
(caddr_t)sc->arpcom.ac_enaddr,
diff --git a/sys/i386/isa/if_ep.c b/sys/i386/isa/if_ep.c
index de75d41..3b677d6 100644
--- a/sys/i386/isa/if_ep.c
+++ b/sys/i386/isa/if_ep.c
@@ -32,13 +32,13 @@
/*
* Modified from the FreeBSD 1.1.5.1 version by:
- * Andres Vega Garcia
+ * Andres Vega Garcia
* INRIA - Sophia Antipolis, France
* avega@sophia.inria.fr
*/
/*
- * $Id: if_ep.c,v 1.26 1995/04/12 20:47:49 wollman Exp $
+ * $Id: if_ep.c,v 1.27 1995/05/27 04:40:57 davidg Exp $
*
* Promiscuous mode added and interrupt logic slightly changed
* to reduce the number of adapter failures. Transceiver select
@@ -183,7 +183,7 @@ ep_look_for_board_at(is)
if (ep_current_tag == (EP_LAST_TAG + 1)) {
/* Come here just one time */
-
+
/* Look for the EISA boards, leave them activated */
for(j = 1; j < 16; j++) {
io_base = (j * EP_EISA_START) | EP_EISA_W0;
@@ -191,7 +191,7 @@ ep_look_for_board_at(is)
continue;
/* we must found 0x1f if the board is EISA configurated */
- if ((inw(io_base + EP_W0_ADDRESS_CFG) & 0x1f) != 0x1f)
+ if ((inw(io_base + EP_W0_ADDRESS_CFG) & 0x1f) != 0x1f)
continue;
/* Reset and Enable the card */
@@ -270,7 +270,7 @@ ep_look_for_board_at(is)
} else {
for (i=0; ep_board[i].epb_addr && ep_board[i].epb_addr != IS_BASE; i++);
- if( ep_board[i].epb_used || ep_board[i].epb_addr != IS_BASE)
+ if( ep_board[i].epb_used || ep_board[i].epb_addr != IS_BASE)
return 0;
if (inw(IS_BASE + EP_W0_EEPROM_COMMAND) & EEPROM_TST_MODE)
@@ -455,10 +455,10 @@ epattach(is)
sc->rx_avg_pkt = 128;
/*
- * NOTE: In all this I multiply everything by 64.
- * W_s = the speed the CPU is able to write to the TX FIFO.
+ * NOTE: In all this I multiply everything by 64.
+ * W_s = the speed the CPU is able to write to the TX FIFO.
* T_s = the speed the board sends the info to the Ether.
- * W_s/T_s = 16 (represents 16/64) => W_s = 25 % of T_s.
+ * W_s/T_s = 16 (represents 16/64) => W_s = 25 % of T_s.
* This will give us for a packet of 1500 bytes
* tx_start_thresh=1125 and for a pkt of 64 bytes tx_start_threshold=48.
* We prefer to start thinking the CPU is much slower than the Ethernet
@@ -814,7 +814,7 @@ rescan:
sc->rx_no_first, sc->rx_no_mbuf, sc->rx_bpf_disc, sc->rx_overrunf,
sc->rx_overrunl, sc->tx_underrun);
#else
- printf("ep%d: Status: %x\n", unit, status);
+ printf("ep%d: Status: %x\n", unit, status);
#endif
epinit(unit);
splx(x);
@@ -865,7 +865,7 @@ rescan:
outw(BASE + EP_COMMAND, C_INTR_LATCH); /* ACK int Latch */
- if ((status = inw(BASE + EP_STATUS)) & S_5_INTS)
+ if ((status = inw(BASE + EP_STATUS)) & S_5_INTS)
goto rescan;
/* re-enable Ints */
@@ -1195,17 +1195,17 @@ epioctl(ifp, cmd, data)
sizeof(sc->sc_addr));
break;
#endif
- case SIOCSIFMTU:
+ case SIOCSIFMTU:
/*
* Set the interface MTU.
*/
- if (ifr->ifr_mtu > ETHERMTU) {
- error = EINVAL;
+ if (ifr->ifr_mtu > ETHERMTU) {
+ error = EINVAL;
} else {
- ifp->if_mtu = ifr->ifr_mtu;
+ ifp->if_mtu = ifr->ifr_mtu;
}
- break;
+ break;
default:
error = EINVAL;
diff --git a/sys/i386/isa/if_epreg.h b/sys/i386/isa/if_epreg.h
index a905caa..e0b7d09 100644
--- a/sys/i386/isa/if_epreg.h
+++ b/sys/i386/isa/if_epreg.h
@@ -1,13 +1,13 @@
/*
* Copyright (c) 1993 Herb Peyerl (hpeyerl@novatel.ca) All rights reserved.
- *
+ *
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met: 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer. 2. The name
* of the author may not be used to endorse or promote products derived from
* this software withough specific prior written permission
- *
+ *
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
@@ -18,20 +18,20 @@
* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
+ *
* if_epreg.h,v 1.4 1994/11/13 10:12:37 gibbs Exp Modified by:
- *
+ *
October 2, 1994
-
- Modified by: Andres Vega Garcia
- INRIA - Sophia Antipolis, France
- e-mail: avega@sophia.inria.fr
+ Modified by: Andres Vega Garcia
+
+ INRIA - Sophia Antipolis, France
+ e-mail: avega@sophia.inria.fr
finger: avega@pax.inria.fr
*/
/*
- * $Id: if_epreg.h,v 1.8 1995/04/10 07:48:03 root Exp root $
+ * $Id: if_epreg.h,v 1.7 1995/04/10 21:25:06 jkh Exp $
*
* Promiscuous mode added and interrupt logic slightly changed
* to reduce the number of adapter failures. Transceiver select
@@ -349,7 +349,7 @@ struct ep_softc {
#define SET_IRQ(i) (((i)<<12) | 0xF00) /* set IRQ i */
/*
- * FIFO Registers.
+ * FIFO Registers.
* RX Status. Window 1/Port 08
*
* 15: Incomplete or FIFO empty.
@@ -375,7 +375,7 @@ struct ep_softc {
#define ERR_RX_DRIBBLE (u_short) (0x2<<11)
/*
- * FIFO Registers.
+ * FIFO Registers.
* TX Status. Window 1/Port 0B
*
* Reports the transmit status of a completed transmission. Writing this
@@ -400,7 +400,7 @@ struct ep_softc {
#define TXS_STATUS_OVERFLOW 0x4
/*
- * Configuration control register.
+ * Configuration control register.
* Window 0/Port 04
*/
/* Read */
@@ -411,7 +411,7 @@ struct ep_softc {
#define ENABLE_DRQ_IRQ 0x0001
#define W0_P4_CMD_RESET_ADAPTER 0x4
#define W0_P4_CMD_ENABLE_ADAPTER 0x1
-/*
+/*
* Media type and status.
* Window 4/Port 0A
*/
diff --git a/sys/i386/isa/if_fe.c b/sys/i386/isa/if_fe.c
index ab09ce5..80aba82 100644
--- a/sys/i386/isa/if_fe.c
+++ b/sys/i386/isa/if_fe.c
@@ -806,7 +806,7 @@ fe_probe_ati ( struct isa_device * isa_dev, struct fe_softc * sc )
/*
* Determine the card type.
- * There may be a way to identify various models. FIXME.
+ * There may be a way to identify various models. FIXME.
*/
sc->type = FE_TYPE_AT1700;
sc->typestr = "AT1700/RE2000";
@@ -1552,7 +1552,7 @@ fe_start ( struct ifnet *ifp )
* We *could* do better job by peeking the send queue to
* know the length of the next packet. Current version just
* tests against the worst case (i.e., longest packet). FIXME.
- *
+ *
* When adding the packet-peek feature, don't forget adding a
* test on txb_count against QUEUEING_MAX.
* There is a little chance the packet count exceeds
@@ -1755,7 +1755,7 @@ fe_tint ( struct fe_softc * sc, u_char tstat )
/*
* The transmitter is no more active.
- * Reset output active flag and watchdog timer.
+ * Reset output active flag and watchdog timer.
*/
sc->sc_if.if_flags &= ~IFF_OACTIVE;
sc->sc_if.if_timer = 0;
@@ -1879,7 +1879,7 @@ fe_rint ( struct fe_softc * sc, u_char rstat )
"fe%d: received a short packet? (%u bytes)\n",
sc->sc_unit, len );
}
-#endif
+#endif
/*
* Go get a packet.
@@ -1920,7 +1920,7 @@ feintr ( int unit )
* Loop until there are no more new interrupt conditions.
*/
for (;;) {
-
+
#if FE_DEBUG >= 4
fe_dump( LOG_INFO, sc, "intr()" );
#endif
@@ -2312,7 +2312,7 @@ fe_get_packet ( struct fe_softc * sc, u_short len )
*
* If an mbuf chain is too long for an Ethernet frame, it is not sent.
* Packets shorter than Ethernet minimum are legal, and we pad them
- * before sending out. An exception is "partial" packets which are
+ * before sending out. An exception is "partial" packets which are
* shorter than mandatory Ethernet header.
*
* I wrote a code for an experimental "delayed padding" technique.
@@ -2403,7 +2403,7 @@ fe_write_mbufs ( struct fe_softc *sc, struct mbuf *m )
#endif
/*
- * Transfer the data from mbuf chain to the transmission buffer.
+ * Transfer the data from mbuf chain to the transmission buffer.
* MB86960 seems to require that data be transferred as words, and
* only words. So that we require some extra code to patch
* over odd-length mbufs.
@@ -2503,7 +2503,7 @@ fe_mcaf ( struct fe_softc *sc )
log( LOG_INFO, "fe%d: hash(%s) == %d\n",
sc->sc_unit, ether_sprintf( enm->enm_addrlo ), index );
#endif
-
+
filter.data[index >> 3] |= 1 << (index & 7);
ETHER_NEXT_MULTI(step, enm);
}
@@ -2669,7 +2669,7 @@ fe_setlinkaddr ( struct fe_softc * sc )
{
struct ifaddr *ifa;
struct sockaddr_dl * sdl;
-
+
/*
* Search down the ifa address list looking for the AF_LINK type entry.
*/
diff --git a/sys/i386/isa/if_ie.c b/sys/i386/isa/if_ie.c
index 5e85521..8f4b47a 100644
--- a/sys/i386/isa/if_ie.c
+++ b/sys/i386/isa/if_ie.c
@@ -43,7 +43,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: if_ie.c,v 1.22 1995/03/28 07:55:31 bde Exp $
+ * $Id: if_ie.c,v 1.23 1995/04/12 20:47:50 wollman Exp $
*/
/*
@@ -60,7 +60,7 @@
/*
* The i82586 is a very versatile chip, found in many implementations.
* Programming this chip is mostly the same, but certain details differ
- * from card to card. This driver is written so that different cards
+ * from card to card. This driver is written so that different cards
* can be automatically detected at run-time. Currently, only the
* AT&T EN100/StarLAN 10 series are supported.
*/
@@ -231,7 +231,7 @@ const char *ie_hardware_names[] = {
"Unknown"
};
-/*
+/*
sizeof(iscp) == 1+1+2+4 == 8
sizeof(scb) == 2+2+2+2+2+2+2+2 == 16
NFRAMES * sizeof(rfd) == NFRAMES*(2+2+2+2+6+6+2+2) == NFRAMES*24 == 384
@@ -274,7 +274,7 @@ struct ie_softc {
caddr_t iomembot;
unsigned iosize;
int bus_use; /* 0 means 16bit, 1 means 8 bit adapter */
-
+
int want_mcsetup;
int promisc;
volatile struct ie_int_sys_conf_ptr *iscp;
@@ -400,7 +400,7 @@ static int sl_probe(dvp)
break;
default:
- printf("ie%d: unknown AT&T board type code %d\n", unit,
+ printf("ie%d: unknown AT&T board type code %d\n", unit,
ie_softc[unit].hard_type);
return 0;
}
@@ -417,22 +417,22 @@ static int el_probe(dvp)
int i;
u_char signature[] = "*3COM*";
int unit = dvp->id_unit;
-
+
sc->port = dvp->id_iobase;
sc->iomembot = dvp->id_maddr;
sc->bus_use = 0;
-
+
/* Need this for part of the probe. */
sc->ie_reset_586 = el_reset_586;
sc->ie_chan_attn = el_chan_attn;
-
+
/* Reset and put card in CONFIG state without changing address. */
elink_reset();
outb(ELINK_ID_PORT, 0x00);
elink_idseq(ELINK_507_POLY);
elink_idseq(ELINK_507_POLY);
outb(ELINK_ID_PORT, 0xff);
-
+
c = inb(PORT + IE507_MADDR);
if(c & 0x20) {
#ifdef DEBUG
@@ -440,50 +440,50 @@ static int el_probe(dvp)
#endif
return 0;
}
-
+
/* go to RUN state */
outb(ELINK_ID_PORT, 0x00);
elink_idseq(ELINK_507_POLY);
outb(ELINK_ID_PORT, 0x00);
-
+
outb(PORT + IE507_CTRL, EL_CTRL_NRST);
-
+
for (i = 0; i < 6; i++)
if (inb(PORT + i) != signature[i])
return 0;
-
+
c = inb(PORT + IE507_IRQ) & 0x0f;
-
+
if (dvp->id_irq != (1 << c)) {
printf("ie%d: kernel configured irq %d doesn't match board configured irq %d\n",
unit, ffs(dvp->id_irq) - 1, c);
return 0;
}
-
+
c = (inb(PORT + IE507_MADDR) & 0x1c) + 0xc0;
-
+
if (kvtop(dvp->id_maddr) != ((int)c << 12)) {
printf("ie%d: kernel configured maddr %lx doesn't match board configured maddr %x\n",
unit, kvtop(dvp->id_maddr),(int)c << 12);
return 0;
}
-
+
outb(PORT + IE507_CTRL, EL_CTRL_NORMAL);
-
+
sc->hard_type = IE_3C507;
sc->hard_vers = 0; /* 3C507 has no version number. */
-
+
/*
* Divine memory size on-board the card.
*/
find_ie_mem_size(unit);
-
+
if (!sc->iosize) {
printf("ie%d: can't find shared memory\n", unit);
outb(PORT + IE507_CTRL, EL_CTRL_NRST);
return 0;
}
-
+
if(!dvp->id_msize)
dvp->id_msize = sc->iosize;
else if (dvp->id_msize != sc->iosize) {
@@ -492,12 +492,12 @@ static int el_probe(dvp)
outb(PORT + IE507_CTRL, EL_CTRL_NRST);
return 0;
}
-
+
sl_read_ether(unit, ie_softc[unit].arpcom.ac_enaddr);
-
+
/* Clear the interrupt latch just in case. */
outb(PORT + IE507_ICTRL, 1);
-
+
return 16;
}
@@ -538,7 +538,7 @@ static int ni_probe(dvp)
find_ie_mem_size(unit);
if(!ie_softc[unit].iosize) {
- return 0;
+ return 0;
}
if(!dvp->id_msize)
@@ -570,7 +570,7 @@ ieattach(dvp)
ifp->if_unit = unit;
ifp->if_name = iedriver.name;
ifp->if_mtu = ETHERMTU;
- printf(" <%s R%d> ethernet address %s\n",
+ printf(" <%s R%d> ethernet address %s\n",
ie_hardware_names[ie_softc[unit].hard_type],
ie_softc[unit].hard_vers + 1,
ether_sprintf(ie->arpcom.ac_enaddr));
@@ -586,7 +586,7 @@ ieattach(dvp)
ifp->if_type = IFT_ETHER;
ifp->if_addrlen = 6;
ifp->if_hdrlen = 14;
-
+
#if NBPFILTER > 0
bpfattach(&ie_softc[unit].ie_bpf, ifp, DLT_EN10MB,
sizeof(struct ether_header));
@@ -840,7 +840,7 @@ static inline int ether_equal(u_char *one, u_char *two) {
* only client which will fiddle with IFF_PROMISC is BPF. This is
* probably a good assumption, but we do not make it here. (Yet.)
*/
-static inline int check_eh(struct ie_softc *ie,
+static inline int check_eh(struct ie_softc *ie,
struct ether_header *eh,
int *to_bpf) {
int i;
@@ -902,7 +902,7 @@ static inline int check_eh(struct ie_softc *ie,
#endif
/* We want to see multicasts. */
if(eh->ether_dhost[0] & 1) return 1;
-
+
/* We want to see our own packets */
if(ether_equal(eh->ether_dhost, ie->arpcom.ac_enaddr)) return 1;
@@ -1032,7 +1032,7 @@ static inline int ieget(unit, ie, mp, ehp, to_bpf)
*/
do { /* while(resid > 0) */
/*
- * Try to allocate an mbuf to hold the data that we have. If we
+ * Try to allocate an mbuf to hold the data that we have. If we
* already allocated one, just get another one and stick it on the
* end (eventually). If we don't already have one, try to allocate
* an mbuf cluster big enough to hold the whole packet, if we think it's
@@ -1317,12 +1317,12 @@ iestart(ifp)
ie->xmit_buffs[ie->xmit_count]->ie_xmit_flags = IE_XMIT_LAST | len;
ie->xmit_buffs[ie->xmit_count]->ie_xmit_next = 0xffff;
- ie->xmit_buffs[ie->xmit_count]->ie_xmit_buf =
+ ie->xmit_buffs[ie->xmit_count]->ie_xmit_buf =
MK_24(ie->iomem, ie->xmit_cbuffs[ie->xmit_count]);
ie->xmit_cmds[ie->xmit_count]->com.ie_cmd_cmd = IE_CMD_XMIT;
ie->xmit_cmds[ie->xmit_count]->ie_xmit_status = 0;
- ie->xmit_cmds[ie->xmit_count]->ie_xmit_desc =
+ ie->xmit_cmds[ie->xmit_count]->ie_xmit_desc =
MK_16(ie->iomem, ie->xmit_buffs[ie->xmit_count]);
*bptr = MK_16(ie->iomem, ie->xmit_cmds[ie->xmit_count]);
@@ -1334,7 +1334,7 @@ iestart(ifp)
* If we queued up anything for transmission, send it.
*/
if(ie->xmit_count) {
- ie->xmit_cmds[ie->xmit_count - 1]->com.ie_cmd_cmd |=
+ ie->xmit_cmds[ie->xmit_count - 1]->com.ie_cmd_cmd |=
IE_CMD_LAST | IE_CMD_INTR;
/*
@@ -1369,7 +1369,7 @@ int check_ie_present(unit, where, size)
scp = (volatile struct ie_sys_conf_ptr *)(realbase + IE_SCP_ADDR);
bzero((char *)scp, sizeof *scp); /* ignore cast-qual */
-
+
/*
* First we put the ISCP at the bottom of memory; this tests to make
* sure that our idea of the size of memory is the same as the controller's.
@@ -1402,7 +1402,7 @@ int check_ie_present(unit, where, size)
* Now relocate the ISCP to its real home, and reset the controller
* again.
*/
- iscp = (void *)Align((caddr_t)(realbase + IE_SCP_ADDR -
+ iscp = (void *)Align((caddr_t)(realbase + IE_SCP_ADDR -
sizeof(struct ie_int_sys_conf_ptr)));
bzero((char *)iscp, sizeof *iscp); /* ignore cast-qual */
@@ -1526,7 +1526,7 @@ iereset(unit)
ie_softc[unit].arpcom.ac_if.if_flags |= IFF_UP;
ieioctl(&ie_softc[unit].arpcom.ac_if, SIOCSIFFLAGS, 0);
-
+
splx(s);
return;
}
@@ -1561,7 +1561,7 @@ static int command_and_wait(unit, cmd, pcmd, mask)
extern int hz;
ie_softc[unit].scb->ie_command = (u_short)cmd;
-
+
if(IE_ACTION_COMMAND(cmd) && pcmd) {
(*ie_softc[unit].ie_chan_attn)(unit);
@@ -1589,7 +1589,7 @@ static int command_and_wait(unit, cmd, pcmd, mask)
return timedout;
} else {
-
+
/*
* Otherwise, just wait for the command to be accepted.
*/
@@ -1624,7 +1624,7 @@ static void run_tdr(unit, cmd)
else
result = cmd->ie_tdr_time;
- ie_ack(ie_softc[unit].scb, IE_ST_WHENCE, unit,
+ ie_ack(ie_softc[unit].scb, IE_ST_WHENCE, unit,
ie_softc[unit].ie_chan_attn);
if(result & IE_TDR_SUCCESS)
@@ -1633,7 +1633,7 @@ static void run_tdr(unit, cmd)
if(result & IE_TDR_XCVR) {
printf("ie%d: transceiver problem\n", unit);
} else if(result & IE_TDR_OPEN) {
- printf("ie%d: TDR detected an open %d clocks away\n", unit,
+ printf("ie%d: TDR detected an open %d clocks away\n", unit,
result & IE_TDR_TIME);
} else if(result & IE_TDR_SHORT) {
printf("ie%d: TDR detected a short %d clocks away\n", unit,
@@ -1674,13 +1674,13 @@ static caddr_t setup_rfa(caddr_t ptr, struct ie_softc *ie) {
}
ptr = (caddr_t)Align((caddr_t)rfd); /* ignore cast-qual */
-
+
/* Now link them together */
for(i = 0; i < NFRAMES; i++) {
ie->rframes[i]->ie_fd_next =
MK_16(MEM, ie->rframes[(i + 1) % NFRAMES]);
}
-
+
/* Finally, set the EOL bit on the last one. */
ie->rframes[NFRAMES - 1]->ie_fd_last |= IE_FD_LAST;
@@ -1701,12 +1701,12 @@ static caddr_t setup_rfa(caddr_t ptr, struct ie_softc *ie) {
ptr += IE_RBUF_SIZE;
rbd = (void *)ptr;
}
-
+
/* Now link them together */
for(i = 0; i < NBUFFS; i++) {
ie->rbuffs[i]->ie_rbd_next = MK_16(MEM, ie->rbuffs[(i + 1) % NBUFFS]);
}
-
+
/* Tag EOF on the last one */
ie->rbuffs[NBUFFS - 1]->ie_rbd_length |= IE_RBD_LAST;
@@ -1728,21 +1728,21 @@ static caddr_t setup_rfa(caddr_t ptr, struct ie_softc *ie) {
* Run the multicast setup command.
* Call at splimp().
*/
-static int mc_setup(int unit, caddr_t ptr,
+static int mc_setup(int unit, caddr_t ptr,
volatile struct ie_sys_ctl_block *scb) {
struct ie_softc *ie = &ie_softc[unit];
volatile struct ie_mcast_cmd *cmd = (void *)ptr;
-
+
cmd->com.ie_cmd_status = 0;
cmd->com.ie_cmd_cmd = IE_CMD_MCAST | IE_CMD_LAST;
cmd->com.ie_cmd_link = 0xffff;
-
+
/* ignore cast-qual */
bcopy((caddr_t)ie->mcast_addrs, (caddr_t)cmd->ie_mcast_addrs,
ie->mcast_count * sizeof *ie->mcast_addrs);
cmd->ie_mcast_bytes = ie->mcast_count * 6; /* grrr... */
-
+
scb->ie_command_list = MK_16(MEM, cmd);
if(command_and_wait(unit, IE_CU_START, cmd, IE_STAT_COMPL)
|| !(cmd->com.ie_cmd_status & IE_STAT_OK)) {
@@ -1934,7 +1934,7 @@ ieioctl(ifp, command, data)
ie_stop(ifp->if_unit);
} else if((ifp->if_flags & IFF_UP) &&
(ifp->if_flags & IFF_RUNNING) == 0) {
- ie_softc[ifp->if_unit].promisc =
+ ie_softc[ifp->if_unit].promisc =
ifp->if_flags & (IFF_PROMISC | IFF_ALLMULTI);
ieinit(ifp->if_unit);
} else if(ie_softc[ifp->if_unit].promisc ^
diff --git a/sys/i386/isa/if_ix.c b/sys/i386/isa/if_ix.c
index 87dfe7f..cf6158f 100644
--- a/sys/i386/isa/if_ix.c
+++ b/sys/i386/isa/if_ix.c
@@ -28,7 +28,7 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
- * $Id: if_ix.c,v 1.5 1995/03/02 08:17:14 rgrimes Exp $
+ * $Id: if_ix.c,v 1.6 1995/05/10 15:19:25 rgrimes Exp $
*/
#include "ix.h"
@@ -431,7 +431,7 @@ ixprobe(struct isa_device *dvp) {
goto ixprobe_exit;
}
}
-
+
if ((kvtop(dvp->id_maddr) < 0xC0000) ||
(kvtop(dvp->id_maddr) + dvp->id_msize > 0xF0000)) {
printf("ixprobe mapped memory address out of range\n");
@@ -573,7 +573,7 @@ ixattach(struct isa_device *dvp) {
ifp->if_mtu = ETHERMTU;
ifp->if_flags = IFF_NOTRAILERS | IFF_BROADCAST;
/*
- * This is commented out to save memory and cpu time
+ * This is commented out to save memory and cpu time
* ifp->if_timer = 0;
* ifp->if_metric = 0;
* ifp->if_addrlist = 0;
@@ -592,7 +592,7 @@ ixattach(struct isa_device *dvp) {
ifp->if_reset = ixreset;
ifp->if_watchdog = ixwatchdog;
/*
- * This is commented out to save memory and cpu time
+ * This is commented out to save memory and cpu time
* ifp->if_ipackets = 0;
* ifp->if_ierrors = 0;
* ifp->if_opackets = 0;
@@ -605,7 +605,7 @@ ixattach(struct isa_device *dvp) {
ifp->if_addrlen = ETHER_ADDRESS_LENGTH;
ifp->if_hdrlen = ETHER_HEADER_LENGTH;
/*
- * This is commented out to save memory and cpu time
+ * This is commented out to save memory and cpu time
* ifp->if_index = 0;
* ifp->if_lastchange.tv_sec = 0;
* ifp->if_lastchange.tv_usec = 0;
@@ -770,7 +770,7 @@ ixinit(int unit) {
collision detect source external */
cb_conf->byte[10] = 60; /* minimum number of bytes is a frame */
cb_conf->byte[11] = 0; /* unused */
-
+
scb->command = SCB_CUC_START;
ixchannel_attention(unit);
status |= ix_cb_wait((cb_t *)cb_conf, "Configure");
@@ -859,7 +859,7 @@ ixinit_rfa(int unit) {
rbd = (rbd_t *)(sc->maddr +
RFA_START +
(how_many_frames * sizeof(rfd_t)));
- rb = sc->maddr + RFA_START +
+ rb = sc->maddr + RFA_START +
(how_many_frames * (sizeof(rfd_t) + sizeof(rbd_t)));
sc->rfd_head = rfd;
sc->rbd_head = rbd;
@@ -906,7 +906,7 @@ ixinit_rfa(int unit) {
rbd = (rbd_t *)(sc->maddr +
RFA_START +
(how_many_frames * sizeof(rfd_t)));
- rb = sc->maddr + RFA_START +
+ rb = sc->maddr + RFA_START +
(how_many_frames * (sizeof(rfd_t) + sizeof(rbd_t)));
printf(" complete_frame_size = %d\n", complete_frame_size);
printf(" how_many_frames = %d\n", how_many_frames);
@@ -976,7 +976,7 @@ ixinit_tfa(int unit) {
tbd = (tbd_t *)(sc->maddr +
TFA_START +
(TB_COUNT * sizeof(cb_transmit_t)));
- tb = sc->maddr + TFA_START +
+ tb = sc->maddr + TFA_START +
(TB_COUNT * (sizeof(cb_transmit_t) + sizeof(tbd_t)));
sc->cb_head = (cb_t *)cb;
sc->tbd_head = tbd;
@@ -1013,7 +1013,7 @@ ixinit_tfa(int unit) {
tbd = (tbd_t *)(sc->maddr +
TFA_START +
(TB_COUNT * sizeof(cb_transmit_t)));
- tb = sc->maddr + TFA_START +
+ tb = sc->maddr + TFA_START +
(TB_COUNT * (sizeof(cb_transmit_t) + sizeof(tbd_t)));
printf(" TB_COUNT = %d\n", TB_COUNT);
printf(" cb_head = %lx\t\tcb_tail = %lx\n",
@@ -1109,7 +1109,7 @@ ixintr(int unit) {
if (check_queue && ifp->if_snd.ifq_head != 0) {
ixstart(ifp); /* we have stuff on the queue */
}
-
+
ixintr_exit:
DEBUGBEGIN(DEBUGINTR)
DEBUGDO(printf(" ixintr exited\n");)
@@ -1415,7 +1415,7 @@ ixstart(struct ifnet *ifp) {
IF_DEQUEUE(&ifp->if_snd, m);
length = 0;
for (m_temp = m; m_temp != 0; m_temp = m_temp->m_next) {
- bcopy(mtod(m_temp, caddr_t), tb, m_temp->m_len);
+ bcopy(mtod(m_temp, caddr_t), tb, m_temp->m_len);
tb += m_temp->m_len;
length += m_temp->m_len;
}
@@ -1427,7 +1427,7 @@ ixstart(struct ifnet *ifp) {
* This should never ever happen, if it does
* we probable screwed up all sorts of board data
* in the above bcopy's and should probably shut
- * down, but for now just issue a warning that
+ * down, but for now just issue a warning that
* something is real wrong
*/
printf("ix%d: ixstart: Packet length=%d > MTU=%d\n",
diff --git a/sys/i386/isa/if_ixreg.h b/sys/i386/isa/if_ixreg.h
index 722e104..3dd4903 100644
--- a/sys/i386/isa/if_ixreg.h
+++ b/sys/i386/isa/if_ixreg.h
@@ -28,7 +28,7 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
- * $Id: if_ixreg.h,v 1.4 1995/03/02 07:40:27 rgrimes Exp $
+ * $Id: if_ixreg.h,v 1.5 1995/05/10 15:19:29 rgrimes Exp $
*/
/*
@@ -126,7 +126,7 @@
* Receive Frame Descriptors
* Receive Frames
* SCB_ADDR System Control Block
- * ISCP_ADDR Intermediate System Configuration Pointer
+ * ISCP_ADDR Intermediate System Configuration Pointer
* High: SCP_ADDR System Configuration Pointer
*/
#define SCP_ADDR (sc->msize - sizeof(scp_t))
@@ -275,7 +275,7 @@ typedef struct /* command block - transmit command */
u_char byte[16]; /* XXX stupid fill tell I fix the ixinit
* code for the special cb's */
} cb_transmit_t;
-
+
typedef struct /* command block - tdr command */
{
cb_t common; /* common part of all command blocks */
diff --git a/sys/i386/isa/if_le.c b/sys/i386/isa/if_le.c
index 9fb21f3..0f93c75 100644
--- a/sys/i386/isa/if_le.c
+++ b/sys/i386/isa/if_le.c
@@ -21,7 +21,7 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
- * $Id: if_le.c,v 1.15 1995/04/17 05:52:17 bde Exp $
+ * $Id: if_le.c,v 1.16 1995/05/09 12:25:55 rgrimes Exp $
*/
/*
@@ -204,7 +204,7 @@ struct le_lance_info {
/*
* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
*
- * Start of Common Code
+ * Start of Common Code
*
*/
@@ -258,7 +258,7 @@ struct le_board {
int (*bd_probe)(le_softc_t *sc, const le_board_t *bd, int *msize);
};
-
+
le_softc_t le_softc[NLE];
const le_board_t le_boards[] = {
@@ -374,7 +374,7 @@ le_probe(
return iospace;
}
}
- printf("%s%d: no board found at 0x%x\n",
+ printf("%s%d: no board found at 0x%x\n",
sc->le_if.if_name, sc->le_if.if_unit, dvp->id_iobase);
return 0;
}
@@ -388,7 +388,7 @@ le_attach(
struct ifaddr *ifa = ifp->if_addrlist;
ifp->if_mtu = ETHERMTU;
- printf("%s%d: %s ethernet address %s\n",
+ printf("%s%d: %s ethernet address %s\n",
ifp->if_name, ifp->if_unit,
sc->le_prodname,
ether_sprintf(sc->le_ac.ac_enaddr));
@@ -400,7 +400,7 @@ le_attach(
ifp->if_type = IFT_ETHER;
ifp->if_addrlen = 6;
ifp->if_hdrlen = 14;
-
+
#if NBPFILTER > 0
bpfattach(&sc->le_bpf, ifp, DLT_EN10MB, sizeof(struct ether_header));
#endif
@@ -630,7 +630,7 @@ le_ioctl(
}
splx(s);
- kdc_le[ifp->if_unit].kdc_state = (ifp->if_flags & IFF_UP)
+ kdc_le[ifp->if_unit].kdc_state = (ifp->if_flags & IFF_UP)
? DC_BUSY : DC_IDLE;
return error;
}
@@ -646,15 +646,15 @@ le_read_macaddr(
int skippat)
{
int cksum, rom_cksum;
-
+
if (!skippat) {
int idx, idx2, found, octet;
static u_char testpat[] = { 0xFF, 0, 0x55, 0xAA, 0xFF, 0, 0x55, 0xAA };
idx2 = found = 0;
-
+
for (idx = 0; idx < 32; idx++) {
octet = LE_INB(sc, ioreg);
-
+
if (octet == testpat[idx2]) {
if (++idx2 == sizeof testpat) {
++found;
@@ -664,7 +664,7 @@ le_read_macaddr(
idx2 = 0;
}
}
-
+
if (!found)
return -1;
}
@@ -691,7 +691,7 @@ le_read_macaddr(
rom_cksum = LE_INB(sc, ioreg);
rom_cksum |= LE_INB(sc, ioreg) << 8;
-
+
if (cksum != rom_cksum)
return -1;
return 0;
@@ -746,7 +746,7 @@ le_multi_op(
u_int idx, bit, data, crc = 0xFFFFFFFFUL;
#ifdef __alpha
- for (data = *(__unaligned u_long *) mca, bit = 0; bit < 48; bit++, data >>=
+ for (data = *(__unaligned u_long *) mca, bit = 0; bit < 48; bit++, data >>=
1)
crc = (crc >> 1) ^ (((crc ^ data) & 1) ? LE_CRC32_POLY : 0);
#else
@@ -756,7 +756,7 @@ le_multi_op(
#endif
/*
* The following two line convert the N bit index into a longword index
- * and a longword mask.
+ * and a longword mask.
*/
crc &= sc->le_mcmask;
bit = 1 << (crc & (LE_MC_NBPW -1));
@@ -776,7 +776,7 @@ le_multi_op(
/*
* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
*
- * Start of DEC EtherWORKS III (LEMAC) dependent code
+ * Start of DEC EtherWORKS III (LEMAC) dependent code
*
*/
@@ -894,7 +894,7 @@ lemac_probe(
return LEMAC_IOSPACE;
}
-/*
+/*
* Do a hard reset of the board;
*/
static void
@@ -923,7 +923,7 @@ lemac_reset(
* is important because functions hereafter may rely on information
* read from the EEPROM.
*/
- if ((cksum = lemac_read_eeprom(sc)) != LEMAC_EEP_CKSUM) {
+ if ((cksum = lemac_read_eeprom(sc)) != LEMAC_EEP_CKSUM) {
printf("%s%d: reset: EEPROM checksum failed (0x%x)\n",
sc->le_if.if_name, sc->le_if.if_unit, cksum);
return;
@@ -1068,7 +1068,7 @@ lemac_rne_intr(
while (rxcount--) {
rxpg = LE_INB(sc, LEMAC_REG_RQ);
LE_OUTB(sc, LEMAC_REG_MPN, rxpg);
-
+
rxptr = sc->le_membase;
sc->le_if.if_ipackets++;
if (*rxptr & LEMAC_RX_OK) {
@@ -1085,7 +1085,7 @@ lemac_rne_intr(
next:
LE_OUTB(sc, LEMAC_REG_FMQ, rxpg); /* Return this page to Free Memory Queue */
} /* end while (recv_count--) */
-
+
return;
}
@@ -1140,7 +1140,7 @@ lemac_rxd_intr(
return;
}
-static void
+static void
lemac_start(
struct ifnet *ifp)
{
@@ -1381,7 +1381,7 @@ struct {
#define LN_WRCSR(sc, val) (LE_OUTW(sc, sc->lance_rdp, val))
#define LN_RDCSR(sc) (LE_INW(sc, sc->lance_rdp))
-
+
#define LN_ZERO(sc, vaddr, len) bzero(vaddr, len)
#define LN_COPYTO(sc, from, to, len) bcopy(from, to, len)
@@ -1441,7 +1441,7 @@ typedef enum {
DEPCA_UNKNOWN
} depca_t;
-static const char *depca_signatures[] = {
+static const char *depca_signatures[] = {
"DEPCA",
"DE100", "DE101",
"EE100",
@@ -1465,7 +1465,7 @@ depca_probe(
*/
nicsr = DEPCA_RDNICSR(sc);
nicsr &= ~(DEPCA_NICSR_SHE|DEPCA_NICSR_LED|DEPCA_NICSR_ENABINTR);
-
+
if (nicsr & DEPCA_NICSR_32KRAM) {
/*
* Make we are going to read the upper
@@ -1558,7 +1558,7 @@ depca_intr(
}
/*
- * Here's as good a place to describe our paritioning of the
+ * Here's as good a place to describe our paritioning of the
* LANCE shared RAM space. (NOTE: this driver does not yet support
* the concept of a LANCE being able to DMA).
*
@@ -1946,7 +1946,7 @@ lance_rx_intr(
} else {
/*
* If the packet is bad, increment the
- * counters.
+ * counters.
*/
sc->le_if.if_ierrors++;
if (desc.d_flag & LN_DFLAG_RxBADCRC)
@@ -1991,7 +1991,7 @@ lance_start(
IF_DEQUEUE(ifq, m);
if (m == NULL)
break;
-
+
/*
* Make the packet meets the minimum size for Ethernet.
* The slop is so that we also use an even number of longwards.
@@ -2020,7 +2020,7 @@ lance_start(
LN_STAT(tx_nospc[0]++);
break;
}
-
+
if (len + slop > ri->ri_heapend - ri->ri_outptr) {
/*
* Since the packet won't fit in the end of the transmit
@@ -2039,7 +2039,7 @@ lance_start(
ri->ri_outptr = ri->ri_heap;
LN_STAT(tx_adoptions++);
}
-
+
/*
* Initialize the descriptor (saving the buffer address,
* buffer length, and mbuf) and write the packet out
@@ -2106,7 +2106,7 @@ lance_tx_intr(
ln_desc_t desc;
LN_GETDESC(sc, &desc, ri->ri_nextin->di_addr);
- if (desc.d_flag & LN_DFLAG_OWNER)
+ if (desc.d_flag & LN_DFLAG_OWNER)
break;
if (desc.d_flag & (LN_DFLAG_TxONECOLL|LN_DFLAG_TxMULTCOLL))
diff --git a/sys/i386/isa/if_lnc.c b/sys/i386/isa/if_lnc.c
index 8477f58..1366236 100644
--- a/sys/i386/isa/if_lnc.c
+++ b/sys/i386/isa/if_lnc.c
@@ -6,8 +6,8 @@
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer,
- * verbatim and that no modifications are made prior to this
+ * notice, this list of conditions and the following disclaimer,
+ * verbatim and that no modifications are made prior to this
* point in the file.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
@@ -35,28 +35,28 @@
/*
#define DIAGNOSTIC
#define DEBUG
- *
+ *
* TODO ----
*
* This driver will need bounce buffer support when dma'ing to mbufs above the
* 16Mb mark.
- *
+ *
* Check all the XXX comments -- some of them are just things I've left
* unfinished rather than "difficult" problems that were hacked around.
- *
+ *
* Check log settings.
- *
+ *
* Check how all the arpcom flags get set and used.
- *
+ *
* Re-inline and re-static all routines after debugging.
- *
+ *
* Remember to assign iobase in SHMEM probe routines.
- *
+ *
* Replace all occurences of LANCE-controller-card etc in prints by the name
* strings of the appropriate type -- nifty window dressing
- *
- * Add DEPCA support -- mostly done.
- *
+ *
+ * Add DEPCA support -- mostly done.
+ *
*/
#include "lnc.h"
@@ -175,7 +175,7 @@ lnc_registerdev(struct isa_device *isa_dev)
struct kern_devconf *kdc = &sc->kdc;
*kdc = kdc_lnc;
kdc->kdc_unit = isa_dev->id_unit;
- kdc->kdc_parentdata = isa_dev;
+ kdc->kdc_parentdata = isa_dev;
switch(sc->nic.ic) {
case LANCE:
@@ -209,7 +209,7 @@ lnc_registerdev(struct isa_device *isa_dev)
default:
break;
}
-
+
dev_attach(kdc);
}
@@ -270,7 +270,7 @@ alloc_mbuf_cluster(struct lnc_softc *sc, struct host_ring_entry *desc)
/* XXX m->m_data = m->m_ext.ext_buf;*/
} else {
MGET(m, M_DONTWAIT, MT_DATA);
- if (!m)
+ if (!m)
return(1);
MCLGET(m, M_DONTWAIT);
if (!m->m_ext.ext_buf) {
@@ -320,7 +320,7 @@ chain_mbufs(struct lnc_softc *sc, int start_of_packet, int pkt_len)
m->m_next = 0;
return(head);
-}
+}
inline struct mbuf *
mbuf_packet(struct lnc_softc *sc, int start_of_packet, int pkt_len)
@@ -415,7 +415,7 @@ lnc_rint(int unit)
* Therefore, it can be assumed that a complete packet can be found
* before hitting buffers that are still owned by the LANCE, if not
* then there is a bug in the driver that is causing the descriptors
- * to get out of sync.
+ * to get out of sync.
*/
#ifdef DIAGNOSTIC
@@ -443,8 +443,8 @@ lnc_rint(int unit)
* jabber packets can overrun into a second descriptor.
* If there is no error, then the ENP flag is set in the last
* descriptor of the packet. If there is an error then the ERR
- * flag will be set in the descriptor where the error occured.
- * Therefore, to find the last buffer of a packet we search for
+ * flag will be set in the descriptor where the error occured.
+ * Therefore, to find the last buffer of a packet we search for
* either ERR or ENP.
*/
@@ -533,7 +533,7 @@ lnc_rint(int unit)
if (head) {
/*
- * First mbuf in packet holds the
+ * First mbuf in packet holds the
* ethernet and packet headers
*/
head->m_pkthdr.rcvif = &sc->arpcom.ac_if;
@@ -627,7 +627,7 @@ lnc_tint(int unit)
* status will be written into the descriptor that was being accessed
* when the error occured and all subsequent descriptors in that
* packet will have been relinquished by the LANCE.
- *
+ *
* At this point we know that sc->trans_next points to the start
* of a packet that the LANCE has just finished trying to transmit.
* We now search for a buffer with either ENP or ERR set.
@@ -648,7 +648,7 @@ lnc_tint(int unit)
#endif
/*
- * Find end of packet.
+ * Find end of packet.
*/
if (!(next->md->md1 & (ENP | MDERR))) {
@@ -717,7 +717,7 @@ lnc_tint(int unit)
* set then TBUFF will have been cleared above. A
* UFLO error will turn off the transmitter so we
* have to reset.
- *
+ *
*/
if (next->md->md3 & UFLO) {
@@ -759,7 +759,7 @@ lnc_tint(int unit)
* ERR would have also been set and we would have
* returned from lnc_tint above. Therefore we can
* assume if we arrive here that ONE is valid.
- *
+ *
*/
if (next->md->md1 & ONE) {
@@ -810,7 +810,7 @@ lnc_tint(int unit)
} while (sc->pending_transmits && !(next->md->md1 & OWN));
/*
- * Clear TINT since we've dealt with all
+ * Clear TINT since we've dealt with all
* the completed transmissions.
*/
@@ -887,7 +887,7 @@ int i;
* There isn't any way to determine if a NIC is a BICC. Basically, if
* the lance probe succeeds using the i/o addresses of the BICC then
* we assume it's a BICC.
- *
+ *
*/
sc->rap = isa_dev->id_iobase + BICC_RAP;
@@ -1035,14 +1035,14 @@ lnc_attach(struct isa_device * isa_dev)
/*
* Allocate memory for use by the controller.
- *
+ *
* XXX -- the Am7990 and Am79C960 only have 24 address lines and so can
* only access the lower 16Mb of physical memory. For the moment we
* assume that malloc will allocate memory within the lower 16Mb
* range. This is not a very valid assumption but there's nothing
* that can be done about it yet. For shared memory NICs this isn't
* relevant.
- *
+ *
*/
lnc_mem_size = ((NDESC(sc->nrdre) + NDESC(sc->ntdre)) *
@@ -1139,7 +1139,7 @@ lnc_init(int unit)
* on a word boundary),the transmit and receive ring structures (each
* entry is 4 words long and must start on a quadword boundary) and
* the data buffers.
- *
+ *
* The alignment tests are particularly paranoid.
*/
@@ -1248,7 +1248,7 @@ lnc_init(int unit)
* For the Am7990 it controls DMA operations, for the Am79C960 it
* controls interrupt masks and transmitter algorithms. In either
* case, none of the flags are set.
- *
+ *
*/
write_csr(unit, CSR3, 0);
@@ -1286,13 +1286,13 @@ lnc_init(int unit)
* The interrupt flag (INTR) will be set and provided that the interrupt enable
* flag (INEA) is also set, the interrupt pin will be driven low when any of
* the following occur:
- *
+ *
* 1) Completion of the initialisation routine (IDON). 2) The reception of a
* packet (RINT). 3) The transmission of a packet (TINT). 4) A transmitter
* timeout error (BABL). 5) A missed packet (MISS). 6) A memory error (MERR).
- *
+ *
* The interrupt flag is cleared when all of the above conditions are cleared.
- *
+ *
* If the driver is reset from this routine then it first checks to see if any
* interrupts have ocurred since the reset and handles them before returning.
* This is because the NIC may signify a pending interrupt in CSR0 using the
@@ -1300,7 +1300,7 @@ lnc_init(int unit)
* think it does from reading the data sheets). We may as well deal with
* these pending interrupts now rather than get the overhead of another
* hardware interrupt immediately upon returning from the interrupt handler.
- *
+ *
*/
void
@@ -1440,7 +1440,7 @@ lnc_start(struct ifnet *ifp)
no_entries_needed++;
/*
- * We try and avoid bcopy as much as possible
+ * We try and avoid bcopy as much as possible
* but there are two cases when we use it.
*
* 1) If there are not enough free entries in the ring
@@ -1452,7 +1452,7 @@ lnc_start(struct ifnet *ifp)
* packet so it's necessary to shuffle the mbuf
* contents to ensure this.
*/
-
+
if (no_entries_needed > (NDESC(sc->ntdre) - sc->pending_transmits))
if (!(head = chain_to_cluster(head))) {
@@ -1465,9 +1465,9 @@ lnc_start(struct ifnet *ifp)
len = 100 - head->m_len;
if (M_TRAILINGSPACE(head) < len) {
/*
- * Move data to start of data
- * area. We assume the first
- * mbuf has a packet header
+ * Move data to start of data
+ * area. We assume the first
+ * mbuf has a packet header
* and is not a cluster.
*/
bcopy((caddr_t)head->m_data, (caddr_t)head->m_pktdat, head->m_len);
@@ -1564,7 +1564,7 @@ lnc_start(struct ifnet *ifp)
} while (sc->pending_transmits < NDESC(sc->ntdre));
/*
- * Transmit ring is full so set IFF_OACTIVE
+ * Transmit ring is full so set IFF_OACTIVE
* since we can't buffer any more packets.
*/
@@ -1633,7 +1633,7 @@ lnc_ioctl(struct ifnet * ifp, int command, caddr_t data)
*/
lnc_init(ifp->if_unit);
}
- sc->kdc.kdc_state =
+ sc->kdc.kdc_state =
((ifp->if_flags & IFF_UP) ? DC_BUSY : DC_IDLE);
break;
#ifdef notyet
diff --git a/sys/i386/isa/if_ze.c b/sys/i386/isa/if_ze.c
index 9315a60..b1de9e6 100644
--- a/sys/i386/isa/if_ze.c
+++ b/sys/i386/isa/if_ze.c
@@ -4,7 +4,7 @@
* [2] parse tuples to find out where to map the shared memory buffer,
* and what to write into the configuration register
* [3] move pcic-specific code into a separate module.
- *
+ *
* Device driver for IBM PCMCIA Credit Card Adapter for Ethernet,
* if_ze.c
*
@@ -38,16 +38,16 @@
*/
/*
* I doubled delay loops in this file because it is not enough for some
- * laptop machines' PCIC (especially, on my Chaplet ILFA 350 ^^;).
+ * laptop machines' PCIC (especially, on my Chaplet ILFA 350 ^^;).
* HOSOKAWA, Tatsumi <hosokawa@mt.cs.keio.ac.jp>
- */
+ */
/*
* Very small patch for IBM Ethernet PCMCIA Card II and IBM ThinkPad230Cs.
* ETO, Toshihisa <eto@osl.fujitsu.co.jp>
*/
/*
- * $Id: if_ze.c,v 1.15 1995/05/03 22:58:07 phk Exp $
+ * $Id: if_ze.c,v 1.16 1995/05/24 20:33:42 davidg Exp $
*/
#include "ze.h"
@@ -97,7 +97,7 @@
#if NAPM > 0
#include <machine/apm_bios.h>
#endif /* NAPM > 0 */
-
+
/*****************************************************************************
* Driver for Ethernet Adapter *
@@ -109,7 +109,7 @@ struct ze_softc {
caddr_t maddr;
u_long iobase, irq;
-
+
struct arpcom arpcom; /* ethernet common */
char *type_str; /* pointer to type string */
@@ -165,7 +165,7 @@ struct isa_driver zedriver = {
static unsigned char enet_addr[6];
static unsigned char card_info[256];
-
+
#define CARD_INFO "IBM Corp.~Ethernet~0933495"
/*
@@ -228,7 +228,7 @@ ze_check_cis (unsigned char *scratch)
* Probe each slot looking for an IBM Credit Card Adapter for Ethernet
* For each card that we find, map its card information structure
* into system memory at 'scratch' and see whether it's one of ours.
- * Return the slot number if we find a card, or -1 otherwise.
+ * Return the slot number if we find a card, or -1 otherwise.
*
* Side effects:
* + On success, leaves CIS mapped into memory at 'scratch';
@@ -277,13 +277,13 @@ ze_find_adapter (unsigned char *scratch, int reconfig)
pcic_power_on (slot);
pcic_reset (slot);
/*
- * map the card's attribute memory and examine its
+ * map the card's attribute memory and examine its
* card information structure tuples for something
* we recognize.
*/
pcic_map_memory (slot, 0, kvtop (scratch), 0L,
0xFFFL, ATTRIBUTE, 1);
-
+
if ((ze_check_cis (scratch)) > 0) {
/* found it */
if (!reconfig) {
@@ -384,7 +384,7 @@ ze_probe(isa_dev)
*/
sc->nic_addr = sc->iobase;
sc->smem_start = (caddr_t)sc->maddr;
-
+
ze_setup(sc);
tmp = inb (sc->iobase + ZE_RESET);
@@ -407,7 +407,7 @@ ze_probe(isa_dev)
/* get station address */
for (i = 0; i < ETHER_ADDR_LEN; ++i)
sc->arpcom.ac_enaddr[i] = enet_addr[i];
-
+
isa_dev->id_msize = memsize;
@@ -498,7 +498,7 @@ re_init:
pcic_putb (slot, PCIC_GLO_CTRL,
pcic_getb (slot, PCIC_GLO_CTRL) | PCIC_LVL_MODE);
#endif
-
+
#if 0
pcic_print_regs (slot);
#endif
@@ -519,8 +519,8 @@ re_init:
tmp = inb (sc->iobase + ZE_MISC);
/*
- * Some Intel-compatible PCICs of Cirrus Logic fails in
- * initializing them. This is a quick hack to fix this
+ * Some Intel-compatible PCICs of Cirrus Logic fails in
+ * initializing them. This is a quick hack to fix this
* problem.
* HOSOKAWA, Tatsumi <hosokawa@mt.cs.keio.ac.jp>
*/
@@ -553,7 +553,7 @@ ze_resume(isa_dev)
return 0;
}
#endif /* NAPM > 0 */
-
+
/*
* Install interface into kernel networking data structures
*/
@@ -591,7 +591,7 @@ ze_attach(isa_dev)
else {
sc->last_alive = 1;
}
-
+
/*
* Set interface to stopped condition (reset)
*/
@@ -680,7 +680,7 @@ ze_attach(isa_dev)
return 1;
}
-
+
/*
* Reset interface.
*/
@@ -700,7 +700,7 @@ ze_reset(unit)
(void) splx(s);
}
-
+
/*
* Take interface offline.
*/
@@ -710,7 +710,7 @@ ze_stop(unit)
{
struct ze_softc *sc = &ze_softc[unit];
int n = 5000;
-
+
/*
* Stop everything on the interface, and select page 0 registers.
*/
@@ -742,15 +742,15 @@ ze_watchdog(unit)
if(!(sc->arpcom.ac_if.if_flags & IFF_UP))
return;
/* select page zero */
- outb (sc->nic_addr + ZE_P0_CR,
+ outb (sc->nic_addr + ZE_P0_CR,
(inb (sc->nic_addr + ZE_P0_CR) & 0x3f) | ZE_CR_PAGE_0);
/* read interrupt status register */
isr = inb (sc->nic_addr + ZE_P0_ISR) & 0xff;
/* select page two */
- outb (sc->nic_addr + ZE_P0_CR,
- (inb (sc->nic_addr + ZE_P0_CR) & 0x3f) | ZE_CR_PAGE_2);
+ outb (sc->nic_addr + ZE_P0_CR,
+ (inb (sc->nic_addr + ZE_P0_CR) & 0x3f) | ZE_CR_PAGE_2);
/* read interrupt mask register */
imr = inb (sc->nic_addr + ZE_P2_IMR) & 0xff;
@@ -767,7 +767,7 @@ ze_watchdog(unit)
}
/*
- * Initialize device.
+ * Initialize device.
*/
void
ze_init(unit)
@@ -914,7 +914,7 @@ ze_init(unit)
(void) splx(s);
}
-
+
/*
* This routine actually starts the transmission on the interface
*/
@@ -949,11 +949,11 @@ ze_xmit(ifp)
sc->xmit_busy = 1;
sc->data_buffered = 0;
-
+
/*
* Switch buffers if we are doing double-buffered transmits
*/
- if ((sc->txb_next == 0) && (sc->txb_cnt > 1))
+ if ((sc->txb_next == 0) && (sc->txb_cnt > 1))
sc->txb_next = 1;
else
sc->txb_next = 0;
@@ -1067,7 +1067,7 @@ outloop:
return;
}
}
-
+
/*
* Ethernet interface receiver interrupt.
*/
@@ -1222,8 +1222,8 @@ zeintr(unit)
*/
sc->arpcom.ac_if.if_timer = 0;
}
-
-
+
+
/*
* Receiver Error. One or more of: CRC error, frame alignment error
* FIFO overrun, or missed packet.
@@ -1285,7 +1285,7 @@ zeintr(unit)
}
/*
- * Receive Completion. Go and get the packet.
+ * Receive Completion. Go and get the packet.
* XXX - Doing this on an error is dubious because there
* shouldn't be any data to get (we've configured the
* interface to not accept packets with errors).
@@ -1326,7 +1326,7 @@ zeintr(unit)
}
}
}
-
+
/*
* Process an ioctl request. This code needs some work - it looks
* pretty ugly.
@@ -1368,8 +1368,8 @@ ze_ioctl(ifp, command, data)
ina->x_host =
*(union ns_host *)(sc->arpcom.ac_enaddr);
else {
- /*
- *
+ /*
+ *
*/
bcopy((caddr_t)ina->x_host.c_host,
(caddr_t)sc->arpcom.ac_enaddr,
@@ -1443,7 +1443,7 @@ ze_ioctl(ifp, command, data)
(void) splx(s);
return (error);
}
-
+
/*
* Macro to calculate a new address within shared memory when given an offset
* from an address, taking into account ring-wrap.
@@ -1509,7 +1509,7 @@ ze_get_packet(sc, buf, len)
#if NBPFILTER > 0
/*
* Check if there's a BPF listener on this interface.
- * If so, hand off the raw packet to bpf.
+ * If so, hand off the raw packet to bpf.
*/
if (sc->bpf) {
bpf_mtap(sc->bpf, head);
@@ -1610,7 +1610,7 @@ ze_ring_to_mbuf(sc,src,dst,total_len)
* the cluster to. The mbuf that has a cluster
* extension can not be used to contain data - only
* the cluster can contain data.
- */
+ */
dst = m;
MGET(m, M_DONTWAIT, MT_DATA);
if (m == NULL)
diff --git a/sys/i386/isa/if_zereg.h b/sys/i386/isa/if_zereg.h
index 3cd501f..7eefd61 100644
--- a/sys/i386/isa/if_zereg.h
+++ b/sys/i386/isa/if_zereg.h
@@ -1,5 +1,5 @@
/*
- * National Semiconductor DS8390 NIC register definitions
+ * National Semiconductor DS8390 NIC register definitions
*
* if_edreg.h,v
* Revision 1.1.2.1 1993/07/21 13:50:04 cgd
@@ -17,10 +17,10 @@
* Revision 1.2 93/06/23 03:03:05 davidg
* added some additional definitions for the 83C584 bus interface
* chip (SMC/WD boards)
- *
+ *
* Revision 1.1 93/06/23 03:01:07 davidg
* Initial revision
- *
+ *
*/
/*
@@ -369,7 +369,7 @@
* algorithm to allow prioritization of nodes.
*/
#define ZE_TCR_OFST 0x10
-
+
/*
* bits 5, 6, and 7 are unused/reserved
*/
diff --git a/sys/i386/isa/if_zp.c b/sys/i386/isa/if_zp.c
index e9bbf50..5ac6b08 100644
--- a/sys/i386/isa/if_zp.c
+++ b/sys/i386/isa/if_zp.c
@@ -34,7 +34,7 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* From: if_ep.c,v 1.9 1994/01/25 10:46:29 deraadt Exp $
- * $Id: if_zp.c,v 1.4 1995/03/31 06:10:22 jkh Exp $
+ * $Id: if_zp.c,v 1.5 1995/04/20 07:22:04 phk Exp $
*/
/*-
* TODO:
@@ -443,7 +443,7 @@ zp_find_adapter(unsigned char *scratch, int reconfig)
* or # of i/o addresses used (if found)
*/
#ifdef MACH_KERNEL
-int
+int
zpprobe(port, dev)
struct bus_device *dev;
#else /* MACH_KERNEL */
@@ -521,7 +521,7 @@ re_init:
* space by 0x20000. normally we could get this offset from the card
* information structure, but I'm too lazy and am not quite sure if I
* understand the CIS anyway.
- *
+ *
* XXX IF YOU'RE TRYING TO PORT THIS DRIVER FOR A DIFFERENT PCMCIA CARD, the
* most likely thing to change is the constant 0x20000 in the next
* statement. Oh yes, also change the card id string that we probe for.
@@ -542,7 +542,7 @@ re_init:
* respond to any i/o signals until we do this; it uses the Memory Only
* interface (whatever that is; it's not documented). Also turn on
* "level" (not pulse) interrupts.
- *
+ *
* XXX probably should init the socket and copy register also, so that we
* can deal with multiple instances of the same card.
*/
@@ -567,10 +567,10 @@ re_init:
/*
* (4) map i/o ports.
- *
+ *
* XXX is it possible that the config file leaves this unspecified, in which
* case we have to pick one?
- *
+ *
* At least one PCMCIA device driver I'v seen maps a block of 32 consecutive
* i/o ports as two windows of 16 ports each. Maybe some other pcic chips
* are restricted to 16-port windows; the 82365SL doesn't seem to have
@@ -589,7 +589,7 @@ re_init:
/*
* (5) configure the card for the desired interrupt
- *
+ *
* XXX is it possible that the config file leaves this unspecified?
*/
pcic_map_irq(slot, ffs(isa_dev->id_irq) - 1);
@@ -743,7 +743,7 @@ zp_resume(isa_dev)
*/
#ifdef MACH_KERNEL
-void
+void
zpattach(dev)
struct bus_device *dev;
#else /* MACH_KERNEL */
@@ -1414,7 +1414,7 @@ readcheck:
}
#ifdef MACH_KERNEL
-int
+int
zpopen(dev, flag)
dev_t dev;
int flag;
@@ -1433,7 +1433,7 @@ zpopen(dev, flag)
return (0);
}
-int
+int
zpoutput(dev, ior)
dev_t dev;
io_req_t ior;
@@ -1455,7 +1455,7 @@ zpoutput(dev, ior)
return (result);
}
-int
+int
zpsetinput(dev, receive_port, priority, filter, filter_count)
dev_t dev;
mach_port_t receive_port;
@@ -1858,7 +1858,7 @@ out:outw(BASE + EP_COMMAND, RX_DISCARD_TOP_PACK);
#ifdef MACH_KERNEL
-int
+int
zpgetstat(dev, flavor, status, count)
dev_t dev;
int flavor;
@@ -1877,7 +1877,7 @@ zpgetstat(dev, flavor, status, count)
return (net_getstat(&zp_softc[unit].ds_if, flavor, status, count));
}
-int
+int
zpsetstat(dev, flavor, status, count)
dev_t dev;
int flavor;
diff --git a/sys/i386/isa/if_zpreg.h b/sys/i386/isa/if_zpreg.h
index f8f184a..a1eb1f5 100644
--- a/sys/i386/isa/if_zpreg.h
+++ b/sys/i386/isa/if_zpreg.h
@@ -21,7 +21,7 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
- * $Id: if_epreg.h,v 1.2 1994/01/10 19:13:50 ats Exp $
+ * $Id: if_zpreg.h,v 1.1 1995/02/17 02:22:53 phk Exp $
*/
/**************************************************************************
* *
@@ -91,7 +91,7 @@
#define EP_W2_ADDR_1 0x01
#define EP_W2_ADDR_0 0x00
-/*
+/*
* Window 3 registers. FIFO Management.
*/
/* Read */
diff --git a/sys/i386/isa/isa.c b/sys/i386/isa/isa.c
index c4a2455..1dd0fb9 100644
--- a/sys/i386/isa/isa.c
+++ b/sys/i386/isa/isa.c
@@ -34,7 +34,7 @@
* SUCH DAMAGE.
*
* from: @(#)isa.c 7.2 (Berkeley) 5/13/91
- * $Id: isa.c,v 1.48 1995/05/11 05:20:43 jkh Exp $
+ * $Id: isa.c,v 1.49 1995/05/13 00:09:38 jkh Exp $
*/
/*
@@ -334,7 +334,7 @@ isa_configure() {
* SLIPDISC. No need to block out ALL ttys during a splimp when only one
* of them is running slip.
*
- * XXX actually, blocking all ttys during a splimp doesn't matter so much
+ * XXX actually, blocking all ttys during a splimp doesn't matter so much
* with sio because the serial interrupt layer doesn't use tty_imask. Only
* non-serial ttys suffer. It's more stupid that ALL 'net's are blocked
* during spltty.
@@ -372,8 +372,8 @@ isa_configure() {
/*
* Configure an ISA device.
*/
-
-
+
+
static void
config_isadev(isdp, mp)
struct isa_device *isdp;
@@ -381,7 +381,7 @@ config_isadev(isdp, mp)
{
config_isadev_c(isdp, mp, 0);
}
-
+
void
reconfig_isadev(isdp, mp)
struct isa_device *isdp;
@@ -400,7 +400,7 @@ config_isadev_c(isdp, mp, reconfig)
int id_alive;
int last_alive;
struct isa_driver *dp = isdp->id_driver;
-
+
checkbits = 0;
checkbits |= CC_DRQ;
checkbits |= CC_IOADDR;
@@ -464,11 +464,11 @@ config_isadev_c(isdp, mp, reconfig)
}
printf("\n");
/*
- * Check for conflicts again. The driver may have
- * changed *dvp. We should weaken the early check
- * since the driver may have been able to change
- * *dvp to avoid conflicts if given a chance. We
- * already skip the early check for IRQs and force
+ * Check for conflicts again. The driver may have
+ * changed *dvp. We should weaken the early check
+ * since the driver may have been able to change
+ * *dvp to avoid conflicts if given a chance. We
+ * already skip the early check for IRQs and force
* a check for IRQs in the next group of checks.
*/
checkbits |= CC_IRQ;
@@ -497,12 +497,12 @@ config_isadev_c(isdp, mp, reconfig)
}
printf("\n");
}
- }
+ }
else {
/* This code has not been tested.... */
if (isdp->id_irq) {
INTRDIS(isdp->id_irq);
- unregister_intr(ffs(isdp->id_irq) - 1,
+ unregister_intr(ffs(isdp->id_irq) - 1,
isdp->id_intr);
if (mp)
INTRUNMASK(*mp, isdp->id_irq);
@@ -593,7 +593,7 @@ eisa_generic_externalize(struct proc *p, struct kern_devconf *kdc,
* during configuration of kernel, setup interrupt control unit
*/
void
-isa_defaultirq()
+isa_defaultirq()
{
int i;
@@ -643,7 +643,7 @@ static short dmapageport[8] =
void isa_dmacascade(unsigned chan)
{
if (chan > 7)
- panic("isa_dmacascade: impossible request");
+ panic("isa_dmacascade: impossible request");
/* set dma channel mode, and set dma channel mode */
if ((chan & 4) == 0) {
@@ -670,7 +670,7 @@ void isa_dmastart(int flags, caddr_t addr, unsigned nbytes, unsigned chan)
if ( chan > 7
|| (chan < 4 && nbytes > (1<<16))
|| (chan >= 4 && (nbytes > (1<<17) || (u_int)addr & 1)))
- panic("isa_dmastart: impossible request");
+ panic("isa_dmastart: impossible request");
if (isa_dmarangecheck(addr, nbytes, chan)) {
if (dma_bounce[chan] == 0)
@@ -818,7 +818,7 @@ static void (*isaphysmemunblock)(); /* needs to be a list */
*/
caddr_t
isa_allocphysmem(caddr_t va, unsigned length, void (*func)()) {
-
+
isaphysmemunblock = func;
while (isaphysmemflag & B_BUSY) {
isaphysmemflag |= B_WANTED;
@@ -844,7 +844,7 @@ isa_freephysmem(caddr_t va, unsigned length) {
(*isaphysmemunblock)();
}
}
-
+
#define NMI_PARITY (1 << 7)
#define NMI_IOCHAN (1 << 6)
#define ENMI_WATCHDOG (1 << 7)
@@ -856,7 +856,7 @@ isa_freephysmem(caddr_t va, unsigned length) {
* return true to panic system, false to ignore.
*/
int
-isa_nmi(cd)
+isa_nmi(cd)
int cd;
{
int isa_port = inb(0x61);
@@ -930,7 +930,7 @@ struct isa_device *find_isadev(table, driverp, unit)
while ((table->id_driver != driverp) || (table->id_unit != unit)) {
if (table->id_driver == 0)
return NULL;
-
+
table++;
}
diff --git a/sys/i386/isa/joy.c b/sys/i386/isa/joy.c
index 942b45a..97225a8 100644
--- a/sys/i386/isa/joy.c
+++ b/sys/i386/isa/joy.c
@@ -41,7 +41,7 @@
#include <i386/isa/isa_device.h>
#include <i386/isa/timerreg.h>
-/* The game port can manage 4 buttons and 4 variable resistors (usually 2
+/* The game port can manage 4 buttons and 4 variable resistors (usually 2
* joysticks, each with 2 buttons and 2 pots.) via the port at address 0x201.
* Getting the state of the buttons is done by reading the game port:
* buttons 1-4 correspond to bits 4-7 and resistors 1-4 (X1, Y1, X2, Y2)
@@ -52,7 +52,7 @@
*/
-/* the formulae below only work if u is ``not too large''. See also
+/* the formulae below only work if u is ``not too large''. See also
* the discussion in microtime.s */
#define usec2ticks(u) (((u) * 19549)>>14)
#define ticks2usec(u) (((u) * 3433)>>12)
@@ -114,7 +114,7 @@ joyopen (dev_t dev, int flag)
joy[unit].timeout[i] = JOY_TIMEOUT;
return 0;
}
-int
+int
joyclose (dev_t dev, int flag)
{
int unit = UNIT (dev);
@@ -132,7 +132,7 @@ joyread (dev_t dev, struct uio *uio, int flag)
int i, t0, t1;
int state = 0, x = 0, y = 0;
struct joystick c;
-
+
disable_intr ();
outb (port, 0xff);
t0 = get_tick ();
@@ -140,7 +140,7 @@ joyread (dev_t dev, struct uio *uio, int flag)
i = usec2ticks(joy[unit].timeout[joypart(dev)]);
while (t0-t1 < i) {
state = inb (port);
- if (joypart(dev) == 1)
+ if (joypart(dev) == 1)
state >>= 2;
t1 = get_tick ();
if (t1 > t0)
@@ -149,7 +149,7 @@ joyread (dev_t dev, struct uio *uio, int flag)
x = t1;
if (!y && !(state & 0x02))
y = t1;
- if (x && y)
+ if (x && y)
break;
}
enable_intr ();
diff --git a/sys/i386/isa/kbd.h b/sys/i386/isa/kbd.h
index b7b6009..d34b634 100644
--- a/sys/i386/isa/kbd.h
+++ b/sys/i386/isa/kbd.h
@@ -1,14 +1,14 @@
/*
* Keyboard definitions
* from: unknown origin, 386BSD 0.1
- * $Id: kbd.h,v 1.2 1993/10/16 13:46:04 rgrimes Exp $
+ * $Id: kbd.h,v 1.3 1993/11/07 17:44:33 wollman Exp $
*/
#ifndef _I386_ISA_KBD_H_
#define _I386_ISA_KBD_H_ 1
-/* Reference: IBM AT Technical Reference Manual,
- * pp. 1-38 to 1-43, 4-3 to 4-22
+/* Reference: IBM AT Technical Reference Manual,
+ * pp. 1-38 to 1-43, 4-3 to 4-22
*/
/* commands sent to KBCMDP */
diff --git a/sys/i386/isa/labpc.c b/sys/i386/isa/labpc.c
index d771501..5917995 100644
--- a/sys/i386/isa/labpc.c
+++ b/sys/i386/isa/labpc.c
@@ -346,16 +346,16 @@ reset(struct ctlr *ctlr)
ad_clear(ctlr);
}
-static int
-labpc_goaway(struct kern_devconf *kdc, int force)
+static int
+labpc_goaway(struct kern_devconf *kdc, int force)
{
if(force) {
dev_detach(kdc);
return 0;
- } else {
+ } else {
return EBUSY; /* XXX fix */
}
-}
+}
static struct kern_devconf kdc_template = {
0, 0, 0, /* filled in by dev_attach */
@@ -626,7 +626,7 @@ tmo_stop(void *p)
}
printf("\n");
-
+
done_and_start_next(ctlr, bp, ETIMEDOUT);
splx(s);
@@ -681,7 +681,7 @@ static void ad_intr(struct ctlr *ctlr)
else /* FIFO interrupt */
{
struct buf *bp = ctlr->start_queue.b_actf;
-
+
if (ctlr->data)
{
*ctlr->data++ = inb(ADFIFO(ctlr));
@@ -761,7 +761,7 @@ labpcopen(dev_t dev, int flags, int fmt, struct proc *p)
return 0;
}
-int
+int
labpcclose(dev_t dev, int flags, int fmt, struct proc *p)
{
struct ctlr *ctlr = labpcs[UNIT(dev)];
@@ -1034,7 +1034,7 @@ labpcstrategy(struct buf *bp)
}
}
-int
+int
labpcioctl(dev_t dev, int cmd, caddr_t arg, int mode, struct proc *p)
{
struct ctlr *ctlr = labpcs[UNIT(dev)];
diff --git a/sys/i386/isa/lpt.c b/sys/i386/isa/lpt.c
index 2f12ccd..b5db1a5 100644
--- a/sys/i386/isa/lpt.c
+++ b/sys/i386/isa/lpt.c
@@ -12,25 +12,25 @@
* documentation and/or other materials provided with the distribution.
* 3. All advertising materials mentioning features or use of this software
* must display the following acknowledgement:
- * This software is a component of "386BSD" developed by
+ * This software is a component of "386BSD" developed by
* William F. Jolitz, TeleMuse.
* 4. Neither the name of the developer nor the name "386BSD"
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
*
- * THIS SOFTWARE IS A COMPONENT OF 386BSD DEVELOPED BY WILLIAM F. JOLITZ
- * AND IS INTENDED FOR RESEARCH AND EDUCATIONAL PURPOSES ONLY. THIS
- * SOFTWARE SHOULD NOT BE CONSIDERED TO BE A COMMERCIAL PRODUCT.
- * THE DEVELOPER URGES THAT USERS WHO REQUIRE A COMMERCIAL PRODUCT
+ * THIS SOFTWARE IS A COMPONENT OF 386BSD DEVELOPED BY WILLIAM F. JOLITZ
+ * AND IS INTENDED FOR RESEARCH AND EDUCATIONAL PURPOSES ONLY. THIS
+ * SOFTWARE SHOULD NOT BE CONSIDERED TO BE A COMMERCIAL PRODUCT.
+ * THE DEVELOPER URGES THAT USERS WHO REQUIRE A COMMERCIAL PRODUCT
* NOT MAKE USE OF THIS WORK.
*
* FOR USERS WHO WISH TO UNDERSTAND THE 386BSD SYSTEM DEVELOPED
- * BY WILLIAM F. JOLITZ, WE RECOMMEND THE USER STUDY WRITTEN
- * REFERENCES SUCH AS THE "PORTING UNIX TO THE 386" SERIES
- * (BEGINNING JANUARY 1991 "DR. DOBBS JOURNAL", USA AND BEGINNING
- * JUNE 1991 "UNIX MAGAZIN", GERMANY) BY WILLIAM F. JOLITZ AND
- * LYNNE GREER JOLITZ, AS WELL AS OTHER BOOKS ON UNIX AND THE
- * ON-LINE 386BSD USER MANUAL BEFORE USE. A BOOK DISCUSSING THE INTERNALS
+ * BY WILLIAM F. JOLITZ, WE RECOMMEND THE USER STUDY WRITTEN
+ * REFERENCES SUCH AS THE "PORTING UNIX TO THE 386" SERIES
+ * (BEGINNING JANUARY 1991 "DR. DOBBS JOURNAL", USA AND BEGINNING
+ * JUNE 1991 "UNIX MAGAZIN", GERMANY) BY WILLIAM F. JOLITZ AND
+ * LYNNE GREER JOLITZ, AS WELL AS OTHER BOOKS ON UNIX AND THE
+ * ON-LINE 386BSD USER MANUAL BEFORE USE. A BOOK DISCUSSING THE INTERNALS
* OF 386BSD ENTITLED "386BSD FROM THE INSIDE OUT" WILL BE AVAILABLE LATE 1992.
*
* THIS SOFTWARE IS PROVIDED BY THE DEVELOPER ``AS IS'' AND
@@ -46,7 +46,7 @@
* SUCH DAMAGE.
*
* from: unknown origin, 386BSD 0.1
- * $Id: lpt.c,v 1.28 1995/04/12 20:47:56 wollman Exp $
+ * $Id: lpt.c,v 1.29 1995/05/09 01:33:16 phk Exp $
*/
/*
@@ -93,7 +93,7 @@
* Expect transfer-rates up to 75 kbyte/sec.
*
* If GCC could correctly grok
- * register int port asm("edx")
+ * register int port asm("edx")
* the code would be cleaner
*
* Poul-Henning Kamp <phk@login.dkuug.dk>
@@ -370,9 +370,9 @@ lptprobe(struct isa_device *dvp)
(*(BIOS_PORTS+next_bios_lpt) != 0) ) {
dvp->id_iobase = *(BIOS_PORTS+next_bios_lpt++);
goto end_probe;
- } else
+ } else
return (0);
- }
+ }
/* Port was explicitly specified */
/* This allows probing of ports unknown to the BIOS */
@@ -380,11 +380,11 @@ lptprobe(struct isa_device *dvp)
port = dvp->id_iobase + lpt_data;
mask = 0xff;
data = 0x55; /* Alternating zeros */
- if (!lpt_port_test(port, data, mask))
+ if (!lpt_port_test(port, data, mask))
{ status = 0 ; goto end_probe ; }
data = 0xaa; /* Alternating ones */
- if (!lpt_port_test(port, data, mask))
+ if (!lpt_port_test(port, data, mask))
{ status = 0 ; goto end_probe ; }
for (i = 0; i < 8; i++) { /* Walking zero */
@@ -395,7 +395,7 @@ lptprobe(struct isa_device *dvp)
for (i = 0; i < 8; i++) { /* Walking one */
data = (1 << i);
- if (!lpt_port_test(port, data, mask))
+ if (!lpt_port_test(port, data, mask))
{ status = 0 ; goto end_probe ; }
}
@@ -455,7 +455,7 @@ lptopen (dev_t dev, int flag)
return (ENXIO);
#ifdef INET
- if (sc->sc_if.if_flags & IFF_UP)
+ if (sc->sc_if.if_flags & IFF_UP)
return(EBUSY);
#endif
@@ -512,7 +512,7 @@ lptopen (dev_t dev, int flag)
splx(s);
return (EBUSY);
}
-
+
/* is printer online and ready for output */
} while ((inb(port+lpt_status) & (LPS_SEL|LPS_OUT|LPS_NBSY|LPS_NERR)) !=
(LPS_SEL|LPS_NBSY|LPS_NERR));
@@ -582,7 +582,7 @@ lptclose(dev_t dev, int flag)
struct lpt_softc *sc = lpt_sc + LPTUNIT(minor(dev));
int port = sc->sc_port;
- if(sc->sc_flags & LP_BYPASS)
+ if(sc->sc_flags & LP_BYPASS)
goto end_close;
sc->sc_state &= ~OPEN;
@@ -593,7 +593,7 @@ lptclose(dev_t dev, int flag)
while ((inb(port+lpt_status) & (LPS_SEL|LPS_OUT|LPS_NBSY|LPS_NERR)) !=
(LPS_SEL|LPS_NBSY|LPS_NERR) || sc->sc_xfercnt)
/* wait 1/4 second, give up if we get a signal */
- if (tsleep ((caddr_t)sc, LPPRI|PCATCH,
+ if (tsleep ((caddr_t)sc, LPPRI|PCATCH,
"lpclose", hz) != EWOULDBLOCK)
break;
@@ -615,8 +615,8 @@ end_close:
*
* This code is only used when we are polling the port
*/
-static int
-pushbytes(struct lpt_softc * sc)
+static int
+pushbytes(struct lpt_softc * sc)
{
int spin, err, tic;
char ch;
@@ -668,8 +668,8 @@ pushbytes(struct lpt_softc * sc)
return(0);
}
-/*
- * lptwrite --copy a line from user space to a local buffer, then call
+/*
+ * lptwrite --copy a line from user space to a local buffer, then call
* putc to get the chars moved to the output queue.
*
* Flagging of interrupted write added.
@@ -704,14 +704,14 @@ lptwrite(dev_t dev, struct uio * uio)
}
lprintf("W ");
if (sc->sc_state & OBUSY)
- if ((err = tsleep ((caddr_t)sc,
+ if ((err = tsleep ((caddr_t)sc,
LPPRI|PCATCH, "lpwrite", 0))) {
sc->sc_state |= INTERRUPTED;
return(err);
}
}
/* check to see if we must do a polled write */
- if(!(sc->sc_irq & LP_USE_IRQ) && (sc->sc_xfercnt)) {
+ if(!(sc->sc_irq & LP_USE_IRQ) && (sc->sc_xfercnt)) {
lprintf("p");
if((err = pushbytes(sc)))
return(err);
@@ -747,7 +747,7 @@ lptintr(int unit)
if (sc->sc_xfercnt) {
/* send char */
/*lprintf("%x ", *sc->sc_cp); */
- outb(port+lpt_data, *sc->sc_cp++) ;
+ outb(port+lpt_data, *sc->sc_cp++) ;
outb(port+lpt_control, sc->sc_control|LPC_STB);
/* DELAY(X) */
outb(port+lpt_control, sc->sc_control);
@@ -786,12 +786,12 @@ lptioctl(dev_t dev, int cmd, caddr_t data, int flag)
switch (cmd) {
case LPT_IRQ :
if(sc->sc_irq & LP_HAS_IRQ) {
- /*
- * NOTE:
+ /*
+ * NOTE:
* If the IRQ status is changed,
* this will only be visible on the
* next open.
- *
+ *
* If interrupt status changes,
* this gets syslog'd.
*/
@@ -800,14 +800,14 @@ lptioctl(dev_t dev, int cmd, caddr_t data, int flag)
sc->sc_irq &= (~LP_ENABLE_IRQ);
else
sc->sc_irq |= LP_ENABLE_IRQ;
- if (old_sc_irq != sc->sc_irq )
+ if (old_sc_irq != sc->sc_irq )
log(LOG_NOTICE, "lpt%c switched to %s mode\n",
- (char)unit+'0',
+ (char)unit+'0',
(sc->sc_irq & LP_ENABLE_IRQ)?
"interrupt-driven":"polled");
} else /* polled port */
error = EOPNOTSUPP;
- break;
+ break;
default:
error = ENODEV;
}
@@ -837,7 +837,7 @@ lpattach (struct lpt_softc *sc, int unit)
}
/*
* Build the translation tables for the LPIP (BSD unix) protocol.
- * We don't want to calculate these nasties in our tight loop, so we
+ * We don't want to calculate these nasties in our tight loop, so we
* precalculate them when we initialize.
*/
static int
@@ -871,7 +871,7 @@ lpioctl (struct ifnet *ifp, int cmd, caddr_t data)
{
struct lpt_softc *sc = lpt_sc + ifp->if_unit;
struct ifaddr *ifa = (struct ifaddr *)data;
- struct ifreq *ifr = (struct ifreq *)data;
+ struct ifreq *ifr = (struct ifreq *)data;
u_char *ptr;
switch (cmd) {
@@ -908,10 +908,10 @@ lpioctl (struct ifnet *ifp, int cmd, caddr_t data)
if (!sc->sc_ifbuf) {
sc->sc_ifbuf = ptr;
return ENOBUFS;
- }
+ }
if (ptr)
free(ptr,M_DEVBUF);
- sc->sc_if.if_mtu = ifr->ifr_metric;
+ sc->sc_if.if_mtu = ifr->ifr_metric;
break;
case SIOCGIFMTU:
@@ -1026,8 +1026,8 @@ lpoutbyte (u_char byte, int spin, int data_port, int status_port)
return 0;
}
-static int
-lpoutput (struct ifnet *ifp, struct mbuf *m,
+static int
+lpoutput (struct ifnet *ifp, struct mbuf *m,
struct sockaddr *dst, struct rtentry *rt)
{
register int lpt_data_port = lpt_sc[ifp->if_unit].sc_port + lpt_data;
@@ -1038,7 +1038,7 @@ lpoutput (struct ifnet *ifp, struct mbuf *m,
struct mbuf *mm;
u_char *cp = "\0\0";
- /* We need a sensible value if we abort */
+ /* We need a sensible value if we abort */
cp++;
ifp->if_flags |= IFF_RUNNING;
diff --git a/sys/i386/isa/matcd/audio.c b/sys/i386/isa/matcd/audio.c
index 837689a..e9c70f4 100644
--- a/sys/i386/isa/matcd/audio.c
+++ b/sys/i386/isa/matcd/audio.c
@@ -41,18 +41,18 @@
conditions even if it is unsupported, not a complete system
and/or does not contain compiled code.
8. These conditions will be in force for the full life of the
- copyright.
+ copyright.
9. If all the above conditions are met, modifications to other
parts of this file may be freely made, although any person
or persons making changes do not receive the right to add their
name or names to the copyright strings and notices in this
software. Persons making changes are encouraged to insert edit
history in matcd.c and to put your name and details of the
- change there.
+ change there.
10. You must have prior written permission from the author to
deviate from these terms.
- Vendors who produce product(s) containing this code are encouraged
+ Vendors who produce product(s) containing this code are encouraged
(but not required) to provide copies of the finished product(s) to
the author and to correspond with the author about development
activity relating to this code. Donations of development hardware
@@ -481,7 +481,7 @@ static int matcd_pitch(int ldrive, int cdrive, int controller,
"play slower", 0x0000 flat and 1 to 32767 being "play faster"
within the scale allowed by the device. The value is scaled to fit
the allowed by the device and any excess is treated as being
- the positive or negative limit. No ioctl input value is considered
+ the positive or negative limit. No ioctl input value is considered
invalid.
This device has a +/- 13% playback pitch specified by a range
diff --git a/sys/i386/isa/matcd/creative.h b/sys/i386/isa/matcd/creative.h
index 152128c..b918e48 100644
--- a/sys/i386/isa/matcd/creative.h
+++ b/sys/i386/isa/matcd/creative.h
@@ -41,18 +41,18 @@
conditions even if it is unsupported, not a complete system
and/or does not contain compiled code.
8. These conditions will be in force for the full life of the
- copyright.
+ copyright.
9. If all the above conditions are met, modifications to other
parts of this file may be freely made, although any person
or persons making changes do not receive the right to add their
name or names to the copyright strings and notices in this
software. Persons making changes are encouraged to insert edit
history in matcd.c and to put your name and details of the
- change there.
+ change there.
10. You must have prior written permission from the author to
deviate from these terms.
- Vendors who produce product(s) containing this code are encouraged
+ Vendors who produce product(s) containing this code are encouraged
(but not required) to provide copies of the finished product(s) to
the author and to correspond with the author about development
activity relating to this code. Donations of development hardware
@@ -89,7 +89,7 @@ See matcd.c for Edit History
See matcd.h for defines related to the Matsushita drive itself.
*/
-
+
/* Creative Labs (and compatible) I/O port mapping offsets
*/
diff --git a/sys/i386/isa/matcd/matcd.c b/sys/i386/isa/matcd/matcd.c
index e2d642c..1809ec9 100644
--- a/sys/i386/isa/matcd/matcd.c
+++ b/sys/i386/isa/matcd/matcd.c
@@ -41,18 +41,18 @@
conditions even if it is unsupported, not a complete system
and/or does not contain compiled code.
8. These conditions will be in force for the full life of the
- copyright.
+ copyright.
9. If all the above conditions are met, modifications to other
parts of this file may be freely made, although any person
or persons making changes do not receive the right to add their
name or names to the copyright strings and notices in this
software. Persons making changes are encouraged to insert edit
history in matcd.c and to put your name and details of the
- change there.
+ change there.
10. You must have prior written permission from the author to
deviate from these terms.
- Vendors who produce product(s) containing this code are encouraged
+ Vendors who produce product(s) containing this code are encouraged
(but not required) to provide copies of the finished product(s) to
the author and to correspond with the author about development
activity relating to this code. Donations of development hardware
@@ -157,7 +157,7 @@ Edit number code marking begins here - earlier edits were during development.
24-Feb-95 Frank Durda IV bsdmail@nemesis.lonestar.org
<9> Added some additional disk-related ioctl functions that didn't
- make it into earlier versions.
+ make it into earlier versions.
26-Feb-95 Frank Durda IV bsdmail@nemesis.lonestar.org
<10> Updated some conditionals so the code will compile under
@@ -391,7 +391,7 @@ static struct kern_devconf kdc_matcd[TOTALDRIVES] = { { /*<12>*/
} }; /*<12>*/
#endif /*FREE2*/
-
+
/*---------------------------------------------------------------------------
These macros take apart the minor number and yield the
partition, drive on controller, and controller.
@@ -443,7 +443,7 @@ struct isa_driver matcddriver={matcd_probe, matcd_attach, /*<16>*/
static void matcd_start(struct buf *dp);
static void zero_cmd(char *);
-static void matcd_pread(int port, int count, unsigned char * data);
+static void matcd_pread(int port, int count, unsigned char * data);
static int matcd_fastcmd(int port,int ldrive,int cdrive,
unsigned char * cp);
static void matcd_slowcmd(int port,int ldrive,int cdrive,
@@ -501,7 +501,7 @@ static int docmd(char * cmd, int ldrive, int cdrive, /*<14>*/
This routine actually gets called every time anybody opens
any partition on a drive. But the first call is the one that
- does all the work.
+ does all the work.
<15> If LOCKDRIVE is enabled, additional minor number devices allow
<15> the drive to be locked while being accessed.
@@ -520,7 +520,7 @@ int matcdopen(dev_t dev)
#ifdef DIAGPORT
DIAGOUT(DIAGPORT,0x10); /*Show where we are*/
#endif /*DIAGPORT*/
- ldrive=matcd_ldrive(dev);
+ ldrive=matcd_ldrive(dev);
cdrive=matcd_cdrive(dev);
partition=matcd_partition(dev);
controller=matcd_controller(dev);
@@ -537,7 +537,7 @@ int matcdopen(dev_t dev)
#endif /*DEBUGOPEN*/
if (!(cd->flags & MATCDINIT)) { /*Did probe find this drive*/
- return(ENXIO);
+ return(ENXIO);
}
if (!(cd->flags & MATCDLABEL) &&
@@ -558,7 +558,7 @@ int matcdopen(dev_t dev)
#ifdef DEBUGOPEN
printf("matcd%d Result of NOP is %x %x\n",ldrive,i,z); /*<16>*/
#endif /*DEBUGOPEN*/
- if ((z & MATCD_ST_DSKIN)==0) { /*Is there a disc in the drive?*/
+ if ((z & MATCD_ST_DSKIN)==0) { /*Is there a disc in the drive?*/
#ifdef DEBUGOPEN
printf("matcd%d: No Disc in open\n",ldrive);
#endif /*DEBUGOPEN*/
@@ -592,7 +592,7 @@ int matcdopen(dev_t dev)
}
}
unlockbus(controller, ldrive); /*Release bus lock*/
-
+
/* Here we fill in the disklabel structure although most is
hardcoded.
*/
@@ -652,7 +652,7 @@ int matcdopen(dev_t dev)
cd->flags |= MATCDLABEL; /*Mark drive as having TOC*/
}
-
+
#ifdef DEBUGOPEN
printf("matcd%d open2: partition=%d disksize=%d blksize=%x flags=%x\n",
ldrive,partition,(int)cd->disksize,cd->blksize,cd->flags);
@@ -669,7 +669,7 @@ int matcdopen(dev_t dev)
#endif /*LOCKDRIVE*/
cd->openflags |= (1<<partition);/*Mark partition open*/
- if (partition==RAW_PART ||
+ if (partition==RAW_PART ||
(partition < cd->dlabel.d_npartitions &&
cd->dlabel.d_partitions[partition].p_fstype != FS_UNUSED)) {
cd->partflags[partition] |= MATCDOPEN;
@@ -715,7 +715,7 @@ int matcdclose(dev_t dev)
#ifdef DIAGPORT
DIAGOUT(DIAGPORT,0x20); /*Show where we are*/
#endif /*DIAGPORT*/
- if (ldrive >= TOTALDRIVES)
+ if (ldrive >= TOTALDRIVES)
return(ENXIO);
partition = matcd_partition(dev);
@@ -816,7 +816,7 @@ void matcdstrategy(struct buf *bp)
printf("Block %d\n",(int)bp->b_pblkno);
#ifdef FREE2
bp=bp->b_actf;
-#else /*FREE2*/
+#else /*FREE2*/
bp=bp->av_forw;
#endif /*FREE2*/
}
@@ -1054,9 +1054,9 @@ int matcdsize(dev_t dev)
ldrive=matcd_ldrive(dev);
part=matcd_partition(dev);
- if (part==RAW_PART)
+ if (part==RAW_PART)
blksize=MATCDRBLK; /*2352*/
- else
+ else
blksize=MATCDBLK; /*2048*/
cd = &matcd_data[ldrive];
@@ -1084,10 +1084,10 @@ int matcdsize(dev_t dev)
The probe routine can be compiled two ways. In AUTOHUNT mode,
the kernel config file can say "port?" and we will check all ports
- listed in the port_hint array (see above).
+ listed in the port_hint array (see above).
Without AUTOHUNT set, the config file must list a specific port
- address to check.
+ address to check.
Note that specifying the explicit addresses makes boot-up a lot
faster.
@@ -1106,7 +1106,7 @@ int matcdsize(dev_t dev)
software, there are probably 8 different board models called
Sound Blaster 16. These include "Vibra", "Value", etc.
- Please report additional part numbers and board descriptions
+ Please report additional part numbers and board descriptions
and new port numbers that work to the author.
---------------------------------------------------------------------------*/
@@ -1195,7 +1195,7 @@ int matcd_probe(struct isa_device *dev)
}
/*---------------------------------------------------------------------------
- doprobe - Common probe code that actually checks the ports we
+ doprobe - Common probe code that actually checks the ports we
have decided to test.
---------------------------------------------------------------------------*/
@@ -1497,7 +1497,7 @@ void draincmd(int port,int cdrive,int ldrive)
i=inb(port+STATUS);
if (i==0xff) return;
-
+
printf("matcd%d: in draincmd: bus not idle %x - trying to fix\n",
ldrive,inb(port+STATUS));
if ((i & (DTEN|STEN)) == STEN) {
@@ -1563,7 +1563,7 @@ void selectdrive(int port,int drive)
matcd_pread - Read small blocks of control data from a drive
---------------------------------------------------------------------------*/
-void matcd_pread(int port, int count, unsigned char * data)
+void matcd_pread(int port, int count, unsigned char * data)
{
int i;
@@ -1683,14 +1683,14 @@ static int matcd_volinfo(int ldrive)
data[0],data[1],data[2], data[3],data[4],data[5]);
printf("status byte %x\n",z);
#endif /*DEBUGOPEN*/
- if ((z & MATCD_ST_ERROR)==0)
+ if ((z & MATCD_ST_ERROR)==0)
break; /*No Error*/
/* If media change or other error, you have to read error data or
the drive will reject subsequent commands.
*/
- if (chk_error(get_error(port, ldrive, cdrive))==ERR_FATAL) {
+ if (chk_error(get_error(port, ldrive, cdrive))==ERR_FATAL) {
#ifdef DEBUGOPEN
printf("matcd%d: command failed, status %x\n",
ldrive,z);
@@ -1724,7 +1724,7 @@ static int matcd_volinfo(int ldrive)
/*---------------------------------------------------------------------------
- blk_to_msf - Convert block numbers into CD disk block ids
+ blk_to_msf - Convert block numbers into CD disk block ids
---------------------------------------------------------------------------*/
static void blk_to_msf(int blk, unsigned char *msf)
@@ -1749,7 +1749,7 @@ static int msf_to_blk(unsigned char * cd)
+cd[1])*75 /*Blocks minus 2*/
+cd[2]-150); /*seconds*/
}
-
+
/*---------------------------------------------------------------------------
matcd_blockread - Performs actual background disc I/O operations
@@ -1839,10 +1839,10 @@ nextblock:
#endif /*DEBUGIO*/
blknum=(bp->b_blkno / (mbx->sz/DEV_BSIZE))
- + mbx->p_offset + mbx->skip/mbx->sz;
+ + mbx->p_offset + mbx->skip/mbx->sz;
blk_to_msf(blknum,rbuf.start_msf);
-
+
zero_cmd(cmd);
cmd[0]=READ; /*Get drive ID*/
cmd[1]=rbuf.start_msf[0];
@@ -1922,11 +1922,11 @@ nextblock:
}
bp->b_resid=0;
biodone(bp); /*Signal transfer complete*/
-
+
unlockbus(ldrive>>2, ldrive); /*Release bus lock*/
matcd_start(dp);/*See if other drives have work*/
return;
-
+
/* Here we skipped the data phase and went directly to status.
This indicates a hard error.
*/
@@ -2065,7 +2065,7 @@ int chk_error(int errnum)
case DISC_OUT:
case HARD_RESET:
return (ERR_INIT);
-
+
/* These errors indicate the system is confused about the drive
or media, and point to bugs in the driver or OS. These errors
cannot be retried since you will always get the same error.
@@ -2096,7 +2096,7 @@ int chk_error(int errnum)
the drives on a given controller, plus it leaves the other drives
unaffected.
---------------------------------------------------------------------------*/
-
+
int get_stat(int port,int ldrive)
{
int status,busstat; /*<16>*/
@@ -2439,7 +2439,7 @@ static int matcd_read_subq(int ldrive, int cdrive, int controller,
/* We only support the ioctl functions we could get information
on, so test for the things we can do
*/
-
+
if (sqp->data_format!=CD_CURRENT_POSITION ||
sqp->address_format!=CD_MSF_FORMAT) {
return(EINVAL);
@@ -2546,7 +2546,7 @@ static int matcd_igot(struct ioc_capability * sqp)
CDREADHEADER); /*Can read TOC*/
return(0);
}
-
+
#ifdef FULLDRIVER
#include "i386/isa/matcd/audio.c" /*<15>ioctls related to
diff --git a/sys/i386/isa/matcd/matcd.h b/sys/i386/isa/matcd/matcd.h
index be261a2..8802149 100644
--- a/sys/i386/isa/matcd/matcd.h
+++ b/sys/i386/isa/matcd/matcd.h
@@ -41,18 +41,18 @@
conditions even if it is unsupported, not a complete system
and/or does not contain compiled code.
8. These conditions will be in force for the full life of the
- copyright.
+ copyright.
9. If all the above conditions are met, modifications to other
parts of this file may be freely made, although any person
or persons making changes do not receive the right to add their
name or names to the copyright strings and notices in this
software. Persons making changes are encouraged to insert edit
history in matcd.c and to put your name and details of the
- change there.
+ change there.
10. You must have prior written permission from the author to
deviate from these terms.
- Vendors who produce product(s) containing this code are encouraged
+ Vendors who produce product(s) containing this code are encouraged
(but not required) to provide copies of the finished product(s) to
the author and to correspond with the author about development
activity relating to this code. Donations of development hardware
diff --git a/sys/i386/isa/matcd/options.h b/sys/i386/isa/matcd/options.h
index 67ff531..c60d83f 100644
--- a/sys/i386/isa/matcd/options.h
+++ b/sys/i386/isa/matcd/options.h
@@ -41,18 +41,18 @@
conditions even if it is unsupported, not a complete system
and/or does not contain compiled code.
8. These conditions will be in force for the full life of the
- copyright.
+ copyright.
9. If all the above conditions are met, modifications to other
parts of this file may be freely made, although any person
or persons making changes do not receive the right to add their
name or names to the copyright strings and notices in this
software. Persons making changes are encouraged to insert edit
history in matcd.c and to put your name and details of the
- change there.
+ change there.
10. You must have prior written permission from the author to
deviate from these terms.
- Vendors who produce product(s) containing this code are encouraged
+ Vendors who produce product(s) containing this code are encouraged
(but not required) to provide copies of the finished product(s) to
the author and to correspond with the author about development
activity relating to this code. Donations of development hardware
@@ -79,7 +79,7 @@
/* AUTOHUNT Adds extra code that allows the driver to search
for interface cards rather than having to hard-code
- the locations in the kernel conf file.
+ the locations in the kernel conf file.
Leaving AUTOHUNT enabled is the recommended setting.
*/
@@ -113,7 +113,7 @@
Leaving RESETONBOOT enabled is the recommended setting.
*/
-#define RESETONBOOT
+#define RESETONBOOT
/*<15> LOCKDRIVE If enabled, when a drive is opened using a
@@ -131,7 +131,7 @@
/*<5> FREE2 If enabled, the changes are inserted so this
<5> module will compile in the world of FreeBSD 2.x.
-<5> Without this, it is known to work in
+<5> Without this, it is known to work in
<14> FreeBSD 1.1.5.1. FREE2 should be set automatically
<14> by using the system version compile symbol below.
<5>*/
@@ -172,7 +172,7 @@
the -1 end-of-table marker. The values already present are
the ones found on standard SoundBlaster 16 and standalone cards.
---------------------------------------------------------------------------*/
-
+
#ifdef AUTOHUNT
int port_hints[]={
0x230,0x240, /*Ports SB audio boards can use*/
@@ -205,7 +205,7 @@ int port_hints[]={
loop endlessly if queues are not null terminated
as they should be.
*/
-
+
/*#define DEBUGQUEUE*/
@@ -261,7 +261,7 @@ int port_hints[]={
<10> (0x300) is reset in our probe and open routines.
<10> DO NOT use DIAGPORT 0x302 if an adapter is present
<10> at that address. It could ruin the EEPROM settings
-<10> on the device.
+<10> on the device.
*/
/*#define DIAGPORT 0x80*/
diff --git a/sys/i386/isa/mcd.c b/sys/i386/isa/mcd.c
index fbe6b13..d976194 100644
--- a/sys/i386/isa/mcd.c
+++ b/sys/i386/isa/mcd.c
@@ -40,7 +40,7 @@
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
- * $Id: mcd.c,v 1.42 1995/05/09 11:39:40 rgrimes Exp $
+ * $Id: mcd.c,v 1.43 1995/05/11 19:26:18 rgrimes Exp $
*/
static char COPYRIGHT[] = "mcd-driver (C)1993 by H.Veit & B.Moore";
@@ -249,7 +249,7 @@ int mcd_attach(struct isa_device *dev)
{
struct mcd_data *cd = mcd_data + dev->id_unit;
int i;
-
+
cd->iobase = dev->id_iobase;
cd->flags |= MCDINIT;
mcd_soft_reset(dev->id_unit);
@@ -269,7 +269,7 @@ int mcdopen(dev_t dev)
{
int unit,part,phys,r,retry;
struct mcd_data *cd;
-
+
unit = mcd_unit(dev);
if (unit >= NMCD)
return ENXIO;
@@ -277,7 +277,7 @@ int mcdopen(dev_t dev)
cd = mcd_data + unit;
part = mcd_part(dev);
phys = mcd_phys(dev);
-
+
/* not initialized*/
if (!(cd->flags & MCDINIT))
return ENXIO;
@@ -337,7 +337,7 @@ MCD_TRACE("open: partition=%d, disksize = %ld, blksize=%d\n",
return ENXIO;
return 0;
}
-
+
return ENXIO;
}
@@ -345,7 +345,7 @@ int mcdclose(dev_t dev)
{
int unit,part,phys;
struct mcd_data *cd;
-
+
unit = mcd_unit(dev);
if (unit >= NMCD)
return ENXIO;
@@ -353,7 +353,7 @@ int mcdclose(dev_t dev)
cd = mcd_data + unit;
part = mcd_part(dev);
phys = mcd_phys(dev);
-
+
if (!(cd->flags & MCDINIT))
return ENXIO;
@@ -377,7 +377,7 @@ mcdstrategy(struct buf *bp)
struct mcd_data *cd;
struct buf *qp;
int s;
-
+
int unit = mcd_unit(bp->b_dev);
cd = mcd_data + unit;
@@ -406,11 +406,11 @@ MCD_TRACE("strategy: drive not valid\n");
bp->b_error = EROFS;
goto bad;
}
-
+
/* no data to read */
if (bp->b_bcount == 0)
goto done;
-
+
/* for non raw access, check partition limits */
if (mcd_part(bp->b_dev) != RAW_PART) {
if (!(cd->flags & MCDLABEL)) {
@@ -425,13 +425,13 @@ MCD_TRACE("strategy: drive not valid\n");
bp->b_pblkno = bp->b_blkno;
bp->b_resid = 0;
}
-
+
/* queue it */
qp = &cd->head;
s = splbio();
disksort(qp,bp);
splx(s);
-
+
/* now check whether we can perform processing */
mcd_start(unit);
return;
@@ -451,7 +451,7 @@ static void mcd_start(int unit)
struct partition *p;
int part;
register s = splbio();
-
+
if (cd->flags & MCDMBXBSY) {
splx(s);
return;
@@ -495,7 +495,7 @@ int mcdioctl(dev_t dev, int cmd, caddr_t addr, int flags)
{
struct mcd_data *cd;
int unit,part;
-
+
unit = mcd_unit(dev);
part = mcd_part(dev);
cd = mcd_data + unit;
@@ -523,7 +523,7 @@ MCD_TRACE("ioctl called 0x%x\n", cmd);
return 0;
/*
- * a bit silly, but someone might want to test something on a
+ * a bit silly, but someone might want to test something on a
* section of cdrom.
*/
case DIOCWDINFO:
@@ -614,10 +614,10 @@ MCD_TRACE("ioctl called 0x%x\n", cmd);
static int mcd_getdisklabel(int unit)
{
struct mcd_data *cd = mcd_data + unit;
-
+
if (cd->flags & MCDLABEL)
return -1;
-
+
bzero(&cd->dlabel,sizeof(struct disklabel));
/* filled with spaces first */
strncpy(cd->dlabel.d_typename," ",
@@ -642,7 +642,7 @@ static int mcd_getdisklabel(int unit)
cd->dlabel.d_magic = DISKMAGIC;
cd->dlabel.d_magic2 = DISKMAGIC;
cd->dlabel.d_checksum = dkcksum(&cd->dlabel);
-
+
cd->flags |= MCDLABEL;
return 0;
}
@@ -704,7 +704,7 @@ twiddle_thumbs(int port, int unit, int count, char *whine)
int
mcd_probe(struct isa_device *dev)
{
- int port = dev->id_iobase;
+ int port = dev->id_iobase;
int unit = dev->id_unit;
int i, j;
int status;
@@ -856,7 +856,7 @@ mcd_get(int unit, char *buf, int nmax)
{
int port = mcd_data[unit].iobase;
int i,k;
-
+
for (i=0; i<nmax; i++) {
/* wait for data */
if ((k = mcd_getreply(unit,DELAY_GETREPLY)) < 0) {
@@ -873,7 +873,7 @@ mcd_send(int unit, int cmd,int nretrys)
{
int i,k=0;
int port = mcd_data[unit].iobase;
-
+
/*MCD_TRACE("mcd_send: command = 0x%02x\n",cmd,0,0,0);*/
for (i=0; i<nretrys; i++) {
outb(port+mcd_command, cmd);
@@ -1406,7 +1406,7 @@ mcd_toc_entrys(int unit, struct ioc_read_toc_entry *te)
i = te->starting_track;
if (i == MCD_LASTPLUS1)
i = bcd2bin(cd->volinfo.trk_high) + 1;
-
+
/* verify starting track */
if (i < bcd2bin(cd->volinfo.trk_low) ||
i > bcd2bin(cd->volinfo.trk_high)+1) {
diff --git a/sys/i386/isa/mcdreg.h b/sys/i386/isa/mcdreg.h
index f8d8598..d5ece62 100644
--- a/sys/i386/isa/mcdreg.h
+++ b/sys/i386/isa/mcdreg.h
@@ -1,7 +1,7 @@
/*
* Copyright 1993 by Holger Veit (data part)
* Copyright 1993 by Brian Moore (audio part)
- * Changes Copyright 1993 by Gary Clark II
+ * Changes Copyright 1993 by Gary Clark II
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -41,7 +41,7 @@
* the manufacturer or anyone else might provide better documentation,
* so this file (and the driver) will then have a better quality.
*
- * $Id: mcdreg.h,v 1.6 1994/12/24 13:24:02 ache Exp $
+ * $Id: mcdreg.h,v 1.7 1995/01/30 06:44:40 ache Exp $
*/
#ifndef MCD_H
diff --git a/sys/i386/isa/mse.c b/sys/i386/isa/mse.c
index a2c5ef3..4dedadd 100644
--- a/sys/i386/isa/mse.c
+++ b/sys/i386/isa/mse.c
@@ -11,7 +11,7 @@
* this software for any purpose. It is provided "as is"
* without express or implied warranty.
*
- * $Id: mse.c,v 1.10 1995/03/28 07:55:44 bde Exp $
+ * $Id: mse.c,v 1.11 1995/04/12 20:47:59 wollman Exp $
*/
/*
* Driver for the Logitech and ATI Inport Bus mice for use with 386bsd and
@@ -114,9 +114,9 @@ struct mse_softc {
#define MSE_SETUP 0x91 /* What does this mean? */
/* The definition for the control port */
/* is as follows: */
-
+
/* D7 = Mode set flag (1 = active) */
- /* D6,D5 = Mode selection (port A) */
+ /* D6,D5 = Mode selection (port A) */
/* 00 = Mode 0 = Basic I/O */
/* 01 = Mode 1 = Strobed I/O */
/* 10 = Mode 2 = Bi-dir bus */
@@ -129,7 +129,7 @@ struct mse_softc {
/* D1 = Port B direction (1 = input)*/
/* D0 = Port C (lower 4 bits) */
/* direction. (1 = input) */
-
+
/* So 91 means Basic I/O on all 3 ports,*/
/* Port A is an input port, B is an */
/* output port, C is split with upper */
@@ -288,7 +288,7 @@ mseclose(dev, flag)
return(0);
}
-/*
+/*
* mseread: return mouse info using the MSC serial protocol, but without
* using bytes 4 and 5.
* (Yes this is cheesy, but it makes the X386 server happy, so...)
@@ -404,10 +404,10 @@ mseintr(unit)
*/
if (sc->sc_deltax != 0 || sc->sc_deltay != 0 ||
(sc->sc_obuttons ^ sc->sc_buttons) != 0) {
- if (sc->sc_flags & MSESC_WANT) {
- sc->sc_flags &= ~MSESC_WANT;
- wakeup((caddr_t)sc);
- }
+ if (sc->sc_flags & MSESC_WANT) {
+ sc->sc_flags &= ~MSESC_WANT;
+ wakeup((caddr_t)sc);
+ }
selwakeup(&sc->sc_selp);
}
}
@@ -437,7 +437,7 @@ mse_probelogi(idp)
outb(idp->id_iobase + MSE_PORTC, MSE_DISINTR);
return(1);
} else {
- printf("mse%d: wrong signature %x\n",idp->id_unit,sig);
+ printf("mse%d: wrong signature %x\n",idp->id_unit,sig);
return(0);
}
}
diff --git a/sys/i386/isa/ncr5380.c b/sys/i386/isa/ncr5380.c
index 631b2ec..cdc0c1b 100644
--- a/sys/i386/isa/ncr5380.c
+++ b/sys/i386/isa/ncr5380.c
@@ -80,7 +80,7 @@
#define PAS16_STAT_DREQ 0x80 /* Pseudo-DMA ready bit */
#define PAS16_REG(r) (((r) & 0xc) << 11 | ((r) & 3))
-static u_char pas16_irq_magic[] =
+static u_char pas16_irq_magic[] =
{ 0, 0, 1, 2, 3, 4, 5, 6, 0, 0, 7, 8, 9, 0, 10, 11 };
/*
diff --git a/sys/i386/isa/npx.c b/sys/i386/isa/npx.c
index aacff0d..0a53279 100644
--- a/sys/i386/isa/npx.c
+++ b/sys/i386/isa/npx.c
@@ -32,7 +32,7 @@
* SUCH DAMAGE.
*
* from: @(#)npx.c 7.2 (Berkeley) 5/12/91
- * $Id: npx.c,v 1.21 1995/03/05 04:06:44 wpaul Exp $
+ * $Id: npx.c,v 1.22 1995/04/12 20:48:01 wollman Exp $
*/
#include "npx.h"
@@ -280,7 +280,7 @@ npxprobe1(dvp)
/*
* Good, now check for a proper control word.
*/
- control = 0x5a5a;
+ control = 0x5a5a;
fnstcw(&control);
if ((control & 0x1f3f) == 0x033f) {
hw_float = npx_exists = 1;
@@ -344,7 +344,7 @@ npxattach(dvp)
printf("npx%d: INT 16 interface\n", dvp->id_unit);
else if (npx_irq13)
; /* higher level has printed "irq 13" */
-#if defined(MATH_EMULATE) || defined(GPL_MATH_EMULATE)
+#if defined(MATH_EMULATE) || defined(GPL_MATH_EMULATE)
else if (npx_exists) {
printf("npx%d: error reporting broken; using 387 emulator\n",
dvp->id_unit);
diff --git a/sys/i386/isa/pcaudio.c b/sys/i386/isa/pcaudio.c
index c8a6237..f53b925 100644
--- a/sys/i386/isa/pcaudio.c
+++ b/sys/i386/isa/pcaudio.c
@@ -25,7 +25,7 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
- * $Id: pcaudio.c,v 1.11 1994/11/06 00:46:21 bde Exp $
+ * $Id: pcaudio.c,v 1.12 1995/03/30 14:33:03 sos Exp $
*/
#include "pca.h"
@@ -106,7 +106,7 @@ inline void conv(const void *table, void *buff, unsigned long n)
}
-static void
+static void
pca_volume(int volume)
{
int i, j;
@@ -142,7 +142,7 @@ pca_init()
}
-static int
+static int
pca_start(void)
{
/* use the first buffer */
@@ -164,7 +164,7 @@ pca_start(void)
}
-static void
+static void
pca_stop(void)
{
/* release the timers */
@@ -172,24 +172,24 @@ pca_stop(void)
release_timer2();
/* reset the buffer */
pca_status.in_use[0] = pca_status.in_use[1] = 0;
- pca_status.index = 0;
- pca_status.counter = 0;
+ pca_status.index = 0;
+ pca_status.counter = 0;
pca_status.current = 0;
pca_status.buffer = pca_status.buf[pca_status.current];
pca_status.timer_on = 0;
}
-static void
+static void
pca_pause()
{
release_timer0();
- release_timer2();
+ release_timer2();
pca_status.timer_on = 0;
}
-static void
+static void
pca_continue()
{
pca_status.oldval = inb(IO_PPI) | 0x03;
@@ -294,7 +294,7 @@ pcaclose(dev_t dev, int flag)
return ENXIO;
/* audio device close drains all output and restores timers */
pca_wait();
- pca_stop();
+ pca_stop();
pca_status.open = 0;
return 0;
}
@@ -336,10 +336,10 @@ pcawrite(dev_t dev, struct uio *uio, int flag)
}
pca_status.in_use[which] = count;
if (!pca_status.timer_on)
- if (pca_start())
+ if (pca_start())
return EBUSY;
}
- }
+ }
return 0;
}
@@ -375,7 +375,7 @@ pcaioctl(dev_t dev, int cmd, caddr_t data, int flag, struct proc *p)
auptr = (audio_info_t *)data;
if (auptr->play.sample_rate != (unsigned int)~0) {
pca_status.sample_rate = auptr->play.sample_rate;
- pca_status.scale =
+ pca_status.scale =
(pca_status.sample_rate << 8) / INTERRUPT_RATE;
}
if (auptr->play.encoding != (unsigned int)~0) {
@@ -406,7 +406,7 @@ pcaioctl(dev_t dev, int cmd, caddr_t data, int flag, struct proc *p)
}
-void
+void
pcaintr(struct clockframe *frame)
{
if (pca_status.index < pca_status.in_use[pca_status.current]) {
@@ -463,7 +463,7 @@ pcaselect(dev_t dev, int rw, struct proc *p)
return 0;
default:
splx(s);
- return(0);
+ return(0);
}
}
#endif
diff --git a/sys/i386/isa/pcic.c b/sys/i386/isa/pcic.c
index 01f9f02..f5b31c9 100644
--- a/sys/i386/isa/pcic.c
+++ b/sys/i386/isa/pcic.c
@@ -4,7 +4,7 @@
* [2] parse tuples to find out where to map the shared memory buffer,
* and what to write into the configuration register
* [3] move pcic-specific code into a separate module.
- *
+ *
* Device driver for IBM PCMCIA Credit Card Adapter for Ethernet,
* if_ze.c
*
diff --git a/sys/i386/isa/pcic.h b/sys/i386/isa/pcic.h
index 852f332..6b99d72 100644
--- a/sys/i386/isa/pcic.h
+++ b/sys/i386/isa/pcic.h
@@ -4,7 +4,7 @@
* [2] parse tuples to find out where to map the shared memory buffer,
* and what to write into the configuration register
* [3] move pcic-specific code into a separate module.
- *
+ *
* Device driver for IBM PCMCIA Credit Card Adapter for Ethernet,
* if_ze.c
*
@@ -49,7 +49,7 @@
/*
* Each PCIC chip (82365SL or clone) can handle two card slots, and there
* can be up to four PCICs in a system. (On some machines, not all of the
- * address lines are decoded, so a card may appear to be in more than one
+ * address lines are decoded, so a card may appear to be in more than one
* slot.)
*/
#define MAXSLOT 8
@@ -61,8 +61,8 @@
* the value from or to the DATA register for that controller.
*
* The first pair of chips shares I/O addresss for DATA and INDEX,
- * as does the second pair. (To the programmer, it looks like each
- * pair is a single chip.) The i/o port addresses are hard-wired
+ * as does the second pair. (To the programmer, it looks like each
+ * pair is a single chip.) The i/o port addresses are hard-wired
* into the PCIC; so the following addresses should be valid for
* any machine that uses this chip.
*/
@@ -167,7 +167,7 @@ void pcic_map_memory (int slot, int window, unsigned long sys_addr,
unsigned long card_addr, unsigned long length,
enum memtype type, int width);
void pcic_unmap_memory (int slot, int window);
-void pcic_map_io (int slot, int window, unsigned short base,
+void pcic_map_io (int slot, int window, unsigned short base,
unsigned short length, unsigned short width);
#ifdef TEST
void pcic_unmap_io (int slot, int window);
diff --git a/sys/i386/isa/pcvt/pcvt_conf.h b/sys/i386/isa/pcvt/pcvt_conf.h
index 3ddc3a2..c5739c5 100644
--- a/sys/i386/isa/pcvt/pcvt_conf.h
+++ b/sys/i386/isa/pcvt/pcvt_conf.h
@@ -53,7 +53,7 @@
*
* Here's an idea how to automatically detect the version of NetBSD pcvt is
* being compiled on:
- *
+ *
* NetBSD 0.8 : NetBSD0_8 defined in <sys/param.h>
* NetBSD 0.9 : NetBSD0_9 defined in <sys/param.h>
* NetBSD 1.0 : NetBSD1_0 defined as 1 in <sys/param.h>
@@ -64,7 +64,7 @@
* This leads to something like this in pcvt_hdr.h (#elif is possible too):
*
*---------------------------------------------------------------------------*/
-
+
#ifdef NetBSD0_8
#define PCVT_NETBSD 8
#endif
@@ -80,7 +80,7 @@
#define PCVT_NETBSD 100
#endif
#endif
-
+
/*---------------------------------------------------------------------------
* Note that each of the options below should rather be overriden by the
* kernel config file instead of this .h file - this allows for different
@@ -128,7 +128,7 @@
*======================================================================*
* F r e e B S D *
*======================================================================*
- *
+ *
* options "PCVT_FREEBSD=xxx" enables support for FreeBSD
*
* select:
@@ -139,7 +139,7 @@
* PCVT_FREEBSD = 210 for FreeBSD 2.1-Release
*
*/
-
+
/* -------------------------------------------------------------------- */
/* ---------------- USER PREFERENCE DRIVER OPTIONS -------------------- */
/* -------------------------------------------------------------------- */
@@ -160,9 +160,9 @@
#if !defined PCVT_VT220KEYB /* ---------- DEFAULT: OFF ------------ */
# define PCVT_VT220KEYB 0 /* this compiles a more vt220-like */
-#elif PCVT_VT220KEYB != 0 /* keyboardlayout as described in the */
+#elif PCVT_VT220KEYB != 0 /* keyboardlayout as described in the */
# undef PCVT_VT220KEYB /* file Keyboard.VT220. */
-# define PCVT_VT220KEYB 1 /* if undefined, a more HP-like */
+# define PCVT_VT220KEYB 1 /* if undefined, a more HP-like */
#endif /* keyboardlayout is compiled */
/* try to find out what YOU like ! */
@@ -263,7 +263,7 @@
#endif /* keyboard controller chip. */
/* this is just for some hardcore */
/* keyboarders .... */
-
+
/* -------------------------------------------------------------------- */
/* -------------------- DRIVER OPTIONS -------------------------------- */
/* -------------------------------------------------------------------- */
@@ -283,7 +283,7 @@
# define PCVT_PORTIO_DELAY 1 /* accessing the keyboard controller, */
#endif /* otherwise the system delay functions */
/* are used. */
-
+
#if !defined PCVT_PCBURST /* ---------- DEFAULT: 256 ------------ */
# define PCVT_PCBURST 256 /* NETBSD and FreeBSD >= 2.0 only: this */
#endif /* is the number of output characters */
@@ -300,7 +300,7 @@
#if !defined PCVT_KEYBDID /* ---------- DEFAULT: ON ------------- */
# define PCVT_KEYBDID 1 /* check type of keyboard connected. at */
#elif PCVT_KEYBDID != 0 /* least HP-keyboards send an id other */
-# undef PCVT_KEYBDID /* than the industry standard, so it */
+# undef PCVT_KEYBDID /* than the industry standard, so it */
# define PCVT_KEYBDID 1 /* CAN lead to problems. if you have */
#endif /* problems with this, TELL ME PLEASE ! */
@@ -312,7 +312,7 @@
#endif /* i'm not sure, whether this feature */
/* has to be in the driver or has to */
/* move as an ioctl call to scon .... */
-
+
#if !defined PCVT_NULLCHARS /* ---------- DEFAULT: ON ------------- */
# define PCVT_NULLCHARS 1 /* allow the keyboard to send null */
#elif PCVT_NULLCHARS != 0 /* (0x00) characters to the calling */
@@ -379,7 +379,7 @@
/* but introduced another flicker, so */
/* this is for you to experiment ..... */
/* - see also PCVT_WAITRETRACE below -- */
-
+
#if !defined PCVT_WAITRETRACE /* ---------- DEFAULT: OFF ------------ */
# define PCVT_WAITRETRACE 0 /* this option waits for being in a */
#elif PCVT_WAITRETRACE != 0 /* retrace window prior to accessing */
@@ -439,7 +439,7 @@
# undef PCVT_SLOW_INTERRUPT /* disabling the processor irq's, if on */
# define PCVT_SLOW_INTERRUPT 1 /* this is done by spl()/splx() calls. */
#endif
-
+
#ifdef XSERVER
#if !defined PCVT_USL_VT_COMPAT /* ---------- DEFAULT: ON ------------- */
@@ -452,7 +452,7 @@
/* to run multiple X servers and/or */
/* character terminal sessions. */
-#endif /* XSERVER */
+#endif /* XSERVER */
/*---------------------------------------------------------------------------*
* Kernel messages attribute definitions
diff --git a/sys/i386/isa/pcvt/pcvt_drv.c b/sys/i386/isa/pcvt/pcvt_drv.c
index 7a7a5e3..fb2168f 100644
--- a/sys/i386/isa/pcvt/pcvt_drv.c
+++ b/sys/i386/isa/pcvt/pcvt_drv.c
@@ -119,7 +119,7 @@ pcprobe(struct isa_device *dev)
#endif /* PCVT_NETBSD > 100 */
{
kbd_code_init();
-
+
#if PCVT_NETBSD > 9
((struct isa_attach_args *)aux)->ia_iosize = 16;
return 1;
@@ -148,7 +148,7 @@ pcattach(struct isa_device *dev)
int i;
vt_coldmalloc(); /* allocate memory for screens */
-
+
#if PCVT_NETBSD || PCVT_FREEBSD
#if PCVT_NETBSD > 9
@@ -197,11 +197,11 @@ pcattach(struct isa_device *dev)
case KB_AT:
printf("at-");
break;
-
+
case KB_MFII:
printf("mf2-");
break;
-
+
default:
printf("unknown ");
break;
@@ -215,7 +215,7 @@ pcattach(struct isa_device *dev)
{
#if PCVT_NETBSD
- pc_tty[i] = ttymalloc();
+ pc_tty[i] = ttymalloc();
vs[i].vs_tty = pc_tty[i];
#else /* !PCVT_NETBSD */
pccons[i] = ttymalloc(pccons[i]);
@@ -240,7 +240,7 @@ pcattach(struct isa_device *dev)
#endif /* PCVT_NETBSD */
#endif /* #if PCVT_NETBSD || (PCVT_FREEBSD > 110 && PCVT_FREEBSD < 200) */
-
+
#else /* !PCVT_NETBSD && !PCVT_FREEBSD*/
switch(adaptor_type)
@@ -277,17 +277,17 @@ pcattach(struct isa_device *dev)
printf(",color");
printf(",%d scr,", totalscreens);
-
+
switch(keyboard_type)
{
case KB_AT:
printf("at-");
break;
-
+
case KB_MFII:
printf("mf2-");
break;
-
+
default:
printf("unknown ");
break;
@@ -310,7 +310,7 @@ pcattach(struct isa_device *dev)
pcvt_is_console? DC_IDLE: DC_BUSY;
vt_registerdev(dev, (char *)vga_string(vga_type));
#endif /* PCVT_FREEBSD > 205 */
-
+
#if PCVT_NETBSD > 9
vthand.ih_fun = pcrint;
@@ -388,7 +388,7 @@ pcopen(Dev_t dev, int flag, int mode, struct proc *p)
int s, retval;
int winsz = 0;
int i = minor(dev);
-
+
#if PCVT_EMU_MOUSE
if(i == totalscreens)
vsx = 0;
@@ -413,7 +413,7 @@ pcopen(Dev_t dev, int flag, int mode, struct proc *p)
#endif /* PCVT_EMU_MOUSE */
vsx->openf++;
-
+
tp->t_oproc = pcstart;
tp->t_param = pcparam;
tp->t_dev = dev;
@@ -441,7 +441,7 @@ pcopen(Dev_t dev, int flag, int mode, struct proc *p)
tp->t_cflag |= CLOCAL; /* cannot be a modem (:-) */
if ((tp->t_state & TS_ISOPEN) == 0) /* is this a "cold" open ? */
- winsz = 1; /* yes, set winsize later */
+ winsz = 1; /* yes, set winsize later */
#if PCVT_NETBSD || (PCVT_FREEBSD >= 200)
retval = ((*linesw[tp->t_line].l_open)(dev, tp));
@@ -450,7 +450,7 @@ pcopen(Dev_t dev, int flag, int mode, struct proc *p)
#endif /* PCVT_NETBSD || (PCVT_FREEBSD >= 200) */
if(winsz == 1)
- {
+ {
/*
* The line discipline has clobbered t_winsize if TS_ISOPEN
@@ -465,7 +465,7 @@ pcopen(Dev_t dev, int flag, int mode, struct proc *p)
tp->t_winsize.ws_row = vsx->screen_rows;
tp->t_winsize.ws_xpixel = (vsx->maxcol == 80)? 720: 1056;
tp->t_winsize.ws_ypixel = 400;
-
+
splx(s);
}
@@ -476,7 +476,7 @@ pcopen(Dev_t dev, int flag, int mode, struct proc *p)
kdc_vt[0].kdc_state = DC_BUSY;
}
#endif
-
+
return(retval);
}
@@ -486,7 +486,7 @@ pcclose(Dev_t dev, int flag, int mode, struct proc *p)
register struct tty *tp;
register struct video_state *vsx;
int i = minor(dev);
-
+
#if PCVT_EMU_MOUSE
if(i == totalscreens)
vsx = 0;
@@ -494,7 +494,7 @@ pcclose(Dev_t dev, int flag, int mode, struct proc *p)
#endif /* PCVT_EMU_MOUSE */
vsx = &vs[i];
-
+
if((tp = get_pccons(dev)) == NULL)
return ENXIO;
@@ -508,7 +508,7 @@ pcclose(Dev_t dev, int flag, int mode, struct proc *p)
#endif /* PCVT_EMU_MOUSE */
vsx->openf = 0;
-
+
#if PCVT_USL_VT_COMPAT
#if PCVT_EMU_MOUSE
@@ -520,7 +520,7 @@ pcclose(Dev_t dev, int flag, int mode, struct proc *p)
reset_usl_modes(vsx);
#endif /* PCVT_USL_VT_COMPAT */
-
+
#if PCVT_FREEBSD > 205
if(!pcvt_is_console)
{
@@ -539,7 +539,7 @@ pcread(Dev_t dev, struct uio *uio, int flag)
if((tp = get_pccons(dev)) == NULL)
return ENXIO;
-
+
return ((*linesw[tp->t_line].l_read)(tp, uio, flag));
}
@@ -618,10 +618,10 @@ pcioctl(Dev_t dev, int cmd, caddr_t data, int flag, struct proc *p)
int i;
(void)usl_vt_ioctl(dev, KDDISABIO, 0, flag, p);
-
+
i = KD_TEXT;
(void)usl_vt_ioctl(dev, KDSETMODE, (caddr_t)&i, flag, p);
-
+
i = K_XLATE;
(void)usl_vt_ioctl(dev, KDSKBMODE, (caddr_t)&i, flag, p);
return 0;
@@ -678,7 +678,7 @@ pcioctl(Dev_t dev, int cmd, caddr_t data, int flag, struct proc *p)
if (data)
{
-#if PCVT_NETBSD
+#if PCVT_NETBSD
sysbeep(((int *)data)[0],
((int *)data)[1] * hz / 1000);
#else /* PCVT_NETBSD */
@@ -877,7 +877,7 @@ pcrint(void)
{
log (LOG_WARNING, "pcvt: keyboard buffer overflow\n");
}
- else
+ else
{
pcvt_kbd_fifo[pcvt_kbd_wptr++] = dt; /* data -> fifo */
@@ -912,7 +912,7 @@ pcrint(void)
if(!(vs[current_video_screen].openf)) /* XXX was vs[minor(dev)] */
return 1;
-
+
#if PCVT_NULLCHARS
if(*cp == '\0')
{
@@ -999,14 +999,14 @@ pcstart(struct tty *tp)
{
int s;
unsigned char c;
-
+
s = spltty();
if (tp->t_state & (TS_TIMEOUT|TS_BUSY|TS_TTSTOP))
{
goto out;
}
-
+
for(;;)
{
@@ -1042,7 +1042,7 @@ pcstart(struct tty *tp)
ttwwakeup(tp);
}
#endif /* !PCVT_FREEBSD > 114 */
-
+
#if !(PCVT_FREEBSD > 111)
if (RB_LEN(&tp->t_out) == 0)
#else
@@ -1091,7 +1091,7 @@ pccnprobe(struct consdev *cp)
int maj;
/* locate the major number */
-
+
for (maj = 0; maj < nchrdev; maj++)
{
if ((u_int)cdevsw[maj].d_open == (u_int)pcopen)
@@ -1103,7 +1103,7 @@ pccnprobe(struct consdev *cp)
/* we are not in cdevsw[], give up */
panic("pcvt is not in cdevsw[]");
}
-
+
/* initialize required fields */
cp->cn_dev = makedev(maj, 0);
@@ -1165,7 +1165,7 @@ pccnputc(Dev_t dev, U_char c)
sput((char *) &c, 1, 1, 0);
- async_update(UPDATE_KERN);
+ async_update(UPDATE_KERN);
#if PCVT_FREEBSD <= 205
return 0;
@@ -1250,10 +1250,10 @@ pcparam(struct tty *tp, struct termios *t)
/* special characters */
#define bs 8
-#define lf 10
-#define cr 13
-#define cntlc 3
-#define del 0177
+#define lf 10
+#define cr 13
+#define cntlc 3
+#define del 0177
#define cntld 4
int
@@ -1318,7 +1318,7 @@ dprintf(unsigned flgs, const char *fmt, ...)
va_end(ap);
if (flgs & DPAUSE || nrow%24 == 23)
- {
+ {
int x;
x = splhigh();
if(nrow%24 == 23)
@@ -1362,7 +1362,7 @@ static int
pcvt_xmode_set(int on, struct proc *p)
{
static unsigned char *saved_fonts[NVGAFONTS];
-
+
#if PCVT_SCREENSAVER
static unsigned saved_scrnsv_tmo = 0;
#endif /* PCVT_SCREENSAVER */
@@ -1442,7 +1442,7 @@ pcvt_xmode_set(int on, struct proc *p)
#if PCVT_SCANSET == 2
/* put keyboard to return ancient PC scan codes */
- kbc_8042cmd(CONTR_WRITE);
+ kbc_8042cmd(CONTR_WRITE);
#if PCVT_USEKBDSEC /* security enabled */
outb(CONTROLLER_DATA,
(COMMAND_SYSFLG|COMMAND_IRQEN|COMMAND_PCSCAN));
@@ -1463,7 +1463,7 @@ pcvt_xmode_set(int on, struct proc *p)
{
if(!pcvt_xmode) /* verify if in X */
return 0;
-
+
pcvt_xmode = pcvt_kbd_raw = 0;
for(i = 0; i < totalfonts; i++)
@@ -1488,7 +1488,7 @@ pcvt_xmode_set(int on, struct proc *p)
#endif /* PCVT_SCREENSAVER */
#if PCVT_SCANSET == 2
- kbc_8042cmd(CONTR_WRITE);
+ kbc_8042cmd(CONTR_WRITE);
#if PCVT_USEKBDSEC /* security enabled */
outb(CONTROLLER_DATA,
(COMMAND_SYSFLG|COMMAND_IRQEN));
@@ -1535,7 +1535,7 @@ pcvt_xmode_set(int on, struct proc *p)
outb(addr_6845+1, (vsp->Crtat - Crtat) >> 8);
outb(addr_6845, CRTC_STARTADRL);
outb(addr_6845+1, (vsp->Crtat - Crtat));
-
+
async_update(UPDATE_START);
}
return 0;
diff --git a/sys/i386/isa/pcvt/pcvt_ext.c b/sys/i386/isa/pcvt/pcvt_ext.c
index 7088caf..f0b96c3 100644
--- a/sys/i386/isa/pcvt/pcvt_ext.c
+++ b/sys/i386/isa/pcvt/pcvt_ext.c
@@ -87,7 +87,7 @@ static union {
u_char wd90c11[12];
u_char tri9000[13];
u_char v7_1024i[17];
- u_char s3_928[32];
+ u_char s3_928[32];
u_char cirrus[13];
}
savearea;
@@ -125,19 +125,19 @@ vga_chipset(void)
/*---------------------------------------------------------------------------*
* check for Western Digital / Paradise chipsets
*---------------------------------------------------------------------------*/
-
+
ptr = (u_char *)Crtat;
if(color)
ptr += (0xc007d - 0xb8000);
else
- ptr += (0xc007d - 0xb0000);
+ ptr += (0xc007d - 0xb0000);
if((*ptr++ == 'V') && (*ptr++ == 'G') &&
(*ptr++ == 'A') && (*ptr++ == '='))
{
int wd90c10;
-
+
vga_family = VGA_F_WD;
outb(addr_6845, 0x2b);
@@ -154,7 +154,7 @@ vga_chipset(void)
newbyte = inb(TS_DATA) & 0x40;
if(newbyte != 0)
return(VGA_WD90C00); /* WD90C00 chip */
-
+
outb(TS_DATA, oldbyte | 0x40);
newbyte = inb(TS_DATA) & 0x40;
if(newbyte == 0)
@@ -200,7 +200,7 @@ vga_chipset(void)
byte = inb(TS_DATA); /* chipset type */
-
+
outb(TS_INDEX, 0x0e);
old1byte = inb(TS_DATA);
@@ -254,7 +254,7 @@ vga_chipset(void)
return(VGA_TRUNKNOWN);
}
}
-
+
/*---------------------------------------------------------------------------*
* check for Tseng Labs ET3000/4000 chipsets
*---------------------------------------------------------------------------*/
@@ -265,7 +265,7 @@ vga_chipset(void)
else
outb(GN_DMCNTLM, 0xa0);
- /* read old value */
+ /* read old value */
if(color)
inb(GN_INPSTAT1C);
@@ -281,7 +281,7 @@ vga_chipset(void)
else
inb(GN_INPSTAT1M);
outb(ATC_INDEX, ATC_MISC);
- newbyte = oldbyte ^ 0x10;
+ newbyte = oldbyte ^ 0x10;
outb(ATC_DATAW, newbyte);
/* read back new value */
@@ -298,22 +298,22 @@ vga_chipset(void)
else
inb(GN_INPSTAT1M);
outb(ATC_INDEX, ATC_MISC);
- outb(ATC_DATAW, oldbyte);
+ outb(ATC_DATAW, oldbyte);
if(byte == newbyte) /* ET3000 or ET4000 */
{
vga_family = VGA_F_TSENG;
-
+
outb(addr_6845, CRTC_EXTSTART);
oldbyte = inb(addr_6845+1);
newbyte = oldbyte ^ 0x0f;
outb(addr_6845+1, newbyte);
byte = inb(addr_6845+1);
- outb(addr_6845+1, oldbyte);
+ outb(addr_6845+1, oldbyte);
if(byte == newbyte)
{
- can_do_132col = 1;
+ can_do_132col = 1;
return(VGA_ET4000);
}
else
@@ -327,22 +327,22 @@ vga_chipset(void)
*---------------------------------------------------------------------------*/
outb(TS_INDEX, TS_EXTCNTL); /* enable extensions */
- outb(TS_DATA, 0xea);
+ outb(TS_DATA, 0xea);
outb(addr_6845, CRTC_STARTADRH);
oldbyte = inb(addr_6845+1);
outb(addr_6845+1, 0x55);
- newbyte = inb(addr_6845+1);
+ newbyte = inb(addr_6845+1);
outb(addr_6845, CRTC_V7ID); /* id register */
byte = inb(addr_6845+1); /* read id */
-
+
outb(addr_6845, CRTC_STARTADRH);
outb(addr_6845+1, oldbyte);
-
+
outb(TS_INDEX, TS_EXTCNTL); /* disable extensions */
- outb(TS_DATA, 0xae);
+ outb(TS_DATA, 0xae);
if(byte == (0x55 ^ 0xea))
{ /* is Video 7 */
@@ -350,7 +350,7 @@ vga_chipset(void)
vga_family = VGA_F_V7;
outb(TS_INDEX, TS_EXTCNTL); /* enable extensions */
- outb(TS_DATA, 0xea);
+ outb(TS_DATA, 0xea);
outb(TS_INDEX, TS_V7CHIPREV);
byte = inb(TS_DATA);
@@ -434,7 +434,7 @@ vga_chipset(void)
return VGA_S3_UNKNOWN;
}
}
- }
+ }
/*---------------------------------------------------------------------------*
* check for Cirrus chipsets
@@ -561,10 +561,10 @@ int
vga_col(struct video_state *svsp, int cols)
{
int ret = 0;
-
+
if(adaptor_type != VGA_ADAPTOR)
return(0);
-
+
switch(vga_type)
{
case VGA_ET4000:
@@ -581,15 +581,15 @@ vga_col(struct video_state *svsp, int cols)
case VGA_TR9000:
ret = tri9000_col(cols);
break;
-
+
case VGA_V71024I:
ret = v7_1024i_col(cols);
break;
-
+
case VGA_S3_928:
ret = s3_928_col(cols);
break;
-
+
case VGA_CL_GD5402:
case VGA_CL_GD5402r1:
case VGA_CL_GD5420:
@@ -606,7 +606,7 @@ vga_col(struct video_state *svsp, int cols)
#if PCVT_132GENERIC
ret = generic_col(cols);
#endif /* PCVT_132GENERIC */
-
+
break;
}
@@ -661,7 +661,7 @@ generic_col(int cols)
static volatile u_short blankstart = 1072;
static volatile u_short syncstart = 1112;
static volatile u_short syncend = 1280;
-
+
#else /* PCVT_EXP_132COL */
/* reduced sync-pulse width and sync delays */
@@ -670,28 +670,28 @@ generic_col(int cols)
static volatile u_short blankstart = 1056;
static volatile u_short syncstart = 1104;
static volatile u_short syncend = 1168;
-
+
#endif /* PCVT_EXP_132COL */
vga_screen_off();
-
+
/* enable access to first 7 CRTC registers */
- outb(addr_6845, CRTC_VSYNCE);
+ outb(addr_6845, CRTC_VSYNCE);
byte = inb(addr_6845+1);
outb(addr_6845, CRTC_VSYNCE);
outb(addr_6845+1, byte & 0x7f);
-
+
if(cols == SCR_COL132) /* switch 80 -> 132 */
{
/* save state of board for 80 columns */
-
+
if(!regsaved)
{
regsaved = 1;
sp = savearea.generic;
-
+
outb(addr_6845, 0x00); /* Horizontal Total */
*sp++ = inb(addr_6845+1);
outb(addr_6845, 0x01); /* Horizontal Display End */
@@ -704,27 +704,27 @@ generic_col(int cols)
*sp++ = inb(addr_6845+1);
outb(addr_6845, 0x05); /* Horizontal Retrace End */
*sp++ = inb(addr_6845+1);
-
+
outb(addr_6845, 0x13); /* Row Offset Register */
*sp++ = inb(addr_6845+1);
-
+
outb(TS_INDEX, TS_MODE);/* Timing Sequencer */
*sp++ = inb(TS_DATA);
-
+
if(color)
inb(GN_INPSTAT1C);
else
inb(GN_INPSTAT1M);
/* ATC Mode control */
- outb(ATC_INDEX, ATC_MODE | ATC_ACCESS);
+ outb(ATC_INDEX, ATC_MODE | ATC_ACCESS);
*sp++ = inb(ATC_DATAR);
-
+
if(color)
inb(GN_INPSTAT1C);
else
inb(GN_INPSTAT1M);
/* ATC Horizontal Pixel Panning */
- outb(ATC_INDEX, ATC_HORPIXPAN | ATC_ACCESS);
+ outb(ATC_INDEX, ATC_HORPIXPAN | ATC_ACCESS);
*sp++ = inb(ATC_DATAR);
*sp++ = inb(GN_MISCOUTR); /* Misc output register */
@@ -747,20 +747,20 @@ generic_col(int cols)
outb(addr_6845+1,
(((syncend / 8) & 0x20) * 4)
| ((syncend / 8) & 0x1f));
-
+
outb(addr_6845, 0x13); /* Row Offset Register */
outb(addr_6845+1, 0x42);
-
+
outb(TS_INDEX, TS_MODE);/* Timing Sequencer */
outb(TS_DATA, 0x01); /* 8 dot char clock */
-
+
if(color)
inb(GN_INPSTAT1C);
else
inb(GN_INPSTAT1M);
outb(ATC_INDEX, ATC_MODE | ATC_ACCESS); /* ATC Mode control */
outb(ATC_DATAW, 0x08); /* Line graphics disable */
-
+
if(color)
inb(GN_INPSTAT1C);
else
@@ -782,54 +782,54 @@ generic_col(int cols)
vga_screen_on();
return(0);
}
-
+
sp = savearea.generic;
-
+
outb(addr_6845, 0x00); /* Horizontal Total */
outb(addr_6845+1, *sp++);
outb(addr_6845, 0x01); /* Horizontal Display End */
outb(addr_6845+1, *sp++);
outb(addr_6845, 0x02); /* Horizontal Blank Start */
- outb(addr_6845+1, *sp++);
+ outb(addr_6845+1, *sp++);
outb(addr_6845, 0x03); /* Horizontal Blank End */
- outb(addr_6845+1, *sp++);
+ outb(addr_6845+1, *sp++);
outb(addr_6845, 0x04); /* Horizontal Retrace Start */
outb(addr_6845+1, *sp++);
outb(addr_6845, 0x05); /* Horizontal Retrace End */
outb(addr_6845+1, *sp++);
-
+
outb(addr_6845, 0x13); /* Row Offset Register */
outb(addr_6845+1, *sp++);
-
+
outb(TS_INDEX, TS_MODE);/* Timing Sequencer */
outb(TS_DATA, *sp++);
-
+
if(color)
inb(GN_INPSTAT1C);
else
inb(GN_INPSTAT1M);
/* ATC Mode control */
- outb(ATC_INDEX, ATC_MODE | ATC_ACCESS);
+ outb(ATC_INDEX, ATC_MODE | ATC_ACCESS);
outb(ATC_DATAW, *sp++);
-
+
if(color)
inb(GN_INPSTAT1C);
else
inb(GN_INPSTAT1M);
/* ATC Horizontal Pixel Panning */
- outb(ATC_INDEX, ATC_HORPIXPAN | ATC_ACCESS);
+ outb(ATC_INDEX, ATC_HORPIXPAN | ATC_ACCESS);
outb(ATC_DATAW, *sp++);
outb(GN_MISCOUTW, *sp++); /* Misc output register */
- }
-
+ }
+
/* disable access to first 7 CRTC registers */
-
+
outb(addr_6845, CRTC_VSYNCE);
outb(addr_6845+1, byte);
vga_screen_on();
-
+
return(1);
}
#endif /* PCVT_132GENERIC */
@@ -844,94 +844,94 @@ et4000_col(int cols)
u_char byte;
vga_screen_off();
-
+
/* enable access to first 7 CRTC registers */
- outb(addr_6845, CRTC_VSYNCE);
+ outb(addr_6845, CRTC_VSYNCE);
byte = inb(addr_6845+1);
outb(addr_6845, CRTC_VSYNCE);
outb(addr_6845+1, byte & 0x7f);
-
+
if(cols == SCR_COL132) /* switch 80 -> 132 */
{
/* save state of board for 80 columns */
-
+
if(!regsaved)
{
regsaved = 1;
sp = savearea.et4000;
-
+
outb(addr_6845, 0x00); /* Horizontal Total */
*sp++ = inb(addr_6845+1);
outb(addr_6845, 0x01); /* Horizontal Display End */
*sp++ = inb(addr_6845+1);
outb(addr_6845, 0x02); /* Horizontal Blank Start */
*sp++ = inb(addr_6845+1);
-
+
outb(addr_6845, 0x04); /* Horizontal Retrace Start */
*sp++ = inb(addr_6845+1);
outb(addr_6845, 0x05); /* Horizontal Retrace End */
*sp++ = inb(addr_6845+1);
-
+
outb(addr_6845, 0x13); /* Row Offset Register */
*sp++ = inb(addr_6845+1);
-
+
outb(addr_6845, 0x34); /* 6845 Compatibility */
*sp++ = inb(addr_6845+1);
-
+
outb(TS_INDEX, TS_MODE);/* Timing Sequencer */
*sp++ = inb(TS_DATA);
-
+
if(color)
inb(GN_INPSTAT1C);
else
inb(GN_INPSTAT1M);
/* ATC Mode control */
- outb(ATC_INDEX, ATC_MODE | ATC_ACCESS);
+ outb(ATC_INDEX, ATC_MODE | ATC_ACCESS);
*sp++ = inb(ATC_DATAR);
-
+
if(color)
inb(GN_INPSTAT1C);
else
inb(GN_INPSTAT1M);
/* ATC Horizontal Pixel Panning */
- outb(ATC_INDEX, ATC_HORPIXPAN | ATC_ACCESS);
+ outb(ATC_INDEX, ATC_HORPIXPAN | ATC_ACCESS);
*sp++ = inb(ATC_DATAR);
*sp++ = inb(GN_MISCOUTR); /* Misc output register */
}
/* setup chipset for 132 column operation */
-
+
outb(addr_6845, 0x00); /* Horizontal Total */
outb(addr_6845+1, 0x9f);
outb(addr_6845, 0x01); /* Horizontal Display End */
outb(addr_6845+1, 0x83);
outb(addr_6845, 0x02); /* Horizontal Blank Start */
outb(addr_6845+1, 0x84);
-
+
outb(addr_6845, 0x04); /* Horizontal Retrace Start */
outb(addr_6845+1, 0x8b);
outb(addr_6845, 0x05); /* Horizontal Retrace End */
outb(addr_6845+1, 0x80);
-
+
outb(addr_6845, 0x13); /* Row Offset Register */
outb(addr_6845+1, 0x42);
-
+
outb(addr_6845, 0x34); /* 6845 Compatibility */
outb(addr_6845+1, 0x0a);
-
+
outb(TS_INDEX, TS_MODE);/* Timing Sequencer */
outb(TS_DATA, 0x01); /* 8 dot char clock */
-
+
if(color)
inb(GN_INPSTAT1C);
else
inb(GN_INPSTAT1M);
outb(ATC_INDEX, ATC_MODE | ATC_ACCESS); /* ATC Mode control */
outb(ATC_DATAW, 0x08); /* Line graphics disable */
-
+
if(color)
inb(GN_INPSTAT1C);
else
@@ -953,58 +953,58 @@ et4000_col(int cols)
vga_screen_on();
return(0);
}
-
+
sp = savearea.et4000;
-
+
outb(addr_6845, 0x00); /* Horizontal Total */
outb(addr_6845+1, *sp++);
outb(addr_6845, 0x01); /* Horizontal Display End */
outb(addr_6845+1, *sp++);
outb(addr_6845, 0x02); /* Horizontal Blank Start */
- outb(addr_6845+1, *sp++);
+ outb(addr_6845+1, *sp++);
+
-
outb(addr_6845, 0x04); /* Horizontal Retrace Start */
outb(addr_6845+1, *sp++);
outb(addr_6845, 0x05); /* Horizontal Retrace End */
outb(addr_6845+1, *sp++);
-
+
outb(addr_6845, 0x13); /* Row Offset Register */
outb(addr_6845+1, *sp++);
-
+
outb(addr_6845, 0x34); /* 6845 Compatibility */
outb(addr_6845+1, *sp++);
-
+
outb(TS_INDEX, TS_MODE);/* Timing Sequencer */
outb(TS_DATA, *sp++);
-
+
if(color)
inb(GN_INPSTAT1C);
else
inb(GN_INPSTAT1M);
/* ATC Mode control */
- outb(ATC_INDEX, ATC_MODE | ATC_ACCESS);
+ outb(ATC_INDEX, ATC_MODE | ATC_ACCESS);
outb(ATC_DATAW, *sp++);
-
+
if(color)
inb(GN_INPSTAT1C);
else
inb(GN_INPSTAT1M);
/* ATC Horizontal Pixel Panning */
- outb(ATC_INDEX, ATC_HORPIXPAN | ATC_ACCESS);
+ outb(ATC_INDEX, ATC_HORPIXPAN | ATC_ACCESS);
outb(ATC_DATAW, *sp++);
outb(GN_MISCOUTW, *sp++); /* Misc output register */
- }
-
+ }
+
/* disable access to first 7 CRTC registers */
-
+
outb(addr_6845, CRTC_VSYNCE);
outb(addr_6845+1, byte);
vga_screen_on();
-
+
return(1);
}
@@ -1029,10 +1029,10 @@ wd90c11_col(int cols)
int i;
vga_screen_off();
-
+
/* enable access to first 7 CRTC registers */
- outb(addr_6845, CRTC_VSYNCE);
+ outb(addr_6845, CRTC_VSYNCE);
byte = inb(addr_6845+1);
outb(addr_6845, CRTC_VSYNCE);
outb(addr_6845+1, byte & 0x7f);
@@ -1040,22 +1040,22 @@ wd90c11_col(int cols)
/* enable access to WD/Paradise "control extensions" */
outb(GDC_INDEX, GDC_PR5GPLOCK);
- outb(GDC_INDEX, 0x05);
+ outb(GDC_INDEX, 0x05);
outb(addr_6845, CRTC_PR10);
- outb(addr_6845, 0x85);
+ outb(addr_6845, 0x85);
outb(TS_INDEX, TS_UNLOCKSEQ);
outb(TS_DATA, 0x48);
if(cols == SCR_COL132) /* switch 80 -> 132 */
{
/* save state of board for 80 columns */
-
+
if(!regsaved)
{
regsaved = 1;
/* save current fonts */
-
+
#if !PCVT_BACKUP_FONTS
for(i = 0; i < totalfonts; i++)
{
@@ -1081,7 +1081,7 @@ wd90c11_col(int cols)
#endif /* !PCVT_BACKUP_FONTS */
sp = savearea.wd90c11;
-
+
outb(addr_6845, 0x00); /* Horizontal Total */
*sp++ = inb(addr_6845+1);
outb(addr_6845, 0x01); /* Horizontal Display End */
@@ -1094,15 +1094,15 @@ wd90c11_col(int cols)
*sp++ = inb(addr_6845+1);
outb(addr_6845, 0x05); /* Horizontal Retrace End */
*sp++ = inb(addr_6845+1);
-
+
outb(addr_6845, 0x13); /* Row Offset Register */
*sp++ = inb(addr_6845+1);
-
+
outb(addr_6845, 0x2e); /* misc 1 */
*sp++ = inb(addr_6845+1);
outb(addr_6845, 0x2f); /* misc 2 */
*sp++ = inb(addr_6845+1);
-
+
outb(TS_INDEX, 0x10);/* Timing Sequencer */
*sp++ = inb(TS_DATA);
outb(TS_INDEX, 0x12);/* Timing Sequencer */
@@ -1125,7 +1125,7 @@ wd90c11_col(int cols)
outb(addr_6845+1, 0x8a);
outb(addr_6845, 0x05); /* Horizontal Retrace End */
outb(addr_6845+1, 0x1c);
-
+
outb(addr_6845, 0x13); /* Row Offset Register */
outb(addr_6845+1, 0x42);
@@ -1138,7 +1138,7 @@ wd90c11_col(int cols)
outb(TS_DATA, 0x21);
outb(TS_INDEX, 0x12);/* Timing Sequencer */
outb(TS_DATA, 0x14);
-
+
outb(GN_MISCOUTW, (inb(GN_MISCOUTR) | 0x08)); /* Misc output register */
vsp->wd132col = 1;
@@ -1153,11 +1153,11 @@ wd90c11_col(int cols)
outb(addr_6845+1, byte);
/* disable access to WD/Paradise "control extensions" */
-
+
outb(GDC_INDEX, GDC_PR5GPLOCK);
- outb(GDC_INDEX, 0x00);
+ outb(GDC_INDEX, 0x00);
outb(addr_6845, CRTC_PR10);
- outb(addr_6845, 0x00);
+ outb(addr_6845, 0x00);
outb(TS_INDEX, TS_UNLOCKSEQ);
outb(TS_DATA, 0x00);
@@ -1165,9 +1165,9 @@ wd90c11_col(int cols)
return(0);
}
-
+
sp = savearea.wd90c11;
-
+
outb(addr_6845, 0x00); /* Horizontal Total */
outb(addr_6845+1, *sp++);
outb(addr_6845, 0x01); /* Horizontal Display End */
@@ -1180,15 +1180,15 @@ wd90c11_col(int cols)
outb(addr_6845+1, *sp++);
outb(addr_6845, 0x05); /* Horizontal Retrace End */
outb(addr_6845+1, *sp++);
-
+
outb(addr_6845, 0x13); /* Row Offset Register */
outb(addr_6845+1, *sp++);
-
+
outb(addr_6845, 0x2e); /* misc 1 */
outb(addr_6845+1, *sp++);
outb(addr_6845, 0x2f); /* misc 2 */
outb(addr_6845+1, *sp++);
-
+
outb(TS_INDEX, 0x10);/* Timing Sequencer */
outb(addr_6845+1, *sp++);
outb(TS_INDEX, 0x12);/* Timing Sequencer */
@@ -1197,7 +1197,7 @@ wd90c11_col(int cols)
outb(GN_MISCOUTW, *sp++); /* Misc output register */
vsp->wd132col = 0;
- }
+ }
/* restore fonts */
@@ -1212,25 +1212,25 @@ wd90c11_col(int cols)
if(saved_charsets[i])
vga_move_charset(i, 0, 0);
#endif /* !PCVT_BACKUP_FONTS */
-
+
select_vga_charset(vsp->vga_charset);
/* disable access to first 7 CRTC registers */
-
+
outb(addr_6845, CRTC_VSYNCE);
outb(addr_6845+1, byte);
/* disable access to WD/Paradise "control extensions" */
outb(GDC_INDEX, GDC_PR5GPLOCK);
- outb(GDC_INDEX, 0x00);
+ outb(GDC_INDEX, 0x00);
outb(addr_6845, CRTC_PR10);
- outb(addr_6845, 0x00);
+ outb(addr_6845, 0x00);
outb(TS_INDEX, TS_UNLOCKSEQ);
outb(TS_DATA, 0x00);
-
+
vga_screen_on();
-
+
return(1);
}
@@ -1242,32 +1242,32 @@ tri9000_col(int cols)
{
u_char *sp;
u_char byte;
-
+
vga_screen_off();
/* sync reset is necessary to preserve memory contents ... */
-
+
outb(TS_INDEX, TS_SYNCRESET);
outb(TS_DATA, 0x01); /* synchronous reset */
/* disable protection of misc out and other regs */
- outb(addr_6845, CRTC_MTEST);
+ outb(addr_6845, CRTC_MTEST);
byte = inb(addr_6845+1);
outb(addr_6845, CRTC_MTEST);
outb(addr_6845+1, byte & ~0x50);
/* enable access to first 7 CRTC registers */
- outb(addr_6845, CRTC_VSYNCE);
+ outb(addr_6845, CRTC_VSYNCE);
byte = inb(addr_6845+1);
outb(addr_6845, CRTC_VSYNCE);
outb(addr_6845+1, byte & 0x7f);
-
+
if(cols == SCR_COL132) /* switch 80 -> 132 */
{
/* save state of board for 80 columns */
-
+
if(!regsaved)
{
regsaved = 1;
@@ -1289,7 +1289,7 @@ tri9000_col(int cols)
outb(addr_6845, 0x13);
*sp++ = inb(addr_6845+1);
-
+
outb(TS_INDEX, TS_MODE);/* Timing Sequencer */
*sp++ = inb(TS_DATA);
@@ -1302,28 +1302,28 @@ tri9000_col(int cols)
inb(TS_DATA); /* read switches to NEW */
outb(TS_INDEX, TS_MODEC2);
*sp++ = inb(TS_DATA);
-
+
if(color)
inb(GN_INPSTAT1C);
else
inb(GN_INPSTAT1M);
/* ATC Mode control */
- outb(ATC_INDEX, ATC_MODE | ATC_ACCESS);
+ outb(ATC_INDEX, ATC_MODE | ATC_ACCESS);
*sp++ = inb(ATC_DATAR);
-
+
if(color)
inb(GN_INPSTAT1C);
else
inb(GN_INPSTAT1M);
/* ATC Horizontal Pixel Panning */
- outb(ATC_INDEX, ATC_HORPIXPAN | ATC_ACCESS);
+ outb(ATC_INDEX, ATC_HORPIXPAN | ATC_ACCESS);
*sp++ = inb(ATC_DATAR);
*sp++ = inb(GN_MISCOUTR); /* Misc output register */
}
/* setup chipset for 132 column operation */
-
+
outb(addr_6845, 0x00); /* Horizontal Total */
outb(addr_6845+1, 0x9b);
outb(addr_6845, 0x01); /* Horizontal Display End */
@@ -1339,10 +1339,10 @@ tri9000_col(int cols)
outb(addr_6845, 0x13); /* Row Offset Register */
outb(addr_6845+1, 0x42);
-
+
outb(TS_INDEX, TS_MODE);/* Timing Sequencer */
outb(TS_DATA, 0x01); /* 8 dot char clock */
-
+
outb(TS_INDEX, TS_HWVERS);/* Hardware Version register */
outb(TS_DATA, 0x00); /* write ANYTHING switches to OLD */
outb(TS_INDEX, TS_MODEC2);
@@ -1352,21 +1352,21 @@ tri9000_col(int cols)
inb(TS_DATA); /* read switches to NEW */
outb(TS_INDEX, TS_MODEC2);
outb(TS_DATA, 0x01);
-
+
if(color)
inb(GN_INPSTAT1C);
else
inb(GN_INPSTAT1M);
outb(ATC_INDEX, ATC_MODE | ATC_ACCESS); /* ATC Mode control */
outb(ATC_DATAW, 0x08); /* Line graphics disable */
-
+
if(color)
inb(GN_INPSTAT1C);
else
inb(GN_INPSTAT1M);
outb(ATC_INDEX, ATC_HORPIXPAN | ATC_ACCESS); /* ATC Horizontal Pixel Panning */
outb(ATC_DATAW, 0x00);
-
+
outb(GN_MISCOUTW, (inb(GN_MISCOUTR) | 0x0c)); /* Misc output register */
}
else /* switch 132 -> 80 */
@@ -1384,7 +1384,7 @@ tri9000_col(int cols)
return(0);
}
-
+
sp = savearea.tri9000;
outb(addr_6845, 0x00); /* Horizontal Total */
@@ -1392,9 +1392,9 @@ tri9000_col(int cols)
outb(addr_6845, 0x01); /* Horizontal Display End */
outb(addr_6845+1, *sp++);
outb(addr_6845, 0x02); /* Horizontal Blank Start */
- outb(addr_6845+1, *sp++);
+ outb(addr_6845+1, *sp++);
outb(addr_6845, 0x03); /* Horizontal Blank End */
- outb(addr_6845+1, *sp++);
+ outb(addr_6845+1, *sp++);
outb(addr_6845, 0x04); /* Horizontal Retrace Start */
outb(addr_6845+1, *sp++);
outb(addr_6845, 0x05); /* Horizontal Retrace End */
@@ -1402,7 +1402,7 @@ tri9000_col(int cols)
outb(addr_6845, 0x13); /* Row Offset Register */
outb(addr_6845+1, *sp++);
-
+
outb(TS_INDEX, TS_MODE);/* Timing Sequencer */
outb(TS_DATA, *sp++);
@@ -1415,28 +1415,28 @@ tri9000_col(int cols)
inb(TS_DATA); /* read switches to NEW */
outb(TS_INDEX, TS_MODEC2);/* Timing Sequencer */
outb(TS_DATA, *sp++);
-
+
if(color)
inb(GN_INPSTAT1C);
else
inb(GN_INPSTAT1M);
/* ATC Mode control */
- outb(ATC_INDEX, ATC_MODE | ATC_ACCESS);
+ outb(ATC_INDEX, ATC_MODE | ATC_ACCESS);
outb(ATC_DATAW, *sp++);
-
+
if(color)
inb(GN_INPSTAT1C);
else
inb(GN_INPSTAT1M);
/* ATC Horizontal Pixel Panning */
- outb(ATC_INDEX, ATC_HORPIXPAN | ATC_ACCESS);
+ outb(ATC_INDEX, ATC_HORPIXPAN | ATC_ACCESS);
outb(ATC_DATAW, *sp++);
outb(GN_MISCOUTW, *sp++); /* Misc output register */
- }
-
+ }
+
/* disable access to first 7 CRTC registers */
-
+
outb(addr_6845, CRTC_VSYNCE);
outb(addr_6845+1, byte);
@@ -1457,7 +1457,7 @@ v7_1024i_col(int cols)
u_char *sp;
u_char byte;
u_char save__byte;
-
+
vga_screen_off();
/* enable access to first 7 CRTC registers */
@@ -1469,27 +1469,27 @@ v7_1024i_col(int cols)
outb(addr_6845+1, (byte | 0x80));
/* second, enable access to protected registers */
- outb(addr_6845, CRTC_VSYNCE);
+ outb(addr_6845, CRTC_VSYNCE);
save__byte = byte = inb(addr_6845+1);
byte |= 0x20; /* no irq 2 */
byte &= 0x6f; /* wr enable, clr irq flag */
outb(addr_6845, CRTC_VSYNCE);
outb(addr_6845+1, byte);
-
+
outb(TS_INDEX, TS_EXTCNTL); /* enable extensions */
- outb(TS_DATA, 0xea);
+ outb(TS_DATA, 0xea);
if(cols == SCR_COL132) /* switch 80 -> 132 */
{
/* save state of board for 80 columns */
-
+
if(!regsaved)
{
regsaved = 1;
sp = savearea.v7_1024i;
-
+
outb(addr_6845, 0x00); /* Horizontal Total */
*sp++ = inb(addr_6845+1);
outb(addr_6845, 0x01); /* Horizontal Display End */
@@ -1502,52 +1502,52 @@ v7_1024i_col(int cols)
*sp++ = inb(addr_6845+1);
outb(addr_6845, 0x05); /* Horizontal Retrace End */
*sp++ = inb(addr_6845+1);
-
+
outb(addr_6845, 0x13); /* Row Offset Register */
*sp++ = inb(addr_6845+1);
-
+
outb(TS_INDEX, TS_MODE);/* Timing Sequencer */
*sp++ = inb(TS_DATA);
-
+
if(color)
inb(GN_INPSTAT1C);
else
inb(GN_INPSTAT1M);
/* ATC Mode control */
- outb(ATC_INDEX, ATC_MODE | ATC_ACCESS);
+ outb(ATC_INDEX, ATC_MODE | ATC_ACCESS);
*sp++ = inb(ATC_DATAR);
-
+
if(color)
inb(GN_INPSTAT1C);
else
inb(GN_INPSTAT1M);
/* ATC Horizontal Pixel Panning */
- outb(ATC_INDEX, ATC_HORPIXPAN | ATC_ACCESS);
+ outb(ATC_INDEX, ATC_HORPIXPAN | ATC_ACCESS);
*sp++ = inb(ATC_DATAR);
outb(TS_INDEX, 0x83);
*sp++ = inb(TS_DATA);
-
+
outb(TS_INDEX, 0xa4);
*sp++ = inb(TS_DATA);
-
+
outb(TS_INDEX, 0xe0);
*sp++ = inb(TS_DATA);
-
+
outb(TS_INDEX, 0xe4);
*sp++ = inb(TS_DATA);
-
+
outb(TS_INDEX, 0xf8);
*sp++ = inb(TS_DATA);
-
+
outb(TS_INDEX, 0xfd);
*sp++ = inb(TS_DATA);
-
+
*sp++ = inb(GN_MISCOUTR); /* Misc output register */
}
/* setup chipset for 132 column operation */
-
+
outb(addr_6845, 0x00); /* Horizontal Total */
outb(addr_6845+1, 0x9c);
outb(addr_6845, 0x01); /* Horizontal Display End */
@@ -1560,10 +1560,10 @@ v7_1024i_col(int cols)
outb(addr_6845+1, 0x89);
outb(addr_6845, 0x05); /* Horizontal Retrace End */
outb(addr_6845+1, 0x1c);
-
+
outb(addr_6845, 0x13); /* Row Offset Register */
outb(addr_6845+1, 0x42);
-
+
outb(TS_INDEX, TS_MODE);/* Timing Sequencer */
outb(TS_DATA, 0x01); /* 8 dot char clock */
@@ -1573,7 +1573,7 @@ v7_1024i_col(int cols)
inb(GN_INPSTAT1M);
outb(ATC_INDEX, ATC_MODE | ATC_ACCESS); /* ATC Mode control */
outb(ATC_DATAW, 0x08); /* Line graphics disable */
-
+
if(color)
inb(GN_INPSTAT1C);
else
@@ -1614,7 +1614,7 @@ v7_1024i_col(int cols)
if(!regsaved) /* failsafe */
{
outb(TS_INDEX, TS_EXTCNTL); /* disable extensions */
- outb(TS_DATA, 0xae);
+ outb(TS_DATA, 0xae);
/* disable access to first 7 CRTC registers */
outb(addr_6845, CRTC_VSYNCE);
@@ -1622,42 +1622,42 @@ v7_1024i_col(int cols)
vga_screen_on();
return(0);
}
-
+
sp = savearea.v7_1024i;
-
+
outb(addr_6845, 0x00); /* Horizontal Total */
outb(addr_6845+1, *sp++);
outb(addr_6845, 0x01); /* Horizontal Display End */
outb(addr_6845+1, *sp++);
outb(addr_6845, 0x02); /* Horizontal Blank Start */
- outb(addr_6845+1, *sp++);
+ outb(addr_6845+1, *sp++);
outb(addr_6845, 0x03); /* Horizontal Blank End */
- outb(addr_6845+1, *sp++);
+ outb(addr_6845+1, *sp++);
outb(addr_6845, 0x04); /* Horizontal Retrace Start */
outb(addr_6845+1, *sp++);
outb(addr_6845, 0x05); /* Horizontal Retrace End */
outb(addr_6845+1, *sp++);
-
+
outb(addr_6845, 0x13); /* Row Offset Register */
outb(addr_6845+1, *sp++);
-
+
outb(TS_INDEX, TS_MODE);/* Timing Sequencer */
outb(TS_DATA, *sp++);
-
+
if(color)
inb(GN_INPSTAT1C);
else
inb(GN_INPSTAT1M);
/* ATC Mode control */
- outb(ATC_INDEX, ATC_MODE | ATC_ACCESS);
+ outb(ATC_INDEX, ATC_MODE | ATC_ACCESS);
outb(ATC_DATAW, *sp++);
-
+
if(color)
inb(GN_INPSTAT1C);
else
inb(GN_INPSTAT1M);
/* ATC Horizontal Pixel Panning */
- outb(ATC_INDEX, ATC_HORPIXPAN | ATC_ACCESS);
+ outb(ATC_INDEX, ATC_HORPIXPAN | ATC_ACCESS);
outb(ATC_DATAW, *sp++);
outb(TS_INDEX, TS_SYNCRESET);
@@ -1685,18 +1685,18 @@ v7_1024i_col(int cols)
outb(TS_INDEX, TS_SYNCRESET);
outb(TS_DATA, 0x03); /* clear synchronous reset */
- }
-
+ }
+
outb(TS_INDEX, TS_EXTCNTL); /* disable extensions */
- outb(TS_DATA, 0xae);
+ outb(TS_DATA, 0xae);
/* disable access to first 7 CRTC registers */
-
+
outb(addr_6845, CRTC_VSYNCE);
outb(addr_6845+1, save__byte);
vga_screen_on();
-
+
return(1);
}
@@ -1710,7 +1710,7 @@ s3_928_col(int cols)
u_char byte;
vga_screen_off();
-
+
outb(addr_6845, 0x38);
outb(addr_6845+1, 0x48); /* unlock registers */
outb(addr_6845, 0x39);
@@ -1718,21 +1718,21 @@ s3_928_col(int cols)
/* enable access to first 7 CRTC registers */
- outb(addr_6845, CRTC_VSYNCE);
+ outb(addr_6845, CRTC_VSYNCE);
byte = inb(addr_6845+1);
outb(addr_6845, CRTC_VSYNCE);
outb(addr_6845+1, byte & 0x7f);
-
+
if(cols == SCR_COL132) /* switch 80 -> 132 */
{
/* save state of board for 80 columns */
-
+
if(!regsaved)
{
regsaved = 1;
sp = savearea.s3_928;
-
+
outb(addr_6845, 0x00); /* Horizontal Total */
*sp++ = inb(addr_6845+1);
outb(addr_6845, 0x01); /* Horizontal Display End */
@@ -1745,7 +1745,7 @@ s3_928_col(int cols)
*sp++ = inb(addr_6845+1);
outb(addr_6845, 0x05); /* Horizontal Retrace End */
*sp++ = inb(addr_6845+1);
-
+
outb(addr_6845, 0x13); /* Row Offset Register */
*sp++ = inb(addr_6845+1);
@@ -1756,31 +1756,31 @@ s3_928_col(int cols)
outb(addr_6845, 0x42); /* (Clock) Mode Control */
*sp++ = inb(addr_6845+1);
-
+
outb(TS_INDEX, TS_MODE);/* Timing Sequencer */
*sp++ = inb(TS_DATA);
-
+
if(color)
inb(GN_INPSTAT1C);
else
inb(GN_INPSTAT1M);
/* ATC Mode control */
- outb(ATC_INDEX, ATC_MODE | ATC_ACCESS);
+ outb(ATC_INDEX, ATC_MODE | ATC_ACCESS);
*sp++ = inb(ATC_DATAR);
-
+
if(color)
inb(GN_INPSTAT1C);
else
inb(GN_INPSTAT1M);
/* ATC Horizontal Pixel Panning */
- outb(ATC_INDEX, ATC_HORPIXPAN | ATC_ACCESS);
+ outb(ATC_INDEX, ATC_HORPIXPAN | ATC_ACCESS);
*sp++ = inb(ATC_DATAR);
*sp++ = inb(GN_MISCOUTR); /* Misc output register */
}
/* setup chipset for 132 column operation */
-
+
outb(addr_6845, 0x00); /* Horizontal Total */
outb(addr_6845+1, 0x9a);
outb(addr_6845, 0x01); /* Horizontal Display End */
@@ -1793,28 +1793,28 @@ s3_928_col(int cols)
outb(addr_6845+1, 0x87);
outb(addr_6845, 0x05); /* Horizontal Retrace End */
outb(addr_6845+1, 0x1b);
-
+
outb(addr_6845, 0x13); /* Row Offset Register */
outb(addr_6845+1, 0x42);
- outb(addr_6845, 0x34);
+ outb(addr_6845, 0x34);
outb(addr_6845+1, 0x10);/* enable data xfer pos control */
outb(addr_6845, 0x3b);
outb(addr_6845+1, 0x90);/* set data xfer pos value */
-
+
outb(addr_6845, 0x42); /* (Clock) Mode Control */
outb(addr_6845+1, 0x02);/* Select 40MHz Clock */
-
+
outb(TS_INDEX, TS_MODE);/* Timing Sequencer */
outb(TS_DATA, 0x01); /* 8 dot char clock */
-
+
if(color)
inb(GN_INPSTAT1C);
else
inb(GN_INPSTAT1M);
outb(ATC_INDEX, ATC_MODE | ATC_ACCESS); /* ATC Mode control */
outb(ATC_DATAW, 0x08); /* Line graphics disable */
-
+
if(color)
inb(GN_INPSTAT1C);
else
@@ -1842,22 +1842,22 @@ s3_928_col(int cols)
vga_screen_on();
return(0);
}
-
+
sp = savearea.s3_928;
-
+
outb(addr_6845, 0x00); /* Horizontal Total */
outb(addr_6845+1, *sp++);
outb(addr_6845, 0x01); /* Horizontal Display End */
outb(addr_6845+1, *sp++);
outb(addr_6845, 0x02); /* Horizontal Blank Start */
- outb(addr_6845+1, *sp++);
+ outb(addr_6845+1, *sp++);
outb(addr_6845, 0x03); /* Horizontal Blank End */
- outb(addr_6845+1, *sp++);
+ outb(addr_6845+1, *sp++);
outb(addr_6845, 0x04); /* Horizontal Retrace Start */
outb(addr_6845+1, *sp++);
outb(addr_6845, 0x05); /* Horizontal Retrace End */
outb(addr_6845+1, *sp++);
-
+
outb(addr_6845, 0x13); /* Row Offset Register */
outb(addr_6845+1, *sp++);
@@ -1868,31 +1868,31 @@ s3_928_col(int cols)
outb(addr_6845, 0x42); /* Mode control */
outb(addr_6845+1, *sp++);
-
+
outb(TS_INDEX, TS_MODE);/* Timing Sequencer */
outb(TS_DATA, *sp++);
-
+
if(color)
inb(GN_INPSTAT1C);
else
inb(GN_INPSTAT1M);
/* ATC Mode control */
- outb(ATC_INDEX, ATC_MODE | ATC_ACCESS);
+ outb(ATC_INDEX, ATC_MODE | ATC_ACCESS);
outb(ATC_DATAW, *sp++);
-
+
if(color)
inb(GN_INPSTAT1C);
else
inb(GN_INPSTAT1M);
/* ATC Horizontal Pixel Panning */
- outb(ATC_INDEX, ATC_HORPIXPAN | ATC_ACCESS);
+ outb(ATC_INDEX, ATC_HORPIXPAN | ATC_ACCESS);
outb(ATC_DATAW, *sp++);
outb(GN_MISCOUTW, *sp++); /* Misc output register */
- }
-
+ }
+
/* disable access to first 7 CRTC registers */
-
+
outb(addr_6845, CRTC_VSYNCE);
outb(addr_6845+1, byte);
@@ -1902,7 +1902,7 @@ s3_928_col(int cols)
outb(addr_6845+1, 0x00); /* lock registers */
vga_screen_on();
-
+
return(1);
}
@@ -1916,10 +1916,10 @@ cl_gd542x_col(int cols)
u_char byte;
vga_screen_off();
-
+
/* enable access to first 7 CRTC registers */
- outb(addr_6845, CRTC_VSYNCE);
+ outb(addr_6845, CRTC_VSYNCE);
byte = inb(addr_6845+1);
outb(addr_6845, CRTC_VSYNCE);
outb(addr_6845+1, byte & 0x7f);
@@ -1927,17 +1927,17 @@ cl_gd542x_col(int cols)
/* enable access to cirrus extension registers */
outb(TS_INDEX, 6);
outb(TS_DATA, 0x12);
-
+
if(cols == SCR_COL132) /* switch 80 -> 132 */
{
/* save state of board for 80 columns */
-
+
if(!regsaved)
{
regsaved = 1;
sp = savearea.cirrus;
-
+
outb(addr_6845, 0x00); /* Horizontal Total */
*sp++ = inb(addr_6845+1);
outb(addr_6845, 0x01); /* Horizontal Display End */
@@ -1950,28 +1950,28 @@ cl_gd542x_col(int cols)
*sp++ = inb(addr_6845+1);
outb(addr_6845, 0x05); /* Horizontal Retrace End */
*sp++ = inb(addr_6845+1);
-
+
outb(addr_6845, 0x13); /* Row Offset Register */
*sp++ = inb(addr_6845+1);
-
+
outb(TS_INDEX, TS_MODE);/* Timing Sequencer */
*sp++ = inb(TS_DATA);
-
+
if(color)
inb(GN_INPSTAT1C);
else
inb(GN_INPSTAT1M);
/* ATC Mode control */
- outb(ATC_INDEX, ATC_MODE | ATC_ACCESS);
+ outb(ATC_INDEX, ATC_MODE | ATC_ACCESS);
*sp++ = inb(ATC_DATAR);
-
+
if(color)
inb(GN_INPSTAT1C);
else
inb(GN_INPSTAT1M);
/* ATC Horizontal Pixel Panning */
- outb(ATC_INDEX, ATC_HORPIXPAN | ATC_ACCESS);
+ outb(ATC_INDEX, ATC_HORPIXPAN | ATC_ACCESS);
*sp++ = inb(ATC_DATAR);
/* VCLK2 Numerator Register */
@@ -2000,7 +2000,7 @@ cl_gd542x_col(int cols)
outb(addr_6845+1, 0x8a);
outb(addr_6845, 0x05); /* Horizontal Retrace End */
outb(addr_6845+1, 0x9e);
-
+
outb(addr_6845, 0x13); /* Row Offset Register */
outb(addr_6845+1, 0x42);
@@ -2016,14 +2016,14 @@ cl_gd542x_col(int cols)
outb(TS_INDEX, TS_MODE);/* Timing Sequencer */
outb(TS_DATA, 0x01); /* 8 dot char clock */
-
+
if(color)
inb(GN_INPSTAT1C);
else
inb(GN_INPSTAT1M);
outb(ATC_INDEX, ATC_MODE | ATC_ACCESS); /* ATC Mode control */
outb(ATC_DATAW, 0x08); /* Line graphics disable */
-
+
if(color)
inb(GN_INPSTAT1C);
else
@@ -2046,25 +2046,25 @@ cl_gd542x_col(int cols)
vga_screen_on();
return(0);
}
-
+
sp = savearea.cirrus;
-
+
outb(addr_6845, 0x00); /* Horizontal Total */
outb(addr_6845+1, *sp++);
outb(addr_6845, 0x01); /* Horizontal Display End */
outb(addr_6845+1, *sp++);
outb(addr_6845, 0x02); /* Horizontal Blank Start */
- outb(addr_6845+1, *sp++);
+ outb(addr_6845+1, *sp++);
outb(addr_6845, 0x03); /* Horizontal Blank End */
- outb(addr_6845+1, *sp++);
+ outb(addr_6845+1, *sp++);
outb(addr_6845, 0x04); /* Horizontal Retrace Start */
outb(addr_6845+1, *sp++);
outb(addr_6845, 0x05); /* Horizontal Retrace End */
outb(addr_6845+1, *sp++);
-
+
outb(addr_6845, 0x13); /* Row Offset Register */
outb(addr_6845+1, *sp++);
-
+
outb(TS_INDEX, TS_MODE);/* Timing Sequencer */
outb(TS_DATA, *sp++);
@@ -2073,15 +2073,15 @@ cl_gd542x_col(int cols)
else
inb(GN_INPSTAT1M);
/* ATC Mode control */
- outb(ATC_INDEX, ATC_MODE | ATC_ACCESS);
+ outb(ATC_INDEX, ATC_MODE | ATC_ACCESS);
outb(ATC_DATAW, *sp++);
-
+
if(color)
inb(GN_INPSTAT1C);
else
inb(GN_INPSTAT1M);
/* ATC Horizontal Pixel Panning */
- outb(ATC_INDEX, ATC_HORPIXPAN | ATC_ACCESS);
+ outb(ATC_INDEX, ATC_HORPIXPAN | ATC_ACCESS);
outb(ATC_DATAW, *sp++);
/* VCLK2 Numerator Register */
@@ -2094,13 +2094,13 @@ cl_gd542x_col(int cols)
outb(GN_MISCOUTW, *sp++); /* Misc output register */
}
-
+
/* disable access to cirrus extension registers */
outb(TS_INDEX, 6);
outb(TS_DATA, 0);
-
+
/* disable access to first 7 CRTC registers */
-
+
outb(addr_6845, CRTC_VSYNCE);
outb(addr_6845+1, byte);
@@ -2126,7 +2126,7 @@ switch_screen(int n, int oldgrafx, int newgrafx)
#endif /* !PCVT_KBD_FIFO */
int cols = vsp->maxcol; /* get current col val */
-
+
if(n < 0 || n >= totalscreens)
return;
@@ -2145,7 +2145,7 @@ switch_screen(int n, int oldgrafx, int newgrafx)
async_update(UPDATE_STOP); /* status display off */
}
-
+
if(!oldgrafx)
{
/* switch from text mode */
@@ -2156,7 +2156,7 @@ switch_screen(int n, int oldgrafx, int newgrafx)
vsp->Crtat = vsp->Memory; /* operate in memory now */
}
-
+
/* update global screen pointers/variables */
current_video_screen = n; /* current screen no */
@@ -2174,12 +2174,12 @@ switch_screen(int n, int oldgrafx, int newgrafx)
{
/* switch from graphics to text mode */
unsigned i;
-
+
/* restore fonts */
for(i = 0; i < totalfonts; i++)
if(saved_charsets[i])
vga_move_charset(i, 0, 0);
-
+
#if PCVT_SCREENSAVER
/* activate screen saver */
if(saved_scrnsv_tmo)
@@ -2217,7 +2217,7 @@ switch_screen(int n, int oldgrafx, int newgrafx)
if(!newgrafx)
{
/* to text mode */
-
+
/* kernel memory -> video board memory */
bcopy(vsp->Crtat, Crtat,
vsp->screen_rows * vsp->maxcol * CHR);
@@ -2229,16 +2229,16 @@ switch_screen(int n, int oldgrafx, int newgrafx)
outb(addr_6845, CRTC_STARTADRL);
outb(addr_6845+1, 0);
}
-
+
#if !PCVT_KBD_FIFO
splx(x);
#endif /* !PCVT_KBD_FIFO */
-
+
select_vga_charset(vsp->vga_charset);
if(vsp->maxcol != cols)
vga_col(vsp, vsp->maxcol); /* select 80/132 columns */
-
+
outb(addr_6845, CRTC_CURSORH); /* select high register */
outb(addr_6845+1, vsp->cur_offset >> 8);
outb(addr_6845, CRTC_CURSORL); /* select low register */
@@ -2273,7 +2273,7 @@ switch_screen(int n, int oldgrafx, int newgrafx)
/* if we switch to a vt with force 24 lines mode and */
/* pure VT emulation and 25 rows charset, then we have */
/* to clear the last line on display ... */
-
+
if(vsp->force24 && (vsp->vt_pure_mode == M_PUREVT) &&
(vgacs[vsp->vga_charset].screen_size == SIZ_25ROWS))
{
@@ -2361,10 +2361,10 @@ int
vgapage(int new_screen)
{
int x;
-
+
if(new_screen < 0 || new_screen >= totalscreens)
return EINVAL;
-
+
/* fallback to VT_AUTO if controlling processes died */
if(vsp->proc && vsp->proc != pfind(vsp->pid))
set_auto_mode(vsp);
@@ -2405,7 +2405,7 @@ vgapage(int new_screen)
switch_screen(new_screen,
vsp->vt_status & VT_GRAFX,
vs[new_screen].vt_status & VT_GRAFX);
-
+
x = spltty();
if(old_vsp->vt_status & VT_WAIT_ACT)
{
@@ -2427,7 +2427,7 @@ vgapage(int new_screen)
psignal(vsp->proc, vsp->smode.acqsig);
}
else
- {
+ {
/* we are committed */
vt_switch_pending = 0;
#if PCVT_FREEBSD > 206
@@ -2452,13 +2452,13 @@ usl_vt_ioctl(Dev_t dev, int cmd, caddr_t data, int flag, struct proc *p)
{
int i, j, error, opri;
struct vt_mode newmode;
-
+
switch(cmd)
{
case VT_SETMODE:
newmode = *(struct vt_mode *)data;
-
+
opri = spltty();
if (newmode.mode != VT_PROCESS) {
@@ -2542,7 +2542,7 @@ usl_vt_ioctl(Dev_t dev, int cmd, caddr_t data, int flag, struct proc *p)
return 0;
}
break;
-
+
case VT_TRUE:
/* process releases its VT */
if(vt_switch_pending
@@ -2556,7 +2556,7 @@ usl_vt_ioctl(Dev_t dev, int cmd, caddr_t data, int flag, struct proc *p)
vsp->vt_status & VT_GRAFX,
vs[new_screen].vt_status
& VT_GRAFX);
-
+
opri = spltty();
if(old_vsp->vt_status & VT_WAIT_ACT)
{
@@ -2596,7 +2596,7 @@ usl_vt_ioctl(Dev_t dev, int cmd, caddr_t data, int flag, struct proc *p)
}
}
break;
-
+
case VT_ACKACQ:
/* new vts controlling process acknowledged */
if(vsp->vt_status & VT_WAIT_ACK) {
@@ -2626,18 +2626,18 @@ usl_vt_ioctl(Dev_t dev, int cmd, caddr_t data, int flag, struct proc *p)
case VT_GETACTIVE:
*(int *)data = current_video_screen + 1;
return 0;
-
+
case VT_ACTIVATE:
return vgapage(*(int *)data - 1);
case VT_WAITACTIVE:
/* sleep until vt switch happened */
i = *(int *)data - 1;
-
+
if(i != -1
&& (i < 0 || i >= PCVT_NSCREENS))
return EINVAL;
-
+
if(i != -1 && current_video_screen == i)
return 0;
@@ -2669,7 +2669,7 @@ usl_vt_ioctl(Dev_t dev, int cmd, caddr_t data, int flag, struct proc *p)
splx(x);
}
return error;
-
+
case KDENABIO:
/* grant the process IO access; only allowed if euid == 0 */
{
@@ -2681,7 +2681,7 @@ usl_vt_ioctl(Dev_t dev, int cmd, caddr_t data, int flag, struct proc *p)
#else
struct syscframe *fp = (struct syscframe *)p->p_regs;
#endif
-
+
if(suser(p->p_ucred, &p->p_acflag) != 0)
return (EPERM);
@@ -2690,10 +2690,10 @@ usl_vt_ioctl(Dev_t dev, int cmd, caddr_t data, int flag, struct proc *p)
#else
fp->sf_eflags |= PSL_IOPL;
#endif
-
+
return 0;
}
-
+
case KDDISABIO:
/* abandon IO access permission */
{
@@ -2716,7 +2716,7 @@ usl_vt_ioctl(Dev_t dev, int cmd, caddr_t data, int flag, struct proc *p)
{
struct video_state *vsx = &vs[minor(dev)];
int haschanged = 0;
-
+
if(adaptor_type != VGA_ADAPTOR
&& adaptor_type != MDA_ADAPTOR)
/* X will only run on those adaptors */
@@ -2731,7 +2731,7 @@ usl_vt_ioctl(Dev_t dev, int cmd, caddr_t data, int flag, struct proc *p)
if(haschanged && vsx == vsp)
switch_screen(current_video_screen, 1, 0);
return 0;
-
+
case KD_GRAPHICS:
/* xxx It might be a good idea to require that
the vt be in process controlled mode here,
@@ -2741,11 +2741,11 @@ usl_vt_ioctl(Dev_t dev, int cmd, caddr_t data, int flag, struct proc *p)
if(haschanged && vsx == vsp)
switch_screen(current_video_screen, 0, 1);
return 0;
-
+
}
return EINVAL; /* end case KDSETMODE */
}
-
+
case KDSETRAD:
/* set keyboard repeat and delay */
return kbdioctl(dev, KBDSTPMAT, data, flag);
@@ -2774,7 +2774,7 @@ usl_vt_ioctl(Dev_t dev, int cmd, caddr_t data, int flag, struct proc *p)
return 0;
}
return EINVAL; /* end KDSKBMODE */
-
+
case KDMKTONE:
/* ring the speaker */
if(data)
@@ -2782,7 +2782,7 @@ usl_vt_ioctl(Dev_t dev, int cmd, caddr_t data, int flag, struct proc *p)
int duration = *(int *)data >> 16;
int pitch = *(int *)data & 0xffff;
-#if PCVT_NETBSD
+#if PCVT_NETBSD
if(pitch != 0)
{
sysbeep(PCVT_SYSBEEPF / pitch,
@@ -2798,7 +2798,7 @@ usl_vt_ioctl(Dev_t dev, int cmd, caddr_t data, int flag, struct proc *p)
sysbeep(PCVT_SYSBEEPF / 1493, hz / 4);
}
return 0;
-
+
case KDSETLED:
/* set kbd LED status */
/* unfortunately, the LED definitions between pcvt and */
@@ -2808,7 +2808,7 @@ usl_vt_ioctl(Dev_t dev, int cmd, caddr_t data, int flag, struct proc *p)
+ (i & LED_NUM? KBD_NUMLOCK: 0)
+ (i & LED_SCR? KBD_SCROLLLOCK: 0);
return kbdioctl(dev, KBDSLOCK, (caddr_t)&j, flag);
-
+
case KDGETLED:
/* get kbd LED status */
if((error = kbdioctl(dev, KBDGLOCK, (caddr_t)&j, flag)))
diff --git a/sys/i386/isa/pcvt/pcvt_hdr.h b/sys/i386/isa/pcvt/pcvt_hdr.h
index 0419d71..93add9a 100644
--- a/sys/i386/isa/pcvt/pcvt_hdr.h
+++ b/sys/i386/isa/pcvt/pcvt_hdr.h
@@ -111,7 +111,7 @@
#include "i386/cpufunc.h"
#elif PCVT_FREEBSD >= 200
#include <i386/isa/isa_device.h>
-#else
+#else
#include "i386/isa/isa_device.h"
#endif
@@ -225,7 +225,7 @@ in the config file"
#endif
#else /* XSERVER */
-
+
#if PCVT_USL_VT_COMPAT
#warning "Option PCVT_USL_VT_COMPAT meaningless without XSERVER"
#undef PCVT_USL_VT_COMPAT
@@ -563,11 +563,11 @@ in the config file"
/*---------------------------------------------------------------------------*
* VGA palette handling (output DAC palette)
*---------------------------------------------------------------------------*/
-
+
#define VGA_DAC 0x3C6 /* vga dac address */
#define VGA_PMSK 0x3F /* palette mask, 64 distinct values */
#define NVGAPEL 256 /* number of palette entries */
-
+
/*---------------------------------------------------------------------------*
* function key labels
*---------------------------------------------------------------------------*/
@@ -815,7 +815,7 @@ typedef struct video_state {
u_char sc_row; /* saved row */
u_char sc_col; /* saved col */
u_short sc_cur_offset; /* saved cursor addr offset */
- u_short sc_attr; /* saved attributes */
+ u_short sc_attr; /* saved attributes */
u_char sc_vtsgr; /* saved sgr configuration */
u_char sc_awm; /* saved auto wrap mode */
u_char sc_om; /* saved origin mode */
@@ -824,7 +824,7 @@ typedef struct video_state {
u_short *sc_G2; /* save G2 ptr */
u_short *sc_G3; /* save G3 ptr */
u_short *sc_GL; /* save GL ptr */
- u_short *sc_GR; /* save GR ptr */
+ u_short *sc_GR; /* save GR ptr */
u_char sc_sel; /* selective erase state */
u_char ufkl[8][17]; /* user fkey-labels */
u_char sfkl[8][17]; /* system fkey-labels */
@@ -837,7 +837,7 @@ typedef struct video_state {
u_char attribute; /* attribute normal, tx only, local */
u_char key; /* fkey label no */
u_char l_len; /* buffer length's */
- u_char s_len;
+ u_char s_len;
u_char m_len;
u_char i; /* help (got short of names ...) */
u_char l_buf[MAX_LABEL+1]; /* buffers */
@@ -1411,7 +1411,7 @@ static __inline void vt_selattr(struct video_state *svsp)
{ u_char x = inb(0x84); } \
{ u_char x = inb(0x84); } \
{ u_char x = inb(0x84); } \
- { u_char x = inb(0x84); }
+ { u_char x = inb(0x84); }
#else /* PCVT_PORTIO_DELAY */
/* use system supplied delay function for */
diff --git a/sys/i386/isa/pcvt/pcvt_kbd.c b/sys/i386/isa/pcvt/pcvt_kbd.c
index 6fc53c4..cf6c316 100644
--- a/sys/i386/isa/pcvt/pcvt_kbd.c
+++ b/sys/i386/isa/pcvt/pcvt_kbd.c
@@ -100,7 +100,7 @@ static u_char altkpflag = 0;
static u_short altkpval = 0;
#if PCVT_SHOWKEYS
-u_char rawkeybuf[80];
+u_char rawkeybuf[80];
#endif
#include "pcvt_kbd.h" /* tables etc */
@@ -112,7 +112,7 @@ u_char rawkeybuf[80];
static void showkey (char delim, u_char val)
{
int rki;
-
+
for(rki = 3; rki < 80; rki++) /* shift left buffer */
rawkeybuf[rki-3] = rawkeybuf[rki];
@@ -126,7 +126,7 @@ static void showkey (char delim, u_char val)
rki = rki - 10 + 'A';
rawkeybuf[78] = rki;
-
+
rki = val & 0x0f; /* ls nibble */
if(rki <= 9)
@@ -202,7 +202,7 @@ check_for_lost_intr (void *arg)
#endif /* PCVT_UPDLED_LOSES_INTR */
/*---------------------------------------------------------------------------*
- * update keyboard led's
+ * update keyboard led's
*---------------------------------------------------------------------------*/
void
update_led(void)
@@ -253,9 +253,9 @@ settpmrate(int rate)
if(kbd_cmd(KEYB_C_TYPEM) != 0)
printf("Keyboard TYPEMATIC command timeout\n");
else if(kbd_cmd(tpmrate) != 0)
- printf("Keyboard TYPEMATIC data timeout\n");
+ printf("Keyboard TYPEMATIC data timeout\n");
}
-
+
/*---------------------------------------------------------------------------*
* Pass command to keyboard controller (8042)
*---------------------------------------------------------------------------*/
@@ -326,7 +326,7 @@ void
kbd_emulate_pc(int do_emulation)
{
int cmd, timeo = 10000;
-
+
cmd = COMMAND_SYSFLG|COMMAND_IRQEN; /* common base cmd */
#if !PCVT_USEKBDSEC
@@ -359,7 +359,7 @@ void doreset(void)
int again = 0;
int once = 0;
int response, opri;
-
+
/* Enable interrupts and keyboard, etc. */
if (kbc_8042cmd(CONTR_WRITE) != 0)
printf("pcvt: doreset() - timeout controller write command\n");
@@ -385,7 +385,7 @@ void doreset(void)
if (kbd_cmd(KBDINITCMD) != 0)
printf("pcvt: doreset() - timeout writing keyboard init command\n");
-
+
/*
* Discard any stale keyboard activity. The 0.1 boot code isn't
* very careful and sometimes leaves a KEYB_R_RESEND.
@@ -421,7 +421,7 @@ void doreset(void)
splx(opri);
return;
}
-
+
if((kbd_cmd(KEYB_C_RESET) != 0) && (once == 0))
{
once++; /* print message only once ! */
@@ -471,22 +471,22 @@ r_entry:
else if(response == KEYB_R_MF2ID2HP)
{
keyboard_type = KB_MFII;
- }
+ }
else
{
printf("\npcvt: doreset() - kbdid, response 2 = [%d]\n",
response);
keyboard_type = KB_UNKNOWN;
}
- }
+ }
else if (response == KEYB_R_ACK)
{
goto r_entry;
}
- else if (response == -1)
+ else if (response == -1)
{
keyboard_type = KB_AT;
- }
+ }
else
{
printf("\npcvt: doreset() - kbdid, response 1 = [%d]\n", response);
@@ -527,13 +527,13 @@ kbd_code_init1(void)
}
/*---------------------------------------------------------------------------*
- * init keyboard overlay table
+ * init keyboard overlay table
*---------------------------------------------------------------------------*/
static
-void ovlinit(int force)
+void ovlinit(int force)
{
register i;
-
+
if(force || ovlinitflag==0)
{
if(ovlinitflag == 0 &&
@@ -543,10 +543,10 @@ void ovlinit(int force)
for(i=0; i<OVLTBL_SIZE; i++)
{
- ovltbl[i].keynum =
+ ovltbl[i].keynum =
ovltbl[i].type = 0;
ovltbl[i].unshift[0] =
- ovltbl[i].shift[0] =
+ ovltbl[i].shift[0] =
ovltbl[i].ctrl[0] =
ovltbl[i].altgr[0] = 0;
ovltbl[i].subu =
@@ -568,7 +568,7 @@ getokeydef(unsigned key, Ovl_tbl *thisdef)
{
if(key == 0 || key > MAXKEYNUM)
return EINVAL;
-
+
thisdef->keynum = key;
thisdef->type = key2ascii[key].type;
@@ -594,8 +594,8 @@ getokeydef(unsigned key, Ovl_tbl *thisdef)
{
bcopy("",thisdef->shift,CODE_SIZE);
thisdef->subs = KBD_SUBT_FNC;
- }
-
+ }
+
if(key2ascii[key].ctrl.subtype == STR)
{
bcopy((u_char *)(key2ascii[key].ctrl.what.string),
@@ -604,11 +604,11 @@ getokeydef(unsigned key, Ovl_tbl *thisdef)
}
else
{
- bcopy("",thisdef->ctrl,CODE_SIZE);
+ bcopy("",thisdef->ctrl,CODE_SIZE);
thisdef->subc = KBD_SUBT_FNC;
}
-
- /* deliver at least anything for ALTGR settings ... */
+
+ /* deliver at least anything for ALTGR settings ... */
if(key2ascii[key].unshift.subtype == STR)
{
@@ -628,11 +628,11 @@ getokeydef(unsigned key, Ovl_tbl *thisdef)
* get current key definition
*---------------------------------------------------------------------------*/
static int
-getckeydef(unsigned key, Ovl_tbl *thisdef)
+getckeydef(unsigned key, Ovl_tbl *thisdef)
{
u_short type = key2ascii[key].type;
- if(key>MAXKEYNUM)
+ if(key>MAXKEYNUM)
return EINVAL;
if(type & KBD_OVERLOAD)
@@ -659,10 +659,10 @@ xlatkey2ascii(U_short key)
static Ovl_tbl thisdef;
int n;
void (*fnc)();
-
+
if(key==0) /* ignore the NON-KEY */
return 0;
-
+
getckeydef(key&0x7F, &thisdef); /* get the current ASCII value */
thisdef.type &= KBD_MASK;
@@ -690,7 +690,7 @@ xlatkey2ascii(U_short key)
case KBD_FUNC:
fnc = NULL;
more_chars = NULL;
-
+
if(altgr_down)
{
more_chars = (u_char *)thisdef.altgr;
@@ -702,7 +702,7 @@ xlatkey2ascii(U_short key)
else
fnc = key2ascii[key].shift.what.func;
}
-
+
else if(ctrl_down)
{
if(key2ascii[key].ctrl.subtype == STR)
@@ -710,7 +710,7 @@ xlatkey2ascii(U_short key)
else
fnc = key2ascii[key].ctrl.what.func;
}
-
+
else
{
if(key2ascii[key].unshift.subtype == STR)
@@ -718,10 +718,10 @@ xlatkey2ascii(U_short key)
else
fnc = key2ascii[key].unshift.what.func;
}
-
+
if(fnc)
(*fnc)(); /* execute function */
-
+
if((more_chars != NULL) && (more_chars[1] == 0))
{
if(vsp->caps_lock && more_chars[0] >= 'a'
@@ -745,7 +745,7 @@ xlatkey2ascii(U_short key)
case KBD_KP:
fnc = NULL;
more_chars = NULL;
-
+
if(meta_down)
{
switch(key)
@@ -755,13 +755,13 @@ xlatkey2ascii(U_short key)
more_chars =
(u_char *)"\033OQ";
return(more_chars);
-
+
case 100: /* * */
altkpflag = 0;
more_chars =
(u_char *)"\033OR";
return(more_chars);
-
+
case 105: /* - */
altkpflag = 0;
more_chars =
@@ -770,7 +770,7 @@ xlatkey2ascii(U_short key)
}
}
- if(meta_down || altgr_down)
+ if(meta_down || altgr_down)
{
if((n = keypad2num[key-91]) >= 0)
{
@@ -786,8 +786,8 @@ xlatkey2ascii(U_short key)
else
altkpflag = 0;
return 0;
- }
-
+ }
+
if(!(vsp->num_lock))
{
if(key2ascii[key].shift.subtype == STR)
@@ -802,15 +802,15 @@ xlatkey2ascii(U_short key)
else
fnc = key2ascii[key].unshift.what.func;
}
-
+
if(fnc)
(*fnc)(); /* execute function */
return(more_chars);
-
+
case KBD_CURSOR:
fnc = NULL;
more_chars = NULL;
-
+
if(vsp->ckm)
{
if(key2ascii[key].shift.subtype == STR)
@@ -825,14 +825,14 @@ xlatkey2ascii(U_short key)
else
fnc = key2ascii[key].unshift.what.func;
}
-
+
if(fnc)
(*fnc)(); /* execute function */
return(more_chars);
case KBD_NUM: /* special kp-num handling */
more_chars = NULL;
-
+
if(meta_down)
{
more_chars = (u_char *)"\033OP"; /* PF1 */
@@ -869,7 +869,7 @@ xlatkey2ascii(U_short key)
more_chars = metachar;
}
return(more_chars);
-
+
case KBD_META: /* these keys are */
case KBD_ALTGR: /* handled directly */
case KBD_SCROLL: /* by the keyboard */
@@ -905,7 +905,7 @@ sgetc(int noblock)
#if PCVT_KBD_FIFO && PCVT_SLOW_INTERRUPT
int s;
#endif
-
+
static u_char kbd_lastkey = 0; /* last keystroke */
static struct
@@ -923,7 +923,7 @@ sgetc(int noblock)
#endif /* XSERVER */
loop:
-
+
#ifdef XSERVER
#if PCVT_KBD_FIFO
@@ -952,7 +952,7 @@ loop:
#else /* !PCVT_KB_FIFO */
/* see if there is data from the keyboard available from the 8042 */
-
+
if (inb(CONTROLLER_CTRL) & STATUS_OUTPBF)
{
PCVT_KBD_DELAY(); /* 7 us delay */
@@ -1088,7 +1088,7 @@ loop:
{0x87, 4, -4, 0, 0} /* SE */
}
};
-
+
if(dt == 0xe0)
{
/* ignore extended scan codes */
@@ -1211,7 +1211,7 @@ loop:
&& now.tv_usec
< mousedef.acceltime);
break;
-
+
default: /* not a mouse-emulating key */
goto no_mouse_event;
}
@@ -1261,7 +1261,7 @@ no_mouse_event:
#else /* !PCVT_KBD_FIFO */
/* see if there is data from the keyboard available from the 8042 */
-
+
if(inb(CONTROLLER_CTRL) & STATUS_OUTPBF)
{
PCVT_KBD_DELAY(); /* 7 us delay */
@@ -1305,12 +1305,12 @@ no_mouse_event:
kbd_status.ext1 = 1;
/* FALLTHROUGH */
case KEYB_R_EXT0: /* keyboard extended scancode pfx 1 */
- kbd_status.extended = 1;
+ kbd_status.extended = 1;
break;
#if PCVT_SCANSET == 2
case KEYB_R_BREAKPFX: /* break code prefix for set 2 and 3 */
- kbd_status.breakseen = 1;
+ kbd_status.breakseen = 1;
break;
#endif /* PCVT_SCANSET == 2 */
@@ -1347,7 +1347,7 @@ regular:
if((key == 76) && ctrl_down && (meta_down||altgr_down))
cpu_reset();
#endif /* PCVT_CTRL_ALT_DEL */
-
+
#if !(PCVT_NETBSD || PCVT_FREEBSD >= 200)
#include "ddb.h"
#endif /* !(PCVT_NETBSD || PCVT_FREEBSD >= 200) */
@@ -1357,7 +1357,7 @@ regular:
if((key == 110) && ctrl_down && (meta_down || altgr_down))
{
static u_char in_Debugger;
-
+
if(!in_Debugger)
{
in_Debugger = 1;
@@ -1441,7 +1441,7 @@ regular:
else
goto loop;
}
-
+
type = key2ascii[key].type;
if(type & KBD_OVERLOAD)
@@ -1457,7 +1457,7 @@ regular:
vsp->shift_lock ^= 1;
}
break;
-
+
case KBD_CAPS:
if(!kbd_status.breakseen && key != kbd_lastkey)
{
@@ -1465,7 +1465,7 @@ regular:
update_led();
}
break;
-
+
case KBD_SCROLL:
if(!kbd_status.breakseen && key != kbd_lastkey)
{
@@ -1479,7 +1479,7 @@ regular:
}
}
break;
-
+
case KBD_SHIFT:
shift_down = kbd_status.breakseen ? 0 : 1;
break;
@@ -1509,7 +1509,7 @@ regular:
} /* N-Key-Rollover, but I ignore that */
else /* because avoidance is too complicated */
kbd_lastkey = key;
-
+
cp = xlatkey2ascii(key); /* have a key */
if(cp == NULL && !noblock)
@@ -1537,13 +1537,13 @@ static int
rmkeydef(int key)
{
register Ovl_tbl *ref;
-
+
if(key==0 || key > MAXKEYNUM)
return EINVAL;
if(key2ascii[key].type & KBD_OVERLOAD)
{
- ref = &ovltbl[key2ascii[key].ovlindex];
+ ref = &ovltbl[key2ascii[key].ovlindex];
ref->keynum = 0;
ref->type = 0;
ref->unshift[0] =
@@ -1553,7 +1553,7 @@ rmkeydef(int key)
key2ascii[key].type &= KBD_MASK;
}
return 0;
-}
+}
/*---------------------------------------------------------------------------*
* overlay a key
@@ -1577,7 +1577,7 @@ setkeydef(Ovl_tbl *data)
data->subs =
data->subc =
data->suba = KBD_SUBT_STR; /* just strings .. */
-
+
data->type |= KBD_OVERLOAD; /* mark overloaded */
/* if key already overloaded, use that slot else find free slot */
@@ -1592,7 +1592,7 @@ setkeydef(Ovl_tbl *data)
if(ovltbl[i].keynum==0)
break;
- if(i==OVLTBL_SIZE)
+ if(i==OVLTBL_SIZE)
return ENOSPC; /* no space, abuse of ENOSPC(!) */
}
@@ -1600,7 +1600,7 @@ setkeydef(Ovl_tbl *data)
key2ascii[data->keynum].type |= KBD_OVERLOAD; /* mark key */
key2ascii[data->keynum].ovlindex = i;
-
+
return 0;
}
@@ -1657,7 +1657,7 @@ kbdioctl(Dev_t dev, int cmd, caddr_t data, int flag)
case KBDGCKEY:
key = ((Ovl_tbl *)data)->keynum;
- return getckeydef(key,(Ovl_tbl *)data);
+ return getckeydef(key,(Ovl_tbl *)data);
case KBDSCKEY:
key = ((Ovl_tbl *)data)->keynum;
@@ -1673,7 +1673,7 @@ kbdioctl(Dev_t dev, int cmd, caddr_t data, int flag)
case KBDDEFAULT:
ovlinit(1);
- break;
+ break;
default:
/* proceed with vga ioctls */
@@ -1690,17 +1690,17 @@ int
mouse_ioctl(Dev_t dev, int cmd, caddr_t data)
{
struct mousedefs *def = (struct mousedefs *)data;
-
+
switch(cmd)
{
case KBDMOUSEGET:
*def = mousedef;
break;
-
+
case KBDMOUSESET:
mousedef = *def;
break;
-
+
default:
return -1;
}
@@ -1731,14 +1731,14 @@ get_usl_keymap(keymap_t *map)
bzero((caddr_t)map, sizeof(keymap_t));
map->n_keys = 0x59; /* that many keys we know about */
-
+
for(i = 1; i < N_KEYNUMS; i++)
{
Ovl_tbl kdef;
u_char c;
int j;
int idx = key2scan1[i];
-
+
if(idx == 0 || idx >= map->n_keys)
continue;
@@ -1765,7 +1765,7 @@ get_usl_keymap(keymap_t *map)
if((c & 0x7f) >= 0x40)
map->key[idx].map[5] = iso2ibm(c ^ 0x20);
break;
-
+
case KBD_FUNC:
/* we are only interested in F1 thru F12 here */
if(i >= 112 && i <= 123) {
@@ -1796,12 +1796,12 @@ get_usl_keymap(keymap_t *map)
map->key[idx].map[j] = c;
map->key[idx].spcl = 0xff;
break;
-
+
default:
break;
}
}
-}
+}
#endif /* PCVT_USL_VT_COMPAT */
@@ -1932,7 +1932,7 @@ fkey5(void)
if(!meta_down)
{
if((vsp->vt_pure_mode == M_HPVT)
- && (vsp->which_fkl == SYS_FKL))
+ && (vsp->which_fkl == SYS_FKL))
toggl_bell(vsp);
else
more_chars = (u_char *)"\033[21~"; /* F10 */
@@ -1954,7 +1954,7 @@ fkey6(void)
if(!meta_down)
{
if((vsp->vt_pure_mode == M_HPVT)
- && (vsp->which_fkl == SYS_FKL))
+ && (vsp->which_fkl == SYS_FKL))
toggl_sevenbit(vsp);
else
more_chars = (u_char *)"\033[23~"; /* F11 */
@@ -1998,7 +1998,7 @@ fkey8(void)
if(!meta_down)
{
if((vsp->vt_pure_mode == M_HPVT)
- && (vsp->which_fkl == SYS_FKL))
+ && (vsp->which_fkl == SYS_FKL))
toggl_awm(vsp);
else
more_chars = (u_char *)"\033[25~"; /* F13 */
@@ -2021,7 +2021,7 @@ fkey9(void)
{
if(vsp->vt_pure_mode == M_PUREVT)
return;
-
+
if(vsp->labels_on) /* toggle label display on/off */
fkl_off(vsp);
else
@@ -2477,7 +2477,7 @@ fkey5(void)
static void
fkey6(void)
{
- if(meta_down)
+ if(meta_down)
more_chars = (u_char *)"\033[29~"; /* DO */
else
more_chars = (u_char *)"\033[17~"; /* F6 */
@@ -2855,7 +2855,7 @@ cfkey5(void)
static void
cfkey6(void)
{
- if(vsp->which_fkl == SYS_FKL)
+ if(vsp->which_fkl == SYS_FKL)
toggl_sevenbit(vsp);
}
@@ -2875,7 +2875,7 @@ cfkey7(void)
static void
cfkey8(void)
{
- if(vsp->which_fkl == SYS_FKL)
+ if(vsp->which_fkl == SYS_FKL)
toggl_awm(vsp);
}
diff --git a/sys/i386/isa/pcvt/pcvt_kbd.h b/sys/i386/isa/pcvt/pcvt_kbd.h
index f488d53..000a709 100644
--- a/sys/i386/isa/pcvt/pcvt_kbd.h
+++ b/sys/i386/isa/pcvt/pcvt_kbd.h
@@ -60,7 +60,7 @@ typedef struct
u_char subtype; /* subtype, string or function */
#ifdef PCVT_ALT_ENH
u_short str_leng; /* if string, stringlength */
-#endif
+#endif
union what
{
u_char *string; /* ptr to string, null terminated */
@@ -69,7 +69,7 @@ typedef struct
} entry;
/*---------------------------------------------------------------------------*
- * this is the "outer" table
+ * this is the "outer" table
*---------------------------------------------------------------------------*/
typedef struct
{
@@ -209,138 +209,138 @@ static Keycap_def key2ascii[] =
/* type index unshift shift ctrl alt alt_shift alt_ctrl alt_ctrl_shift */
/* -------------------------------------------------------------------------------------------------------------------------------------------------- */
-/* 0*/ KBD_NONE, I, DFAULT, DFAULT, DFAULT, DFAULT, DFAULT, DFAULT, DFAULT,
-/* 1*/ KBD_ASCII, I, {S,1,C "`"}, {S,1,C "~"}, {S,1,C "`"}, DFAULT, DFAULT, DFAULT, DFAULT,
-/* 2*/ KBD_ASCII, I, {S,1,C "1"}, {S,1,C "!"}, {S,1,C "1"}, DFAULT, DFAULT, DFAULT, DFAULT,
-/* 3*/ KBD_ASCII, I, {S,1,C "2"}, {S,1,C "@"}, {S,1,C "\000"}, DFAULT, DFAULT, DFAULT, DFAULT,
-/* 4*/ KBD_ASCII, I, {S,1,C "3"}, {S,1,C "#"}, {S,1,C "3"}, DFAULT, DFAULT, DFAULT, DFAULT,
-/* 5*/ KBD_ASCII, I, {S,1,C "4"}, {S,1,C "$"}, {S,1,C "4"}, DFAULT, DFAULT, DFAULT, DFAULT,
-/* 6*/ KBD_ASCII, I, {S,1,C "5"}, {S,1,C "%"}, {S,1,C "5"}, DFAULT, DFAULT, DFAULT, DFAULT,
-/* 7*/ KBD_ASCII, I, {S,1,C "6"}, {S,1,C "^"}, {S,1,C "\036"}, DFAULT, DFAULT, DFAULT, DFAULT,
-/* 8*/ KBD_ASCII, I, {S,1,C "7"}, {S,1,C "&"}, {S,1,C "7"}, DFAULT, DFAULT, DFAULT, DFAULT,
-/* 9*/ KBD_ASCII, I, {S,1,C "8"}, {S,1,C "*"}, {S,1,C "9"}, DFAULT, DFAULT, DFAULT, DFAULT,
-/* 10*/ KBD_ASCII, I, {S,1,C "9"}, {S,1,C "("}, {S,1,C "9"}, DFAULT, DFAULT, DFAULT, DFAULT,
-/* 11*/ KBD_ASCII, I, {S,1,C "0"}, {S,1,C ")"}, {S,1,C "0"}, DFAULT, DFAULT, DFAULT, DFAULT,
-/* 12*/ KBD_ASCII, I, {S,1,C "-"}, {S,1,C "_"}, {S,1,C "\037"}, DFAULT, DFAULT, DFAULT, DFAULT,
-/* 13*/ KBD_ASCII, I, {S,1,C "="}, {S,1,C "+"}, {S,1,C "="}, DFAULT, DFAULT, DFAULT, DFAULT,
-/* 14*/ KBD_NONE, I, DFAULT, DFAULT, DFAULT, DFAULT, DFAULT, DFAULT, DFAULT,
-/* 15*/ KBD_ASCII, I, {S,1,C "\177"}, {S,1,C "\010"}, {S,1,C "\177"}, DFAULT, DFAULT, DFAULT, DFAULT,
-/* 16*/ KBD_ASCII, I, {S,1,C "\t"}, {S,1,C "\t"}, {S,1,C "\t"}, DFAULT, DFAULT, DFAULT, DFAULT,
-/* 17*/ KBD_ASCII, I, {S,1,C "q"}, {S,1,C "Q"}, {S,1,C "\021"}, DFAULT, DFAULT, DFAULT, DFAULT,
-/* 18*/ KBD_ASCII, I, {S,1,C "w"}, {S,1,C "W"}, {S,1,C "\027"}, DFAULT, DFAULT, DFAULT, DFAULT,
-/* 19*/ KBD_ASCII, I, {S,1,C "e"}, {S,1,C "E"}, {S,1,C "\005"}, DFAULT, DFAULT, DFAULT, DFAULT,
-/* 20*/ KBD_ASCII, I, {S,1,C "r"}, {S,1,C "R"}, {S,1,C "\022"}, DFAULT, DFAULT, DFAULT, DFAULT,
-/* 21*/ KBD_ASCII, I, {S,1,C "t"}, {S,1,C "T"}, {S,1,C "\024"}, DFAULT, DFAULT, DFAULT, DFAULT,
-/* 22*/ KBD_ASCII, I, {S,1,C "y"}, {S,1,C "Y"}, {S,1,C "\031"}, DFAULT, DFAULT, DFAULT, DFAULT,
-/* 23*/ KBD_ASCII, I, {S,1,C "u"}, {S,1,C "U"}, {S,1,C "\025"}, DFAULT, DFAULT, DFAULT, DFAULT,
-/* 24*/ KBD_ASCII, I, {S,1,C "i"}, {S,1,C "I"}, {S,1,C "\011"}, DFAULT, DFAULT, DFAULT, DFAULT,
-/* 25*/ KBD_ASCII, I, {S,1,C "o"}, {S,1,C "O"}, {S,1,C "\017"}, DFAULT, DFAULT, DFAULT, DFAULT,
-/* 26*/ KBD_ASCII, I, {S,1,C "p"}, {S,1,C "P"}, {S,1,C "\020"}, DFAULT, DFAULT, DFAULT, DFAULT,
-/* 27*/ KBD_ASCII, I, {S,1,C "["}, {S,1,C "{"}, {S,1,C "\033"}, DFAULT, DFAULT, DFAULT, DFAULT,
-/* 28*/ KBD_ASCII, I, {S,1,C "]"}, {S,1,C "}"}, {S,1,C "\035"}, DFAULT, DFAULT, DFAULT, DFAULT,
-/* 29*/ KBD_ASCII, I, {S,1,C "\\"}, {S,1,C "|"}, {S,1,C "\034"}, DFAULT, DFAULT, DFAULT, DFAULT,
-/* 30*/ KBD_CAPS, I, DFAULT, DFAULT, DFAULT, DFAULT, DFAULT, DFAULT, DFAULT,
-/* 31*/ KBD_ASCII, I, {S,1,C "a"}, {S,1,C "A"}, {S,1,C "\001"}, DFAULT, DFAULT, DFAULT, DFAULT,
-/* 32*/ KBD_ASCII, I, {S,1,C "s"}, {S,1,C "S"}, {S,1,C "\023"}, DFAULT, DFAULT, DFAULT, DFAULT,
-/* 33*/ KBD_ASCII, I, {S,1,C "d"}, {S,1,C "D"}, {S,1,C "\004"}, DFAULT, DFAULT, DFAULT, DFAULT,
-/* 34*/ KBD_ASCII, I, {S,1,C "f"}, {S,1,C "F"}, {S,1,C "\006"}, DFAULT, DFAULT, DFAULT, DFAULT,
-/* 35*/ KBD_ASCII, I, {S,1,C "g"}, {S,1,C "G"}, {S,1,C "\007"}, DFAULT, DFAULT, DFAULT, DFAULT,
-/* 36*/ KBD_ASCII, I, {S,1,C "h"}, {S,1,C "H"}, {S,1,C "\010"}, DFAULT, DFAULT, DFAULT, DFAULT,
-/* 37*/ KBD_ASCII, I, {S,1,C "j"}, {S,1,C "J"}, {S,1,C "\n"}, DFAULT, DFAULT, DFAULT, DFAULT,
-/* 38*/ KBD_ASCII, I, {S,1,C "k"}, {S,1,C "K"}, {S,1,C "\013"}, DFAULT, DFAULT, DFAULT, DFAULT,
-/* 39*/ KBD_ASCII, I, {S,1,C "l"}, {S,1,C "L"}, {S,1,C "\014"}, DFAULT, DFAULT, DFAULT, DFAULT,
-/* 40*/ KBD_ASCII, I, {S,1,C ";"}, {S,1,C ":"}, {S,1,C ";"}, DFAULT, DFAULT, DFAULT, DFAULT,
-/* 41*/ KBD_ASCII, I, {S,1,C "'"}, {S,1,C "\""}, {S,1,C "'"}, DFAULT, DFAULT, DFAULT, DFAULT,
-/* 42*/ KBD_ASCII, I, {S,1,C "\\"}, {S,1,C "|"}, {S,1,C "\034"}, DFAULT, DFAULT, DFAULT, DFAULT,
-/* 43*/ KBD_RETURN,I, {S,1,C "\r"}, {S,1,C "\r"}, {S,1,C "\r"}, DFAULT, DFAULT, DFAULT, DFAULT,
-/* 44*/ KBD_SHIFT, I, DFAULT, DFAULT, DFAULT, DFAULT, DFAULT, DFAULT, DFAULT,
-/* 45*/ KBD_ASCII, I, {S,1,C "<"}, {S,1,C ">"}, DFAULT, DFAULT, DFAULT, DFAULT, DFAULT,
-/* 46*/ KBD_ASCII, I, {S,1,C "z"}, {S,1,C "Z"}, {S,1,C "\032"}, DFAULT, DFAULT, DFAULT, DFAULT,
-/* 47*/ KBD_ASCII, I, {S,1,C "x"}, {S,1,C "X"}, {S,1,C "\030"}, DFAULT, DFAULT, DFAULT, DFAULT,
-/* 48*/ KBD_ASCII, I, {S,1,C "c"}, {S,1,C "C"}, {S,1,C "\003"}, DFAULT, DFAULT, DFAULT, DFAULT,
-/* 49*/ KBD_ASCII, I, {S,1,C "v"}, {S,1,C "V"}, {S,1,C "\026"}, DFAULT, DFAULT, DFAULT, DFAULT,
-/* 50*/ KBD_ASCII, I, {S,1,C "b"}, {S,1,C "B"}, {S,1,C "\002"}, DFAULT, DFAULT, DFAULT, DFAULT,
-/* 51*/ KBD_ASCII, I, {S,1,C "n"}, {S,1,C "N"}, {S,1,C "\016"}, DFAULT, DFAULT, DFAULT, DFAULT,
-/* 52*/ KBD_ASCII, I, {S,1,C "m"}, {S,1,C "M"}, {S,1,C "\r"}, DFAULT, DFAULT, DFAULT, DFAULT,
-/* 53*/ KBD_ASCII, I, {S,1,C ","}, {S,1,C "<"}, {S,1,C ","}, DFAULT, DFAULT, DFAULT, DFAULT,
-/* 54*/ KBD_ASCII, I, {S,1,C "."}, {S,1,C ">"}, {S,1,C "."}, DFAULT, DFAULT, DFAULT, DFAULT,
-/* 55*/ KBD_ASCII, I, {S,1,C "/"}, {S,1,C "?"}, {S,1,C "/"}, DFAULT, DFAULT, DFAULT, DFAULT,
-/* 56*/ KBD_NONE, I, DFAULT, DFAULT, DFAULT, DFAULT, DFAULT, DFAULT, DFAULT,
-/* 57*/ KBD_SHIFT, I, DFAULT, DFAULT, DFAULT, DFAULT, DFAULT, DFAULT, DFAULT,
-/* 58*/ KBD_CTL, I, DFAULT, DFAULT, DFAULT, DFAULT, DFAULT, DFAULT, DFAULT,
-/* 59*/ KBD_ASCII, I, DFAULT, DFAULT, DFAULT, DFAULT, DFAULT, DFAULT, DFAULT,
-/* 60*/ KBD_META, I, DFAULT, DFAULT, DFAULT, DFAULT, DFAULT, DFAULT, DFAULT,
+/* 0*/ KBD_NONE, I, DFAULT, DFAULT, DFAULT, DFAULT, DFAULT, DFAULT, DFAULT,
+/* 1*/ KBD_ASCII, I, {S,1,C "`"}, {S,1,C "~"}, {S,1,C "`"}, DFAULT, DFAULT, DFAULT, DFAULT,
+/* 2*/ KBD_ASCII, I, {S,1,C "1"}, {S,1,C "!"}, {S,1,C "1"}, DFAULT, DFAULT, DFAULT, DFAULT,
+/* 3*/ KBD_ASCII, I, {S,1,C "2"}, {S,1,C "@"}, {S,1,C "\000"}, DFAULT, DFAULT, DFAULT, DFAULT,
+/* 4*/ KBD_ASCII, I, {S,1,C "3"}, {S,1,C "#"}, {S,1,C "3"}, DFAULT, DFAULT, DFAULT, DFAULT,
+/* 5*/ KBD_ASCII, I, {S,1,C "4"}, {S,1,C "$"}, {S,1,C "4"}, DFAULT, DFAULT, DFAULT, DFAULT,
+/* 6*/ KBD_ASCII, I, {S,1,C "5"}, {S,1,C "%"}, {S,1,C "5"}, DFAULT, DFAULT, DFAULT, DFAULT,
+/* 7*/ KBD_ASCII, I, {S,1,C "6"}, {S,1,C "^"}, {S,1,C "\036"}, DFAULT, DFAULT, DFAULT, DFAULT,
+/* 8*/ KBD_ASCII, I, {S,1,C "7"}, {S,1,C "&"}, {S,1,C "7"}, DFAULT, DFAULT, DFAULT, DFAULT,
+/* 9*/ KBD_ASCII, I, {S,1,C "8"}, {S,1,C "*"}, {S,1,C "9"}, DFAULT, DFAULT, DFAULT, DFAULT,
+/* 10*/ KBD_ASCII, I, {S,1,C "9"}, {S,1,C "("}, {S,1,C "9"}, DFAULT, DFAULT, DFAULT, DFAULT,
+/* 11*/ KBD_ASCII, I, {S,1,C "0"}, {S,1,C ")"}, {S,1,C "0"}, DFAULT, DFAULT, DFAULT, DFAULT,
+/* 12*/ KBD_ASCII, I, {S,1,C "-"}, {S,1,C "_"}, {S,1,C "\037"}, DFAULT, DFAULT, DFAULT, DFAULT,
+/* 13*/ KBD_ASCII, I, {S,1,C "="}, {S,1,C "+"}, {S,1,C "="}, DFAULT, DFAULT, DFAULT, DFAULT,
+/* 14*/ KBD_NONE, I, DFAULT, DFAULT, DFAULT, DFAULT, DFAULT, DFAULT, DFAULT,
+/* 15*/ KBD_ASCII, I, {S,1,C "\177"}, {S,1,C "\010"}, {S,1,C "\177"}, DFAULT, DFAULT, DFAULT, DFAULT,
+/* 16*/ KBD_ASCII, I, {S,1,C "\t"}, {S,1,C "\t"}, {S,1,C "\t"}, DFAULT, DFAULT, DFAULT, DFAULT,
+/* 17*/ KBD_ASCII, I, {S,1,C "q"}, {S,1,C "Q"}, {S,1,C "\021"}, DFAULT, DFAULT, DFAULT, DFAULT,
+/* 18*/ KBD_ASCII, I, {S,1,C "w"}, {S,1,C "W"}, {S,1,C "\027"}, DFAULT, DFAULT, DFAULT, DFAULT,
+/* 19*/ KBD_ASCII, I, {S,1,C "e"}, {S,1,C "E"}, {S,1,C "\005"}, DFAULT, DFAULT, DFAULT, DFAULT,
+/* 20*/ KBD_ASCII, I, {S,1,C "r"}, {S,1,C "R"}, {S,1,C "\022"}, DFAULT, DFAULT, DFAULT, DFAULT,
+/* 21*/ KBD_ASCII, I, {S,1,C "t"}, {S,1,C "T"}, {S,1,C "\024"}, DFAULT, DFAULT, DFAULT, DFAULT,
+/* 22*/ KBD_ASCII, I, {S,1,C "y"}, {S,1,C "Y"}, {S,1,C "\031"}, DFAULT, DFAULT, DFAULT, DFAULT,
+/* 23*/ KBD_ASCII, I, {S,1,C "u"}, {S,1,C "U"}, {S,1,C "\025"}, DFAULT, DFAULT, DFAULT, DFAULT,
+/* 24*/ KBD_ASCII, I, {S,1,C "i"}, {S,1,C "I"}, {S,1,C "\011"}, DFAULT, DFAULT, DFAULT, DFAULT,
+/* 25*/ KBD_ASCII, I, {S,1,C "o"}, {S,1,C "O"}, {S,1,C "\017"}, DFAULT, DFAULT, DFAULT, DFAULT,
+/* 26*/ KBD_ASCII, I, {S,1,C "p"}, {S,1,C "P"}, {S,1,C "\020"}, DFAULT, DFAULT, DFAULT, DFAULT,
+/* 27*/ KBD_ASCII, I, {S,1,C "["}, {S,1,C "{"}, {S,1,C "\033"}, DFAULT, DFAULT, DFAULT, DFAULT,
+/* 28*/ KBD_ASCII, I, {S,1,C "]"}, {S,1,C "}"}, {S,1,C "\035"}, DFAULT, DFAULT, DFAULT, DFAULT,
+/* 29*/ KBD_ASCII, I, {S,1,C "\\"}, {S,1,C "|"}, {S,1,C "\034"}, DFAULT, DFAULT, DFAULT, DFAULT,
+/* 30*/ KBD_CAPS, I, DFAULT, DFAULT, DFAULT, DFAULT, DFAULT, DFAULT, DFAULT,
+/* 31*/ KBD_ASCII, I, {S,1,C "a"}, {S,1,C "A"}, {S,1,C "\001"}, DFAULT, DFAULT, DFAULT, DFAULT,
+/* 32*/ KBD_ASCII, I, {S,1,C "s"}, {S,1,C "S"}, {S,1,C "\023"}, DFAULT, DFAULT, DFAULT, DFAULT,
+/* 33*/ KBD_ASCII, I, {S,1,C "d"}, {S,1,C "D"}, {S,1,C "\004"}, DFAULT, DFAULT, DFAULT, DFAULT,
+/* 34*/ KBD_ASCII, I, {S,1,C "f"}, {S,1,C "F"}, {S,1,C "\006"}, DFAULT, DFAULT, DFAULT, DFAULT,
+/* 35*/ KBD_ASCII, I, {S,1,C "g"}, {S,1,C "G"}, {S,1,C "\007"}, DFAULT, DFAULT, DFAULT, DFAULT,
+/* 36*/ KBD_ASCII, I, {S,1,C "h"}, {S,1,C "H"}, {S,1,C "\010"}, DFAULT, DFAULT, DFAULT, DFAULT,
+/* 37*/ KBD_ASCII, I, {S,1,C "j"}, {S,1,C "J"}, {S,1,C "\n"}, DFAULT, DFAULT, DFAULT, DFAULT,
+/* 38*/ KBD_ASCII, I, {S,1,C "k"}, {S,1,C "K"}, {S,1,C "\013"}, DFAULT, DFAULT, DFAULT, DFAULT,
+/* 39*/ KBD_ASCII, I, {S,1,C "l"}, {S,1,C "L"}, {S,1,C "\014"}, DFAULT, DFAULT, DFAULT, DFAULT,
+/* 40*/ KBD_ASCII, I, {S,1,C ";"}, {S,1,C ":"}, {S,1,C ";"}, DFAULT, DFAULT, DFAULT, DFAULT,
+/* 41*/ KBD_ASCII, I, {S,1,C "'"}, {S,1,C "\""}, {S,1,C "'"}, DFAULT, DFAULT, DFAULT, DFAULT,
+/* 42*/ KBD_ASCII, I, {S,1,C "\\"}, {S,1,C "|"}, {S,1,C "\034"}, DFAULT, DFAULT, DFAULT, DFAULT,
+/* 43*/ KBD_RETURN,I, {S,1,C "\r"}, {S,1,C "\r"}, {S,1,C "\r"}, DFAULT, DFAULT, DFAULT, DFAULT,
+/* 44*/ KBD_SHIFT, I, DFAULT, DFAULT, DFAULT, DFAULT, DFAULT, DFAULT, DFAULT,
+/* 45*/ KBD_ASCII, I, {S,1,C "<"}, {S,1,C ">"}, DFAULT, DFAULT, DFAULT, DFAULT, DFAULT,
+/* 46*/ KBD_ASCII, I, {S,1,C "z"}, {S,1,C "Z"}, {S,1,C "\032"}, DFAULT, DFAULT, DFAULT, DFAULT,
+/* 47*/ KBD_ASCII, I, {S,1,C "x"}, {S,1,C "X"}, {S,1,C "\030"}, DFAULT, DFAULT, DFAULT, DFAULT,
+/* 48*/ KBD_ASCII, I, {S,1,C "c"}, {S,1,C "C"}, {S,1,C "\003"}, DFAULT, DFAULT, DFAULT, DFAULT,
+/* 49*/ KBD_ASCII, I, {S,1,C "v"}, {S,1,C "V"}, {S,1,C "\026"}, DFAULT, DFAULT, DFAULT, DFAULT,
+/* 50*/ KBD_ASCII, I, {S,1,C "b"}, {S,1,C "B"}, {S,1,C "\002"}, DFAULT, DFAULT, DFAULT, DFAULT,
+/* 51*/ KBD_ASCII, I, {S,1,C "n"}, {S,1,C "N"}, {S,1,C "\016"}, DFAULT, DFAULT, DFAULT, DFAULT,
+/* 52*/ KBD_ASCII, I, {S,1,C "m"}, {S,1,C "M"}, {S,1,C "\r"}, DFAULT, DFAULT, DFAULT, DFAULT,
+/* 53*/ KBD_ASCII, I, {S,1,C ","}, {S,1,C "<"}, {S,1,C ","}, DFAULT, DFAULT, DFAULT, DFAULT,
+/* 54*/ KBD_ASCII, I, {S,1,C "."}, {S,1,C ">"}, {S,1,C "."}, DFAULT, DFAULT, DFAULT, DFAULT,
+/* 55*/ KBD_ASCII, I, {S,1,C "/"}, {S,1,C "?"}, {S,1,C "/"}, DFAULT, DFAULT, DFAULT, DFAULT,
+/* 56*/ KBD_NONE, I, DFAULT, DFAULT, DFAULT, DFAULT, DFAULT, DFAULT, DFAULT,
+/* 57*/ KBD_SHIFT, I, DFAULT, DFAULT, DFAULT, DFAULT, DFAULT, DFAULT, DFAULT,
+/* 58*/ KBD_CTL, I, DFAULT, DFAULT, DFAULT, DFAULT, DFAULT, DFAULT, DFAULT,
+/* 59*/ KBD_ASCII, I, DFAULT, DFAULT, DFAULT, DFAULT, DFAULT, DFAULT, DFAULT,
+/* 60*/ KBD_META, I, DFAULT, DFAULT, DFAULT, DFAULT, DFAULT, DFAULT, DFAULT,
#if !PCVT_NULLCHARS
-/* 61*/ KBD_ASCII, I, DFAULT, DFAULT, DFAULT, DFAULT, DFAULT, DFAULT, DFAULT,
+/* 61*/ KBD_ASCII, I, DFAULT, DFAULT, DFAULT, DFAULT, DFAULT, DFAULT, DFAULT,
#else
-/* 61*/ KBD_ASCII, I, DFAULT, DFAULT, {S,1,C "\000"}, DFAULT, DFAULT, DFAULT, DFAULT,
+/* 61*/ KBD_ASCII, I, DFAULT, DFAULT, {S,1,C "\000"}, DFAULT, DFAULT, DFAULT, DFAULT,
#endif /* PCVT_NULLCHARS */
-/* 62*/ KBD_META, I, DFAULT, DFAULT, DFAULT, DFAULT, DFAULT, DFAULT, DFAULT,
-/* 63*/ KBD_ASCII, I, DFAULT, DFAULT, DFAULT, DFAULT, DFAULT, DFAULT, DFAULT,
-/* 64*/ KBD_CTL, I, DFAULT, DFAULT, DFAULT, DFAULT, DFAULT, DFAULT, DFAULT,
-/* 65*/ KBD_NONE, I, DFAULT, DFAULT, DFAULT, DFAULT, DFAULT, DFAULT, DFAULT,
-/* 66*/ KBD_NONE, I, DFAULT, DFAULT, DFAULT, DFAULT, DFAULT, DFAULT, DFAULT,
-/* 67*/ KBD_NONE, I, DFAULT, DFAULT, DFAULT, DFAULT, DFAULT, DFAULT, DFAULT,
-/* 68*/ KBD_NONE, I, DFAULT, DFAULT, DFAULT, DFAULT, DFAULT, DFAULT, DFAULT,
-/* 69*/ KBD_NONE, I, DFAULT, DFAULT, DFAULT, DFAULT, DFAULT, DFAULT, DFAULT,
-/* 70*/ KBD_NONE, I, DFAULT, DFAULT, DFAULT, DFAULT, DFAULT, DFAULT, DFAULT,
-/* 71*/ KBD_NONE, I, DFAULT, DFAULT, DFAULT, DFAULT, DFAULT, DFAULT, DFAULT,
-/* 72*/ KBD_NONE, I, DFAULT, DFAULT, DFAULT, DFAULT, DFAULT, DFAULT, DFAULT,
-/* 73*/ KBD_NONE, I, DFAULT, DFAULT, DFAULT, DFAULT, DFAULT, DFAULT, DFAULT,
-/* 74*/ KBD_NONE, I, DFAULT, DFAULT, DFAULT, DFAULT, DFAULT, DFAULT, DFAULT,
-/* 75*/ KBD_FUNC, I, {S,4,C "\033[2~"}, {S,4,C "\033[2~"}, {S,4,C "\033[2~"}, DFAULT, DFAULT, DFAULT, DFAULT,
-/* 76*/ KBD_FUNC, I, {S,4,C "\033[3~"}, {S,4,C "\033[3~"}, {S,4,C "\033[3~"}, DFAULT, DFAULT, DFAULT, DFAULT,
-/* 77*/ KBD_NONE, I, DFAULT, DFAULT, DFAULT, DFAULT, DFAULT, DFAULT, DFAULT,
-/* 78*/ KBD_NONE, I, DFAULT, DFAULT, DFAULT, DFAULT, DFAULT, DFAULT, DFAULT,
-/* 79*/ KBD_CURSOR,I, {S,4,C "\033[D"}, {S,4,C "\033OD"}, {S,4,C "\033[D"}, DFAULT, DFAULT, DFAULT, DFAULT,
-/* 80*/ KBD_FUNC, I, {S,4,C "\033[1~"}, {S,4,C "\033[1~"}, {S,4,C "\033[1~"}, DFAULT, DFAULT, DFAULT, DFAULT,
-/* 81*/ KBD_FUNC, I, {S,4,C "\033[4~"}, {S,4,C "\033[4~"}, {S,4,C "\033[4~"}, DFAULT, DFAULT, DFAULT, DFAULT,
-/* 82*/ KBD_NONE, I, DFAULT, DFAULT, DFAULT, DFAULT, DFAULT, DFAULT, DFAULT,
-/* 83*/ KBD_CURSOR,I, {S,4,C "\033[A"}, {S,4,C "\033OA"}, {S,4,C "\033[A"}, DFAULT, DFAULT, DFAULT, DFAULT,
-/* 84*/ KBD_CURSOR,I, {S,4,C "\033[B"}, {S,4,C "\033OB"}, {S,4,C "\033[B"}, DFAULT, DFAULT, DFAULT, DFAULT,
-/* 85*/ KBD_FUNC, I, {S,4,C "\033[5~"}, {S,4,C "\033[5~"}, {S,4,C "\033[5~"}, DFAULT, DFAULT, DFAULT, DFAULT,
-/* 86*/ KBD_FUNC, I, {S,4,C "\033[6~"}, {S,4,C "\033[6~"}, {S,4,C "\033[6~"}, DFAULT, DFAULT, DFAULT, DFAULT,
-/* 87*/ KBD_NONE, I, DFAULT, DFAULT, DFAULT, DFAULT, DFAULT, DFAULT, DFAULT,
-/* 88*/ KBD_NONE, I, DFAULT, DFAULT, DFAULT, DFAULT, DFAULT, DFAULT, DFAULT,
-/* 89*/ KBD_CURSOR,I, {S,3,C "\033[C"}, {S,3,C "\033OC"}, {S,3,C "\033[C"}, DFAULT, DFAULT, DFAULT, DFAULT,
-/* 90*/ KBD_NUM, I, DFAULT, DFAULT, DFAULT, DFAULT, DFAULT, DFAULT, DFAULT,
-/* 91*/ KBD_KP, I, {S,1,C "7"}, {S,2,C "\033Ow"}, {S,1,C "7"}, DFAULT, DFAULT, DFAULT, DFAULT,
-/* 92*/ KBD_KP, I, {S,1,C "4"}, {S,2,C "\033Ot"}, {S,1,C "4"}, DFAULT, DFAULT, DFAULT, DFAULT,
-/* 93*/ KBD_KP, I, {S,1,C "1"}, {S,2,C "\033Oq"}, {S,1,C "1"}, DFAULT, DFAULT, DFAULT, DFAULT,
-/* 94*/ KBD_NONE, I, DFAULT, DFAULT, DFAULT, DFAULT, DFAULT, DFAULT, DFAULT,
-/* 95*/ KBD_KP, I, {S,1,C "/"}, {S,1,C "/"}, {S,1,C "/"}, DFAULT, DFAULT, DFAULT, DFAULT,
-/* 96*/ KBD_KP, I, {S,1,C "8"}, {S,2,C "\033Ox"}, {S,1,C "8"}, DFAULT, DFAULT, DFAULT, DFAULT,
-/* 97*/ KBD_KP, I, {S,1,C "5"}, {S,2,C "\033Ou"}, {S,1,C "5"}, DFAULT, DFAULT, DFAULT, DFAULT,
-/* 98*/ KBD_KP, I, {S,1,C "2"}, {S,2,C "\033Or"}, {S,1,C "2"}, DFAULT, DFAULT, DFAULT, DFAULT,
-/* 99*/ KBD_KP, I, {S,1,C "0"}, {S,2,C "\033Op"}, {S,1,C "0"}, DFAULT, DFAULT, DFAULT, DFAULT,
-/*100*/ KBD_KP, I, {S,1,C "*"}, {S,1,C "*"}, {S,1,C "*"}, DFAULT, DFAULT, DFAULT, DFAULT,
-/*101*/ KBD_KP, I, {S,1,C "9"}, {S,2,C "\033Oy"}, {S,1,C "9"}, DFAULT, DFAULT, DFAULT, DFAULT,
-/*102*/ KBD_KP, I, {S,1,C "6"}, {S,2,C "\033Ov"}, {S,1,C "6"}, DFAULT, DFAULT, DFAULT, DFAULT,
-/*103*/ KBD_KP, I, {S,1,C "3"}, {S,2,C "\033Os"}, {S,1,C "3"}, DFAULT, DFAULT, DFAULT, DFAULT,
-/*104*/ KBD_KP, I, {S,1,C "."}, {S,2,C "\033On"}, {S,1,C "."}, DFAULT, DFAULT, DFAULT, DFAULT,
-/*105*/ KBD_KP, I, {S,1,C "-"}, {S,2,C "\033Om"}, {S,1,C "-"}, DFAULT, DFAULT, DFAULT, DFAULT,
-/*106*/ KBD_KP, I, {S,1,C "+"}, {S,1,C "+"}, {S,1,C "+"}, DFAULT, DFAULT, DFAULT, DFAULT,
-/*107*/ KBD_NONE, I, DFAULT, DFAULT, DFAULT, DFAULT, DFAULT, DFAULT, DFAULT,
-/*108*/ KBD_RETURN,I, {S,1,C "\r"}, {S,2,C "\033OM"}, {S,1,C "\r"}, DFAULT, DFAULT, DFAULT, DFAULT,
-/*109*/ KBD_NONE, I, DFAULT, DFAULT, DFAULT, DFAULT, DFAULT, DFAULT, DFAULT,
-/*110*/ KBD_ASCII, I, {S,1,C "\033"}, {S,2,C "\033"}, {S,1,C "\033"}, DFAULT, DFAULT, DFAULT, DFAULT,
-/*111*/ KBD_NONE, I, DFAULT, DFAULT, DFAULT, DFAULT, DFAULT, DFAULT, DFAULT,
-/*112*/ KBD_FUNC, I, {F,0,V fkey1}, {F,0,V sfkey1}, {F,0,V cfkey1}, DFAULT, DFAULT, DFAULT, DFAULT,
-/*113*/ KBD_FUNC, I, {F,0,V fkey2}, {F,0,V sfkey2}, {F,0,V cfkey2}, DFAULT, DFAULT, DFAULT, DFAULT,
-/*114*/ KBD_FUNC, I, {F,0,V fkey3}, {F,0,V sfkey3}, {F,0,V cfkey3}, DFAULT, DFAULT, DFAULT, DFAULT,
-/*115*/ KBD_FUNC, I, {F,0,V fkey4}, {F,0,V sfkey4}, {F,0,V cfkey4}, DFAULT, DFAULT, DFAULT, DFAULT,
-/*116*/ KBD_FUNC, I, {F,0,V fkey5}, {F,0,V sfkey5}, {F,0,V cfkey5}, DFAULT, DFAULT, DFAULT, DFAULT,
-/*117*/ KBD_FUNC, I, {F,0,V fkey6}, {F,0,V sfkey6}, {F,0,V cfkey6}, DFAULT, DFAULT, DFAULT, DFAULT,
-/*118*/ KBD_FUNC, I, {F,0,V fkey7}, {F,0,V sfkey7}, {F,0,V cfkey7}, DFAULT, DFAULT, DFAULT, DFAULT,
-/*119*/ KBD_FUNC, I, {F,0,V fkey8}, {F,0,V sfkey8}, {F,0,V cfkey8}, DFAULT, DFAULT, DFAULT, DFAULT,
-/*120*/ KBD_FUNC, I, {F,0,V fkey9}, {F,0,V sfkey9}, {F,0,V cfkey9}, DFAULT, DFAULT, DFAULT, DFAULT,
-/*121*/ KBD_FUNC, I, {F,0,V fkey10}, {F,0,V sfkey10}, {F,0,V cfkey10}, DFAULT, DFAULT, DFAULT, DFAULT,
-/*122*/ KBD_FUNC, I, {F,0,V fkey11}, {F,0,V sfkey11}, {F,0,V cfkey11}, DFAULT, DFAULT, DFAULT, DFAULT,
-/*123*/ KBD_FUNC, I, {F,0,V fkey12}, {F,0,V sfkey12}, {F,0,V cfkey12}, DFAULT, DFAULT, DFAULT, DFAULT,
-/*124*/ KBD_KP, I, DFAULT, DFAULT, DFAULT, DFAULT, DFAULT, DFAULT, DFAULT,
-/*125*/ KBD_SCROLL,I, DFAULT, DFAULT, DFAULT, DFAULT, DFAULT, DFAULT, DFAULT,
-/*126*/ KBD_BREAK, I, DFAULT, DFAULT, DFAULT, DFAULT, DFAULT, DFAULT, DFAULT,
-/*127*/ KBD_FUNC, I, DFAULT, DFAULT, DFAULT, DFAULT, DFAULT, DFAULT, DFAULT,
+/* 62*/ KBD_META, I, DFAULT, DFAULT, DFAULT, DFAULT, DFAULT, DFAULT, DFAULT,
+/* 63*/ KBD_ASCII, I, DFAULT, DFAULT, DFAULT, DFAULT, DFAULT, DFAULT, DFAULT,
+/* 64*/ KBD_CTL, I, DFAULT, DFAULT, DFAULT, DFAULT, DFAULT, DFAULT, DFAULT,
+/* 65*/ KBD_NONE, I, DFAULT, DFAULT, DFAULT, DFAULT, DFAULT, DFAULT, DFAULT,
+/* 66*/ KBD_NONE, I, DFAULT, DFAULT, DFAULT, DFAULT, DFAULT, DFAULT, DFAULT,
+/* 67*/ KBD_NONE, I, DFAULT, DFAULT, DFAULT, DFAULT, DFAULT, DFAULT, DFAULT,
+/* 68*/ KBD_NONE, I, DFAULT, DFAULT, DFAULT, DFAULT, DFAULT, DFAULT, DFAULT,
+/* 69*/ KBD_NONE, I, DFAULT, DFAULT, DFAULT, DFAULT, DFAULT, DFAULT, DFAULT,
+/* 70*/ KBD_NONE, I, DFAULT, DFAULT, DFAULT, DFAULT, DFAULT, DFAULT, DFAULT,
+/* 71*/ KBD_NONE, I, DFAULT, DFAULT, DFAULT, DFAULT, DFAULT, DFAULT, DFAULT,
+/* 72*/ KBD_NONE, I, DFAULT, DFAULT, DFAULT, DFAULT, DFAULT, DFAULT, DFAULT,
+/* 73*/ KBD_NONE, I, DFAULT, DFAULT, DFAULT, DFAULT, DFAULT, DFAULT, DFAULT,
+/* 74*/ KBD_NONE, I, DFAULT, DFAULT, DFAULT, DFAULT, DFAULT, DFAULT, DFAULT,
+/* 75*/ KBD_FUNC, I, {S,4,C "\033[2~"}, {S,4,C "\033[2~"}, {S,4,C "\033[2~"}, DFAULT, DFAULT, DFAULT, DFAULT,
+/* 76*/ KBD_FUNC, I, {S,4,C "\033[3~"}, {S,4,C "\033[3~"}, {S,4,C "\033[3~"}, DFAULT, DFAULT, DFAULT, DFAULT,
+/* 77*/ KBD_NONE, I, DFAULT, DFAULT, DFAULT, DFAULT, DFAULT, DFAULT, DFAULT,
+/* 78*/ KBD_NONE, I, DFAULT, DFAULT, DFAULT, DFAULT, DFAULT, DFAULT, DFAULT,
+/* 79*/ KBD_CURSOR,I, {S,4,C "\033[D"}, {S,4,C "\033OD"}, {S,4,C "\033[D"}, DFAULT, DFAULT, DFAULT, DFAULT,
+/* 80*/ KBD_FUNC, I, {S,4,C "\033[1~"}, {S,4,C "\033[1~"}, {S,4,C "\033[1~"}, DFAULT, DFAULT, DFAULT, DFAULT,
+/* 81*/ KBD_FUNC, I, {S,4,C "\033[4~"}, {S,4,C "\033[4~"}, {S,4,C "\033[4~"}, DFAULT, DFAULT, DFAULT, DFAULT,
+/* 82*/ KBD_NONE, I, DFAULT, DFAULT, DFAULT, DFAULT, DFAULT, DFAULT, DFAULT,
+/* 83*/ KBD_CURSOR,I, {S,4,C "\033[A"}, {S,4,C "\033OA"}, {S,4,C "\033[A"}, DFAULT, DFAULT, DFAULT, DFAULT,
+/* 84*/ KBD_CURSOR,I, {S,4,C "\033[B"}, {S,4,C "\033OB"}, {S,4,C "\033[B"}, DFAULT, DFAULT, DFAULT, DFAULT,
+/* 85*/ KBD_FUNC, I, {S,4,C "\033[5~"}, {S,4,C "\033[5~"}, {S,4,C "\033[5~"}, DFAULT, DFAULT, DFAULT, DFAULT,
+/* 86*/ KBD_FUNC, I, {S,4,C "\033[6~"}, {S,4,C "\033[6~"}, {S,4,C "\033[6~"}, DFAULT, DFAULT, DFAULT, DFAULT,
+/* 87*/ KBD_NONE, I, DFAULT, DFAULT, DFAULT, DFAULT, DFAULT, DFAULT, DFAULT,
+/* 88*/ KBD_NONE, I, DFAULT, DFAULT, DFAULT, DFAULT, DFAULT, DFAULT, DFAULT,
+/* 89*/ KBD_CURSOR,I, {S,3,C "\033[C"}, {S,3,C "\033OC"}, {S,3,C "\033[C"}, DFAULT, DFAULT, DFAULT, DFAULT,
+/* 90*/ KBD_NUM, I, DFAULT, DFAULT, DFAULT, DFAULT, DFAULT, DFAULT, DFAULT,
+/* 91*/ KBD_KP, I, {S,1,C "7"}, {S,2,C "\033Ow"}, {S,1,C "7"}, DFAULT, DFAULT, DFAULT, DFAULT,
+/* 92*/ KBD_KP, I, {S,1,C "4"}, {S,2,C "\033Ot"}, {S,1,C "4"}, DFAULT, DFAULT, DFAULT, DFAULT,
+/* 93*/ KBD_KP, I, {S,1,C "1"}, {S,2,C "\033Oq"}, {S,1,C "1"}, DFAULT, DFAULT, DFAULT, DFAULT,
+/* 94*/ KBD_NONE, I, DFAULT, DFAULT, DFAULT, DFAULT, DFAULT, DFAULT, DFAULT,
+/* 95*/ KBD_KP, I, {S,1,C "/"}, {S,1,C "/"}, {S,1,C "/"}, DFAULT, DFAULT, DFAULT, DFAULT,
+/* 96*/ KBD_KP, I, {S,1,C "8"}, {S,2,C "\033Ox"}, {S,1,C "8"}, DFAULT, DFAULT, DFAULT, DFAULT,
+/* 97*/ KBD_KP, I, {S,1,C "5"}, {S,2,C "\033Ou"}, {S,1,C "5"}, DFAULT, DFAULT, DFAULT, DFAULT,
+/* 98*/ KBD_KP, I, {S,1,C "2"}, {S,2,C "\033Or"}, {S,1,C "2"}, DFAULT, DFAULT, DFAULT, DFAULT,
+/* 99*/ KBD_KP, I, {S,1,C "0"}, {S,2,C "\033Op"}, {S,1,C "0"}, DFAULT, DFAULT, DFAULT, DFAULT,
+/*100*/ KBD_KP, I, {S,1,C "*"}, {S,1,C "*"}, {S,1,C "*"}, DFAULT, DFAULT, DFAULT, DFAULT,
+/*101*/ KBD_KP, I, {S,1,C "9"}, {S,2,C "\033Oy"}, {S,1,C "9"}, DFAULT, DFAULT, DFAULT, DFAULT,
+/*102*/ KBD_KP, I, {S,1,C "6"}, {S,2,C "\033Ov"}, {S,1,C "6"}, DFAULT, DFAULT, DFAULT, DFAULT,
+/*103*/ KBD_KP, I, {S,1,C "3"}, {S,2,C "\033Os"}, {S,1,C "3"}, DFAULT, DFAULT, DFAULT, DFAULT,
+/*104*/ KBD_KP, I, {S,1,C "."}, {S,2,C "\033On"}, {S,1,C "."}, DFAULT, DFAULT, DFAULT, DFAULT,
+/*105*/ KBD_KP, I, {S,1,C "-"}, {S,2,C "\033Om"}, {S,1,C "-"}, DFAULT, DFAULT, DFAULT, DFAULT,
+/*106*/ KBD_KP, I, {S,1,C "+"}, {S,1,C "+"}, {S,1,C "+"}, DFAULT, DFAULT, DFAULT, DFAULT,
+/*107*/ KBD_NONE, I, DFAULT, DFAULT, DFAULT, DFAULT, DFAULT, DFAULT, DFAULT,
+/*108*/ KBD_RETURN,I, {S,1,C "\r"}, {S,2,C "\033OM"}, {S,1,C "\r"}, DFAULT, DFAULT, DFAULT, DFAULT,
+/*109*/ KBD_NONE, I, DFAULT, DFAULT, DFAULT, DFAULT, DFAULT, DFAULT, DFAULT,
+/*110*/ KBD_ASCII, I, {S,1,C "\033"}, {S,2,C "\033"}, {S,1,C "\033"}, DFAULT, DFAULT, DFAULT, DFAULT,
+/*111*/ KBD_NONE, I, DFAULT, DFAULT, DFAULT, DFAULT, DFAULT, DFAULT, DFAULT,
+/*112*/ KBD_FUNC, I, {F,0,V fkey1}, {F,0,V sfkey1}, {F,0,V cfkey1}, DFAULT, DFAULT, DFAULT, DFAULT,
+/*113*/ KBD_FUNC, I, {F,0,V fkey2}, {F,0,V sfkey2}, {F,0,V cfkey2}, DFAULT, DFAULT, DFAULT, DFAULT,
+/*114*/ KBD_FUNC, I, {F,0,V fkey3}, {F,0,V sfkey3}, {F,0,V cfkey3}, DFAULT, DFAULT, DFAULT, DFAULT,
+/*115*/ KBD_FUNC, I, {F,0,V fkey4}, {F,0,V sfkey4}, {F,0,V cfkey4}, DFAULT, DFAULT, DFAULT, DFAULT,
+/*116*/ KBD_FUNC, I, {F,0,V fkey5}, {F,0,V sfkey5}, {F,0,V cfkey5}, DFAULT, DFAULT, DFAULT, DFAULT,
+/*117*/ KBD_FUNC, I, {F,0,V fkey6}, {F,0,V sfkey6}, {F,0,V cfkey6}, DFAULT, DFAULT, DFAULT, DFAULT,
+/*118*/ KBD_FUNC, I, {F,0,V fkey7}, {F,0,V sfkey7}, {F,0,V cfkey7}, DFAULT, DFAULT, DFAULT, DFAULT,
+/*119*/ KBD_FUNC, I, {F,0,V fkey8}, {F,0,V sfkey8}, {F,0,V cfkey8}, DFAULT, DFAULT, DFAULT, DFAULT,
+/*120*/ KBD_FUNC, I, {F,0,V fkey9}, {F,0,V sfkey9}, {F,0,V cfkey9}, DFAULT, DFAULT, DFAULT, DFAULT,
+/*121*/ KBD_FUNC, I, {F,0,V fkey10}, {F,0,V sfkey10}, {F,0,V cfkey10}, DFAULT, DFAULT, DFAULT, DFAULT,
+/*122*/ KBD_FUNC, I, {F,0,V fkey11}, {F,0,V sfkey11}, {F,0,V cfkey11}, DFAULT, DFAULT, DFAULT, DFAULT,
+/*123*/ KBD_FUNC, I, {F,0,V fkey12}, {F,0,V sfkey12}, {F,0,V cfkey12}, DFAULT, DFAULT, DFAULT, DFAULT,
+/*124*/ KBD_KP, I, DFAULT, DFAULT, DFAULT, DFAULT, DFAULT, DFAULT, DFAULT,
+/*125*/ KBD_SCROLL,I, DFAULT, DFAULT, DFAULT, DFAULT, DFAULT, DFAULT, DFAULT,
+/*126*/ KBD_BREAK, I, DFAULT, DFAULT, DFAULT, DFAULT, DFAULT, DFAULT, DFAULT,
+/*127*/ KBD_FUNC, I, DFAULT, DFAULT, DFAULT, DFAULT, DFAULT, DFAULT, DFAULT,
#undef C
#undef U
@@ -367,8 +367,8 @@ static Keycap_def key2ascii[] =
/* 0*/ KBD_NONE, I, {S,C "df"}, {S,C ""}, {S,C ""},
/* 1*/ KBD_ASCII, I, {S,C "`"}, {S,C "~"}, {S,C "`"},
/* 2*/ KBD_ASCII, I, {S,C "1"}, {S,C "!"}, {S,C "1"},
-/* 3*/ KBD_ASCII, I, {S,C "2"}, {S,C "@"}, {S,C "\000"},
-/* 4*/ KBD_ASCII, I, {S,C "3"}, {S,C "#"}, {S,C "3"},
+/* 3*/ KBD_ASCII, I, {S,C "2"}, {S,C "@"}, {S,C "\000"},
+/* 4*/ KBD_ASCII, I, {S,C "3"}, {S,C "#"}, {S,C "3"},
/* 5*/ KBD_ASCII, I, {S,C "4"}, {S,C "$"}, {S,C "4"},
/* 6*/ KBD_ASCII, I, {S,C "5"}, {S,C "%"}, {S,C "5"},
/* 7*/ KBD_ASCII, I, {S,C "6"}, {S,C "^"}, {S,C "\036"},
@@ -423,9 +423,9 @@ static Keycap_def key2ascii[] =
/* 56*/ KBD_NONE, I, {S,C ""}, {S,C ""}, {S,C ""},
/* 57*/ KBD_SHIFT, I, {S,C ""}, {S,C ""}, {S,C ""}, /* SHIFT right */
/* 58*/ KBD_CTL, I, {S,C ""}, {S,C ""}, {S,C ""}, /* CTL left */
-/* 59*/ KBD_ASCII, I, {S,C ""}, {S,C ""}, {S,C ""},
+/* 59*/ KBD_ASCII, I, {S,C ""}, {S,C ""}, {S,C ""},
/* 60*/ KBD_META, I, {S,C ""}, {S,C ""}, {S,C ""}, /* ALT left */
-#if !PCVT_NULLCHARS
+#if !PCVT_NULLCHARS
/* 61*/ KBD_ASCII, I, {S,C " "}, {S,C " "}, {S,C " "}, /* SPACE */
#else
/* 61*/ KBD_ASCII, I, {S,C " "}, {S,C " "}, {S,C "\000"}, /* SPACE */
@@ -477,7 +477,7 @@ static Keycap_def key2ascii[] =
/*106*/ KBD_KP, I, {S,C "+"}, {S,C "+"}, {S,C "+"},
/*107*/ KBD_NONE, I, {S,C ""}, {S,C ""}, {S,C ""},
/*108*/ KBD_RETURN,I, {S,C "\r"}, {S,C "\033OM"},{S,C "\r"}, /* KP ENTER */
-/*109*/ KBD_NONE, I, {S,C ""}, {S,C ""}, {S,C ""},
+/*109*/ KBD_NONE, I, {S,C ""}, {S,C ""}, {S,C ""},
/*110*/ KBD_ASCII, I, {S,C "\033"}, {S,C "\033"}, {S,C "\033"},
/*111*/ KBD_NONE, I, {S,C ""}, {S,C ""}, {S,C ""},
/*112*/ KBD_FUNC, I, {F,V fkey1}, {F,V sfkey1}, {F,V cfkey1}, /* F1 */
diff --git a/sys/i386/isa/pcvt/pcvt_out.c b/sys/i386/isa/pcvt/pcvt_out.c
index d11fd0f..cce878b 100644
--- a/sys/i386/isa/pcvt/pcvt_out.c
+++ b/sys/i386/isa/pcvt/pcvt_out.c
@@ -86,50 +86,50 @@ u_short attrib, ch;
if ((ch >= 0x20) && (ch <= 0x7f)) /* use GL if ch >= 0x20 */
{
if(!svsp->ss) /* single shift G2/G3 -> GL ? */
- {
- *video = attrib | svsp->GL[ch-0x20];
- }
- else
- {
- *video = attrib | svsp->Gs[ch-0x20];
- svsp->ss = 0;
- }
- }
- else
- {
- svsp->ss = 0;
-
+ {
+ *video = attrib | svsp->GL[ch-0x20];
+ }
+ else
+ {
+ *video = attrib | svsp->Gs[ch-0x20];
+ svsp->ss = 0;
+ }
+ }
+ else
+ {
+ svsp->ss = 0;
+
if(ch >= 0x80) /* display controls C1 */
- {
+ {
if(ch >= 0xA0) /* use GR if ch >= 0xA0 */
- {
- *video = attrib | svsp->GR[ch-0xA0];
- }
- else
- {
+ {
+ *video = attrib | svsp->GR[ch-0xA0];
+ }
+ else
+ {
if(vgacs[svsp->vga_charset].secondloaded)
- {
+ {
*video = attrib | ((ch-0x60) | CSH);
- }
- else /* use normal ibm charset for
+ }
+ else /* use normal ibm charset for
control display */
- {
- *video = attrib | ch;
- }
- }
- }
+ {
+ *video = attrib | ch;
+ }
+ }
+ }
else /* display controls C0 */
- {
- if(vgacs[svsp->vga_charset].secondloaded)
- {
- *video = attrib | (ch | CSH);
- }
+ {
+ if(vgacs[svsp->vga_charset].secondloaded)
+ {
+ *video = attrib | (ch | CSH);
+ }
else /* use normal ibm charset for control display*/
- {
- *video = attrib | ch;
- }
- }
- }
+ {
+ *video = attrib | ch;
+ }
+ }
+ }
}
/*---------------------------------------------------------------------------*
@@ -144,7 +144,7 @@ sput (u_char *s, U_char kernel, int len, int page)
if(page >= PCVT_NSCREENS) /* failsafe */
page = 0;
-
+
svsp = &vs[page]; /* pointer to current screen state */
if(do_initialization) /* first time called ? */
@@ -173,7 +173,7 @@ sput (u_char *s, U_char kernel, int len, int page)
if((ch <= 0x1f) && (svsp->transparent == 0))
{
-
+
/* always process control-chars in the range 0x00..0x1f !!! */
if(svsp->dis_fnc)
@@ -191,7 +191,7 @@ sput (u_char *s, U_char kernel, int len, int page)
bcopy((svsp->Crtat + svsp->cur_offset),
(svsp->Crtat + svsp->cur_offset) + 1,
(((svsp->maxcol)-1) - svsp->col)*CHR);
-
+
write_char(svsp, attrib, ch);
vt_selattr(svsp);
@@ -216,10 +216,10 @@ sput (u_char *s, U_char kernel, int len, int page)
svsp->col++;
svsp->lastchar = 0;
}
- }
+ }
else
{
- switch(ch)
+ switch(ch)
{
case 0x00: /* NUL */
case 0x01: /* SOH */
@@ -229,12 +229,12 @@ sput (u_char *s, U_char kernel, int len, int page)
case 0x05: /* ENQ */
case 0x06: /* ACK */
break;
-
+
case 0x07: /* BEL */
if(svsp->bell_on)
sysbeep(PCVT_SYSBEEPF/1500, hz/4);
break;
-
+
case 0x08: /* BS */
if(svsp->col > 0)
{
@@ -242,7 +242,7 @@ sput (u_char *s, U_char kernel, int len, int page)
svsp->col--;
}
break;
-
+
case 0x09: /* TAB */
while(svsp->col < ((svsp->maxcol)-1))
{
@@ -252,7 +252,7 @@ sput (u_char *s, U_char kernel, int len, int page)
break;
}
break;
-
+
case 0x0a: /* LF */
case 0x0b: /* VT */
case 0x0c: /* FF */
@@ -270,20 +270,20 @@ sput (u_char *s, U_char kernel, int len, int page)
}
check_scroll(svsp);
break;
-
+
case 0x0d: /* CR */
svsp->cur_offset -= svsp->col;
svsp->col = 0;
break;
-
+
case 0x0e: /* SO */
svsp->GL = svsp->G1;
break;
-
+
case 0x0f: /* SI */
svsp->GL = svsp->G0;
break;
-
+
case 0x10: /* DLE */
case 0x11: /* DC1/XON */
case 0x12: /* DC2 */
@@ -291,27 +291,27 @@ sput (u_char *s, U_char kernel, int len, int page)
case 0x14: /* DC4 */
case 0x15: /* NAK */
case 0x16: /* SYN */
- case 0x17: /* ETB */
+ case 0x17: /* ETB */
break;
-
+
case 0x18: /* CAN */
svsp->state = STATE_INIT;
clr_parms(svsp);
break;
-
+
case 0x19: /* EM */
break;
-
+
case 0x1a: /* SUB */
svsp->state = STATE_INIT;
clr_parms(svsp);
break;
-
+
case 0x1b: /* ESC */
svsp->state = STATE_ESC;
clr_parms(svsp);
break;
-
+
case 0x1c: /* FS */
case 0x1d: /* GS */
case 0x1e: /* RS */
@@ -322,9 +322,9 @@ sput (u_char *s, U_char kernel, int len, int page)
}
else
{
-
+
/* char range 0x20...0xff processing depends on current state */
-
+
switch(svsp->state)
{
case STATE_INIT:
@@ -340,11 +340,11 @@ sput (u_char *s, U_char kernel, int len, int page)
if(svsp->irm)
bcopy ((svsp->Crtat
+ svsp->cur_offset),
- (svsp->Crtat
+ (svsp->Crtat
+ svsp->cur_offset) + 1,
(((svsp->maxcol)-1)
- svsp->col) * CHR);
-
+
write_char(svsp, attrib, ch);
vt_selattr(svsp);
@@ -368,11 +368,11 @@ sput (u_char *s, U_char kernel, int len, int page)
case ' ': /* ESC sp family */
svsp->state = STATE_BLANK;
break;
-
+
case '#': /* ESC # family */
svsp->state = STATE_HASH;
break;
-
+
case '&': /* ESC & family (HP) */
if(svsp->vt_pure_mode ==
M_HPVT)
@@ -386,87 +386,87 @@ sput (u_char *s, U_char kernel, int len, int page)
svsp->state =
STATE_INIT;
break;
-
+
case '(': /* ESC ( family */
svsp->state = STATE_BROPN;
break;
-
+
case ')': /* ESC ) family */
svsp->state = STATE_BRCLO;
break;
-
+
case '*': /* ESC * family */
svsp->state = STATE_STAR;
break;
-
+
case '+': /* ESC + family */
svsp->state = STATE_PLUS;
break;
-
+
case '-': /* ESC - family */
svsp->state = STATE_MINUS;
break;
-
+
case '.': /* ESC . family */
svsp->state = STATE_DOT;
break;
-
+
case '/': /* ESC / family */
svsp->state = STATE_SLASH;
break;
-
+
case '7': /* SAVE CURSOR */
vt_sc(svsp);
svsp->state = STATE_INIT;
break;
-
+
case '8': /* RESTORE CURSOR */
vt_rc(svsp);
if (!kernel)
attrib = svsp->c_attr;
svsp->state = STATE_INIT;
break;
-
+
case '=': /* keypad application mode */
#if !PCVT_INHIBIT_NUMLOCK
vt_keyappl(svsp);
#endif
svsp->state = STATE_INIT;
break;
-
+
case '>': /* keypad numeric mode */
#if !PCVT_INHIBIT_NUMLOCK
vt_keynum(svsp);
#endif
svsp->state = STATE_INIT;
break;
-
+
case 'D': /* INDEX */
vt_ind(svsp);
svsp->state = STATE_INIT;
break;
-
+
case 'E': /* NEXT LINE */
vt_nel(svsp);
svsp->state = STATE_INIT;
break;
-
+
case 'H': /* set TAB at current col */
svsp->tab_stops[svsp->col] = 1;
svsp->state = STATE_INIT;
break;
-
+
case 'M': /* REVERSE INDEX */
vt_ri(svsp);
svsp->state = STATE_INIT;
break;
-
+
case 'N': /* SINGLE SHIFT G2 */
svsp->Gs = svsp->G2;
svsp->ss = 1;
svsp->state = STATE_INIT;
break;
-
+
case 'O': /* SINGLE SHIFT G3 */
svsp->Gs = svsp->G3;
svsp->ss = 1;
@@ -482,23 +482,23 @@ sput (u_char *s, U_char kernel, int len, int page)
vt_da(svsp);
svsp->state = STATE_INIT;
break;
-
+
case '[': /* CSI detected */
clr_parms(svsp);
svsp->state = STATE_CSI;
break;
-
+
case '\\': /* String Terminator */
svsp->state = STATE_INIT;
break;
-
+
case 'c': /* hard reset */
vt_ris(svsp);
if (!kernel)
attrib = svsp->c_attr;
svsp->state = STATE_INIT;
break;
-
+
#if PCVT_SETCOLOR
case 'd': /* set color sgr */
if(color)
@@ -520,33 +520,33 @@ sput (u_char *s, U_char kernel, int len, int page)
svsp->GL = svsp->G2;
svsp->state = STATE_INIT;
break;
-
+
case 'o': /* Lock Shift G3 -> GL */
svsp->GL = svsp->G3;
svsp->state = STATE_INIT;
break;
-
+
case '}': /* Lock Shift G2 -> GR */
svsp->GR = svsp->G2;
svsp->state = STATE_INIT;
break;
-
+
case '|': /* Lock Shift G3 -> GR */
svsp->GR = svsp->G3;
svsp->state = STATE_INIT;
break;
-
+
case '~': /* Lock Shift G1 -> GR */
svsp->GR = svsp->G1;
svsp->state = STATE_INIT;
break;
-
+
default:
svsp->state = STATE_INIT;
break;
}
break;
-
+
case STATE_BLANK: /* ESC space [FG], which are */
svsp->state = STATE_INIT; /* currently ignored*/
break;
@@ -560,18 +560,18 @@ sput (u_char *s, U_char kernel, int len, int page)
case '6': /*double width sngle height*/
svsp->state = STATE_INIT;
break;
-
+
case '8': /* fill sceen with 'E's */
vt_aln(svsp);
svsp->state = STATE_INIT;
break;
-
+
default: /* anything else */
svsp->state = STATE_INIT;
break;
}
break;
-
+
case STATE_BROPN: /* designate G0 */
case STATE_BRCLO: /* designate G1 */
case STATE_STAR: /* designate G2 */
@@ -609,18 +609,18 @@ sput (u_char *s, U_char kernel, int len, int page)
svsp->parms[svsp->parmi] +=
(ch -'0');
break;
-
+
case ';': /* next parameter */
- svsp->parmi =
+ svsp->parmi =
(svsp->parmi+1 < MAXPARMS) ?
svsp->parmi+1 : svsp->parmi;
break;
-
+
case 'h': /* set mode */
vt_set_dec_priv_qm(svsp);
svsp->state = STATE_INIT;
break;
-
+
case 'l': /* reset mode */
vt_reset_dec_priv_qm(svsp);
svsp->state = STATE_INIT;
@@ -647,7 +647,7 @@ sput (u_char *s, U_char kernel, int len, int page)
}
break;
-
+
case STATE_CSI:
switch(ch)
{
@@ -665,156 +665,156 @@ sput (u_char *s, U_char kernel, int len, int page)
svsp->parms[svsp->parmi] +=
(ch -'0');
break;
-
+
case ';': /* next parameter */
- svsp->parmi =
+ svsp->parmi =
(svsp->parmi+1 < MAXPARMS) ?
svsp->parmi+1 : svsp->parmi;
break;
-
+
case '?': /* ESC [ ? family */
svsp->state = STATE_CSIQM;
break;
-
+
case '@': /* insert char */
vt_ic(svsp);
svsp->state = STATE_INIT;
break;
-
+
case '"': /* select char attribute */
svsp->state = STATE_SCA;
break;
-
+
case '\'': /* for DECELR/DECSLE */
/* XXX */ /* another state needed -hm */
break;
-
+
case '!': /* soft terminal reset */
svsp->state = STATE_STR;
break;
-
+
case 'A': /* cursor up */
vt_cuu(svsp);
svsp->state = STATE_INIT;
break;
-
+
case 'B': /* cursor down */
vt_cud(svsp);
svsp->state = STATE_INIT;
break;
-
+
case 'C': /* cursor forward */
vt_cuf(svsp);
svsp->state = STATE_INIT;
break;
-
+
case 'D': /* cursor backward */
vt_cub(svsp);
svsp->state = STATE_INIT;
break;
-
+
case 'H': /* direct cursor addressing*/
vt_curadr(svsp);
svsp->state = STATE_INIT;
break;
-
+
case 'J': /* erase screen */
vt_clreos(svsp);
svsp->state = STATE_INIT;
break;
-
+
case 'K': /* erase line */
vt_clreol(svsp);
svsp->state = STATE_INIT;
break;
-
+
case 'L': /* insert line */
vt_il(svsp);
svsp->state = STATE_INIT;
break;
-
+
case 'M': /* delete line */
vt_dl(svsp);
svsp->state = STATE_INIT;
break;
-
+
case 'P': /* delete character */
vt_dch(svsp);
svsp->state = STATE_INIT;
break;
-
+
case 'S': /* scroll up */
vt_su(svsp);
svsp->state = STATE_INIT;
break;
-
+
case 'T': /* scroll down */
vt_sd(svsp);
svsp->state = STATE_INIT;
break;
-
+
case 'X': /* erase character */
vt_ech(svsp);
svsp->state = STATE_INIT;
break;
case 'c': /* device attributes */
- vt_da(svsp);
+ vt_da(svsp);
svsp->state = STATE_INIT;
break;
-
+
case 'f': /* direct cursor addressing*/
vt_curadr(svsp);
svsp->state = STATE_INIT;
break;
-
+
case 'g': /* clear tabs */
vt_clrtab(svsp);
svsp->state = STATE_INIT;
break;
-
+
case 'h': /* set mode(s) */
vt_set_ansi(svsp);
svsp->state = STATE_INIT;
break;
-
+
case 'i': /* media copy */
vt_mc(svsp);
svsp->state = STATE_INIT;
break;
-
+
case 'l': /* reset mode(s) */
vt_reset_ansi(svsp);
svsp->state = STATE_INIT;
break;
-
+
case 'm': /* select graphic rendition*/
vt_sgr(svsp);
if (!kernel)
attrib = svsp->c_attr;
svsp->state = STATE_INIT;
break;
-
+
case 'n': /* reports */
vt_dsr(svsp);
svsp->state = STATE_INIT;
break;
-
+
case 'r': /* set scrolling region */
vt_stbm(svsp);
svsp->state = STATE_INIT;
break;
-
+
case 'x': /*request/report parameters*/
vt_reqtparm(svsp);
svsp->state = STATE_INIT;
break;
-
+
case 'y': /* invoke selftest(s) */
vt_tst(svsp);
svsp->state = STATE_INIT;
break;
-
+
case 'z': /* DECELR, ignored */
case '{': /* DECSLE, ignored */
svsp->state = STATE_INIT;
@@ -841,7 +841,7 @@ sput (u_char *s, U_char kernel, int len, int page)
vt_sca(svsp);
svsp->state = STATE_INIT;
break;
-
+
default:
svsp->state = STATE_INIT;
break;
@@ -874,11 +874,11 @@ sput (u_char *s, U_char kernel, int len, int page)
svsp->row = svsp->cur_offset / svsp->maxcol; /* current row update */
/* take care of last character on line behaviour */
-
+
if(svsp->lastchar && (svsp->col < ((svsp->maxcol)-1)))
svsp->lastchar = 0;
}
-
+
if(svsp == vsp) /* on current displayed page ? */
cursor_pos_valid = 1; /* position is valid now */
}
@@ -891,7 +891,7 @@ vt_coldinit(void)
{
extern u_short csd_ascii[]; /* pcvt_tbl.h */
extern u_short csd_supplemental[];
-
+
u_short volatile *cp = Crtat + (CGA_BUF-MONO_BUF)/CHR;
u_short was;
int nscr, charset;
@@ -902,19 +902,19 @@ vt_coldinit(void)
do_initialization = 0; /* reset init necessary flag */
/* get the equipment byte from the RTC chip */
-
+
equipment = ((rtcin(RTC_EQUIPMENT)) >> 4) & 0x03;
-
+
switch(equipment)
{
case EQ_EGAVGA:
/* set memory start to CGA == B8000 */
-
+
Crtat = Crtat + (CGA_BUF-MONO_BUF)/CHR;
-
+
/* find out, what monitor is connected */
-
+
was = *cp;
*cp = (u_short) 0xA55A;
if (*cp != 0xA55A)
@@ -952,9 +952,9 @@ vt_coldinit(void)
{
mda2egaorvga();
Crtat = SaveCrtat; /* mono start */
- }
+ }
}
-
+
/* decouple ega/vga charsets and intensity */
set_2ndcharset();
@@ -972,13 +972,13 @@ vt_coldinit(void)
case EQ_80MONO:
addr_6845 = MONO_BASE;
adaptor_type = MDA_ADAPTOR;
- color = 0;
- totalfonts = 0;
+ color = 0;
+ totalfonts = 0;
break;
}
/* establish default colors */
-
+
if(color)
{
kern_attr = (COLOR_KERNEL_FG | COLOR_KERNEL_BG) << 8;
@@ -990,11 +990,11 @@ vt_coldinit(void)
if(adaptor_type == MDA_ADAPTOR)
user_attr = sgr_tab_imono[0] << 8;
else
- user_attr = sgr_tab_mono[0] << 8;
+ user_attr = sgr_tab_mono[0] << 8;
}
totalscreens = 1; /* for now until malloced */
-
+
for(nscr = 0, svsp = vs; nscr < PCVT_NSCREENS; nscr++, svsp++)
{
svsp->Crtat = Crtat; /* all same until malloc'ed */
@@ -1179,13 +1179,13 @@ vt_coldinit(void)
* values. This avoid problems with
* LCD displays that apparently happen
* to use font matrices up to 19
- * scan lines and 475 scan lines
+ * scan lines and 475 scan lines
* total in order to make use of the
* whole screen area
*/
outb(addr_6845, CRTC_VDE);
- vgacs[charset].scr_scanlines =
+ vgacs[charset].scr_scanlines =
inb(addr_6845 + 1);
outb(addr_6845, CRTC_MAXROW);
vgacs[charset].char_scanlines =
@@ -1213,19 +1213,19 @@ vt_coldinit(void)
vgacs[0].loaded = 1; /* The BIOS loaded this at boot */
/* set cursor for first screen */
-
+
outb(addr_6845,CRTC_CURSTART); /* cursor start reg */
- outb(addr_6845+1,vs[0].cursor_start);
+ outb(addr_6845+1,vs[0].cursor_start);
outb(addr_6845,CRTC_CUREND); /* cursor end reg */
outb(addr_6845+1,vs[0].cursor_end);
/* this is to satisfy ddb */
-
+
if(!keyboard_is_initialized)
kbd_code_init1();
/* update keyboard led's */
-
+
update_led();
}
@@ -1267,7 +1267,7 @@ vt_coldmalloc(void)
screen_max_size =
MAXROW_VGA * MAXCOL_VGA * CHR;
}
-
+
for(nscr = 0; nscr < PCVT_NSCREENS; nscr++)
{
if((vs[nscr].Memory =
@@ -1299,32 +1299,32 @@ check_scroll(struct video_state *svsp)
if(!svsp->abs_write)
{
/* we write within scroll region */
-
- if(svsp->cur_offset >= ((svsp->scrr_end + 1) * svsp->maxcol))
+
+ if(svsp->cur_offset >= ((svsp->scrr_end + 1) * svsp->maxcol))
{
/* the following piece of code has to be protected */
/* from trying to switch to another virtual screen */
/* while being in there ... */
-
+
critical_scroll = 1; /* flag protect ON */
-
+
roll_up(svsp, 1); /* rolling up .. */
-
+
svsp->cur_offset -= svsp->maxcol;/* update position */
-
+
if(switch_page != -1) /* someone wanted to switch ? */
{
vgapage(switch_page); /* yes, then switch ! */
switch_page = -1; /* reset switch flag */
}
-
+
critical_scroll = 0; /* flag protect OFF */
}
}
else
{
/* clip, if outside of screen */
-
+
if (svsp->cur_offset >= svsp->screen_rows * svsp->maxcol)
svsp->cur_offset -= svsp->maxcol;
}
@@ -1338,7 +1338,7 @@ writefkl(int num, u_char *string, struct video_state *svsp)
{
if((num < 0) || (num > 7)) /* range ok ? */
return;
-
+
strncpy(svsp->ufkl[num], string, 16); /* save string in static array */
if(svsp->which_fkl == USR_FKL)
@@ -1353,7 +1353,7 @@ swritefkl(int num, u_char *string, struct video_state *svsp)
{
if((num < 0) || (num > 7)) /* range ok ? */
return;
-
+
strncpy(svsp->sfkl[num], string, 16); /* save string in static array */
if(svsp->which_fkl == SYS_FKL)
@@ -1367,9 +1367,9 @@ static void
wrfkl(int num, u_char *string, struct video_state *svsp)
{
register u_short *p;
- register u_short *p1;
+ register u_short *p1;
register int cnt = 0;
-
+
if(!svsp->labels_on || (svsp->vt_pure_mode == M_PUREVT))
return;
@@ -1390,9 +1390,9 @@ wrfkl(int num, u_char *string, struct video_state *svsp)
else /* labels 5 .. 8 */
p += ((num * (LABEL_LEN + 6)) + LABEL_MID + 11);
- }
+ }
p1 = p + svsp->maxcol; /* second label line */
-
+
while((*string != '\0') && (cnt < 8))
{
*p = ((0x70 << 8) + (*string & 0xff));
@@ -1430,15 +1430,15 @@ fkl_off(struct video_state *svsp)
{
register u_short *p;
register int num;
- register int size;
-
+ register int size;
+
svsp->labels_on = 0;
if((vgacs[svsp->vga_charset].screen_size==SIZ_28ROWS) && svsp->force24)
size = 4;
else
size = 3;
-
+
p = (svsp->Crtat + (svsp->screen_rows * svsp->maxcol));
for(num = 0; num < (size * svsp->maxcol); num++)
@@ -1467,7 +1467,7 @@ set_emulation_mode(struct video_state *svsp, int mode)
{
if(svsp->vt_pure_mode == mode)
return;
-
+
clr_parms(svsp); /* escape parameter init */
svsp->state = STATE_INIT; /* initial state */
svsp->scrr_beg = 0; /* start of scrolling region */
@@ -1518,12 +1518,12 @@ set_emulation_mode(struct video_state *svsp, int mode)
svsp->scrr_len = svsp->screen_rows;
svsp->scrr_end = svsp->scrr_len - 1;
- }
+ }
#if PCVT_SIGWINCH
if (svsp->vs_tty && svsp->vs_tty->t_pgrp)
pgsignal(svsp->vs_tty->t_pgrp, SIGWINCH, 1);
-#endif /* PCVT_SIGWINCH */
+#endif /* PCVT_SIGWINCH */
}
@@ -1554,7 +1554,7 @@ init_sfkl(struct video_state *svsp)
/* 1234567812345678 */
swritefkl(0,(u_char *)"132 COLUMNS ",svsp);
else
- swritefkl(0,(u_char *)" ",svsp);
+ swritefkl(0,(u_char *)" ",svsp);
/* 1234567812345678 */
swritefkl(1,(u_char *)"SOFT-RSTTERMINAL",svsp);
@@ -1562,7 +1562,7 @@ init_sfkl(struct video_state *svsp)
if(svsp->force24)
swritefkl(2,(u_char *)"FORCE24 ENABLE *",svsp);
else
- swritefkl(2,(u_char *)"FORCE24 ENABLE ",svsp);
+ swritefkl(2,(u_char *)"FORCE24 ENABLE ",svsp);
#if PCVT_SHOWKEYS /* 1234567812345678 */
if(svsp == &vs[0])
@@ -1577,7 +1577,7 @@ init_sfkl(struct video_state *svsp)
if(svsp->bell_on)
swritefkl(4,(u_char *)"BELL ENABLE *",svsp);
else
- swritefkl(4,(u_char *)"BELL ENABLE ",svsp);
+ swritefkl(4,(u_char *)"BELL ENABLE ",svsp);
if(svsp->sevenbit)
swritefkl(5,(u_char *)"8-BIT ENABLE ",svsp);
@@ -1585,11 +1585,11 @@ init_sfkl(struct video_state *svsp)
swritefkl(5,(u_char *)"8-BIT ENABLE *",svsp);
swritefkl(6,(u_char *)"DISPLAY FUNCTNS ",svsp);
-
+
swritefkl(7,(u_char *)"AUTOWRAPENABLE *",svsp);
- /* 1234567812345678 */
+ /* 1234567812345678 */
}
-
+
/*---------------------------------------------------------------------------*
* switch display to user function key labels
*---------------------------------------------------------------------------*/
@@ -1625,11 +1625,11 @@ toggl_24l(struct video_state *svsp)
if(svsp->force24)
{
svsp->force24 = 0;
- swritefkl(2,(u_char *)"FORCE24 ENABLE ",svsp);
+ swritefkl(2,(u_char *)"FORCE24 ENABLE ",svsp);
}
else
{
- svsp->force24 = 1;
+ svsp->force24 = 1;
swritefkl(2,(u_char *)"FORCE24 ENABLE *",svsp);
}
set_screen_size(svsp, vgacs[(svsp->vga_charset)].screen_size);
@@ -1772,7 +1772,7 @@ vt_col(struct video_state *svsp, int cols)
{
if(vga_col(svsp, cols) == 0)
return(0);
-
+
if(cols == SCR_COL80)
swritefkl(0,(u_char *)"132 COLUMNS ",svsp);
else
@@ -1781,7 +1781,7 @@ vt_col(struct video_state *svsp, int cols)
fillw(user_attr | ' ',
svsp->Crtat,
svsp->maxcol * svsp->screen_rowsize);
-
+
clr_parms(svsp); /* escape parameter init */
svsp->state = STATE_INIT; /* initial state */
svsp->col = 0; /* init row */
@@ -1815,7 +1815,7 @@ vt_col(struct video_state *svsp, int cols)
}
return(1);
-}
+}
/*---------------------------------------------------------------------------*
* update HP stuff on screen
@@ -1917,7 +1917,7 @@ hp_entry(U_char ch, struct video_state *svsp)
break;
}
break;
-
+
case SHP_AND_F:
if((ch >= '0') && (ch <= '8'))
{
@@ -1959,7 +1959,7 @@ hp_entry(U_char ch, struct video_state *svsp)
}
break;
- case SHP_AND_Fak1:
+ case SHP_AND_Fak1:
if(ch == 'k')
svsp->hp_state = SHP_AND_Fakd;
else
@@ -1968,7 +1968,7 @@ hp_entry(U_char ch, struct video_state *svsp)
svsp->state = STATE_INIT;
}
break;
-
+
case SHP_AND_Fakd:
if(svsp->l_len > 16)
{
@@ -2033,7 +2033,7 @@ hp_entry(U_char ch, struct video_state *svsp)
else
svsp->i++;
break;
-
+
case SHP_AND_FakdLls:
svsp->s_buf[svsp->i] = ch;
if(svsp->i >= svsp->s_len-1)
@@ -2108,7 +2108,7 @@ hp_entry(U_char ch, struct video_state *svsp)
svsp->m_len *= 10;
svsp->m_len += (ch -'0');
break;
-
+
case 'L':
svsp->hp_state = SHP_AND_JL;
svsp->i = 0;
@@ -2136,7 +2136,7 @@ hp_entry(U_char ch, struct video_state *svsp)
/* display status line */
/* needs to be implemented */
/* see 2392 man, 3-14 */
-
+
}
else
svsp->i++;
@@ -2150,7 +2150,7 @@ hp_entry(U_char ch, struct video_state *svsp)
svsp->transparent = 0;
}
break;
-
+
default:
svsp->hp_state = SHP_INIT;
svsp->state = STATE_INIT;
diff --git a/sys/i386/isa/pcvt/pcvt_sup.c b/sys/i386/isa/pcvt/pcvt_sup.c
index 6f64570..d3e94be 100644
--- a/sys/i386/isa/pcvt/pcvt_sup.c
+++ b/sys/i386/isa/pcvt/pcvt_sup.c
@@ -214,11 +214,11 @@ vgaioctl(Dev_t dev, int cmd, caddr_t data, int flag)
case VGAPCVTID:
vgapcvtid((struct pcvtid *)data);
break;
-
+
case VGAPCVTINFO:
vgapcvtinfo((struct pcvtinfo *)data);
break;
-
+
case VGASETCOLMS:
if(is_dev_grafx)
return EAGAIN;
@@ -280,7 +280,7 @@ vgapcvtinfo(struct pcvtinfo *data)
data->updateslow= PCVT_UPDATESLOW;
data->sysbeepf = PCVT_SYSBEEPF;
-#if PCVT_NETBSD || PCVT_FREEBSD >= 200
+#if PCVT_NETBSD || PCVT_FREEBSD >= 200
data->pcburst = PCVT_PCBURST;
#else
data->pcburst = 1;
@@ -291,7 +291,7 @@ vgapcvtinfo(struct pcvtinfo *data)
#else
data->kbd_fifo_sz = 0;
#endif
-
+
data->compile_opts = (0
#if PCVT_VT220KEYB
@@ -399,7 +399,7 @@ vid_cursor(struct cursorshape *data)
if(adaptor_type == VGA_ADAPTOR || adaptor_type == EGA_ADAPTOR)
{
- character_set = vs[screen].vga_charset;
+ character_set = vs[screen].vga_charset;
character_set = (character_set < 0) ? 0 :
((character_set < totalfonts) ?
character_set :
@@ -421,7 +421,7 @@ vid_cursor(struct cursorshape *data)
if((vga_family == VGA_F_TRI) && (start == 0))
start = 1;
-
+
end = (data->end < 0) ? 0 :
((data->end > line_height) ? line_height : data->end);
@@ -431,7 +431,7 @@ vid_cursor(struct cursorshape *data)
if(screen == current_video_screen)
{
outb(addr_6845,CRTC_CURSTART); /* cursor start reg */
- outb(addr_6845+1, start);
+ outb(addr_6845+1, start);
outb(addr_6845,CRTC_CUREND); /* cursor end reg */
outb(addr_6845+1, end);
}
@@ -448,14 +448,14 @@ vgasetfontattr(struct vgafontattr *data)
int lines_per_character;
int totscanlines;
int size;
-
+
vga_character_set = data->character_set;
vga_character_set = (vga_character_set < 0) ? 0 :
((vga_character_set < totalfonts) ?
vga_character_set : totalfonts-1);
vgacs[vga_character_set].loaded = data->font_loaded;
-
+
/* Limit Characters to 32 scanlines doubled */
vgacs[vga_character_set].char_scanlines =
(data->character_scanlines & 0x1F)
@@ -463,12 +463,12 @@ vgasetfontattr(struct vgafontattr *data)
if(adaptor_type == EGA_ADAPTOR)
/* ...and screen height to scan 350 lines */
- vgacs[vga_character_set].scr_scanlines =
+ vgacs[vga_character_set].scr_scanlines =
(data->screen_scanlines > 0x5d) ?
0x5d : data->screen_scanlines;
else
/* ...and screen height to scan 480 lines */
- vgacs[vga_character_set].scr_scanlines =
+ vgacs[vga_character_set].scr_scanlines =
(data->screen_scanlines > 0xdF) ?
0xdF : data->screen_scanlines;
@@ -517,7 +517,7 @@ vgasetfontattr(struct vgafontattr *data)
else
size = SIZ_25ROWS;
break;
-
+
case SIZ_40ROWS:
if(totscanlines/lines_per_character >= 40)
size = SIZ_40ROWS;
@@ -540,9 +540,9 @@ vgasetfontattr(struct vgafontattr *data)
break;
}
}
-
+
vgacs[vga_character_set].screen_size = size;
-
+
for (i = 0;i < PCVT_NSCREENS;i++)
{
if(vga_character_set == vs[i].vga_charset)
@@ -564,7 +564,7 @@ static void
vgagetfontattr(struct vgafontattr *data)
{
int vga_character_set;
-
+
vga_character_set = data->character_set;
vga_character_set = (vga_character_set < 0) ? 0 :
((vga_character_set < (int)totalfonts) ?
@@ -593,7 +593,7 @@ vgaloadchar(struct vgaloadchar *data)
int vga_character_set;
int character;
int lines_per_character;
-
+
vga_character_set = data->character_set;
vga_character_set = (vga_character_set < 0) ? 0 :
((vga_character_set < (int)totalfonts) ?
@@ -630,7 +630,7 @@ vid_getscreen(struct screeninfo *data, Dev_t dev)
data->vga_family = vga_family; /* manufacturer, family */
data->vga_type = vga_type; /* detected chipset type */
data->vga_132 = can_do_132col; /* 132 column support */
- data->force_24lines = vs[device].force24; /* force 24 lines */
+ data->force_24lines = vs[device].force24; /* force 24 lines */
}
/*---------------------------------------------------------------------------*
@@ -640,7 +640,7 @@ static void
vid_setscreen(struct screeninfo *data, Dev_t dev)
{
int screen;
-
+
if(data->current_screen == -1)
{
screen = minor(dev);
@@ -673,7 +673,7 @@ vid_setscreen(struct screeninfo *data, Dev_t dev)
if(data->screen_size == -1)
data->screen_size =
vgacs[(vs[screen].vga_charset)].screen_size;
-
+
if(data->force_24lines != -1)
{
vs[screen].force24 = data->force_24lines;
@@ -689,7 +689,7 @@ vid_setscreen(struct screeninfo *data, Dev_t dev)
&vs[screen]);
}
}
-
+
if((data->screen_size == SIZ_25ROWS) ||
(data->screen_size == SIZ_28ROWS) ||
(data->screen_size == SIZ_35ROWS) ||
@@ -697,7 +697,7 @@ vid_setscreen(struct screeninfo *data, Dev_t dev)
(data->screen_size == SIZ_43ROWS) ||
(data->screen_size == SIZ_50ROWS))
{
- if(data->screen_no == -1)
+ if(data->screen_no == -1)
set_screen_size(vsp, data->screen_size);
else
set_screen_size(&vs[minor(dev)],
@@ -710,7 +710,7 @@ vid_setscreen(struct screeninfo *data, Dev_t dev)
if((data->pure_vt_mode == M_HPVT) ||
(data->pure_vt_mode == M_PUREVT))
{
- if(data->screen_no == -1)
+ if(data->screen_no == -1)
set_emulation_mode(vsp, data->pure_vt_mode);
else
set_emulation_mode(&vs[minor(dev)],
@@ -718,7 +718,7 @@ vid_setscreen(struct screeninfo *data, Dev_t dev)
}
}
}
-
+
/*---------------------------------------------------------------------------*
* set screen size/resolution for a virtual screen
*---------------------------------------------------------------------------*/
@@ -760,14 +760,14 @@ set_screen_size(struct video_state *svsp, int size)
sw_ufkl(svsp);
}
-
+
svsp->scrr_len = svsp->screen_rows;
svsp->scrr_end = svsp->scrr_len - 1;
#if PCVT_SIGWINCH
if (svsp->vs_tty && svsp->vs_tty->t_pgrp)
pgsignal(svsp->vs_tty->t_pgrp, SIGWINCH, 1);
-#endif /* PCVT_SIGWINCH */
+#endif /* PCVT_SIGWINCH */
break;
}
@@ -870,7 +870,7 @@ vgapaletteio(unsigned idx, struct rgb *val, int writeit)
val->b = inb(VGA_DAC + 3) & VGA_PMSK;
}
-#if PCVT_PALFLICKER
+#if PCVT_PALFLICKER
vga_screen_on();
#endif /* PCVT_PALFLICKER */
@@ -914,7 +914,7 @@ async_update(int arg)
{
goto async_update_exit; /* do not update anything */
}
-
+
#if PCVT_SCREENSAVER
if(reset_screen_saver && (counter == PCVT_UPDATESLOW))
{
@@ -947,7 +947,7 @@ async_update(int arg)
if(--counter) /* below is possible update */
goto async_update_exit; /* just now and then ..... */
counter = PCVT_UPDATESLOW; /* caution, see screensaver above !! */
-
+
/*-------------------------------------------------------------------*/
/* this takes place ONLY on screen 0 if in HP mode, labels on, !X */
/*-------------------------------------------------------------------*/
@@ -963,7 +963,7 @@ async_update(int arg)
extern u_char rawkeybuf[80];
if(keyboard_show)
- {
+ {
for(i = 0; i < 80; i++)
{
*((vs[0].Crtat+((vs[0].screen_rows+2)
@@ -980,9 +980,9 @@ async_update(int arg)
#ifdef NEW_AVERUNNABLE
tmp = (averunnable.ldavg[0] * 100 + FSCALE / 2)
>> FSHIFT;
-#else
+#else
tmp = (averunnable[0] * 100 + FSCALE / 2) >> FSHIFT;
-#endif
+#endif
buffer[i++] =
((((tmp/100)/10) == 0) ?
@@ -996,9 +996,9 @@ async_update(int arg)
#ifdef NEW_AVERUNNABLE
tmp = (averunnable.ldavg[1] * 100 + FSCALE / 2)
>> FSHIFT;
-#else
+#else
tmp = (averunnable[1] * 100 + FSCALE / 2) >> FSHIFT;
-#endif
+#endif
buffer[i++] = ((((tmp/100)/10) == 0) ?
' ' :
((tmp/100)/10) + '0');
@@ -1010,9 +1010,9 @@ async_update(int arg)
#ifdef NEW_AVERUNNABLE
tmp = (averunnable.ldavg[2] * 100 + FSCALE / 2)
>> FSHIFT;
-#else
+#else
tmp = (averunnable[2] * 100 + FSCALE / 2) >> FSHIFT;
-#endif
+#endif
buffer[i++] = ((((tmp/100)/10) == 0) ?
' ' :
((tmp/100)/10) + '0');
@@ -1021,7 +1021,7 @@ async_update(int arg)
buffer[i++] = ((tmp%100)/10) + '0';
buffer[i++] = ((tmp%100)%10) + '0';
buffer[i] = '\0';
-
+
for(i = 0; buffer[i]; i++)
{
*((vs[0].Crtat +
@@ -1029,7 +1029,7 @@ async_update(int arg)
) + i
) = user_attr | buffer[i];
}
-
+
#if PCVT_SHOWKEYS
for(; i < 77; i++)
{
@@ -1038,7 +1038,7 @@ async_update(int arg)
) + i
) = user_attr | ' ';
}
-
+
}
#endif /* PCVT_SHOWKEYS */
}
@@ -1058,7 +1058,7 @@ async_update(int arg)
if(vsp->maxcol == SCR_COL132)
{
p += (SCR_COL132 - SCR_COL80)/2;
-
+
if(col >= 100)
{
*(p + LABEL_COLU) = user_attr | '1';
@@ -1068,12 +1068,12 @@ async_update(int arg)
{
*(p + LABEL_COLU) = user_attr | '0';
}
- }
+ }
*(p + LABEL_COLH) = user_attr | ((col/10) + '0');
*(p + LABEL_COLL) = user_attr | ((col%10) + '0');
/* update row display between labels */
-
+
*(p + LABEL_ROWH) = (user_attr | (((vsp->row+1)/10) + '0'));
*(p + LABEL_ROWL) = (user_attr | (((vsp->row+1)%10) + '0'));
}
@@ -1085,7 +1085,7 @@ async_update_exit:
timeout((TIMEOUT_FUNC_T)async_update, UPDATE_START, PCVT_UPDATEFAST);
}
}
-
+
/*---------------------------------------------------------------------------*
* set character set for virtual screen
*---------------------------------------------------------------------------*/
@@ -1112,7 +1112,7 @@ set_charset(struct video_state *svsp, int curvgacs)
newrows = 24;
if (newrows < oldrows) {
int nscroll = svsp->row + 1 - newrows;
-
+
if (svsp->row >= oldrows) /* Sanity check */
nscroll = oldrows - newrows;
if (nscroll > 0) {
@@ -1140,7 +1140,7 @@ set_charset(struct video_state *svsp, int curvgacs)
svsp->scrr_end = svsp->screen_rows - 1;
svsp->scrr_len = svsp->scrr_end - svsp->scrr_beg + 1;
- /* Clip cursor pos */
+ /* Clip cursor pos */
if(svsp->cur_offset > (svsp->scrr_len * svsp->maxcol))
svsp->cur_offset = (svsp->scrr_len * svsp->maxcol) + svsp->col;
@@ -1178,7 +1178,7 @@ select_vga_charset(int vga_charset)
used for the upper 256 entries of a complete 512 entry ega/
vga charset.
--------------------------------------------------------------*/
-
+
for(first = 0; first < totalfonts; first++)
{
if(!vgacs[first].loaded)
@@ -1220,7 +1220,7 @@ select_vga_charset(int vga_charset)
cmap |= cmaptabb[second];
vgacs[first].secondloaded = second;
}
- else
+ else
{
vgacs[first].secondloaded = 0; /*cs 0 can never become a 2nd!*/
}
@@ -1230,7 +1230,7 @@ select_vga_charset(int vga_charset)
cmap = (vga_charset & 0x07);
cmap |= 0x10;
}
-
+
outb(TS_INDEX, TS_FONTSEL); /* character map select register */
outb(TS_DATA, cmap); /* new char map */
@@ -1349,7 +1349,7 @@ resetchargen(void)
if(color)
outb(GDC_DATA, 0x0e); /* map starts at 0xb800 */
else
- outb(GDC_DATA, 0x0a); /* map starts at 0xb000 */
+ outb(GDC_DATA, 0x0a); /* map starts at 0xb000 */
chargen_access = 0; /* flag we are NOT accessing the chargen ram */
}
@@ -1385,12 +1385,12 @@ vga_screen_off(void)
{
unsigned char old;
- outb(TS_INDEX, TS_SYNCRESET);
+ outb(TS_INDEX, TS_SYNCRESET);
outb(TS_DATA, 0x01); /* synchronous reset */
outb(TS_INDEX, TS_MODE); /* clocking mode reg */
old = inb(TS_DATA); /* get current value */
-
+
outb(TS_INDEX, TS_MODE); /* clocking mode reg */
outb(TS_DATA, (old | 0x20)); /* screen off bit on */
@@ -1406,12 +1406,12 @@ vga_screen_on(void)
{
unsigned char old;
- outb(TS_INDEX, TS_SYNCRESET);
+ outb(TS_INDEX, TS_SYNCRESET);
outb(TS_DATA, 0x01); /* synchronous reset */
outb(TS_INDEX, TS_MODE); /* clocking mode reg */
old = inb(TS_DATA); /* get current value */
-
+
outb(TS_INDEX, TS_MODE); /* clocking mode reg */
outb(TS_DATA, (old & ~0x20)); /* screen off bit off */
@@ -1438,20 +1438,20 @@ compute_charset_base(unsigned fontset)
case EGA_ADAPTOR:
fontset = (fontset > 3) ? 3 : fontset;
break;
-
+
case VGA_ADAPTOR:
fontset = (fontset > 7) ? 7 : fontset;
break;
-
+
default:
return 0;
}
-
+
if(color)
d -= (0xB8000 - 0xA0000); /* Point to 0xA0000 */
else
d -= (0xB0000 - 0xA0000); /* Point to 0xA0000 */
-
+
if(vsp->wd132col)
d += charsetw_offset[fontset]; /* Load into Character set n */
else
@@ -1521,7 +1521,7 @@ loadchar(int fontset, int character, int char_scanlines, u_char *char_table)
}
/*---------------------------------------------------------------------------*
- * save/restore character set n to addr b
+ * save/restore character set n to addr b
*---------------------------------------------------------------------------*/
#if !PCVT_BACKUP_FONTS
@@ -1616,9 +1616,9 @@ vgapage(int n)
#if !PCVT_KBD_FIFO
int x;
#endif /* !PCVT_KBD_FIFO */
-
+
int cols = vsp->maxcol; /* get current col val */
-
+
if(n < 0 || n >= totalscreens)
return;
@@ -1660,12 +1660,12 @@ vgapage(int n)
#if !PCVT_KBD_FIFO
splx(x);
#endif /* !PCVT_KBD_FIFO */
-
+
select_vga_charset(vsp->vga_charset);
if(vsp->maxcol != cols)
vga_col(vsp, vsp->maxcol); /* select 80/132 columns */
-
+
outb(addr_6845, CRTC_CURSORH); /* select high register */
outb(addr_6845+1, vsp->cur_offset >> 8);
outb(addr_6845, CRTC_CURSORL); /* select low register */
@@ -1688,7 +1688,7 @@ vgapage(int n)
unsigned i;
/* switch VGA DAC palette entries */
-
+
for(i = 0; i < NVGAPEL; i++)
vgapaletteio(i, &vsp->palette[i], 1);
}
@@ -1707,7 +1707,7 @@ int
vga_test(void)
{
u_char old, new, check;
-
+
outb(addr_6845,CRTC_CURSTART); /* cursor start reg */
old = inb(addr_6845+1); /* get current value */
@@ -1743,7 +1743,7 @@ vga_test(void)
outb(addr_6845,CRTC_CURSTART); /* cursor start reg */
outb(addr_6845+1,old); /* failsafe */
-
+
return(1); /* vga */
}
@@ -1756,9 +1756,9 @@ sixel_vga(struct sixels *sixelp, u_char *vgachar)
register int i, j;
register int shift;
register u_char mask;
-
+
for(j = 0; j < 16; j++)
- vgachar[j] = 0;
+ vgachar[j] = 0;
mask = 0x01;
for(j = 0; j < 6; j++)
@@ -1791,7 +1791,7 @@ vga10_vga16(u_char *invga, u_char *outvga)
* Keep the top and bottom scanlines the same and double every scan
* line in between.
*/
-
+
outvga[0] = invga[0];
outvga[1] = invga[1];
outvga[14] = invga[8];
@@ -1816,7 +1816,7 @@ vga10_vga14(u_char *invga, u_char *outvga)
* Double the top two and bottom two scanlines and copy everything
* in between.
*/
-
+
outvga[0] = invga[0];
outvga[1] = invga[0];
outvga[2] = invga[1];
@@ -1894,7 +1894,7 @@ set_2ndcharset(void)
inb(GN_INPSTAT1M);
/* select color plane enable reg, caution: set ATC access bit ! */
-
+
outb(ATC_INDEX, (ATC_COLPLEN | ATC_ACCESS));
outb(ATC_DATAW, 0x07); /* disable plane 3 */
}
@@ -2046,7 +2046,7 @@ scrnsv_timedout(void *arg)
/* second call, now blank the screen */
/* fill screen with blanks */
fillw(/* (BLACK<<8) + */ ' ', vsp->Crtat, scrnsv_size / 2);
-
+
#if PCVT_PRETTYSCRNS
scrnsv_current = vsp->Crtat;
timeout((TIMEOUT_FUNC_T)scrnsv_blink, NULL, hz);
@@ -2112,7 +2112,7 @@ pcvt_scrnsv_reset(void)
}
splx(x);
}
-
+
#endif /* PCVT_SCREENSAVER */
/*---------------------------------------------------------------------------*
@@ -2132,15 +2132,15 @@ sw_cursor(int onoff)
else
{
int cs = vs[current_video_screen].vga_charset;
-
+
cs = (cs < 0) ? 0 : ((cs < totalfonts) ?
cs : totalfonts-1);
-
+
start = (vgacs[cs].char_scanlines & 0x1F) + 1;
end = 0;
}
outb(addr_6845,CRTC_CURSTART); /* cursor start reg */
- outb(addr_6845+1, start);
+ outb(addr_6845+1, start);
outb(addr_6845,CRTC_CUREND); /* cursor end reg */
outb(addr_6845+1, end);
}
diff --git a/sys/i386/isa/pcvt/pcvt_tbl.h b/sys/i386/isa/pcvt/pcvt_tbl.h
index 193d379..4384afd 100644
--- a/sys/i386/isa/pcvt/pcvt_tbl.h
+++ b/sys/i386/isa/pcvt/pcvt_tbl.h
@@ -71,7 +71,7 @@
/*===========================================================================*
* DEFAULT TABLES FOR MDA/HCG/CGA
*===========================================================================*/
-
+
/*---------------------------------------------------------------------------*
* ASCII Characterset
*---------------------------------------------------------------------------*/
diff --git a/sys/i386/isa/pcvt/pcvt_vtf.c b/sys/i386/isa/pcvt/pcvt_vtf.c
index 4f7317f..6dddd5d 100644
--- a/sys/i386/isa/pcvt/pcvt_vtf.c
+++ b/sys/i386/isa/pcvt/pcvt_vtf.c
@@ -81,7 +81,7 @@ void
vt_stbm(struct video_state *svsp)
{
/* both 0 => scrolling region = entire screen */
-
+
if((svsp->parms[0] == 0) && (svsp->parms[1] == 0))
{
svsp->cur_offset = 0;
@@ -96,14 +96,14 @@ vt_stbm(struct video_state *svsp)
return;
/* range parm 1 */
-
+
if(svsp->parms[0] < 1)
svsp->parms[0] = 1;
else if(svsp->parms[0] > svsp->screen_rows-1)
svsp->parms[0] = svsp->screen_rows-1;
/* range parm 2 */
-
+
if(svsp->parms[1] < 2)
svsp->parms[1] = 2;
else if(svsp->parms[1] > svsp->screen_rows)
@@ -115,10 +115,10 @@ vt_stbm(struct video_state *svsp)
/* cursor to first pos */
if(svsp->m_om)
- svsp->cur_offset = svsp->scrr_beg * svsp->maxcol;
+ svsp->cur_offset = svsp->scrr_beg * svsp->maxcol;
else
svsp->cur_offset = 0;
-
+
svsp->col = 0;
}
@@ -131,7 +131,7 @@ vt_sgr(struct video_state *svsp)
register int i = 0;
u_short setcolor = 0;
char colortouched = 0;
-
+
do
{
switch(svsp->parms[i++])
@@ -143,15 +143,15 @@ vt_sgr(struct video_state *svsp)
case 1: /* bold */
svsp->vtsgr |= VT_BOLD;
break;
-
+
case 4: /* underline */
svsp->vtsgr |= VT_UNDER;
break;
-
+
case 5: /* blinking */
svsp->vtsgr |= VT_BLINK;
break;
-
+
case 7: /* reverse */
svsp->vtsgr |= VT_INVERSE;
break;
@@ -159,19 +159,19 @@ vt_sgr(struct video_state *svsp)
case 22: /* not bold */
svsp->vtsgr &= ~VT_BOLD;
break;
-
+
case 24: /* not underlined */
svsp->vtsgr &= ~VT_UNDER;
break;
-
+
case 25: /* not blinking */
svsp->vtsgr &= ~VT_BLINK;
break;
-
+
case 27: /* not reverse */
svsp->vtsgr &= ~VT_INVERSE;
break;
-
+
case 30: /* foreground colors */
case 31:
case 32:
@@ -186,7 +186,7 @@ vt_sgr(struct video_state *svsp)
setcolor |= ((fgansitopc[(svsp->parms[i-1]-30) & 7]) << 8);
}
break;
-
+
case 40: /* background colors */
case 41:
case 42:
@@ -246,7 +246,7 @@ void
vt_cud(struct video_state *svsp)
{
register int p = svsp->parms[0];
-
+
if (p <= 0)
p = 1;
@@ -254,7 +254,7 @@ vt_cud(struct video_state *svsp)
if (p <= 0)
return;
-
+
svsp->cur_offset += (svsp->maxcol * p);
}
@@ -264,19 +264,19 @@ vt_cud(struct video_state *svsp)
void
vt_cuf(struct video_state *svsp)
{
- register int p = svsp->parms[0];
+ register int p = svsp->parms[0];
if(svsp->col == ((svsp->maxcol)-1)) /* already at right margin */
return;
-
+
if(p <= 0) /* parameter min = 1 */
p = 1;
else if(p > ((svsp->maxcol)-1)) /* parameter max = 79 */
p = ((svsp->maxcol)-1);
-
+
if((svsp->col + p) > ((svsp->maxcol)-1))/* not more than right margin */
p = ((svsp->maxcol)-1) - svsp->col;
-
+
svsp->cur_offset += p;
svsp->col += p;
}
@@ -287,11 +287,11 @@ vt_cuf(struct video_state *svsp)
void
vt_cub(struct video_state *svsp)
{
- register int p = svsp->parms[0];
+ register int p = svsp->parms[0];
if(svsp->col == 0) /* already at left margin ? */
return;
-
+
if(p <= 0) /* parameter min = 1 */
p = 1;
else if(p > ((svsp->maxcol)-1)) /* parameter max = 79 */
@@ -325,7 +325,7 @@ vt_clreos(struct video_state *svsp)
svsp->Crtat + 1 );
break;
- case 2:
+ case 2:
fillw(user_attr | ' ', svsp->Crtat,
svsp->maxcol * svsp->screen_rows);
break;
@@ -368,24 +368,24 @@ vt_curadr(struct video_state *svsp)
{
if(svsp->m_om) /* relative to scrolling region */
{
- if((svsp->parms[0] == 0) && (svsp->parms[1] == 0))
+ if((svsp->parms[0] == 0) && (svsp->parms[1] == 0))
{
svsp->cur_offset = svsp->scrr_beg * svsp->maxcol;
svsp->col = 0;
svsp->abs_write = 0;
return;
}
-
+
if(svsp->parms[0] <= 0)
svsp->parms[0] = 1;
else if(svsp->parms[0] > svsp->scrr_len)
svsp->parms[0] = svsp->scrr_len;
-
+
if(svsp->parms[1] <= 0 )
svsp->parms[1] = 1;
if(svsp->parms[1] > svsp->maxcol)
svsp->parms[1] = svsp->maxcol;
-
+
svsp->cur_offset = (svsp->scrr_beg * svsp->maxcol) +
((svsp->parms[0] - 1) * svsp->maxcol) +
svsp->parms[1] - 1;
@@ -394,24 +394,24 @@ vt_curadr(struct video_state *svsp)
}
else /* relative to screen start */
{
- if((svsp->parms[0] == 0) && (svsp->parms[1] == 0))
+ if((svsp->parms[0] == 0) && (svsp->parms[1] == 0))
{
svsp->cur_offset = 0;
svsp->col = 0;
svsp->abs_write = 0;
return;
}
-
+
if(svsp->parms[0] <= 0)
svsp->parms[0] = 1;
else if(svsp->parms[0] > svsp->screen_rows)
svsp->parms[0] = svsp->screen_rows;
-
+
if(svsp->parms[1] <= 0 )
svsp->parms[1] = 1;
if(svsp->parms[1] > svsp->maxcol) /* col */
svsp->parms[1] = svsp->maxcol;
-
+
svsp->cur_offset = (((svsp->parms[0]-1)*svsp->maxcol) +
(svsp->parms[1]-1));
svsp->col = svsp->parms[1]-1;
@@ -434,7 +434,7 @@ vt_ris(struct video_state *svsp)
fillw(user_attr | ' ', svsp->Crtat, svsp->maxcol * svsp->screen_rows);
svsp->cur_offset = 0; /* cursor upper left corner */
svsp->col = 0;
- svsp->row = 0;
+ svsp->row = 0;
svsp->lnm = 0; /* CR only */
clear_dld(svsp); /* clear download charset */
vt_clearudk(svsp); /* clear user defined keys */
@@ -445,16 +445,16 @@ vt_ris(struct video_state *svsp)
/*---------------------------------------------------------------------------*
* DECSTR - soft terminal reset (SOFT emulator runtime reset)
*---------------------------------------------------------------------------*/
-void
+void
vt_str(struct video_state *svsp)
{
int i;
-
+
clr_parms(svsp); /* escape parameter init */
svsp->state = STATE_INIT; /* initial state */
svsp->dis_fnc = 0; /* display functions reset */
-
+
svsp->sc_flag = 0; /* save cursor position */
svsp->transparent = 0; /* enable control code processing */
@@ -477,7 +477,7 @@ vt_str(struct video_state *svsp)
#endif
svsp->scroll_lock = 0; /* reset keyboard modes */
- svsp->caps_lock = 0;
+ svsp->caps_lock = 0;
svsp->ckm = 1; /* cursor key mode = "normal" ... */
svsp->scrr_beg = 0; /* start of scrolling region */
@@ -511,7 +511,7 @@ vt_str(struct video_state *svsp)
vt_initsel(svsp);
init_ufkl(svsp); /* init user fkey labels */
- init_sfkl(svsp); /* init system fkey labels */
+ init_sfkl(svsp); /* init system fkey labels */
update_led(); /* update keyboard LED's */
}
@@ -519,7 +519,7 @@ vt_str(struct video_state *svsp)
/*---------------------------------------------------------------------------*
* RI - reverse index, move cursor up
*---------------------------------------------------------------------------*/
-void
+void
vt_ri(struct video_state *svsp)
{
if(svsp->cur_offset >= ((svsp->scrr_beg * svsp->maxcol) + svsp->maxcol))
@@ -545,7 +545,7 @@ vt_ind(struct video_state *svsp)
*---------------------------------------------------------------------------*/
void
vt_nel(struct video_state *svsp)
-{
+{
if(svsp->cur_offset < (svsp->scrr_end * svsp->maxcol))
{
svsp->cur_offset += (svsp->maxcol-svsp->col);
@@ -574,15 +574,15 @@ vt_set_dec_priv_qm(struct video_state *svsp)
case 2: /* ANM - ansi/vt52 mode */
break;
-
+
case 3: /* COLM - column mode */
vt_col(svsp, SCR_COL132);
break;
-
+
case 4: /* SCLM - scrolling mode */
case 5: /* SCNM - screen mode */
break;
-
+
case 6: /* OM - origin mode */
svsp->m_om = 1;
break;
@@ -595,7 +595,7 @@ vt_set_dec_priv_qm(struct video_state *svsp)
case 8: /* ARM - auto repeat mode */
kbrepflag = 1;
break;
-
+
case 9: /* INLM - interlace mode */
case 10: /* EDM - edit mode */
case 11: /* LTM - line transmit mode */
@@ -611,7 +611,7 @@ vt_set_dec_priv_qm(struct video_state *svsp)
sw_cursor(1); /* cursor on */
svsp->cursor_on = 1;
break;
-
+
case 42: /* NRCM - 7bit NRC characters */
break;
}
@@ -632,7 +632,7 @@ vt_reset_dec_priv_qm(struct video_state *svsp)
case 2: /* ANM - ansi/vt52 mode */
break;
-
+
case 3: /* COLM - column mode */
vt_col(svsp, SCR_COL80);
break;
@@ -640,7 +640,7 @@ vt_reset_dec_priv_qm(struct video_state *svsp)
case 4: /* SCLM - scrolling mode */
case 5: /* SCNM - screen mode */
break;
-
+
case 6: /* OM - origin mode */
svsp->m_om = 0;
break;
@@ -653,7 +653,7 @@ vt_reset_dec_priv_qm(struct video_state *svsp)
case 8: /* ARM - auto repeat mode */
kbrepflag = 0;
break;
-
+
case 9: /* INLM - interlace mode */
case 10: /* EDM - edit mode */
case 11: /* LTM - line transmit mode */
@@ -669,7 +669,7 @@ vt_reset_dec_priv_qm(struct video_state *svsp)
sw_cursor(0); /* cursor off */
svsp->cursor_on = 0;
break;
-
+
case 42: /* NRCM - 7bit NRC characters */
break;
}
@@ -688,7 +688,7 @@ vt_set_ansi(struct video_state *svsp)
case 2: /* KAM - keyboard action mode */
case 3: /* CRM - Control Representation mode */
break;
-
+
case 4: /* IRM - insert replacement mode */
svsp->irm = 1; /* Insert mode */
break;
@@ -707,7 +707,7 @@ vt_set_ansi(struct video_state *svsp)
case 18: /* TSM - tabulation stop mode */
case 19: /* EBM - editing boundary mode */
break;
-
+
case 20: /* LNM - line feed / newline mode */
svsp->lnm = 1;
break;
@@ -727,11 +727,11 @@ vt_reset_ansi(struct video_state *svsp)
case 2: /* KAM - keyboard action mode */
case 3: /* CRM - Control Representation mode */
break;
-
+
case 4: /* IRM - insert replacement mode */
svsp->irm = 0; /* Replace mode */
break;
-
+
case 5: /* SRTM - status report transfer mode */
case 6: /* ERM - erasue mode */
case 7: /* VEM - vertical editing mode */
@@ -746,7 +746,7 @@ vt_reset_ansi(struct video_state *svsp)
case 18: /* TSM - tabulation stop mode */
case 19: /* EBM - editing boundary mode */
break;
-
+
case 20: /* LNM - line feed / newline mode */
svsp->lnm = 0;
break;
@@ -756,7 +756,7 @@ vt_reset_ansi(struct video_state *svsp)
/*---------------------------------------------------------------------------*
* clear tab stop(s)
*---------------------------------------------------------------------------*/
-void
+void
vt_clrtab(struct video_state *svsp)
{
int i;
@@ -785,10 +785,10 @@ vt_sc(struct video_state *svsp)
svsp->sc_om = svsp->m_om;
svsp->sc_G0 = svsp->G0;
svsp->sc_G1 = svsp->G1;
- svsp->sc_G2 = svsp->G2;
+ svsp->sc_G2 = svsp->G2;
svsp->sc_G3 = svsp->G3;
svsp->sc_GL = svsp->GL;
- svsp->sc_GR = svsp->GR;
+ svsp->sc_GR = svsp->GR;
svsp->sc_sel = svsp->selchar;
svsp->sc_vtsgr = svsp->vtsgr;
}
@@ -827,7 +827,7 @@ vt_designate(struct video_state *svsp)
{
u_short *ctp = NULL;
u_char ch;
-
+
if(svsp->whichi == 1)
ch = svsp->which[0];
else
@@ -836,7 +836,7 @@ vt_designate(struct video_state *svsp)
if(svsp->dld_id[0] == '\0')
return;
-
+
if(!(((adaptor_type == EGA_ADAPTOR) ||
(adaptor_type == VGA_ADAPTOR)) &&
(vgacs[svsp->vga_charset].secondloaded)))
@@ -852,10 +852,10 @@ vt_designate(struct video_state *svsp)
#ifdef HAVECSE_DOWNLOADABLE
ctp = cse_downloadable;
swcsp(svsp, ctp);
-#endif
+#endif
return;
}
-
+
if(((adaptor_type == EGA_ADAPTOR) || (adaptor_type == VGA_ADAPTOR)) &&
(vgacs[svsp->vga_charset].secondloaded))
{
@@ -864,10 +864,10 @@ vt_designate(struct video_state *svsp)
#ifdef HAVECSE_DOWNLOADABLE
ctp = cse_downloadable;
swcsp(svsp, ctp);
-#endif
+#endif
return;
}
-
+
switch(ch)
{
case 'A': /* British or ISO-Latin-1 */
@@ -881,7 +881,7 @@ vt_designate(struct video_state *svsp)
ctp = cse_british;
#endif
break;
-
+
case STATE_MINUS: /* designate G1 (96)*/
case STATE_DOT: /* designate G2 (96)*/
case STATE_SLASH: /* designate G3 (96)*/
@@ -891,11 +891,11 @@ vt_designate(struct video_state *svsp)
break;
}
break;
-
+
case 'B': /* USASCII */
#ifdef HAVECSE_ASCII
ctp = cse_ascii;
-#endif
+#endif
break;
case 'C': /* Finnish */
@@ -916,87 +916,87 @@ vt_designate(struct video_state *svsp)
case '7': /* Swedish */
#ifdef HAVECSE_SWEDISH
ctp = cse_swedish;
-#endif
+#endif
break;
-
+
case 'K': /* German */
#ifdef HAVECSE_GERMAN
ctp = cse_german;
-#endif
+#endif
break;
-
+
case 'Q': /* French Canadien */
#ifdef HAVECSE_FRENCHCANADA
ctp = cse_frenchcanada;
-#endif
+#endif
break;
case 'R': /* French */
#ifdef HAVECSE_FRENCH
ctp = cse_french;
-#endif
+#endif
break;
case 'Y': /* Italian */
#ifdef HAVECSE_ITALIAN
ctp = cse_italian;
-#endif
+#endif
break;
case 'Z': /* Spanish */
#ifdef HAVECSE_SPANISH
ctp = cse_spanish;
-#endif
+#endif
break;
-
+
case '0': /* special graphics */
#ifdef HAVECSE_SPECIAL
ctp = cse_special;
-#endif
+#endif
break;
case '1': /* alternate ROM */
#ifdef HAVECSE_ALTERNATEROM1
ctp = cse_alternaterom1;
-#endif
+#endif
break;
case '2': /* alt ROM, spec graphics */
#ifdef HAVECSE_ALTERNATEROM2
ctp = cse_alternaterom2;
-#endif
+#endif
break;
case '3': /* HP Roman 8, upper 128 chars*/
#ifdef HAVECSE_ROMAN8
ctp = cse_roman8;
-#endif
+#endif
break;
case '4': /* Dutch */
#ifdef HAVECSE_DUTCH
ctp = cse_dutch;
-#endif
+#endif
break;
case '<': /* DEC Supplemental */
#ifdef HAVECSE_SUPPLEMENTAL
ctp = cse_supplemental;
-#endif
+#endif
break;
case '=': /* Swiss */
#ifdef HAVECSE_SWISS
ctp = cse_swiss;
-#endif
+#endif
break;
case '>': /* DEC Technical */
#ifdef HAVECSE_TECHNICAL
ctp = cse_technical;
-#endif
+#endif
break;
-
+
default:
break;
}
@@ -1016,7 +1016,7 @@ vt_designate(struct video_state *svsp)
ctp = csd_british;
#endif
break;
-
+
case STATE_MINUS: /* designate G1 (96)*/
case STATE_DOT: /* designate G2 (96)*/
case STATE_SLASH: /* designate G3 (96)*/
@@ -1026,11 +1026,11 @@ vt_designate(struct video_state *svsp)
break;
}
break;
-
+
case 'B': /* USASCII */
#ifdef HAVECSD_ASCII
ctp = csd_ascii;
-#endif
+#endif
break;
case 'C': /* Finnish */
@@ -1051,94 +1051,94 @@ vt_designate(struct video_state *svsp)
case '7': /* Swedish */
#ifdef HAVECSD_SWEDISH
ctp = csd_swedish;
-#endif
+#endif
break;
-
+
case 'K': /* German */
#ifdef HAVECSD_GERMAN
ctp = csd_german;
-#endif
+#endif
break;
-
+
case 'Q': /* French Canadien */
#ifdef HAVECSD_FRENCHCANADA
ctp = csd_frenchcanada;
-#endif
+#endif
break;
case 'R': /* French */
#ifdef HAVECSD_FRENCH
ctp = csd_french;
-#endif
+#endif
break;
case 'Y': /* Italian */
#ifdef HAVECSD_ITALIAN
ctp = csd_italian;
-#endif
+#endif
break;
case 'Z': /* Spanish */
#ifdef HAVECSD_SPANISH
ctp = csd_spanish;
-#endif
+#endif
break;
-
+
case '0': /* special graphics */
#ifdef HAVECSD_SPECIAL
ctp = csd_special;
-#endif
+#endif
break;
case '1': /* alternate ROM */
#ifdef HAVECSD_ALTERNATEROM1
ctp = csd_alternaterom1;
-#endif
+#endif
break;
case '2': /* alt ROM, spec graphics */
#ifdef HAVECSD_ALTERNATEROM2
ctp = csd_alternaterom2;
-#endif
+#endif
break;
case '3': /* HP Roman 8, upper 128 chars*/
#ifdef HAVECSD_ROMAN8
ctp = csd_roman8;
-#endif
+#endif
break;
case '4': /* Dutch */
#ifdef HAVECSD_DUTCH
ctp = csd_dutch;
-#endif
+#endif
break;
case '<': /* DEC Supplemental */
#ifdef HAVECSD_SUPPLEMENTAL
ctp = csd_supplemental;
-#endif
+#endif
break;
case '=': /* Swiss */
#ifdef HAVECSD_SWISS
ctp = csd_swiss;
-#endif
+#endif
break;
case '>': /* DEC Technical */
#ifdef HAVECSD_TECHNICAL
ctp = csd_technical;
-#endif
+#endif
break;
-
+
default:
break;
}
}
swcsp(svsp, ctp);
}
-
+
/*---------------------------------------------------------------------------*
* device attributes
*---------------------------------------------------------------------------*/
@@ -1146,7 +1146,7 @@ void
vt_da(struct video_state *svsp)
{
static u_char *response = (u_char *)DA_VT220;
-
+
svsp->report_chars = response;
svsp->report_count = 18;
respond(svsp);
@@ -1173,13 +1173,13 @@ vt_aln(struct video_state *svsp)
svsp->cur_offset = 0; /* reset everything ! */
svsp->col = 0;
- svsp->row = 0;
+ svsp->row = 0;
}
/*---------------------------------------------------------------------------*
* request terminal parameters
*---------------------------------------------------------------------------*/
-void
+void
vt_reqtparm(struct video_state *svsp)
{
static u_char *answr = (u_char *)"\033[3;1;1;120;120;1;0x";
@@ -1210,7 +1210,7 @@ vt_dsr(struct video_state *svsp)
static u_char *langanswr = (u_char *)"\033[?27;1n"; /* North American*/
static u_char buffer[16];
int i = 0;
-
+
switch(svsp->parms[0])
{
case 5: /* return status */
@@ -1225,13 +1225,13 @@ vt_dsr(struct video_state *svsp)
if((svsp->row+1) > 10)
buffer[i++] = ((svsp->row+1) / 10) + '0';
buffer[i++] = ((svsp->row+1) % 10) + '0';
- buffer[i++] = ';';
+ buffer[i++] = ';';
if((svsp->col+1) > 10)
buffer[i++] = ((svsp->col+1) / 10) + '0';
buffer[i++] = ((svsp->col+1) % 10) + '0';
buffer[i++] = 'R';
buffer[i++] = '\0';
-
+
svsp->report_chars = buffer;
svsp->report_count = i;
respond(svsp);
@@ -1261,13 +1261,13 @@ vt_dsr(struct video_state *svsp)
}
/*---------------------------------------------------------------------------*
- * IL - insert line
+ * IL - insert line
*---------------------------------------------------------------------------*/
-void
+void
vt_il(struct video_state *svsp)
{
register int p = svsp->parms[0];
-
+
if((svsp->row >= svsp->scrr_beg) && (svsp->row <= svsp->scrr_end))
{
if(p <= 0)
@@ -1304,7 +1304,7 @@ vt_ic(struct video_state *svsp)
p = 1;
else if(p > svsp->maxcol-svsp->col)
p = svsp->maxcol-svsp->col;
-
+
while(p--)
{
bcopy((svsp->Crtat + svsp->cur_offset),
@@ -1323,7 +1323,7 @@ void
vt_dl(struct video_state *svsp)
{
register int p = svsp->parms[0];
-
+
if((svsp->row >= svsp->scrr_beg) && (svsp->row <= svsp->scrr_end))
{
if(p <= 0)
@@ -1346,7 +1346,7 @@ vt_dl(struct video_state *svsp)
svsp->Crtat + ((svsp->scrr_end-p+1) * svsp->maxcol),
p * svsp->maxcol);
}
- }
+ }
}
/*---------------------------------------------------------------------------*
@@ -1361,7 +1361,7 @@ vt_dch(struct video_state *svsp)
p = 1;
else if(p > svsp->maxcol-svsp->col)
p = svsp->maxcol-svsp->col;
-
+
while(p--)
{
bcopy((svsp->Crtat + svsp->cur_offset)+1,
@@ -1380,12 +1380,12 @@ void
vt_su(struct video_state *svsp)
{
register int p = svsp->parms[0];
-
+
if(p <= 0)
p = 1;
else if(p > svsp->screen_rows-1)
p = svsp->screen_rows-1;
-
+
roll_up(svsp, p);
}
@@ -1396,12 +1396,12 @@ void
vt_sd(struct video_state *svsp)
{
register int p = svsp->parms[0];
-
+
if(p <= 0)
p = 1;
else if(p > svsp->screen_rows-1)
p = svsp->screen_rows-1;
-
+
roll_down(svsp, p);
}
@@ -1417,7 +1417,7 @@ vt_ech(struct video_state *svsp)
p = 1;
else if(p > svsp->maxcol-svsp->col)
p = svsp->maxcol-svsp->col;
-
+
fillw(user_attr | ' ', (svsp->Crtat + svsp->cur_offset), p);
}
@@ -1457,9 +1457,9 @@ vt_dcsentry(U_char ch, struct video_state *svsp)
svsp->parms[svsp->parmi] *= 10;
svsp->parms[svsp->parmi] += (ch -'0');
break;
-
+
case ';': /* next parameter */
- svsp->parmi =
+ svsp->parmi =
(svsp->parmi+1 < MAXPARMS) ?
svsp->parmi+1 : svsp->parmi;
break;
@@ -1508,7 +1508,7 @@ vt_dcsentry(U_char ch, struct video_state *svsp)
case 0x1b: /* ESC */
svsp->dcs_state = DCS_UDK_ESC;
break;
-
+
default:
svsp->transparent = 0;
svsp->state = STATE_INIT;
@@ -1594,7 +1594,7 @@ vt_dcsentry(U_char ch, struct video_state *svsp)
case 0x1b: /* ESC */
svsp->dcs_state = DCS_UDK_ESC;
break;
-
+
default:
svsp->transparent = 0;
svsp->state = STATE_INIT;
@@ -1602,7 +1602,7 @@ vt_dcsentry(U_char ch, struct video_state *svsp)
break;
}
break;
-
+
case DCS_UDK_ESC: /* DCS ... | fkey/def ... ESC */
switch(ch)
{
@@ -1620,13 +1620,13 @@ vt_dcsentry(U_char ch, struct video_state *svsp)
break;
}
break;
-
+
case DCS_DLD_DSCS: /* got DCS ... { */
if(ch >= ' ' && ch <= '/') /* intermediates ... */
{
svsp->dld_dscs[svsp->dld_dscsi] = ch;
- svsp->dld_id[svsp->dld_dscsi] = ch;
+ svsp->dld_id[svsp->dld_dscsi] = ch;
if(svsp->dld_dscsi >= DSCS_LENGTH)
{
svsp->transparent = 0;
@@ -1661,16 +1661,16 @@ vt_dcsentry(U_char ch, struct video_state *svsp)
case 0x1b: /* ESC */
svsp->dcs_state = DCS_DLD_ESC;
break;
-
+
case '/': /* sixel upper / lower divider */
svsp->dld_sixel_lower = 1;
break;
-
+
case ';': /* character divider */
vt_dld(svsp);
svsp->parms[1]++; /* next char */
break;
-
+
default:
if (svsp->dld_sixel_lower)
{
@@ -1727,7 +1727,7 @@ vt_udk(struct video_state *svsp)
{
int key, start, max, i;
int usedff = 0;
-
+
if(svsp->parms[0] != 1) /* clear all ? */
{
vt_clearudk(svsp);
@@ -1741,7 +1741,7 @@ vt_udk(struct video_state *svsp)
}
key = svsp->udk_fnckey - 17; /* index into table */
-
+
if(svsp->ukt.length[key] == 0) /* never used ? */
{
if(svsp->udkff < MAXUDKDEF-2) /* space available ? */
@@ -1770,7 +1770,7 @@ vt_udk(struct video_state *svsp)
}
max--; /* adjust for tailing '\0' */
-
+
for(i = 0; i < max && i < svsp->udk_defi; i++)
svsp->udkbuf[start++] = svsp->udk_def[i];
@@ -1778,7 +1778,7 @@ vt_udk(struct video_state *svsp)
svsp->ukt.length[key] = i+1; /* count for tailing '\0' */
if(usedff)
svsp->udkff += (i+2); /* new start location */
-
+
init_udk(svsp);
}
@@ -1813,7 +1813,7 @@ vt_dld(struct video_state *svsp)
else
return;
- svsp->parms[1] = (svsp->parms[1] < 1) ? 1 :
+ svsp->parms[1] = (svsp->parms[1] < 1) ? 1 :
((svsp->parms[1] > 0x7E) ? 0x7E : svsp->parms[1]);
if(svsp->parms[2] != 1) /* Erase all characters ? */
@@ -1875,7 +1875,7 @@ void
vt_initsel(struct video_state *svsp)
{
register int i;
-
+
for(i = 0;i < MAXDECSCA;i++)
svsp->decsca[i] = 0;
}
@@ -1924,7 +1924,7 @@ vt_sed(struct video_state *svsp)
(svsp->Crtat + svsp->cur_offset) - svsp->Crtat + 1 );
break;
- case 2:
+ case 2:
selective_erase(svsp, svsp->Crtat,
svsp->maxcol * svsp->screen_rows);
break;
@@ -1973,7 +1973,7 @@ roll_up(struct video_state *svsp, int n)
if(vsp == svsp && !(vsp->vt_status & VT_GRAFX))
#else
if(vsp == svsp)
-#endif
+#endif
{
outb(addr_6845, CRTC_STARTADRH);
@@ -1989,7 +1989,7 @@ roll_up(struct video_state *svsp, int n)
svsp->Crtat + (svsp->scrr_beg * svsp->maxcol),
svsp->maxcol * (svsp->scrr_len - n) * CHR );
}
-
+
fillw( user_attr | ' ',
svsp->Crtat + ((svsp->scrr_end - n + 1) * svsp->maxcol),
n * svsp->maxcol);
@@ -2006,14 +2006,14 @@ roll_down(struct video_state *svsp, int n)
{
#if (PCVT_NOFASTSCROLL==0)
-
+
if(svsp->scrr_beg == 0 && /* if scroll region is whole screen */
svsp->scrr_len == svsp->screen_rows &&
(svsp != vsp || /* and either running in memory */
(svsp->screen_rows == svsp->screen_rowsize && /* or no fkeys */
adaptor_type != MDA_ADAPTOR))) /* and not on MDA/Hercules */
{
- u_short *Memory =
+ u_short *Memory =
#if PCVT_USL_VT_COMPAT
(vsp != svsp || (vsp->vt_status & VT_GRAFX)) ?
@@ -2039,7 +2039,7 @@ roll_down(struct video_state *svsp, int n)
if(vsp == svsp && !(vsp->vt_status & VT_GRAFX))
#else
if(vsp == svsp)
-#endif
+#endif
{
outb(addr_6845, CRTC_STARTADRH);
@@ -2055,7 +2055,7 @@ roll_down(struct video_state *svsp, int n)
svsp->Crtat + ((svsp->scrr_beg + n) * svsp->maxcol),
svsp->maxcol * (svsp->scrr_len - n) * CHR );
}
-
+
fillw( user_attr | ' ',
svsp->Crtat + (svsp->scrr_beg * svsp->maxcol),
n * svsp->maxcol);
@@ -2072,7 +2072,7 @@ swcsp(struct video_state *svsp, u_short *ctp)
{
if(ctp == NULL)
return;
-
+
switch(svsp->state)
{
case STATE_BROPN: /* designate G0 */
@@ -2138,7 +2138,7 @@ clear_dld(struct video_state *svsp)
vgacharset = vgacs[svsp->vga_charset].secondloaded;
else
return;
-
+
for(i=0;i < 16;i++) /* A zeroed character, vt220 has inverted '?' */
vgachar[i] = 0x00;
@@ -2170,7 +2170,7 @@ static void
selective_erase(struct video_state *svsp, u_short *pcrtat, int length)
{
register int i, j;
-
+
for(j = pcrtat - svsp->Crtat, i = 0;i < length;i++,pcrtat++)
{
if(!(svsp->decsca[INT_INDEX(j+i)] & (1 << BIT_INDEX(j+i))))
diff --git a/sys/i386/isa/psm.c b/sys/i386/isa/psm.c
index 975e95f..2026a45 100644
--- a/sys/i386/isa/psm.c
+++ b/sys/i386/isa/psm.c
@@ -21,22 +21,22 @@
*/
/*
- * Ported to 386bsd Oct 17, 1992
+ * Ported to 386bsd Oct 17, 1992
* Sandi Donno, Computer Science, University of Cape Town, South Africa
* Please send bug reports to sandi@cs.uct.ac.za
*
* Thanks are also due to Rick Macklem, rick@snowhite.cis.uoguelph.ca -
* although I was only partially successful in getting the alpha release
- * of his "driver for the Logitech and ATI Inport Bus mice for use with
- * 386bsd and the X386 port" to work with my Microsoft mouse, I nevertheless
- * found his code to be an invaluable reference when porting this driver
+ * of his "driver for the Logitech and ATI Inport Bus mice for use with
+ * 386bsd and the X386 port" to work with my Microsoft mouse, I nevertheless
+ * found his code to be an invaluable reference when porting this driver
* to 386bsd.
*
* Further modifications for latest 386BSD+patchkit and port to NetBSD,
* Andrew Herbert <andrew@werple.apana.org.au> - 8 June 1993
*
* Cloned from the Microsoft Bus Mouse driver, also by Erik Forsberg, by
- * Andrew Herbert - 12 June 1993
+ * Andrew Herbert - 12 June 1993
*
* Modified for PS/2 mouse by Charles Hannum <mycroft@ai.mit.edu>
* - 13 June 1993
@@ -261,7 +261,7 @@ void psm_poll_status(void)
inb(AUX_PORT+DATA);}
return;
}
-
+
int psmclose(dev_t dev, int flag, int fmt, struct proc *p)
{
@@ -328,14 +328,14 @@ int psmread(dev_t dev, struct uio *uio, int flag)
/* Remove a small chunk from input queue */
if (sc->inq.first + length >= MSBSZ) {
- bcopy(&sc->inq.queue[sc->inq.first],
+ bcopy(&sc->inq.queue[sc->inq.first],
buffer, MSBSZ - sc->inq.first);
- bcopy(sc->inq.queue, &buffer[MSBSZ-sc->inq.first],
+ bcopy(sc->inq.queue, &buffer[MSBSZ-sc->inq.first],
length - (MSBSZ - sc->inq.first));
}
else
bcopy(&sc->inq.queue[sc->inq.first], buffer, length);
-
+
sc->inq.first = (sc->inq.first + length) % MSBSZ;
sc->inq.count -= length;
diff --git a/sys/i386/isa/readMBR.c b/sys/i386/isa/readMBR.c
index b6edfcf..7515723 100644
--- a/sys/i386/isa/readMBR.c
+++ b/sys/i386/isa/readMBR.c
@@ -15,7 +15,7 @@
* written by julian elischer (julian@tfs.com)
*
* @(#)readMBR.c 8.5 (tfs) 1/21/94
- * $Id: readMBR.c,v 1.3 1994/11/08 10:35:52 phk Exp $
+ * $Id: readMBR.c,v 1.4 1994/11/14 13:22:41 bde Exp $
*/
#include <sys/param.h>
@@ -34,7 +34,7 @@
* to make sure it's reading absolute sectors.
* On exit:
* Leaves the disklabel set up with the various partitions
- * in the last 4 entries,
+ * in the last 4 entries,
* the A partition pointing to the BSD part
* the C partition set as the BSD partition, (read the disklabel from there) and
* the D partition set as the whole disk for beating up
@@ -122,7 +122,7 @@ readMBRtolabel(dev, strat, lp, dp, cyl)
* partition.
*/
for (i = 0; i < NDOSPART; i++, dp++,pseudopart++) {
-
+
if (!dp->dp_size)
continue;
/*
@@ -132,7 +132,7 @@ readMBRtolabel(dev, strat, lp, dp, cyl)
dp->dp_size;
lp->d_partitions[pseudopart].p_offset =
dp->dp_start;
-
+
/*
* make sure the D part can hold it all
*/
@@ -141,7 +141,7 @@ readMBRtolabel(dev, strat, lp, dp, cyl)
lp->d_partitions[3].p_size
= (dp->dp_start + dp->dp_size);
}
-
+
/*
* If we haven't seen a *BSD partition then
* check if this is a valid part..
@@ -171,7 +171,7 @@ readMBRtolabel(dev, strat, lp, dp, cyl)
seenBSD = 1;
*cyl = DPCYL(dp->dp_scyl,
dp->dp_ssect);
-
+
/*
* Note which part we are in (?)
*/
@@ -203,7 +203,7 @@ readMBRtolabel(dev, strat, lp, dp, cyl)
= FS_MSDOS;
break;
}
-
+
/*
* Try deduce the geometry, working
* on the principle that this
@@ -231,6 +231,6 @@ bad:
bp->b_flags = B_INVAL | B_AGE;
brelse(bp);
return msg;
-}
+}
diff --git a/sys/i386/isa/scd.c b/sys/i386/isa/scd.c
index 8b68956..9f50105 100644
--- a/sys/i386/isa/scd.c
+++ b/sys/i386/isa/scd.c
@@ -41,7 +41,7 @@
*/
-/* $Id: scd.c,v 1.3 1995/04/12 20:48:02 wollman Exp $ */
+/* $Id: scd.c,v 1.4 1995/05/09 12:25:58 rgrimes Exp $ */
/* Please send any comments to micke@dynas.se */
@@ -135,7 +135,7 @@ struct scd_data {
short first_track;
short last_track;
struct ioc_play_msf last_play;
-
+
short audio_status;
struct buf head; /* head of buf queue */
struct scd_mbx mbx;
@@ -213,7 +213,7 @@ int scd_attach(struct isa_device *dev)
{
struct scd_data *cd = scd_data + dev->id_unit;
int i;
-
+
cd->iobase = dev->id_iobase; /* Already set by probe, but ... */
kdc_scd[dev->id_unit].kdc_state = DC_IDLE;
@@ -235,7 +235,7 @@ scdopen(dev_t dev)
int unit,part,phys;
int rc;
struct scd_data *cd;
-
+
unit = scd_unit(dev);
if (unit >= NSCD)
return ENXIO;
@@ -243,7 +243,7 @@ scdopen(dev_t dev)
cd = scd_data + unit;
part = scd_part(dev);
phys = scd_phys(dev);
-
+
/* not initialized*/
if (!(cd->flags & SCDINIT))
return ENXIO;
@@ -289,7 +289,7 @@ scdclose(dev_t dev)
struct scd_data *cd;
int rlen;
char rdata[10];
-
+
unit = scd_unit(dev);
if (unit >= NSCD)
return ENXIO;
@@ -297,8 +297,8 @@ scdclose(dev_t dev)
cd = scd_data + unit;
part = scd_part(dev);
phys = scd_phys(dev);
-
- if (!(cd->flags & SCDINIT) || !cd->openflag)
+
+ if (!(cd->flags & SCDINIT) || !cd->openflag)
return ENXIO;
if (cd->audio_status != CD_AS_PLAY_IN_PROGRESS) {
@@ -346,11 +346,11 @@ scdstrategy(struct buf *bp)
bp->b_error = EROFS;
goto bad;
}
-
+
/* no data to read */
if (bp->b_bcount == 0)
goto done;
-
+
if (!(cd->flags & SCDTOC)) {
bp->b_error = EIO;
goto bad;
@@ -361,13 +361,13 @@ scdstrategy(struct buf *bp)
bp->b_pblkno = bp->b_blkno;
bp->b_resid = 0;
-
+
/* queue it */
qp = &cd->head;
s = splbio();
disksort(qp,bp);
splx(s);
-
+
/* now check whether we can perform processing */
scd_start(unit);
return;
@@ -388,7 +388,7 @@ scd_start(int unit)
struct partition *p;
int part;
register s = splbio();
-
+
if (cd->flags & SCDMBXBSY) {
splx(s);
return;
@@ -423,7 +423,7 @@ scdioctl(dev_t dev, int cmd, caddr_t addr, int flags)
{
struct scd_data *cd;
int unit,part;
-
+
unit = scd_unit(dev);
part = scd_part(dev);
cd = scd_data + unit;
@@ -618,7 +618,7 @@ scd_pause(int unit)
if (send_cmd(unit, CMD_STOP_AUDIO, 0) != 0)
return EIO;
-
+
cd->last_play.start_m = subpos.abs_msf[0];
cd->last_play.start_s = subpos.abs_msf[1];
cd->last_play.start_f = subpos.abs_msf[2];
@@ -831,7 +831,7 @@ trystat:
(caddr_t)SCD_S_WAITSTAT,hz/100); /* XXX */
return;
}
-
+
process_attention(unit);
/* reject, if audio active */
@@ -1184,19 +1184,19 @@ get_tl(struct sony_toc *toc, int size)
if (tl->track != 0xb0)
return tl;
(char *)tl += 9;
- if (tl->track != 0xb1)
+ if (tl->track != 0xb1)
return tl;
(char *)tl += 9;
- if (tl->track != 0xb2)
+ if (tl->track != 0xb2)
return tl;
(char *)tl += 9;
- if (tl->track != 0xb3)
+ if (tl->track != 0xb3)
return tl;
(char *)tl += 9;
- if (tl->track != 0xb4)
+ if (tl->track != 0xb4)
return tl;
(char *)tl += 9;
- if (tl->track != 0xc0)
+ if (tl->track != 0xc0)
return tl;
(char *)tl += 9;
return tl;
@@ -1368,7 +1368,7 @@ send_cmd(u_int unit, u_char cmd, u_int nargs, ...)
XDEBUG(1, ("\nscd%d: wparam timeout\n", unit));
return -EIO;
}
-
+
va_start(ap, nargs);
reg = port + OREG_WPARAMS;
for (i = 0; i < nargs; i++) {
@@ -1512,7 +1512,7 @@ scd_toc_entrys (int unit, struct ioc_read_toc_entry *te)
i = te->starting_track;
if (i == SCD_LASTPLUS1)
i = cd->last_track + 1;
-
+
/* verify starting track */
if (i < cd->first_track || i > cd->last_track+1)
return EINVAL;
diff --git a/sys/i386/isa/seagate.c b/sys/i386/isa/seagate.c
index cfd113b..de18f23 100644
--- a/sys/i386/isa/seagate.c
+++ b/sys/i386/isa/seagate.c
@@ -46,7 +46,7 @@
* delays, device flags, polling mode, generic cleanup
* vak 950115 Added request-sense ops
*
- * $Id: seagate.c,v 1.6 1995/03/28 07:55:50 bde Exp $
+ * $Id: seagate.c,v 1.7 1995/04/12 20:48:03 wollman Exp $
*/
/*
@@ -530,7 +530,7 @@ int sea_attach (struct isa_device *dev)
z->sc_link.adapter_targ = z->scsi_addr;
z->sc_link.adapter = &sea_switch;
z->sc_link.device = &sea_dev;
-
+
/* ask the adapter what subunits are present */
scsi_attachdevs (&(z->sc_link));
diff --git a/sys/i386/isa/sio.c b/sys/i386/isa/sio.c
index 9764ef6..4ae58cd 100644
--- a/sys/i386/isa/sio.c
+++ b/sys/i386/isa/sio.c
@@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* from: @(#)com.c 7.5 (Berkeley) 5/16/91
- * $Id: sio.c,v 1.97 1995/05/07 23:00:02 ache Exp $
+ * $Id: sio.c,v 1.98 1995/05/11 19:26:19 rgrimes Exp $
*/
#include "sio.h"
@@ -630,7 +630,7 @@ sioattach(isdp)
#ifdef DSI_SOFT_MODEM
if((inb(iobase+7) ^ inb(iobase+7)) & 0x80) {
printf(" Digicom Systems, Inc. SoftModem");
- kdc_sio[unit].kdc_description =
+ kdc_sio[unit].kdc_description =
"Serial port: Digicom Systems SoftModem";
goto determined_type;
}
@@ -1326,15 +1326,15 @@ sioioctl(dev, cmd, data, flag, p)
pi = (u_char*)(*(caddr_t*)data);
error = copyin(pi,&l,sizeof l);
- if(error)
+ if(error)
{return error;};
pi += sizeof l;
p = malloc(l,M_TEMP,M_NOWAIT);
- if(!p)
+ if(!p)
{return ENOBUFS;}
error = copyin(pi,p,l);
- if(error)
+ if(error)
{free(p,M_TEMP); return error;};
if(error = LoadSoftModem(
MINOR_TO_UNIT(mynor),iobase,l,p))
@@ -2229,7 +2229,7 @@ LoadSoftModem(int unit, int base_io, u_long size, u_char *ptr)
int int_c,int_k;
int data_0188, data_0187;
- /*
+ /*
* First see if it is a DSI SoftModem
*/
if(!((inb(base_io+7) ^ inb(base_io+7) & 0x80)))
@@ -2248,8 +2248,8 @@ LoadSoftModem(int unit, int base_io, u_long size, u_char *ptr)
DSI_ERROR("dsp bus not granted");
if(0x01 != (inb(base_io+7) & 0x01)) {
- outb(base_io+7,0x18);
- outb(base_io+7,0x19);
+ outb(base_io+7,0x18);
+ outb(base_io+7,0x19);
if(0x01 != (inb(base_io+7) & 0x01))
DSI_ERROR("program mem not granted");
}
@@ -2275,14 +2275,14 @@ LoadSoftModem(int unit, int base_io, u_long size, u_char *ptr)
outb(base_io+7,0x19);
if(0x00 != (inb(base_io+7) & 0x01))
DSI_ERROR("program data not granted");
-
+
for(int_k = 0 ; int_k < 0x800; int_k++) {
outb(base_io+1,*ptr++);
outb(base_io+2,0);
outb(base_io+1,*ptr++);
outb(base_io+2,*ptr++);
}
-
+
size -= 0x1800;
while(size > 0x1800) {
@@ -2299,7 +2299,7 @@ LoadSoftModem(int unit, int base_io, u_long size, u_char *ptr)
outb(base_io+2,*ptr++);
}
}
-
+
} else if (size > 0) {
if(int_c == 7) {
outb(base_io+7,0x18);
@@ -2319,7 +2319,7 @@ LoadSoftModem(int unit, int base_io, u_long size, u_char *ptr)
outb(base_io+2,*ptr++);
}
}
- }
+ }
outb(base_io+7,0x11);
outb(base_io+7,3);
diff --git a/sys/i386/isa/sound/dev_table.h b/sys/i386/isa/sound/dev_table.h
index 91df56e..f278223 100644
--- a/sys/i386/isa/sound/dev_table.h
+++ b/sys/i386/isa/sound/dev_table.h
@@ -2,7 +2,7 @@
* dev_table.h
*
* Global definitions for device call tables
- *
+ *
* Copyright by Hannu Savolainen 1993
*
* Redistribution and use in source and binary forms, with or without
@@ -26,7 +26,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: dev_table.h,v 1.12 1995/03/12 23:33:50 swallace Exp $
+ * $Id: dev_table.h,v 1.13 1995/03/28 07:56:11 bde Exp $
*/
#ifndef _DEV_TABLE_H_
@@ -117,9 +117,9 @@ struct audio_operations {
void *devc; /* Driver specific info */
int (*open) (int dev, int mode);
void (*close) (int dev);
- void (*output_block) (int dev, unsigned long buf,
+ void (*output_block) (int dev, unsigned long buf,
int count, int intrflag, int dma_restart);
- void (*start_input) (int dev, unsigned long buf,
+ void (*start_input) (int dev, unsigned long buf,
int count, int intrflag, int dma_restart);
int (*ioctl) (int dev, unsigned int cmd, unsigned int arg, int local);
int (*prepare_for_input) (int dev, int bufsize, int nbufs);
@@ -197,7 +197,7 @@ struct sound_timer_operations {
void (*arm_timer)(int dev, long time);
};
-#ifdef _DEV_TABLE_C_
+#ifdef _DEV_TABLE_C_
struct audio_operations *audio_devs[MAX_AUDIO_DEV] = {NULL}; int num_audiodevs = 0;
struct mixer_operations *mixer_devs[MAX_MIXER_DEV] = {NULL}; int num_mixers = 0;
struct synth_operations *synth_devs[MAX_SYNTH_DEV+MAX_MIDI_DEV] = {NULL}; int num_synths = 0;
@@ -205,12 +205,12 @@ struct sound_timer_operations {
#ifndef EXCLUDE_SEQUENCER
extern struct sound_timer_operations default_sound_timer;
- struct sound_timer_operations *sound_timer_devs[MAX_TIMER_DEV] =
- {&default_sound_timer, NULL};
+ struct sound_timer_operations *sound_timer_devs[MAX_TIMER_DEV] =
+ {&default_sound_timer, NULL};
int num_sound_timers = 1;
#else
- struct sound_timer_operations *sound_timer_devs[MAX_TIMER_DEV] =
- {NULL};
+ struct sound_timer_operations *sound_timer_devs[MAX_TIMER_DEV] =
+ {NULL};
int num_sound_timers = 0;
#endif
diff --git a/sys/i386/isa/sound/dmabuf.c b/sys/i386/isa/sound/dmabuf.c
index aaf57a6..e7d8216 100644
--- a/sys/i386/isa/sound/dmabuf.c
+++ b/sys/i386/isa/sound/dmabuf.c
@@ -25,7 +25,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: dmabuf.c,v 1.14 1995/03/18 20:01:10 swallace Exp $
+ * $Id: dmabuf.c,v 1.15 1995/05/07 06:38:47 pst Exp $
*/
#include "sound_config.h"
@@ -435,7 +435,7 @@ DMAbuf_ioctl (int dev, unsigned int cmd, unsigned int arg, int local)
break;
case SNDCTL_DSP_SETBLKSIZE:
- {
+ {
int size = IOCTL_IN (arg);
if(!(dmap->flags & DMA_ALLOC_DONE) && size)
@@ -921,7 +921,7 @@ DMAbuf_input_ready(int dev)
{
int h,i,r;
struct dma_buffparms *dmap = audio_devs[dev]->dmap;
-
+
r = 0;
if(dmap->qlen)
{
@@ -931,13 +931,13 @@ DMAbuf_input_ready(int dev)
{
h = (dmap->qhead + i) % dmap->nbufs;
r += dmap->fragment_size - dmap->counts[h];
- if(r >= dmap->fragment_size)
+ if(r >= dmap->fragment_size)
break;
- }
+ }
if(r < dmap->fragment_size)
r = 0;
else
- r = 1;
+ r = 1;
}
else
r = 1;
diff --git a/sys/i386/isa/sound/finetune.h b/sys/i386/isa/sound/finetune.h
index 6c17d74..00085f9 100644
--- a/sys/i386/isa/sound/finetune.h
+++ b/sys/i386/isa/sound/finetune.h
@@ -28,21 +28,21 @@
unsigned short finetune_table[128] =
{
-/* 0 */ 9439, 9447, 9456, 9464, 9473, 9481, 9490, 9499,
-/* 8 */ 9507, 9516, 9524, 9533, 9542, 9550, 9559, 9567,
-/* 16 */ 9576, 9585, 9593, 9602, 9611, 9619, 9628, 9637,
-/* 24 */ 9645, 9654, 9663, 9672, 9680, 9689, 9698, 9707,
-/* 32 */ 9715, 9724, 9733, 9742, 9750, 9759, 9768, 9777,
-/* 40 */ 9786, 9795, 9803, 9812, 9821, 9830, 9839, 9848,
-/* 48 */ 9857, 9866, 9874, 9883, 9892, 9901, 9910, 9919,
-/* 56 */ 9928, 9937, 9946, 9955, 9964, 9973, 9982, 9991,
-/* 64 */ 10000, 10009, 10018, 10027, 10036, 10045, 10054, 10063,
-/* 72 */ 10072, 10082, 10091, 10100, 10109, 10118, 10127, 10136,
-/* 80 */ 10145, 10155, 10164, 10173, 10182, 10191, 10201, 10210,
-/* 88 */ 10219, 10228, 10237, 10247, 10256, 10265, 10274, 10284,
-/* 96 */ 10293, 10302, 10312, 10321, 10330, 10340, 10349, 10358,
-/* 104 */ 10368, 10377, 10386, 10396, 10405, 10415, 10424, 10433,
-/* 112 */ 10443, 10452, 10462, 10471, 10481, 10490, 10499, 10509,
+/* 0 */ 9439, 9447, 9456, 9464, 9473, 9481, 9490, 9499,
+/* 8 */ 9507, 9516, 9524, 9533, 9542, 9550, 9559, 9567,
+/* 16 */ 9576, 9585, 9593, 9602, 9611, 9619, 9628, 9637,
+/* 24 */ 9645, 9654, 9663, 9672, 9680, 9689, 9698, 9707,
+/* 32 */ 9715, 9724, 9733, 9742, 9750, 9759, 9768, 9777,
+/* 40 */ 9786, 9795, 9803, 9812, 9821, 9830, 9839, 9848,
+/* 48 */ 9857, 9866, 9874, 9883, 9892, 9901, 9910, 9919,
+/* 56 */ 9928, 9937, 9946, 9955, 9964, 9973, 9982, 9991,
+/* 64 */ 10000, 10009, 10018, 10027, 10036, 10045, 10054, 10063,
+/* 72 */ 10072, 10082, 10091, 10100, 10109, 10118, 10127, 10136,
+/* 80 */ 10145, 10155, 10164, 10173, 10182, 10191, 10201, 10210,
+/* 88 */ 10219, 10228, 10237, 10247, 10256, 10265, 10274, 10284,
+/* 96 */ 10293, 10302, 10312, 10321, 10330, 10340, 10349, 10358,
+/* 104 */ 10368, 10377, 10386, 10396, 10405, 10415, 10424, 10433,
+/* 112 */ 10443, 10452, 10462, 10471, 10481, 10490, 10499, 10509,
/* 120 */ 10518, 10528, 10537, 10547, 10556, 10566, 10576, 10585
};
#else
diff --git a/sys/i386/isa/sound/midi_ctrl.h b/sys/i386/isa/sound/midi_ctrl.h
index 75b6fd8..3aa0f17 100644
--- a/sys/i386/isa/sound/midi_ctrl.h
+++ b/sys/i386/isa/sound/midi_ctrl.h
@@ -12,7 +12,7 @@ static unsigned char ctrl_def_values[128] =
0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00, /* 40 to 47 */
0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00, /* 48 to 55 */
0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00, /* 56 to 63 */
-
+
0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00, /* 64 to 71 */
0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00, /* 72 to 79 */
0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00, /* 80 to 87 */
diff --git a/sys/i386/isa/sound/opl3.h b/sys/i386/isa/sound/opl3.h
index 5fa6aa5..d5101cd 100644
--- a/sys/i386/isa/sound/opl3.h
+++ b/sys/i386/isa/sound/opl3.h
@@ -37,7 +37,7 @@
* The percussive mode is implemented in the left side only.
*
* With the above exceptions the both sides can be operated independently.
- *
+ *
* A 4 OP voice can be created by setting the corresponding
* bit at offset 4 of the right side.
*
@@ -46,7 +46,7 @@
* voice is made inaccessible.
*
* If a voice is set to the 2 OP mode, it works like 2 OP modes
- * of the original YM3812 (AdLib). In addition the voice can
+ * of the original YM3812 (AdLib). In addition the voice can
* be connected the left, right or both stereo channels. It can
* even be left unconnected. This works with 4 OP voices also.
*
@@ -179,13 +179,13 @@
* 0 0 >+-1-+--2--3--4-->
*
*
- *
+ *
* +---+
* | |
* 0 1 >+-1-+--2-+
* |->
* >--3----4-+
- *
+ *
* +---+
* | |
* 1 0 >+-1-+-----+
diff --git a/sys/i386/isa/sound/os.h b/sys/i386/isa/sound/os.h
index 2e888c0..6076065 100644
--- a/sys/i386/isa/sound/os.h
+++ b/sys/i386/isa/sound/os.h
@@ -35,7 +35,7 @@
*
* If you have to make changes to other than these two files, please contact me
* before making the changes. It's possible that I have already made the
- * change.
+ * change.
*
* os.h,v 1.13 1994/10/01 02:16:53 swallace Exp
*/
@@ -64,7 +64,7 @@
*/
#ifdef CONFIGURE_SOUNDCARD
-/*
+/*
* select() is currently implemented in Linux specific way. Don't enable.
* I don't remember what the SHORT_BANNERS means so forget it.
*/
@@ -79,18 +79,18 @@
* Here is the first portability problem. Every OS has it's own way to
* pass a pointer to the buffer in read() and write() calls. In Linux it's
* just a char*. In BSD it's struct uio. This parameter is passed to
- * all functions called from read() or write(). Since nothing can be
+ * all functions called from read() or write(). Since nothing can be
* assumed about this structure, the driver uses set of macros for
- * accessing the user buffer.
+ * accessing the user buffer.
*
* The driver reads/writes bytes in the user buffer sequentially which
* means that calls like uiomove() can be used.
*
* snd_rw_buf is the type which is passed to the device file specific
* read() and write() calls.
- *
+ *
* The following macros are used to move date to and from the
- * user buffer. These macros should be used only when the
+ * user buffer. These macros should be used only when the
* target or source parameter has snd_rw_buf type.
* The offs parameter is a offset relative to the beginning of
* the user buffer. In Linux the offset is required but for example
@@ -115,7 +115,7 @@ typedef struct uio snd_rw_buf;
do { if (uiomove(source, count, (struct uio *)target)) { \
printf ("sb: Bad copyout()!\n"); \
} } while(0)
-/*
+/*
* The following macros are like COPY_*_USER but work just with one byte (8bit),
* short (16 bit) or long (32 bit) at a time.
* The same restrictions apply than for COPY_*_USER
@@ -194,7 +194,7 @@ struct snd_wait {
* the process is resumed if it receives a signal. The following is propably
* not the way how it should be done on 386bsd.
* The on_what parameter is a wait_queue defined with DEFINE_WAIT_QUEUE(),
- * and the second is a workarea parameter. The third is a timeout
+ * and the second is a workarea parameter. The third is a timeout
* in ticks. Zero means no timeout.
*/
#define DO_SLEEP(q, f, time_limit) \
@@ -220,10 +220,10 @@ struct snd_wait {
#define HZ hz
#endif
-/*
+/*
* GET_TIME() returns current value of the counter incremented at timer
* ticks. This can overflow, so the timeout might be real big...
- *
+ *
*/
extern unsigned long get_time(void);
#define GET_TIME() get_time()
@@ -250,7 +250,7 @@ extern unsigned long get_time(void);
*/
#define INB inb
-/*
+/*
* The outb(0, 0x80) is just for slowdown. It's bit unsafe since
* this address could be used for something usefull.
*/
@@ -267,9 +267,9 @@ extern unsigned long get_time(void);
#define RET_ERROR(err) -(err)
-/*
- KERNEL_MALLOC() allocates requested number of memory and
- KERNEL_FREE is used to free it.
+/*
+ KERNEL_MALLOC() allocates requested number of memory and
+ KERNEL_FREE is used to free it.
These macros are never called from interrupt, in addition the
nbytes will never be more than 4096 bytes. Generally the driver
will allocate memory in blocks of 4k. If the kernel has just a
diff --git a/sys/i386/isa/sound/pas.h b/sys/i386/isa/sound/pas.h
index bdb9c56..78e90bf 100644
--- a/sys/i386/isa/sound/pas.h
+++ b/sys/i386/isa/sound/pas.h
@@ -47,7 +47,7 @@
#define SYSTEM_CONFIGURATION_1 0x8388 /* R W Control */
#define S_C_1_PCS_ENABLE 0x01 /* R W PC speaker 1=enable, 0=disable PC speaker emulation */
- #define S_C_1_PCM_CLOCK_SELECT 0x02 /* R W PCM 1=14.31818Mhz/12, 0=28.224Mhz master clock */
+ #define S_C_1_PCM_CLOCK_SELECT 0x02 /* R W PCM 1=14.31818Mhz/12, 0=28.224Mhz master clock */
#define S_C_1_FM_EMULATE_CLOCK 0x04 /* R W FM 1=use 28.224Mhz/2, 0=use 14.31818Mhz clock */
#define S_C_1_PCS_STEREO 0x10 /* R W PC speaker 1=enable PC speaker stereo effect, 0=disable */
#define S_C_1_PCS_REALSOUND 0x20 /* R W PC speaker 1=enable RealSound enhancement, 0=disable */
@@ -114,7 +114,7 @@
struct { /* R W Mixer Filter translation */
unsigned int freq:24;
unsigned int value:8;
- } F_F_FILTER_translate[] =
+ } F_F_FILTER_translate[] =
{ { 73500, 0x01 }, /* 73500Hz - divide by 16 */
{ 65333, 0x02 }, /* 65333Hz - divide by 18 */
{ 49000, 0x09 }, /* 49000Hz - divide by 24 */
@@ -142,7 +142,7 @@
unsigned char I_C_2_PCM_DMA_translate[] = /* R W PCM PCM DMA channel value translations */
{ 4, 1, 2, 3, 0, 5, 6, 7 };
unsigned char I_C_3_PCM_IRQ_translate[] = /* R W PCM PCM IRQ level value translation */
- { 0, 0, 1, 2, 3, 4, 5, 6, 0, 1, 7, 8, 9, 0, 10, 11 };
+ { 0, 0, 1, 2, 3, 4, 5, 6, 0, 1, 7, 8, 9, 0, 10, 11 };
unsigned char E_C_MPU401_IRQ_translate[] = /* R W MIDI MPU401 emulation IRQ value translation */
{ 0x00, 0x00, 0x01, 0x02, 0x00, 0x03, 0x00, 0x04, 0x00, 0x01, 0x05, 0x06, 0x07 };
unsigned char E_C_SB_IRQ_translate[] = /* R W PCM SB emulation IRQ translate */
@@ -150,7 +150,7 @@
unsigned char E_C_SB_DMA_translate[] = /* R W PCM SB emulation DMA translate */
{ 0x00, 0x40, 0x80, 0xC0, 0, 0, 0, 0 };
unsigned char O_M_1_to_card[] = /* R W Control Translate (OM1 & 0x0f) to card type */
- { 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 4, 0, 2, 3 };
+ { 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 4, 0, 2, 3 };
#else
extern unsigned char I_C_2_PCM_DMA_translate[]; /* R W PCM PCM DMA channel value translations */
extern unsigned char I_C_3_PCM_IRQ_translate[]; /* R W PCM PCM IRQ level value translation */
@@ -251,4 +251,4 @@
#define MIDI_FIFO_STATUS 0x1B89 /* R W MIDI Midi fifo status */
#define MIDI_DATA 0x178A /* R W MIDI Midi data register */
-#define MIDI_INPUT_AVAILABLE 0x0f /* RW MIDI */
+#define MIDI_INPUT_AVAILABLE 0x0f /* RW MIDI */
diff --git a/sys/i386/isa/sound/pas2_card.c b/sys/i386/isa/sound/pas2_card.c
index 204946e..13f2efc 100644
--- a/sys/i386/isa/sound/pas2_card.c
+++ b/sys/i386/isa/sound/pas2_card.c
@@ -380,7 +380,7 @@ attach_pas_card (long mem_start, struct address_info *hw_config)
if (detect_pas_hw (hw_config))
{
- board_rev_id = pas_read (BOARD_REV_ID);
+ board_rev_id = pas_read (BOARD_REV_ID);
if (pas_model = pas_read (CHIP_REV))
{
#ifdef __FreeBSD__
diff --git a/sys/i386/isa/sound/sb_mixer.h b/sys/i386/isa/sound/sb_mixer.h
index 495b040..e605e79 100644
--- a/sys/i386/isa/sound/sb_mixer.h
+++ b/sys/i386/isa/sound/sb_mixer.h
@@ -1,10 +1,10 @@
/*
* sound/sb_mixer.h
- *
+ *
* Definitions for the SB Pro and SB16 mixers
- *
+ *
* Copyright by Hannu Savolainen 1993
- *
+ *
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met: 1. Redistributions of source code must retain the above copyright
@@ -12,7 +12,7 @@
* Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
- *
+ *
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND ANY
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
@@ -28,7 +28,7 @@
* Modified:
* Hunyue Yau Jan 6 1994
* Added defines for the Sound Galaxy NX Pro mixer.
- *
+ *
* sb_mixer.h,v 1.4 1994/10/01 02:17:08 swallace Exp
*/
@@ -57,11 +57,11 @@
/*
* Mixer registers
- *
+ *
* NOTE! RECORD_SRC == IN_FILTER
*/
-/*
+/*
* Mixer registers of SB Pro
*/
#define VOC_VOL 0x04
@@ -80,7 +80,7 @@
#define OPSW 0x3c
/*
- * Additional registers on the SG NX Pro
+ * Additional registers on the SG NX Pro
*/
#define COVOX_VOL 0x42
#define TREBLE_LVL 0x44
diff --git a/sys/i386/isa/sound/sound_calls.h b/sys/i386/isa/sound/sound_calls.h
index dea28e3..ed00975 100644
--- a/sys/i386/isa/sound/sound_calls.h
+++ b/sys/i386/isa/sound/sound_calls.h
@@ -1,7 +1,7 @@
/*
* DMA buffer calls
*
- * $Id: sound_calls.h,v 1.11 1995/03/28 07:56:13 bde Exp $
+ * $Id: sound_calls.h,v 1.12 1995/05/07 06:38:48 pst Exp $
*/
#ifndef _MACHINE_ISA_SOUND_H_
@@ -87,7 +87,7 @@ long CMIDI_init (long mem_start);
int CMIDI_open (int dev, struct fileinfo *file);
int CMIDI_write (int dev, struct fileinfo *file, snd_rw_buf *buf, int count);
int CMIDI_read (int dev, struct fileinfo *file, snd_rw_buf *buf, int count);
-int CMIDI_close (int dev, struct fileinfo *file);
+int CMIDI_close (int dev, struct fileinfo *file);
/*
*
diff --git a/sys/i386/isa/sound/sound_config.h b/sys/i386/isa/sound/sound_config.h
index 470bc01..c3732d5 100644
--- a/sys/i386/isa/sound/sound_config.h
+++ b/sys/i386/isa/sound/sound_config.h
@@ -2,7 +2,7 @@
*
* A driver for Soundcards, misc configuration parameters.
*
- *
+ *
* Copyright by Hannu Savolainen 1993
*
* Redistribution and use in source and binary forms, with or without
@@ -26,7 +26,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: sound_config.h,v 1.6 1994/10/01 02:17:11 swallace Exp $
+ * $Id: sound_config.h,v 1.9 1995/03/12 23:34:07 swallace Exp $
*/
#include "local.h"
@@ -118,7 +118,7 @@ If your card has nonstandard I/O address or IRQ number, change defines
#endif
#ifndef GUS16_BASE
-#define GUS16_BASE 0x530
+#define GUS16_BASE 0x530
#endif
#ifndef GUS16_IRQ
@@ -158,7 +158,7 @@ If your card has nonstandard I/O address or IRQ number, change defines
#define MSS_BASE 0x530
#endif
-#ifndef MSS_IRQ
+#ifndef MSS_IRQ
#define MSS_IRQ 10
#endif
@@ -170,7 +170,7 @@ If your card has nonstandard I/O address or IRQ number, change defines
#define U6850_BASE 0x330
#endif
-#ifndef U6850_IRQ
+#ifndef U6850_IRQ
#define U6850_IRQ 5
#endif
diff --git a/sys/i386/isa/sound/soundcard.c b/sys/i386/isa/sound/soundcard.c
index 254f49f..a396727 100644
--- a/sys/i386/isa/sound/soundcard.c
+++ b/sys/i386/isa/sound/soundcard.c
@@ -1,8 +1,8 @@
/*
* sound/386bsd/soundcard.c
- *
+ *
* Soundcard driver for FreeBSD.
- *
+ *
* Copyright by Hannu Savolainen 1993
*
* Redistribution and use in source and binary forms, with or without
@@ -26,7 +26,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: soundcard.c,v 1.24 1995/03/12 23:34:10 swallace Exp $
+ * $Id: soundcard.c,v 1.25 1995/05/11 19:26:24 rgrimes Exp $
*/
#include "sound_config.h"
@@ -91,7 +91,7 @@ int x;
return timecopy.tv_usec/(1000000/HZ) +
(unsigned long)timecopy.tv_sec*HZ;
}
-
+
int
sndread (int dev, struct uio *buf)
@@ -243,7 +243,7 @@ sndprobe (struct isa_device *dev)
hw_config.io_base = dev->id_iobase;
hw_config.irq = ipri_to_irq (dev->id_irq);
hw_config.dma = dev->id_drq;
-
+
if(unit)
return sndtable_probe (unit, &hw_config);
else
@@ -256,7 +256,7 @@ sndattach (struct isa_device *dev)
int i, unit;
static int midi_initialized = 0;
static int seq_initialized = 0;
- static int generic_midi_initialized = 0;
+ static int generic_midi_initialized = 0;
unsigned long mem_start = 0xefffffffUL;
struct address_info hw_config;
diff --git a/sys/i386/isa/sound/tuning.h b/sys/i386/isa/sound/tuning.h
index 936ff6a..0d1d6bb 100644
--- a/sys/i386/isa/sound/tuning.h
+++ b/sys/i386/isa/sound/tuning.h
@@ -3,27 +3,27 @@
*/
#ifdef SEQUENCER_C
-unsigned short semitone_tuning[24] =
+unsigned short semitone_tuning[24] =
{
-/* 0 */ 10000, 10595, 11225, 11892, 12599, 13348, 14142, 14983,
-/* 8 */ 15874, 16818, 17818, 18877, 20000, 21189, 22449, 23784,
+/* 0 */ 10000, 10595, 11225, 11892, 12599, 13348, 14142, 14983,
+/* 8 */ 15874, 16818, 17818, 18877, 20000, 21189, 22449, 23784,
/* 16 */ 25198, 26697, 28284, 29966, 31748, 33636, 35636, 37755
};
unsigned short cent_tuning[100] =
{
-/* 0 */ 10000, 10006, 10012, 10017, 10023, 10029, 10035, 10041,
-/* 8 */ 10046, 10052, 10058, 10064, 10070, 10075, 10081, 10087,
-/* 16 */ 10093, 10099, 10105, 10110, 10116, 10122, 10128, 10134,
-/* 24 */ 10140, 10145, 10151, 10157, 10163, 10169, 10175, 10181,
-/* 32 */ 10187, 10192, 10198, 10204, 10210, 10216, 10222, 10228,
-/* 40 */ 10234, 10240, 10246, 10251, 10257, 10263, 10269, 10275,
-/* 48 */ 10281, 10287, 10293, 10299, 10305, 10311, 10317, 10323,
-/* 56 */ 10329, 10335, 10341, 10347, 10353, 10359, 10365, 10371,
-/* 64 */ 10377, 10383, 10389, 10395, 10401, 10407, 10413, 10419,
-/* 72 */ 10425, 10431, 10437, 10443, 10449, 10455, 10461, 10467,
-/* 80 */ 10473, 10479, 10485, 10491, 10497, 10503, 10509, 10515,
-/* 88 */ 10521, 10528, 10534, 10540, 10546, 10552, 10558, 10564,
+/* 0 */ 10000, 10006, 10012, 10017, 10023, 10029, 10035, 10041,
+/* 8 */ 10046, 10052, 10058, 10064, 10070, 10075, 10081, 10087,
+/* 16 */ 10093, 10099, 10105, 10110, 10116, 10122, 10128, 10134,
+/* 24 */ 10140, 10145, 10151, 10157, 10163, 10169, 10175, 10181,
+/* 32 */ 10187, 10192, 10198, 10204, 10210, 10216, 10222, 10228,
+/* 40 */ 10234, 10240, 10246, 10251, 10257, 10263, 10269, 10275,
+/* 48 */ 10281, 10287, 10293, 10299, 10305, 10311, 10317, 10323,
+/* 56 */ 10329, 10335, 10341, 10347, 10353, 10359, 10365, 10371,
+/* 64 */ 10377, 10383, 10389, 10395, 10401, 10407, 10413, 10419,
+/* 72 */ 10425, 10431, 10437, 10443, 10449, 10455, 10461, 10467,
+/* 80 */ 10473, 10479, 10485, 10491, 10497, 10503, 10509, 10515,
+/* 88 */ 10521, 10528, 10534, 10540, 10546, 10552, 10558, 10564,
/* 96 */ 10570, 10576, 10582, 10589
};
#else
diff --git a/sys/i386/isa/sound/ulaw.h b/sys/i386/isa/sound/ulaw.h
index be9f92d..f60d5b6 100644
--- a/sys/i386/isa/sound/ulaw.h
+++ b/sys/i386/isa/sound/ulaw.h
@@ -1,69 +1,69 @@
static unsigned char ulaw_dsp[] = {
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 2,
- 5, 9, 13, 17, 21, 25, 29, 33,
- 37, 41, 45, 49, 53, 57, 61, 65,
- 68, 70, 72, 74, 76, 78, 80, 82,
- 84, 86, 88, 90, 92, 94, 96, 98,
- 100, 101, 102, 103, 104, 105, 106, 107,
- 108, 109, 110, 111, 112, 113, 114, 115,
- 115, 116, 116, 117, 117, 118, 118, 119,
- 119, 120, 120, 121, 121, 122, 122, 123,
- 123, 123, 124, 124, 124, 124, 125, 125,
- 125, 125, 126, 126, 126, 126, 127, 127,
- 127, 127, 127, 127, 128, 128, 128, 128,
- 128, 128, 128, 128, 128, 128, 128, 128,
- 255, 255, 255, 255, 255, 255, 255, 255,
- 255, 255, 255, 255, 255, 255, 255, 255,
- 255, 255, 255, 255, 255, 255, 255, 255,
- 255, 255, 255, 255, 255, 255, 255, 255,
- 252, 248, 244, 240, 236, 232, 228, 224,
- 220, 216, 212, 208, 204, 200, 196, 192,
- 189, 187, 185, 183, 181, 179, 177, 175,
- 173, 171, 169, 167, 165, 163, 161, 159,
- 157, 156, 155, 154, 153, 152, 151, 150,
- 149, 148, 147, 146, 145, 144, 143, 142,
- 142, 141, 141, 140, 140, 139, 139, 138,
- 138, 137, 137, 136, 136, 135, 135, 134,
- 134, 134, 133, 133, 133, 133, 132, 132,
- 132, 132, 131, 131, 131, 131, 130, 130,
- 130, 130, 130, 130, 129, 129, 129, 129,
- 129, 129, 129, 129, 128, 128, 128, 128,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 2,
+ 5, 9, 13, 17, 21, 25, 29, 33,
+ 37, 41, 45, 49, 53, 57, 61, 65,
+ 68, 70, 72, 74, 76, 78, 80, 82,
+ 84, 86, 88, 90, 92, 94, 96, 98,
+ 100, 101, 102, 103, 104, 105, 106, 107,
+ 108, 109, 110, 111, 112, 113, 114, 115,
+ 115, 116, 116, 117, 117, 118, 118, 119,
+ 119, 120, 120, 121, 121, 122, 122, 123,
+ 123, 123, 124, 124, 124, 124, 125, 125,
+ 125, 125, 126, 126, 126, 126, 127, 127,
+ 127, 127, 127, 127, 128, 128, 128, 128,
+ 128, 128, 128, 128, 128, 128, 128, 128,
+ 255, 255, 255, 255, 255, 255, 255, 255,
+ 255, 255, 255, 255, 255, 255, 255, 255,
+ 255, 255, 255, 255, 255, 255, 255, 255,
+ 255, 255, 255, 255, 255, 255, 255, 255,
+ 252, 248, 244, 240, 236, 232, 228, 224,
+ 220, 216, 212, 208, 204, 200, 196, 192,
+ 189, 187, 185, 183, 181, 179, 177, 175,
+ 173, 171, 169, 167, 165, 163, 161, 159,
+ 157, 156, 155, 154, 153, 152, 151, 150,
+ 149, 148, 147, 146, 145, 144, 143, 142,
+ 142, 141, 141, 140, 140, 139, 139, 138,
+ 138, 137, 137, 136, 136, 135, 135, 134,
+ 134, 134, 133, 133, 133, 133, 132, 132,
+ 132, 132, 131, 131, 131, 131, 130, 130,
+ 130, 130, 130, 130, 129, 129, 129, 129,
+ 129, 129, 129, 129, 128, 128, 128, 128,
};
static unsigned char dsp_ulaw[] = {
- 31, 31, 31, 32, 32, 32, 32, 33,
- 33, 33, 33, 34, 34, 34, 34, 35,
- 35, 35, 35, 36, 36, 36, 36, 37,
- 37, 37, 37, 38, 38, 38, 38, 39,
- 39, 39, 39, 40, 40, 40, 40, 41,
- 41, 41, 41, 42, 42, 42, 42, 43,
- 43, 43, 43, 44, 44, 44, 44, 45,
- 45, 45, 45, 46, 46, 46, 46, 47,
- 47, 47, 47, 48, 48, 49, 49, 50,
- 50, 51, 51, 52, 52, 53, 53, 54,
- 54, 55, 55, 56, 56, 57, 57, 58,
- 58, 59, 59, 60, 60, 61, 61, 62,
- 62, 63, 63, 64, 65, 66, 67, 68,
- 69, 70, 71, 72, 73, 74, 75, 76,
- 77, 78, 79, 81, 83, 85, 87, 89,
- 91, 93, 95, 99, 103, 107, 111, 119,
- 255, 247, 239, 235, 231, 227, 223, 221,
- 219, 217, 215, 213, 211, 209, 207, 206,
- 205, 204, 203, 202, 201, 200, 199, 198,
- 197, 196, 195, 194, 193, 192, 191, 191,
- 190, 190, 189, 189, 188, 188, 187, 187,
- 186, 186, 185, 185, 184, 184, 183, 183,
- 182, 182, 181, 181, 180, 180, 179, 179,
- 178, 178, 177, 177, 176, 176, 175, 175,
- 175, 175, 174, 174, 174, 174, 173, 173,
- 173, 173, 172, 172, 172, 172, 171, 171,
- 171, 171, 170, 170, 170, 170, 169, 169,
- 169, 169, 168, 168, 168, 168, 167, 167,
- 167, 167, 166, 166, 166, 166, 165, 165,
- 165, 165, 164, 164, 164, 164, 163, 163,
- 163, 163, 162, 162, 162, 162, 161, 161,
- 161, 161, 160, 160, 160, 160, 159, 159,
+ 31, 31, 31, 32, 32, 32, 32, 33,
+ 33, 33, 33, 34, 34, 34, 34, 35,
+ 35, 35, 35, 36, 36, 36, 36, 37,
+ 37, 37, 37, 38, 38, 38, 38, 39,
+ 39, 39, 39, 40, 40, 40, 40, 41,
+ 41, 41, 41, 42, 42, 42, 42, 43,
+ 43, 43, 43, 44, 44, 44, 44, 45,
+ 45, 45, 45, 46, 46, 46, 46, 47,
+ 47, 47, 47, 48, 48, 49, 49, 50,
+ 50, 51, 51, 52, 52, 53, 53, 54,
+ 54, 55, 55, 56, 56, 57, 57, 58,
+ 58, 59, 59, 60, 60, 61, 61, 62,
+ 62, 63, 63, 64, 65, 66, 67, 68,
+ 69, 70, 71, 72, 73, 74, 75, 76,
+ 77, 78, 79, 81, 83, 85, 87, 89,
+ 91, 93, 95, 99, 103, 107, 111, 119,
+ 255, 247, 239, 235, 231, 227, 223, 221,
+ 219, 217, 215, 213, 211, 209, 207, 206,
+ 205, 204, 203, 202, 201, 200, 199, 198,
+ 197, 196, 195, 194, 193, 192, 191, 191,
+ 190, 190, 189, 189, 188, 188, 187, 187,
+ 186, 186, 185, 185, 184, 184, 183, 183,
+ 182, 182, 181, 181, 180, 180, 179, 179,
+ 178, 178, 177, 177, 176, 176, 175, 175,
+ 175, 175, 174, 174, 174, 174, 173, 173,
+ 173, 173, 172, 172, 172, 172, 171, 171,
+ 171, 171, 170, 170, 170, 170, 169, 169,
+ 169, 169, 168, 168, 168, 168, 167, 167,
+ 167, 167, 166, 166, 166, 166, 165, 165,
+ 165, 165, 164, 164, 164, 164, 163, 163,
+ 163, 163, 162, 162, 162, 162, 161, 161,
+ 161, 161, 160, 160, 160, 160, 159, 159,
};
diff --git a/sys/i386/isa/sound/vat_audio.c b/sys/i386/isa/sound/vat_audio.c
index 255ed2a..74f0bdd 100644
--- a/sys/i386/isa/sound/vat_audio.c
+++ b/sys/i386/isa/sound/vat_audio.c
@@ -47,9 +47,9 @@
#define splaudio splclock
extern int sndopen (dev_t dev, int flags);
-extern int sndclose (dev_t dev, int flags);
+extern int sndclose (dev_t dev, int flags);
extern int sndioctl (dev_t dev, int cmd, void *arg, int mode);
-extern int sndread (int dev, struct uio *uio);
+extern int sndread (int dev, struct uio *uio);
extern int sndwrite (int dev, struct uio *uio);
struct va_softc {
@@ -195,7 +195,7 @@ vaopen(dev_t dev, int flags)
if (flags & FREAD) /* start the read process */
DMAbuf_start_input(va->rdev>>4);
-
+
return(0);
}
diff --git a/sys/i386/isa/spigot.c b/sys/i386/isa/spigot.c
index aef738d..bd19edb 100644
--- a/sys/i386/isa/spigot.c
+++ b/sys/i386/isa/spigot.c
@@ -23,7 +23,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * This is the minimum driver code required to make a spigot work.
+ * This is the minimum driver code required to make a spigot work.
* Unfortunatly, I can't include a real driver since the information
* on the spigot is under non-disclosure. You can pick up a library
* that will work with this driver from ftp://ftp.cs.uwm.edu/pub/FreeBSD.
@@ -73,7 +73,7 @@ struct spigot_softc {
} spigot_softc[NSPIGOT];
/* flags in softc */
-#define OPEN 0x01
+#define OPEN 0x01
#define UNIT(dev) minor(dev)
@@ -115,7 +115,7 @@ spigot_registerdev(struct isa_device *id)
}
int
-spigot_probe(struct isa_device *devp)
+spigot_probe(struct isa_device *devp)
{
int status;
diff --git a/sys/i386/isa/spkr.c b/sys/i386/isa/spkr.c
index 170abb8..4c1f128 100644
--- a/sys/i386/isa/spkr.c
+++ b/sys/i386/isa/spkr.c
@@ -4,7 +4,7 @@
* v1.4 by Eric S. Raymond (esr@snark.thyrsus.com) Aug 1993
* modified for FreeBSD by Andrew A. Chernov <ache@astral.msk.su>
*
- * $Id: spkr.c,v 1.12 1995/03/16 18:12:05 bde Exp $
+ * $Id: spkr.c,v 1.13 1995/05/05 06:15:11 davidg Exp $
*/
#include "speaker.h"
@@ -48,14 +48,14 @@
* | SC1 SC0 | RW1 RW0 | M2 M1 M0 | BCD |
* +----------+----------+---------------+-----+
* Counter Write Mode 3 Binary
- * Channel 2 LSB first, (Square Wave) Encoding
+ * Channel 2 LSB first, (Square Wave) Encoding
* MSB second
*/
#define PPI_SPKR 0x03 /* turn these PPI bits on to pass sound */
#define PIT_MODE 0xB6 /* set timer mode for sound generation */
/*
- * Magic numbers for timer control.
+ * Magic numbers for timer control.
*/
#define TIMER_CLK 1193180L /* corresponds to 18.2 MHz tick rate */
diff --git a/sys/i386/isa/syscons.c b/sys/i386/isa/syscons.c
index 123e2a9..19c572a 100644
--- a/sys/i386/isa/syscons.c
+++ b/sys/i386/isa/syscons.c
@@ -6,7 +6,7 @@
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer
+ * notice, this list of conditions and the following disclaimer
* in this position and unchanged.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
@@ -25,7 +25,7 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
- * $Id: syscons.c,v 1.115 1995/04/28 09:10:56 sos Exp $
+ * $Id: syscons.c,v 1.116 1995/05/21 18:30:05 sos Exp $
*/
#include "sc.h"
@@ -65,7 +65,7 @@
#endif
/* this may break on older VGA's but is usefull on real 32 bit systems */
-#define bcopyw bcopy
+#define bcopyw bcopy
static default_attr user_default = {
(FG_LIGHTGREY | BG_BLACK) << 8,
@@ -81,7 +81,7 @@ static scr_stat main_console;
static scr_stat *console[MAXCONS];
scr_stat *cur_console;
static scr_stat *new_scp, *old_scp;
-static term_stat kernel_console;
+static term_stat kernel_console;
static default_attr *current_default;
static char init_done = FALSE;
static int configuration = 0;
@@ -107,7 +107,7 @@ static char *video_mode_ptr = NULL;
static u_char kbd_reply = 0;
#endif
-static u_short mouse_and_mask[16] = {
+static u_short mouse_and_mask[16] = {
0xc000, 0xe000, 0xf000, 0xf800, 0xfc00, 0xfe00, 0xff00, 0xff80,
0xfe00, 0x1e00, 0x1f00, 0x0f00, 0x0f00, 0x0000, 0x0000, 0x0000
};
@@ -168,7 +168,7 @@ scprobe(struct isa_device *dev)
DELAY(10);
val = inb(KB_DATA);
if (val == KB_ACK || val == KB_ECHO)
- goto gotres;
+ goto gotres;
if (val == KB_RESEND)
break;
}
@@ -184,7 +184,7 @@ gotack:
val = inb(KB_DATA);
if (val == KB_ACK)
goto gotack;
- if (val != KB_RESET_DONE)
+ if (val != KB_RESET_DONE)
printf("scprobe: keyboard RESET failed %02x\n", val);
}
#ifdef XT_KEYBOARD
@@ -218,8 +218,8 @@ sc_registerdev(struct isa_device *id)
dev_attach(&kdc_sc[id->id_unit]);
}
-#if NAPM > 0
-static int
+#if NAPM > 0
+static int
scresume(void *dummy)
{
shfts = 0;
@@ -265,7 +265,7 @@ scattach(struct isa_device *dev)
bzero(scp->history_head, scp->history_size*sizeof(u_short));
/* initialize cursor stuff */
- draw_cursor(scp, TRUE);
+ draw_cursor(scp, TRUE);
if (crtc_vga && (configuration & CHAR_CURSOR))
set_destructive_cursor(scp, TRUE);
@@ -279,12 +279,12 @@ scattach(struct isa_device *dev)
if (crtc_vga)
if (crtc_addr == MONO_BASE)
printf("VGA mono");
- else
+ else
printf("VGA color");
else
if (crtc_addr == MONO_BASE)
printf("MDA/hercules");
- else
+ else
printf("CGA/EGA");
printf(" <%d virtual consoles, flags=0x%x>\n", MAXCONS, configuration);
@@ -298,7 +298,7 @@ scattach(struct isa_device *dev)
return 0;
}
-struct tty
+struct tty
*scdevtotty(dev_t dev)
{
int unit = minor(dev);
@@ -310,7 +310,7 @@ struct tty
return VIRTUAL_TTY(unit);
}
-static scr_stat
+static scr_stat
*get_scr_stat(dev_t dev)
{
int unit = minor(dev);
@@ -332,7 +332,7 @@ get_scr_num()
return i < MAXCONS ? i : 0;
}
-int
+int
scopen(dev_t dev, int flag, int mode, struct proc *p)
{
struct tty *tp = scdevtotty(dev);
@@ -352,8 +352,8 @@ scopen(dev_t dev, int flag, int mode, struct proc *p)
tp->t_ispeed = tp->t_ospeed = TTYDEF_SPEED;
scparam(tp, &tp->t_termios);
ttsetwater(tp);
- }
- else
+ }
+ else
if (tp->t_state & TS_XCLUDE && p->p_ucred->cr_uid != 0)
return(EBUSY);
tp->t_state |= TS_CARR_ON;
@@ -363,7 +363,7 @@ scopen(dev_t dev, int flag, int mode, struct proc *p)
return((*linesw[tp->t_line].l_open)(dev, tp));
}
-int
+int
scclose(dev_t dev, int flag, int mode, struct proc *p)
{
struct tty *tp = scdevtotty(dev);
@@ -382,8 +382,8 @@ scclose(dev_t dev, int flag, int mode, struct proc *p)
scp->smode.mode = VT_AUTO;
}
else {
- free(scp->scr_buf, M_DEVBUF);
- free(scp->history, M_DEVBUF);
+ free(scp->scr_buf, M_DEVBUF);
+ free(scp->history, M_DEVBUF);
free(scp, M_DEVBUF);
console[minor(dev)] = NULL;
}
@@ -394,11 +394,11 @@ scclose(dev_t dev, int flag, int mode, struct proc *p)
#endif
}
(*linesw[tp->t_line].l_close)(tp, flag);
- ttyclose(tp);
+ ttyclose(tp);
return(0);
}
-int
+int
scread(dev_t dev, struct uio *uio, int flag)
{
struct tty *tp = scdevtotty(dev);
@@ -408,7 +408,7 @@ scread(dev_t dev, struct uio *uio, int flag)
return((*linesw[tp->t_line].l_read)(tp, uio, flag));
}
-int
+int
scwrite(dev_t dev, struct uio *uio, int flag)
{
struct tty *tp = scdevtotty(dev);
@@ -418,7 +418,7 @@ scwrite(dev_t dev, struct uio *uio, int flag)
return((*linesw[tp->t_line].l_write)(tp, uio, flag));
}
-void
+void
scintr(int unit)
{
static struct tty *cur_tty;
@@ -461,10 +461,10 @@ scintr(int unit)
(*linesw[cur_tty->t_line].l_rint)('[', cur_tty);
(*linesw[cur_tty->t_line].l_rint)('Z', cur_tty);
break;
- }
+ }
}
-int
+int
scparam(struct tty *tp, struct termios *t)
{
tp->t_ispeed = t->c_ispeed;
@@ -473,13 +473,13 @@ scparam(struct tty *tp, struct termios *t)
return 0;
}
-int
+int
scioctl(dev_t dev, int cmd, caddr_t data, int flag, struct proc *p)
{
int i, error;
struct tty *tp;
struct trapframe *fp;
- scr_stat *scp;
+ scr_stat *scp;
tp = scdevtotty(dev);
if (!tp)
@@ -498,14 +498,14 @@ scioctl(dev_t dev, int cmd, caddr_t data, int flag, struct proc *p)
else
*(int*)data = 0;
return 0;
-
+
case CONS_CURRENT: /* get current adapter type */
if (crtc_vga)
*(int*)data = KD_VGA;
else
if (crtc_addr == MONO_BASE)
*(int*)data = KD_MONO;
- else
+ else
*(int*)data = KD_CGA;
return 0;
@@ -538,7 +538,7 @@ scioctl(dev_t dev, int cmd, caddr_t data, int flag, struct proc *p)
case CONS_HISTORY: /* set history size */
if (*data) {
- free(scp->history, M_DEVBUF);
+ free(scp->history, M_DEVBUF);
scp->history_size = *(int*)data;
if (scp->history_size < scp->ysize)
scp->history = NULL;
@@ -604,7 +604,7 @@ set_mouse_pos:
scp->mouse_xpos = (scp->xsize*8)-1;
if (scp->mouse_ypos >= scp->ysize*fontsize)
scp->mouse_ypos = (scp->ysize*fontsize)-1;
- scp->mouse_pos = scp->scr_buf +
+ scp->mouse_pos = scp->scr_buf +
(scp->mouse_ypos/fontsize)*scp->xsize + scp->mouse_xpos/8;
if (scp->status & MOUSE_ENABLED)
scp->status |= UPDATE_MOUSE;
@@ -664,7 +664,7 @@ set_mouse_pos:
case SW_VGA_C80x60: case SW_VGA_M80x60:
case SW_B40x25: case SW_C40x25:
case SW_B80x25: case SW_C80x25:
- case SW_ENH_B40x25: case SW_ENH_C40x25:
+ case SW_ENH_B40x25: case SW_ENH_C40x25:
case SW_ENH_B80x25: case SW_ENH_C80x25:
case SW_ENH_B80x43: case SW_ENH_C80x43:
@@ -696,26 +696,26 @@ set_mouse_pos:
default:
if ((cmd & 0xff) > M_VGA_CG320)
return EINVAL;
- else
+ else
scp->xsize = *(video_mode_ptr+((cmd&0xff)*64));
scp->ysize = *(video_mode_ptr+((cmd&0xff)*64)+1)+1;
break;
}
scp->mode = cmd & 0xff;
scp->status &= ~UNKNOWN_MODE; /* text mode */
- free(scp->scr_buf, M_DEVBUF);
+ free(scp->scr_buf, M_DEVBUF);
scp->scr_buf = (u_short *)malloc(scp->xsize*scp->ysize*sizeof(u_short),
M_DEVBUF, M_NOWAIT);
if (scp == cur_console)
set_mode(scp);
clear_screen(scp);
- if (tp->t_winsize.ws_col != scp->xsize
+ if (tp->t_winsize.ws_col != scp->xsize
|| tp->t_winsize.ws_row != scp->ysize) {
tp->t_winsize.ws_col = scp->xsize;
tp->t_winsize.ws_row = scp->ysize;
pgsignal(tp->t_pgrp, SIGWINCH, 1);
}
- return 0;
+ return 0;
/* GRAPHICS MODES */
case SW_BG320: case SW_BG640:
@@ -733,7 +733,7 @@ set_mouse_pos:
set_mode(scp);
/* clear_graphics();*/
- if (tp->t_winsize.ws_xpixel != scp->xsize
+ if (tp->t_winsize.ws_xpixel != scp->xsize
|| tp->t_winsize.ws_ypixel != scp->ysize) {
tp->t_winsize.ws_xpixel = scp->xsize;
tp->t_winsize.ws_ypixel = scp->ysize;
@@ -748,11 +748,11 @@ set_mouse_pos:
scp->pid = scp->proc->p_pid;
}
return 0;
-
+
case VT_GETMODE: /* get screen switcher mode */
bcopy(&scp->smode, data, sizeof(struct vt_mode));
return 0;
-
+
case VT_RELDISP: /* screen switcher ioctl */
switch(*data) {
case VT_FALSE: /* user refuses to release screen, abort */
@@ -771,7 +771,7 @@ set_mouse_pos:
new_scp->status |= SWITCH_WAIT_ACQ;
psignal(new_scp->proc, new_scp->smode.acqsig);
}
- else
+ else
switch_in_progress = FALSE;
return 0;
}
@@ -797,24 +797,24 @@ set_mouse_pos:
*data = i + 1;
return 0;
}
- }
+ }
return EINVAL;
case VT_ACTIVATE: /* switch to screen *data */
return switch_scr(scp, (*data) - 1);
case VT_WAITACTIVE: /* wait for switch to occur */
- if (*data > MAXCONS || *data < 0)
+ if (*data > MAXCONS || *data < 0)
return EINVAL;
- if (minor(dev) == (*data) - 1)
+ if (minor(dev) == (*data) - 1)
return 0;
if (*data == 0) {
if (scp == cur_console)
return 0;
}
- else
+ else
scp = console[(*data) - 1];
- while ((error=tsleep((caddr_t)&scp->smode, PZERO|PCATCH,
+ while ((error=tsleep((caddr_t)&scp->smode, PZERO|PCATCH,
"waitvt", 0)) == ERESTART) ;
return error;
@@ -825,7 +825,7 @@ set_mouse_pos:
case KDENABIO: /* allow io operations */
fp = (struct trapframe *)p->p_md.md_regs;
fp->tf_eflags |= PSL_IOPL;
- return 0;
+ return 0;
case KDDISABIO: /* disallow io operations (default) */
fp = (struct trapframe *)p->p_md.md_regs;
@@ -873,7 +873,7 @@ set_mouse_pos:
if (!crtc_vga)
return ENXIO;
scp->border = *data;
- if (scp == cur_console)
+ if (scp == cur_console)
set_border(scp->border);
return 0;
@@ -881,7 +881,7 @@ set_mouse_pos:
if (*data >= 0 && *data <= LOCK_KEY_MASK) {
scp->status &= ~LOCK_KEY_MASK;
scp->status |= *data;
- if (scp == cur_console)
+ if (scp == cur_console)
update_leds(scp->status);
return 0;
}
@@ -984,7 +984,7 @@ set_mouse_pos:
case SETFKEY: /* set functionkey string */
if (*(u_short*)data < n_fkey_tab) {
fkeyarg_t *ptr = (fkeyarg_t*)data;
- bcopy(ptr->keydef, &fkey_tab[ptr->keynum].str,
+ bcopy(ptr->keydef, &fkey_tab[ptr->keynum].str,
min(ptr->flen, MAXFK));
fkey_tab[ptr->keynum].len = min(ptr->flen, MAXFK);
return 0;
@@ -1069,8 +1069,8 @@ set_mouse_pos:
return ENXIO;
default:
break;
- }
-
+ }
+
error = (*linesw[tp->t_line].l_ioctl)(tp, cmd, data, flag, p);
if (error >= 0)
return(error);
@@ -1080,7 +1080,7 @@ set_mouse_pos:
return(ENOTTY);
}
-void
+void
scxint(dev_t dev)
{
struct tty *tp = scdevtotty(dev);
@@ -1094,7 +1094,7 @@ scxint(dev_t dev)
scstart(tp);
}
-void
+void
scstart(struct tty *tp)
{
struct clist *rbp;
@@ -1126,7 +1126,7 @@ scstart(struct tty *tp)
splx(s);
}
-void
+void
pccnprobe(struct consdev *cp)
{
int maj;
@@ -1141,13 +1141,13 @@ pccnprobe(struct consdev *cp)
cp->cn_pri = CN_INTERNAL;
}
-void
+void
pccninit(struct consdev *cp)
{
scinit();
}
-void
+void
pccnputc(dev_t dev, int c)
{
u_char buf[1];
@@ -1169,7 +1169,7 @@ pccnputc(dev_t dev, int c)
scp->term = save;
if (scp == cur_console /* && scrn_timer not running */) {
if (scp->scr_buf != Crtat && (scp->start <= scp->end)) {
- bcopyw(scp->scr_buf + scp->start, Crtat + scp->start,
+ bcopyw(scp->scr_buf + scp->start, Crtat + scp->start,
(1 + scp->end - scp->start) * sizeof(u_short));
scp->start = scp->xsize * scp->ysize;
scp->end = 0;
@@ -1179,7 +1179,7 @@ pccnputc(dev_t dev, int c)
}
}
-int
+int
pccngetc(dev_t dev)
{
int s = spltty(); /* block scintr while we poll */
@@ -1188,13 +1188,13 @@ pccngetc(dev_t dev)
return(c);
}
-int
+int
pccncheckc(dev_t dev)
{
return (scgetc(1) & 0xff);
}
-static void
+static void
scrn_timer()
{
static int cursor_blinkrate;
@@ -1205,11 +1205,11 @@ scrn_timer()
timeout((timeout_func_t)scrn_timer, 0, hz/10);
return;
}
-
+
if (!scrn_blanked) {
/* update screen image */
if (scp->start <= scp->end) {
- bcopyw(scp->scr_buf + scp->start, Crtat + scp->start,
+ bcopyw(scp->scr_buf + scp->start, Crtat + scp->start,
(1 + scp->end - scp->start) * sizeof(u_short));
scp->status &= ~CURSOR_SHOWN;
scp->start = scp->xsize * scp->ysize;
@@ -1229,7 +1229,7 @@ scrn_timer()
timeout((timeout_func_t)scrn_timer, 0, hz/25);
}
-static void
+static void
clear_screen(scr_stat *scp)
{
move_crsr(scp, 0, 0);
@@ -1238,14 +1238,14 @@ clear_screen(scr_stat *scp)
mark_all(scp);
}
-static int
+static int
switch_scr(scr_stat *scp, u_int next_scr)
{
if (switch_in_progress && (cur_console->proc != pfind(cur_console->pid)))
switch_in_progress = FALSE;
- if (next_scr >= MAXCONS || switch_in_progress ||
- (cur_console->smode.mode == VT_AUTO
+ if (next_scr >= MAXCONS || switch_in_progress ||
+ (cur_console->smode.mode == VT_AUTO
&& cur_console->status & UNKNOWN_MODE)) {
do_bell(scp, BELL_PITCH, BELL_DURATION);
return EINVAL;
@@ -1273,7 +1273,7 @@ switch_scr(scr_stat *scp, u_int next_scr)
delayed_next_scr = FALSE;
return 0;
}
-
+
/* has controlling process died? */
if (old_scp->proc && (old_scp->proc != pfind(old_scp->pid)))
old_scp->smode.mode = VT_AUTO;
@@ -1297,8 +1297,8 @@ switch_scr(scr_stat *scp, u_int next_scr)
return 0;
}
-static void
-exchange_scr(void)
+static void
+exchange_scr(void)
{
move_crsr(old_scp, old_scp->xpos, old_scp->ypos);
cur_console = new_scp;
@@ -1327,7 +1327,7 @@ exchange_scr(void)
new_scp->status &= ~CURSOR_SHOWN;
}
-static inline void
+static inline void
move_crsr(scr_stat *scp, int x, int y)
{
if (x < 0 || y < 0 || x >= scp->xsize || y >= scp->ysize)
@@ -1339,10 +1339,10 @@ move_crsr(scr_stat *scp, int x, int y)
mark_for_update(scp, scp->cursor_pos - scp->scr_buf);
}
-static void
+static void
scan_esc(scr_stat *scp, u_char c)
{
- static u_char ansi_col[16] =
+ static u_char ansi_col[16] =
{0, 4, 2, 6, 1, 5, 3, 7, 8, 12, 10, 14, 9, 13, 11, 15};
int i, n;
u_short *src, *dst, count;
@@ -1364,7 +1364,7 @@ scan_esc(scr_stat *scp, u_char c)
else {
bcopyw(scp->scr_buf, scp->scr_buf + scp->xsize,
(scp->ysize - 1) * scp->xsize * sizeof(u_short));
- fillw(scp->term.cur_attr | scr_map[0x20],
+ fillw(scp->term.cur_attr | scr_map[0x20],
scp->scr_buf, scp->xsize);
mark_all(scp);
}
@@ -1440,7 +1440,7 @@ scan_esc(scr_stat *scp, u_char c)
case 'f': /* Cursor move */
case 'H':
- if (scp->term.num_param == 0)
+ if (scp->term.num_param == 0)
move_crsr(scp, 0, 0);
else if (scp->term.num_param == 2)
move_crsr(scp, scp->term.param[1] - 1, scp->term.param[0] - 1);
@@ -1454,14 +1454,14 @@ scan_esc(scr_stat *scp, u_char c)
switch (n) {
case 0: /* clear form cursor to end of display */
fillw(scp->term.cur_attr | scr_map[0x20],
- scp->cursor_pos,
+ scp->cursor_pos,
scp->scr_buf + scp->xsize * scp->ysize - scp->cursor_pos);
mark_for_update(scp, scp->cursor_pos - scp->scr_buf);
mark_for_update(scp, scp->xsize * scp->ysize);
break;
case 1: /* clear from beginning of display to cursor */
fillw(scp->term.cur_attr | scr_map[0x20],
- scp->scr_buf,
+ scp->scr_buf,
scp->cursor_pos - scp->scr_buf);
mark_for_update(scp, 0);
mark_for_update(scp, scp->cursor_pos - scp->scr_buf);
@@ -1480,21 +1480,21 @@ scan_esc(scr_stat *scp, u_char c)
switch (n) {
case 0: /* clear form cursor to end of line */
fillw(scp->term.cur_attr | scr_map[0x20],
- scp->cursor_pos,
+ scp->cursor_pos,
scp->xsize - scp->xpos);
mark_for_update(scp, scp->cursor_pos - scp->scr_buf);
mark_for_update(scp, scp->cursor_pos - scp->scr_buf +
scp->xsize - scp->xpos);
break;
case 1: /* clear from beginning of line to cursor */
- fillw(scp->term.cur_attr|scr_map[0x20],
+ fillw(scp->term.cur_attr|scr_map[0x20],
scp->cursor_pos - (scp->xsize - scp->xpos),
(scp->xsize - scp->xpos) + 1);
mark_for_update(scp, scp->ypos * scp->xsize);
mark_for_update(scp, scp->cursor_pos - scp->scr_buf);
break;
case 2: /* clear entire line */
- fillw(scp->term.cur_attr|scr_map[0x20],
+ fillw(scp->term.cur_attr|scr_map[0x20],
scp->cursor_pos - (scp->xsize - scp->xpos),
scp->xsize);
mark_for_update(scp, scp->ypos * scp->xsize);
@@ -1563,11 +1563,11 @@ scan_esc(scr_stat *scp, u_char c)
n = scp->term.param[0]; if (n < 1) n = 1;
if (n > scp->ysize)
n = scp->ysize;
- bcopyw(scp->scr_buf + (scp->xsize * n),
- scp->scr_buf,
+ bcopyw(scp->scr_buf + (scp->xsize * n),
+ scp->scr_buf,
scp->xsize * (scp->ysize - n) * sizeof(u_short));
fillw(scp->term.cur_attr | scr_map[0x20],
- scp->scr_buf + scp->xsize * (scp->ysize - n),
+ scp->scr_buf + scp->xsize * (scp->ysize - n),
scp->xsize * n);
mark_all(scp);
break;
@@ -1576,11 +1576,11 @@ scan_esc(scr_stat *scp, u_char c)
n = scp->term.param[0]; if (n < 1) n = 1;
if (n > scp->ysize)
n = scp->ysize;
- bcopyw(scp->scr_buf,
+ bcopyw(scp->scr_buf,
scp->scr_buf + (scp->xsize * n),
- scp->xsize * (scp->ysize - n) *
+ scp->xsize * (scp->ysize - n) *
sizeof(u_short));
- fillw(scp->term.cur_attr | scr_map[0x20],
+ fillw(scp->term.cur_attr | scr_map[0x20],
scp->scr_buf, scp->xsize * n);
mark_all(scp);
break;
@@ -1589,8 +1589,8 @@ scan_esc(scr_stat *scp, u_char c)
n = scp->term.param[0]; if (n < 1) n = 1;
if (n > scp->xsize - scp->xpos)
n = scp->xsize - scp->xpos;
- fillw(scp->term.cur_attr | scr_map[0x20],
- scp->scr_buf + scp->xpos +
+ fillw(scp->term.cur_attr | scr_map[0x20],
+ scp->scr_buf + scp->xpos +
((scp->xsize*scp->ypos) * sizeof(u_short)), n);
mark_for_update(scp, scp->cursor_pos - scp->scr_buf);
mark_for_update(scp, scp->cursor_pos - scp->scr_buf + n);
@@ -1600,9 +1600,9 @@ scan_esc(scr_stat *scp, u_char c)
n = scp->term.param[0]; if (n < 1) n = 1;
if ((i = scp->xpos & 0xf8) == scp->xpos)
i -= 8*n;
- else
- i -= 8*(n-1);
- if (i < 0)
+ else
+ i -= 8*(n-1);
+ if (i < 0)
i = 0;
move_crsr(scp, i, scp->ypos);
break;
@@ -1653,15 +1653,15 @@ scan_esc(scr_stat *scp, u_char c)
scp->term.cur_attr = scp->term.rev_attr;
break;
case 30: case 31: /* set fg color */
- case 32: case 33: case 34:
+ case 32: case 33: case 34:
case 35: case 36: case 37:
- scp->term.cur_attr =
+ scp->term.cur_attr =
(scp->term.cur_attr&0xF8FF) | (ansi_col[(n-30)&7]<<8);
break;
case 40: case 41: /* set bg color */
- case 42: case 43: case 44:
+ case 42: case 43: case 44:
case 45: case 46: case 47:
- scp->term.cur_attr =
+ scp->term.cur_attr =
(scp->term.cur_attr&0x8FFF) | (ansi_col[(n-40)&7]<<12);
break;
}
@@ -1680,12 +1680,12 @@ scan_esc(scr_stat *scp, u_char c)
scp->term.rev_attr = current_default->rev_attr;
break;
case 1: /* set ansi background */
- scp->term.cur_attr = scp->term.std_attr =
+ scp->term.cur_attr = scp->term.std_attr =
(scp->term.std_attr & 0x0F00) |
(ansi_col[(scp->term.param[1])&0x0F]<<12);
break;
case 2: /* set ansi foreground */
- scp->term.cur_attr = scp->term.std_attr =
+ scp->term.cur_attr = scp->term.std_attr =
(scp->term.std_attr & 0xF000) |
(ansi_col[(scp->term.param[1])&0x0F]<<8);
break;
@@ -1694,12 +1694,12 @@ scan_esc(scr_stat *scp, u_char c)
(scp->term.param[1]&0xFF)<<8;
break;
case 5: /* set ansi reverse video background */
- scp->term.rev_attr =
+ scp->term.rev_attr =
(scp->term.rev_attr & 0x0F00) |
(ansi_col[(scp->term.param[1])&0x0F]<<12);
break;
case 6: /* set ansi reverse video foreground */
- scp->term.rev_attr =
+ scp->term.rev_attr =
(scp->term.rev_attr & 0xF000) |
(ansi_col[(scp->term.param[1])&0x0F]<<8);
break;
@@ -1764,38 +1764,38 @@ scan_esc(scr_stat *scp, u_char c)
configuration &= ~CHAR_CURSOR;
}
else if (scp->term.num_param == 2) {
- scp->cursor_start = scp->term.param[0] & 0x1F;
- scp->cursor_end = scp->term.param[1] & 0x1F;
+ scp->cursor_start = scp->term.param[0] & 0x1F;
+ scp->cursor_end = scp->term.param[1] & 0x1F;
if (configuration & CHAR_CURSOR)
set_destructive_cursor(scp, TRUE);
}
break;
case 'F': /* set ansi foreground */
- if (scp->term.num_param == 1)
- scp->term.cur_attr = scp->term.std_attr =
- (scp->term.std_attr & 0xF000)
+ if (scp->term.num_param == 1)
+ scp->term.cur_attr = scp->term.std_attr =
+ (scp->term.std_attr & 0xF000)
| ((scp->term.param[0] & 0x0F) << 8);
break;
case 'G': /* set ansi background */
- if (scp->term.num_param == 1)
- scp->term.cur_attr = scp->term.std_attr =
- (scp->term.std_attr & 0x0F00)
+ if (scp->term.num_param == 1)
+ scp->term.cur_attr = scp->term.std_attr =
+ (scp->term.std_attr & 0x0F00)
| ((scp->term.param[0] & 0x0F) << 12);
break;
case 'H': /* set ansi reverse video foreground */
- if (scp->term.num_param == 1)
- scp->term.rev_attr =
- (scp->term.rev_attr & 0xF000)
+ if (scp->term.num_param == 1)
+ scp->term.rev_attr =
+ (scp->term.rev_attr & 0xF000)
| ((scp->term.param[0] & 0x0F) << 8);
break;
case 'I': /* set ansi reverse video background */
- if (scp->term.num_param == 1)
- scp->term.rev_attr =
- (scp->term.rev_attr & 0x0F00)
+ if (scp->term.num_param == 1)
+ scp->term.rev_attr =
+ (scp->term.rev_attr & 0x0F00)
| ((scp->term.param[0] & 0x0F) << 12);
break;
}
@@ -1803,7 +1803,7 @@ scan_esc(scr_stat *scp, u_char c)
scp->term.esc = 0;
}
-static inline void
+static inline void
draw_cursor(scr_stat *scp, int show)
{
if (show && !(scp->status & CURSOR_SHOWN)) {
@@ -1836,12 +1836,12 @@ draw_cursor(scr_stat *scp, int show)
}
}
-static void
+static void
ansi_put(scr_stat *scp, u_char *buf, int len)
{
u_char *ptr = buf;
- if (scp->status & UNKNOWN_MODE)
+ if (scp->status & UNKNOWN_MODE)
return;
/* make screensaver happy */
@@ -1945,7 +1945,7 @@ outloop:
bcopyw(scp->scr_buf + scp->xsize, scp->scr_buf,
scp->xsize * (scp->ysize - 1) * sizeof(u_short));
fillw(scp->term.cur_attr | scr_map[0x20],
- scp->scr_buf + scp->xsize * (scp->ysize - 1),
+ scp->scr_buf + scp->xsize * (scp->ysize - 1),
scp->xsize);
scp->cursor_pos -= scp->xsize;
scp->ypos--;
@@ -1958,14 +1958,14 @@ outloop:
switch_scr(scp, delayed_next_scr - 1);
}
-static void
+static void
scinit(void)
{
u_short volatile *cp = Crtat + (CGA_BUF-MONO_BUF)/sizeof(u_short), was;
unsigned hw_cursor;
int i;
- if (init_done)
+ if (init_done)
return;
init_done = TRUE;
/*
@@ -2033,7 +2033,7 @@ scinit(void)
scr_map[i] = i;
}
-static scr_stat
+static scr_stat
*alloc_scp()
{
scr_stat *scp;
@@ -2081,7 +2081,7 @@ init_scp(scr_stat *scp)
scp->history_size = HISTORY_SIZE;
}
-static u_char
+static u_char
*get_fstr(u_int c, u_int *len)
{
u_int i;
@@ -2095,7 +2095,7 @@ static u_char
return(fkey_tab[i].str);
}
-static void
+static void
update_leds(int which)
{
int s;
@@ -2113,14 +2113,14 @@ update_leds(int which)
kbd_cmd(xlate_leds[which & LED_MASK]);
splx(s);
}
-
+
static void
history_to_screen(scr_stat *scp)
{
int i;
for (i=0; i<scp->ysize; i++)
- bcopyw(scp->history + (((scp->history_pos - scp->history) +
+ bcopyw(scp->history + (((scp->history_pos - scp->history) +
scp->history_size-((i+1)*scp->xsize))%scp->history_size),
scp->scr_buf + (scp->xsize * (scp->ysize-1 - i)),
scp->xsize * sizeof(u_short));
@@ -2153,11 +2153,11 @@ history_down_line(scr_stat *scp)
}
/*
- * scgetc(noblock) - get character from keyboard.
+ * scgetc(noblock) - get character from keyboard.
* If noblock = 0 wait until a key is pressed.
* Else return NOKEY.
*/
-u_int
+u_int
scgetc(int noblock)
{
u_char scancode, keycode;
@@ -2192,9 +2192,9 @@ next_code:
switch(scancode) {
case 0xB8: /* left alt (compose key) */
if (compose) {
- compose = 0;
+ compose = 0;
if (chr > 255) {
- do_bell(cur_console,
+ do_bell(cur_console,
BELL_PITCH, BELL_DURATION);
chr = 0;
}
@@ -2209,7 +2209,7 @@ next_code:
case 0xE0:
case 0xE1:
esc_flag = scancode;
- goto next_code;
+ goto next_code;
}
break;
case 0xE0: /* 0xE0 prefix */
@@ -2276,13 +2276,13 @@ next_code:
}
break;
case 0xE1: /* 0xE1 prefix */
- esc_flag = 0;
+ esc_flag = 0;
if (keycode == 0x1D)
esc_flag = 0x1D;
goto next_code;
/* NOT REACHED */
case 0x1D: /* pause / break */
- esc_flag = 0;
+ esc_flag = 0;
if (keycode != 0x45)
goto next_code;
keycode = 0x68;
@@ -2300,7 +2300,7 @@ next_code:
/* copy screen into top of history buffer */
for (i=0; i<cur_console->ysize; i++) {
- bcopyw(cur_console->scr_buf + (cur_console->xsize * i),
+ bcopyw(cur_console->scr_buf + (cur_console->xsize * i),
cur_console->history_head,
cur_console->xsize * sizeof(u_short));
cur_console->history_head += cur_console->xsize;
@@ -2319,7 +2319,7 @@ next_code:
case 0x4F: /* end key */
cur_console->history_pos =
- WRAPHIST(cur_console, cur_console->history_head,
+ WRAPHIST(cur_console, cur_console->history_head,
cur_console->xsize*cur_console->ysize);
history_to_screen(cur_console);
goto next_code;
@@ -2358,10 +2358,10 @@ next_code:
case 0x47: case 0x48: case 0x49: /* keypad 7,8,9 */
chr = (scancode - 0x40) + chr*10;
goto next_code;
- case 0x4B: case 0x4C: case 0x4D: /* keypad 4,5,6 */
+ case 0x4B: case 0x4C: case 0x4D: /* keypad 4,5,6 */
chr = (scancode - 0x47) + chr*10;
goto next_code;
- case 0x4F: case 0x50: case 0x51: /* keypad 1,2,3 */
+ case 0x4F: case 0x50: case 0x51: /* keypad 1,2,3 */
chr = (scancode - 0x4E) + chr*10;
goto next_code;
case 0x52: /* keypad 0 */
@@ -2370,8 +2370,8 @@ next_code:
/* key release, no interest here */
case 0xC7: case 0xC8: case 0xC9: /* keypad 7,8,9 */
- case 0xCB: case 0xCC: case 0xCD: /* keypad 4,5,6 */
- case 0xCF: case 0xD0: case 0xD1: /* keypad 1,2,3 */
+ case 0xCB: case 0xCC: case 0xCD: /* keypad 4,5,6 */
+ case 0xCF: case 0xD0: case 0xD1: /* keypad 1,2,3 */
case 0xD2: /* keypad 0 */
goto next_code;
@@ -2381,12 +2381,12 @@ next_code:
if (chr) {
compose = chr = 0;
do_bell(cur_console, BELL_PITCH, BELL_DURATION);
- goto next_code;
+ goto next_code;
}
break;
}
}
-
+
state = (shfts ? 1 : 0 ) | (2 * (ctls ? 1 : 0)) | (4 * (alts ? 1 : 0));
if ((!agrs && (cur_console->status & ALKED))
|| (agrs && !(cur_console->status & ALKED)))
@@ -2420,7 +2420,7 @@ next_code:
alts &= ~2;
break;
case NLK:
- nlkcnt = 0;
+ nlkcnt = 0;
break;
case CLK:
clkcnt = 0;
@@ -2452,7 +2452,7 @@ next_code:
case NLK:
if (!nlkcnt) {
nlkcnt++;
- if (cur_console->status & NLKED)
+ if (cur_console->status & NLKED)
cur_console->status &= ~NLKED;
else
cur_console->status |= NLKED;
@@ -2479,7 +2479,7 @@ next_code:
u_short *ptr = cur_console->history_save;
for (i=0; i<cur_console->ysize; i++) {
- bcopyw(ptr,
+ bcopyw(ptr,
cur_console->scr_buf +
(cur_console->xsize*i),
cur_console->xsize * sizeof(u_short));
@@ -2495,8 +2495,8 @@ next_code:
mark_all(cur_console);
}
scstart(VIRTUAL_TTY(get_scr_num()));
- }
- else
+ }
+ else
cur_console->status |= SLKED;
update_leds(cur_console->status);
}
@@ -2517,9 +2517,9 @@ next_code:
break;
case RBT:
shutdown_nice();
- break;
+ break;
case SUSP:
-#if NAPM > 0
+#if NAPM > 0
apm_suspend();
#endif
break;
@@ -2528,7 +2528,7 @@ next_code:
#ifdef DDB /* try to switch to console 0 */
if (cur_console->smode.mode == VT_AUTO &&
console[0]->smode.mode == VT_AUTO)
- switch_scr(cur_console, 0);
+ switch_scr(cur_console, 0);
Debugger("manual escape to debugger");
return(NOKEY);
#else
@@ -2569,7 +2569,7 @@ next_code:
switch_scr(cur_console, action - F_SCR);
break;
}
- if (action >= F_FN && action <= L_FN)
+ if (action >= F_FN && action <= L_FN)
action |= FKEY;
return(action);
}
@@ -2583,7 +2583,7 @@ next_code:
goto next_code;
}
-int
+int
scmmap(dev_t dev, int offset, int nprot)
{
if (offset > 0x20000 - PAGE_SIZE)
@@ -2591,19 +2591,19 @@ scmmap(dev_t dev, int offset, int nprot)
return i386_btop((VIDEOMEM + offset));
}
-static void
+static void
kbd_wait(void)
{
int i = 1000;
while (i--) {
- if ((inb(KB_STAT) & KB_READY) == 0)
+ if ((inb(KB_STAT) & KB_READY) == 0)
break;
DELAY (10);
}
}
-static void
+static void
kbd_cmd(u_char command)
{
int retry = 5;
@@ -2637,7 +2637,7 @@ kbd_cmd(u_char command)
} while (retry--);
}
-static void
+static void
set_mode(scr_stat *scp)
{
char *modetable;
@@ -2649,11 +2649,11 @@ set_mode(scr_stat *scp)
/* setup video hardware for the given mode */
switch (scp->mode) {
- case M_VGA_M80x60:
+ case M_VGA_M80x60:
bcopyw(video_mode_ptr+(64*M_VGA_M80x25),&special_modetable, 64);
goto special_80x60;
- case M_VGA_C80x60:
+ case M_VGA_C80x60:
bcopyw(video_mode_ptr+(64*M_VGA_C80x25),&special_modetable, 64);
special_80x60:
special_modetable[2] = 0x08;
@@ -2673,7 +2673,7 @@ special_480l:
special_modetable[16] = 0x08;
special_modetable[17] = 0x3e;
special_modetable[26] = 0xea;
- special_modetable[28] = 0xdf;
+ special_modetable[28] = 0xdf;
special_modetable[31] = 0xe7;
special_modetable[32] = 0x04;
modetable = special_modetable;
@@ -2685,17 +2685,17 @@ special_480l:
case M_ENH_C80x43:
bcopyw(video_mode_ptr+(64*M_ENH_C80x25),&special_modetable, 64);
-special_80x43:
+special_80x43:
special_modetable[28] = 87;
goto special_80x50;
- case M_VGA_M80x50:
+ case M_VGA_M80x50:
bcopyw(video_mode_ptr+(64*M_VGA_M80x25),&special_modetable, 64);
goto special_80x50;
case M_VGA_C80x50:
bcopyw(video_mode_ptr+(64*M_VGA_C80x25),&special_modetable, 64);
-special_80x50:
+special_80x50:
special_modetable[2] = 8;
special_modetable[19] = 7;
modetable = special_modetable;
@@ -2737,7 +2737,7 @@ setup_mode:
case M_CG320_D: case M_CG640_E:
case M_CG640x350: case M_ENH_CG640:
case M_BG640x480: case M_CG640x480: case M_VGA_CG320:
-
+
set_vgaregs(video_mode_ptr + (scp->mode * 64));
break;
@@ -2751,11 +2751,11 @@ setup_mode:
return;
}
-void
+void
set_border(int color)
{
inb(crtc_addr+6); /* reset flip-flop */
- outb(ATC, 0x11); outb(ATC, color);
+ outb(ATC, 0x11); outb(ATC, color);
inb(crtc_addr+6); /* reset flip-flop */
outb(ATC, 0x20); /* enable Palette */
}
@@ -2768,7 +2768,7 @@ set_vgaregs(char *modetable)
outb(TSIDX, 0x00); outb(TSREG, 0x01); /* stop sequencer */
outb(TSIDX, 0x07); outb(TSREG, 0x00); /* unlock registers */
for (i=0; i<4; i++) { /* program sequencer */
- outb(TSIDX, i+1);
+ outb(TSIDX, i+1);
outb(TSREG, modetable[i+5]);
}
outb(MISC, modetable[9]); /* set dot-clock */
@@ -2776,7 +2776,7 @@ set_vgaregs(char *modetable)
outb(crtc_addr, 0x11);
outb(crtc_addr+1, inb(crtc_addr+1) & 0x7F);
for (i=0; i<25; i++) { /* program crtc */
- outb(crtc_addr, i);
+ outb(crtc_addr, i);
if (i == 14 || i == 15) /* no hardware cursor */
outb(crtc_addr+1, 0xff);
else
@@ -2784,11 +2784,11 @@ set_vgaregs(char *modetable)
}
inb(crtc_addr+6); /* reset flip-flop */
for (i=0; i<20; i++) { /* program attribute ctrl */
- outb(ATC, i);
+ outb(ATC, i);
outb(ATC, modetable[i+35]);
}
for (i=0; i<9; i++) { /* program graph data ctrl */
- outb(GDCIDX, i);
+ outb(GDCIDX, i);
outb(GDCREG, modetable[i+55]);
}
inb(crtc_addr+6); /* reset flip-flop */
@@ -2807,7 +2807,7 @@ set_font_mode()
outb(TSIDX, 0x04); outb(TSREG, 0x06);
outb(GDCIDX, 0x04); outb(GDCREG, 0x02);
outb(GDCIDX, 0x05); outb(GDCREG, 0x00);
- outb(GDCIDX, 0x06); outb(GDCREG, 0x05);
+ outb(GDCIDX, 0x06); outb(GDCREG, 0x05);
#else
outw(TSIDX, 0x0402);
outw(TSIDX, 0x0604);
@@ -2849,7 +2849,7 @@ set_normal_mode()
splx(s);
}
-static void
+static void
copy_font(int operation, int font_type, char* font_image)
{
int ch, line, segment, fontsize;
@@ -2873,11 +2873,11 @@ copy_font(int operation, int font_type, char* font_image)
outb(TSIDX, 0x01); val = inb(TSREG); /* disable screen */
outb(TSIDX, 0x01); outb(TSREG, val | 0x20);
set_font_mode();
- for (ch=0; ch < 256; ch++)
- for (line=0; line < fontsize; line++)
+ for (ch=0; ch < 256; ch++)
+ for (line=0; line < fontsize; line++)
if (operation)
*(char *)pa_to_va(VIDEOMEM+(segment)+(ch*32)+line) =
- font_image[(ch*fontsize)+line];
+ font_image[(ch*fontsize)+line];
else
font_image[(ch*fontsize)+line] =
*(char *)pa_to_va(VIDEOMEM+(segment)+(ch*32)+line);
@@ -2885,7 +2885,7 @@ copy_font(int operation, int font_type, char* font_image)
outb(TSIDX, 0x01); outb(TSREG, val & 0xDF); /* enable screen */
}
-static void
+static void
set_destructive_cursor(scr_stat *scp, int force)
{
u_char cursor[32];
@@ -2918,7 +2918,7 @@ set_destructive_cursor(scr_stat *scp, int force)
bcopyw(font_buffer + ((scp->cursor_saveunder & 0xff) * font_size),
cursor, font_size);
for (i=0; i<32; i++)
- if ((i >= scp->cursor_start && i <= scp->cursor_end) ||
+ if ((i >= scp->cursor_start && i <= scp->cursor_end) ||
(scp->cursor_start >= font_size && i == font_size - 1))
cursor[i] |= 0xff;
while (!(inb(crtc_addr+6) & 0x08)) /* wait for vertical retrace */ ;
@@ -3018,25 +3018,25 @@ draw_mouse_image(scr_stat *scp)
set_normal_mode();
}
-static void
+static void
save_palette(void)
{
int i;
- outb(PALRADR, 0x00);
- for (i=0x00; i<0x300; i++)
+ outb(PALRADR, 0x00);
+ for (i=0x00; i<0x300; i++)
palette[i] = inb(PALDATA);
inb(crtc_addr+6); /* reset flip/flop */
}
-void
+void
load_palette(void)
{
int i;
outb(PIXMASK, 0xFF); /* no pixelmask */
- outb(PALWADR, 0x00);
- for (i=0x00; i<0x300; i++)
+ outb(PALWADR, 0x00);
+ for (i=0x00; i<0x300; i++)
outb(PALDATA, palette[i]);
inb(crtc_addr+6); /* reset flip/flop */
outb(ATC, 0x20); /* enable palette */
@@ -3052,7 +3052,7 @@ do_bell(scr_stat *scp, int pitch, int duration)
blink_in_progress = 4;
blink_screen(scp);
timeout((timeout_func_t)blink_screen, scp, hz/10);
- }
+ }
else
sysbeep(pitch, duration);
}
diff --git a/sys/i386/isa/syscons.h b/sys/i386/isa/syscons.h
index 649b653..4b22de6 100644
--- a/sys/i386/isa/syscons.h
+++ b/sys/i386/isa/syscons.h
@@ -6,7 +6,7 @@
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer
+ * notice, this list of conditions and the following disclaimer
* in this position and unchanged.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
@@ -25,7 +25,7 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
- * $Id: syscons.h,v 1.7 1995/04/04 20:04:17 sos Exp $
+ * $Id: syscons.h,v 1.8 1995/04/23 10:15:38 bde Exp $
*/
#ifndef SYSCONS_H
diff --git a/sys/i386/isa/tw.c b/sys/i386/isa/tw.c
index 98dfb76..ef9f616 100644
--- a/sys/i386/isa/tw.c
+++ b/sys/i386/isa/tw.c
@@ -98,7 +98,7 @@
* the unit worked). I suggest saving money and buying the bare TW523
* rather than the TW523 development kit (what I bought), because if you
* are running FreeBSD you don't really care about the DOS binaries.
- *
+ *
* The interface to the TW-523 consists of four wires on the RJ-11 connector,
* which are jumpered to somewhat more wires on the DB-25 connector, which
* in turn is intended to plug into the PC parallel printer port. I dismantled
@@ -355,7 +355,7 @@ int twopen(dev, flag, mode, p)
struct tw_sc *sc = &tw_sc[TWUNIT(dev)];
int s;
int port;
-
+
s = spltty();
if(sc->sc_state == 0) {
sc->sc_state = TWS_OPEN;
@@ -663,7 +663,7 @@ int h, k, cnt;
* which is more than the 11 cycles it takes to transmit a full
* X-10 packet.
*/
-
+
static int wait_for_zero(sc)
struct tw_sc *sc;
{
@@ -929,7 +929,7 @@ int unit;
sc->sc_state &= ~TWS_RCVING;
twputpkt(sc, pkt);
untimeout((timeout_func_t)twabortrcv, (caddr_t)sc);
- if(sc->sc_flags & TW_RCV_ERROR)
+ if(sc->sc_flags & TW_RCV_ERROR)
log(LOG_ERR, "TWRCV: invalid packet: (%d, %x)\n",
sc->sc_rcount, sc->sc_bits);
wakeup((caddr_t)sc);
diff --git a/sys/i386/isa/ultra14f.c b/sys/i386/isa/ultra14f.c
index 4024a05..f7184c1 100644
--- a/sys/i386/isa/ultra14f.c
+++ b/sys/i386/isa/ultra14f.c
@@ -22,7 +22,7 @@
* today: Fri Jun 2 17:21:03 EST 1994
* added 24F support ++sg
*
- * $Id: ultra14f.c,v 1.31 1995/05/07 06:54:01 bde Exp $
+ * $Id: ultra14f.c,v 1.32 1995/05/11 19:26:21 rgrimes Exp $
*/
#include <sys/types.h>
@@ -173,7 +173,7 @@ struct uha_bits
#define U24_ABORT_ACK 0x18 /* same */
#define U24_ICM_ACK 0x02 /* 24F acknowledge ICM and clear */
-/*
+/*
* UHA_CONF1 bits (read only)
*/
@@ -373,7 +373,7 @@ uha_send_mbox(int unit, struct mscp *mscp)
printf("uha%d: uha_send_mbox, board not responding\n", unit);
Debugger("ultra14f");
}
- outl(ur->ogmptr, KVTOPHYS(mscp));
+ outl(ur->ogmptr, KVTOPHYS(mscp));
if (uha->flags & UHA_24F) outb(ur->ogmcmd, 1);
outb(ur->lint, ub->ogmint);
splx(s);
@@ -565,7 +565,7 @@ uha_attach(dev)
* Return some information to the caller about
* the adapter and it's capabilities
*/
-u_int32
+u_int32
uha_adapter_info(unit)
int unit;
{
@@ -925,7 +925,7 @@ uha_init(unit)
uha->flags |= UHA_INIT;
return (0);
}
-
+
/*
* Initialize an Ultrastor 24F
@@ -975,7 +975,7 @@ int unit;
ub->icm_ack = U24_ICM_ACK;
/*
- * Make sure an EISA card is installed in this slot,
+ * Make sure an EISA card is installed in this slot,
* and if it is make sure that the card is enabled.
*/
outb(ur->id, 0xff);
@@ -1060,7 +1060,7 @@ uhaminphys(bp)
* start a scsi operation given the command and the data address. Also
* needs the unit, target and lu.
*/
-int32
+int32
uha_scsi_cmd(xs)
struct scsi_xfer *xs;
{
@@ -1208,8 +1208,8 @@ uha_scsi_cmd(xs)
nextphys = thisphys;
while ((datalen) && (thisphys == nextphys))
/*
- * This page is contiguous (physically) with
- * the the last, just extend the length
+ * This page is contiguous (physically) with
+ * the the last, just extend the length
*/
{
/* how far to the end of the page */
diff --git a/sys/i386/isa/wd7000.c b/sys/i386/isa/wd7000.c
index c112539..0166120 100644
--- a/sys/i386/isa/wd7000.c
+++ b/sys/i386/isa/wd7000.c
@@ -92,7 +92,7 @@ struct scsi_device wds_dev =
{ 0, 0 }
};
-/*
+/*
XXX THIS SHOULD BE FIXED!
I haven't got the KERNBASE-version to work, but on my system the kernel
is at virtual address 0xFxxxxxxx, responding to physical address
@@ -235,7 +235,7 @@ int wds_init(struct isa_device *);
int wds_cmd(int, u_char *, int);
void wds_wait(int, int, int);
-struct isa_driver wdsdriver =
+struct isa_driver wdsdriver =
{
wdsprobe,
wdsattach,
@@ -291,13 +291,13 @@ wdsr_alloc(int unit)
r = NULL;
x = splbio();
for(i=0; i<MAXSIMUL; i++)
- if(!wds[unit].wdsr[i].busy)
+ if(!wds[unit].wdsr[i].busy)
{
r = &wds[unit].wdsr[i];
r->busy = 1;
break;
}
- if(!r)
+ if(!r)
{
splx(x);
return NULL;
@@ -305,13 +305,13 @@ wdsr_alloc(int unit)
r->ombn = -1;
for(i=0; i<WDS_NOMB; i++)
- if(!wds[unit].ombs[i].stat)
+ if(!wds[unit].ombs[i].stat)
{
wds[unit].ombs[i].stat = 1;
r->ombn = i;
break;
}
- if(r->ombn == -1 )
+ if(r->ombn == -1 )
{
r->busy = 0;
splx(x);
@@ -332,14 +332,14 @@ wds_scsi_cmd(struct scsi_xfer *sxp)
base = wds[unit].addr;
- if( sxp->flags & SCSI_RESET)
+ if( sxp->flags & SCSI_RESET)
{
printf("reset!\n");
return COMPLETE;
}
r = wdsr_alloc(unit);
- if(r==NULL)
+ if(r==NULL)
{
printf("no request slot available!\n");
sxp->error = XS_DRIVER_STUFFUP;
@@ -348,7 +348,7 @@ wds_scsi_cmd(struct scsi_xfer *sxp)
r->done = 0;
r->sxp = sxp;
- if(sxp->flags & SCSI_DATA_UIO)
+ if(sxp->flags & SCSI_DATA_UIO)
{
printf("UIO!\n");
sxp->error = XS_DRIVER_STUFFUP;
@@ -388,7 +388,7 @@ wds_scsi_cmd(struct scsi_xfer *sxp)
scsi_uto3b(sizeof(sxp->sense), r->sense.len);
r->sense.write = 0x80;
- if(sxp->flags & SCSI_NOMASK)
+ if(sxp->flags & SCSI_NOMASK)
{
outb(base+WDS_HCR, WDSH_DRQEN);
r->polled = 1;
@@ -400,25 +400,25 @@ wds_scsi_cmd(struct scsi_xfer *sxp)
c = WDSC_MSTART(r->ombn);
- if( wds_cmd(base, &c, sizeof c) != 0)
+ if( wds_cmd(base, &c, sizeof c) != 0)
{
printf("wds%d: unable to start outgoing mbox\n", unit);
r->busy = 0;
wds[unit].ombs[r->ombn].stat = 0;
-
+
return TRY_AGAIN_LATER;
}
- if(sxp->flags & SCSI_NOMASK)
+ if(sxp->flags & SCSI_NOMASK)
{
repoll:
i = 0;
- while(!(inb(base+WDS_STAT) & WDS_IRQ))
+ while(!(inb(base+WDS_STAT) & WDS_IRQ))
{
DELAY(20000);
- if(++i == 20)
+ if(++i == 20)
{
outb(base + WDS_IRQACK, 0);
/*r->busy = 0;*/
@@ -427,7 +427,7 @@ wds_scsi_cmd(struct scsi_xfer *sxp)
}
}
wdsintr(unit);
- if(r->done)
+ if(r->done)
{
r->sxp->flags |= ITSDONE;
r->busy = 0;
@@ -460,7 +460,7 @@ wdsintr(int unit)
}
c = inb(wds[unit].addr + WDS_IRQSTAT);
- if( (c&WDSI_MASK) == WDSI_MSVC)
+ if( (c&WDSI_MASK) == WDSI_MSVC)
{
c = c & ~WDSI_MASK;
in = &wds[unit].imbs[c];
@@ -487,12 +487,12 @@ wds_done(int unit, struct wds_cmd *c, u_char stat)
r = (struct wds_req *)NULL;
for(i=0; i<MAXSIMUL; i++)
- if( c == &wds[unit].wdsr[i].cmd && !wds[unit].wdsr[i].done)
+ if( c == &wds[unit].wdsr[i].cmd && !wds[unit].wdsr[i].done)
{
r = &wds[unit].wdsr[i];
break;
}
- if(r == (struct wds_req *)NULL)
+ if(r == (struct wds_req *)NULL)
{
/* failed to find request! */
return 1;
@@ -501,7 +501,7 @@ wds_done(int unit, struct wds_cmd *c, u_char stat)
r->done = 1;
wds[unit].ombs[r->ombn].stat = 0;
r->ret = HAD_ERROR;
- switch(stat)
+ switch(stat)
{
case ICMB_OK:
r->ret = COMPLETE;
@@ -540,7 +540,7 @@ wds_done(int unit, struct wds_cmd *c, u_char stat)
wds_data_in_use[unit] = 0;
- if(!r->polled)
+ if(!r->polled)
{
r->sxp->flags |= ITSDONE;
scsi_done(r->sxp);
@@ -562,7 +562,7 @@ wds_getvers(int unit)
base = wds[unit].addr;
r = wdsr_alloc(unit);
- if(!r)
+ if(!r)
{
printf("wds%d: no request slot available!\n", unit);
return -1;
@@ -580,7 +580,7 @@ wds_getvers(int unit)
r->polled = 1;
c = WDSC_MSTART(r->ombn);
- if(wds_cmd(base, (u_char *)&c, sizeof c))
+ if(wds_cmd(base, (u_char *)&c, sizeof c))
{
printf("wds%d: version request failed\n", unit);
r->busy = 0;
@@ -588,17 +588,17 @@ wds_getvers(int unit)
return -1;
}
- while(1)
+ while(1)
{
i = 0;
- while( (inb(base+WDS_STAT) & WDS_IRQ) == 0)
+ while( (inb(base+WDS_STAT) & WDS_IRQ) == 0)
{
DELAY(9000);
if(++i == 20)
return -1;
}
wdsintr(unit);
- if(r->done)
+ if(r->done)
{
printf("wds%d: firmware version %d.%02d\n", unit,
r->cmd.targ, r->cmd.scb[0]);
@@ -619,7 +619,7 @@ wdsattach(struct isa_device *dev)
masunit = dev->id_unit;
- if( !(versprobe & (1<<masunit)))
+ if( !(versprobe & (1<<masunit)))
{
versprobe |= (1<<masunit);
if(wds_getvers(masunit)==-1)
@@ -633,7 +633,7 @@ wdsattach(struct isa_device *dev)
wds[unit].sc_link.adapter = &wds_switch;
wds[unit].sc_link.device = &wds_dev;
wds[unit].sc_link.flags = SDEV_BOUNCE;
-
+
kdc_wds[unit].kdc_state = DC_BUSY;
scsi_attachdevs(&wds[unit].sc_link);
@@ -672,9 +672,9 @@ wds_init(struct isa_device *dev)
isa_dmacascade(dev->id_drq);
- if( (inb(base+WDS_STAT) & (WDS_RDY)) != WDS_RDY)
+ if( (inb(base+WDS_STAT) & (WDS_RDY)) != WDS_RDY)
{
- for(i=0; i<10; i++)
+ for(i=0; i<10; i++)
{
if( (inb(base+WDS_STAT) & (WDS_RDY)) == WDS_RDY)
break;
@@ -695,7 +695,7 @@ wds_init(struct isa_device *dev)
init.nimb = WDS_NIMB;
wds_wait(base+WDS_STAT, WDS_RDY, WDS_RDY);
- if( wds_cmd(base, (u_char *)&init, sizeof init) != 0)
+ if( wds_cmd(base, (u_char *)&init, sizeof init) != 0)
{
printf("wds%d: wds_cmd failed\n", unit);
return 1;
@@ -707,7 +707,7 @@ wds_init(struct isa_device *dev)
bzero(&wc,sizeof wc);
wc.cmd = WDSC_DISUNSOL;
- if( wds_cmd(base, (char *)&wc, sizeof wc) != 0)
+ if( wds_cmd(base, (char *)&wc, sizeof wc) != 0)
{
printf("wds%d: wds_cmd failed\n", unit);
return 1;
diff --git a/sys/i386/isa/wt.c b/sys/i386/isa/wt.c
index 3b9718b..87f3ae7 100644
--- a/sys/i386/isa/wt.c
+++ b/sys/i386/isa/wt.c
@@ -19,7 +19,7 @@
* the original CMU copyright notice.
*
* Version 1.3, Thu Nov 11 12:09:13 MSK 1993
- * $Id: wt.c,v 1.15 1995/03/28 07:55:56 bde Exp $
+ * $Id: wt.c,v 1.16 1995/04/12 20:48:13 wollman Exp $
*
*/
@@ -28,17 +28,17 @@
* All rights reserved.
*
* Authors: Robert Baron
- *
+ *
* 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
+ *
+ * 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
@@ -740,7 +740,7 @@ static int wtcmd (wtinfo_t *t, int cmd)
splx(x);
return (0);
}
-
+
outb (t->CMDPORT, cmd); /* output the command */
outb (t->CTLPORT, t->REQUEST | t->ONLINE); /* set request */
diff --git a/sys/i386/isa/wtreg.h b/sys/i386/isa/wtreg.h
index e45e514..cbc19ca 100644
--- a/sys/i386/isa/wtreg.h
+++ b/sys/i386/isa/wtreg.h
@@ -19,7 +19,7 @@
* the original CMU copyright notice.
*
* Version 1.3, Thu Nov 11 12:09:13 MSK 1993
- * $Id$
+ * $Id: wtreg.h,v 1.4 1993/12/13 18:38:44 alm Exp $
*
*/
@@ -28,17 +28,17 @@
* All rights reserved.
*
* Authors: Robert Baron
- *
+ *
* 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
+ *
+ * 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
OpenPOWER on IntegriCloud