summaryrefslogtreecommitdiff
path: root/src/HookObj.c
diff options
context:
space:
mode:
authorThomas E. Dickey <dickey@invisible-island.net>2019-07-14 16:15:26 -0400
committerThomas E. Dickey <dickey@invisible-island.net>2019-07-14 16:15:26 -0400
commit4d16315364a0d1fd80a5e71f1dc885fe6674072b (patch)
tree7eaba79752a2674061408a1ac84351e85112c9ae /src/HookObj.c
parent6972afd215dc195e3213864d9b725a48bf766b6d (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>
Diffstat (limited to 'src/HookObj.c')
-rw-r--r--src/HookObj.c112
1 files changed, 59 insertions, 53 deletions
diff --git a/src/HookObj.c b/src/HookObj.c
index de224fa..e172be1 100644
--- a/src/HookObj.c
+++ b/src/HookObj.c
@@ -35,6 +35,7 @@ in this Software without prior written authorization from The Open Group.
*
******************************************************************/
+/* *INDENT-OFF* */
static XtResource resources[] = {
{ XtNcreateHook, XtCCallback, XtRCallback, sizeof(XtPointer),
XtOffsetOf(HookObjRec, hooks.createhook_callbacks),
@@ -56,79 +57,84 @@ static XtResource resources[] = {
{ XtNnumShells, XtCReadOnly, XtRCardinal, sizeof(Cardinal),
XtOffsetOf(HookObjRec, hooks.num_shells), XtRImmediate, (XtPointer) 0 }
};
+/* *INDENT-ON* */
-static void GetValuesHook(Widget widget, ArgList args, Cardinal *num_args);
+static void GetValuesHook(Widget widget, ArgList args, Cardinal * num_args);
static void Initialize(Widget req, Widget new, ArgList args,
- Cardinal *num_args);
+ Cardinal * num_args);
+/* *INDENT-OFF* */
externaldef(hookobjclassrec) HookObjClassRec hookObjClassRec = {
{ /* Object Class Part */
- /* superclass */ (WidgetClass)&objectClassRec,
- /* class_name */ "Hook",
- /* widget_size */ sizeof(HookObjRec),
- /* class_initialize */ NULL,
- /* class_part_initialize*/ NULL,
- /* class_inited */ FALSE,
- /* initialize */ Initialize,
- /* 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 */ NULL,
- /* get_values_hook */ GetValuesHook,
- /* accept_focus */ NULL,
- /* version */ XtVersion,
- /* callback_offsets */ NULL,
- /* tm_table */ NULL,
- /* query_geometry */ NULL,
- /* display_accelerator */ NULL,
- /* extension */ NULL
+ /* superclass */ (WidgetClass)&objectClassRec,
+ /* class_name */ "Hook",
+ /* widget_size */ sizeof(HookObjRec),
+ /* class_initialize */ NULL,
+ /* class_part_initialize */ NULL,
+ /* class_inited */ FALSE,
+ /* initialize */ Initialize,
+ /* 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 */ NULL,
+ /* get_values_hook */ GetValuesHook,
+ /* accept_focus */ NULL,
+ /* version */ XtVersion,
+ /* callback_offsets */ NULL,
+ /* tm_table */ NULL,
+ /* query_geometry */ NULL,
+ /* display_accelerator */ NULL,
+ /* extension */ NULL
},
{ /* HookObj Class Part */
- /* unused */ 0
+ /* unused */ 0
}
};
+/* *INDENT-ON* */
-externaldef(hookObjectClass) WidgetClass hookObjectClass =
- (WidgetClass)&hookObjClassRec;
+externaldef(hookObjectClass)
+WidgetClass hookObjectClass = (WidgetClass) & hookObjClassRec;
-static void FreeShellList(
- Widget w,
- XtPointer closure _X_UNUSED,
- XtPointer call_data _X_UNUSED)
+static void
+FreeShellList(Widget w,
+ XtPointer closure _X_UNUSED,
+ XtPointer call_data _X_UNUSED)
{
- HookObject h = (HookObject)w;
+ HookObject h = (HookObject) w;
+
if (h->hooks.shells != NULL)
- XtFree((char*)h->hooks.shells);
+ XtFree((char *) h->hooks.shells);
}
-static void Initialize(
- Widget req _X_UNUSED,
- Widget new,
- ArgList args _X_UNUSED,
- Cardinal* num_args _X_UNUSED)
+static void
+Initialize(Widget req _X_UNUSED,
+ Widget new,
+ ArgList args _X_UNUSED,
+ Cardinal * num_args _X_UNUSED)
{
HookObject w = (HookObject) new;
+
w->hooks.max_shells = 0;
- XtAddCallback (new, XtNdestroyCallback, FreeShellList, (XtPointer) NULL);
+ XtAddCallback(new, XtNdestroyCallback, FreeShellList, (XtPointer) NULL);
}
-static void GetValuesHook(
- Widget widget _X_UNUSED,
- ArgList args _X_UNUSED,
- Cardinal* num_args _X_UNUSED)
+static void
+GetValuesHook(Widget widget _X_UNUSED,
+ ArgList args _X_UNUSED,
+ Cardinal * num_args _X_UNUSED)
{
/* get the XtNshells and XtNnumShells pseudo-resources */
}