From b7d917281a2bdd51c8816aa89fc76de47d663526 Mon Sep 17 00:00:00 2001 From: "Thomas E. Dickey" Date: Sun, 14 Jul 2019 15:47:30 -0400 Subject: indent'd like "x-indent.sh", but with a more complete set of typedefs - see https://github.com/ThomasDickey/cindent-snapshots/blob/master/scripts/xxx-profile Signed-off-by: Thomas E. Dickey --- src/RectObj.c | 122 ++++++++++++++++++++++++++++------------------------------ 1 file changed, 59 insertions(+), 63 deletions(-) (limited to 'src') diff --git a/src/RectObj.c b/src/RectObj.c index c02cbf0..29ef2ef 100644 --- a/src/RectObj.c +++ b/src/RectObj.c @@ -22,7 +22,6 @@ Except as contained in this notice, the name of The Open Group shall not be used in advertising or otherwise to promote the sale, use or other dealings in this Software without prior written authorization from The Open Group. - Copyright 1987, 1988 by Digital Equipment Corporation, Maynard, Massachusetts. All Rights Reserved @@ -60,6 +59,7 @@ SOFTWARE. static void XtCopyAncestorSensitive(Widget, int, XrmValue *); +/* *INDENT-OFF* */ static XtResource resources[] = { {XtNancestorSensitive, XtCSensitive, XtRBoolean, sizeof(Boolean), @@ -75,99 +75,96 @@ static XtResource resources[] = { XtOffsetOf(RectObjRec,rectangle.height), XtRImmediate, (XtPointer)0}, {XtNborderWidth, XtCBorderWidth, XtRDimension, sizeof(Dimension), XtOffsetOf(RectObjRec,rectangle.border_width), XtRImmediate, - (XtPointer)1}, + (XtPointer)1}, {XtNsensitive, XtCSensitive, XtRBoolean, sizeof(Boolean), XtOffsetOf(RectObjRec,rectangle.sensitive), XtRImmediate, - (XtPointer)True} - }; + (XtPointer)True} +}; +/* *INDENT-ON* */ static void RectClassPartInitialize(WidgetClass); -static void RectSetValuesAlmost(Widget, Widget, XtWidgetGeometry *, XtWidgetGeometry *); +static void RectSetValuesAlmost(Widget, Widget, XtWidgetGeometry *, + XtWidgetGeometry *); +/* *INDENT-OFF* */ externaldef(rectobjclassrec) RectObjClassRec rectObjClassRec = { { - /* superclass */ (WidgetClass)&objectClassRec, - /* class_name */ "Rect", - /* widget_size */ sizeof(RectObjRec), - /* class_initialize */ NULL, - /* class_part_initialize*/ RectClassPartInitialize, - /* class_inited */ FALSE, - /* initialize */ NULL, - /* initialize_hook */ NULL, - /* realize */ NULL, - /* actions */ NULL, - /* num_actions */ 0, - /* resources */ resources, - /* num_resources */ XtNumber(resources), - /* xrm_class */ NULLQUARK, - /* compress_motion */ FALSE, - /* compress_exposure */ TRUE, - /* compress_enterleave*/ FALSE, - /* visible_interest */ FALSE, - /* destroy */ NULL, - /* resize */ NULL, - /* expose */ NULL, - /* set_values */ NULL, - /* set_values_hook */ NULL, - /* set_values_almost */ RectSetValuesAlmost, - /* get_values_hook */ NULL, - /* accept_focus */ NULL, - /* version */ XtVersion, - /* callback_offsets */ NULL, - /* tm_table */ NULL, - /* query_geometry */ NULL, - /* display_accelerator */ NULL, - /* extension */ NULL + /* superclass */ (WidgetClass)&objectClassRec, + /* class_name */ "Rect", + /* widget_size */ sizeof(RectObjRec), + /* class_initialize */ NULL, + /* class_part_initialize */ RectClassPartInitialize, + /* class_inited */ FALSE, + /* initialize */ NULL, + /* initialize_hook */ NULL, + /* realize */ NULL, + /* actions */ NULL, + /* num_actions */ 0, + /* resources */ resources, + /* num_resources */ XtNumber(resources), + /* xrm_class */ NULLQUARK, + /* compress_motion */ FALSE, + /* compress_exposure */ TRUE, + /* compress_enterleave */ FALSE, + /* visible_interest */ FALSE, + /* destroy */ NULL, + /* resize */ NULL, + /* expose */ NULL, + /* set_values */ NULL, + /* set_values_hook */ NULL, + /* set_values_almost */ RectSetValuesAlmost, + /* get_values_hook */ NULL, + /* accept_focus */ NULL, + /* version */ XtVersion, + /* callback_offsets */ NULL, + /* tm_table */ NULL, + /* query_geometry */ NULL, + /* display_accelerator */ NULL, + /* extension */ NULL } }; +/* *INDENT-ON* */ externaldef(rectObjClass) -WidgetClass rectObjClass = (WidgetClass)&rectObjClassRec; +WidgetClass rectObjClass = (WidgetClass) & rectObjClassRec; -/*ARGSUSED*/ -static void XtCopyAncestorSensitive( - Widget widget, - int offset _X_UNUSED, - XrmValue *value) +static void +XtCopyAncestorSensitive(Widget widget, int offset _X_UNUSED, XrmValue *value) { - static Boolean sensitive; + static Boolean sensitive; Widget parent = widget->core.parent; sensitive = (parent->core.ancestor_sensitive & parent->core.sensitive); - value->addr = (XPointer)(&sensitive); + value->addr = (XPointer) (&sensitive); } - /* * Start of rectangle object methods */ - -static void RectClassPartInitialize( - register WidgetClass wc) +static void +RectClassPartInitialize(register WidgetClass wc) { - register RectObjClass roc = (RectObjClass)wc; - register RectObjClass super = ((RectObjClass)roc->rect_class.superclass); + register RectObjClass roc = (RectObjClass) wc; + register RectObjClass super = ((RectObjClass) roc->rect_class.superclass); /* We don't need to check for null super since we'll get to object eventually, and it had better define them! */ - if (roc->rect_class.resize == XtInheritResize) { - roc->rect_class.resize = super->rect_class.resize; + roc->rect_class.resize = super->rect_class.resize; } if (roc->rect_class.expose == XtInheritExpose) { - roc->rect_class.expose = super->rect_class.expose; + roc->rect_class.expose = super->rect_class.expose; } if (roc->rect_class.set_values_almost == XtInheritSetValuesAlmost) { - roc->rect_class.set_values_almost = super->rect_class.set_values_almost; + roc->rect_class.set_values_almost = super->rect_class.set_values_almost; } - if (roc->rect_class.query_geometry == XtInheritQueryGeometry) { - roc->rect_class.query_geometry = super->rect_class.query_geometry; + roc->rect_class.query_geometry = super->rect_class.query_geometry; } } @@ -179,12 +176,11 @@ static void RectClassPartInitialize( * for use by converters during instance resource resolution. */ -/*ARGSUSED*/ -static void RectSetValuesAlmost( - Widget old _X_UNUSED, - Widget new _X_UNUSED, - XtWidgetGeometry *request, - XtWidgetGeometry *reply) +static void +RectSetValuesAlmost(Widget old _X_UNUSED, + Widget new _X_UNUSED, + XtWidgetGeometry * request, + XtWidgetGeometry * reply) { *request = *reply; } -- cgit v1.2.1