summaryrefslogtreecommitdiff
path: root/src/TextAction.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/TextAction.c')
-rw-r--r--src/TextAction.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/src/TextAction.c b/src/TextAction.c
index 88febd8..c3c70f6 100644
--- a/src/TextAction.c
+++ b/src/TextAction.c
@@ -421,7 +421,7 @@ _SelectionReceived(Widget w, XtPointer client_data, Atom *selection _X_UNUSED,
fprintf(stderr, "Xaw Text Widget: An attempt was made to insert "
"an illegal selection.\n");
- textprop.value = (const unsigned char *)" >> ILLEGAL SELECTION << ";
+ textprop.value = (unsigned char *)" >> ILLEGAL SELECTION << ";
textprop.nitems = strlen((char *) textprop.value);
if (XwcTextPropertyToTextList(d, &textprop, &wlist, &count)
!= Success
@@ -1334,7 +1334,7 @@ _DeleteOrKill(TextWidget ctx, XawTextPosition from, XawTextPosition to,
text.firstPos = 0;
text.format = (unsigned long)_XawTextFormat(ctx);
- text.ptr = "";
+ text.ptr = (char*)"";
if (_XawTextReplace(ctx, from, to, &text)) {
XBell(XtDisplay(ctx), 50);
@@ -1604,7 +1604,7 @@ StripSpaces(TextWidget ctx, XawTextPosition left, XawTextPosition right,
text.firstPos = 0;
text.format = XawFmt8Bit;
- text.ptr = " ";
+ text.ptr = (char*)" ";
text.length = 1;
position = XawTextSourceRead(ctx->text.source, position,
@@ -1641,7 +1641,7 @@ StripSpaces(TextWidget ctx, XawTextPosition left, XawTextPosition right,
done = True;
}
- text.ptr = "";
+ text.ptr = (char*)"";
text.length = 0;
position = tmp = left;
position = XawTextSourceRead(ctx->text.source, position,
@@ -1721,7 +1721,7 @@ Tabify(TextWidget ctx, XawTextPosition left, XawTextPosition right,
int tab_index = 0, tab_column = 0, TAB_SIZE = DEFAULT_TAB_SIZE;
text.firstPos = 0;
- text.ptr = "\t";
+ text.ptr = (char*)"\t";
text.format = XawFmt8Bit;
text.length = 1;
@@ -1863,7 +1863,7 @@ Untabify(TextWidget ctx, XawTextPosition left, XawTextPosition right,
short *char_tabs = sink->text_sink.char_tabs;
int tab_count = sink->text_sink.tab_count;
int tab_index = 0, tab_column = 0, tab_base = 0;
- static char *tabs = " ";
+ static char *tabs = (char*)" ";
text.firstPos = 0;
text.format = XawFmt8Bit;
@@ -2186,7 +2186,7 @@ DoFormatText(TextWidget ctx, XawTextPosition left, Bool force, int level,
position = tmp;
if (position > left && position - left > ctx->text.left_column
&& position != right) {
- text.ptr = "\n";
+ text.ptr = (char*)"\n";
text.length = 1;
CHECK_SAVE();
if (_XawTextReplace(ctx, position, position + 1, &text))
@@ -2336,7 +2336,7 @@ Indent(Widget w, XEvent *event, String *params _X_UNUSED, Cardinal *num_params _
text.firstPos = 0;
text.format = XawFmt8Bit;
- text.ptr = "";
+ text.ptr = (char*)"";
StartAction(ctx, event);
@@ -3027,7 +3027,7 @@ AutoFill(TextWidget ctx)
return;
text.format = XawFmt8Bit;
- text.ptr = "\n";
+ text.ptr = (char*)"\n";
}
text.length = 1;
text.firstPos = 0;
@@ -3377,7 +3377,7 @@ DisplayCaret(Widget w, XEvent *event, String *params, Cardinal *num_params)
if (*num_params > 0) { /* default arg is "True" */
XrmValue from, to;
- from.size = (unsigned)strlen(from.addr = params[0]);
+ from.size = (unsigned)strlen(from.addr = (char*)params[0]);
XtConvert(w, XtRString, &from, XtRBoolean, &to);
if (to.addr != NULL)
@@ -3538,7 +3538,7 @@ StripOutOldCRs(TextWidget ctx, XawTextPosition from, XawTextPosition to,
text.firstPos = 0;
text.format = (unsigned long)_XawTextFormat(ctx);
if (text.format == XawFmt8Bit)
- text.ptr= " ";
+ text.ptr= (char*)" ";
else {
wc_two_spaces[0] = _Xaw_atowc(XawSP);
wc_two_spaces[1] = _Xaw_atowc(XawSP);
@@ -3646,7 +3646,7 @@ InsertNewCRs(TextWidget ctx, XawTextPosition from, XawTextPosition to,
text.format = (unsigned long)_XawTextFormat(ctx);
if (text.format == XawFmt8Bit)
- text.ptr = "\n";
+ text.ptr = (char*)"\n";
else {
wide_CR[0] = _Xaw_atowc(XawLF);
wide_CR[1] = 0;