Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/rasops Style:
details: https://anonhg.NetBSD.org/src/rev/082c795d4476
branches: trunk
changeset: 1000422:082c795d4476
user: rin <rin%NetBSD.org@localhost>
date: Wed Jul 24 18:03:30 2019 +0000
description:
Style:
- u_char --> uint8_t
- u_int*_t --> uint*_t
No functional changes.
diffstat:
sys/dev/rasops/rasops.c | 38 +++++++++++++++++++-------------------
sys/dev/rasops/rasops.h | 26 +++++++++++++-------------
sys/dev/rasops/rasops1.c | 18 +++++++++---------
sys/dev/rasops/rasops15.c | 22 +++++++++++-----------
sys/dev/rasops/rasops2.c | 20 ++++++++++----------
sys/dev/rasops/rasops24.c | 32 ++++++++++++++++----------------
sys/dev/rasops/rasops32.c | 8 ++++----
sys/dev/rasops/rasops4.c | 40 ++++++++++++++++++++--------------------
sys/dev/rasops/rasops8.c | 26 +++++++++++++-------------
9 files changed, 115 insertions(+), 115 deletions(-)
diffs (truncated from 922 to 300 lines):
diff -r e53d0baa4645 -r 082c795d4476 sys/dev/rasops/rasops.c
--- a/sys/dev/rasops/rasops.c Wed Jul 24 16:57:45 2019 +0000
+++ b/sys/dev/rasops/rasops.c Wed Jul 24 18:03:30 2019 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: rasops.c,v 1.80 2019/07/21 16:19:45 rin Exp $ */
+/* $NetBSD: rasops.c,v 1.81 2019/07/24 18:03:30 rin Exp $ */
/*-
* Copyright (c) 1999 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: rasops.c,v 1.80 2019/07/21 16:19:45 rin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rasops.c,v 1.81 2019/07/24 18:03:30 rin Exp $");
#include "opt_rasops.h"
#include "rasops_glue.h"
@@ -68,7 +68,7 @@
};
/* ANSI colormap (R,G,B). Upper 8 are high-intensity */
-const u_char rasops_cmap[256*3] = {
+const uint8_t rasops_cmap[256*3] = {
0x00, 0x00, 0x00, /* black */
0x7f, 0x00, 0x00, /* red */
0x00, 0x7f, 0x00, /* green */
@@ -127,7 +127,7 @@
};
/* True if color is gray */
-const u_char rasops_isgray[16] = {
+const uint8_t rasops_isgray[16] = {
1, 0, 0, 0,
0, 0, 0, 1,
1, 0, 0, 0,
@@ -724,7 +724,7 @@
rasops_copycols(void *cookie, int row, int src, int dst, int num)
{
struct rasops_info *ri;
- u_char *sp, *dp, *hp;
+ uint8_t *sp, *dp, *hp;
int height;
ri = (struct rasops_info *)cookie;
@@ -823,7 +823,7 @@
static void
rasops_init_devcmap(struct rasops_info *ri)
{
- const u_char *p;
+ const uint8_t *p;
int i, c;
switch (ri->ri_depth) {
@@ -995,7 +995,7 @@
rasops_do_cursor(struct rasops_info *ri)
{
int full1, height, cnt, slop1, slop2, row, col;
- u_char *dp, *rp, *hrp, *hp;
+ uint8_t *dp, *rp, *hrp, *hp;
hrp = hp = NULL;
@@ -1085,10 +1085,10 @@
msk2 = be32toh(0xffffffff << (32 - (8 * slop2)));
while (height--) {
- dp = (u_char *)((uintptr_t)rp & ~3);
+ dp = (uint8_t *)((uintptr_t)rp & ~3);
rp += ri->ri_stride;
if (ri->ri_hwbits) {
- hp = (u_char *)((uintptr_t)hrp & ~3);
+ hp = (uint8_t *)((uintptr_t)hrp & ~3);
hrp += ri->ri_stride;
}
@@ -1214,10 +1214,10 @@
}
for (cnt = num; cnt; cnt--) {
- *(u_char *)dp = clr;
+ *(uint8_t *)dp = clr;
DELTA(dp, 1, int32_t *);
if (ri->ri_hwbits) {
- *(u_char *)hp = clr;
+ *(uint8_t *)hp = clr;
DELTA(hp, 1, int32_t *);
}
}
@@ -1243,10 +1243,10 @@
/* Align span to 4 bytes */
if (slop1 & 1) {
- *(u_char *)dp = clr;
+ *(uint8_t *)dp = clr;
DELTA(dp, 1, int32_t *);
if (ri->ri_hwbits) {
- *(u_char *)hp = clr;
+ *(uint8_t *)hp = clr;
DELTA(hp, 1, int32_t *);
}
}
@@ -1281,10 +1281,10 @@
/* Write unaligned trailing slop */
if (slop2 & 1) {
- *(u_char *)dp = clr;
+ *(uint8_t *)dp = clr;
DELTA(dp, 1, int32_t *);
if (ri->ri_hwbits) {
- *(u_char *)hp = clr;
+ *(uint8_t *)hp = clr;
DELTA(hp, 1, int32_t *);
}
}
@@ -1346,7 +1346,7 @@
rasops_copychar(void *cookie, int srcrow, int dstrow, int srccol, int dstcol)
{
struct rasops_info *ri;
- u_char *sp, *dp;
+ uint8_t *sp, *dp;
int height;
int r_srcrow, r_dstrow, r_srccol, r_dstcol;
@@ -1375,7 +1375,7 @@
rasops_putchar_rotated_cw(void *cookie, int row, int col, u_int uc, long attr)
{
struct rasops_info *ri;
- u_char *rp;
+ uint8_t *rp;
int height;
ri = (struct rasops_info *)cookie;
@@ -1473,7 +1473,7 @@
rasops_copychar_ccw(void *cookie, int srcrow, int dstrow, int srccol, int dstcol)
{
struct rasops_info *ri;
- u_char *sp, *dp;
+ uint8_t *sp, *dp;
int height;
int r_srcrow, r_dstrow, r_srccol, r_dstcol;
@@ -1502,7 +1502,7 @@
rasops_putchar_rotated_ccw(void *cookie, int row, int col, u_int uc, long attr)
{
struct rasops_info *ri;
- u_char *rp;
+ uint8_t *rp;
int height;
ri = (struct rasops_info *)cookie;
diff -r e53d0baa4645 -r 082c795d4476 sys/dev/rasops/rasops.h
--- a/sys/dev/rasops/rasops.h Wed Jul 24 16:57:45 2019 +0000
+++ b/sys/dev/rasops/rasops.h Wed Jul 24 18:03:30 2019 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: rasops.h,v 1.32 2017/04/22 15:05:02 macallan Exp $ */
+/* $NetBSD: rasops.h,v 1.33 2019/07/24 18:03:30 rin Exp $ */
/*-
* Copyright (c) 1999 The NetBSD Foundation, Inc.
@@ -72,7 +72,7 @@
struct rasops_info {
/* These must be filled in by the caller */
int ri_depth; /* depth in bits */
- u_char *ri_bits; /* ptr to bits */
+ uint8_t *ri_bits; /* ptr to bits */
int ri_width; /* width (pels) */
int ri_height; /* height (pels) */
int ri_stride; /* stride in bytes */
@@ -81,7 +81,7 @@
* If you want shadow framebuffer support, point ri_hwbits
* to the real framebuffer, and ri_bits to the shadow framebuffer
*/
- u_char *ri_hwbits;
+ uint8_t *ri_hwbits;
/*
* These can optionally be left zeroed out. If you fill ri_font,
@@ -100,13 +100,13 @@
* on depths other than 15, 16, 24 and 32 bits per pel. On
* 24 bit displays, ri_{r,g,b}num must be 8.
*/
- u_char ri_rnum;
+ uint8_t ri_rnum;
/* number of bits for red */
- u_char ri_gnum; /* number of bits for green */
- u_char ri_bnum; /* number of bits for blue */
- u_char ri_rpos; /* which bit red starts at */
- u_char ri_gpos; /* which bit green starts at */
- u_char ri_bpos; /* which bit blue starts at */
+ uint8_t ri_gnum; /* number of bits for green */
+ uint8_t ri_bnum; /* number of bits for blue */
+ uint8_t ri_rpos; /* which bit red starts at */
+ uint8_t ri_gpos; /* which bit green starts at */
+ uint8_t ri_bpos; /* which bit blue starts at */
/* These are filled in by rasops_init() */
int ri_emuwidth; /* width we actually care about */
@@ -119,8 +119,8 @@
int ri_fontscale; /* fontheight * fontstride */
int ri_xscale; /* fontwidth * pelbytes */
int ri_yscale; /* fontheight * stride */
- u_char *ri_origbits; /* where screen bits actually start */
- u_char *ri_hworigbits; /* where hw bits actually start */
+ uint8_t *ri_origbits; /* where screen bits actually start */
+ uint8_t *ri_hworigbits; /* where hw bits actually start */
int ri_xorigin; /* where ri_bits begins (x) */
int ri_yorigin; /* where ri_bits begins (y) */
int32_t ri_devcmap[16]; /* color -> framebuffer data */
@@ -184,7 +184,7 @@
int rasops_get_cmap(struct rasops_info *, uint8_t *, size_t);
-extern const u_char rasops_isgray[16];
-extern const u_char rasops_cmap[256*3];
+extern const uint8_t rasops_isgray[16];
+extern const uint8_t rasops_cmap[256*3];
#endif /* _RASOPS_H_ */
diff -r e53d0baa4645 -r 082c795d4476 sys/dev/rasops/rasops1.c
--- a/sys/dev/rasops/rasops1.c Wed Jul 24 16:57:45 2019 +0000
+++ b/sys/dev/rasops/rasops1.c Wed Jul 24 18:03:30 2019 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: rasops1.c,v 1.24 2018/12/04 09:27:59 mlelstv Exp $ */
+/* $NetBSD: rasops1.c,v 1.25 2019/07/24 18:03:30 rin Exp $ */
/*-
* Copyright (c) 1999 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: rasops1.c,v 1.24 2018/12/04 09:27:59 mlelstv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rasops1.c,v 1.25 2019/07/24 18:03:30 rin Exp $");
#include "opt_rasops.h"
@@ -88,11 +88,11 @@
rasops1_putchar(void *cookie, int row, int col, u_int uc, long attr)
{
u_int fs, rs, fb, bg, fg, lmask, rmask;
- u_int32_t height, width;
+ uint32_t height, width;
struct rasops_info *ri = (struct rasops_info *)cookie;
struct wsdisplay_font *font = PICK_FONT(ri, uc);
int32_t *rp, *hrp = NULL, tmp, tmp2;
- u_char *fr;
+ uint8_t *fr;
#ifdef RASOPS_CLIPPING
/* Catches 'row < 0' case too */
@@ -123,7 +123,7 @@
fs = 0; /* shutup gcc */
} else {
uc -= font->firstchar;
- fr = (u_char *)font->data + uc * ri->ri_fontscale;
+ fr = (uint8_t *)font->data + uc * ri->ri_fontscale;
fs = font->stride;
}
@@ -282,7 +282,7 @@
int height, fs, rs, bg, fg;
struct rasops_info *ri = (struct rasops_info *)cookie;
struct wsdisplay_font *font = PICK_FONT(ri, uc);
- u_char *fr, *rp, *hrp = NULL;
+ uint8_t *fr, *rp, *hrp = NULL;
#ifdef RASOPS_CLIPPING
/* Catches 'row < 0' case too */
@@ -314,7 +314,7 @@
}
} else {
uc -= font->firstchar;
- fr = (u_char *)font->data + uc * ri->ri_fontscale;
+ fr = (uint8_t *)font->data + uc * ri->ri_fontscale;
fs = font->stride;
/* NOT fontbits if bg is white */
@@ -361,7 +361,7 @@
int height, fs, rs, bg, fg;
struct rasops_info *ri = (struct rasops_info *)cookie;
struct wsdisplay_font *font = PICK_FONT(ri, uc);
- u_char *fr, *rp, *hrp = NULL;
+ uint8_t *fr, *rp, *hrp = NULL;
#ifdef RASOPS_CLIPPING
/* Catches 'row < 0' case too */
@@ -394,7 +394,7 @@
}
} else {
uc -= font->firstchar;
- fr = (u_char *)font->data + uc * ri->ri_fontscale;
+ fr = (uint8_t *)font->data + uc * ri->ri_fontscale;
fs = font->stride;
/* NOT fontbits if bg is white */
diff -r e53d0baa4645 -r 082c795d4476 sys/dev/rasops/rasops15.c
--- a/sys/dev/rasops/rasops15.c Wed Jul 24 16:57:45 2019 +0000
+++ b/sys/dev/rasops/rasops15.c Wed Jul 24 18:03:30 2019 +0000
@@ -1,4 +1,4 @@
Home |
Main Index |
Thread Index |
Old Index