From 23bdc8a0e8b3ad414e02095443db0bf800a416a7 Mon Sep 17 00:00:00 2001 From: lecoanet Date: Tue, 22 Mar 2005 15:30:02 +0000 Subject: Suppressed __unused attribute, this will be dealed with by the gcc directive -Wno-unused-parameter and VC++ does not care about these anyway. --- generic/Arc.c | 16 ++-- generic/Color.c | 22 +++--- generic/Curve.c | 12 +-- generic/Draw.c | 4 +- generic/Field.c | 2 +- generic/Group.c | 30 ++++---- generic/Icon.c | 22 +++--- generic/Image.c | 14 ++-- generic/Item.c | 2 +- generic/Map.c | 26 +++---- generic/MapInfo.c | 10 +-- generic/OverlapMan.c | 10 ++- generic/PostScript.c | 36 ++++----- generic/Rectangle.c | 16 ++-- generic/Reticle.c | 30 ++++---- generic/Tabular.c | 14 ++-- generic/Text.c | 32 ++++---- generic/Track.c | 36 ++++----- generic/Triangles.c | 16 ++-- generic/Window.c | 26 +++---- generic/perfos.c | 4 +- generic/private.h | 209 --------------------------------------------------- generic/tkZinc.c | 90 +++++++++++----------- 23 files changed, 236 insertions(+), 443 deletions(-) delete mode 100644 generic/private.h (limited to 'generic') diff --git a/generic/Arc.c b/generic/Arc.c index 5c0dcd2..25f4e7b 100644 --- a/generic/Arc.c +++ b/generic/Arc.c @@ -334,7 +334,7 @@ Configure(ZnItem item, */ static int Query(ZnItem item, - int argc __znunused, + int argc, Tcl_Obj *CONST argv[]) { if (ZnQueryAttribute(item->wi->interp, item, arc_attrs, argv[0]) == TCL_ERROR) { @@ -412,7 +412,7 @@ UpdateRenderShape(ArcItem arc) static void ComputeCoordinates(ZnItem item, - ZnBool force __znunused) + ZnBool force) { ZnWInfo *wi = item->wi; ArcItem arc = (ArcItem) item; @@ -893,7 +893,7 @@ Render(ZnItem item) } #else static void -Render(ZnItem item __znunused) +Render(ZnItem item) { } #endif @@ -908,7 +908,7 @@ Render(ZnItem item __znunused) */ static ZnBool IsSensitive(ZnItem item, - int item_part __znunused) + int item_part) { return (ISSET(item->flags, ZN_SENSITIVE_BIT) && item->parent->class->IsSensitive(item->parent, ZN_NO_PART)); @@ -1108,11 +1108,11 @@ GetContours(ZnItem item, */ static int Coords(ZnItem item, - int contour __znunused, + int contour, int index, int cmd, ZnPoint **pts, - char **controls __znunused, + char **controls, unsigned int *num_pts) { ArcItem arc = (ArcItem) item; @@ -1196,8 +1196,8 @@ GetAnchor(ZnItem item, ********************************************************************************** */ static void -PostScript(ZnItem item __znunused, - ZnBool prepass __znunused) +PostScript(ZnItem item, + ZnBool prepass) { } diff --git a/generic/Color.c b/generic/Color.c index 664b1e0..236b6db 100644 --- a/generic/Color.c +++ b/generic/Color.c @@ -448,18 +448,18 @@ InterpolateGradientColor(Tk_Window tkwin, /*printf("pos1: %g, pos2: %g, interp_rel_pos: %g\n", pos1, pos2, interp_rel_pos);*/ if (interp_rel_pos < gc1->control) { - tmp = interp_rel_pos * 100 / gc1->control; - rgb.red = gc1->rgb->red + (gc1->mid_rgb->red - gc1->rgb->red) * tmp / 100; - rgb.green = gc1->rgb->green + (gc1->mid_rgb->green - gc1->rgb->green) * tmp / 100; - rgb.blue = gc1->rgb->blue + (gc1->mid_rgb->blue - gc1->rgb->blue) * tmp / 100; - gc_interp->alpha = gc1->alpha + (gc1->mid_alpha - gc1->alpha) * tmp / 100; + tmp = interp_rel_pos * 100.0 / gc1->control; + rgb.red = (unsigned short) (gc1->rgb->red + (gc1->mid_rgb->red - gc1->rgb->red) * tmp / 100.0); + rgb.green = (unsigned short) (gc1->rgb->green + (gc1->mid_rgb->green - gc1->rgb->green) * tmp / 100.0); + rgb.blue = (unsigned short) (gc1->rgb->blue + (gc1->mid_rgb->blue - gc1->rgb->blue) * tmp / 100.0); + gc_interp->alpha = (unsigned char) (gc1->alpha + (gc1->mid_alpha - gc1->alpha) * tmp / 100.0); } else if (interp_rel_pos > gc1->control) { - tmp = (interp_rel_pos - gc1->control) * 100 / (100 - gc1->control); - rgb.red = gc1->mid_rgb->red + (gc2->rgb->red - gc1->mid_rgb->red)*tmp/100; - rgb.green = gc1->mid_rgb->green + (gc2->rgb->green - gc1->mid_rgb->green)*tmp/100; - rgb.blue = gc1->mid_rgb->blue + (gc2->rgb->blue - gc1->mid_rgb->blue)*tmp/100; - gc_interp->alpha = gc1->mid_alpha + (gc2->alpha - gc1->mid_alpha)*tmp/100; + tmp = (interp_rel_pos - gc1->control) * 100.0 / (100.0 - gc1->control); + rgb.red = (unsigned short) (gc1->mid_rgb->red + (gc2->rgb->red - gc1->mid_rgb->red)*tmp / 100.0); + rgb.green = (unsigned short) (gc1->mid_rgb->green + (gc2->rgb->green - gc1->mid_rgb->green)*tmp / 100.0); + rgb.blue = (unsigned short) (gc1->mid_rgb->blue + (gc2->rgb->blue - gc1->mid_rgb->blue)*tmp / 100.0); + gc_interp->alpha = (unsigned char) (gc1->mid_alpha + (gc2->alpha - gc1->mid_alpha)*tmp / 100.0); } else { rgb = *gc1->mid_rgb; @@ -474,7 +474,7 @@ InterpolateGradientColor(Tk_Window tkwin, */ gc_interp->position = 0; if (interp_rel_pos < gc1->control) { - gc_interp->control = gc1->control-interp_rel_pos; + gc_interp->control = gc1->control - (int) interp_rel_pos; gc_interp->mid_rgb = Tk_GetColorByValue(tkwin, gc1->mid_rgb); gc_interp->mid_alpha = gc1->mid_alpha; } diff --git a/generic/Curve.c b/generic/Curve.c index 8531c3a..587fd45 100644 --- a/generic/Curve.c +++ b/generic/Curve.c @@ -487,7 +487,7 @@ Configure(ZnItem item, */ static int Query(ZnItem item, - int argc __znunused, + int argc, Tcl_Obj *CONST argv[]) { if (ZnQueryAttribute(item->wi->interp, item, cv_attrs, argv[0]) == TCL_ERROR) { @@ -633,7 +633,7 @@ UpdateOutlines(CurveItem cv, */ static void ComputeCoordinates(ZnItem item, - ZnBool force __znunused) + ZnBool force) { ZnWInfo *wi = item->wi; CurveItem cv = (CurveItem) item; @@ -1402,7 +1402,7 @@ Render(ZnItem item) } #else static void -Render(ZnItem item __znunused) +Render(ZnItem item) { } #endif @@ -1417,7 +1417,7 @@ Render(ZnItem item __znunused) */ static ZnBool IsSensitive(ZnItem item, - int item_part __znunused) + int item_part) { return (ISSET(item->flags, ZN_SENSITIVE_BIT) && item->parent->class->IsSensitive(item->parent, ZN_NO_PART)); @@ -1593,8 +1593,8 @@ Pick(ZnItem item, ********************************************************************************** */ static void -PostScript(ZnItem item __znunused, - ZnBool prepass __znunused) +PostScript(ZnItem item, + ZnBool prepass) { } diff --git a/generic/Draw.c b/generic/Draw.c index 8ed5405..d466c3b 100644 --- a/generic/Draw.c +++ b/generic/Draw.c @@ -309,7 +309,7 @@ ZnDrawLineShape(ZnWInfo *wi, ZnLineStyle line_style, int foreground_pixel, ZnDim line_width, - ZnLineShape shape __znunused) + ZnLineShape shape) { XPoint *xpoints; unsigned int i; @@ -1146,7 +1146,7 @@ ZnRenderPolyline(ZnWInfo *wi, ZnDim line_width, ZnLineStyle line_style, int cap_style, - int join_style __znunused, + int join_style, ZnLineEnd first_end, ZnLineEnd last_end, ZnGradient *gradient) diff --git a/generic/Field.c b/generic/Field.c index b2b6528..5ff53e0 100644 --- a/generic/Field.c +++ b/generic/Field.c @@ -1047,7 +1047,7 @@ ConfigureField(ZnFieldSet fs, static int QueryField(ZnFieldSet fs, int field, - int argc __znunused, + int argc, Tcl_Obj *CONST argv[]) { if ((field < 0) || ((unsigned int) field >= fs->num_fields)) { diff --git a/generic/Group.c b/generic/Group.c index 0c799fd..1bb7d41 100644 --- a/generic/Group.c +++ b/generic/Group.c @@ -120,8 +120,8 @@ static ZnAttrConfig group_attrs[] = { */ static int Init(ZnItem item, - int *argc __znunused, - Tcl_Obj *CONST *args[] __znunused) + int *argc, + Tcl_Obj *CONST *args[]) { GroupItem group = (GroupItem) item; @@ -412,7 +412,7 @@ SetXShape(ZnItem grp) } #else static void -SetXShape(ZnItem grp __znunused) +SetXShape(ZnItem grp) { } #endif @@ -468,7 +468,7 @@ Configure(ZnItem item, */ static int Query(ZnItem item, - int argc __znunused, + int argc, Tcl_Obj *CONST argv[]) { if (ZnQueryAttribute(item->wi->interp, item, group_attrs, argv[0]) == TCL_ERROR) { @@ -1124,7 +1124,7 @@ Render(ZnItem item) } #else static void -Render(ZnItem item __znunused) +Render(ZnItem item) { } #endif @@ -1139,7 +1139,7 @@ Render(ZnItem item __znunused) */ static ZnBool IsSensitive(ZnItem item, - int item_part __znunused) + int item_part) { ZnBool sensitive = ISSET(item->flags, ZN_SENSITIVE_BIT); ZnItem parent = item->parent; @@ -1238,7 +1238,7 @@ Pick(ZnItem item, if (ZnIsEmptyBBox(&inter)) { goto out; } - if (reg && !ZnPointInRegion(reg, p->x, p->y)) { + if (reg && !ZnPointInRegion(reg, (int) p->x, (int) p->y)) { goto out; } } @@ -1319,11 +1319,11 @@ Pick(ZnItem item, */ static int Coords(ZnItem item, - int contour __znunused, - int index __znunused, + int contour, + int index, int cmd, ZnPoint **pts, - char **controls __znunused, + char **controls, unsigned int *num_pts) { if ((cmd == ZN_COORDS_ADD) || (cmd == ZN_COORDS_ADD_LAST) || (cmd == ZN_COORDS_REMOVE)) { @@ -1367,8 +1367,8 @@ Coords(ZnItem item, ********************************************************************************** */ static void -PostScript(ZnItem item __znunused, - ZnBool prepass __znunused) +PostScript(ZnItem item, + ZnBool prepass) { } @@ -1413,14 +1413,14 @@ ZnGroupSetCallOm(ZnItem group, } #else ZnBool -ZnGroupCallOm(ZnItem group __znunused) +ZnGroupCallOm(ZnItem group) { return False; } void -ZnGroupSetCallOm(ZnItem group __znunused, - ZnBool set __znunused) +ZnGroupSetCallOm(ZnItem group, + ZnBool set) { return; } diff --git a/generic/Icon.c b/generic/Icon.c index 2db3b99..e6f8971 100644 --- a/generic/Icon.c +++ b/generic/Icon.c @@ -112,8 +112,8 @@ static ZnAttrConfig icon_attrs[] = { */ static int Init(ZnItem item, - int *argc __znunused, - Tcl_Obj *CONST *args[] __znunused) + int *argc, + Tcl_Obj *CONST *args[]) { ZnWInfo *wi = item->wi; IconItem icon = (IconItem) item; @@ -227,7 +227,7 @@ Configure(ZnItem item, */ static int Query(ZnItem item, - int argc __znunused, + int argc, Tcl_Obj *CONST argv[]) { if (ZnQueryAttribute(item->wi->interp, item, icon_attrs, argv[0]) == TCL_ERROR) { @@ -247,7 +247,7 @@ Query(ZnItem item, */ static void ComputeCoordinates(ZnItem item, - ZnBool force __znunused) + ZnBool force) { ZnWInfo *wi = item->wi; IconItem icon = (IconItem) item; @@ -634,7 +634,7 @@ Render(ZnItem item) } #else static void -Render(ZnItem item __znunused) +Render(ZnItem item) { } #endif @@ -649,7 +649,7 @@ Render(ZnItem item __znunused) */ static ZnBool IsSensitive(ZnItem item, - int item_part __znunused) + int item_part) { return (ISSET(item->flags, ZN_SENSITIVE_BIT) && item->parent->class->IsSensitive(item->parent, ZN_NO_PART)); @@ -738,8 +738,8 @@ Pick(ZnItem item, ********************************************************************************** */ static void -PostScript(ZnItem item __znunused, - ZnBool prepass __znunused) +PostScript(ZnItem item, + ZnBool prepass) { } @@ -812,11 +812,11 @@ GetClipVertices(ZnItem item, */ static int Coords(ZnItem item, - int contour __znunused, - int index __znunused, + int contour, + int index, int cmd, ZnPoint **pts, - char **controls __znunused, + char **controls, unsigned int *num_pts) { IconItem icon = (IconItem) item; diff --git a/generic/Image.c b/generic/Image.c index bdfddb2..ae4ff9e 100644 --- a/generic/Image.c +++ b/generic/Image.c @@ -132,10 +132,10 @@ To2Power(int a) */ static void InvalidateImage(ClientData client_data, - int x __znunused, - int y __znunused, - int width __znunused, - int height __znunused, + int x, + int y, + int width, + int height, int image_width, int image_height) { @@ -1206,11 +1206,11 @@ SuckGlyphsFromServer(ZnWInfo *wi, tgvip->v0y = txf->descent - height; tgvip->v1x = length; tgvip->v1y = txf->descent; - tgvip->t0x = tex_width; - tgvip->t0y = tex_height; + tgvip->t0x = (GLfloat) tex_width; + tgvip->t0y = (GLfloat) tex_height; tgvip->t1x = tgvip->t0x + length; tgvip->t1y = tgvip->t0y + height; - tgvip->advance = length; + tgvip->advance = (GLfloat) length; #ifndef PTK_800 Tcl_UtfToUniChar(cur, &uni_ch); tgvip->code = uni_ch; diff --git a/generic/Item.c b/generic/Item.c index 2266029..9ae7bc2 100644 --- a/generic/Item.c +++ b/generic/Item.c @@ -186,7 +186,7 @@ InitAttrDesc(ZnAttrConfig *attr_desc) #ifndef PTK static int SetAttrFromAny(Tcl_Interp *interp, - Tcl_Obj *obj __znunused) + Tcl_Obj *obj) { Tcl_AppendToObj(Tcl_GetObjResult(interp), "can't convert value to attribute except via GetAttrDesc", diff --git a/generic/Map.c b/generic/Map.c index 5398528..7b1f8f5 100644 --- a/generic/Map.c +++ b/generic/Map.c @@ -123,7 +123,7 @@ static ZnAttrConfig map_attrs[] = { void UpdateMapInfo(ClientData client_data, - ZnMapInfoId map_info __znunused) + ZnMapInfoId map_info) { ZnItem item = (ZnItem) client_data; @@ -195,8 +195,8 @@ FreeLists(MapItem map) */ static int Init(ZnItem item, - int *argc __znunused, - Tcl_Obj *CONST *args[] __znunused) + int *argc, + Tcl_Obj *CONST *args[]) { MapItem map = (MapItem) item; ZnWInfo *wi = item->wi; @@ -437,7 +437,7 @@ Configure(ZnItem item, */ static int Query(ZnItem item, - int argc __znunused, + int argc, Tcl_Obj *CONST argv[]) { if (ZnQueryAttribute(item->wi->interp, item, map_attrs, argv[0]) == TCL_ERROR) { @@ -458,7 +458,7 @@ Query(ZnItem item, static void ComputeCoordinates(ZnItem item, - ZnBool force __znunused) + ZnBool force) { ZnWInfo *wi = item->wi; MapItem map = (MapItem) item; @@ -977,8 +977,8 @@ ComputeCoordinates(ZnItem item, */ static int -ToArea(ZnItem item __znunused, - ZnToArea ta __znunused) +ToArea(ZnItem item, + ZnToArea ta) { return -1; } @@ -1519,7 +1519,7 @@ Render(ZnItem item) } #else static void -Render(ZnItem item __znunused) +Render(ZnItem item) { } #endif @@ -1534,7 +1534,7 @@ Render(ZnItem item __znunused) */ static ZnBool IsSensitive(ZnItem item, - int item_part __znunused) + int item_part) { return (ISSET(item->flags, ZN_SENSITIVE_BIT) && item->parent->class->IsSensitive(item->parent, ZN_NO_PART)); @@ -1554,8 +1554,8 @@ IsSensitive(ZnItem item, ********************************************************************************** */ static double -Pick(ZnItem item __znunused, - ZnPick ps __znunused) +Pick(ZnItem item, + ZnPick ps) { return 1e40; } @@ -1569,8 +1569,8 @@ Pick(ZnItem item __znunused, ********************************************************************************** */ static void -PostScript(ZnItem item __znunused, - ZnBool prepass __znunused) +PostScript(ZnItem item, + ZnBool prepass) { } diff --git a/generic/MapInfo.c b/generic/MapInfo.c index eeba5e4..3695f45 100644 --- a/generic/MapInfo.c +++ b/generic/MapInfo.c @@ -30,8 +30,6 @@ #ifndef _WIN32 #include #include -#else -#include #endif #include "MapInfo.h" @@ -1347,7 +1345,7 @@ UpdateMapInfoClients(ZnMapInfoMaster *master) } static int -ZnCreateMapInfo(Tcl_Interp *interp __znunused, +ZnCreateMapInfo(Tcl_Interp *interp, char *name, ZnMapInfoId *map_info) { @@ -1441,7 +1439,7 @@ LookupMapInfoMaster(Tcl_Interp *interp, } static int -ZnDeleteMapInfo(Tcl_Interp *interp __znunused, +ZnDeleteMapInfo(Tcl_Interp *interp, char *name) { ZnMapInfoMaster *master; @@ -1610,7 +1608,7 @@ ZnMapInfoTextStyleFromString(Tcl_Interp *interp, } int -ZnMapInfoObjCmd(ClientData client_data __znunused, +ZnMapInfoObjCmd(ClientData client_data, Tcl_Interp *interp, /* Current interpreter. */ int argc, /* Number of arguments. */ Tcl_Obj *CONST args[]) @@ -2089,7 +2087,7 @@ ZnMapInfoObjCmd(ClientData client_data __znunused, *---------------------------------------------------------------------- */ int -ZnVideomapObjCmd(ClientData client_data __znunused, +ZnVideomapObjCmd(ClientData client_data, Tcl_Interp *interp, /* Current interpreter. */ int argc, /* Number of arguments. */ Tcl_Obj *CONST args[]) diff --git a/generic/OverlapMan.c b/generic/OverlapMan.c index 8e38d39..e8515ff 100644 --- a/generic/OverlapMan.c +++ b/generic/OverlapMan.c @@ -45,12 +45,16 @@ static const char compile_id[]="$Compile: " __FILE__ " " __DATE__ " " __TIME__ " #else #include "malloc.h" #endif -#include "private.h" #include #include #include +#ifdef _WIN32 +# ifndef __GNUC__ +# pragma warning(disable : 4996) +# endif +#endif #define signe(a) ((a) < (0) ? (-1) : (1)) #define abs(a) ((a) < (0) ? -(a) : (a)) @@ -349,7 +353,7 @@ OmRegister(void *w, int *, int *), void (*_fset_label_angle)(void *, void *, int, int), void (*_fquery_label_pos)(void *, void *, int, - int *, int *, int *, int *) __znunused) + int *, int *, int *, int *)) { int iw=0; BOOLEAN found=FALSE; @@ -1061,7 +1065,7 @@ void OmProcessOverlap(void *zinc, int width, int height, - double scale __znunused) + double scale) { double acceleration = 0.0; int ip, iw; diff --git a/generic/PostScript.c b/generic/PostScript.c index e24164a..f8458a6 100644 --- a/generic/PostScript.c +++ b/generic/PostScript.c @@ -189,9 +189,9 @@ static Tk_ConfigSpec config_specs[] = { *---------------------------------------------------------------------- */ static int -ZnPsDimParse(ClientData client_data __znunused, - Tcl_Interp *interp __znunused, - Tk_Window tkwin __znunused, +ZnPsDimParse(ClientData client_data, + Tcl_Interp *interp, + Tk_Window tkwin, Tcl_Obj *ovalue, char *widget_rec, int offset) @@ -250,12 +250,12 @@ ZnPsDimParse(ClientData client_data __znunused, } static Tcl_Obj * -ZnPsDimPrint(ClientData client_data __znunused, - Tk_Window tkwin __znunused, +ZnPsDimPrint(ClientData client_data, + Tk_Window tkwin, char *widget_rec, int offset, #ifdef PTK - Tcl_FreeProc **free_proc __znunused + Tcl_FreeProc **free_proc #else Tcl_FreeProc **free_proc #endif @@ -289,9 +289,9 @@ ZnPsDimPrint(ClientData client_data __znunused, *---------------------------------------------------------------------- */ static int -ZnPsColorModeParse(ClientData client_data __znunused, - Tcl_Interp *interp __znunused, - Tk_Window tkwin __znunused, +ZnPsColorModeParse(ClientData client_data, + Tcl_Interp *interp, + Tk_Window tkwin, Tcl_Obj *ovalue, char *widget_rec, int offset) @@ -326,11 +326,11 @@ ZnPsColorModeParse(ClientData client_data __znunused, } static Tcl_Obj * -ZnPsColorModePrint(ClientData client_data __znunused, - Tk_Window tkwin __znunused, +ZnPsColorModePrint(ClientData client_data, + Tk_Window tkwin, char *widget_rec, int offset, - Tcl_FreeProc **free_proc __znunused) + Tcl_FreeProc **free_proc) { int *mode = (int *) (widget_rec + offset); char *s; @@ -362,9 +362,9 @@ ZnPsColorModePrint(ClientData client_data __znunused, *---------------------------------------------------------------------- */ static int -ZnBBoxParse(ClientData client_data __znunused, - Tcl_Interp *interp __znunused, - Tk_Window tkwin __znunused, +ZnBBoxParse(ClientData client_data, + Tcl_Interp *interp, + Tk_Window tkwin, Tcl_Obj *ovalue, char *widget_rec, int offset) @@ -402,12 +402,12 @@ ZnBBoxParse(ClientData client_data __znunused, } static Tcl_Obj * -ZnBBoxPrint(ClientData client_data __znunused, - Tk_Window tkwin __znunused, +ZnBBoxPrint(ClientData client_data, + Tk_Window tkwin, char *widget_rec, int offset, #ifdef PTK - Tcl_FreeProc **free_proc __znunused + Tcl_FreeProc **free_proc #else Tcl_FreeProc **free_proc #endif diff --git a/generic/Rectangle.c b/generic/Rectangle.c index 6ae61c4..c8be3ca 100644 --- a/generic/Rectangle.c +++ b/generic/Rectangle.c @@ -287,7 +287,7 @@ Configure(ZnItem item, */ static int Query(ZnItem item, - int argc __znunused, + int argc, Tcl_Obj *CONST argv[]) { if (ZnQueryAttribute(item->wi->interp, item, rect_attrs, argv[0]) == TCL_ERROR) { @@ -307,7 +307,7 @@ Query(ZnItem item, */ static void ComputeCoordinates(ZnItem item, - ZnBool force __znunused) + ZnBool force) { ZnWInfo *wi = item->wi; RectangleItem rect = (RectangleItem) item; @@ -690,7 +690,7 @@ Render(ZnItem item) } #else static void -Render(ZnItem item __znunused) +Render(ZnItem item) { } #endif @@ -705,7 +705,7 @@ Render(ZnItem item __znunused) */ static ZnBool IsSensitive(ZnItem item, - int item_part __znunused) + int item_part) { return (ISSET(item->flags, ZN_SENSITIVE_BIT) && item->parent->class->IsSensitive(item->parent, ZN_NO_PART)); @@ -765,8 +765,8 @@ Pick(ZnItem item, ********************************************************************************** */ static void -PostScript(ZnItem item __znunused, - ZnBool prepass __znunused) +PostScript(ZnItem item, + ZnBool prepass) { } @@ -834,11 +834,11 @@ GetClipVertices(ZnItem item, */ static int Coords(ZnItem item, - int contour __znunused, + int contour, int index, int cmd, ZnPoint **pts, - char **controls __znunused, + char **controls, unsigned int *num_pts) { RectangleItem rect = (RectangleItem) item; diff --git a/generic/Reticle.c b/generic/Reticle.c index 6bfa235..3011f5d 100644 --- a/generic/Reticle.c +++ b/generic/Reticle.c @@ -137,8 +137,8 @@ static ZnAttrConfig reticle_attrs[] = { */ static int Init(ZnItem item, - int *argc __znunused, - Tcl_Obj *CONST *args[] __znunused) + int *argc, + Tcl_Obj *CONST *args[]) { ReticleItem reticle = (ReticleItem) item; ZnWInfo *wi = item->wi; @@ -234,7 +234,7 @@ Configure(ZnItem item, */ static int Query(ZnItem item, - int argc __znunused, + int argc, Tcl_Obj *CONST argv[]) { if (ZnQueryAttribute(item->wi->interp, item, reticle_attrs, argv[0]) == TCL_ERROR) { @@ -254,7 +254,7 @@ Query(ZnItem item, */ static void ComputeCoordinates(ZnItem item, - ZnBool force __znunused) + ZnBool force) { ZnWInfo *wi = item->wi; ReticleItem reticle = (ReticleItem) item; @@ -305,8 +305,8 @@ ComputeCoordinates(ZnItem item, ********************************************************************************** */ static int -ToArea(ZnItem item __znunused, - ZnToArea ta __znunused) +ToArea(ZnItem item, + ZnToArea ta) { return -1; } @@ -493,7 +493,7 @@ Render(ZnItem item) } #else static void -Render(ZnItem item __znunused) +Render(ZnItem item) { } #endif @@ -508,7 +508,7 @@ Render(ZnItem item __znunused) */ static ZnBool IsSensitive(ZnItem item, - int item_part __znunused) + int item_part) { return (ISSET(item->flags, ZN_SENSITIVE_BIT) && item->parent->class->IsSensitive(item->parent, ZN_NO_PART)); @@ -524,8 +524,8 @@ IsSensitive(ZnItem item, ********************************************************************************** */ static double -Pick(ZnItem item __znunused, - ZnPick ps __znunused) +Pick(ZnItem item, + ZnPick ps) { return 1e40; } @@ -541,11 +541,11 @@ Pick(ZnItem item __znunused, */ static int Coords(ZnItem item, - int contour __znunused, - int index __znunused, + int contour, + int index, int cmd, ZnPoint **pts, - char **controls __znunused, + char **controls, unsigned int *num_pts) { ReticleItem reticle = (ReticleItem) item; @@ -580,8 +580,8 @@ Coords(ZnItem item, ********************************************************************************** */ static void -PostScript(ZnItem item __znunused, - ZnBool prepass __znunused) +PostScript(ZnItem item, + ZnBool prepass) { } diff --git a/generic/Tabular.c b/generic/Tabular.c index 03f9299..d6f1cd6 100644 --- a/generic/Tabular.c +++ b/generic/Tabular.c @@ -233,7 +233,7 @@ Configure(ZnItem item, */ static int Query(ZnItem item, - int argc __znunused, + int argc, Tcl_Obj *CONST argv[]) { if (ZnQueryAttribute(item->wi->interp, item, tabular_attrs, argv[0]) == TCL_ERROR) { @@ -253,7 +253,7 @@ Query(ZnItem item, */ static void ComputeCoordinates(ZnItem item, - ZnBool force __znunused) + ZnBool force) { TabularItem tab = (TabularItem) item; ZnWInfo *wi = item->wi; @@ -411,8 +411,8 @@ Pick(ZnItem item, ********************************************************************************** */ static void -PostScript(ZnItem item __znunused, - ZnBool prepass __znunused) +PostScript(ZnItem item, + ZnBool prepass) { } @@ -499,11 +499,11 @@ GetClipVertices(ZnItem item, */ static int Coords(ZnItem item, - int contour __znunused, - int index __znunused, + int contour, + int index, int cmd, ZnPoint **pts, - char **controls __znunused, + char **controls, unsigned int *num_pts) { TabularItem tabular = (TabularItem) item; diff --git a/generic/Text.c b/generic/Text.c index 753962c..391525e 100644 --- a/generic/Text.c +++ b/generic/Text.c @@ -171,8 +171,8 @@ static ZnAttrConfig text_attrs[] = { */ static int Init(ZnItem item, - int *argc __znunused, - Tcl_Obj *CONST *args[] __znunused) + int *argc, + Tcl_Obj *CONST *args[]) { ZnWInfo *wi = item->wi; TextItem text = (TextItem) item; @@ -373,7 +373,7 @@ Configure(ZnItem item, */ static int Query(ZnItem item, - int argc __znunused, + int argc, Tcl_Obj *CONST argv[]) { if (ZnQueryAttribute(item->wi->interp, item, text_attrs, argv[0]) == TCL_ERROR) { @@ -543,7 +543,7 @@ ComputeSelection(ZnItem item, */ static void ComputeCoordinates(ZnItem item, - ZnBool force __znunused) + ZnBool force) { ZnWInfo *wi = item->wi; TextItem text = (TextItem) item; @@ -1280,7 +1280,7 @@ Render(ZnItem item) } #else static void -Render(ZnItem item __znunused) +Render(ZnItem item) { } #endif @@ -1295,7 +1295,7 @@ Render(ZnItem item __znunused) */ static ZnBool IsSensitive(ZnItem item, - int item_part __znunused) + int item_part) { return (ISSET(item->flags, ZN_SENSITIVE_BIT) && item->parent->class->IsSensitive(item->parent, ZN_NO_PART)); @@ -1366,8 +1366,8 @@ Pick(ZnItem item, ********************************************************************************** */ static void -PostScript(ZnItem item __znunused, - ZnBool prepass __znunused) +PostScript(ZnItem item, + ZnBool prepass) { } @@ -1428,11 +1428,11 @@ GetClipVertices(ZnItem item, */ static int Coords(ZnItem item, - int contour __znunused, - int index __znunused, + int contour, + int index, int cmd, ZnPoint **pts, - char **controls __znunused, + char **controls, unsigned int *num_pts) { TextItem text = (TextItem) item; @@ -1642,7 +1642,7 @@ MoveFromIndex(TextItem text, static int Index(ZnItem item, - int field __znunused, + int field, Tcl_Obj *index_spec, int *index) { @@ -1748,7 +1748,7 @@ Index(ZnItem item, */ static void InsertChars(ZnItem item, - int field __znunused, + int field, int *index, char *chars) { @@ -1812,7 +1812,7 @@ InsertChars(ZnItem item, */ static void DeleteChars(ZnItem item, - int field __znunused, + int field, int *first, int *last) { @@ -1900,7 +1900,7 @@ DeleteChars(ZnItem item, */ static void TextCursor(ZnItem item, - int field __znunused, + int field, int index) { TextItem text = (TextItem) item; @@ -1926,7 +1926,7 @@ TextCursor(ZnItem item, */ static int Selection(ZnItem item, - int field __znunused, + int field, int offset, char *chars, int max_bytes) diff --git a/generic/Track.c b/generic/Track.c index 1ad4e47..48c55d5 100644 --- a/generic/Track.c +++ b/generic/Track.c @@ -681,7 +681,7 @@ Configure(ZnItem item, */ static int Query(ZnItem item, - int argc __znunused, + int argc, Tcl_Obj *CONST argv[]) { if (ZnQueryAttribute(item->wi->interp, item, track_attrs, argv[0]) == TCL_ERROR) { @@ -701,7 +701,7 @@ Query(ZnItem item, */ static void ComputeCoordinates(ZnItem item, - ZnBool force __znunused) + ZnBool force) { ZnWInfo *wi = item->wi; TrackItem track = (TrackItem) item; @@ -756,8 +756,8 @@ ComputeCoordinates(ZnItem item, wi->track_visible_history_size : 0); ZnResetBBox(&bbox); - w = track->history_width; - w2 = (w+1)/2; + w = (int) track->history_width; + w2 = (w+1)/2; num_acc_pos = ZnListSize(track->history); hist = ZnListArray(track->history); for (i = 0; i < num_acc_pos; i++) { @@ -1233,7 +1233,7 @@ Draw(ZnItem item) } num_acc_pos = MIN(visible_history_size, ZnListSize(track->history)); hist = ZnListArray(track->history); - side_size = track->history_width; + side_size = (int) track->history_width; for (i = 0, nb_hist = 0; i < num_acc_pos; i++) { if (ISSET(track->flags, LAST_AS_FIRST_BIT) && @@ -1504,7 +1504,7 @@ Render(ZnItem item) glPolygonMode(GL_FRONT_AND_BACK, GL_FILL); num_acc_pos = MIN(visible_history_size, ZnListSize(track->history)); hist = ZnListArray(track->history); - side_size = track->history_width; + side_size = (int) track->history_width; /* * Turning off line and point smoothing * to enhance ;-) history drawing. @@ -1595,7 +1595,7 @@ Render(ZnItem item) } #else static void -Render(ZnItem item __znunused) +Render(ZnItem item) { } #endif @@ -1779,8 +1779,8 @@ Pick(ZnItem item, ********************************************************************************** */ static void -PostScript(ZnItem item __znunused, - ZnBool prepass __znunused) +PostScript(ZnItem item, + ZnBool prepass) { } @@ -1919,9 +1919,9 @@ ZnSendTrackToOm(void *ptr, ********************************************************************************** */ void -ZnSetLabelAngleFromOm(void *ptr __znunused, /* No longer in use. */ +ZnSetLabelAngleFromOm(void *ptr, /* No longer in use. */ void *item, - int rho __znunused, + int rho, int theta) { TrackItem track = (TrackItem) item; @@ -1951,7 +1951,7 @@ ZnSetLabelAngleFromOm(void *ptr __znunused, /* No longer in use. */ ********************************************************************************** */ void -ZnQueryLabelPosition(void *ptr __znunused, /* No longer in use. */ +ZnQueryLabelPosition(void *ptr, /* No longer in use. */ void *item, int theta, int *x, @@ -1999,9 +1999,9 @@ ZnQueryLabelPosition(void *ptr __znunused, /* No longer in use. */ ********************************************************************************** */ void -ZnSetHistoryVisibility(ZnItem item __znunused, - int index __znunused, - ZnBool visible __znunused) +ZnSetHistoryVisibility(ZnItem item, + int index, + ZnBool visible) { } @@ -2078,11 +2078,11 @@ GetAnchor(ZnItem item, */ static int Coords(ZnItem item, - int contour __znunused, - int index __znunused, + int contour, + int index, int cmd, ZnPoint **pts, - char **controls __znunused, + char **controls, unsigned int *num_pts) { TrackItem track = (TrackItem) item; diff --git a/generic/Triangles.c b/generic/Triangles.c index 6b5ee77..8d94d79 100644 --- a/generic/Triangles.c +++ b/generic/Triangles.c @@ -248,7 +248,7 @@ Configure(ZnItem item, */ static int Query(ZnItem item, - int argc __znunused, + int argc, Tcl_Obj *CONST argv[]) { if (ZnQueryAttribute(item->wi->interp, item, tr_attrs, argv[0]) == TCL_ERROR) { @@ -268,7 +268,7 @@ Query(ZnItem item, */ static void ComputeCoordinates(ZnItem item, - ZnBool force __znunused) + ZnBool force) { ZnWInfo *wi = item->wi; TrianglesItem tr = (TrianglesItem) item; @@ -498,7 +498,7 @@ Render(ZnItem item) } #else static void -Render(ZnItem item __znunused) +Render(ZnItem item) { } #endif @@ -513,7 +513,7 @@ Render(ZnItem item __znunused) */ static ZnBool IsSensitive(ZnItem item, - int item_part __znunused) + int item_part) { return (ISSET(item->flags, ZN_SENSITIVE_BIT) && item->parent->class->IsSensitive(item->parent, ZN_NO_PART)); @@ -585,8 +585,8 @@ Pick(ZnItem item, ********************************************************************************** */ static void -PostScript(ZnItem item __znunused, - ZnBool prepass __znunused) +PostScript(ZnItem item, + ZnBool prepass) { } @@ -678,11 +678,11 @@ GetContours(ZnItem item, */ static int Coords(ZnItem item, - int contour __znunused, + int contour, int index, int cmd, ZnPoint **pts, - char **controls __znunused, + char **controls, unsigned int *num_pts) { TrianglesItem tr = (TrianglesItem) item; diff --git a/generic/Window.c b/generic/Window.c index f791b81..d02c302 100644 --- a/generic/Window.c +++ b/generic/Window.c @@ -136,7 +136,7 @@ WindowDeleted(ClientData client_data, */ static void WindowItemRequest(ClientData client_data, - Tk_Window win __znunused) + Tk_Window win) { WindowItem wind = (WindowItem) client_data; @@ -149,7 +149,7 @@ WindowItemRequest(ClientData client_data, */ static void WindowItemLostSlave(ClientData client_data, - Tk_Window win __znunused) + Tk_Window win) { WindowItem wind = (WindowItem) client_data; ZnWInfo *wi = ((ZnItem) wind)->wi; @@ -179,8 +179,8 @@ static Tk_GeomMgr wind_geom_type = { */ static int Init(ZnItem item, - int *argc __znunused, - Tcl_Obj *CONST *args[] __znunused) + int *argc, + Tcl_Obj *CONST *args[]) { WindowItem wind = (WindowItem) item; @@ -322,7 +322,7 @@ Configure(ZnItem item, */ static int Query(ZnItem item, - int argc __znunused, + int argc, Tcl_Obj *CONST argv[]) { if (ZnQueryAttribute(item->wi->interp, item, wind_attrs, argv[0]) == TCL_ERROR) { @@ -342,7 +342,7 @@ Query(ZnItem item, */ static void ComputeCoordinates(ZnItem item, - ZnBool force __znunused) + ZnBool force) { ZnWInfo *wi = item->wi; WindowItem wind = (WindowItem) item; @@ -498,8 +498,8 @@ Draw(ZnItem item) ********************************************************************************** */ static ZnBool -IsSensitive(ZnItem item __znunused, - int item_part __znunused) +IsSensitive(ZnItem item, + int item_part) { /* * Sensitivity can't be controlled. @@ -545,8 +545,8 @@ Pick(ZnItem item, ********************************************************************************** */ static void -PostScript(ZnItem item __znunused, - ZnBool prepass __znunused) +PostScript(ZnItem item, + ZnBool prepass) { } @@ -618,11 +618,11 @@ GetClipVertices(ZnItem item, */ static int Coords(ZnItem item, - int contour __znunused, - int index __znunused, + int contour, + int index, int cmd, ZnPoint **pts, - char **controls __znunused, + char **controls, unsigned int *num_pts) { WindowItem wind = (WindowItem) item; diff --git a/generic/perfos.c b/generic/perfos.c index aadfb9b..1a0f57c 100644 --- a/generic/perfos.c +++ b/generic/perfos.c @@ -50,8 +50,8 @@ static ZnList Chronos = NULL; ********************************************************************************** */ static void -HardwareSynchronize(Display *test_display __znunused, - Drawable test_window __znunused) +HardwareSynchronize(Display *test_display, + Drawable test_window) { /*XImage *image;*/ diff --git a/generic/private.h b/generic/private.h deleted file mode 100644 index 94a58ca..0000000 --- a/generic/private.h +++ /dev/null @@ -1,209 +0,0 @@ -/* Copyright (C) 1996-2001 Martin Vicente -*- c -*- - This file is part of the eXtended C Library (XCLIB). - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public - License along with this library (see the file COPYING.LIB). - If not, write to the Free Software Foundation, Inc., - 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. */ - - -/* XCLIB 0.3 PRIVATE: PRIVATE AND INTERNALS */ - - -#ifndef __XC_PRIVATE_H -#define __XC_PRIVATE_H - - -/* Standard C Library: */ -#include - - -#if !defined __STDC__ -#error "Use a modern C compiler please" -#endif - -#if __STDC__ - 1 -#warning "Use a C ANSI compiler please" -#endif - - -#if __WORDSIZE == 64 || defined __alpha || defined __sgi && _MIPS_SZLONG == 64 -# undef __LONG64__ -# define __LONG64__ -#endif - - -#if defined _FACILITY && !defined __FACI__ -#define __FACI__ _FACILITY -#endif - -#if defined __DEBUG__ && !defined __FACI__ -#define __FACI__ "" -#endif - - -#if defined __GNUG__ -#define __FUNC__ __PRETTY_FUNCTION__ -#elif defined __GNUC__ -#define __FUNC__ __FUNCTION__ -#elif defined __STDC_VERSION__ && __STDC_VERSION__ >= 199901L -#define __FUNC__ __func__ -#else -#define __FUNC__ "" -#endif - - -#if defined __sun && defined __SUNPRO_C && defined __SVR4 /* Solaris 2.x */ -#define __PRAGMA_INIT__ -#define __PRAGMA_FINI__ -#endif - - -#if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 8) -#define __extension__ -#endif - -#if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 7) -#define __format__ format -#define __printf__ printf -#define __scanf__ scanf -#endif - -#if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 5) -#define __attribute(spec) -#define __attribute__(spec) -#endif - -#define __constructor __attribute__ ((__constructor__)) -#define __destructor __attribute__ ((__destructor__)) -#define __noreturn __attribute__ ((__noreturn__)) -#define __znunused __attribute__ ((__unused__)) - - -#ifndef __GNUC__ -#define inline -#define __inline -#define __inline__ -#endif - - -#ifndef NULL -#if defined __GNUG__ -#define NULL __null /* NUL POINTER */ -#elif defined __cplusplus -#define NULL 0 -#else -#define NULL ((void *)0) -#endif -#endif - - -#define __noop ((void)0) /* VOID INSTRUCTION (NO OPERATION) */ - - -#if defined __GNUC__ && !defined __STRICT_ANSI__ -#define _XC_ESC '\e' /* ESCAPE CHARACTER */ -#define _XC_ESC_STRING "\e" /* ESCAPE CHARACTER (STRING) */ -#else -#define _XC_ESC '\x1b' -#define _XC_ESC_STRING "\x1b" -#endif - - -#define _XC_E 2.7182818284590452354 /* e */ -#define _XC_LOG2E 1.4426950408889634074 /* log_2(e) */ -#define _XC_LOG10E 0.43429448190325182765 /* log_10(e) */ -#define _XC_LN2 0.69314718055994530942 /* log_e(2) */ -#define _XC_LN10 2.30258509299404568402 /* log_e(10) */ -#define _XC_PI 3.14159265358979323846 /* pi */ -#define _XC_PI_2 1.57079632679489661923 /* pi/2 */ -#define _XC_PI_4 0.78539816339744830962 /* pi/4 */ -#define _XC_1_PI 0.31830988618379067154 /* 1/pi */ -#define _XC_2_PI 0.63661977236758134308 /* 2/pi */ -#define _XC_2_SQRTPI 1.12837916709551257390 /* 2/sqrt(pi) */ -#define _XC_SQRT2 1.41421356237309504880 /* sqrt(2) */ -#define _XC_SQRT1_2 0.70710678118654752440 /* 1/sqrt(2) */ - -#define _XC_El 2.7182818284590452353602874713526625L /* e */ -#define _XC_LOG2El 1.4426950408889634073599246810018922L /* log_2(e) */ -#define _XC_LOG10El 0.4342944819032518276511289189166051L /* log_10(e) */ -#define _XC_LN2l 0.6931471805599453094172321214581766L /* log_e(2) */ -#define _XC_LN10l 2.3025850929940456840179914546843642L /* log_e(10) */ -#define _XC_PIl 3.1415926535897932384626433832795029L /* pi */ -#define _XC_PI_2l 1.5707963267948966192313216916397514L /* pi/2 */ -#define _XC_PI_4l 0.7853981633974483096156608458198757L /* pi/4 */ -#define _XC_1_PIl 0.3183098861837906715377675267450287L /* 1/pi */ -#define _XC_2_PIl 0.6366197723675813430755350534900574L /* 2/pi */ -#define _XC_2_SQRTPIl 1.1283791670955125738961589031215452L /* 2/sqrt(pi) */ -#define _XC_SQRT2l 1.4142135623730950488016887242096981L /* sqrt(2) */ -#define _XC_SQRT1_2l 0.7071067811865475244008443621048490L /* 1/sqrt(2) */ - - -#define __XC_T_1_2(type) ((type)1 / (type)2) - -#ifdef __GNUC__ -#define __XC_1_2(x) __XC_TYPE_1_2(typeof (x)) -#endif - - -#if defined __GNUC__ && !defined __STRICT_ANSI__ -#define __MACRO_VARARGS__ -#endif - - -#if defined __GNUC__ && !defined __STRICT_ANSI__ -#define _MBEGIN ({ /* TO DEFINE COMPLEX MACROS */ -#define _MEND }) -#else -#/* Attention ici à l'utilisation des `break' et des `continue'! */ -#define _MBEGIN do { -#define _MEND } while (0) -#endif - -#ifdef __GNUC__ -#ifdef __STRICT_ANSI__ -#define _FBEGIN ( __extension__ ({ /* TO DEFINE FUNCTION MACROS */ -#define _FEND })) -#else -#define _FBEGIN ({ -#define _FEND }) -#endif -#endif - - -#ifdef __REENTRANT__ -#define __XC_AUTO auto -#define __XC_REGISTER auto -#else -#define __XC_AUTO -#define __XC_REGISTER register -#endif - - -#ifdef __GNUC__ -#ifdef __STRICT_ANSI__ -#define TYPEDEF __extension__ typedef -#else -#define TYPEDEF typedef -#endif -#endif - - -#define __xclib(reference) xc__ ## reference -#define __xcint(reference) __xc__ ## reference - - -#endif /* XC PRIVATE HEADER */ - - -/*------------------------------/ END OF FILE /------------------------------*/ diff --git a/generic/tkZinc.c b/generic/tkZinc.c index 3f84441..03cd6d9 100644 --- a/generic/tkZinc.c +++ b/generic/tkZinc.c @@ -547,9 +547,9 @@ static void Repair _ANSI_ARGS_((ZnWInfo *wi)); *---------------------------------------------------------------------- */ static int -ZnReliefParse(ClientData client_data __znunused, - Tcl_Interp *interp __znunused, - Tk_Window tkwin __znunused, +ZnReliefParse(ClientData client_data, + Tcl_Interp *interp, + Tk_Window tkwin, Tcl_Obj *ovalue, char *widget_rec, int offset) @@ -569,11 +569,11 @@ ZnReliefParse(ClientData client_data __znunused, } static Tcl_Obj * -ZnReliefPrint(ClientData client_data __znunused, - Tk_Window tkwin __znunused, +ZnReliefPrint(ClientData client_data, + Tk_Window tkwin, char *widget_rec, int offset, - Tcl_FreeProc **free_proc __znunused) + Tcl_FreeProc **free_proc) { ZnReliefStyle relief = *(ZnReliefStyle *) (widget_rec + offset); return Tcl_NewStringObj(ZnNameOfRelief(relief), -1); @@ -590,7 +590,7 @@ ZnReliefPrint(ClientData client_data __znunused, *---------------------------------------------------------------------- */ static int -ZnGradientParse(ClientData client_data __znunused, +ZnGradientParse(ClientData client_data, Tcl_Interp *interp, Tk_Window tkwin, Tcl_Obj *ovalue, @@ -616,11 +616,11 @@ ZnGradientParse(ClientData client_data __znunused, } static Tcl_Obj * -ZnGradientPrint(ClientData client_data __znunused, - Tk_Window tkwin __znunused, +ZnGradientPrint(ClientData client_data, + Tk_Window tkwin, char *widget_rec, int offset, - Tcl_FreeProc **free_proc __znunused) + Tcl_FreeProc **free_proc) { ZnGradient *gradient = *(ZnGradient **) (widget_rec + offset); return Tcl_NewStringObj(ZnNameOfGradient(gradient), -1); @@ -638,9 +638,9 @@ ZnGradientPrint(ClientData client_data __znunused, *---------------------------------------------------------------------- */ static int -ZnBitmapParse(ClientData client_data __znunused, - Tcl_Interp *interp __znunused, - Tk_Window tkwin __znunused, +ZnBitmapParse(ClientData client_data, + Tcl_Interp *interp, + Tk_Window tkwin, Tcl_Obj *ovalue, char *widget_rec, int offset) @@ -683,9 +683,9 @@ ZnImageUpdate(void *client_data) } static int -ZnImageParse(ClientData client_data __znunused, - Tcl_Interp *interp __znunused, - Tk_Window tkwin __znunused, +ZnImageParse(ClientData client_data, + Tcl_Interp *interp, + Tk_Window tkwin, Tcl_Obj *ovalue, char *widget_rec, int offset) @@ -714,11 +714,11 @@ ZnImageParse(ClientData client_data __znunused, } static Tcl_Obj * -ZnImagePrint(ClientData client_data __znunused, - Tk_Window tkwin __znunused, +ZnImagePrint(ClientData client_data, + Tk_Window tkwin, char *widget_rec, int offset, - Tcl_FreeProc **free_proc __znunused) + Tcl_FreeProc **free_proc) { ZnImage image = *(ZnImage *) (widget_rec + offset); return Tcl_NewStringObj(image?ZnNameOfImage(image):"", -1); @@ -735,14 +735,14 @@ ZnImagePrint(ClientData client_data __znunused, *---------------------------------------------------------------------- */ static int -ZnSetReliefOpt(ClientData client_data __znunused, - Tcl_Interp *interp __znunused, - Tk_Window tkwin __znunused, +ZnSetReliefOpt(ClientData client_data, + Tcl_Interp *interp, + Tk_Window tkwin, Tcl_Obj **ovalue, char *widget_rec, int offset, char *old_val_ptr, - int flags __znunused) + int flags) { ZnReliefStyle *relief_ptr; ZnReliefStyle relief; @@ -760,8 +760,8 @@ ZnSetReliefOpt(ClientData client_data __znunused, } static Tcl_Obj * -ZnGetReliefOpt(ClientData client_data __znunused, - Tk_Window tkwin __znunused, +ZnGetReliefOpt(ClientData client_data, + Tk_Window tkwin, char *widget_rec, int offset) { @@ -770,8 +770,8 @@ ZnGetReliefOpt(ClientData client_data __znunused, } static void -ZnRestoreReliefOpt(ClientData client_data __znunused, - Tk_Window tkwin __znunused, +ZnRestoreReliefOpt(ClientData client_data, + Tk_Window tkwin, char *val_ptr, char *old_val_ptr) { @@ -789,14 +789,14 @@ ZnRestoreReliefOpt(ClientData client_data __znunused, *---------------------------------------------------------------------- */ static int -ZnSetGradientOpt(ClientData client_data __znunused, +ZnSetGradientOpt(ClientData client_data, Tcl_Interp *interp, Tk_Window tkwin, Tcl_Obj **ovalue, char *widget_rec, int offset, char *old_val_ptr, - int flags __znunused) + int flags) { ZnGradient **grad_ptr; ZnGradient *grad; @@ -820,8 +820,8 @@ ZnSetGradientOpt(ClientData client_data __znunused, } static Tcl_Obj * -ZnGetGradientOpt(ClientData client_data __znunused, - Tk_Window tkwin __znunused, +ZnGetGradientOpt(ClientData client_data, + Tk_Window tkwin, char *widget_rec, int offset) { @@ -830,8 +830,8 @@ ZnGetGradientOpt(ClientData client_data __znunused, } static void -ZnRestoreGradientOpt(ClientData client_data __znunused, - Tk_Window tkwin __znunused, +ZnRestoreGradientOpt(ClientData client_data, + Tk_Window tkwin, char *val_ptr, char *old_val_ptr) { @@ -842,8 +842,8 @@ ZnRestoreGradientOpt(ClientData client_data __znunused, } static void -ZnFreeGradientOpt(ClientData client_data __znunused, - Tk_Window tkwin __znunused, +ZnFreeGradientOpt(ClientData client_data, + Tk_Window tkwin, char *val_ptr) { if (*(ZnGradient **) val_ptr != NULL) { @@ -1000,11 +1000,11 @@ ZnGLSwapBuffers(ZnGLContextEntry *ce, static void InitRendering1(ZnWInfo *wi) { - ZnGLContextEntry *ce; - ZnGLContext gl_context; if (wi->render) { # ifndef _WIN32 + ZnGLContextEntry *ce; + ZnGLContext gl_context; XVisualInfo *gl_visual = NULL; Colormap colormap = 0; @@ -2593,7 +2593,7 @@ ZnItemWithTagOrId(ZnWInfo *wi, */ static int LayoutItems(ZnWInfo *wi, - int argc __znunused, + int argc, Tcl_Obj *CONST args[]) { int index/*, result*/; @@ -8838,10 +8838,10 @@ ZnTessEnd(void *data) static void ZnTessCombine(GLdouble coords[3], - void *vertex_data[4] __znunused, - GLfloat weight[4] __znunused, + void *vertex_data[4], + GLfloat weight[4], void **out_data, - void *data __znunused) + void *data) { ZnCombineData *cdata; @@ -8858,7 +8858,7 @@ ZnTessCombine(GLdouble coords[3], static void ZnTessError(GLenum errno, - void *data __znunused) + void *data) { fprintf(stderr, "Tesselation error in curve item: %d\n", errno); } @@ -9060,9 +9060,9 @@ Tkzinc_debug_Init(Tcl_Interp *interp) /* Used for error reporting. */ *---------------------------------------------------------------------- */ BOOL APIENTRY -DllEntryPoint(HINSTANCE hInst __znunused, /* Library instance handle. */ - DWORD reason __znunused, /* Reason this function is being called. */ - LPVOID reserved __znunused) /* Not used. */ +DllEntryPoint(HINSTANCE hInst, /* Library instance handle. */ + DWORD reason, /* Reason this function is being called. */ + LPVOID reserved) /* Not used. */ { return TRUE; } -- cgit v1.1