summaryrefslogtreecommitdiff
path: root/sys/arch/atari/dev
diff options
context:
space:
mode:
authortsutsui <tsutsui@NetBSD.org>2023-01-06 10:28:27 +0000
committertsutsui <tsutsui@NetBSD.org>2023-01-06 10:28:27 +0000
commit60e2ec70c71982b44452bf4816ef4ac58e6da213 (patch)
tree11a0a5dbd362476743af3374c55f02dbe57395d1 /sys/arch/atari/dev
parentdf2fe19c1466739734a0c412be23bc385ca5db50 (diff)
TAB/spaces/indents cleanup.
Diffstat (limited to 'sys/arch/atari/dev')
-rw-r--r--sys/arch/atari/dev/atari5380.c13
-rw-r--r--sys/arch/atari/dev/dma.c6
-rw-r--r--sys/arch/atari/dev/fd.c10
-rw-r--r--sys/arch/atari/dev/font_8x16.c14
-rw-r--r--sys/arch/atari/dev/font_8x8.c14
-rw-r--r--sys/arch/atari/dev/grf.c22
-rw-r--r--sys/arch/atari/dev/grf_etreg.h4
-rw-r--r--sys/arch/atari/dev/grfabs.c6
-rw-r--r--sys/arch/atari/dev/grfabs_et.c20
-rw-r--r--sys/arch/atari/dev/grfabs_fal.c34
-rw-r--r--sys/arch/atari/dev/grfabs_fal.h4
-rw-r--r--sys/arch/atari/dev/grfabs_reg.h4
-rw-r--r--sys/arch/atari/dev/grfabs_tt.c10
-rw-r--r--sys/arch/atari/dev/grfioctl.h14
-rw-r--r--sys/arch/atari/dev/grfvar.h8
-rw-r--r--sys/arch/atari/dev/hdfd.c32
-rw-r--r--sys/arch/atari/dev/hdfd_intr.s4
-rw-r--r--sys/arch/atari/dev/hdfdreg.h4
-rw-r--r--sys/arch/atari/dev/ite.c579
-rw-r--r--sys/arch/atari/dev/ite_cc.c66
-rw-r--r--sys/arch/atari/dev/ite_et.c76
-rw-r--r--sys/arch/atari/dev/itevar.h8
-rw-r--r--sys/arch/atari/dev/kbd.c6
-rw-r--r--sys/arch/atari/dev/kbdmap.c22
-rw-r--r--sys/arch/atari/dev/lpt.c30
-rw-r--r--sys/arch/atari/dev/md_root.c8
-rw-r--r--sys/arch/atari/dev/ncr5380.c30
-rw-r--r--sys/arch/atari/dev/ncr5380reg.h4
-rw-r--r--sys/arch/atari/dev/ncr5380var.h14
-rw-r--r--sys/arch/atari/dev/nvram.c8
-rw-r--r--sys/arch/atari/dev/ser.c42
-rw-r--r--sys/arch/atari/dev/view.c50
-rw-r--r--sys/arch/atari/dev/viewioctl.h6
-rw-r--r--sys/arch/atari/dev/wdc_mb.c6
-rw-r--r--sys/arch/atari/dev/wskbdmap_atari.c8
-rw-r--r--sys/arch/atari/dev/zs.c10
-rw-r--r--sys/arch/atari/dev/zsvar.h6
37 files changed, 602 insertions, 600 deletions
diff --git a/sys/arch/atari/dev/atari5380.c b/sys/arch/atari/dev/atari5380.c
index 917dff7f477..d10622a9ceb 100644
--- a/sys/arch/atari/dev/atari5380.c
+++ b/sys/arch/atari/dev/atari5380.c
@@ -1,4 +1,4 @@
-/* $NetBSD: atari5380.c,v 1.65 2021/10/04 20:48:05 andvar Exp $ */
+/* $NetBSD: atari5380.c,v 1.66 2023/01/06 10:28:28 tsutsui Exp $ */
/*
* Copyright (c) 1995 Leo Weppelman.
@@ -26,7 +26,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: atari5380.c,v 1.65 2021/10/04 20:48:05 andvar Exp $");
+__KERNEL_RCSID(0, "$NetBSD: atari5380.c,v 1.66 2023/01/06 10:28:28 tsutsui Exp $");
#include "opt_atariscsi.h"
@@ -65,7 +65,7 @@ __KERNEL_RCSID(0, "$NetBSD: atari5380.c,v 1.65 2021/10/04 20:48:05 andvar Exp $"
* Set the various driver options
*/
#define NREQ 18 /* Size of issue queue */
-#define AUTO_SENSE 1 /* Automatically issue a request-sense */
+#define AUTO_SENSE 1 /* Automatically issue a request-sense */
#define DRNAME ncrscsi /* used in various prints */
#undef DBG_SEL /* Show the selection process */
@@ -214,7 +214,7 @@ static struct ncr_softc *cur_softc;
#if defined(TT_SCSI)
/*
- * Prototype functions defined below
+ * Prototype functions defined below
*/
#ifdef NO_TTRAM_DMA
static int tt_wrong_dma_range(SC_REQ *, struct dma_chain *);
@@ -637,7 +637,6 @@ ncr5380_drq_intr(int poll)
PID("end drq");
if (!poll)
single_inst_bset_b(MFP2->mf_imra, IA_SCSI);
-
}
#endif /* defined(TT_SCSI) */
@@ -667,7 +666,7 @@ ncr5380_drq_intr(int poll)
#if defined(FALCON_SCSI)
/*
- * Prototype functions defined below
+ * Prototype functions defined below
*/
static void scsi_falcon_init(struct ncr_softc *);
static uint8_t get_falcon_5380_reg(u_short);
@@ -914,7 +913,7 @@ falcon_get_dma_result(SC_REQ *reqp, u_long *bytes_left)
* should be handled by the mi-part of the driver.
* NOTE: We formerly did this by using the 'byte-count-zero' bit
* of the DMA controller, but this didn't seem to work???
- * [lwp 29/06/96]
+ * [lwp 29/06/96]
*/
bytes_done = st_dmaaddr_get() - reqp->dm_cur->dm_addr;
if (bytes_done & 511) {
diff --git a/sys/arch/atari/dev/dma.c b/sys/arch/atari/dev/dma.c
index 03a1ca715df..13fddcc6e53 100644
--- a/sys/arch/atari/dev/dma.c
+++ b/sys/arch/atari/dev/dma.c
@@ -1,4 +1,4 @@
-/* $NetBSD: dma.c,v 1.28 2017/10/07 16:05:31 jdolecek Exp $ */
+/* $NetBSD: dma.c,v 1.29 2023/01/06 10:28:28 tsutsui Exp $ */
/*
* Copyright (c) 1995 Leo Weppelman.
@@ -47,7 +47,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: dma.c,v 1.28 2017/10/07 16:05:31 jdolecek Exp $");
+__KERNEL_RCSID(0, "$NetBSD: dma.c,v 1.29 2023/01/06 10:28:28 tsutsui Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -164,7 +164,7 @@ st_dmafree(void *softc, int *lock_stat)
{
int s;
DMA_ENTRY *req;
-
+
s = splhigh();
/*
diff --git a/sys/arch/atari/dev/fd.c b/sys/arch/atari/dev/fd.c
index 35d114da84e..90b4717f580 100644
--- a/sys/arch/atari/dev/fd.c
+++ b/sys/arch/atari/dev/fd.c
@@ -1,4 +1,4 @@
-/* $NetBSD: fd.c,v 1.94 2022/06/26 18:46:14 tsutsui Exp $ */
+/* $NetBSD: fd.c,v 1.95 2023/01/06 10:28:28 tsutsui Exp $ */
/*
* Copyright (c) 1995 Leo Weppelman.
@@ -44,7 +44,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: fd.c,v 1.94 2022/06/26 18:46:14 tsutsui Exp $");
+__KERNEL_RCSID(0, "$NetBSD: fd.c,v 1.95 2023/01/06 10:28:28 tsutsui Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -183,7 +183,7 @@ struct fd_types {
/*
* This is set only once at attach time. The value is determined by reading
- * the configuration switches and is one of the FLP_TYPE_*'s.
+ * the configuration switches and is one of the FLP_TYPE_*'s.
* This is similar to the way Atari handles the _FLP cookie.
*/
static short def_type = 0; /* Reflects config-switches */
@@ -372,7 +372,7 @@ fdcprint(void *aux, const char *pnp)
if (pnp != NULL)
aprint_normal("fd%d at %s:", (int)aux, pnp);
-
+
return UNCONF;
}
@@ -1302,7 +1302,7 @@ fdgetdefaultlabel(struct fd_softc *sc, struct disklabel *lp, int part)
lp->d_secperunit = sc->nblocks;
lp->d_type = DKTYPE_FLOPPY;
- lp->d_rpm = 300; /* good guess I suppose. */
+ lp->d_rpm = 300; /* good guess I suppose. */
lp->d_interleave = 1; /* FIXME: is this OK? */
lp->d_bbsize = 0;
lp->d_sbsize = 0;
diff --git a/sys/arch/atari/dev/font_8x16.c b/sys/arch/atari/dev/font_8x16.c
index f0e007f58c3..be9078b0294 100644
--- a/sys/arch/atari/dev/font_8x16.c
+++ b/sys/arch/atari/dev/font_8x16.c
@@ -1,10 +1,10 @@
-/* $NetBSD: font_8x16.c,v 1.5 2022/06/21 15:40:20 tsutsui Exp $ */
+/* $NetBSD: font_8x16.c,v 1.6 2023/01/06 10:28:28 tsutsui Exp $ */
/*
* Copyright (c) 1992, 1993, 1994 Hellmuth Michaelis and Joerg Wunsch
- *
+ *
* All rights reserved.
- *
+ *
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
@@ -15,11 +15,11 @@
* 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 product includes software developed by
+ * This product includes software developed by
* Hellmuth Michaelis and Joerg Wunsch
* 4. The name authors may not be used to endorse or promote products
* derived from this software without specific prior written permission.
- *
+ *
* THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``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.
@@ -36,12 +36,12 @@
* Translated into compiler and human readable for for the Atari-TT port of
* NetBSD by Leo Weppelman.
*
- * Reorganized and edited some chars to fit the iso-8859-1 fontset by
+ * Reorganized and edited some chars to fit the iso-8859-1 fontset by
* Thomas Gerner
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: font_8x16.c,v 1.5 2022/06/21 15:40:20 tsutsui Exp $");
+__KERNEL_RCSID(0, "$NetBSD: font_8x16.c,v 1.6 2023/01/06 10:28:28 tsutsui Exp $");
#include <atari/dev/font.h>
diff --git a/sys/arch/atari/dev/font_8x8.c b/sys/arch/atari/dev/font_8x8.c
index 8dddcc55454..8c3416496eb 100644
--- a/sys/arch/atari/dev/font_8x8.c
+++ b/sys/arch/atari/dev/font_8x8.c
@@ -1,10 +1,10 @@
-/* $NetBSD: font_8x8.c,v 1.4 2005/12/11 12:16:54 christos Exp $ */
+/* $NetBSD: font_8x8.c,v 1.5 2023/01/06 10:28:28 tsutsui Exp $ */
/*
* Copyright (c) 1992, 1993, 1994 Hellmuth Michaelis and Joerg Wunsch
- *
+ *
* All rights reserved.
- *
+ *
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
@@ -15,11 +15,11 @@
* 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 product includes software developed by
+ * This product includes software developed by
* Hellmuth Michaelis and Joerg Wunsch
* 4. The name authors may not be used to endorse or promote products
* derived from this software without specific prior written permission.
- *
+ *
* THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``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.
@@ -41,7 +41,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: font_8x8.c,v 1.4 2005/12/11 12:16:54 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: font_8x8.c,v 1.5 2023/01/06 10:28:28 tsutsui Exp $");
#include <atari/dev/font.h>
@@ -50,7 +50,7 @@ char fontname_8x8[64] = "vt220iso.808";
extern unsigned char fontdata_8x8[];
font_info font_info_8x8 = { 1, 8, 8, 6, 0, 255, &fontdata_8x8[0] };
-
+
unsigned char fontdata_8x8[] = {
/* 0x00 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
/* 0x01 */ 0x18, 0x3c, 0x7e, 0xff, 0xff, 0x7e, 0x3c, 0x18,
diff --git a/sys/arch/atari/dev/grf.c b/sys/arch/atari/dev/grf.c
index cd1bfebd6ba..983bf1ce38f 100644
--- a/sys/arch/atari/dev/grf.c
+++ b/sys/arch/atari/dev/grf.c
@@ -1,4 +1,4 @@
-/* $NetBSD: grf.c,v 1.55 2022/06/26 18:46:14 tsutsui Exp $ */
+/* $NetBSD: grf.c,v 1.56 2023/01/06 10:28:28 tsutsui Exp $ */
/*
* Copyright (c) 1995 Leo Weppelman
@@ -46,7 +46,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: grf.c,v 1.55 2022/06/26 18:46:14 tsutsui Exp $");
+__KERNEL_RCSID(0, "$NetBSD: grf.c,v 1.56 2023/01/06 10:28:28 tsutsui Exp $");
#include <sys/param.h>
#include <sys/proc.h>
@@ -95,7 +95,7 @@ static int grfbusmatch(device_t, cfdata_t, void *);
static void grfbusattach(device_t, device_t, void *);
/*
- * pointers to grf drivers device structs
+ * pointers to grf drivers device structs
*/
struct grf_softc *grfsp[NGRF]; /* XXX */
@@ -214,7 +214,7 @@ grfioctl(dev_t dev, u_long cmd, void * data, int flag, struct lwp *l)
switch (cmd) {
case OGRFIOCGINFO:
/* argl.. no bank-member.. */
- memcpy(data, (void *)&gp->g_display, sizeof(struct grfinfo)-4);
+ memcpy(data, (void *)&gp->g_display, sizeof(struct grfinfo)-4);
break;
case GRFIOCGINFO:
memcpy(data, (void *)&gp->g_display, sizeof(struct grfinfo));
@@ -263,7 +263,7 @@ grfioctl(dev_t dev, u_long cmd, void * data, int flag, struct lwp *l)
}
/*
- * map the contents of a graphics display card into process'
+ * map the contents of a graphics display card into process'
* memory space.
*/
static paddr_t
@@ -272,14 +272,14 @@ grfmmap(dev_t dev, off_t off, int prot)
struct grf_softc *gp;
struct grfinfo *gi;
u_int vgabase, linbase;
-
+
gp = grfsp[GRFUNIT(dev)];
gi = &gp->g_display;
vgabase = gi->gd_vgabase;
linbase = gi->gd_linbase;
- /*
+ /*
* control registers
*/
if (off >= 0 && off < gi->gd_regsize)
@@ -373,9 +373,9 @@ grf_viewsync(struct grf_softc *gp)
(*view_cdevsw.d_ioctl)(gp->g_viewdev, VIOCGBMAP, (void *)&bm,
0, NOLWP);
-
+
gp->g_data = (void *) 0xDeadBeaf; /* not particularly clean.. */
-
+
gi->gd_fbaddr = bm.hw_address;
gi->gd_fbsize = bm.phys_mappable;
gi->gd_linbase = bm.lin_base;
@@ -397,7 +397,7 @@ grf_viewsync(struct grf_softc *gp)
}
gi->gd_colors = 1 << vs.depth;
gi->gd_planes = vs.depth;
-
+
gi->gd_fbwidth = vs.width;
gi->gd_fbheight = vs.height;
gi->gd_dyn.gdi_fbx = 0;
@@ -406,7 +406,7 @@ grf_viewsync(struct grf_softc *gp)
gi->gd_dyn.gdi_dheight = vs.height;
gi->gd_dyn.gdi_dx = 0;
gi->gd_dyn.gdi_dy = 0;
-}
+}
/*
* Change the mode of the display.
diff --git a/sys/arch/atari/dev/grf_etreg.h b/sys/arch/atari/dev/grf_etreg.h
index 88a38e991ad..544ff4f3b44 100644
--- a/sys/arch/atari/dev/grf_etreg.h
+++ b/sys/arch/atari/dev/grf_etreg.h
@@ -1,4 +1,4 @@
-/* $NetBSD: grf_etreg.h,v 1.2 2007/03/04 05:59:40 christos Exp $ */
+/* $NetBSD: grf_etreg.h,v 1.3 2023/01/06 10:28:28 tsutsui Exp $ */
/*
* Copyright (c) 1996 Tobias Abt
@@ -31,7 +31,7 @@
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
* THEORY OF 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.
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#ifndef _GRF_ETREG_H
diff --git a/sys/arch/atari/dev/grfabs.c b/sys/arch/atari/dev/grfabs.c
index cb3cc51e7c5..ec5a8e07096 100644
--- a/sys/arch/atari/dev/grfabs.c
+++ b/sys/arch/atari/dev/grfabs.c
@@ -1,4 +1,4 @@
-/* $NetBSD: grfabs.c,v 1.18 2012/02/12 16:34:07 matt Exp $ */
+/* $NetBSD: grfabs.c,v 1.19 2023/01/06 10:28:28 tsutsui Exp $ */
/*
* Copyright (c) 1995 Leo Weppelman.
@@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: grfabs.c,v 1.18 2012/02/12 16:34:07 matt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: grfabs.c,v 1.19 2023/01/06 10:28:28 tsutsui Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -185,7 +185,7 @@ get_best_display_mode(dimen_t *dim, int depth, dmode_t *curr_mode)
{
dmode_t *save;
dmode_t *dm;
- long dx, dy, dd, ct;
+ long dx, dy, dd, ct;
long size_diff, depth_diff;
save = NULL;
diff --git a/sys/arch/atari/dev/grfabs_et.c b/sys/arch/atari/dev/grfabs_et.c
index 8b0b59de81e..55a6f7c8404 100644
--- a/sys/arch/atari/dev/grfabs_et.c
+++ b/sys/arch/atari/dev/grfabs_et.c
@@ -1,4 +1,4 @@
-/* $NetBSD: grfabs_et.c,v 1.36 2021/08/12 19:53:18 andvar Exp $ */
+/* $NetBSD: grfabs_et.c,v 1.37 2023/01/06 10:28:28 tsutsui Exp $ */
/*
* Copyright (c) 1996 Leo Weppelman.
@@ -41,7 +41,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: grfabs_et.c,v 1.36 2021/08/12 19:53:18 andvar Exp $");
+__KERNEL_RCSID(0, "$NetBSD: grfabs_et.c,v 1.37 2023/01/06 10:28:28 tsutsui Exp $");
#include <sys/param.h>
#include <sys/queue.h>
@@ -110,13 +110,13 @@ struct grfabs_sw et_vid_sw = {
};
static struct grfvideo_mode hw_modes[] = {
- {
+ {
0, "", 22450000, /* num, descr, pix-clock */
640, 400, 4, /* width, height, depth */
632/8, 672/8, 688/8, 808/8, 768/8,/* HBS, HBE, HSS, HSE, HT */
399, 450, 408, 413, 449 /* VBS, VBE, VSS, VSE, VT */
},
- {
+ {
0, "", 25175000, /* num, descr, pix-clock */
640, 480, 4, /* width, height, depth */
632/8, 672/8, 688/8, 752/8, 752/8,/* HBS, HBE, HSS, HSE, HT */
@@ -150,7 +150,7 @@ static bmap_t con_bm; /* XXX */
struct grfabs_et_priv {
pcitag_t pci_tag;
void *regkva;
- void *memkva;
+ void *memkva;
u_int linbase;
int regsz;
int memsz;
@@ -350,7 +350,7 @@ et_alloc_view(dmode_t *mode, dimen_t *dim, u_char depth)
et_loadmode(mode->data, &sa->sv_regs);
} else
v->save_area = NULL;
-
+
v->colormap = alloc_colormap(mode);
if (v->colormap) {
INIT_BOX(&box,0,0,mode->size.width,mode->size.height);
@@ -473,8 +473,8 @@ static void
et_loadmode(struct grfvideo_mode *mode, et_sv_reg_t *regs)
{
unsigned short HDE, VDE;
- int lace, dblscan;
- int uplim, lowlim;
+ int lace, dblscan;
+ int uplim, lowlim;
int i;
unsigned char clock, tmp;
volatile u_char *ba;
@@ -618,12 +618,12 @@ et_loadmode(struct grfvideo_mode *mode, et_sv_reg_t *regs)
*/
tmp = regs->misc_output & 0x3f;
#if 1 /* This is according to my BW monitor & Xfree... */
- if (VDE < 400)
+ if (VDE < 400)
tmp |= 0x40; /* -hsync +vsync */
else if (VDE < 480)
tmp |= 0xc0; /* -hsync -vsync */
#else /* This is according to my color monitor.... */
- if (VDE < 400)
+ if (VDE < 400)
tmp |= 0x00; /* +hsync +vsync */
else if (VDE < 480)
tmp |= 0x80; /* +hsync -vsync */
diff --git a/sys/arch/atari/dev/grfabs_fal.c b/sys/arch/atari/dev/grfabs_fal.c
index 8e2e2fd9d99..5063e1c7827 100644
--- a/sys/arch/atari/dev/grfabs_fal.c
+++ b/sys/arch/atari/dev/grfabs_fal.c
@@ -1,4 +1,4 @@
-/* $NetBSD: grfabs_fal.c,v 1.28 2021/08/17 22:00:27 andvar Exp $ */
+/* $NetBSD: grfabs_fal.c,v 1.29 2023/01/06 10:28:28 tsutsui Exp $ */
/*
* Copyright (c) 1995 Thomas Gerner.
@@ -27,7 +27,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: grfabs_fal.c,v 1.28 2021/08/17 22:00:27 andvar Exp $");
+__KERNEL_RCSID(0, "$NetBSD: grfabs_fal.c,v 1.29 2023/01/06 10:28:28 tsutsui Exp $");
#ifdef FALCON_VIDEO
/*
@@ -55,7 +55,7 @@ __KERNEL_RCSID(0, "$NetBSD: grfabs_fal.c,v 1.28 2021/08/17 22:00:27 andvar Exp $
static void init_view(view_t *, bmap_t *, dmode_t *, box_t *);
static bmap_t *alloc_bitmap(u_long, u_long, u_char);
static colormap_t *alloc_colormap(dmode_t *);
-static void free_bitmap(bmap_t *);
+static void free_bitmap(bmap_t *);
static void falcon_display_view(view_t *);
static view_t *falcon_alloc_view(dmode_t *, dimen_t *, u_char);
static void falcon_free_view(view_t *);
@@ -100,7 +100,6 @@ static struct falcon_hwregs fal_hwregs[] = {
{ RES_VGA256 },
{ RES_DIRECT }
};
-
static dmode_t vid_modes[] = {
{ {NULL,NULL}, "falauto", { 0, 0 }, 0, NULL, &fal_vid_sw},
@@ -129,8 +128,8 @@ static struct videl videlinit[] = {
0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0 },
- { FAL_VGA | RES_FAL_STHIGH, /* sthigh, 640x400, 2 colors */
- 0x2, 0x0, 0x28, 0x0, 0x400, 0xc6, 0x8d, 0x15, 0x273, 0x50, 0x96, 0x0,
+ { FAL_VGA | RES_FAL_STHIGH, /* sthigh, 640x400, 2 colors */
+ 0x2, 0x0, 0x28, 0x0, 0x400, 0xc6, 0x8d, 0x15, 0x273, 0x50, 0x96, 0x0,
0x0, 0x419, 0x3af, 0x8f, 0x8f, 0x3af, 0x415, 0x186, 0x8 },
#if 0 /* not yet */
@@ -140,35 +139,35 @@ static struct videl videlinit[] = {
#endif
{ FAL_VGA | RES_FAL_STMID, /* stmid, 640x200, 4 colors */
- 0x2, 0x0, 0x50, 0x1, 0x0, 0x17, 0x12, 0x1, 0x20e, 0xd, 0x11, 0x0,
+ 0x2, 0x0, 0x50, 0x1, 0x0, 0x17, 0x12, 0x1, 0x20e, 0xd, 0x11, 0x0,
0x0, 0x419, 0x3af, 0x8f, 0x8f, 0x3af, 0x415, 0x186, 0x9 },
{ FAL_VGA | RES_FAL_STLOW, /* stlow, 320x200, 16 colors */
- 0x2, 0x0, 0x50, 0x0, 0x0, 0x17, 0x12, 0x1, 0x20e, 0xd, 0x11, 0x0,
+ 0x2, 0x0, 0x50, 0x0, 0x0, 0x17, 0x12, 0x1, 0x20e, 0xd, 0x11, 0x0,
0x0, 0x419, 0x3af, 0x8f, 0x8f, 0x3af, 0x415, 0x186, 0x5 },
{ FAL_VGA | RES_FAL_TTLOW, /* ttlow, 320x480, 256 colors */
- 0x2, 0x0, 0xa0, 0x0, 0x10, 0xc6, 0x8d, 0x15, 0x29a, 0x7b, 0x96, 0x0,
+ 0x2, 0x0, 0xa0, 0x0, 0x10, 0xc6, 0x8d, 0x15, 0x29a, 0x7b, 0x96, 0x0,
0x0, 0x419, 0x3ff, 0x3f, 0x3f, 0x3ff, 0x415, 0x186, 0x4 },
{ FAL_VGA | RES_VGA2, /* vga, 640x480, 2 colors */
- 0x2, 0x0, 0x28, 0x0, 0x400, 0xc6, 0x8d, 0x15, 0x273, 0x50, 0x96, 0x0,
+ 0x2, 0x0, 0x28, 0x0, 0x400, 0xc6, 0x8d, 0x15, 0x273, 0x50, 0x96, 0x0,
0x0, 0x419, 0x3ff, 0x3f, 0x3f, 0x3ff, 0x415, 0x186, 0x8 },
{ FAL_VGA | RES_VGA4, /* vga, 640x480, 4 colors */
- 0x2, 0x0, 0x50, 0x1, 0x0, 0x17, 0x12, 0x1, 0x20e, 0xd, 0x11, 0x0,
+ 0x2, 0x0, 0x50, 0x1, 0x0, 0x17, 0x12, 0x1, 0x20e, 0xd, 0x11, 0x0,
0x0, 0x419, 0x3ff, 0x3f, 0x3f, 0x3ff, 0x415, 0x186, 0x8 },
{ FAL_VGA | RES_VGA16, /* vga, 640x480, 16 colors */
- 0x2, 0x0, 0xa0, 0x1, 0x0, 0xc6, 0x8d, 0x15, 0x2a3, 0x7c, 0x96, 0x0,
+ 0x2, 0x0, 0xa0, 0x1, 0x0, 0xc6, 0x8d, 0x15, 0x2a3, 0x7c, 0x96, 0x0,
0x0, 0x419, 0x3ff, 0x3f, 0x3f, 0x3ff, 0x415, 0x186, 0x8 },
{ FAL_VGA | RES_VGA256, /* vga, 640x480, 256 colors */
- 0x2, 0x0, 0x140, 0x1, 0x10, 0xc6, 0x8d, 0x15, 0x2ab, 0x84, 0x96, 0x0,
+ 0x2, 0x0, 0x140, 0x1, 0x10, 0xc6, 0x8d, 0x15, 0x2ab, 0x84, 0x96, 0x0,
0x0, 0x419, 0x3ff, 0x3f, 0x3f, 0x3ff, 0x415, 0x186, 0x8 },
{ FAL_VGA | RES_DIRECT, /* direct video, 320x200, 65536 colors */
- 0x2, 0x0, 0x140, 0x0, 0x100, 0xc6, 0x8d, 0x15, 0x2ac, 0x91, 0x96, 0x0,
+ 0x2, 0x0, 0x140, 0x0, 0x100, 0xc6, 0x8d, 0x15, 0x2ac, 0x91, 0x96, 0x0,
0x0, 0x419, 0x3ff, 0x3f, 0x3f, 0x3ff, 0x415, 0x186, 0x4 },
{ 0xffff } /* end of list */
@@ -220,7 +219,7 @@ falcon_getreg(u_short mode)
{
int i;
struct videl *vregs;
-
+
for (i = 0; (vregs = &videlinit[i])->video_mode != 0xffff; i++)
if ((vregs->video_mode) == mode)
return vregs;
@@ -259,7 +258,6 @@ falcon_detect(dmode_t *dm)
vregs->vd_v_ss = VIDEO->vd_v_ss;
vregs->vd_fal_ctrl = VIDEO->vd_fal_ctrl;
vregs->vd_fal_mode = VIDEO->vd_fal_mode;
-
/*
* Calculate the depth of the screen
@@ -518,7 +516,7 @@ falcon_alloc_view(dmode_t *mode, dimen_t *dim, u_char depth)
v = malloc(sizeof(*v), M_DEVBUF, M_NOWAIT);
if (v == NULL)
return(NULL);
-
+
bm = alloc_bitmap(mode->size.width, mode->size.height, mode->depth);
if (bm) {
box_t box;
@@ -558,7 +556,7 @@ alloc_bitmap(u_long width, u_long height, u_char depth)
* Sigh, it seems for mapping to work we need the bitplane data to
* 1: be aligned on a page boundary.
* 2: be n pages large.
- *
+ *
* why? because the user gets a page aligned address, if this is before
* your allocation, too bad. Also it seems that the mapping routines
* do not watch to closely to the allowable length. so if you go over
diff --git a/sys/arch/atari/dev/grfabs_fal.h b/sys/arch/atari/dev/grfabs_fal.h
index 38dc662bbcf..339419f54c1 100644
--- a/sys/arch/atari/dev/grfabs_fal.h
+++ b/sys/arch/atari/dev/grfabs_fal.h
@@ -1,4 +1,4 @@
-/* $NetBSD: grfabs_fal.h,v 1.5 2009/10/21 21:57:39 snj Exp $ */
+/* $NetBSD: grfabs_fal.h,v 1.6 2023/01/06 10:28:28 tsutsui Exp $ */
/*
* Copyright (c) 1995 Thomas Gerner.
@@ -38,7 +38,7 @@ struct videl {
u_char vd_st_res; /* ST resolution */
u_short vd_fal_res; /* Falcon resolution */
u_short vd_h_hold_tim; /* Falcon horizontal hold timer */
- u_short vd_h_bord_beg; /* Falcon horizontal border begin */
+ u_short vd_h_bord_beg; /* Falcon horizontal border begin */
u_short vd_h_bord_end; /* Falcon horizontal border end */
u_short vd_h_dis_beg; /* Falcon horizontal display begin */
u_short vd_h_dis_end; /* Falcon horizontal display end */
diff --git a/sys/arch/atari/dev/grfabs_reg.h b/sys/arch/atari/dev/grfabs_reg.h
index 38658dd6fb3..1e1e0a94d5d 100644
--- a/sys/arch/atari/dev/grfabs_reg.h
+++ b/sys/arch/atari/dev/grfabs_reg.h
@@ -1,4 +1,4 @@
-/* $NetBSD: grfabs_reg.h,v 1.14 2009/03/14 14:45:56 dsl Exp $ */
+/* $NetBSD: grfabs_reg.h,v 1.15 2023/01/06 10:28:28 tsutsui Exp $ */
/*
* Copyright (c) 1995 Leo Weppelman
@@ -147,7 +147,7 @@ struct grfabs_sw {
void (*free_view)(view_t *);
void (*remove_view)(view_t *);
void (*save_view)(view_t *);
- int (*use_colormap)(view_t *, colormap_t *);
+ int (*use_colormap)(view_t *, colormap_t *);
};
/* display mode */
diff --git a/sys/arch/atari/dev/grfabs_tt.c b/sys/arch/atari/dev/grfabs_tt.c
index 1d45c79833d..5e617a6c436 100644
--- a/sys/arch/atari/dev/grfabs_tt.c
+++ b/sys/arch/atari/dev/grfabs_tt.c
@@ -1,4 +1,4 @@
-/* $NetBSD: grfabs_tt.c,v 1.24 2021/08/17 22:00:27 andvar Exp $ */
+/* $NetBSD: grfabs_tt.c,v 1.25 2023/01/06 10:28:28 tsutsui Exp $ */
/*
* Copyright (c) 1995 Leo Weppelman.
@@ -26,7 +26,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: grfabs_tt.c,v 1.24 2021/08/17 22:00:27 andvar Exp $");
+__KERNEL_RCSID(0, "$NetBSD: grfabs_tt.c,v 1.25 2023/01/06 10:28:28 tsutsui Exp $");
#ifdef TT_VIDEO
/*
@@ -54,7 +54,7 @@ __KERNEL_RCSID(0, "$NetBSD: grfabs_tt.c,v 1.24 2021/08/17 22:00:27 andvar Exp $"
static void init_view(view_t *, bmap_t *, dmode_t *, box_t *);
static bmap_t *alloc_bitmap(u_long, u_long, u_char);
static colormap_t *alloc_colormap(dmode_t *);
-static void free_bitmap(bmap_t *);
+static void free_bitmap(bmap_t *);
static void tt_display_view(view_t *);
static view_t *tt_alloc_view(dmode_t *, dimen_t *, u_char);
static void tt_free_view(view_t *);
@@ -288,7 +288,7 @@ tt_alloc_view(dmode_t *mode, dimen_t *dim, u_char depth)
v = malloc(sizeof(*v), M_DEVBUF, M_NOWAIT);
if (v == NULL)
return (NULL);
-
+
bm = alloc_bitmap(mode->size.width, mode->size.height, mode->depth);
if (bm) {
box_t box;
@@ -328,7 +328,7 @@ alloc_bitmap(u_long width, u_long height, u_char depth)
* Sigh, it seems for mapping to work we need the bitplane data to
* 1: be aligned on a page boundary.
* 2: be n pages large.
- *
+ *
* why? because the user gets a page aligned address, if this is before
* your allocation, too bad. Also it seems that the mapping routines
* do not watch to closely to the allowable length. so if you go over
diff --git a/sys/arch/atari/dev/grfioctl.h b/sys/arch/atari/dev/grfioctl.h
index be3792763f6..d65b98b3fd2 100644
--- a/sys/arch/atari/dev/grfioctl.h
+++ b/sys/arch/atari/dev/grfioctl.h
@@ -1,4 +1,4 @@
-/* $NetBSD: grfioctl.h,v 1.12 2022/05/24 06:18:34 andvar Exp $ */
+/* $NetBSD: grfioctl.h,v 1.13 2023/01/06 10:28:28 tsutsui Exp $ */
/*
* Copyright (c) 1988 University of Utah.
@@ -51,7 +51,7 @@ struct grfdyninfo {
int gdi_dwidth; /* displayed part width */
int gdi_dheight; /* displayed part height */
int gdi_dx; /* displayed part x offset */
- int gdi_dy; /* displayed part y offset */
+ int gdi_dy; /* displayed part y offset */
};
struct grfinfo {
@@ -73,7 +73,7 @@ struct grfinfo {
/* compatibility... */
#define gd_fbx gd_dyn.gdi_fbx
#define gd_fby gd_dyn.gdi_fby
-#define gd_dwidth gd_dyn.gdi_dwidth
+#define gd_dwidth gd_dyn.gdi_dwidth
#define gd_dheight gd_dyn.gdi_dheight
#define gd_dx gd_dyn.gdi_dx
#define gd_dy gd_dyn.gdi_dy
@@ -83,7 +83,7 @@ struct grfinfo {
};
-/* video mode, should be display-independent, but it might need
+/* video mode, should be display-independent, but it might need
modifications in the future to really become hardware-independent. */
struct grfvideo_mode {
@@ -93,8 +93,8 @@ struct grfvideo_mode {
u_short disp_width; /* width of displayed video (incl overscan) */
u_short disp_height; /* height "" */
u_short depth; /* number of bitplanes resp. bits per pixel */
- u_short hblank_start;
- u_short hblank_stop;
+ u_short hblank_start;
+ u_short hblank_stop;
u_short hsync_start; /* video-parameters, take care not to */
u_short hsync_stop; /* use parameters that violete specs of */
u_short htotal; /* your monitor ! */
@@ -130,7 +130,7 @@ struct grfvideo_mode {
/*
* generic framebuffer-related ioctls. These are somewhat
* similar to SunOS fb-ioctls since I liked them reading
- * thru the X11-server code.
+ * thru the X11-server code.
*/
/*
diff --git a/sys/arch/atari/dev/grfvar.h b/sys/arch/atari/dev/grfvar.h
index c75cc0a7d44..190a0259c09 100644
--- a/sys/arch/atari/dev/grfvar.h
+++ b/sys/arch/atari/dev/grfvar.h
@@ -1,4 +1,4 @@
-/* $NetBSD: grfvar.h,v 1.14 2012/10/27 17:17:42 chs Exp $ */
+/* $NetBSD: grfvar.h,v 1.15 2023/01/06 10:28:28 tsutsui Exp $ */
/*
* Copyright (c) 1988 University of Utah.
@@ -49,10 +49,10 @@ typedef struct {
struct ite_softc;
-/*
+/*
* this struct is owned by the driver (grfcc)
- * and is passed to grf when grf is configed. The ite also
- * uses it...
+ * and is passed to grf when grf is configed. The ite also
+ * uses it...
*/
struct grf_softc {
device_t g_device; /* config sets this up. */
diff --git a/sys/arch/atari/dev/hdfd.c b/sys/arch/atari/dev/hdfd.c
index 7acabf5e75d..591ebeaa326 100644
--- a/sys/arch/atari/dev/hdfd.c
+++ b/sys/arch/atari/dev/hdfd.c
@@ -1,4 +1,4 @@
-/* $NetBSD: hdfd.c,v 1.91 2022/06/26 18:46:14 tsutsui Exp $ */
+/* $NetBSD: hdfd.c,v 1.92 2023/01/06 10:28:28 tsutsui Exp $ */
/*-
* Copyright (c) 1996 Leo Weppelman
@@ -91,7 +91,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: hdfd.c,v 1.91 2022/06/26 18:46:14 tsutsui Exp $");
+__KERNEL_RCSID(0, "$NetBSD: hdfd.c,v 1.92 2023/01/06 10:28:28 tsutsui Exp $");
#include "opt_ddb.h"
@@ -236,12 +236,12 @@ struct fd_type {
* The order of the types is the same as for the TT/Falcon....
*/
struct fd_type fd_types[] = {
- /* 360kB in 720kB drive */
- { 9,2,18,2,0xff,0xdf,0x2a,0x50,40, 720,2,FDC_125KBPS,0xf6,1,"360KB" },
- /* 3.5" 720kB diskette */
- { 9,2,18,2,0xff,0xdf,0x2a,0x50,80,1440,1,FDC_125KBPS,0xf6,1,"720KB" },
- /* 1.44MB diskette */
- { 18,2,36,2,0xff,0xcf,0x1b,0x6c,80,2880,1,FDC_250KBPS,0xf6,1,"1.44MB" },
+ /* 360kB in 720kB drive */
+ { 9,2,18,2,0xff,0xdf,0x2a,0x50,40, 720,2,FDC_125KBPS,0xf6,1,"360KB" },
+ /* 3.5" 720kB diskette */
+ { 9,2,18,2,0xff,0xdf,0x2a,0x50,80,1440,1,FDC_125KBPS,0xf6,1,"720KB" },
+ /* 1.44MB diskette */
+ { 18,2,36,2,0xff,0xcf,0x1b,0x6c,80,2880,1,FDC_250KBPS,0xf6,1,"1.44MB" },
};
/* software state, per disk (with up to 4 disks per ctlr) */
@@ -257,7 +257,7 @@ struct fd_softc {
daddr_t sc_blkno; /* starting block number */
int sc_bcount; /* byte count left */
- int sc_opts; /* user-set options */
+ int sc_opts; /* user-set options */
int sc_skip; /* bytes already transferred */
int sc_nblks; /* #blocks currently transferring */
int sc_nbytes; /* #bytes currently transferring */
@@ -607,7 +607,7 @@ fdstrategy(struct buf *bp)
{
struct fd_softc *fd = device_lookup_private(&hdfd_cd, FDUNIT(bp->b_dev));
int sz;
- int s;
+ int s;
/* Valid unit, controller, and request? */
if (bp->b_blkno < 0 ||
@@ -639,7 +639,7 @@ fdstrategy(struct buf *bp)
}
bp->b_rawblkno = bp->b_blkno;
- bp->b_cylinder = bp->b_blkno / (FDC_BSIZE/DEV_BSIZE) / fd->sc_type->seccyl;
+ bp->b_cylinder = bp->b_blkno / (FDC_BSIZE/DEV_BSIZE) / fd->sc_type->seccyl;
#ifdef FD_DEBUG
printf("fdstrategy: b_blkno %d b_bcount %ld blkno %qd cylin %ld sz"
@@ -962,7 +962,7 @@ loop:
fd = fdc->sc_drives.tqh_first;
if (fd == NULL) {
fdc->sc_state = DEVIDLE;
- return 1;
+ return 1;
}
/* Is there a transfer to this drive? If not, deactivate drive. */
@@ -1448,7 +1448,7 @@ fdioctl(dev_t dev, u_long cmd, void *addr, int flag, struct lwp *l)
fd_formb->fd_formb_secno(i) = il[i+1];
fd_formb->fd_formb_secsize(i) = fd->sc_type->secsize;
}
-
+
error = fdformat(dev, fd_formb, l->l_proc);
kmem_free(fd_formb, sizeof(*fd_formb));
return error;
@@ -1514,7 +1514,7 @@ fdformat(dev_t dev, struct ne7_fd_formb *finfo, struct proc *p)
break;
}
mutex_exit(bp->b_objlock);
-
+
if (rv == EWOULDBLOCK) {
/* timed out */
rv = EIO;
@@ -1588,12 +1588,12 @@ fdgetdefaultlabel(struct fd_softc *fd, struct disklabel *lp, int part)
lp->d_secperunit = fd->sc_type->size;
lp->d_type = DKTYPE_FLOPPY;
- lp->d_rpm = 300; /* good guess I suppose. */
+ lp->d_rpm = 300; /* good guess I suppose. */
lp->d_interleave = 1; /* FIXME: is this OK? */
lp->d_bbsize = 0;
lp->d_sbsize = 0;
lp->d_npartitions = part + 1;
- lp->d_trkseek = 6000; /* Who cares... */
+ lp->d_trkseek = 6000; /* Who cares... */
lp->d_magic = DISKMAGIC;
lp->d_magic2 = DISKMAGIC;
lp->d_checksum = dkcksum(lp);
diff --git a/sys/arch/atari/dev/hdfd_intr.s b/sys/arch/atari/dev/hdfd_intr.s
index fe4953bad9a..c8fdffa9856 100644
--- a/sys/arch/atari/dev/hdfd_intr.s
+++ b/sys/arch/atari/dev/hdfd_intr.s
@@ -1,4 +1,4 @@
-/* $NetBSD: hdfd_intr.s,v 1.10 2010/12/20 00:25:30 matt Exp $
+/* $NetBSD: hdfd_intr.s,v 1.11 2023/01/06 10:28:28 tsutsui Exp $
/*
* Copyright (c) 1996 Leo Weppelman.
@@ -135,7 +135,7 @@ hdfdc_norm:
addl %d0, _C_LABEL(intrcnt_user)+88 | add another interrupt
CPUINFO_ADD(CI_NINTR, %d0)
0: jbsr _C_LABEL(fdc_ctrl_intr) | handle interrupt
- INTERRUPT_RESTOREREG | and saved registers
+ INTERRUPT_RESTOREREG | and saved registers
jra _ASM_LABEL(rei)
.data
diff --git a/sys/arch/atari/dev/hdfdreg.h b/sys/arch/atari/dev/hdfdreg.h
index 90dee04d7a8..a0430ab9e45 100644
--- a/sys/arch/atari/dev/hdfdreg.h
+++ b/sys/arch/atari/dev/hdfdreg.h
@@ -1,4 +1,4 @@
-/* $NetBSD: hdfdreg.h,v 1.7 2011/06/30 20:09:21 wiz Exp $ */
+/* $NetBSD: hdfdreg.h,v 1.8 2023/01/06 10:28:28 tsutsui Exp $ */
/*-
* Copyright (c) 1991 The Regents of the University of California.
@@ -100,7 +100,7 @@
* USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
* DAMAGE.
*
- * From: FreeBSD: Id: ioctl_fd.h,v 1.7 1994/10/30 19:17:39 joerg Exp
+ * From: FreeBSD: Id: ioctl_fd.h,v 1.7 1994/10/30 19:17:39 joerg Exp
*/
#define FD_MAX_NSEC 36 /* highest known number of spt - allow for */
diff --git a/sys/arch/atari/dev/ite.c b/sys/arch/atari/dev/ite.c
index 91a59bd7e9e..a6f1dfdb525 100644
--- a/sys/arch/atari/dev/ite.c
+++ b/sys/arch/atari/dev/ite.c
@@ -1,4 +1,4 @@
-/* $NetBSD: ite.c,v 1.84 2022/06/26 18:46:14 tsutsui Exp $ */
+/* $NetBSD: ite.c,v 1.85 2023/01/06 10:28:28 tsutsui Exp $ */
/*
* Copyright (c) 1988 University of Utah.
@@ -44,7 +44,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ite.c,v 1.84 2022/06/26 18:46:14 tsutsui Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ite.c,v 1.85 2023/01/06 10:28:28 tsutsui Exp $");
#include "opt_ddb.h"
@@ -184,7 +184,7 @@ static int cons_ite = -1;
static int
itematch(device_t parent, cfdata_t cf, void *aux)
{
-
+
/*
* Handle early console stuff. The first unit number
* is the console unit. All other early matches will fail.
@@ -240,7 +240,7 @@ iteattach(device_t parent, device_t self, void *aux)
aprint_normal(" has keyboard");
aprint_normal("\n");
sc->flags |= ITE_ATTACHED;
- } else {
+ } else {
if (con_itesoftc.grf != NULL &&
con_itesoftc.grf->g_conpri > gsc->g_conpri)
return;
@@ -272,7 +272,7 @@ getitesp(dev_t dev)
void
itecnprobe(struct consdev *cd)
{
- /*
+ /*
* return priority of the best ite (already picked from attach)
* or CN_DEAD.
*/
@@ -346,7 +346,7 @@ itecnputc(dev_t dev, int c)
* standard entry points to the device.
*/
-/*
+/*
* iteinit() is the standard entry point for initialization of
* an ite device, it is also called from itecninit().
*
@@ -512,7 +512,7 @@ iteioctl(dev_t dev, u_long cmd, void * addr, int flag, struct lwp *l)
struct itewinsize *is;
struct itebell *ib;
int error;
-
+
sc = getitesp(dev);
tp = sc->tp;
view = viewview(sc->grf->g_viewdev);
@@ -606,7 +606,7 @@ itestart(struct tty *tp)
tp->t_state |= TS_BUSY;
rbp = &tp->t_outq;
-
+
len = q_to_b(rbp, buf, ITEBURST);
} splx(s);
@@ -628,7 +628,7 @@ void
ite_on(dev_t dev, int flag)
{
struct ite_softc *sc;
- sc = getitesp(dev);
+ sc = getitesp(dev);
/* force ite active, overriding graphics mode */
if (flag & 1) {
@@ -689,7 +689,7 @@ ite_switch(int unit)
/*
* Make sure the cursor's there too....
*/
- SUBR_CURSOR(sc, DRAW_CURSOR);
+ SUBR_CURSOR(sc, DRAW_CURSOR);
}
/* XXX called after changes made in underlying grf layer. */
@@ -777,7 +777,7 @@ ite_cnfilter(u_int c, enum caller caller)
splx(s);
return -1;
}
-
+
/* translate modifiers */
if (kbd_modifier & KBD_MOD_SHIFT) {
if (kbd_modifier & KBD_MOD_ALT)
@@ -849,7 +849,7 @@ static void
repeat_handler(void *arg)
{
tout_pending = 0;
- if (last_char)
+ if (last_char)
add_sicallback((si_farg)ite_filter, (void *)last_char,
(void *)ITEFILT_REPEATER);
}
@@ -883,7 +883,7 @@ ite_filter(u_int c, enum caller caller)
/* have to make sure we're at spltty in here */
s = spltty();
- /*
+ /*
* keyboard interrupts come at priority 2, while softint
* generated keyboard-repeat interrupts come at level 1. So,
* to not allow a key-up event to get thru before a repeat for
@@ -969,7 +969,7 @@ ite_filter(u_int c, enum caller caller)
}
code = key.code;
- /*
+ /*
* Arrange to repeat the keystroke. By doing this at the level
* of scan-codes, we can have function keys, and keys that
* send strings, repeat too. This also entitles an additional
@@ -1021,7 +1021,7 @@ ite_filter(u_int c, enum caller caller)
static const char * const out = "pqrstuvwxymlnMPQRS";
char *cp = strchr(in, code);
- /*
+ /*
* keypad-appmode sends SS3 followed by the above
* translated character
*/
@@ -1040,7 +1040,7 @@ ite_filter(u_int c, enum caller caller)
3, 27, 'O', 'D'};
str = kbdmap->strings + code;
- /*
+ /*
* if this is a cursor key, AND it has the default
* keymap setting, AND we're in app-cursor mode, switch
* to the above table. This is *nasty* !
@@ -1051,7 +1051,7 @@ ite_filter(u_int c, enum caller caller)
strchr("ABCD", str[3]))
str = app_cursor + 4 * (str[3] - 'A');
- /*
+ /*
* using a length-byte instead of 0-termination allows
* to embed \0 into strings, although this is not used
* in the default keymap
@@ -1082,87 +1082,89 @@ ite_sendstr(const char *str)
static void
alignment_display(struct ite_softc *sc)
{
- int i, j;
+ int i, j;
- for (j = 0; j < sc->rows; j++)
- for (i = 0; i < sc->cols; i++)
- SUBR_PUTC(sc, 'E', j, i, ATTR_NOR);
- attrclr(sc, 0, 0, sc->rows, sc->cols);
- SUBR_CURSOR(sc, DRAW_CURSOR);
+ for (j = 0; j < sc->rows; j++)
+ for (i = 0; i < sc->cols; i++)
+ SUBR_PUTC(sc, 'E', j, i, ATTR_NOR);
+ attrclr(sc, 0, 0, sc->rows, sc->cols);
+ SUBR_CURSOR(sc, DRAW_CURSOR);
}
static inline void
snap_cury(struct ite_softc *sc)
{
- if (sc->inside_margins)
- {
- if (sc->cury < sc->top_margin)
- sc->cury = sc->top_margin;
- if (sc->cury > sc->bottom_margin)
- sc->cury = sc->bottom_margin;
- }
+
+ if (sc->inside_margins) {
+ if (sc->cury < sc->top_margin)
+ sc->cury = sc->top_margin;
+ if (sc->cury > sc->bottom_margin)
+ sc->cury = sc->bottom_margin;
+ }
}
static inline void
ite_dnchar(struct ite_softc *sc, int n)
{
- n = uimin(n, sc->cols - sc->curx);
- if (n < sc->cols - sc->curx)
- {
- SUBR_SCROLL(sc, sc->cury, sc->curx + n, n, SCROLL_LEFT);
- attrmov(sc, sc->cury, sc->curx + n, sc->cury, sc->curx,
- 1, sc->cols - sc->curx - n);
- attrclr(sc, sc->cury, sc->cols - n, 1, n);
- }
- while (n-- > 0)
- SUBR_PUTC(sc, ' ', sc->cury, sc->cols - n - 1, ATTR_NOR);
- SUBR_CURSOR(sc, DRAW_CURSOR);
+
+ n = uimin(n, sc->cols - sc->curx);
+ if (n < sc->cols - sc->curx) {
+ SUBR_SCROLL(sc, sc->cury, sc->curx + n, n, SCROLL_LEFT);
+ attrmov(sc, sc->cury, sc->curx + n, sc->cury, sc->curx,
+ 1, sc->cols - sc->curx - n);
+ attrclr(sc, sc->cury, sc->cols - n, 1, n);
+ }
+ while (n-- > 0)
+ SUBR_PUTC(sc, ' ', sc->cury, sc->cols - n - 1, ATTR_NOR);
+ SUBR_CURSOR(sc, DRAW_CURSOR);
}
static inline void
ite_inchar(struct ite_softc *sc, int n)
{
- n = uimin(n, sc->cols - sc->curx);
- if (n < sc->cols - sc->curx)
- {
- SUBR_SCROLL(sc, sc->cury, sc->curx, n, SCROLL_RIGHT);
- attrmov(sc, sc->cury, sc->curx, sc->cury, sc->curx + n,
- 1, sc->cols - sc->curx - n);
- attrclr(sc, sc->cury, sc->curx, 1, n);
- }
- while (n--)
- SUBR_PUTC(sc, ' ', sc->cury, sc->curx + n, ATTR_NOR);
- SUBR_CURSOR(sc, DRAW_CURSOR);
+
+ n = uimin(n, sc->cols - sc->curx);
+ if (n < sc->cols - sc->curx) {
+ SUBR_SCROLL(sc, sc->cury, sc->curx, n, SCROLL_RIGHT);
+ attrmov(sc, sc->cury, sc->curx, sc->cury, sc->curx + n,
+ 1, sc->cols - sc->curx - n);
+ attrclr(sc, sc->cury, sc->curx, 1, n);
+ }
+ while (n--)
+ SUBR_PUTC(sc, ' ', sc->cury, sc->curx + n, ATTR_NOR);
+ SUBR_CURSOR(sc, DRAW_CURSOR);
}
static inline void
ite_clrtoeol(struct ite_softc *sc)
{
- int y = sc->cury, x = sc->curx;
- if (sc->cols - x > 0)
- {
- SUBR_CLEAR(sc, y, x, 1, sc->cols - x);
- attrclr(sc, y, x, 1, sc->cols - x);
- SUBR_CURSOR(sc, DRAW_CURSOR);
- }
+ int y = sc->cury, x = sc->curx;
+
+ if (sc->cols - x > 0) {
+ SUBR_CLEAR(sc, y, x, 1, sc->cols - x);
+ attrclr(sc, y, x, 1, sc->cols - x);
+ SUBR_CURSOR(sc, DRAW_CURSOR);
+ }
}
static inline void
ite_clrtobol(struct ite_softc *sc)
{
- int y = sc->cury, x = uimin(sc->curx + 1, sc->cols);
- SUBR_CLEAR(sc, y, 0, 1, x);
- attrclr(sc, y, 0, 1, x);
- SUBR_CURSOR(sc, DRAW_CURSOR);
+ int y = sc->cury, x = uimin(sc->curx + 1, sc->cols);
+
+ SUBR_CLEAR(sc, y, 0, 1, x);
+ attrclr(sc, y, 0, 1, x);
+ SUBR_CURSOR(sc, DRAW_CURSOR);
}
static inline void
ite_clrline(struct ite_softc *sc)
{
- int y = sc->cury;
- SUBR_CLEAR(sc, y, 0, 1, sc->cols);
- attrclr(sc, y, 0, 1, sc->cols);
- SUBR_CURSOR(sc, DRAW_CURSOR);
+ int y = sc->cury;
+
+ SUBR_CLEAR(sc, y, 0, 1, sc->cols);
+ attrclr(sc, y, 0, 1, sc->cols);
+ SUBR_CURSOR(sc, DRAW_CURSOR);
}
@@ -1170,33 +1172,35 @@ ite_clrline(struct ite_softc *sc)
static inline void
ite_clrtoeos(struct ite_softc *sc)
{
- ite_clrtoeol(sc);
- if (sc->cury < sc->rows - 1)
- {
- SUBR_CLEAR(sc, sc->cury + 1, 0, sc->rows - 1 - sc->cury, sc->cols);
- attrclr(sc, sc->cury, 0, sc->rows - sc->cury, sc->cols);
- SUBR_CURSOR(sc, DRAW_CURSOR);
- }
+
+ ite_clrtoeol(sc);
+ if (sc->cury < sc->rows - 1) {
+ SUBR_CLEAR(sc, sc->cury + 1, 0,
+ sc->rows - 1 - sc->cury, sc->cols);
+ attrclr(sc, sc->cury, 0, sc->rows - sc->cury, sc->cols);
+ SUBR_CURSOR(sc, DRAW_CURSOR);
+ }
}
static inline void
ite_clrtobos(struct ite_softc *sc)
{
- ite_clrtobol(sc);
- if (sc->cury > 0)
- {
- SUBR_CLEAR(sc, 0, 0, sc->cury, sc->cols);
- attrclr(sc, 0, 0, sc->cury, sc->cols);
- SUBR_CURSOR(sc, DRAW_CURSOR);
- }
+
+ ite_clrtobol(sc);
+ if (sc->cury > 0) {
+ SUBR_CLEAR(sc, 0, 0, sc->cury, sc->cols);
+ attrclr(sc, 0, 0, sc->cury, sc->cols);
+ SUBR_CURSOR(sc, DRAW_CURSOR);
+ }
}
static inline void
ite_clrscreen(struct ite_softc *sc)
{
- SUBR_CLEAR(sc, 0, 0, sc->rows, sc->cols);
- attrclr(sc, 0, 0, sc->rows, sc->cols);
- SUBR_CURSOR(sc, DRAW_CURSOR);
+
+ SUBR_CLEAR(sc, 0, 0, sc->rows, sc->cols);
+ attrclr(sc, 0, 0, sc->rows, sc->cols);
+ SUBR_CURSOR(sc, DRAW_CURSOR);
}
@@ -1204,139 +1208,144 @@ ite_clrscreen(struct ite_softc *sc)
static inline void
ite_dnline(struct ite_softc *sc, int n)
{
- /* interesting.. if the cursor is outside the scrolling
- region, this command is simply ignored.. */
- if (sc->cury < sc->top_margin || sc->cury > sc->bottom_margin)
- return;
-
- n = uimin(n, sc->bottom_margin + 1 - sc->cury);
- if (n <= sc->bottom_margin - sc->cury)
- {
- SUBR_SCROLL(sc, sc->cury + n, 0, n, SCROLL_UP);
- attrmov(sc, sc->cury + n, 0, sc->cury, 0,
- sc->bottom_margin + 1 - sc->cury - n, sc->cols);
- }
- SUBR_CLEAR(sc, sc->bottom_margin - n + 1, 0, n, sc->cols);
- attrclr(sc, sc->bottom_margin - n + 1, 0, n, sc->cols);
- SUBR_CURSOR(sc, DRAW_CURSOR);
+
+ /*
+ * interesting.. if the cursor is outside the scrolling
+ * region, this command is simply ignored..
+ */
+ if (sc->cury < sc->top_margin || sc->cury > sc->bottom_margin)
+ return;
+
+ n = uimin(n, sc->bottom_margin + 1 - sc->cury);
+ if (n <= sc->bottom_margin - sc->cury) {
+ SUBR_SCROLL(sc, sc->cury + n, 0, n, SCROLL_UP);
+ attrmov(sc, sc->cury + n, 0, sc->cury, 0,
+ sc->bottom_margin + 1 - sc->cury - n, sc->cols);
+ }
+ SUBR_CLEAR(sc, sc->bottom_margin - n + 1, 0, n, sc->cols);
+ attrclr(sc, sc->bottom_margin - n + 1, 0, n, sc->cols);
+ SUBR_CURSOR(sc, DRAW_CURSOR);
}
static inline void
ite_inline(struct ite_softc *sc, int n)
{
- /* interesting.. if the cursor is outside the scrolling
- region, this command is simply ignored.. */
- if (sc->cury < sc->top_margin || sc->cury > sc->bottom_margin)
- return;
-
- n = uimin(n, sc->bottom_margin + 1 - sc->cury);
- if (n <= sc->bottom_margin - sc->cury)
- {
- SUBR_SCROLL(sc, sc->cury, 0, n, SCROLL_DOWN);
- attrmov(sc, sc->cury, 0, sc->cury + n, 0,
- sc->bottom_margin + 1 - sc->cury - n, sc->cols);
- }
- SUBR_CLEAR(sc, sc->cury, 0, n, sc->cols);
- attrclr(sc, sc->cury, 0, n, sc->cols);
- SUBR_CURSOR(sc, DRAW_CURSOR);
+
+ /*
+ * interesting.. if the cursor is outside the scrolling
+ * region, this command is simply ignored..
+ */
+ if (sc->cury < sc->top_margin || sc->cury > sc->bottom_margin)
+ return;
+
+ n = uimin(n, sc->bottom_margin + 1 - sc->cury);
+ if (n <= sc->bottom_margin - sc->cury) {
+ SUBR_SCROLL(sc, sc->cury, 0, n, SCROLL_DOWN);
+ attrmov(sc, sc->cury, 0, sc->cury + n, 0,
+ sc->bottom_margin + 1 - sc->cury - n, sc->cols);
+ }
+ SUBR_CLEAR(sc, sc->cury, 0, n, sc->cols);
+ attrclr(sc, sc->cury, 0, n, sc->cols);
+ SUBR_CURSOR(sc, DRAW_CURSOR);
}
static inline void
-ite_lf (struct ite_softc *sc)
+ite_lf(struct ite_softc *sc)
{
- ++sc->cury;
- if ((sc->cury == sc->bottom_margin+1) || (sc->cury == sc->rows))
- {
- sc->cury--;
- SUBR_SCROLL(sc, sc->top_margin + 1, 0, 1, SCROLL_UP);
- ite_clrline(sc);
- }
- SUBR_CURSOR(sc, MOVE_CURSOR);
- clr_attr(sc, ATTR_INV);
-
- /* reset character set */
- sc->G0 = CSET_ASCII;
- sc->G1 = CSET_DECGRAPH;
- sc->G2 = 0;
- sc->G3 = 0;
- sc->GL = &sc->G0;
- sc->GR = &sc->G1;
+
+ ++sc->cury;
+ if ((sc->cury == sc->bottom_margin+1) || (sc->cury == sc->rows)) {
+ sc->cury--;
+ SUBR_SCROLL(sc, sc->top_margin + 1, 0, 1, SCROLL_UP);
+ ite_clrline(sc);
+ }
+ SUBR_CURSOR(sc, MOVE_CURSOR);
+ clr_attr(sc, ATTR_INV);
+
+ /* reset character set */
+ sc->G0 = CSET_ASCII;
+ sc->G1 = CSET_DECGRAPH;
+ sc->G2 = 0;
+ sc->G3 = 0;
+ sc->GL = &sc->G0;
+ sc->GR = &sc->G1;
}
static inline void
-ite_crlf (struct ite_softc *sc)
+ite_crlf(struct ite_softc *sc)
{
- sc->curx = 0;
- ite_lf (sc);
+
+ sc->curx = 0;
+ ite_lf(sc);
}
static inline void
-ite_cr (struct ite_softc *sc)
+ite_cr(struct ite_softc *sc)
{
- if (sc->curx)
- {
- sc->curx = 0;
- SUBR_CURSOR(sc, MOVE_CURSOR);
- }
+
+ if (sc->curx) {
+ sc->curx = 0;
+ SUBR_CURSOR(sc, MOVE_CURSOR);
+ }
}
static inline void
-ite_rlf (struct ite_softc *sc)
+ite_rlf(struct ite_softc *sc)
{
- sc->cury--;
- if ((sc->cury < 0) || (sc->cury == sc->top_margin - 1))
- {
- sc->cury++;
- SUBR_SCROLL(sc, sc->top_margin, 0, 1, SCROLL_DOWN);
- ite_clrline(sc);
- }
- SUBR_CURSOR(sc, MOVE_CURSOR);
- clr_attr(sc, ATTR_INV);
+
+ sc->cury--;
+ if ((sc->cury < 0) || (sc->cury == sc->top_margin - 1)) {
+ sc->cury++;
+ SUBR_SCROLL(sc, sc->top_margin, 0, 1, SCROLL_DOWN);
+ ite_clrline(sc);
+ }
+ SUBR_CURSOR(sc, MOVE_CURSOR);
+ clr_attr(sc, ATTR_INV);
}
static inline int
-atoi (const char *cp)
+atoi(const char *cp)
{
- int n;
+ int n;
- for (n = 0; *cp && *cp >= '0' && *cp <= '9'; cp++)
- n = n * 10 + *cp - '0';
+ for (n = 0; *cp && *cp >= '0' && *cp <= '9'; cp++)
+ n = n * 10 + *cp - '0';
- return n;
+ return n;
}
static inline int
-ite_argnum (struct ite_softc *sc)
+ite_argnum(struct ite_softc *sc)
{
- char ch;
- int n;
-
- /* convert argument string into number */
- if (sc->ap == sc->argbuf)
- return 1;
- ch = *sc->ap;
- *sc->ap = 0;
- n = atoi (sc->argbuf);
- *sc->ap = ch;
-
- return n;
+ char ch;
+ int n;
+
+ /* convert argument string into number */
+ if (sc->ap == sc->argbuf)
+ return 1;
+ ch = *sc->ap;
+ *sc->ap = 0;
+ n = atoi (sc->argbuf);
+ *sc->ap = ch;
+
+ return n;
}
static inline int
-ite_zargnum (struct ite_softc *sc)
+ite_zargnum(struct ite_softc *sc)
{
- char ch;
- int n;
-
- /* convert argument string into number */
- if (sc->ap == sc->argbuf)
- return 0;
- ch = *sc->ap;
- *sc->ap = 0;
- n = atoi (sc->argbuf);
- *sc->ap = ch;
-
- return n; /* don't "n ? n : 1" here, <CSI>0m != <CSI>1m ! */
+ char ch;
+ int n;
+
+ /* convert argument string into number */
+ if (sc->ap == sc->argbuf)
+ return 0;
+ ch = *sc->ap;
+ *sc->ap = 0;
+ n = atoi (sc->argbuf);
+ *sc->ap = ch;
+
+ return n; /* don't "n ? n : 1" here, <CSI>0m != <CSI>1m ! */
}
static void
@@ -1344,12 +1353,12 @@ ite_putstr(const u_char *s, int len, dev_t dev)
{
struct ite_softc *sc;
int i;
-
+
sc = getitesp(dev);
/* XXX avoid problems */
if ((sc->flags & (ITE_ACTIVE|ITE_INGRF)) != ITE_ACTIVE)
- return;
+ return;
SUBR_CURSOR(sc, START_CURSOROPT);
for (i = 0; i < len; i++)
@@ -1371,70 +1380,70 @@ iteputchar(register int c, struct ite_softc *sc)
else
kbd_tty = kbd_ite->tp;
- if (sc->escape)
+ if (sc->escape)
{
- switch (sc->escape)
+ switch (sc->escape)
{
case ESC:
switch (c)
{
/* first 7bit equivalents for the 8bit control characters */
-
+
case 'D':
c = IND;
sc->escape = 0;
break; /* and fall into the next switch below (same for all `break') */
-
+
case 'E':
c = NEL;
sc->escape = 0;
break;
-
+
case 'H':
c = HTS;
sc->escape = 0;
break;
-
+
case 'M':
c = RI;
sc->escape = 0;
break;
-
+
case 'N':
c = SS2;
sc->escape = 0;
break;
-
+
case 'O':
c = SS3;
sc->escape = 0;
break;
-
+
case 'P':
c = DCS;
sc->escape = 0;
break;
-
+
case '[':
c = CSI;
sc->escape = 0;
break;
-
+
case '\\':
c = ST;
sc->escape = 0;
break;
-
+
case ']':
c = OSC;
sc->escape = 0;
break;
-
+
case '^':
c = PM;
sc->escape = 0;
break;
-
+
case '_':
c = APC;
sc->escape = 0;
@@ -1447,8 +1456,8 @@ iteputchar(register int c, struct ite_softc *sc)
sc->escape = ' ';
break;
-
- /* a lot of character set selections, not yet used...
+
+ /* a lot of character set selections, not yet used...
94-character sets: */
case '(': /* G0 */
case ')': /* G1 */
@@ -1461,12 +1470,12 @@ iteputchar(register int c, struct ite_softc *sc)
case 'A': /* ISO latin 1 */
case '<': /* user preferred suplemental */
case '0': /* DEC special graphics */
-
+
/* 96-character sets: */
case '-': /* G1 */
case '.': /* G2 */
case '/': /* G3 */
-
+
/* national character sets: */
case '4': /* dutch */
case '5':
@@ -1477,33 +1486,33 @@ iteputchar(register int c, struct ite_softc *sc)
case 'Y': /* italian */
case '6': /* norwegian/danish */
/* note: %5 and %6 are not supported (two chars..) */
-
+
sc->escape = 0;
/* just ignore for now */
return;
-
-
+
+
/* locking shift modes (as you might guess, not yet supported..) */
case '`':
sc->GR = &sc->G1;
sc->escape = 0;
return;
-
+
case 'n':
sc->GL = &sc->G2;
sc->escape = 0;
return;
-
+
case '}':
sc->GR = &sc->G2;
sc->escape = 0;
return;
-
+
case 'o':
sc->GL = &sc->G3;
sc->escape = 0;
return;
-
+
case '|':
sc->GR = &sc->G3;
sc->escape = 0;
@@ -1513,14 +1522,14 @@ iteputchar(register int c, struct ite_softc *sc)
sc->GR = &sc->G1;
sc->escape = 0;
return;
-
-
+
+
/* font width/height control */
case '#':
sc->escape = '#';
return;
-
-
+
+
/* hard terminal reset .. */
case 'c':
ite_reset (sc);
@@ -1542,7 +1551,7 @@ iteputchar(register int c, struct ite_softc *sc)
sc->sc_GR = sc->GR;
sc->escape = 0;
return;
-
+
case '8':
/* restore cursor */
sc->curx = sc->save_curx;
@@ -1557,17 +1566,17 @@ iteputchar(register int c, struct ite_softc *sc)
SUBR_CURSOR(sc, MOVE_CURSOR);
sc->escape = 0;
return;
-
+
case '=':
sc->keypad_appmode = 1;
sc->escape = 0;
return;
-
+
case '>':
sc->keypad_appmode = 0;
sc->escape = 0;
return;
-
+
case 'Z': /* request ID */
if (sc->emul_level == EMUL_VT100)
ite_sendstr ("\033[?61;0c"); /* XXX not clean */
@@ -1611,20 +1620,20 @@ iteputchar(register int c, struct ite_softc *sc)
sc->eightbit_C1 = 0;
sc->escape = 0;
return;
-
+
case 'G':
sc->eightbit_C1 = 1;
sc->escape = 0;
return;
-
+
default:
/* not supported */
sc->escape = 0;
return;
}
break;
-
-
+
+
case '#':
switch (c)
{
@@ -1632,34 +1641,34 @@ iteputchar(register int c, struct ite_softc *sc)
/* single height, single width */
sc->escape = 0;
return;
-
+
case '6':
/* double width, single height */
sc->escape = 0;
return;
-
+
case '3':
/* top half */
sc->escape = 0;
return;
-
+
case '4':
/* bottom half */
sc->escape = 0;
return;
-
+
case '8':
/* screen alignment pattern... */
alignment_display (sc);
sc->escape = 0;
return;
-
+
default:
sc->escape = 0;
return;
}
break;
-
+
case CSI:
@@ -1688,14 +1697,14 @@ iteputchar(register int c, struct ite_softc *sc)
if (! strncmp (sc->argbuf, "61\"", 3))
sc->emul_level = EMUL_VT100;
else if (! strncmp (sc->argbuf, "63;1\"", 5)
- || ! strncmp (sc->argbuf, "62;1\"", 5))
+ || ! strncmp (sc->argbuf, "62;1\"", 5))
sc->emul_level = EMUL_VT300_7;
else
sc->emul_level = EMUL_VT300_8;
sc->escape = 0;
return;
-
-
+
+
case '?':
*sc->ap = 0;
sc->escape = '?';
@@ -1704,7 +1713,7 @@ iteputchar(register int c, struct ite_softc *sc)
case 'c':
- *sc->ap = 0;
+ *sc->ap = 0;
if (sc->argbuf[0] == '>')
{
ite_sendstr ("\033[>24;0;0;0c");
@@ -1737,8 +1746,8 @@ iteputchar(register int c, struct ite_softc *sc)
}
sc->escape = 0;
return;
-
-
+
+
case 'x':
switch (ite_zargnum(sc))
{
@@ -1769,8 +1778,8 @@ iteputchar(register int c, struct ite_softc *sc)
sc->escape = 0;
return;
-
- case 'h': case 'l':
+
+ case 'h': case 'l':
n = ite_zargnum (sc);
switch (n)
{
@@ -1790,7 +1799,7 @@ iteputchar(register int c, struct ite_softc *sc)
sc->escape = 0;
return;
-
+
case 'L':
ite_inline (sc, ite_argnum (sc));
sc->escape = 0;
@@ -1801,7 +1810,7 @@ iteputchar(register int c, struct ite_softc *sc)
ite_dnchar (sc, ite_argnum (sc));
sc->escape = 0;
return;
-
+
case '@':
ite_inchar (sc, ite_argnum (sc));
@@ -1810,7 +1819,7 @@ iteputchar(register int c, struct ite_softc *sc)
case 'G':
- /* this one was *not* in my vt320 manual but in
+ /* this one was *not* in my vt320 manual but in
a vt320 termcap entry.. who is right?
It's supposed to set the horizontal cursor position. */
*sc->ap = 0;
@@ -1858,8 +1867,8 @@ iteputchar(register int c, struct ite_softc *sc)
SUBR_CURSOR(sc, MOVE_CURSOR);
clr_attr (sc, ATTR_INV);
return;
-
- case 'A':
+
+ case 'A':
n = ite_argnum (sc);
n = sc->cury - (n ? n : 1);
if (n < 0) n = 0;
@@ -1874,7 +1883,7 @@ iteputchar(register int c, struct ite_softc *sc)
SUBR_CURSOR(sc, MOVE_CURSOR);
clr_attr (sc, ATTR_INV);
return;
-
+
case 'B':
n = ite_argnum (sc);
n = sc->cury + (n ? n : 1);
@@ -1890,7 +1899,7 @@ iteputchar(register int c, struct ite_softc *sc)
SUBR_CURSOR(sc, MOVE_CURSOR);
clr_attr (sc, ATTR_INV);
return;
-
+
case 'C':
n = ite_argnum (sc);
n = n ? n : 1;
@@ -1899,7 +1908,7 @@ iteputchar(register int c, struct ite_softc *sc)
SUBR_CURSOR(sc, MOVE_CURSOR);
clr_attr (sc, ATTR_INV);
return;
-
+
case 'D':
n = ite_argnum (sc);
n = n ? n : 1;
@@ -1909,8 +1918,8 @@ iteputchar(register int c, struct ite_softc *sc)
SUBR_CURSOR(sc, MOVE_CURSOR);
clr_attr (sc, ATTR_INV);
return;
-
-
+
+
case 'J':
@@ -1949,7 +1958,7 @@ iteputchar(register int c, struct ite_softc *sc)
sc->escape = 0;
return;
-
+
case '}': case '`':
/* status line control */
sc->escape = 0;
@@ -1985,8 +1994,8 @@ iteputchar(register int c, struct ite_softc *sc)
}
sc->escape = 0;
return;
-
-
+
+
case 'm':
/* big attribute setter/resetter */
{
@@ -2004,12 +2013,12 @@ iteputchar(register int c, struct ite_softc *sc)
clr_attr (sc, ATTR_ALL);
chp++;
break;
-
+
case '1':
set_attr (sc, ATTR_BOLD);
chp++;
break;
-
+
case '2':
switch (chp[1])
{
@@ -2017,49 +2026,49 @@ iteputchar(register int c, struct ite_softc *sc)
clr_attr (sc, ATTR_BOLD);
chp += 2;
break;
-
+
case '4':
clr_attr (sc, ATTR_UL);
chp += 2;
break;
-
+
case '5':
clr_attr (sc, ATTR_BLINK);
chp += 2;
break;
-
+
case '7':
clr_attr (sc, ATTR_INV);
chp += 2;
break;
-
- default:
- chp++;
- break;
- }
+
+ default:
+ chp++;
+ break;
+ }
break;
-
+
case '4':
set_attr (sc, ATTR_UL);
chp++;
break;
-
+
case '5':
set_attr (sc, ATTR_BLINK);
chp++;
break;
-
+
case '7':
set_attr (sc, ATTR_INV);
chp++;
break;
-
+
default:
chp++;
break;
}
}
-
+
}
sc->escape = 0;
return;
@@ -2071,8 +2080,8 @@ iteputchar(register int c, struct ite_softc *sc)
sc->escape = 0;
return;
-
-
+
+
default:
sc->escape = 0;
return;
@@ -2082,8 +2091,7 @@ iteputchar(register int c, struct ite_softc *sc)
case '?': /* CSI ? */
- switch (c)
- {
+ switch (c) {
case '0': case '1': case '2': case '3': case '4':
case '5': case '6': case '7': case '8': case '9':
case ';': case '\"': case '$':
@@ -2101,11 +2109,11 @@ iteputchar(register int c, struct ite_softc *sc)
if (! strncmp (sc->argbuf, "15", 2))
/* printer status: no printer */
ite_sendstr ("\033[13n");
-
+
else if (! strncmp (sc->argbuf, "25", 2))
/* udk status */
ite_sendstr ("\033[20n");
-
+
else if (! strncmp (sc->argbuf, "26", 2))
/* keyboard dialect: US */
ite_sendstr ("\033[27;1n");
@@ -2114,7 +2122,7 @@ iteputchar(register int c, struct ite_softc *sc)
return;
- case 'h': case 'l':
+ case 'h': case 'l':
n = ite_zargnum (sc);
switch (n)
{
@@ -2158,14 +2166,14 @@ iteputchar(register int c, struct ite_softc *sc)
}
sc->escape = 0;
return;
-
+
default:
sc->escape = 0;
return;
}
break;
-
+
default:
sc->escape = 0;
return;
@@ -2177,7 +2185,7 @@ iteputchar(register int c, struct ite_softc *sc)
case VT: /* VT is treated like LF */
case FF: /* so is FF */
case LF:
- /* cr->crlf distinction is done here, on output,
+ /* cr->crlf distinction is done here, on output,
not on input! */
if (sc->linefeed_newline)
ite_crlf (sc);
@@ -2188,7 +2196,7 @@ iteputchar(register int c, struct ite_softc *sc)
case CR:
ite_cr (sc);
break;
-
+
case BS:
if (--sc->curx < 0)
sc->curx = 0;
@@ -2214,7 +2222,7 @@ iteputchar(register int c, struct ite_softc *sc)
case SO:
sc->GL = &sc->G1;
break;
-
+
case SI:
sc->GL = &sc->G0;
break;
@@ -2226,7 +2234,7 @@ iteputchar(register int c, struct ite_softc *sc)
case CAN:
sc->escape = 0; /* cancel any escape sequence in progress */
break;
-
+
case SUB:
sc->escape = 0; /* dito, but see below */
/* should also display a reverse question mark!! */
@@ -2241,7 +2249,7 @@ iteputchar(register int c, struct ite_softc *sc)
case IND: /* index: move cursor down, scroll */
ite_lf (sc);
break;
-
+
case NEL: /* next line. next line, first pos. */
ite_crlf (sc);
break;
@@ -2250,7 +2258,7 @@ iteputchar(register int c, struct ite_softc *sc)
if (sc->curx < sc->cols)
sc->tabs[sc->curx] = 1;
break;
-
+
case RI: /* reverse index */
ite_rlf (sc);
break;
@@ -2258,24 +2266,24 @@ iteputchar(register int c, struct ite_softc *sc)
case SS2: /* go into G2 for one character */
/* not yet supported */
break;
-
+
case SS3: /* go into G3 for one character */
break;
-
+
case DCS: /* device control string introducer */
sc->escape = DCS;
sc->ap = sc->argbuf;
break;
-
+
case CSI: /* control sequence introducer */
sc->escape = CSI;
sc->ap = sc->argbuf;
break;
-
+
case ST: /* string terminator */
/* ignore, if not used as terminator */
break;
-
+
case OSC: /* introduces OS command. Ignore everything upto ST */
sc->escape = OSC;
break;
@@ -2283,7 +2291,7 @@ iteputchar(register int c, struct ite_softc *sc)
case PM: /* privacy message, ignore everything upto ST */
sc->escape = PM;
break;
-
+
case APC: /* application program command, ignore everything upto ST */
sc->escape = APC;
break;
@@ -2298,8 +2306,7 @@ iteputchar(register int c, struct ite_softc *sc)
if ((sc->attribute & ATTR_INV) || attrtest(sc, ATTR_INV)) {
attrset(sc, ATTR_INV);
SUBR_PUTC(sc, c, sc->cury, sc->curx, ATTR_INV);
- }
- else
+ } else
SUBR_PUTC(sc, c, sc->cury, sc->curx, ATTR_NOR);
#else
SUBR_PUTC(sc, c, sc->cury, sc->curx, sc->attribute);
diff --git a/sys/arch/atari/dev/ite_cc.c b/sys/arch/atari/dev/ite_cc.c
index 2f9b9da64b4..abedd70ac3e 100644
--- a/sys/arch/atari/dev/ite_cc.c
+++ b/sys/arch/atari/dev/ite_cc.c
@@ -1,4 +1,4 @@
-/* $NetBSD: ite_cc.c,v 1.46 2022/06/26 18:46:14 tsutsui Exp $ */
+/* $NetBSD: ite_cc.c,v 1.47 2023/01/06 10:28:28 tsutsui Exp $ */
/*
* Copyright (c) 1996 Leo Weppelman
@@ -32,7 +32,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ite_cc.c,v 1.46 2022/06/26 18:46:14 tsutsui Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ite_cc.c,v 1.47 2023/01/06 10:28:28 tsutsui Exp $");
#include <sys/param.h>
#include <sys/conf.h>
@@ -207,7 +207,7 @@ grfccattach(device_t parent, device_t self, void *aux)
extern const struct cdevsw grf_cdevsw;
/*
- * find our major device number
+ * find our major device number
*/
maj = cdevsw_lookup_major(&grf_cdevsw);
@@ -265,7 +265,7 @@ grfccattach(device_t parent, device_t self, void *aux)
aprint_normal(" monochrome\n");
else
aprint_normal(" colors %d\n", sc->g_display.gd_colors);
-
+
/*
* try and attach an ite
*/
@@ -302,7 +302,7 @@ grfcc_cnprobe(void)
return CN_INTERNAL;
}
/*
- * called from grf_cc to init ite portion of
+ * called from grf_cc to init ite portion of
* grf_softc struct
*/
void
@@ -375,7 +375,7 @@ static int
ite_newsize(struct ite_softc *ip, struct itewinsize *winsz)
{
struct view_size vs;
- ipriv_t *cci = ip->priv;
+ ipriv_t *cci = ip->priv;
u_long i, j;
int error = 0;
view_t *view;
@@ -394,7 +394,7 @@ ite_newsize(struct ite_softc *ip, struct itewinsize *winsz)
/*
* Reinitialize our structs
*/
- ip->cols = view->display.width / ip->font.width;
+ ip->cols = view->display.width / ip->font.width;
ip->rows = view->display.height / ip->font.height;
/*
@@ -436,7 +436,7 @@ ite_newsize(struct ite_softc *ip, struct itewinsize *winsz)
cci->ft_y = ip->font.height;
cci->row_bytes = cci->row_offset * cci->ft_y;
cci->row_ptr[0] = view->bitmap->plane;
- for (i = 1; i < ip->rows; i++)
+ for (i = 1; i < ip->rows; i++)
cci->row_ptr[i] = cci->row_ptr[i - 1] + cci->row_bytes;
/*
@@ -445,14 +445,14 @@ ite_newsize(struct ite_softc *ip, struct itewinsize *winsz)
*/
j = view->bitmap->depth * 2;
cci->column_offset[0] = 0;
- for (i = 1; i < ip->cols; i++)
+ for (i = 1; i < ip->cols; i++)
cci->column_offset[i] = ((i >> 1) * j) + (i & 1);
/* initialize the font cell pointers */
cci->font_cell[ip->font.font_lo] = ip->font.font_p;
for (i = ip->font.font_lo + 1; i <= ip->font.font_hi; i++)
cci->font_cell[i] = cci->font_cell[i - 1] + ip->font.height;
-
+
return error;
}
@@ -481,8 +481,8 @@ itecc_ioctl(struct ite_softc *ip, u_long cmd, void * addr, int flag,
ws.ws_ypixel = view->display.height;
ite_reset(ip);
/*
- * XXX tell tty about the change
- * XXX this is messy, but works
+ * XXX tell tty about the change
+ * XXX this is messy, but works
*/
(*ite_cdevsw.d_ioctl)(ip->grf->g_itedev, TIOCSWINSZ,
(void *)&ws, 0, l);
@@ -522,16 +522,16 @@ cursor32(struct ite_softc *ip, int flag)
cci->cursor_opt++;
return; /* if we are already opted. */
}
-
- if (cci->cursor_opt)
+
+ if (cci->cursor_opt)
return; /* if we are still nested. */
/* else we draw the cursor. */
-
+
if (flag != DRAW_CURSOR && flag != END_CURSOROPT) {
/*
* erase the cursor
*/
- cend = ip->font.height - 1;
+ cend = ip->font.height - 1;
pl = cci->column_offset[ip->cursorx]
+ cci->row_ptr[ip->cursory];
__asm volatile
@@ -545,8 +545,8 @@ cursor32(struct ite_softc *ip, int flag)
if (flag != DRAW_CURSOR && flag != MOVE_CURSOR && flag != END_CURSOROPT)
return;
-
- /*
+
+ /*
* draw the cursor
*/
cend = uimin(ip->curx, ip->cols - 1);
@@ -555,7 +555,7 @@ cursor32(struct ite_softc *ip, int flag)
return;
ip->cursorx = cend;
ip->cursory = ip->cury;
- cend = ip->font.height - 1;
+ cend = ip->font.height - 1;
pl = cci->column_offset[ip->cursorx]
+ cci->row_ptr[ip->cursory];
@@ -627,7 +627,7 @@ clear8(struct ite_softc *ip, int sy, int sx, int h, int w)
/* common case: clearing whole lines */
while (h--) {
int i;
- u_char *ptr = cci->row_ptr[sy];
+ u_char *ptr = cci->row_ptr[sy];
for (i = 0; i < ip->font.height; i++) {
memset(ptr, 0, bm->bytes_per_row);
ptr += bm->bytes_per_row;
@@ -652,8 +652,8 @@ clear8(struct ite_softc *ip, int sy, int sx, int h, int w)
u_char *p = pls;
while (p <= ple)
*p++ = 0;
- pls += bm->bytes_per_row;
- ple += bm->bytes_per_row;
+ pls += bm->bytes_per_row;
+ ple += bm->bytes_per_row;
}
}
}
@@ -674,7 +674,7 @@ scroll8(register struct ite_softc *ip, register int sy, int sx, int count,
(ip->bottom_margin - dy + 1) * ip->font.height,
0, -(count * ip->font.height));
} else if (dir == SCROLL_DOWN) {
- cursor32(ip, ERASE_CURSOR);
+ cursor32(ip, ERASE_CURSOR);
scrollbmap(bm, 0, sy * ip->font.height, bm->bytes_per_row >> 3,
(ip->bottom_margin - sy + 1) * ip->font.height,
0, count * ip->font.height);
@@ -697,7 +697,7 @@ scroll8(register struct ite_softc *ip, register int sy, int sx, int count,
: "a" (pl), "d" (dofs2),
"d" (ip->font.width), "d" (t));
}
- pl += bm->bytes_per_row;
+ pl += bm->bytes_per_row;
}
} else { /* SCROLL_LEFT */
int sofs = (sx) * ip->font.width;
@@ -719,12 +719,12 @@ scroll8(register struct ite_softc *ip, register int sy, int sx, int count,
sofs2 += ip->font.width;
dofs2 += ip->font.width;
}
- pl += bm->bytes_per_row;
+ pl += bm->bytes_per_row;
}
- }
+ }
}
-static void
+static void
scrollbmap (bmap_t *bm, u_short x, u_short y, u_short width, u_short height,
short dx, short dy)
{
@@ -733,11 +733,11 @@ scrollbmap (bmap_t *bm, u_short x, u_short y, u_short width, u_short height,
if (dx) {
/* FIX: */
panic ("delta x not supported in scroll bitmap yet.");
- }
+ }
if (dy == 0) {
return;
- }
+ }
if (dy > 0) {
u_long *pl = (u_long *)bm->plane;
u_long *src_y = pl + (lwpr * y);
@@ -746,13 +746,13 @@ scrollbmap (bmap_t *bm, u_short x, u_short y, u_short width, u_short height,
u_long *clr_y = src_y;
u_long clr_count = dest_y - src_y;
u_long bc, cbc;
-
+
src_y += count - 1;
dest_y += count - 1;
bc = count >> 4;
count &= 0xf;
-
+
while (bc--) {
*dest_y-- = *src_y--; *dest_y-- = *src_y--;
*dest_y-- = *src_y--; *dest_y-- = *src_y--;
@@ -780,7 +780,7 @@ scrollbmap (bmap_t *bm, u_short x, u_short y, u_short width, u_short height,
} else {
u_long *pl = (u_long *)bm->plane;
u_long *src_y = pl + (lwpr * (y - dy));
- u_long *dest_y = pl + (lwpr * y);
+ u_long *dest_y = pl + (lwpr * y);
long count = lwpr * (height + dy);
u_long *clr_y = dest_y + count;
u_long clr_count = src_y - dest_y;
@@ -788,7 +788,7 @@ scrollbmap (bmap_t *bm, u_short x, u_short y, u_short width, u_short height,
bc = count >> 4;
count &= 0xf;
-
+
while (bc--) {
*dest_y++ = *src_y++; *dest_y++ = *src_y++;
*dest_y++ = *src_y++; *dest_y++ = *src_y++;
diff --git a/sys/arch/atari/dev/ite_et.c b/sys/arch/atari/dev/ite_et.c
index b890d410b3e..aa4e26c3e05 100644
--- a/sys/arch/atari/dev/ite_et.c
+++ b/sys/arch/atari/dev/ite_et.c
@@ -1,4 +1,4 @@
-/* $NetBSD: ite_et.c,v 1.37 2022/06/26 18:46:14 tsutsui Exp $ */
+/* $NetBSD: ite_et.c,v 1.38 2023/01/06 10:28:28 tsutsui Exp $ */
/*
* Copyright (c) 1996 Leo Weppelman.
@@ -26,7 +26,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ite_et.c,v 1.37 2022/06/26 18:46:14 tsutsui Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ite_et.c,v 1.38 2023/01/06 10:28:28 tsutsui Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -181,7 +181,7 @@ grfetattach(device_t parent, device_t self, void *aux)
extern const struct cdevsw grf_cdevsw;
/*
- * find our major device number
+ * find our major device number
*/
maj = cdevsw_lookup_major(&grf_cdevsw);
@@ -239,7 +239,7 @@ grfetattach(device_t parent, device_t self, void *aux)
aprint_normal(" monochrome\n");
else
aprint_normal(" colors %d\n", sc->g_display.gd_colors);
-
+
/*
* try and attach an ite
*/
@@ -370,7 +370,7 @@ ite_newsize(struct ite_softc *ip, struct itewinsize *winsz)
/*
* Reinitialize our structs
*/
- ip->cols = view->display.width / ip->font.width;
+ ip->cols = view->display.width / ip->font.width;
ip->rows = view->display.height / ip->font.height;
/*
@@ -421,8 +421,8 @@ iteet_ioctl(struct ite_softc *ip, u_long cmd, void * addr, int flag,
ws.ws_ypixel = view->display.height;
ite_reset(ip);
/*
- * XXX tell tty about the change
- * XXX this is messy, but works
+ * XXX tell tty about the change
+ * XXX this is messy, but works
*/
(*ite_cdevsw.d_ioctl)(ip->grf->g_itedev, TIOCSWINSZ,
(void *)&ws, 0, l);
@@ -462,9 +462,9 @@ et_cursor(struct ite_softc *ip, int flag)
return;
switch (flag) {
- case DRAW_CURSOR:
+ case DRAW_CURSOR:
/*WCrt(ba, CRT_ID_CURSOR_START, & ~0x20); */
- case MOVE_CURSOR:
+ case MOVE_CURSOR:
cpos = RCrt(ba, CRT_ID_START_ADDR_LOW) & 0xff;
cpos |= (RCrt(ba, CRT_ID_START_ADDR_HIGH) & 0xff) << 8;
cpos += ip->curx + ip->cury * ip->cols;
@@ -475,13 +475,13 @@ et_cursor(struct ite_softc *ip, int flag)
ip->cursorx = ip->curx;
ip->cursory = ip->cury;
break;
- case ERASE_CURSOR:
+ case ERASE_CURSOR:
/*WCrt(ba, CRT_ID_CURSOR_START, | 0x20); */
- case START_CURSOROPT:
- case END_CURSOROPT:
- default:
+ case START_CURSOROPT:
+ case END_CURSOROPT:
+ default:
break;
- }
+ }
}
void
@@ -536,28 +536,28 @@ et_scroll(struct ite_softc *ip, int sy, int sx, int count, int dir)
fb = (u_short*)v->bitmap->plane + sy * ip->cols;
switch (dir) {
- case SCROLL_UP:
- src = fb;
- dst = fb - count * ip->cols;
- len = (ip->bottom_margin + 1 - sy) * ip->cols;
- break;
- case SCROLL_DOWN:
- src = fb;
- dst = fb + count * ip->cols;
- len = (ip->bottom_margin + 1 - (sy + count)) * ip->cols;
- break;
- case SCROLL_RIGHT:
- src = fb + sx;
- dst = fb + sx + count;
- len = ip->cols - sx + count;
- break;
- case SCROLL_LEFT:
- src = fb + sx;
- dst = fb + sx - count;
- len = ip->cols - sx;
- break;
- default:
- return;
+ case SCROLL_UP:
+ src = fb;
+ dst = fb - count * ip->cols;
+ len = (ip->bottom_margin + 1 - sy) * ip->cols;
+ break;
+ case SCROLL_DOWN:
+ src = fb;
+ dst = fb + count * ip->cols;
+ len = (ip->bottom_margin + 1 - (sy + count)) * ip->cols;
+ break;
+ case SCROLL_RIGHT:
+ src = fb + sx;
+ dst = fb + sx + count;
+ len = ip->cols - sx + count;
+ break;
+ case SCROLL_LEFT:
+ src = fb + sx;
+ dst = fb + sx - count;
+ len = ip->cols - sx;
+ break;
+ default:
+ return;
}
if (src > dst) {
while (len--)
@@ -603,7 +603,7 @@ et_inittextmode(struct ite_softc *ip, et_sv_reg_t *etregs, int loadfont)
vgaw(ba, VDAC_ADDRESS_W, 0);
for (z = 0; z < 256; z++) {
y = (z & 1) ? ((z > 7) ? 2 : 1) : 0;
-
+
vgaw(ba, VDAC_DATA, etconscolors[y][0]);
vgaw(ba, VDAC_DATA, etconscolors[y][1]);
vgaw(ba, VDAC_DATA, etconscolors[y][2]);
@@ -622,7 +622,7 @@ et_inittextmode(struct ite_softc *ip, et_sv_reg_t *etregs, int loadfont)
WGfx(ba, GCT_ID_GRAPHICS_MODE, 0x00);
WGfx(ba, GCT_ID_MISC, 0x04);
splx(s);
-
+
/*
* load text font into beginning of display memory. Each
* character cell is 32 bytes long (enough for 4 planes)
diff --git a/sys/arch/atari/dev/itevar.h b/sys/arch/atari/dev/itevar.h
index 08b5bbffacd..bd484ce6790 100644
--- a/sys/arch/atari/dev/itevar.h
+++ b/sys/arch/atari/dev/itevar.h
@@ -1,4 +1,4 @@
-/* $NetBSD: itevar.h,v 1.15 2022/06/25 03:33:29 tsutsui Exp $ */
+/* $NetBSD: itevar.h,v 1.16 2023/01/06 10:28:28 tsutsui Exp $ */
/*
* Copyright (c) 1995 Leo Weppelman (Atari modifications)
@@ -91,10 +91,10 @@ struct ite_softc {
short top_margin;
short bottom_margin;
short inside_margins;
- short eightbit_C1;
+ short eightbit_C1;
short emul_level;
- enum ite_attr attribute;
- enum ite_attr save_attribute;
+ enum ite_attr attribute;
+ enum ite_attr save_attribute;
int curx;
int save_curx;
int cury;
diff --git a/sys/arch/atari/dev/kbd.c b/sys/arch/atari/dev/kbd.c
index 94b33e34354..32479f9d923 100644
--- a/sys/arch/atari/dev/kbd.c
+++ b/sys/arch/atari/dev/kbd.c
@@ -1,4 +1,4 @@
-/* $NetBSD: kbd.c,v 1.56 2022/06/26 09:18:06 martin Exp $ */
+/* $NetBSD: kbd.c,v 1.57 2023/01/06 10:28:28 tsutsui Exp $ */
/*
* Copyright (c) 1995 Leo Weppelman
@@ -31,7 +31,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: kbd.c,v 1.56 2022/06/26 09:18:06 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kbd.c,v 1.57 2023/01/06 10:28:28 tsutsui Exp $");
#include "mouse.h"
#include "ite.h"
@@ -95,7 +95,7 @@ struct kbd_softc {
int sc_pollingmode; /* polling mode on? whatever it is... */
#endif
void *sc_sicookie; /* softint(9) cookie */
- krndsource_t sc_rndsource; /* rnd(9) entropy */
+ krndsource_t sc_rndsource; /* rnd(9) entropy */
};
/* WSKBD */
diff --git a/sys/arch/atari/dev/kbdmap.c b/sys/arch/atari/dev/kbdmap.c
index eca3ac7a309..ea993dbc079 100644
--- a/sys/arch/atari/dev/kbdmap.c
+++ b/sys/arch/atari/dev/kbdmap.c
@@ -1,4 +1,4 @@
-/* $NetBSD: kbdmap.c,v 1.6 2009/10/20 19:10:10 snj Exp $ */
+/* $NetBSD: kbdmap.c,v 1.7 2023/01/06 10:28:28 tsutsui Exp $ */
/*
* Copyright (c) 1995 Leo Weppelman.
@@ -26,11 +26,11 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: kbdmap.c,v 1.6 2009/10/20 19:10:10 snj Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kbdmap.c,v 1.7 2023/01/06 10:28:28 tsutsui Exp $");
#include <atari/dev/kbdmap.h>
-/* define a default keymap. This can be changed by keyboard ioctl's
+/* define a default keymap. This can be changed by keyboard ioctl's
(later at least..) */
/* mode shortcuts: */
@@ -130,7 +130,7 @@ struct kbdmap ascii_kbdmap = {
/* 0x78 */ { 0, 0 }, { 0, 0 }, { 0, 0 }, { 0, 0 },
/* 0x7c */ { 0, 0 }, { 0, 0 }, { 0, 0 }, { 0, 0 }
},
-
+
/* alt map FIXME: No altmap yet.. */
{
{ 0, 0 }
@@ -141,14 +141,14 @@ struct kbdmap ascii_kbdmap = {
{ 0, 0 }
},
- {
+ {
/* string table. If there's a better way to get the offsets into the
above table, please tell me..
-
+
NOTE: save yourself and others a lot of grief by *not* using
CSI == 0x9b, using the two-character sequence gives
much less trouble, especially in GNU-Emacs.. */
-
+
3, ESC, '[', 'A', /* 0x00: CRSR UP */
3, ESC, '[', 'B', /* 0x04: CRSR DOWN */
3, ESC, '[', 'C', /* 0x08: CRSR RIGHT */
@@ -187,18 +187,16 @@ struct kbdmap ascii_kbdmap = {
unsigned char acctable[KBD_NUM_ACC][64] = {
{ "@ÀBCDÈFGHÌJKLMNÒPQRSTÙVWXYZ[\\]^_"
"`àbcdèfghìjklmnòpqrstùvwxyz{|}~\177"}, /* KBD_ACC_GRAVE */
-
+
{ "@ÁBCDÉFGHÍJKLMNÓPQRSTÚVWXYZ[\\]^_"
"`ábcdéfghíjklmnópqrstúvwxyz{|}~\177"}, /* KBD_ACC_ACUTE */
-
+
{ "@ÂBCDÊFGHÎJKLMNÔPQRSTÛVWXYZ[\\]^_"
"`âbcdêfghîjklmnôpqrstûvwxyz{|}~\177"}, /* KBD_ACC_CIRC */
{ "@ÃBCDEFGHIJKLMÑÕPQRSTUVWXYZ[\\]^_"
"`ãbcdefghijklmñÕpqrstuvwxyz{|}~\177"}, /* KBD_ACC_TILDE */
-
+
{ "@ÄBCDËFGHÏJKLMNÖPQRSTÜVWXYZ[\\]^_"
"`äbcdëfghïjklmnöpqrstüvwxyz{|}~\177"}, /* KBD_ACC_DIER */
};
-
-
diff --git a/sys/arch/atari/dev/lpt.c b/sys/arch/atari/dev/lpt.c
index f8d94b5a08e..cdff702cae7 100644
--- a/sys/arch/atari/dev/lpt.c
+++ b/sys/arch/atari/dev/lpt.c
@@ -1,4 +1,4 @@
-/* $NetBSD: lpt.c,v 1.39 2022/06/26 06:25:09 tsutsui Exp $ */
+/* $NetBSD: lpt.c,v 1.40 2023/01/06 10:28:28 tsutsui Exp $ */
/*
* Copyright (c) 1996 Leo Weppelman
@@ -16,7 +16,7 @@
* 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
@@ -39,24 +39,24 @@
* Device Driver originally written for AT parallel printer port. Now
* drives the printer port on the YM2149.
*
- * 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.
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: lpt.c,v 1.39 2022/06/26 06:25:09 tsutsui Exp $");
+__KERNEL_RCSID(0, "$NetBSD: lpt.c,v 1.40 2023/01/06 10:28:28 tsutsui Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -190,7 +190,7 @@ lpopen(dev_t dev, int flag, int mode, struct lwp *l)
{
u_char flags = LPTFLAGS(dev);
struct lpt_softc *sc;
- int error;
+ int error;
int spin;
int sps;
@@ -335,7 +335,7 @@ pushbytes(struct lpt_softc *sc)
return 0;
}
-/*
+/*
* Copy a line from user space to a local buffer, then call putc to get the
* chars moved to the output queue.
*/
diff --git a/sys/arch/atari/dev/md_root.c b/sys/arch/atari/dev/md_root.c
index 602435b80cc..258bf12de4c 100644
--- a/sys/arch/atari/dev/md_root.c
+++ b/sys/arch/atari/dev/md_root.c
@@ -1,4 +1,4 @@
-/* $NetBSD: md_root.c,v 1.35 2021/01/03 17:42:10 thorpej Exp $ */
+/* $NetBSD: md_root.c,v 1.36 2023/01/06 10:28:28 tsutsui Exp $ */
/*
* Copyright (c) 1996 Leo Weppelman.
@@ -26,7 +26,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: md_root.c,v 1.35 2021/01/03 17:42:10 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: md_root.c,v 1.36 2023/01/06 10:28:28 tsutsui Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -281,8 +281,8 @@ md_compressed(void * buf, int nbyte, struct read_info *rsp)
{
static int dotc = 0;
struct buf *bp;
- int nread = 0;
- int done, error;
+ int nread = 0;
+ int done, error;
error = 0;
diff --git a/sys/arch/atari/dev/ncr5380.c b/sys/arch/atari/dev/ncr5380.c
index 42c982a1124..b0b66127c6c 100644
--- a/sys/arch/atari/dev/ncr5380.c
+++ b/sys/arch/atari/dev/ncr5380.c
@@ -1,4 +1,4 @@
-/* $NetBSD: ncr5380.c,v 1.77 2022/04/07 19:33:37 andvar Exp $ */
+/* $NetBSD: ncr5380.c,v 1.78 2023/01/06 10:28:28 tsutsui Exp $ */
/*
* Copyright (c) 1995 Leo Weppelman.
@@ -26,7 +26,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ncr5380.c,v 1.77 2022/04/07 19:33:37 andvar Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ncr5380.c,v 1.78 2023/01/06 10:28:28 tsutsui Exp $");
/*
* Bit mask of targets you want debugging to be shown
@@ -145,7 +145,7 @@ finish_req(SC_REQ *reqp)
/*
* If we bounced, free the bounce buffer
*/
- if (reqp->dr_flag & DRIVER_BOUNCING)
+ if (reqp->dr_flag & DRIVER_BOUNCING)
free_bounceb(reqp->bounceb);
#endif /* REAL_DMA */
#ifdef DBG_REQ
@@ -486,7 +486,7 @@ scsi_main(struct ncr_softc *sc)
* Found one, remove it from
* the issue queue.
*/
- if (prev == NULL)
+ if (prev == NULL)
issue_q = req->next;
else
prev->next = req->next;
@@ -510,7 +510,7 @@ scsi_main(struct ncr_softc *sc)
if ((GET_5380_REG(NCR5380_IDSTAT) & (SC_S_SEL|SC_S_IO))
== (SC_S_SEL|SC_S_IO)){
if (req != NULL) {
- req->next = issue_q;
+ req->next = issue_q;
issue_q = req;
}
splx(sps);
@@ -545,7 +545,7 @@ scsi_main(struct ncr_softc *sc)
*/
if (scsi_select(req, 0)) {
sps = splbio();
- req->next = issue_q;
+ req->next = issue_q;
issue_q = req;
splx(sps);
#ifdef DBG_REQ
@@ -747,7 +747,7 @@ scsi_select(SC_REQ *reqp, int code)
*/
SET_5380_REG(NCR5380_DATA, SC_HOST_ID);
SET_5380_REG(NCR5380_MODE, SC_ARBIT);
-
+
splx(sps);
cnt = 10;
@@ -899,7 +899,7 @@ scsi_select(SC_REQ *reqp, int code)
* Since we followed the SCSI-spec and raised ATN while SEL was true
* but before BSY was false during the selection, a 'MESSAGE OUT'
* phase should follow. Unfortunately, this does not happen on
- * all targets (Asante ethernet devices, for example), so we must
+ * all targets (Asante ethernet devices, for example), so we must
* check the actual mode if the message transfer fails--if the
* new phase is PH_CMD and has never been successfully selected
* w/ATN in the past, then we assume that it is an old device
@@ -1104,7 +1104,7 @@ information_transfer(struct ncr_softc *sc)
reqp->status = tmp;
PID("info_transf6");
return -1;
- default :
+ default:
ncr_tprint(reqp, "Unknown phase\n");
}
PID("info_transf7");
@@ -1181,7 +1181,7 @@ handle_message(SC_REQ *reqp, u_int msg)
case MSG_ABORT:
case MSG_CMDCOMPLETE:
ack_message();
- connected = NULL;
+ connected = NULL;
busy &= ~(1 << reqp->targ_id);
if ((reqp->dr_flag & DRIVER_AUTOSEN) == 0) {
reqp->xs->resid = reqp->xdata_len;
@@ -1228,7 +1228,7 @@ handle_message(SC_REQ *reqp, u_int msg)
nack_message(reqp, MSG_MESSAGE_REJECT);
PID("hmessage9");
return -1;
- default:
+ default:
if ((msg & 0x80) && (msg & 0x18) == 0) { /* IDENTIFY */
PID("hmessage10");
ack_message();
@@ -1283,7 +1283,7 @@ reselect(struct ncr_softc *sc)
}
SET_5380_REG(NCR5380_ICOM, 0);
-
+
/*
* Check if the reselection is still valid. Check twice because
* of possible line glitches - cheaper than delay(1) and we need
@@ -1365,12 +1365,12 @@ transfer_pio(u_char *phase, u_char *data, u_long *len, int dont_drop_ack)
SET_5380_REG(NCR5380_TCOM, ph);
do {
if (!wait_req_true()) {
- DBG_PIOPRINT ("SCSI: transfer_pio: missing REQ\n",
+ DBG_PIOPRINT ("SCSI: transfer_pio: missing REQ\n",
0, 0);
break;
}
if (((GET_5380_REG(NCR5380_IDSTAT) >> 2) & 7) != ph) {
- DBG_PIOPRINT("SCSI: transfer_pio: phase mismatch\n",
+ DBG_PIOPRINT("SCSI: transfer_pio: phase mismatch\n",
0, 0);
break;
}
@@ -1702,7 +1702,7 @@ reach_msg_out(struct ncr_softc *sc, u_long len)
}
ncr_aprint(sc, "Phase now: %d after %ld bytes.\n",
phase, len - n);
-
+
}
return -1;
}
diff --git a/sys/arch/atari/dev/ncr5380reg.h b/sys/arch/atari/dev/ncr5380reg.h
index fce3f4a2055..d9325ed51b5 100644
--- a/sys/arch/atari/dev/ncr5380reg.h
+++ b/sys/arch/atari/dev/ncr5380reg.h
@@ -1,4 +1,4 @@
-/* $NetBSD: ncr5380reg.h,v 1.23 2011/06/05 06:33:42 tsutsui Exp $ */
+/* $NetBSD: ncr5380reg.h,v 1.24 2023/01/06 10:28:28 tsutsui Exp $ */
/*
* Copyright (c) 1995 Leo Weppelman.
@@ -102,7 +102,7 @@
#define SC_ACK_STAT 0x01 /* R - State of ACK line */
#define SC_S_SEND 0x00 /* W - Start DMA output */
-#define SC_CLINT { /* Clear interrupts */ \
+#define SC_CLINT { /* Clear interrupts */ \
int i = GET_5380_REG(NCR5380_IRCV); \
}
diff --git a/sys/arch/atari/dev/ncr5380var.h b/sys/arch/atari/dev/ncr5380var.h
index 64b1aa3fc66..d91b917b614 100644
--- a/sys/arch/atari/dev/ncr5380var.h
+++ b/sys/arch/atari/dev/ncr5380var.h
@@ -1,4 +1,4 @@
-/* $NetBSD: ncr5380var.h,v 1.8 2010/04/13 13:30:37 tsutsui Exp $ */
+/* $NetBSD: ncr5380var.h,v 1.9 2023/01/06 10:28:28 tsutsui Exp $ */
/*
* Copyright (c) 1996 Leo Weppelman.
@@ -36,21 +36,21 @@
#endif
#ifdef DBG_SEL
-#define DBG_SELPRINT(a,b) printf(a,b)
+#define DBG_SELPRINT(a, b) printf(a, b)
#else
-#define DBG_SELPRINT(a,b)
+#define DBG_SELPRINT(a, b)
#endif
#ifdef DBG_PIO
-#define DBG_PIOPRINT(a,b,c) printf(a,b,c)
+#define DBG_PIOPRINT(a, b, c) printf(a, b, c)
#else
-#define DBG_PIOPRINT(a,b,c)
+#define DBG_PIOPRINT(a, b, c)
#endif
#ifdef DBG_INF
-#define DBG_INFPRINT(a,b,c) a(b,c)
+#define DBG_INFPRINT(a, b, c) a(b, c)
#else
-#define DBG_INFPRINT(a,b,c)
+#define DBG_INFPRINT(a, b, c)
#endif
#ifdef DBG_PID
diff --git a/sys/arch/atari/dev/nvram.c b/sys/arch/atari/dev/nvram.c
index 340a3376330..86e8c583194 100644
--- a/sys/arch/atari/dev/nvram.c
+++ b/sys/arch/atari/dev/nvram.c
@@ -1,4 +1,4 @@
-/* $NetBSD: nvram.c,v 1.22 2022/07/02 14:29:04 tsutsui Exp $ */
+/* $NetBSD: nvram.c,v 1.23 2023/01/06 10:28:28 tsutsui Exp $ */
/*
* Copyright (c) 1995 Leo Weppelman.
@@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: nvram.c,v 1.22 2022/07/02 14:29:04 tsutsui Exp $");
+__KERNEL_RCSID(0, "$NetBSD: nvram.c,v 1.23 2023/01/06 10:28:28 tsutsui Exp $");
#include <sys/param.h>
#include <sys/conf.h>
@@ -89,7 +89,7 @@ nvr_attach(device_t parent, device_t self, void *aux)
{
struct nvr_softc *sc;
int nreg;
-
+
/*
* Check the validity of the NVram contents
*/
@@ -181,7 +181,7 @@ nvram_csum(void)
{
uint8_t csum;
int nreg;
-
+
for (csum = 0, nreg = MC_NVRAM_START; nreg < MC_NVRAM_CSUM; nreg++)
csum += mc146818_read(RTC, nreg);
return csum;
diff --git a/sys/arch/atari/dev/ser.c b/sys/arch/atari/dev/ser.c
index 4ed0390812f..5a90f2069d7 100644
--- a/sys/arch/atari/dev/ser.c
+++ b/sys/arch/atari/dev/ser.c
@@ -1,4 +1,4 @@
-/* $NetBSD: ser.c,v 1.57 2022/06/26 06:25:09 tsutsui Exp $ */
+/* $NetBSD: ser.c,v 1.58 2023/01/06 10:28:28 tsutsui Exp $ */
/*-
* Copyright (c) 1997 The NetBSD Foundation, Inc.
@@ -60,11 +60,11 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-
+
/*
* Copyright (c) 1991 The Regents of the University of California.
* All rights reserved.
- *
+ *
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
@@ -88,12 +88,12 @@
* 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.
- *
+ *
* @(#)com.c 7.5 (Berkeley) 5/16/91
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ser.c,v 1.57 2022/06/26 06:25:09 tsutsui Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ser.c,v 1.58 2023/01/06 10:28:28 tsutsui Exp $");
#include "opt_ddb.h"
#include "opt_mbtype.h"
@@ -185,10 +185,10 @@ struct ser_softc {
uint8_t sc_mcr_dtr, sc_mcr_rts, sc_msr_cts, sc_msr_dcd;
int sc_r_hiwat;
- volatile u_int sc_rbget;
- volatile u_int sc_rbput;
+ volatile u_int sc_rbget;
+ volatile u_int sc_rbput;
volatile u_int sc_rbavail;
- uint8_t sc_rbuf[RXBUFSIZE];
+ uint8_t sc_rbuf[RXBUFSIZE];
uint8_t sc_lbuf[RXBUFSIZE];
volatile uint8_t sc_rx_blocked;
@@ -198,8 +198,8 @@ struct ser_softc {
volatile uint8_t sc_tx_stopped;
volatile uint8_t sc_st_check;
- uint8_t *sc_tba;
- int sc_tbc;
+ uint8_t *sc_tba;
+ int sc_tbc;
int sc_heldtbc;
volatile uint8_t sc_heldchange;
@@ -379,7 +379,7 @@ seropen(dev_t dev, int flag, int mode, struct lwp *l)
struct tty *tp;
int s, s2;
int error = 0;
-
+
sc = device_lookup_private(&ser_cd, unit);
if (sc == NULL)
return ENXIO;
@@ -488,7 +488,7 @@ bad:
return error;
}
-
+
static int
serclose(dev_t dev, int flag, int mode, struct lwp *l)
{
@@ -520,16 +520,16 @@ serread(dev_t dev, struct uio *uio, int flag)
{
struct ser_softc *sc = device_lookup_private(&ser_cd, SERUNIT(dev));
struct tty *tp = sc->sc_tty;
-
+
return (*tp->t_linesw->l_read)(tp, uio, flag);
}
-
+
static int
serwrite(dev_t dev, struct uio *uio, int flag)
{
struct ser_softc *sc = device_lookup_private(&ser_cd, SERUNIT(dev));
struct tty *tp = sc->sc_tty;
-
+
return (*tp->t_linesw->l_write)(tp, uio, flag);
}
@@ -538,7 +538,7 @@ serpoll(dev_t dev, int events, struct lwp *l)
{
struct ser_softc *sc = device_lookup_private(&ser_cd, SERUNIT(dev));
struct tty *tp = sc->sc_tty;
-
+
return (*tp->t_linesw->l_poll)(tp, events, l);
}
@@ -590,9 +590,9 @@ serioctl(dev_t dev, u_long cmd, void *data, int flag, struct lwp *l)
case TIOCSFLAGS:
error = kauth_authorize_device_tty(l->l_cred,
- KAUTH_DEVICE_TTY_PRIVSET, tp);
+ KAUTH_DEVICE_TTY_PRIVSET, tp);
if (error)
- return error;
+ return error;
sc->sc_swflags = *(int *)data;
break;
@@ -765,7 +765,7 @@ serparam(struct tty *tp, struct termios *t)
#endif
sc->sc_ospeed = ospeed;
-
+
/* and copy to tty */
tp->t_ispeed = 0;
tp->t_ospeed = t->c_ospeed;
@@ -1037,7 +1037,7 @@ ser_shutdown(struct ser_softc *sc)
s = splhigh();
-
+
/* If we were asserting flow control, then deassert it. */
sc->sc_rx_blocked = 1;
ser_hwiflow(sc, 1);
@@ -1177,7 +1177,7 @@ sersoft(void *arg)
if (!ISSET(tp->t_state, TS_ISOPEN) && (tp->t_wopen == 0))
return;
-
+
if (sc->sc_rx_ready) {
sc->sc_rx_ready = 0;
serrxint(sc, tp);
diff --git a/sys/arch/atari/dev/view.c b/sys/arch/atari/dev/view.c
index 408b384452f..8ead66e2b3f 100644
--- a/sys/arch/atari/dev/view.c
+++ b/sys/arch/atari/dev/view.c
@@ -1,4 +1,4 @@
-/* $NetBSD: view.c,v 1.37 2022/06/26 06:25:09 tsutsui Exp $ */
+/* $NetBSD: view.c,v 1.38 2023/01/06 10:28:28 tsutsui Exp $ */
/*
* Copyright (c) 1994 Christian E. Hopps
@@ -31,14 +31,14 @@
*/
/* The view major device is a placeholder device. It serves
- * simply to map the semantics of a graphics dipslay to
+ * simply to map the semantics of a graphics dipslay to
* the semantics of a character block device. In other
* words the graphics system as currently built does not like to be
* referred to by open/close/ioctl. This device serves as
* a interface to graphics. */
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: view.c,v 1.37 2022/06/26 06:25:09 tsutsui Exp $");
+__KERNEL_RCSID(0, "$NetBSD: view.c,v 1.38 2023/01/06 10:28:28 tsutsui Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -92,7 +92,7 @@ const struct cdevsw view_cdevsw = {
.d_flag = 0
};
-/*
+/*
* functions for probeing.
*/
void
@@ -106,8 +106,8 @@ viewattach(int cnt)
int
viewprobe(void)
{
- int i;
-
+ int i;
+
if (view_inited)
return 1;
@@ -132,11 +132,11 @@ view_display (struct view_softc *vu)
if (vu == NULL)
return;
-
+
s = spltty();
/*
- * mark views that share this monitor as not displaying
+ * mark views that share this monitor as not displaying
*/
for (i = 0; i < NVIEW; i++) {
if (views[i].flags & VUF_DISPLAY) {
@@ -167,7 +167,7 @@ view_display (struct view_softc *vu)
splx(s);
}
-/*
+/*
* remove a view from our added list if it is marked as displaying
* switch to a new display.
*/
@@ -199,7 +199,7 @@ view_setsize(struct view_softc *vu, struct view_size *vs)
dmode_t *dmode;
dimen_t ns;
int co, cs;
-
+
co = 0;
cs = 0;
if (vs->x != vu->size.x || vs->y != vu->size.y)
@@ -211,7 +211,7 @@ view_setsize(struct view_softc *vu, struct view_size *vs)
if (cs == 0 && co == 0)
return 0;
-
+
ns.width = vs->width;
ns.height = vs->height;
@@ -225,7 +225,7 @@ view_setsize(struct view_softc *vu, struct view_size *vs)
new = grf_alloc_view(dmode, &ns, vs->depth);
if (new == NULL)
return ENOMEM;
-
+
old = vu->view;
vu->view = new;
vu->size.x = new->display.x;
@@ -234,9 +234,9 @@ view_setsize(struct view_softc *vu, struct view_size *vs)
vu->size.height = new->display.height;
vu->size.depth = new->bitmap->depth;
- /*
- * we need a custom remove here to avoid letting
- * another view display mark as not added or displayed
+ /*
+ * we need a custom remove here to avoid letting
+ * another view display mark as not added or displayed
*/
if (vu->flags & VUF_DISPLAY) {
vu->flags &= ~(VUF_ADDED|VUF_DISPLAY);
@@ -255,13 +255,13 @@ view_get_colormap (struct view_softc *vu, colormap_t *ucm)
if (ucm->size > MAX_CENTRIES)
return EINVAL;
-
+
/* add one incase of zero, ick. */
cme = malloc(sizeof(ucm->entry[0])*(ucm->size+1), M_TEMP,M_WAITOK);
if (cme == NULL)
return ENOMEM;
- error = 0;
+ error = 0;
uep = ucm->entry;
ucm->entry = cme; /* set entry to out alloc. */
if (vu->view == NULL || grf_get_colormap(vu->view, ucm))
@@ -281,7 +281,7 @@ view_set_colormap(struct view_softc *vu, colormap_t *ucm)
if (ucm->size > MAX_CENTRIES)
return EINVAL;
-
+
cm = malloc(sizeof(ucm->entry[0])*ucm->size + sizeof(*cm),
M_TEMP, M_WAITOK);
if (cm == NULL)
@@ -289,7 +289,7 @@ view_set_colormap(struct view_softc *vu, colormap_t *ucm)
memcpy(cm, ucm, sizeof(colormap_t));
cm->entry = (long *)&cm[1]; /* table directly after. */
- if (((error =
+ if (((error =
copyin(ucm->entry,cm->entry,sizeof(ucm->entry[0])*ucm->size)) == 0)
&& (vu->view == NULL || grf_use_colormap(vu->view, cm)))
error = EINVAL;
@@ -329,8 +329,8 @@ viewopen(dev_t dev, int flags, int mode, struct lwp *l)
vu->size.width = vu->view->display.width;
vu->size.height = vu->view->display.height;
vu->size.depth = vu->view->bitmap->depth;
- vu->flags |= VUF_OPEN;
- return 0;
+ vu->flags |= VUF_OPEN;
+ return 0;
}
/*ARGSUSED*/
@@ -370,7 +370,7 @@ viewioctl (dev_t dev, u_long cmd, void * data, int flag, struct lwp *l)
view_remove(vu);
break;
case VIOCGSIZE:
- memcpy(data, &vu->size, sizeof (struct view_size));
+ memcpy(data, &vu->size, sizeof (struct view_size));
break;
case VIOCSSIZE:
error = view_setsize(vu, (struct view_size *)data);
@@ -405,15 +405,15 @@ viewmmap(dev_t dev, off_t off, int prot)
struct view_softc *vu;
bmap_t *bm;
u_char *bmd_start;
- u_long bmd_lin, bmd_vga;
+ u_long bmd_lin, bmd_vga;
vu = &views[minor(dev)];
bm = vu->view->bitmap;
- bmd_start = bm->hw_address;
+ bmd_start = bm->hw_address;
bmd_lin = bm->lin_base;
bmd_vga = bm->vga_base;
- /*
+ /*
* control registers
*/
if (off >= 0 && off < bm->reg_size)
diff --git a/sys/arch/atari/dev/viewioctl.h b/sys/arch/atari/dev/viewioctl.h
index 8b9e71eb2a4..20a83643d80 100644
--- a/sys/arch/atari/dev/viewioctl.h
+++ b/sys/arch/atari/dev/viewioctl.h
@@ -1,4 +1,4 @@
-/* $NetBSD: viewioctl.h,v 1.3 2021/09/19 10:34:08 andvar Exp $ */
+/* $NetBSD: viewioctl.h,v 1.4 2023/01/06 10:28:28 tsutsui Exp $ */
/*
* Copyright (c) 1994 Christian E. Hopps
@@ -54,6 +54,6 @@ struct view_size {
#define VIOCSSIZE _IOW('V', 0x2, struct view_size)
#define VIOCGSIZE _IOR('V', 0x3, struct view_size)
#define VIOCGBMAP _IOR('V', 0x4, bmap_t)
-#define VIOCSCMAP _IOW('V', 0x5, colormap_t)
-#define VIOCGCMAP _IOWR('V', 0x6, colormap_t)
+#define VIOCSCMAP _IOW('V', 0x5, colormap_t)
+#define VIOCGCMAP _IOWR('V', 0x6, colormap_t)
diff --git a/sys/arch/atari/dev/wdc_mb.c b/sys/arch/atari/dev/wdc_mb.c
index 39852035203..aaf0647579d 100644
--- a/sys/arch/atari/dev/wdc_mb.c
+++ b/sys/arch/atari/dev/wdc_mb.c
@@ -1,4 +1,4 @@
-/* $NetBSD: wdc_mb.c,v 1.41 2019/06/29 16:41:19 tsutsui Exp $ */
+/* $NetBSD: wdc_mb.c,v 1.42 2023/01/06 10:28:28 tsutsui Exp $ */
/*-
* Copyright (c) 1998, 2003 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: wdc_mb.c,v 1.41 2019/06/29 16:41:19 tsutsui Exp $");
+__KERNEL_RCSID(0, "$NetBSD: wdc_mb.c,v 1.42 2023/01/06 10:28:28 tsutsui Exp $");
#include <sys/types.h>
#include <sys/param.h>
@@ -234,7 +234,7 @@ claim_hw(struct ata_channel *chp, int maysleep)
&wd_lock, 1, &chp->ch_lock))
return 0;
}
- return 1;
+ return 1;
}
static void
diff --git a/sys/arch/atari/dev/wskbdmap_atari.c b/sys/arch/atari/dev/wskbdmap_atari.c
index f8cf43c13d5..90f93e0676d 100644
--- a/sys/arch/atari/dev/wskbdmap_atari.c
+++ b/sys/arch/atari/dev/wskbdmap_atari.c
@@ -1,4 +1,4 @@
-/* $NetBSD: wskbdmap_atari.c,v 1.5 2018/09/19 23:28:58 rin Exp $ */
+/* $NetBSD: wskbdmap_atari.c,v 1.6 2023/01/06 10:28:28 tsutsui Exp $ */
/*-
* Copyright (c) 1997 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: wskbdmap_atari.c,v 1.5 2018/09/19 23:28:58 rin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: wskbdmap_atari.c,v 1.6 2023/01/06 10:28:28 tsutsui Exp $");
#include <sys/types.h>
#include <dev/wscons/wsksymdef.h>
@@ -147,7 +147,7 @@ static const keysym_t atarikbd_keydesc_de[] = {
KC(11), KS_0, KS_equal,
KC(12), KS_ssharp, KS_question,
KC(13), KS_dead_acute, KS_dead_grave,
- KC(16), KS_q, KS_Q,
+ KC(16), KS_q, KS_Q,
KC(21), KS_z,
KC(26), KS_udiaeresis, KS_Udiaeresis, KS_at, KS_backslash,
KC(27), KS_plus, KS_asterisk,
@@ -250,7 +250,7 @@ static const keysym_t atarikbd_keydesc_fr[] = {
KC(13), KS_equal, KS_plus, KS_braceright,
KC(16), KS_a,
KC(17), KS_z,
- KC(26), KS_dead_circumflex, KS_dead_diaeresis,
+ KC(26), KS_dead_circumflex, KS_dead_diaeresis,
KC(27), KS_dollar, KS_sterling, KS_currency,
KC(30), KS_q,
KC(39), KS_m,
diff --git a/sys/arch/atari/dev/zs.c b/sys/arch/atari/dev/zs.c
index 746fd666ae5..2baee0ad512 100644
--- a/sys/arch/atari/dev/zs.c
+++ b/sys/arch/atari/dev/zs.c
@@ -1,4 +1,4 @@
-/* $NetBSD: zs.c,v 1.80 2022/06/26 06:25:09 tsutsui Exp $ */
+/* $NetBSD: zs.c,v 1.81 2023/01/06 10:28:28 tsutsui Exp $ */
/*
* Copyright (c) 1992, 1993
@@ -79,7 +79,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: zs.c,v 1.80 2022/06/26 06:25:09 tsutsui Exp $");
+__KERNEL_RCSID(0, "$NetBSD: zs.c,v 1.81 2023/01/06 10:28:28 tsutsui Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -463,7 +463,7 @@ zsopen(dev_t dev, int flags, int mode, struct lwp *l)
error = ttyopen(tp, ZS_DIALOUT(dev), (flags & O_NONBLOCK));
if (error)
goto bad;
-
+
error = tp->t_linesw->l_open(dev, tp);
if (error)
goto bad;
@@ -556,7 +556,7 @@ zspoll(dev_t dev, int events, struct lwp *l)
sc = device_lookup_private(&zs_cd, unit >> 1);
cs = sc->sc_cs[unit & 1];
tp = cs->cs_ttyp;
-
+
return (*tp->t_linesw->l_poll)(tp, events, l);
}
@@ -926,7 +926,7 @@ zsioctl(dev_t dev, u_long cmd, void * data, int flag, struct lwp *l)
cs->cs_creg[15] &= ~ZSWR15_DCD_IE;
ZS_WRITE(cs->cs_zc, 15, cs->cs_creg[15]);
} else if ((userbits & TIOCFLAG_CLOCAL) != 0) {
- cs->cs_softcar = 0; /* turn off softcar */
+ cs->cs_softcar = 0; /* turn off softcar */
cs->cs_preg[15] |= ZSWR15_DCD_IE; /* turn on dcd */
cs->cs_creg[15] |= ZSWR15_DCD_IE;
ZS_WRITE(cs->cs_zc, 15, cs->cs_creg[15]);
diff --git a/sys/arch/atari/dev/zsvar.h b/sys/arch/atari/dev/zsvar.h
index a0bc40a6db6..51f8f3fb0fb 100644
--- a/sys/arch/atari/dev/zsvar.h
+++ b/sys/arch/atari/dev/zsvar.h
@@ -1,4 +1,4 @@
-/* $NetBSD: zsvar.h,v 1.17 2014/11/15 19:20:01 christos Exp $ */
+/* $NetBSD: zsvar.h,v 1.18 2023/01/06 10:28:28 tsutsui Exp $ */
/*
* Copyright (c) 1992, 1993
@@ -179,6 +179,6 @@ struct zs_chanstate {
/*
* Split minor into unit, dialin/dialout & flag nibble.
*/
-#define ZS_UNIT(dev) (TTUNIT(dev) >> 4)
-#define ZS_FLAGS(dev) (TTUNIT(dev) & 0xf)
+#define ZS_UNIT(dev) (TTUNIT(dev) >> 4)
+#define ZS_FLAGS(dev) (TTUNIT(dev) & 0xf)
#define ZS_DIALOUT(dev) TTDIALOUT(dev)