diff options
Diffstat (limited to 'xfontsel.c')
-rw-r--r-- | xfontsel.c | 21 |
1 files changed, 11 insertions, 10 deletions
@@ -95,8 +95,8 @@ static struct _appRes { int app_defaults_version; Cursor cursor; String pattern; - String pixelSizeList; - String pointSizeList; + char *pixelSizeList; + char *pointSizeList; Boolean print_on_quit; String sample_text; String sample_text16; @@ -237,7 +237,7 @@ static Widget ownButton; static Widget fieldBox; static Widget countLabel; static Widget currentFontName; -static String currentFontNameString; +static char *currentFontNameString; static int currentFontNameSize; static Widget sampleText; static int textEncoding = -1; @@ -323,7 +323,7 @@ see 'xfontsel' manual page." Arg args[1]; currentFontNameSize = strlen(AppRes.pattern); if (currentFontNameSize < 128) currentFontNameSize = 128; - currentFontNameString = (String)XtMalloc(currentFontNameSize); + currentFontNameString = XtMalloc(currentFontNameSize); strcpy(currentFontNameString, AppRes.pattern); XtSetArg(args[0], XtNlabel, currentFontNameString); currentFontName = @@ -444,7 +444,7 @@ void GetFontNames(XtPointer closure) Display *dpy = (Display*)closure; ParseRec *parseRec; int f, field, count; - String *fontNames; + char **fontNames; Boolean *b; int work_priority = 0; @@ -574,9 +574,10 @@ void ParseFontNames(XtPointer closure) if (len == 0) v->string = NULL; else { - v->string = (String)XtMalloc( len+1 ); - strncpy( v->string, fieldP, len ); - v->string[len] = '\0'; + char *s = XtMalloc(len + 1); + strncpy( s, fieldP, len ); + s[len] = '\0'; + v->string = (String) s; } v->font = (int*)XtMalloc( 10*sizeof(int) ); v->allocated = 10; @@ -1088,7 +1089,7 @@ void SetCurrentFont(XtPointer closure) len = 1; } if (len+1 > --bytesLeft) { - currentFontNameString = (String) + currentFontNameString = XtRealloc(currentFontNameString, currentFontNameSize+=128); bytesLeft += 128; } @@ -1284,7 +1285,7 @@ void EnableOtherValues(Widget w, XtPointer closure, XtPointer callData) if (scaledFonts) { /* Check for 2 out of 3 scalable y fields being set */ - char *str; + const char *str; Bool specificPxl, specificPt, specificY; f = currentFont.value_index[6]; |