[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 37/66] i386/i386at/kd.c: simplify code
From: |
Marin Ramesa |
Subject: |
[PATCH 37/66] i386/i386at/kd.c: simplify code |
Date: |
Thu, 5 Dec 2013 22:03:31 +0100 |
Variable font_byte_width is always zero. Use this to simplify
the code.
* i386/i386at/kd.c (font_byte_width): Remove variable.
(i, from): Remove variables.
Remove for loop.
* i386/i386at/kdsoft.h (font_byte_width): Remove declaration.
---
i386/i386at/kd.c | 7 -------
i386/i386at/kdsoft.h | 7 -------
2 files changed, 14 deletions(-)
diff --git a/i386/i386at/kd.c b/i386/i386at/kd.c
index 1d0b84f..1a2d9fd 100644
--- a/i386/i386at/kd.c
+++ b/i386/i386at/kd.c
@@ -350,7 +350,6 @@ u_char char_white = 0xff;
short xstart = 0;
short ystart = 0;
-short font_byte_width = 0; /* num bytes in 1 scan line of font */
/*
* Switch for poll vs. interrupt.
@@ -2710,18 +2709,12 @@ csrpos_t pos;
char ch, chattr;
{
short xbit, ybit; /* u/l corner of char pos */
- u_char *from;
- short i;
if ((u_char)ch >= chars_in_font)
ch = K_QUES;
bmpch2bit(pos, &xbit, &ybit);
bit2fbptr(xbit, ybit);
- from = font_start;
- for (i = 0; i < char_height; ++i) {
- from += font_byte_width;
- }
}
/*
diff --git a/i386/i386at/kdsoft.h b/i386/i386at/kdsoft.h
index a9aba78..b370807 100644
--- a/i386/i386at/kdsoft.h
+++ b/i386/i386at/kdsoft.h
@@ -198,11 +198,4 @@ extern u_char char_white; /* 8 white (on)
bits */
extern short xstart, ystart;
-
-/*
- * Accelerators for bitmap displays.
- */
-
-extern short font_byte_width; /* num bytes in 1 scan line of font */
-
#endif /* _KDSOFT_H_ */
--
1.8.1.4
- [PATCH 60/66] kern/rbtree.h: remove unnecessary include, (continued)
- [PATCH 60/66] kern/rbtree.h: remove unnecessary include, Marin Ramesa, 2013/12/05
- [PATCH 64/66] Cleanup of the prototypes, Marin Ramesa, 2013/12/05
- [PATCH 65/66] kern/act.h: remove unnecessary include, Marin Ramesa, 2013/12/05
- [PATCH 63/66] vm/vm_page.h: remove unused variables, Marin Ramesa, 2013/12/05
- [PATCH 36/66] i386/i386at/kd.c: simplify code, Marin Ramesa, 2013/12/05
- [PATCH 62/66] kern/syscall_sw.c: use boolean instead of an int, Marin Ramesa, 2013/12/05
- [PATCH 38/66] i386/i386at/kd.c: use boolean instead of an int, Marin Ramesa, 2013/12/05
- [PATCH 66/66] kern/processor.h: remove ifdef, Marin Ramesa, 2013/12/05
- [PATCH 37/66] i386/i386at/kd.c: simplify code,
Marin Ramesa <=
- [PATCH 39/66] i386/i386at/kd.c: use boolean instead of an unsigned int, Marin Ramesa, 2013/12/05
- [PATCH 61/66] kern/refcount.h: remove unnecessary include, Marin Ramesa, 2013/12/05
- [PATCH 35/66] i386/i386at/kd.c: simplify code, Marin Ramesa, 2013/12/05