From 1bbb32008ecb58acaec9ea70e00b4ea1735408fc Mon Sep 17 00:00:00 2001 From: Michael Tautschnig Date: Tue, 10 Oct 2023 15:09:06 +0000 Subject: [PATCH] Make AddMouseRegion's index unsigned This was previously already done for wmbiff/wmgeneral: the index argument is used as an index into an array, and is always only tested to be below the upper bound. Passing in a negative value would pass that test, and would result in an out-of-bounds access. All dockapps appear to get that right, but libdockapp could see this violated by a (future) user. --- libdockapp/src/wmgeneral.c | 4 ++-- libdockapp/src/wmgeneral.h | 2 +- wmCalClock/Src/xutils.h | 2 +- wmMatrix/xutils.h | 2 +- wmcalclockkbd/src/xutils.h | 2 +- wmcube/wmgeneral/wmgeneral.c | 4 ++-- wmcube/wmgeneral/wmgeneral.h | 2 +- wmdonkeymon/wmgeneral/wmgeneral.c | 4 ++-- wmdonkeymon/wmgeneral/wmgeneral.h | 2 +- wmglobe/src/wmglobe.h | 2 +- wmglobe/src/wmgutil.c | 2 +- wmgrabimage/wmgeneral/wmgeneral.c | 4 ++-- wmgrabimage/wmgeneral/wmgeneral.h | 2 +- wmifinfo/xutils.h | 2 +- wmjiface/src/xutils/xutils.h | 2 +- wmjmail/src/xutils/xutils.h | 2 +- wmmoonclock/src/xutils.h | 2 +- wmmp3/wmgeneral.c | 4 ++-- wmmp3/wmgeneral.h | 2 +- wmpower/src/dockapp/dockapp.c | 4 ++-- wmpower/src/dockapp/dockapp.h | 2 +- wmthemech/src/wmgeneral.c | 4 ++-- wmthemech/src/wmgeneral.h | 2 +- wmthrottle/src/mouse_regions.c | 2 +- wmthrottle/src/mouse_regions.h | 2 +- wmtunlo/docklib.c | 4 ++-- wmtunlo/docklib.h | 2 +- wmtv/src/wmgeneral/wmgeneral.c | 4 ++-- wmtv/src/wmgeneral/wmgeneral.h | 2 +- wmwork/src/wmgeneral.c | 4 ++-- wmwork/src/wmgeneral.h | 2 +- wmxss/Src/xutils.h | 2 +- yawmppp/src/dockapp/wmgeneral.c | 4 ++-- yawmppp/src/dockapp/wmgeneral.h | 2 +- 34 files changed, 45 insertions(+), 45 deletions(-) diff --git a/libdockapp/src/wmgeneral.c b/libdockapp/src/wmgeneral.c index 23e3fc6..9f3e1fa 100644 --- a/libdockapp/src/wmgeneral.c +++ b/libdockapp/src/wmgeneral.c @@ -109,7 +109,7 @@ MOUSE_REGION mouse_region[MAX_MOUSE_REGION]; static void GetXPM(XpmIcon *, char **); static Pixel GetColor(char *); void RedrawWindow(void); -void AddMouseRegion(int, int, int, int, int); +void AddMouseRegion(unsigned, int, int, int, int); int CheckMouseRegion(int, int); /*******************************************************************************\ @@ -277,7 +277,7 @@ void RedrawWindowXY(int x, int y) { |* AddMouseRegion *| \*******************************************************************************/ -void AddMouseRegion(int index, int left, int top, int right, int bottom) { +void AddMouseRegion(unsigned index, int left, int top, int right, int bottom) { if (index < MAX_MOUSE_REGION) { mouse_region[index].enable = 1; diff --git a/libdockapp/src/wmgeneral.h b/libdockapp/src/wmgeneral.h index 03e7e92..46f0580 100644 --- a/libdockapp/src/wmgeneral.h +++ b/libdockapp/src/wmgeneral.h @@ -72,7 +72,7 @@ extern Display *display; /* Function Prototypes */ /***********************/ -void AddMouseRegion(int index, int left, int top, int right, int bottom); +void AddMouseRegion(unsigned index, int left, int top, int right, int bottom); int CheckMouseRegion(int x, int y); void openXwindow(int argc, char *argv[], char **, char *, int, int); diff --git a/wmCalClock/Src/xutils.h b/wmCalClock/Src/xutils.h index b8f3f77..b5c2b13 100644 --- a/wmCalClock/Src/xutils.h +++ b/wmCalClock/Src/xutils.h @@ -31,7 +31,7 @@ extern int DisplayDepth; /* * Function Prototypes */ -void AddMouseRegion(int, int, int, int, int); +void AddMouseRegion(unsigned, int, int, int, int); int CheckMouseRegion(int, int); void openXwindow(int, char **, char **, char *, int, int); void initXwindow(int, char **); diff --git a/wmMatrix/xutils.h b/wmMatrix/xutils.h index 0411783..4938b6f 100644 --- a/wmMatrix/xutils.h +++ b/wmMatrix/xutils.h @@ -22,7 +22,7 @@ int DisplayDepth; /* * Function Prototypes */ -void AddMouseRegion(int, int, int, int, int); +void AddMouseRegion(unsigned, int, int, int, int); int CheckMouseRegion(int, int); void openXwindow(int, char **, char **, char *, int, int); void initXwindow(int, char **); diff --git a/wmcalclockkbd/src/xutils.h b/wmcalclockkbd/src/xutils.h index 0b1001a..392a7db 100644 --- a/wmcalclockkbd/src/xutils.h +++ b/wmcalclockkbd/src/xutils.h @@ -28,7 +28,7 @@ extern int DisplayDepth; /* * Function Prototypes */ -void AddMouseRegion(int, int, int, int, int); +void AddMouseRegion(unsigned, int, int, int, int); int CheckMouseRegion(int, int); void openXwindow(int, char **, char **, char *, int, int); void initXwindow(int, char **); diff --git a/wmcube/wmgeneral/wmgeneral.c b/wmcube/wmgeneral/wmgeneral.c index 56b7bd6..c99a7d6 100644 --- a/wmcube/wmgeneral/wmgeneral.c +++ b/wmcube/wmgeneral/wmgeneral.c @@ -89,7 +89,7 @@ MOUSE_REGION mouse_region[MAX_MOUSE_REGION]; static void GetXPM(XpmIcon *, char **); static Pixel GetColor(char *); void RedrawWindow(void); -void AddMouseRegion(int, int, int, int, int); +void AddMouseRegion(unsigned, int, int, int, int); int CheckMouseRegion(int, int); /*******************************************************************************\ @@ -251,7 +251,7 @@ void RedrawWindowXY(int x, int y) { |* AddMouseRegion *| \*******************************************************************************/ -void AddMouseRegion(int index, int left, int top, int right, int bottom) { +void AddMouseRegion(unsigned index, int left, int top, int right, int bottom) { if (index < MAX_MOUSE_REGION) { mouse_region[index].enable = 1; diff --git a/wmcube/wmgeneral/wmgeneral.h b/wmcube/wmgeneral/wmgeneral.h index e9d6ca6..dd3ecc6 100644 --- a/wmcube/wmgeneral/wmgeneral.h +++ b/wmcube/wmgeneral/wmgeneral.h @@ -42,7 +42,7 @@ Display *display; /* Function Prototypes */ /***********************/ -void AddMouseRegion(int index, int left, int top, int right, int bottom); +void AddMouseRegion(unsigned index, int left, int top, int right, int bottom); int CheckMouseRegion(int x, int y); void openXwindow(int argc, char *argv[], char **, char *, int, int); diff --git a/wmdonkeymon/wmgeneral/wmgeneral.c b/wmdonkeymon/wmgeneral/wmgeneral.c index 96edb9d..b151fb7 100644 --- a/wmdonkeymon/wmgeneral/wmgeneral.c +++ b/wmdonkeymon/wmgeneral/wmgeneral.c @@ -73,7 +73,7 @@ MOUSE_REGION mouse_region[MAX_MOUSE_REGION]; static void GetXPM(XpmIcon *, char **); static Pixel GetColor(char *); void RedrawWindow(void); -void AddMouseRegion(int, int, int, int, int); +void AddMouseRegion(unsigned, int, int, int, int); int CheckMouseRegion(int, int); /*******************************************************************************\ @@ -200,7 +200,7 @@ void RedrawWindowXY(int x, int y) { |* AddMouseRegion *| \*******************************************************************************/ -void AddMouseRegion(int index, int left, int top, int right, int bottom) { +void AddMouseRegion(unsigned index, int left, int top, int right, int bottom) { if (index < MAX_MOUSE_REGION) { mouse_region[index].enable = 1; diff --git a/wmdonkeymon/wmgeneral/wmgeneral.h b/wmdonkeymon/wmgeneral/wmgeneral.h index c6457f4..89d96f0 100644 --- a/wmdonkeymon/wmgeneral/wmgeneral.h +++ b/wmdonkeymon/wmgeneral/wmgeneral.h @@ -34,7 +34,7 @@ Display *display; /* Function Prototypes */ /***********************/ -void AddMouseRegion(int index, int left, int top, int right, int bottom); +void AddMouseRegion(unsigned index, int left, int top, int right, int bottom); void DelMouseRegion(int index); int CheckMouseRegion(int x, int y); diff --git a/wmglobe/src/wmglobe.h b/wmglobe/src/wmglobe.h index 2be0bb8..810c6d5 100644 --- a/wmglobe/src/wmglobe.h +++ b/wmglobe/src/wmglobe.h @@ -165,7 +165,7 @@ MY_EXTERN int stable; /****************************************************************/ int main(int argc, char *argv[]); -void AddMouseRegion(int index, int left, int top, int right, int bottom); +void AddMouseRegion(unsigned index, int left, int top, int right, int bottom); int CheckMouseRegion(int x, int y); void RedrawWindowXYWH(int x, int y, int w, int h); void set_defaults(); diff --git a/wmglobe/src/wmgutil.c b/wmglobe/src/wmgutil.c index 4545432..d47bf0b 100644 --- a/wmglobe/src/wmgutil.c +++ b/wmglobe/src/wmgutil.c @@ -690,7 +690,7 @@ void RedrawWindowXYWH(int x, int y, int w, int h) -void AddMouseRegion(int index, int left, int top, int right, int bottom) +void AddMouseRegion(unsigned index, int left, int top, int right, int bottom) { if (index < MAX_MOUSE_REGION) { mouse_region[index].enable = 1; diff --git a/wmgrabimage/wmgeneral/wmgeneral.c b/wmgrabimage/wmgeneral/wmgeneral.c index 441c955..c06f8b7 100644 --- a/wmgrabimage/wmgeneral/wmgeneral.c +++ b/wmgrabimage/wmgeneral/wmgeneral.c @@ -70,7 +70,7 @@ MOUSE_REGION mouse_region[MAX_MOUSE_REGION]; static void GetXPM(XpmIcon *, char **); static Pixel GetColor(char *); void RedrawWindow(void); -void AddMouseRegion(int, int, int, int, int); +void AddMouseRegion(unsigned, int, int, int, int); int CheckMouseRegion(int, int); /*******************************************************************************\ @@ -195,7 +195,7 @@ void RedrawWindowXY(int x, int y) { |* AddMouseRegion *| \*******************************************************************************/ -void AddMouseRegion(int index, int left, int top, int right, int bottom) { +void AddMouseRegion(unsigned index, int left, int top, int right, int bottom) { if (index < MAX_MOUSE_REGION) { mouse_region[index].enable = 1; diff --git a/wmgrabimage/wmgeneral/wmgeneral.h b/wmgrabimage/wmgeneral/wmgeneral.h index c7c19c3..4a52ea4 100644 --- a/wmgrabimage/wmgeneral/wmgeneral.h +++ b/wmgrabimage/wmgeneral/wmgeneral.h @@ -38,7 +38,7 @@ XpmIcon wmgen; /* Function Prototypes */ /***********************/ -void AddMouseRegion(int index, int left, int top, int right, int bottom); +void AddMouseRegion(unsigned index, int left, int top, int right, int bottom); int CheckMouseRegion(int x, int y); void openXwindow(int argc, char *argv[], char **, char *, int, int); diff --git a/wmifinfo/xutils.h b/wmifinfo/xutils.h index cf1ef5e..8edbd60 100644 --- a/wmifinfo/xutils.h +++ b/wmifinfo/xutils.h @@ -31,7 +31,7 @@ extern int DisplayDepth; /* * Function Prototypes */ -void AddMouseRegion(int, int, int, int, int); +void AddMouseRegion(unsigned, int, int, int, int); int CheckMouseRegion(int, int); void openXwindow(int, char **, char **, char *, int, int, char *, char *, char *, char *,char *); void initXwindow(int, char **); diff --git a/wmjiface/src/xutils/xutils.h b/wmjiface/src/xutils/xutils.h index fcd25f6..f4d94a3 100644 --- a/wmjiface/src/xutils/xutils.h +++ b/wmjiface/src/xutils/xutils.h @@ -31,7 +31,7 @@ int DisplayDepth; /* * Function Prototypes */ -void AddMouseRegion(int, int, int, int, int); +void AddMouseRegion(unsigned, int, int, int, int); int CheckMouseRegion(int, int); void openXwindow(int, char **, char **, char *, int, int, char *, char *, char *, char *,char *); void initXwindow(int, char **); diff --git a/wmjmail/src/xutils/xutils.h b/wmjmail/src/xutils/xutils.h index fcd25f6..f4d94a3 100644 --- a/wmjmail/src/xutils/xutils.h +++ b/wmjmail/src/xutils/xutils.h @@ -31,7 +31,7 @@ int DisplayDepth; /* * Function Prototypes */ -void AddMouseRegion(int, int, int, int, int); +void AddMouseRegion(unsigned, int, int, int, int); int CheckMouseRegion(int, int); void openXwindow(int, char **, char **, char *, int, int, char *, char *, char *, char *,char *); void initXwindow(int, char **); diff --git a/wmmoonclock/src/xutils.h b/wmmoonclock/src/xutils.h index 5edebec..6f9140a 100644 --- a/wmmoonclock/src/xutils.h +++ b/wmmoonclock/src/xutils.h @@ -33,7 +33,7 @@ extern int DisplayDepth; /* * Function Prototypes */ -void AddMouseRegion(int, int, int, int, int); +void AddMouseRegion(unsigned, int, int, int, int); int CheckMouseRegion(int, int); void openXwindow(int, char **, char **, char *, int, int, char *, char *, char *); void initXwindow(int, char **); diff --git a/wmmp3/wmgeneral.c b/wmmp3/wmgeneral.c index 36c5794..6ace5c9 100644 --- a/wmmp3/wmgeneral.c +++ b/wmmp3/wmgeneral.c @@ -89,7 +89,7 @@ MOUSE_REGION mouse_region[MAX_MOUSE_REGION]; static void GetXPM(XpmIcon *, char **); static Pixel GetColor(char *); void RedrawWindow(void); -void AddMouseRegion(int, int, int, int, int); +void AddMouseRegion(unsigned, int, int, int, int); int CheckMouseRegion(int, int); void PutPixel(int, int, int); int GetPixel(int, int); @@ -264,7 +264,7 @@ void RedrawWindowXY(int x, int y) |* AddMouseRegion *| \*******************************************************************************/ -void AddMouseRegion(int index, int left, int top, int right, int bottom) +void AddMouseRegion(unsigned index, int left, int top, int right, int bottom) { if (index < MAX_MOUSE_REGION) { diff --git a/wmmp3/wmgeneral.h b/wmmp3/wmgeneral.h index 6158891..1fab449 100644 --- a/wmmp3/wmgeneral.h +++ b/wmmp3/wmgeneral.h @@ -50,7 +50,7 @@ XpmIcon wmfont; /* Function Prototypes */ /***********************/ -void AddMouseRegion(int index, int left, int top, int right, int bottom); +void AddMouseRegion(unsigned index, int left, int top, int right, int bottom); int CheckMouseRegion(int x, int y); void openXwindow(int argc, char *argv[], char **, char *, int, int); diff --git a/wmpower/src/dockapp/dockapp.c b/wmpower/src/dockapp/dockapp.c index 3a370e7..a5f3c3a 100644 --- a/wmpower/src/dockapp/dockapp.c +++ b/wmpower/src/dockapp/dockapp.c @@ -74,7 +74,7 @@ MOUSE_REGION mouse_region[MAX_MOUSE_REGION]; static void GetXPM(XpmIcon *, char **); static Pixel GetColor(char *); void RedrawWindow(void); -void AddMouseRegion(int, int, int, int, int); +void AddMouseRegion(unsigned, int, int, int, int); int CheckMouseRegion(int, int); /*******************************************************************************\ @@ -199,7 +199,7 @@ void RedrawWindowXY(int x, int y) |* AddMouseRegion *| \*******************************************************************************/ -void AddMouseRegion(int index, int left, int top, int right, int bottom) +void AddMouseRegion(unsigned index, int left, int top, int right, int bottom) { if (index < MAX_MOUSE_REGION) { diff --git a/wmpower/src/dockapp/dockapp.h b/wmpower/src/dockapp/dockapp.h index 55b37dd..1b2a4d1 100644 --- a/wmpower/src/dockapp/dockapp.h +++ b/wmpower/src/dockapp/dockapp.h @@ -34,7 +34,7 @@ Display *display; /* Function Prototypes */ /***********************/ -void AddMouseRegion(int index, int left, int top, int right, int bottom); +void AddMouseRegion(unsigned index, int left, int top, int right, int bottom); int CheckMouseRegion(int x, int y); void openXwindow(int argc, char *argv[], char **, char *, int, int); diff --git a/wmthemech/src/wmgeneral.c b/wmthemech/src/wmgeneral.c index 2253f17..fc26800 100644 --- a/wmthemech/src/wmgeneral.c +++ b/wmthemech/src/wmgeneral.c @@ -72,7 +72,7 @@ MOUSE_REGION mouse_region[MAX_MOUSE_REGION]; static void GetXPM(XpmIcon *, char **); static Pixel GetColor(char *); void RedrawWindow(void); -void AddMouseRegion(int, int, int, int, int); +void AddMouseRegion(unsigned, int, int, int, int); int CheckMouseRegion(int, int); /*******************************************************************************\ @@ -197,7 +197,7 @@ void RedrawWindowXY(int x, int y) { |* AddMouseRegion *| \*******************************************************************************/ -void AddMouseRegion(int index, int left, int top, int right, int bottom) { +void AddMouseRegion(unsigned index, int left, int top, int right, int bottom) { if (index < MAX_MOUSE_REGION) { mouse_region[index].enable = 1; diff --git a/wmthemech/src/wmgeneral.h b/wmthemech/src/wmgeneral.h index c7c19c3..4a52ea4 100644 --- a/wmthemech/src/wmgeneral.h +++ b/wmthemech/src/wmgeneral.h @@ -38,7 +38,7 @@ XpmIcon wmgen; /* Function Prototypes */ /***********************/ -void AddMouseRegion(int index, int left, int top, int right, int bottom); +void AddMouseRegion(unsigned index, int left, int top, int right, int bottom); int CheckMouseRegion(int x, int y); void openXwindow(int argc, char *argv[], char **, char *, int, int); diff --git a/wmthrottle/src/mouse_regions.c b/wmthrottle/src/mouse_regions.c index 0b9790e..5c5ffee 100644 --- a/wmthrottle/src/mouse_regions.c +++ b/wmthrottle/src/mouse_regions.c @@ -86,7 +86,7 @@ MOUSE_REGION mouse_region[MAX_MOUSE_REGION]; |* AddMouseRegion *| \******************************************************************************/ -void AddMouseRegion(int index, int left, int top, int right, int bottom) { +void AddMouseRegion(unsigned index, int left, int top, int right, int bottom) { if (index < MAX_MOUSE_REGION) { mouse_region[index].enable = 1; diff --git a/wmthrottle/src/mouse_regions.h b/wmthrottle/src/mouse_regions.h index 17fc23e..1dee6bb 100644 --- a/wmthrottle/src/mouse_regions.h +++ b/wmthrottle/src/mouse_regions.h @@ -11,7 +11,7 @@ /* Function Prototypes */ /***********************/ -void AddMouseRegion(int index, int left, int top, int right, int bottom); +void AddMouseRegion(unsigned index, int left, int top, int right, int bottom); int CheckMouseRegion(int x, int y); void EnableMouseRegion(int index); void DisableMouseRegion(int index); diff --git a/wmtunlo/docklib.c b/wmtunlo/docklib.c index 7d58fae..9500293 100644 --- a/wmtunlo/docklib.c +++ b/wmtunlo/docklib.c @@ -334,7 +334,7 @@ MOUSE_REGION mouse_region[MAX_MOUSE_REGION]; static void GetXPM(XpmIcon *, char **); static Pixel GetColor(char *); void RedrawWindow(void); -void AddMouseRegion(int, int, int, int, int); +void AddMouseRegion(unsigned, int, int, int, int); int CheckMouseRegion(int, int); /*******************************************************************************\ @@ -459,7 +459,7 @@ void RedrawWindowXY(int x, int y) { |* AddMouseRegion *| \*******************************************************************************/ -void AddMouseRegion(int index, int left, int top, int right, int bottom) { +void AddMouseRegion(unsigned index, int left, int top, int right, int bottom) { if (index < MAX_MOUSE_REGION) { mouse_region[index].enable = 1; diff --git a/wmtunlo/docklib.h b/wmtunlo/docklib.h index 4057022..250e1c3 100644 --- a/wmtunlo/docklib.h +++ b/wmtunlo/docklib.h @@ -92,7 +92,7 @@ Window iconwin, win; /* Function Prototypes */ /***********************/ -void AddMouseRegion(int index, int left, int top, int right, int bottom); +void AddMouseRegion(unsigned index, int left, int top, int right, int bottom); int CheckMouseRegion(int x, int y); void openXwindow(int argc, char *argv[], char **, char *, int, int); diff --git a/wmtv/src/wmgeneral/wmgeneral.c b/wmtv/src/wmgeneral/wmgeneral.c index fbb5d16..068d13a 100644 --- a/wmtv/src/wmgeneral/wmgeneral.c +++ b/wmtv/src/wmgeneral/wmgeneral.c @@ -98,7 +98,7 @@ MOUSE_REGION mouse_region[MAX_MOUSE_REGION]; static void GetXPM(XpmIcon *, char **); static Pixel GetColor(char *); void RedrawWindow(void); -void AddMouseRegion(int, int, int, int, int); +void AddMouseRegion(unsigned, int, int, int, int); int CheckMouseRegion(int, int); /*******************************************************************************\ @@ -191,7 +191,7 @@ void RedrawWindowXYWH(int x, int y, int w, int h) { |* AddMouseRegion *| \*******************************************************************************/ -void AddMouseRegion(int index, int left, int top, int right, int bottom) { +void AddMouseRegion(unsigned index, int left, int top, int right, int bottom) { if (index < MAX_MOUSE_REGION) { mouse_region[index].enable = 1; diff --git a/wmtv/src/wmgeneral/wmgeneral.h b/wmtv/src/wmgeneral/wmgeneral.h index f4b4ba9..95c9a9a 100644 --- a/wmtv/src/wmgeneral/wmgeneral.h +++ b/wmtv/src/wmgeneral/wmgeneral.h @@ -42,7 +42,7 @@ extern Display *display; /* Function Prototypes */ /***********************/ -void AddMouseRegion(int index, int left, int top, int right, int bottom); +void AddMouseRegion(unsigned index, int left, int top, int right, int bottom); int CheckMouseRegion(int x, int y); void openXwindow(int argc, char *argv[], char **, char *, int, int); diff --git a/wmwork/src/wmgeneral.c b/wmwork/src/wmgeneral.c index 2e41355..1dafa82 100644 --- a/wmwork/src/wmgeneral.c +++ b/wmwork/src/wmgeneral.c @@ -107,7 +107,7 @@ MOUSE_REGION mouse_region[MAX_MOUSE_REGION]; static void GetXPM(XpmIcon *, char **); static Pixel GetColor(char *); void RedrawWindow(void); -void AddMouseRegion(int, int, int, int, int); +void AddMouseRegion(unsigned, int, int, int, int); int CheckMouseRegion(int, int); /*******************************************************************************\ @@ -269,7 +269,7 @@ void RedrawWindowXY(int x, int y) { |* AddMouseRegion *| \*******************************************************************************/ -void AddMouseRegion(int index, int left, int top, int right, int bottom) { +void AddMouseRegion(unsigned index, int left, int top, int right, int bottom) { if (index < MAX_MOUSE_REGION) { mouse_region[index].enable = 1; diff --git a/wmwork/src/wmgeneral.h b/wmwork/src/wmgeneral.h index 77dde30..816d0e9 100644 --- a/wmwork/src/wmgeneral.h +++ b/wmwork/src/wmgeneral.h @@ -42,7 +42,7 @@ Display *display; /* Function Prototypes */ /***********************/ -void AddMouseRegion(int index, int left, int top, int right, int bottom); +void AddMouseRegion(unsigned index, int left, int top, int right, int bottom); int CheckMouseRegion(int x, int y); void initXwindow(char *display_name); diff --git a/wmxss/Src/xutils.h b/wmxss/Src/xutils.h index 4ed615f..36aeacc 100644 --- a/wmxss/Src/xutils.h +++ b/wmxss/Src/xutils.h @@ -31,7 +31,7 @@ int DisplayDepth; /* * Function Prototypes */ -void AddMouseRegion(int, int, int, int, int); +void AddMouseRegion(unsigned, int, int, int, int); int CheckMouseRegion(int, int); void openXwindow(int, char **, char **, char *, int, int); void initXwindow(int, char **); diff --git a/yawmppp/src/dockapp/wmgeneral.c b/yawmppp/src/dockapp/wmgeneral.c index 3a8e543..92ee8f7 100644 --- a/yawmppp/src/dockapp/wmgeneral.c +++ b/yawmppp/src/dockapp/wmgeneral.c @@ -64,7 +64,7 @@ MOUSE_REGION mouse_region[MAX_MOUSE_REGION]; static void GetXPM (XpmIcon *, char **); static Pixel GetColor (char *); void RedrawWindow (void); -void AddMouseRegion (int, int, int, int, int); +void AddMouseRegion (unsigned, int, int, int, int); int CheckMouseRegion (int, int); static void @@ -148,7 +148,7 @@ RedrawWindowXY (int x, int y) } void -AddMouseRegion (int index, int left, int top, int right, int bottom) +AddMouseRegion (unsigned index, int left, int top, int right, int bottom) { if (index < MAX_MOUSE_REGION) diff --git a/yawmppp/src/dockapp/wmgeneral.h b/yawmppp/src/dockapp/wmgeneral.h index b89cf00..392351c 100644 --- a/yawmppp/src/dockapp/wmgeneral.h +++ b/yawmppp/src/dockapp/wmgeneral.h @@ -27,7 +27,7 @@ Display *display; /* Function Prototypes */ /***********************/ -void AddMouseRegion(int index, int left, int top, int right, int bottom); +void AddMouseRegion(unsigned index, int left, int top, int right, int bottom); int CheckMouseRegion(int x, int y); void openXwindow(int argc, char *argv[], char **, char *, int, int); -- 2.11.4.GIT