diff options
author | marha <marha@users.sourceforge.net> | 2012-04-10 15:05:45 +0200 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2012-04-10 15:05:45 +0200 |
commit | 4b35ef19b76849cbd854c3b6f92bbc1c2d50f2d8 (patch) | |
tree | 3ddf28be6916dd5ea27837431b5be8c94017cd9a /libXaw/src/TextAction.c | |
parent | 5564e91e3cf4ba5cb2fbebbc2d63d18f588016b8 (diff) | |
parent | 5f8448ef6b85a9ff72c5af4cec99183c8bb60dc6 (diff) | |
download | vcxsrv-4b35ef19b76849cbd854c3b6f92bbc1c2d50f2d8.tar.gz vcxsrv-4b35ef19b76849cbd854c3b6f92bbc1c2d50f2d8.tar.bz2 vcxsrv-4b35ef19b76849cbd854c3b6f92bbc1c2d50f2d8.zip |
Merge remote-tracking branch 'origin/released'
Diffstat (limited to 'libXaw/src/TextAction.c')
-rw-r--r-- | libXaw/src/TextAction.c | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/libXaw/src/TextAction.c b/libXaw/src/TextAction.c index 1e3d07bac..772f08d12 100644 --- a/libXaw/src/TextAction.c +++ b/libXaw/src/TextAction.c @@ -40,7 +40,6 @@ in this Software without prior written authorization from The Open Group. #include <X11/Xmu/Atoms.h> #include <X11/Xmu/Misc.h> #include <X11/Xmu/StdSel.h> -#include <X11/Xmu/SysUtil.h> #include <X11/Xaw/MultiSinkP.h> #include <X11/Xaw/MultiSrcP.h> #include <X11/Xaw/TextP.h> @@ -1133,7 +1132,7 @@ ConvertSelection(Widget w, Atom *selection, Atom *target, Atom *type, if (XmuConvertStandardSelection(w, ctx->text.time, selection, target, type, (XPointer *)value, length, format)) return (True); - + return (False); } @@ -1374,7 +1373,7 @@ DeleteOrKill(TextWidget ctx, XEvent *event, XawTextScanDirection dir, from = to; to = ctx->text.insertPos; } - else + else from = ctx->text.insertPos; _DeleteOrKill(ctx, from, to, kill); @@ -2711,7 +2710,7 @@ SelectAdjust(Widget w, XEvent *event, String *params, Cardinal *num_params) #ifndef OLDXAW if (ctx->text.selection_state) #endif - ModifySelection(ctx, event, + ModifySelection(ctx, event, XawsmTextSelect, XawactionAdjust, params, num_params); } @@ -3218,8 +3217,8 @@ InsertChar(Widget w, XEvent *event, String *p, Cardinal *n) static char * IfHexConvertHexElseReturnParam(char *param, int *len_return) { - char *p; /* steps through param char by char */ - char c; /* holds the character pointed to by p */ + char *p; /* steps through param char by char */ + char c; /* holds the character pointed to by p */ int ind; /* steps through hexval buffer char by char */ static char hexval[XawTextActionMaxHexChars]; Boolean first_digit; @@ -3351,7 +3350,7 @@ InsertString(Widget w, XEvent *event, String *params, Cardinal *num_params) } /* DisplayCaret() - action - * + * * The parameter list should contain one boolean value. If the * argument is true, the cursor will be displayed. If false, not. * @@ -3403,9 +3402,10 @@ Numeric(Widget w, XEvent *event, String *params, Cardinal *num_params) InsertChar(w, event, params, num_params); return; } - XmuSnprintf(err_buf, sizeof(err_buf), - "numeric: Invalid argument%s'%s'", - *num_params ? ", " : "", *num_params ? params[0] : ""); + snprintf(err_buf, sizeof(err_buf), + "numeric: Invalid argument%s'%s'", + *num_params ? ", " : "", + *num_params ? params[0] : ""); XtAppWarning(XtWidgetToApplicationContext(w), err_buf); ctx->text.numeric = False; ctx->text.mult = 1; @@ -3491,7 +3491,7 @@ Multiply(Widget w, XEvent *event, String *params, Cardinal *num_params) #ifndef OLDXAW if (params[0][0] == 's' || params[0][0] == 'S') { ctx->text.numeric = True; - ctx->text.mult = 0; + ctx->text.mult = 0; return; } else @@ -3499,9 +3499,9 @@ Multiply(Widget w, XEvent *event, String *params, Cardinal *num_params) if ((mult = atoi(params[0])) == 0) { char buf[BUFSIZ]; - XmuSnprintf(buf, sizeof(buf), - "%s %s", "Xaw Text Widget: multiply() argument", - "must be a number greater than zero, or 'Reset'."); + snprintf(buf, sizeof(buf), + "Xaw Text Widget: multiply() argument " + "must be a number greater than zero, or 'Reset'."); XtAppError(XtWidgetToApplicationContext(w), buf); XBell(XtDisplay(w), 50); return; @@ -3586,14 +3586,14 @@ StripOutOldCRs(TextWidget ctx, XawTextPosition from, XawTextPosition to, /* * Remove all extra spaces. */ - for (i = 1 ; i < len; i++) + for (i = 1 ; i < len; i++) if (text.format == XawFmtWide) { if (!iswspace(((wchar_t*)buf)[i]) || ((periodPos + i) >= to)) break; } else if (!isspace(buf[i]) || (periodPos + i) >= to) break; - + XtFree(buf); to -= (i - text.length - 1); @@ -3671,7 +3671,7 @@ InsertNewCRs(TextWidget ctx, XawTextPosition from, XawTextPosition to, XawsdRight,1, True); startPos = endPos = eol; - if (eol == space) + if (eol == space) return; len = (int)(space - eol); |