summaryrefslogtreecommitdiff
path: root/lib/libXaw/src
diff options
context:
space:
mode:
authorMatthieu Herrb <matthieu@cvs.openbsd.org>2012-06-11 19:16:01 +0000
committerMatthieu Herrb <matthieu@cvs.openbsd.org>2012-06-11 19:16:01 +0000
commitf8f894ec6dea2f382b1f038bd4dfb96d5f9722fd (patch)
treeef1ac96c0e38d8d8625ee895cbc56a2ebbd9f8ca /lib/libXaw/src
parent407c1a914995df8cd71ab6f462934e48ddc4625b (diff)
Update to libXaw 1.0.11.
Diffstat (limited to 'lib/libXaw/src')
-rw-r--r--lib/libXaw/src/Text.c2
-rw-r--r--lib/libXaw/src/TextAction.c9
2 files changed, 6 insertions, 5 deletions
diff --git a/lib/libXaw/src/Text.c b/lib/libXaw/src/Text.c
index 72387e919..a1ae74a6b 100644
--- a/lib/libXaw/src/Text.c
+++ b/lib/libXaw/src/Text.c
@@ -3146,7 +3146,7 @@ _XawTextSetSelection(TextWidget ctx, XawTextPosition l, XawTextPosition r,
if (nelems == 1 && !strcmp (list[0], "none"))
return;
if (nelems == 0) {
- String defaultSel = "PRIMARY";
+ static String defaultSel = "PRIMARY";
list = &defaultSel;
nelems = 1;
}
diff --git a/lib/libXaw/src/TextAction.c b/lib/libXaw/src/TextAction.c
index 6705316d3..7b87ce4b0 100644
--- a/lib/libXaw/src/TextAction.c
+++ b/lib/libXaw/src/TextAction.c
@@ -2278,7 +2278,7 @@ DoFormatText(TextWidget ctx, XawTextPosition left, Bool force, int level,
text.length = bytes;
bytes -= text.length;
if (_XawTextReplace(ctx, tmp, tmp, &text)) {
- XawStackFree(buf, text.ptr);
+ XawStackFree(text.ptr, buf);
return (XawEditError);
}
if (num_pos) {
@@ -2293,7 +2293,7 @@ DoFormatText(TextWidget ctx, XawTextPosition left, Bool force, int level,
}
position += count;
right += count;
- XawStackFree(buf, text.ptr);
+ XawStackFree(text.ptr, buf);
}
break;
}
@@ -3935,6 +3935,8 @@ FormParagraph(Widget w, XEvent *event, String *params, Cardinal *num_params)
}
if (FormRegion(ctx, from, to, pos, src->textSrc.num_text) == XawReplaceError) {
+ XawStackFree(pos, buf);
+ pos = buf;
#else
from = SrcScan(ctx->text.source, ctx->text.insertPos,
XawstParagraph, XawsdLeft, 1, False);
@@ -3943,7 +3945,6 @@ FormParagraph(Widget w, XEvent *event, String *params, Cardinal *num_params)
if (FormRegion(ctx, from, to, pos, 1) == XawReplaceError) {
#endif
- XawStackFree(pos, buf);
XBell(XtDisplay(w), 0);
#ifndef OLDXAW
if (undo) {
@@ -3991,13 +3992,13 @@ FormParagraph(Widget w, XEvent *event, String *params, Cardinal *num_params)
XawsdLeft, 1, False), False);
tw->text.clear_to_eol = True;
}
+ XawStackFree(pos, buf);
#else
ctx->text.old_insert = ctx->text.insertPos = *pos;
_XawTextBuildLineTable(ctx, SrcScan(ctx->text.source, ctx->text.lt.top,
XawstEOL, XawsdLeft, 1, False), False);
ctx->text.clear_to_eol = True;
#endif
- XawStackFree(pos, buf);
ctx->text.showposition = True;
EndAction(ctx);