summaryrefslogtreecommitdiff
path: root/ULabel.c
diff options
context:
space:
mode:
Diffstat (limited to 'ULabel.c')
-rw-r--r--ULabel.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/ULabel.c b/ULabel.c
index bac4992..f7d7a38 100644
--- a/ULabel.c
+++ b/ULabel.c
@@ -177,9 +177,9 @@ static XChar2b *buf2b;
static int buf2blen = 0;
static void _XawLabelDrawUCS(Display *dpy, Drawable d, GC gc,
- int x, int y, char *str, int n)
+ int x, int y, const char *str, int n)
{
- char *ep;
+ const char *ep;
unsigned short codepoint;
XChar2b *ptr;
@@ -214,11 +214,11 @@ static void _XawLabelDrawUCS(Display *dpy, Drawable d, GC gc,
static int _XawLabelWidthUCS(
XFontStruct *fs,
- char *str,
+ const char *str,
int n
)
{
- char *ep;
+ const char *ep;
unsigned short codepoint;
XChar2b *ptr;
@@ -287,7 +287,7 @@ static void SetTextWidthAndHeight(UCSLabelWidget lw)
lw->label.label_width = 0;
}
else if ((nl = index(lw->label.label, '\n')) != NULL) {
- char *label;
+ const char *label;
lw->label.label_len = MULTI_LINE_LABEL;
lw->label.label_width = 0;
for (label = lw->label.label; nl != NULL; nl = index(label, '\n')) {
@@ -320,7 +320,7 @@ static void SetTextWidthAndHeight(UCSLabelWidget lw)
lw->label.label_width = 0;
}
else if ((nl = index(lw->label.label, '\n')) != NULL) {
- char *label;
+ const char *label;
lw->label.label_len = MULTI_LINE_LABEL;
lw->label.label_width = 0;
for (label = lw->label.label; nl != NULL; nl = index(label, '\n')) {
@@ -520,7 +520,7 @@ static void Redisplay(Widget gw, XEvent *event, Region region)
if (w->label.pixmap == None) {
int len = w->label.label_len;
- char *label = w->label.label;
+ const char *label = w->label.label;
Position y = w->label.label_y + w->label.font->max_bounds.ascent;
Position ksy = w->label.label_y;
@@ -756,7 +756,7 @@ static void Destroy(Widget w)
UCSLabelWidget lw = (UCSLabelWidget)w;
if ( lw->label.label != lw->core.name )
- XtFree( lw->label.label );
+ XtFree( (char *) lw->label.label );
XtReleaseGC( w, lw->label.normal_GC );
XtReleaseGC( w, lw->label.gray_GC);
XmuReleaseStippledPixmap( XtScreen(w), lw->label.stipple );