Module Name: src Committed By: rin Date: Wed Jul 24 18:03:30 UTC 2019
Modified Files: src/sys/dev/rasops: rasops.c rasops.h rasops1.c rasops15.c rasops2.c rasops24.c rasops32.c rasops4.c rasops8.c Log Message: Style: - u_char --> uint8_t - u_int*_t --> uint*_t No functional changes. To generate a diff of this commit: cvs rdiff -u -r1.80 -r1.81 src/sys/dev/rasops/rasops.c cvs rdiff -u -r1.32 -r1.33 src/sys/dev/rasops/rasops.h \ src/sys/dev/rasops/rasops32.c cvs rdiff -u -r1.24 -r1.25 src/sys/dev/rasops/rasops1.c cvs rdiff -u -r1.23 -r1.24 src/sys/dev/rasops/rasops15.c cvs rdiff -u -r1.19 -r1.20 src/sys/dev/rasops/rasops2.c cvs rdiff -u -r1.30 -r1.31 src/sys/dev/rasops/rasops24.c cvs rdiff -u -r1.13 -r1.14 src/sys/dev/rasops/rasops4.c cvs rdiff -u -r1.35 -r1.36 src/sys/dev/rasops/rasops8.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/dev/rasops/rasops.c diff -u src/sys/dev/rasops/rasops.c:1.80 src/sys/dev/rasops/rasops.c:1.81 --- src/sys/dev/rasops/rasops.c:1.80 Sun Jul 21 16:19:45 2019 +++ src/sys/dev/rasops/rasops.c Wed Jul 24 18:03:30 2019 @@ -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 @@ struct rasops_matchdata { }; /* 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 @@ const u_char rasops_cmap[256*3] = { }; /* 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 @@ void 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 @@ rasops_cursor(void *cookie, int on, int 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 @@ static void 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 @@ rasops_do_cursor(struct rasops_info *ri) 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 @@ rasops_erasecols(void *cookie, int row, } 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 @@ rasops_erasecols(void *cookie, int row, /* 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 @@ rasops_erasecols(void *cookie, int row, /* 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 @@ static void 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 @@ static void 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 @@ static void 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 @@ static void 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; Index: src/sys/dev/rasops/rasops.h diff -u src/sys/dev/rasops/rasops.h:1.32 src/sys/dev/rasops/rasops.h:1.33 --- src/sys/dev/rasops/rasops.h:1.32 Sat Apr 22 15:05:02 2017 +++ src/sys/dev/rasops/rasops.h Wed Jul 24 18:03:30 2019 @@ -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 @@ struct rasops_info { * 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 @@ struct rasops_info { * 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 @@ struct rasops_info { 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 @@ void rasops_copycols(void *, int, int, i 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_ */ Index: src/sys/dev/rasops/rasops32.c diff -u src/sys/dev/rasops/rasops32.c:1.32 src/sys/dev/rasops/rasops32.c:1.33 --- src/sys/dev/rasops/rasops32.c:1.32 Fri Mar 1 23:20:13 2019 +++ src/sys/dev/rasops/rasops32.c Wed Jul 24 18:03:30 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: rasops32.c,v 1.32 2019/03/01 23:20:13 jakllsch Exp $ */ +/* $NetBSD: rasops32.c,v 1.33 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: rasops32.c,v 1.32 2019/03/01 23:20:13 jakllsch Exp $"); +__KERNEL_RCSID(0, "$NetBSD: rasops32.c,v 1.33 2019/07/24 18:03:30 rin Exp $"); #include "opt_rasops.h" @@ -78,7 +78,7 @@ rasops32_putchar(void *cookie, int row, struct rasops_info *ri = (struct rasops_info *)cookie; struct wsdisplay_font *font = PICK_FONT(ri, uc); int32_t *dp, *rp, *hp, *hrp; - u_char *fr; + uint8_t *fr; hp = hrp = NULL; @@ -167,7 +167,7 @@ rasops32_putchar_aa(void *cookie, int ro struct wsdisplay_font *font = PICK_FONT(ri, uc); int32_t *dp, *rp; uint8_t *rrp; - u_char *fr; + uint8_t *fr; uint32_t buffer[64]; /* XXX */ int x, y, r, g, b, aval; int r1, g1, b1, r0, g0, b0; Index: src/sys/dev/rasops/rasops1.c diff -u src/sys/dev/rasops/rasops1.c:1.24 src/sys/dev/rasops/rasops1.c:1.25 --- src/sys/dev/rasops/rasops1.c:1.24 Tue Dec 4 09:27:59 2018 +++ src/sys/dev/rasops/rasops1.c Wed Jul 24 18:03:30 2019 @@ -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 @@ static void 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 @@ rasops1_putchar(void *cookie, int row, i 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 @@ rasops1_putchar8(void *cookie, int row, 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 @@ rasops1_putchar8(void *cookie, int row, } } 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 @@ rasops1_putchar16(void *cookie, int row, 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 @@ rasops1_putchar16(void *cookie, int row, } } 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 */ Index: src/sys/dev/rasops/rasops15.c diff -u src/sys/dev/rasops/rasops15.c:1.23 src/sys/dev/rasops/rasops15.c:1.24 --- src/sys/dev/rasops/rasops15.c:1.23 Sun Jul 21 16:18:08 2019 +++ src/sys/dev/rasops/rasops15.c Wed Jul 24 18:03:30 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: rasops15.c,v 1.23 2019/07/21 16:18:08 rin Exp $ */ +/* $NetBSD: rasops15.c,v 1.24 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: rasops15.c,v 1.23 2019/07/21 16:18:08 rin Exp $"); +__KERNEL_RCSID(0, "$NetBSD: rasops15.c,v 1.24 2019/07/24 18:03:30 rin Exp $"); #include "opt_rasops.h" @@ -121,7 +121,7 @@ rasops15_putchar(void *cookie, int row, int fb, width, height, cnt, clr[2]; struct rasops_info *ri = (struct rasops_info *)cookie; struct wsdisplay_font *font = PICK_FONT(ri, uc); - u_char *dp, *rp, *hp, *hrp, *fr; + uint8_t *dp, *rp, *hp, *hrp, *fr; hp = hrp = NULL; @@ -165,7 +165,7 @@ rasops15_putchar(void *cookie, int row, } } else { uc -= font->firstchar; - fr = (u_char *)font->data + uc * ri->ri_fontscale; + fr = (uint8_t *)font->data + uc * ri->ri_fontscale; while (height--) { dp = rp; @@ -216,7 +216,7 @@ rasops15_putchar_aa(void *cookie, int ro struct wsdisplay_font *font = PICK_FONT(ri, uc); int16_t *dp, *rp; uint8_t *rrp; - u_char *fr; + uint8_t *fr; uint16_t buffer[64]; /* XXX */ int x, y, r, g, b, aval; int r1, g1, b1, r0, g0, b0, fgo, bgo; @@ -339,7 +339,7 @@ rasops15_putchar8(void *cookie, int row, struct wsdisplay_font *font = PICK_FONT(ri, uc); int height, so, fs; int32_t *rp, *hrp; - u_char *fr; + uint8_t *fr; /* Can't risk remaking the stamp if it's already in use */ if (stamp_mutex++) { @@ -384,7 +384,7 @@ rasops15_putchar8(void *cookie, int row, } } 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; while (height--) { @@ -436,7 +436,7 @@ rasops15_putchar12(void *cookie, int row struct wsdisplay_font *font = PICK_FONT(ri, uc); int height, so, fs; int32_t *rp, *hrp; - u_char *fr; + uint8_t *fr; /* Can't risk remaking the stamp if it's already in use */ if (stamp_mutex++) { @@ -482,7 +482,7 @@ rasops15_putchar12(void *cookie, int row } } 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; while (height--) { @@ -542,7 +542,7 @@ rasops15_putchar16(void *cookie, int row struct wsdisplay_font *font = PICK_FONT(ri, uc); int height, so, fs; int32_t *rp, *hrp; - u_char *fr; + uint8_t *fr; /* Can't risk remaking the stamp if it's already in use */ if (stamp_mutex++) { @@ -589,7 +589,7 @@ rasops15_putchar16(void *cookie, int row } } 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; while (height--) { Index: src/sys/dev/rasops/rasops2.c diff -u src/sys/dev/rasops/rasops2.c:1.19 src/sys/dev/rasops/rasops2.c:1.20 --- src/sys/dev/rasops/rasops2.c:1.19 Tue Dec 4 09:27:59 2018 +++ src/sys/dev/rasops/rasops2.c Wed Jul 24 18:03:30 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: rasops2.c,v 1.19 2018/12/04 09:27:59 mlelstv Exp $ */ +/* $NetBSD: rasops2.c,v 1.20 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: rasops2.c,v 1.19 2018/12/04 09:27:59 mlelstv Exp $"); +__KERNEL_RCSID(0, "$NetBSD: rasops2.c,v 1.20 2019/07/24 18:03:30 rin Exp $"); #include "opt_rasops.h" @@ -105,7 +105,7 @@ rasops2_putchar(void *cookie, int row, i struct rasops_info *ri = (struct rasops_info *)cookie; struct wsdisplay_font *font = PICK_FONT(ri, uc); int32_t *rp; - u_char *fr; + uint8_t *fr; #ifdef RASOPS_CLIPPING /* Catches 'row < 0' case too */ @@ -133,7 +133,7 @@ rasops2_putchar(void *cookie, int row, i 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; } @@ -259,7 +259,7 @@ rasops2_putchar8(void *cookie, int row, struct rasops_info *ri = (struct rasops_info *)cookie; struct wsdisplay_font *font = PICK_FONT(ri, uc); int height, fs, rs; - u_char *fr, *rp; + uint8_t *fr, *rp; /* Can't risk remaking the stamp if it's already in use */ if (stamp_mutex++) { @@ -297,7 +297,7 @@ rasops2_putchar8(void *cookie, int row, } } 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; while (height--) { @@ -324,7 +324,7 @@ rasops2_putchar12(void *cookie, int row, struct rasops_info *ri = (struct rasops_info *)cookie; struct wsdisplay_font *font = PICK_FONT(ri, uc); int height, fs, rs; - u_char *fr, *rp; + uint8_t *fr, *rp; /* Can't risk remaking the stamp if it's already in use */ if (stamp_mutex++) { @@ -362,7 +362,7 @@ rasops2_putchar12(void *cookie, int row, } } 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; while (height--) { @@ -392,7 +392,7 @@ rasops2_putchar16(void *cookie, int row, struct rasops_info *ri = (struct rasops_info *)cookie; struct wsdisplay_font *font = PICK_FONT(ri, uc); int height, fs, rs; - u_char *fr, *rp; + uint8_t *fr, *rp; /* Can't risk remaking the stamp if it's already in use */ if (stamp_mutex++) { @@ -430,7 +430,7 @@ rasops2_putchar16(void *cookie, int row, } } 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; while (height--) { Index: src/sys/dev/rasops/rasops24.c diff -u src/sys/dev/rasops/rasops24.c:1.30 src/sys/dev/rasops/rasops24.c:1.31 --- src/sys/dev/rasops/rasops24.c:1.30 Tue Dec 4 09:27:59 2018 +++ src/sys/dev/rasops/rasops24.c Wed Jul 24 18:03:30 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: rasops24.c,v 1.30 2018/12/04 09:27:59 mlelstv Exp $ */ +/* $NetBSD: rasops24.c,v 1.31 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: rasops24.c,v 1.30 2018/12/04 09:27:59 mlelstv Exp $"); +__KERNEL_RCSID(0, "$NetBSD: rasops24.c,v 1.31 2019/07/24 18:03:30 rin Exp $"); #include "opt_rasops.h" @@ -122,7 +122,7 @@ rasops24_putchar(void *cookie, int row, int fb, width, height, cnt, clr[2]; struct rasops_info *ri = (struct rasops_info *)cookie; struct wsdisplay_font *font = PICK_FONT(ri, uc); - u_char *dp, *rp, *fr; + uint8_t *dp, *rp, *fr; #ifdef RASOPS_CLIPPING /* Catches 'row < 0' case too */ @@ -141,7 +141,7 @@ rasops24_putchar(void *cookie, int row, clr[0] = ri->ri_devcmap[((u_int)attr >> 16) & 0xf]; if (uc == ' ') { - u_char c = clr[0]; + uint8_t c = clr[0]; while (height--) { dp = rp; rp += ri->ri_stride; @@ -154,7 +154,7 @@ rasops24_putchar(void *cookie, int row, } } else { uc -= font->firstchar; - fr = (u_char *)font->data + uc * ri->ri_fontscale; + fr = (uint8_t *)font->data + uc * ri->ri_fontscale; while (height--) { dp = rp; @@ -179,7 +179,7 @@ rasops24_putchar(void *cookie, int row, /* Do underline */ if ((attr & WSATTR_UNDERLINE) != 0) { - u_char c = clr[1]; + uint8_t c = clr[1]; rp -= ri->ri_stride << 1; @@ -243,7 +243,7 @@ rasops24_putchar8(void *cookie, int row, struct wsdisplay_font *font = PICK_FONT(ri, uc); int height, so, fs; int32_t *rp; - u_char *fr; + uint8_t *fr; /* Can't risk remaking the stamp if it's already in use */ if (stamp_mutex++) { @@ -279,7 +279,7 @@ rasops24_putchar8(void *cookie, int row, } } 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; while (height--) { @@ -319,7 +319,7 @@ rasops24_putchar12(void *cookie, int row struct wsdisplay_font *font = PICK_FONT(ri, uc); int height, so, fs; int32_t *rp; - u_char *fr; + uint8_t *fr; /* Can't risk remaking the stamp if it's already in use */ if (stamp_mutex++) { @@ -356,7 +356,7 @@ rasops24_putchar12(void *cookie, int row } } 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; while (height--) { @@ -402,7 +402,7 @@ rasops24_putchar16(void *cookie, int row struct wsdisplay_font *font = PICK_FONT(ri, uc); int height, so, fs; int32_t *rp; - u_char *fr; + uint8_t *fr; /* Can't risk remaking the stamp if it's already in use */ if (stamp_mutex++) { @@ -440,7 +440,7 @@ rasops24_putchar16(void *cookie, int row } } 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; while (height--) { @@ -490,7 +490,7 @@ static void rasops24_eraserows(void *cookie, int row, int num, long attr) { int n9, n3, n1, cnt, stride, delta; - u_int32_t *dp, clr, xstamp[3]; + uint32_t *dp, clr, xstamp[3]; struct rasops_info *ri; /* @@ -593,7 +593,7 @@ rasops24_erasecols(void *cookie, int row int n12, n4, height, cnt, slop, clr, xstamp[3]; struct rasops_info *ri; int32_t *dp, *rp; - u_char *dbp; + uint8_t *dbp; /* * If the color is gray, we can cheat and use the generic routines @@ -656,7 +656,7 @@ rasops24_erasecols(void *cookie, int row n4 = num >> 2; num &= 3; while (height--) { - dbp = (u_char *)rp; + dbp = (uint8_t *)rp; DELTA(rp, ri->ri_stride, int32_t *); /* Align to 4 bytes */ @@ -693,7 +693,7 @@ rasops24_erasecols(void *cookie, int row /* Trailing slop */ /* XXX handle with masks, bring under control of RI_BSWAP */ - dbp = (u_char *)dp; + dbp = (uint8_t *)dp; for (cnt = num; cnt; cnt--) { *dbp++ = (clr >> 16); *dbp++ = (clr >> 8); Index: src/sys/dev/rasops/rasops4.c diff -u src/sys/dev/rasops/rasops4.c:1.13 src/sys/dev/rasops/rasops4.c:1.14 --- src/sys/dev/rasops/rasops4.c:1.13 Wed Dec 5 05:52:23 2018 +++ src/sys/dev/rasops/rasops4.c Wed Jul 24 18:03:30 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: rasops4.c,v 1.13 2018/12/05 05:52:23 mlelstv Exp $ */ +/* $NetBSD: rasops4.c,v 1.14 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: rasops4.c,v 1.13 2018/12/05 05:52:23 mlelstv Exp $"); +__KERNEL_RCSID(0, "$NetBSD: rasops4.c,v 1.14 2019/07/24 18:03:30 rin Exp $"); #include "opt_rasops.h" @@ -57,7 +57,7 @@ static void rasops4_makestamp(struct ras /* * 4x1 stamp for optimized character blitting */ -static u_int16_t stamp[16]; +static uint16_t stamp[16]; static long stamp_attr; static int stamp_mutex; /* XXX see note in README */ #endif @@ -105,7 +105,7 @@ rasops4_putchar(void *cookie, int row, i struct rasops_info *ri = (struct rasops_info *)cookie; struct wsdisplay_font *font = PICK_FONT(ri, uc); int32_t *rp; - u_char *fr; + uint8_t *fr; #ifdef RASOPS_CLIPPING /* Catches 'row < 0' case too */ @@ -133,7 +133,7 @@ rasops4_putchar(void *cookie, int row, i 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; } @@ -259,8 +259,8 @@ rasops4_putchar8(void *cookie, int row, struct rasops_info *ri = (struct rasops_info *)cookie; struct wsdisplay_font *font = PICK_FONT(ri, uc); int height, fs, rs; - u_char *fr; - u_int16_t *rp; + uint8_t *fr; + uint16_t *rp; /* Can't risk remaking the stamp if it's already in use */ if (stamp_mutex++) { @@ -282,7 +282,7 @@ rasops4_putchar8(void *cookie, int row, } #endif - rp = (u_int16_t *)(ri->ri_bits + row * ri->ri_yscale + col * ri->ri_xscale); + rp = (uint16_t *)(ri->ri_bits + row * ri->ri_yscale + col * ri->ri_xscale); height = font->fontheight; rs = ri->ri_stride / sizeof(*rp); @@ -291,7 +291,7 @@ rasops4_putchar8(void *cookie, int row, rasops4_makestamp(ri, attr); if (uc == ' ') { - u_int16_t c = stamp[0]; + uint16_t c = stamp[0]; while (height--) { rp[0] = c; rp[1] = c; @@ -299,7 +299,7 @@ rasops4_putchar8(void *cookie, int row, } } 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; while (height--) { @@ -329,8 +329,8 @@ rasops4_putchar12(void *cookie, int row, struct rasops_info *ri = (struct rasops_info *)cookie; struct wsdisplay_font *font = PICK_FONT(ri, uc); int height, fs, rs; - u_char *fr; - u_int16_t *rp; + uint8_t *fr; + uint16_t *rp; /* Can't risk remaking the stamp if it's already in use */ if (stamp_mutex++) { @@ -352,7 +352,7 @@ rasops4_putchar12(void *cookie, int row, } #endif - rp = (u_int16_t *)(ri->ri_bits + row * ri->ri_yscale + col * ri->ri_xscale); + rp = (uint16_t *)(ri->ri_bits + row * ri->ri_yscale + col * ri->ri_xscale); height = font->fontheight; rs = ri->ri_stride / sizeof(*rp); @@ -361,7 +361,7 @@ rasops4_putchar12(void *cookie, int row, rasops4_makestamp(ri, attr); if (uc == ' ') { - u_int16_t c = stamp[0]; + uint16_t c = stamp[0]; while (height--) { rp[0] = c; rp[1] = c; @@ -370,7 +370,7 @@ rasops4_putchar12(void *cookie, int row, } } 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; while (height--) { @@ -402,8 +402,8 @@ rasops4_putchar16(void *cookie, int row, struct rasops_info *ri = (struct rasops_info *)cookie; struct wsdisplay_font *font = PICK_FONT(ri, uc); int height, fs, rs; - u_char *fr; - u_int16_t *rp; + uint8_t *fr; + uint16_t *rp; /* Can't risk remaking the stamp if it's already in use */ if (stamp_mutex++) { @@ -425,7 +425,7 @@ rasops4_putchar16(void *cookie, int row, } #endif - rp = (u_int16_t *)(ri->ri_bits + row * ri->ri_yscale + col * ri->ri_xscale); + rp = (uint16_t *)(ri->ri_bits + row * ri->ri_yscale + col * ri->ri_xscale); height = font->fontheight; rs = ri->ri_stride / sizeof(*rp); @@ -434,7 +434,7 @@ rasops4_putchar16(void *cookie, int row, rasops4_makestamp(ri, attr); if (uc == ' ') { - u_int16_t c = stamp[0]; + uint16_t c = stamp[0]; while (height--) { rp[0] = c; rp[1] = c; @@ -444,7 +444,7 @@ rasops4_putchar16(void *cookie, int row, } } 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; while (height--) { Index: src/sys/dev/rasops/rasops8.c diff -u src/sys/dev/rasops/rasops8.c:1.35 src/sys/dev/rasops/rasops8.c:1.36 --- src/sys/dev/rasops/rasops8.c:1.35 Tue Dec 4 09:27:59 2018 +++ src/sys/dev/rasops/rasops8.c Wed Jul 24 18:03:30 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: rasops8.c,v 1.35 2018/12/04 09:27:59 mlelstv Exp $ */ +/* $NetBSD: rasops8.c,v 1.36 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: rasops8.c,v 1.35 2018/12/04 09:27:59 mlelstv Exp $"); +__KERNEL_RCSID(0, "$NetBSD: rasops8.c,v 1.36 2019/07/24 18:03:30 rin Exp $"); #include "opt_rasops.h" @@ -113,7 +113,7 @@ static void rasops8_putchar(void *cookie, int row, int col, u_int uc, long attr) { int width, height, cnt, fs, fb; - u_char *dp, *rp, *hp, *hrp, *fr, clr[2]; + uint8_t *dp, *rp, *hp, *hrp, *fr, clr[2]; struct rasops_info *ri = (struct rasops_info *)cookie; struct wsdisplay_font *font = PICK_FONT(ri, uc); @@ -137,11 +137,11 @@ rasops8_putchar(void *cookie, int row, i height = font->fontheight; width = font->fontwidth; - clr[0] = (u_char)ri->ri_devcmap[(attr >> 16) & 0xf]; - clr[1] = (u_char)ri->ri_devcmap[(attr >> 24) & 0xf]; + clr[0] = (uint8_t)ri->ri_devcmap[(attr >> 16) & 0xf]; + clr[1] = (uint8_t)ri->ri_devcmap[(attr >> 24) & 0xf]; if (uc == ' ') { - u_char c = clr[0]; + uint8_t c = clr[0]; while (height--) { memset(rp, c, width); @@ -176,7 +176,7 @@ rasops8_putchar(void *cookie, int row, i /* Do underline */ if ((attr & WSATTR_UNDERLINE) != 0) { - u_char c = clr[1]; + uint8_t c = clr[1]; rp -= (ri->ri_stride << 1); if (ri->ri_hwbits) @@ -194,7 +194,7 @@ static void rasops8_putchar_aa(void *cookie, int row, int col, u_int uc, long attr) { int width, height; - u_char *rp, *hrp, *fr, bg, fg, pixel; + uint8_t *rp, *hrp, *fr, bg, fg, pixel; struct rasops_info *ri = (struct rasops_info *)cookie; struct wsdisplay_font *font = PICK_FONT(ri, uc); int x, y, r, g, b, aval; @@ -221,8 +221,8 @@ rasops8_putchar_aa(void *cookie, int row height = font->fontheight; width = font->fontwidth; - bg = (u_char)ri->ri_devcmap[(attr >> 16) & 0xf]; - fg = (u_char)ri->ri_devcmap[(attr >> 24) & 0xf]; + bg = (uint8_t)ri->ri_devcmap[(attr >> 16) & 0xf]; + fg = (uint8_t)ri->ri_devcmap[(attr >> 24) & 0xf]; if (uc == ' ') { @@ -338,7 +338,7 @@ rasops8_putchar8(void *cookie, int row, struct wsdisplay_font *font = PICK_FONT(ri, uc); int height, fs; int32_t *rp, *hp; - u_char *fr; + uint8_t *fr; /* Can't risk remaking the stamp if it's already in use */ if (stamp_mutex++) { @@ -429,7 +429,7 @@ rasops8_putchar12(void *cookie, int row, struct wsdisplay_font *font = PICK_FONT(ri, uc); int height, fs; int32_t *rp, *hrp; - u_char *fr; + uint8_t *fr; /* Can't risk remaking the stamp if it's already in use */ if (stamp_mutex++) { @@ -524,7 +524,7 @@ rasops8_putchar16(void *cookie, int row, struct wsdisplay_font *font = PICK_FONT(ri, uc); int height, fs; int32_t *rp, *hrp; - u_char *fr; + uint8_t *fr; /* Can't risk remaking the stamp if it's already in use */ if (stamp_mutex++) {