Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[xsrc/trunk]: xsrc/external/mit/xorg-server/dist/hw/netbsd/x68k Use exact-wid...



details:   https://anonhg.NetBSD.org/xsrc/rev/c81718588245
branches:  trunk
changeset: 10618:c81718588245
user:      tsutsui <tsutsui%NetBSD.org@localhost>
date:      Wed Nov 04 17:16:13 2020 +0000

description:
Use exact-width interger types properly for register accesses etc.

No binary changes.

diffstat:

 external/mit/xorg-server/dist/hw/netbsd/x68k/x68kFb.c    |   6 +-
 external/mit/xorg-server/dist/hw/netbsd/x68k/x68kGraph.c |  22 +++---
 external/mit/xorg-server/dist/hw/netbsd/x68k/x68kKbd.c   |  12 +-
 external/mit/xorg-server/dist/hw/netbsd/x68k/x68kReg.h   |  54 ++++++++--------
 external/mit/xorg-server/dist/hw/netbsd/x68k/x68kText.c  |   8 +-
 5 files changed, 51 insertions(+), 51 deletions(-)

diffs (263 lines):

diff -r 16e4231610a7 -r c81718588245 external/mit/xorg-server/dist/hw/netbsd/x68k/x68kFb.c
--- a/external/mit/xorg-server/dist/hw/netbsd/x68k/x68kFb.c     Tue Nov 03 16:59:38 2020 +0000
+++ b/external/mit/xorg-server/dist/hw/netbsd/x68k/x68kFb.c     Wed Nov 04 17:16:13 2020 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: x68kFb.c,v 1.6 2020/11/03 15:52:57 tsutsui Exp $ */
+/* $NetBSD: x68kFb.c,v 1.7 2020/11/04 17:16:13 tsutsui Exp $ */
 /*-------------------------------------------------------------------------
  * Copyright (c) 1996 Yasushi Yamasaki
  * All rights reserved.
@@ -132,7 +132,7 @@
 static void
 x68kRegSetup(X68kScreenRec *pPriv)
 {
-    u_short pr20 = pPriv->reg->crtc.r20;
+    uint16_t pr20 = pPriv->reg->crtc.r20;
 
     /* timing registers */
     if ( (pr20 & 0x0003) < (pPriv->x68kreg.crtc.r20 & 0x0003) ||
@@ -175,7 +175,7 @@
 {
     X68kScreenRec *pPriv = x68kGetScreenPrivate(pScreen);
     static int status = FALSE;
-    static u_short r2;
+    static uint16_t r2;
 
     if (on == SCREEN_SAVER_ON || on == SCREEN_SAVER_CYCLE) {
         if (!status) {
diff -r 16e4231610a7 -r c81718588245 external/mit/xorg-server/dist/hw/netbsd/x68k/x68kGraph.c
--- a/external/mit/xorg-server/dist/hw/netbsd/x68k/x68kGraph.c  Tue Nov 03 16:59:38 2020 +0000
+++ b/external/mit/xorg-server/dist/hw/netbsd/x68k/x68kGraph.c  Wed Nov 04 17:16:13 2020 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: x68kGraph.c,v 1.8 2020/11/03 16:59:38 tsutsui Exp $ */
+/* $NetBSD: x68kGraph.c,v 1.9 2020/11/04 17:16:13 tsutsui Exp $ */
 /*-------------------------------------------------------------------------
  * Copyright (c) 1996 Yasushi Yamasaki
  * All rights reserved.
@@ -125,7 +125,7 @@
 static void x68kStoreColors(ColormapPtr pmap, int ndef, xColorItem *pdefs);
 
 static void x68kUpdateColormap(ScreenPtr pScreen, int dex, int count,
-                               u_char *rmap, u_char *gmap, u_char *bmap);
+                               uint8_t *rmap, uint8_t *gmap, uint8_t *bmap);
 
 /*-------------------------------------------------------------------------
  * function "x68kGraphOpen"                          [ X68kFBProc function ]
@@ -147,7 +147,7 @@
     if (pPriv->depth == 15 && pPriv->class == TrueColor) {
         /* for 32768 TrueColor mode */
        int i;
-       u_short x = 0x0001;
+       uint16_t x = 0x0001;
        for ( i = 0; i < 256; ) {
            pPriv->reg->gpal[i++] = x;
            pPriv->reg->gpal[i++] = x;
@@ -353,7 +353,7 @@
     register int i;
     register Entry *pent;
     register VisualPtr pVisual = cmap->pVisual;
-    u_char   rmap[256], gmap[256], bmap[256];
+    uint8_t   rmap[256], gmap[256], bmap[256];
     unsigned long rMask, gMask, bMask;
     int        oRed, oGreen, oBlue;
 
@@ -454,7 +454,7 @@
 x68kStoreColors(ColormapPtr pmap, int ndef, xColorItem *pdefs)
 {
     X68kScreenRec *pPriv = x68kGetScreenPrivate(pmap->pScreen);
-    u_char     rmap[256], gmap[256], bmap[256];
+    uint8_t     rmap[256], gmap[256], bmap[256];
     xColorItem expanddefs[256];
     register int i;
 
@@ -481,20 +481,20 @@
  *  argument: (ScreenPtr)pScreen: screen
  *            (int)dex          : colormap index
  *            (int)count        : count for updating
- *            (u_char *)[rgb]map: each map
+ *            (uint8_t *)[rgb]map: each map
  *  returns:  nothing
  *-----------------------------------------------------------------------*/
 static void
 x68kUpdateColormap(ScreenPtr pScreen, int dex, int count,
-                               u_char *rmap, u_char *gmap, u_char *bmap)
+                               uint8_t *rmap, uint8_t *gmap, uint8_t *bmap)
 {
     X68kScreenRec *pPriv = x68kGetScreenPrivate(pScreen);
-    volatile u_short *pal = pPriv->reg->gpal;
+    volatile uint16_t *pal = pPriv->reg->gpal;
 
     for( ; count > 0; count--,dex++ ) {
-        pal[dex] = (u_short)gmap[dex] << 11 |
-                   (u_short)rmap[dex] << 6 |
-                   (u_short)bmap[dex] << 1;
+        pal[dex] = (uint16_t)gmap[dex] << 11 |
+                   (uint16_t)rmap[dex] << 6 |
+                   (uint16_t)bmap[dex] << 1;
     }
 }
 
diff -r 16e4231610a7 -r c81718588245 external/mit/xorg-server/dist/hw/netbsd/x68k/x68kKbd.c
--- a/external/mit/xorg-server/dist/hw/netbsd/x68k/x68kKbd.c    Tue Nov 03 16:59:38 2020 +0000
+++ b/external/mit/xorg-server/dist/hw/netbsd/x68k/x68kKbd.c    Wed Nov 04 17:16:13 2020 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: x68kKbd.c,v 1.9 2020/11/01 11:44:55 tsutsui Exp $ */
+/* $NetBSD: x68kKbd.c,v 1.10 2020/11/04 17:16:13 tsutsui Exp $ */
 /*-------------------------------------------------------------------------
  * Copyright (c) 1996 Yasushi Yamasaki
  * All rights reserved.
@@ -93,7 +93,7 @@
 static void x68kKbdRingBell(DeviceIntPtr, int, int);
 static void x68kKbdBell(int, DeviceIntPtr, void *, int);
 static void x68kKbdCtrl(DeviceIntPtr, KeybdCtrl *);
-static void x68kSetLeds(X68kKbdPrivPtr, u_char);
+static void x68kSetLeds(X68kKbdPrivPtr, uint8_t);
 
 static void
 x68kKbdHandlerNotify(int fd __unused, int ready __unused, void *data __unused)
@@ -149,7 +149,7 @@
                 ErrorF("Async keyboard I/O failed");
                 return !Success;
             }
-           x68kSetLeds(&x68kKbdPriv, (u_char)x68kKbdPriv.leds);
+           x68kSetLeds(&x68kKbdPriv, (uint8_t)x68kKbdPriv.leds);
             SetNotifyFd(x68kKbdPriv.fd, x68kKbdHandlerNotify,
                X_NOTIFY_READ, NULL);
             pKeyboard->on = TRUE;
@@ -381,7 +381,7 @@
     X68kKbdPrivPtr pPriv = (X68kKbdPrivPtr)pDev->public.devicePrivate;
 
     if (pPriv->leds != ctrl->leds) {
-        x68kSetLeds(pPriv, (u_char)ctrl->leds);
+        x68kSetLeds(pPriv, (uint8_t)ctrl->leds);
        pPriv->leds = ctrl->leds;
     }
 }
@@ -391,11 +391,11 @@
  *
  *  purpose:  set keyboard leds to specified state
  *  argument: (X68kKbdPrivPtr)pPriv
- *            (u_char)data;
+ *            (uint8_t)data;
  *  returns:  nothing
  *-----------------------------------------------------------------------*/
 static void
-x68kSetLeds(X68kKbdPrivPtr pPriv, u_char data)
+x68kSetLeds(X68kKbdPrivPtr pPriv, uint8_t data)
 {
     /* bit sequence of led indicator in xkb and hardware are same */
     if (ioctl(pPriv->fd, KIOCSLED, &data) == -1)
diff -r 16e4231610a7 -r c81718588245 external/mit/xorg-server/dist/hw/netbsd/x68k/x68kReg.h
--- a/external/mit/xorg-server/dist/hw/netbsd/x68k/x68kReg.h    Tue Nov 03 16:59:38 2020 +0000
+++ b/external/mit/xorg-server/dist/hw/netbsd/x68k/x68kReg.h    Wed Nov 04 17:16:13 2020 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: x68kReg.h,v 1.4 2020/11/03 15:52:57 tsutsui Exp $ */
+/* $NetBSD: x68kReg.h,v 1.5 2020/11/04 17:16:13 tsutsui Exp $ */
 /*-------------------------------------------------------------------------
  * Copyright (c) 1996 Yasushi Yamasaki
  * All rights reserved.
@@ -28,45 +28,45 @@
  * CRT controller
  */
 typedef struct {
-    volatile u_short r00, r01, r02, r03, r04, r05, r06, r07;
-    volatile u_short r08, r09, r10, r11, r12, r13, r14, r15;
-    volatile u_short r16, r17, r18, r19, r20, r21, r22, r23;
-    char pad0[0x450];
-    volatile u_short ctrl;
-    char pad1[0x1b7e];
+    volatile uint16_t r00, r01, r02, r03, r04, r05, r06, r07;
+    volatile uint16_t r08, r09, r10, r11, r12, r13, r14, r15;
+    volatile uint16_t r16, r17, r18, r19, r20, r21, r22, r23;
+    uint8_t pad0[0x450];
+    volatile uint16_t ctrl;
+    uint8_t pad1[0x1b7e];
 } Crtc;
 
 typedef struct {
-    u_short r00, r01, r02, r03, r04, r05, r06, r07;
-    u_short r08, r09, r10, r11, r12, r13, r14, r15;
-    u_short r16, r17, r18, r19, r20, r21, r22, r23;
-    u_short ctrl;
+    uint16_t r00, r01, r02, r03, r04, r05, r06, r07;
+    uint16_t r08, r09, r10, r11, r12, r13, r14, r15;
+    uint16_t r16, r17, r18, r19, r20, r21, r22, r23;
+    uint16_t ctrl;
 } X68kCrtc;
 
 /*
  * video controller
  */
 typedef struct {
-    volatile u_short r0;
-    char pad0[0xfe];
-    volatile u_short r1;
-    char pad1[0xfe];
-    volatile u_short r2;
-    char pad2[0x19fe];
+    volatile uint16_t r0;
+    uint8_t pad0[0xfe];
+    volatile uint16_t r1;
+    uint8_t pad1[0xfe];
+    volatile uint16_t r2;
+    uint8_t pad2[0x19fe];
 } Videoc;
 
 typedef struct {
-    u_short r0;
-    u_short r1;
-    u_short r2;
+    uint16_t r0;
+    uint16_t r1;
+    uint16_t r2;
 } X68kVideoc;
 
 /* system port */
 typedef struct {
-    volatile u_short r1, r2, r3, r4;
-    u_short pad0[2];
-    volatile u_short r5, r6;
-    u_short pad[0x1ff0];
+    volatile uint16_t r1, r2, r3, r4;
+    uint16_t pad0[2];
+    volatile uint16_t r5, r6;
+    uint16_t pad[0x1ff0];
 } Sysport;
 
 /*
@@ -74,10 +74,10 @@
  */
 typedef struct {
     Crtc crtc;
-    volatile u_short gpal[256];    /* graphic palette */
-    volatile u_short tpal[256];     /* text palette */
+    volatile uint16_t gpal[256];    /* graphic palette */
+    volatile uint16_t tpal[256];     /* text palette */
     Videoc videoc;
-    u_short pad0[0xa000];
+    uint16_t pad0[0xa000];
     Sysport sysport;
 } FbReg;
 
diff -r 16e4231610a7 -r c81718588245 external/mit/xorg-server/dist/hw/netbsd/x68k/x68kText.c
--- a/external/mit/xorg-server/dist/hw/netbsd/x68k/x68kText.c   Tue Nov 03 16:59:38 2020 +0000
+++ b/external/mit/xorg-server/dist/hw/netbsd/x68k/x68kText.c   Wed Nov 04 17:16:13 2020 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: x68kText.c,v 1.4 2020/08/01 20:09:03 tsutsui Exp $ */
+/* $NetBSD: x68kText.c,v 1.5 2020/11/04 17:16:13 tsutsui Exp $ */
 /*-------------------------------------------------------------------------
  * Copyright (c) 1996 Yasushi Yamasaki
  * All rights reserved.
@@ -39,9 +39,9 @@
  *  returns:  (Bool): TRUE  if succeeded
  *                    FALSE otherwise
  *-----------------------------------------------------------------------*/
-static u_short r21;
-static u_short tpal0;
-static u_short tpal15;
+static uint16_t r21;
+static uint16_t tpal0;
+static uint16_t tpal15;
 
 Bool
 x68kTextOpen(X68kScreenRec *pPriv)



Home | Main Index | Thread Index | Old Index