X-Git-Url: https://git.exim.org/exim.git/blobdiff_plain/4fab92fbc2b63bac2d89c1dae69fa1845cb640b7..a85c067ba6c6940512cf57ec213277a370d87e70:/src/exim_monitor/em_TextPop.c diff --git a/src/exim_monitor/em_TextPop.c b/src/exim_monitor/em_TextPop.c index 03f97da52..0e87cb580 100644 --- a/src/exim_monitor/em_TextPop.c +++ b/src/exim_monitor/em_TextPop.c @@ -1,6 +1,8 @@ /*********************************************************** +Copyright (c) The Exim Maintainers 2022 Copyright 1989 by the Massachusetts Institute of Technology, Cambridge, Massachusetts. +SPDX-License-Identifier: GPL-2.0-only All Rights Reserved @@ -47,7 +49,7 @@ SOFTWARE. * used by all more than one of these dialogs. * * The following functions are the only non-static ones defined - * in this module. They are located at the begining of the + * in this module. They are located at the beginning of the * section that contains this dialog box that uses them. * * void _XawTextInsertFileAction(w, event, params, num_params); @@ -127,7 +129,7 @@ static char search_text_trans[] = * * Note: * - * If the search was sucessful and the argument popdown is passed to + * If the search was successful and the argument popdown is passed to * this action routine then the widget will automatically popdown the * search widget. */ @@ -171,7 +173,7 @@ Cardinal * num_params; PopdownSearch(w, (XtPointer) tw->text.search, NULL); } -/* Function Name: PopdownSeach +/* Function Name: PopdownSearch * Description: Pops down the search widget and resets it. * Arguments: w - *** NOT USED ***. * closure - a pointer to the search structure. @@ -223,7 +225,7 @@ XtPointer call_data; * The parameter list contains one or two entries that may be the following. * * First Entry: The first entry is the direction to search by default. - * This arguement must be specified and may have a value of + * This argument must be specified and may have a value of * "left" or "right". * * Second Entry: This entry is optional and contains the value of the default @@ -246,7 +248,7 @@ Cardinal * num_params; Arg args[1]; #ifdef notdef - if (ctx->text.source->Search == NULL) { + if (!ctx->text.source->Search) { XBell(XtDisplay(w), 0); return; } @@ -279,16 +281,15 @@ Cardinal * num_params; return; } - if (ctx->text.search== NULL) { + if (!ctx->text.search) { ctx->text.search = XtNew(struct SearchAndReplace); ctx->text.search->search_popup = CreateDialog(w, ptr, "search", AddSearchChildren); XtRealizeWidget(ctx->text.search->search_popup); SetWMProtocolTranslations(ctx->text.search->search_popup); } - else if (*num_params > 1) { + else if (*num_params > 1) XtVaSetValues(ctx->text.search->search_text, XtNstring, ptr, NULL); - } XtSetArg(args[0], XtNeditType,&edit_mode); XtGetValues(ctx->text.source, args, ONE); @@ -448,8 +449,8 @@ char * ptr; /* Function Name: DoSearch * Description: Performs a search. - * Arguments: search - the serach structure. - * Returns: TRUE if sucessful. + * Arguments: search - the search structure. + * Returns: TRUE if successful. */ /* ARGSUSED */ @@ -628,7 +629,7 @@ XEvent *event; * * NOTE: * - * The function argument is passed the following arguements. + * The function argument is passed the following arguments. * * form - the from widget that is the dialog. * ptr - the initial string for the dialog's text widget.