diff options
author | Thomas E. Dickey <dickey@invisible-island.net> | 2019-07-14 15:24:30 -0400 |
---|---|---|
committer | Thomas E. Dickey <dickey@invisible-island.net> | 2019-07-14 15:24:30 -0400 |
commit | 10c7594030e6be7c731c44b17102b33bef91b12b (patch) | |
tree | b63b63e9af1e76a6fc27c2cb6c201f6c504e7d43 | |
parent | 02b712159a2e7152669fd6d2a315e6f7690bb2d7 (diff) |
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 <dickey@invisible-island.net>
-rw-r--r-- | src/SetSens.c | 53 |
1 files changed, 26 insertions, 27 deletions
diff --git a/src/SetSens.c b/src/SetSens.c index 04d3f3a..2778dba 100644 --- a/src/SetSens.c +++ b/src/SetSens.c @@ -75,16 +75,16 @@ in this Software without prior written authorization from The Open Group. #include "StringDefs.h" /* - * XtSetSensitive() + * XtSetSensitive() */ -static void SetAncestorSensitive( - register Widget widget, - Boolean ancestor_sensitive) +static void +SetAncestorSensitive(register Widget widget, Boolean ancestor_sensitive) { Arg args[1]; - if (widget->core.ancestor_sensitive == ancestor_sensitive) return; + if (widget->core.ancestor_sensitive == ancestor_sensitive) + return; XtSetArg(args[0], XtNancestorSensitive, ancestor_sensitive); XtSetValues(widget, args, XtNumber(args)); @@ -94,28 +94,27 @@ static void SetAncestorSensitive( ancestor_sensitive is already FALSE */ if (widget->core.sensitive && XtIsComposite(widget)) { - Cardinal i; - WidgetList children; + Cardinal i; + WidgetList children; - children = ((CompositeWidget) widget)->composite.children; - for (i=0; i < ((CompositeWidget)widget)->composite.num_children; i++) { - SetAncestorSensitive (children[i], ancestor_sensitive); - } + children = ((CompositeWidget) widget)->composite.children; + for (i = 0; i < ((CompositeWidget) widget)->composite.num_children; i++) { + SetAncestorSensitive(children[i], ancestor_sensitive); + } } -} /* SetAncestorSensitive */ +} /* SetAncestorSensitive */ - -void XtSetSensitive( - register Widget widget, - _XtBoolean sensitive) +void +XtSetSensitive(register Widget widget, _XtBoolean sensitive) { - Arg args[1]; + Arg args[1]; + WIDGET_TO_APPCON(widget); LOCK_APP(app); if (widget->core.sensitive == sensitive) { - UNLOCK_APP(app); - return; + UNLOCK_APP(app); + return; } XtSetArg(args[0], XtNsensitive, sensitive); @@ -125,14 +124,14 @@ void XtSetSensitive( children's ancestor_sensitive; else do nothing as children's ancestor_sensitive is already FALSE */ - if (widget->core.ancestor_sensitive && XtIsComposite (widget)) { - Cardinal i; - WidgetList children; + if (widget->core.ancestor_sensitive && XtIsComposite(widget)) { + Cardinal i; + WidgetList children; - children = ((CompositeWidget) widget)->composite.children; - for (i = 0; i < ((CompositeWidget)widget)->composite.num_children; i++){ - SetAncestorSensitive (children[i], (Boolean) sensitive); - } + children = ((CompositeWidget) widget)->composite.children; + for (i = 0; i < ((CompositeWidget) widget)->composite.num_children; i++) { + SetAncestorSensitive(children[i], (Boolean) sensitive); + } } UNLOCK_APP(app); -} /* XtSetSensitive */ +} /* XtSetSensitive */ |