Mercurial > hg > xemacs-beta
diff src/EmacsShell-sub.c @ 4528:726060ee587c g++-warning-removal-2008-10-28
First draft of g++ 4.3 warning removal patch. Builds. *Needs ChangeLogs.*
author | Stephen J. Turnbull <stephen@xemacs.org> |
---|---|
date | Wed, 29 Oct 2008 04:06:33 +0900 |
parents | fc7067b7f407 |
children | 308d34e9f07d |
line wrap: on
line diff
--- a/src/EmacsShell-sub.c Wed Oct 29 04:02:05 2008 +0900 +++ b/src/EmacsShell-sub.c Wed Oct 29 04:06:33 2008 +0900 @@ -89,6 +89,7 @@ #include <X11/Vendor.h> #include <X11/VendorP.h> #include "EmacsShellP.h" +#include "../lwlib/xt-wrappers.h" #define ABORT abort @@ -134,30 +135,28 @@ static XtResource resources[] = { #define offset(field) XtOffset(EMACS_SHELL_WIDGET, emacs_shell.field) #define coreoffset(field) XtOffset(EMACS_SHELL_WIDGET, core.field) +#define res(name,_class,member,size) \ + { (String) name, (String) _class, XtRInt, sizeof (int), \ + offset (member), XtRImmediate, (XtPointer)0 } +#define motifres(name,member) \ + { (String) name, XtCPosition, XtRPosition, sizeof (Position), \ + coreoffset (member), XtRImmediate, (XtPointer)BIGSIZE } #ifdef LWLIB_USES_MOTIF /* *** BOGOSITY^10! *** The Motif VendorShell fucks around with the default values for X and Y, for no obvious reason. This causes Shell to indicate that the defaults of (0,0) were program-specified, instead of letting the WM do what it wants. */ - { XtNx, XtCPosition, - XtRPosition, sizeof (Position), - coreoffset (x), XtRImmediate, (XtPointer)BIGSIZE }, - { XtNy, XtCPosition, - XtRPosition, sizeof (Position), - coreoffset (y), XtRImmediate, (XtPointer)BIGSIZE }, + motifres (XtNx, x), + motifres (XtNy, y), #endif - { XtNwidthCells, XtCWidthCells, - XtRInt, sizeof (int), - offset (width_cells), XtRImmediate, (XtPointer)0 }, - { XtNheightCells, XtCHeightCells, - XtRInt, sizeof (int), - offset (height_cells), XtRImmediate, (XtPointer)0 }, - { XtNminWidthCells, XtCMinWidthCells, - XtRInt, sizeof (int), - offset (min_width_cells), XtRImmediate, (XtPointer)0 }, - { XtNminHeightCells, XtCMinHeightCells, - XtRInt, sizeof (int), - offset (min_height_cells), XtRImmediate, (XtPointer)0 }, + res (XtNwidthCells, XtCWidthCells, width_cells, 0), + res (XtNheightCells, XtCHeightCells, height_cells, 0), + res (XtNminWidthCells, XtCMinWidthCells, min_width_cells, 0), + res (XtNminHeightCells, XtCMinHeightCells, min_height_cells, 0), +#undef offset +#undef coreoffset +#undef res +#undef motifres }; static CompositeClassExtensionRec compositeClassExtRec = { @@ -259,12 +258,12 @@ printf (" base size set to: %d %d\n", base_width, base_height); fflush (stdout); #endif - XtSetArg(al [0], XtNbaseWidth, base_width); - XtSetArg(al [1], XtNbaseHeight, base_height); - XtSetArg(al [2], XtNminWidth, base_width + - cell_width * w->emacs_shell.min_width_cells); - XtSetArg(al [3], XtNminHeight, base_height + - cell_height * w->emacs_shell.min_height_cells); + Xt_SET_ARG(al [0], XtNbaseWidth, base_width); + Xt_SET_ARG(al [1], XtNbaseHeight, base_height); + Xt_SET_ARG(al [2], XtNminWidth, base_width + + cell_width * w->emacs_shell.min_width_cells); + Xt_SET_ARG(al [3], XtNminHeight, base_height + + cell_height * w->emacs_shell.min_height_cells); XtSetValues ((Widget) w, al, 4); }