From 82a64e8ceeea1afc9f6f45116a1f305aacb15890 Mon Sep 17 00:00:00 2001 From: kichikuou Date: Sun, 26 Feb 2017 16:44:28 +0900 Subject: [PATCH] Use standard type names --- src/cmdm.c | 2 +- src/sdl_core.h | 6 +++--- src/sdl_draw.c | 6 +++--- src/xcore.h | 10 +++++----- src/xcore_draw.c | 16 ++++++++-------- 5 files changed, 20 insertions(+), 20 deletions(-) diff --git a/src/cmdm.c b/src/cmdm.c index 08799c5..32f3d70 100644 --- a/src/cmdm.c +++ b/src/cmdm.c @@ -60,7 +60,7 @@ void commandMP() { /* 指定の文字列を指定文字数だけ表示する(Xコマンドの桁数指定) */ int num1 = getCaliValue(); int num2 = getCaliValue(); - u_char bstr[3] = { 0x81,0x40,0x00 }; // white blank + unsigned char bstr[3] = { 0x81,0x40,0x00 }; // white blank int len = min(num2 * 2, v_strlen(num1 - 1)); int blen = num2 * 2 - len; char *str = malloc(num2 * 2 + 1); diff --git a/src/sdl_core.h b/src/sdl_core.h index 6e87175..2cc7725 100644 --- a/src/sdl_core.h +++ b/src/sdl_core.h @@ -51,9 +51,9 @@ extern void sdl_setPallet(Pallet256 *pal, int src, int cnt); /* 描画関係 */ extern void sdl_drawRectangle(int x, int y, int w, int h, int cl); -extern void sdl_fillRectangle(int x, int y, int w, int h, u_long c); -extern void sdl_drawLine(int x1, int y1, int x2, int y2, u_long col); -extern int sdl_drawString(int x, int y, char *msg, u_long col); +extern void sdl_fillRectangle(int x, int y, int w, int h, unsigned long c); +extern void sdl_drawLine(int x1, int y1, int x2, int y2, unsigned long col); +extern int sdl_drawString(int x, int y, char *msg, unsigned long col); extern void sdl_copyArea(int sx,int sy, int w, int h, int dx, int dy); extern void sdl_drawTT(int x,int y,int w,int h,const char *bitmap,int ww, boolean antialiased); extern void sdl_copyAreaSP(int sx, int sy, int w, int h, int dx, int dy, int sp); diff --git a/src/sdl_draw.c b/src/sdl_draw.c index 6795048..150ac81 100644 --- a/src/sdl_draw.c +++ b/src/sdl_draw.c @@ -124,7 +124,7 @@ void sdl_drawRectangle(int x, int y, int w, int h, int c) { } /* 矩形塗りつぶし */ -void sdl_fillRectangle(int x, int y, int w, int h, u_long c) { +void sdl_fillRectangle(int x, int y, int w, int h, unsigned long c) { SDL_Rect rect; sdl_pal_check(); @@ -231,7 +231,7 @@ void sdl_drawImage8_fromData(cgdata *cg, int dx, int dy, int w, int h) { } /* 直線描画 */ -void sdl_drawLine(int x1, int y1, int x2, int y2, u_long cl) { +void sdl_drawLine(int x1, int y1, int x2, int y2, unsigned long cl) { sdl_pal_check(); @@ -321,7 +321,7 @@ static SDL_Surface *com2alphasurface(agsurface_t *src, int cl) { -int sdl_drawString(int x, int y, char *msg, u_long col) { +int sdl_drawString(int x, int y, char *msg, unsigned long col) { int w; sdl_pal_check(); diff --git a/src/xcore.h b/src/xcore.h index 1eb392b..05cd3a3 100644 --- a/src/xcore.h +++ b/src/xcore.h @@ -50,13 +50,13 @@ extern void Xcore_sync(); /* パレット関係 */ extern void Xcore_setPallet(Pallet256 *pal, int src, int cnt); -extern void Xcore_setForeground(u_long col); +extern void Xcore_setForeground(unsigned long col); /* 描画関係 */ -extern void Xcore_drawRectangle(int x, int y, int w, int h, u_long col); -extern void Xcore_fillRectangle(int x, int y, int w, int h, u_long col); -extern void Xcore_drawLine(int x0, int y0, int x1, int y1, u_long col); -extern int Xcore_drawString(int x, int y, char *msg, u_long col); +extern void Xcore_drawRectangle(int x, int y, int w, int h, unsigned long col); +extern void Xcore_fillRectangle(int x, int y, int w, int h, unsigned long col); +extern void Xcore_drawLine(int x0, int y0, int x1, int y1, unsigned long col); +extern int Xcore_drawString(int x, int y, char *msg, unsigned long col); extern void Xcore_copyArea(int sx, int sy, int w, int h, int dx, int dy); // extern void Xcore_drawTT(int x, int y, int w, int h, const char *bitmap, int ww, boolean antialiased); extern int Xcore_eCopyArea(int sx, int sy, int w, int h, int dx, int dy, int t,int opt, boolean flg, int spCol); diff --git a/src/xcore_draw.c b/src/xcore_draw.c index 8f3ac69..d712ea1 100644 --- a/src/xcore_draw.c +++ b/src/xcore_draw.c @@ -129,7 +129,7 @@ void Xcore_updateArea(MyRectangle *src, MyPoint *dst) { } /* draw rectangle */ -void Xcore_drawRectangle(int x, int y, int w, int h, u_long col) { +void Xcore_drawRectangle(int x, int y, int w, int h, unsigned long col) { if (!x11_dibinfo->shared) { image_drawRectangle(DIB, x, y, w, h, PAL2PIC(col)); } else { @@ -140,7 +140,7 @@ void Xcore_drawRectangle(int x, int y, int w, int h, u_long col) { } /* fill rectangle */ -void Xcore_fillRectangle(int x, int y, int w, int h, u_long col) { +void Xcore_fillRectangle(int x, int y, int w, int h, unsigned long col) { if (!x11_dibinfo->shared) { image_fillRectangle(DIB, x, y, w, h, PAL2PIC(col)); } else { @@ -162,7 +162,7 @@ void Xcore_copyArea(int sx, int sy, int w, int h, int dx, int dy) { } /* 直線描画 */ -void Xcore_drawLine(int x1, int y1, int x2, int y2, u_long col) { +void Xcore_drawLine(int x1, int y1, int x2, int y2, unsigned long col) { if (!x11_dibinfo->shared) { image_drawLine(DIB, x1, y1, x2, y2, PAL2PIC(col)); } else { @@ -172,7 +172,7 @@ void Xcore_drawLine(int x1, int y1, int x2, int y2, u_long col) { } } -int Xcore_drawString(int x, int y, char *msg, u_long col) { +int Xcore_drawString(int x, int y, char *msg, unsigned long col) { int w; if (x11_font->self_drawable()) { @@ -232,8 +232,8 @@ void Xcore_setPallet(Pallet256 *pal, int src, int cnt) { } /* foreground のセット */ -void Xcore_setForeground(u_long col) { - static u_long fc = 0; +void Xcore_setForeground(unsigned long col) { + static unsigned long fc = 0; if (fc == col && x11_visual->class == PseudoColor) return; @@ -247,8 +247,8 @@ void Xcore_setForeground(u_long col) { } /* background のセット */ -void Xcore_setBackground(u_long col) { - static u_long bc = 0; +void Xcore_setBackground(unsigned long col) { + static unsigned long bc = 0; if (bc == col) return;