diff options
Diffstat (limited to 'unix')
-rw-r--r-- | unix/tkUnixRFont.c | 27 | ||||
-rw-r--r-- | unix/tkUnixSend.c | 14 |
2 files changed, 22 insertions, 19 deletions
diff --git a/unix/tkUnixRFont.c b/unix/tkUnixRFont.c index 96097fa..04f54de 100644 --- a/unix/tkUnixRFont.c +++ b/unix/tkUnixRFont.c @@ -8,7 +8,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tkUnixRFont.c,v 1.16 2007/02/27 13:59:53 dkf Exp $ + * RCS: @(#) $Id: tkUnixRFont.c,v 1.17 2007/05/03 15:21:32 dkf Exp $ */ #include "tkUnixInt.h" @@ -119,7 +119,7 @@ InitFont( { TkFontAttributes *faPtr; TkFontMetrics *fmPtr; - char *family; + char *family, **familyPtr = &family; int weight, slant, spacing, i; double size; FcFontSet *set; @@ -183,7 +183,7 @@ InitFont( */ if (XftPatternGetString(ftFont->pattern, XFT_FAMILY, 0, - &family) != XftResultMatch) { + familyPtr) != XftResultMatch) { family = "Unknown"; } @@ -399,7 +399,7 @@ TkpGetFontFamilies( Tcl_Obj *resultPtr, *strPtr; XftFontSet *list; int i; - char *family; + char *family, **familyPtr = &family; resultPtr = Tcl_NewListObj(0, NULL); @@ -407,7 +407,7 @@ TkpGetFontFamilies( XFT_FAMILY, 0); for (i = 0; i < list->nfont; i++) { if (XftPatternGetString(list->fonts[i], XFT_FAMILY, 0, - &family) == XftResultMatch) { + familyPtr) == XftResultMatch) { strPtr = Tcl_NewStringObj(Tk_GetUid(family), -1); Tcl_ListObjAppendElement(NULL, resultPtr, strPtr); } @@ -438,7 +438,9 @@ TkpGetSubFonts( Tcl_Obj *objv[3], *listPtr, *resultPtr; UnixFtFont *fontPtr = (UnixFtFont *) tkfont; FcPattern *pattern; - char *family, *foundry, *encoding; + char *family, **familyPtr = &family; + char *foundry, **foundryPtr = &foundry; + char *encoding, **encodingPtr = &encoding; int i; resultPtr = Tcl_NewListObj(0, NULL); @@ -448,15 +450,15 @@ TkpGetSubFonts( fontPtr->faces[i].source); if (XftPatternGetString(pattern, XFT_FAMILY, 0, - &family) != XftResultMatch) { + familyPtr) != XftResultMatch) { family = "Unknown"; } if (XftPatternGetString(pattern, XFT_FOUNDRY, 0, - &foundry) != XftResultMatch) { + foundryPtr) != XftResultMatch) { foundry = "Unknown"; } if (XftPatternGetString(pattern, XFT_ENCODING, 0, - &encoding) != XftResultMatch) { + encodingPtr) != XftResultMatch) { encoding = "Unknown"; } objv[0] = Tcl_NewStringObj(family, -1); @@ -473,8 +475,8 @@ TkpGetSubFonts( * * TkpGetFontAttrsForChar -- * - * Retrieve the font attributes of the actual font used to render - * a given character. + * Retrieve the font attributes of the actual font used to render a given + * character. * * Results: * None. @@ -499,12 +501,13 @@ TkpGetFontAttrsForChar( XftFont *xftFontPtr = GetFont(fontPtr, ucs4); /* Actual font used to render the character */ const char *family; /* Font family name */ + const char **familyPtr = &family; double size; /* Font size */ int weight; /* Font weight */ int slant; /* Font slant */ if (XftPatternGetString(xftFontPtr->pattern, XFT_FAMILY, 0, - &family) != XftResultMatch) { + familyPtr) != XftResultMatch) { family = "Unknown"; } if (XftPatternGetDouble(xftFontPtr->pattern, XFT_SIZE, 0, diff --git a/unix/tkUnixSend.c b/unix/tkUnixSend.c index 17d1288..b348ab8 100644 --- a/unix/tkUnixSend.c +++ b/unix/tkUnixSend.c @@ -11,7 +11,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tkUnixSend.c,v 1.16 2007/02/27 14:52:57 dkf Exp $ + * RCS: @(#) $Id: tkUnixSend.c,v 1.17 2007/05/03 15:21:32 dkf Exp $ */ #include "tkPort.h" @@ -586,7 +586,7 @@ ValidateName( int result, actualFormat, argc, i; unsigned long length, bytesAfter; Atom actualType; - char *property; + char *property, **propertyPtr = &property; Tk_ErrorHandler handler; CONST char **argv; @@ -602,7 +602,7 @@ ValidateName( result = XGetWindowProperty(dispPtr->display, commWindow, dispPtr->appNameProperty, 0, MAX_PROP_WORDS, False, XA_STRING, &actualType, &actualFormat, - &length, &bytesAfter, (unsigned char **) &property); + &length, &bytesAfter, (unsigned char **) propertyPtr); if ((result == Success) && (actualType == None)) { XWindowAttributes atts; @@ -1340,7 +1340,7 @@ SendEventProc( XEvent *eventPtr) /* Information about event. */ { TkDisplay *dispPtr = (TkDisplay *) clientData; - char *propInfo; + char *propInfo, **propInfoPtr = &propInfo; register char *p; int result, actualFormat; unsigned long numItems, bytesAfter; @@ -1362,7 +1362,7 @@ SendEventProc( result = XGetWindowProperty(dispPtr->display, Tk_WindowId(dispPtr->commTkwin), dispPtr->commProperty, 0, MAX_PROP_WORDS, True, XA_STRING, &actualType, &actualFormat, - &numItems, &bytesAfter, (unsigned char **) &propInfo); + &numItems, &bytesAfter, (unsigned char **) propInfoPtr); /* * If the property doesn't exist or is improperly formed then ignore it. @@ -1903,7 +1903,7 @@ TkpTestsendCmd( int result, actualFormat; unsigned long length, bytesAfter; Atom actualType, propName; - char *property, *p, *end; + char *property, **propertyPtr = &property, *p, *end; Window w; if ((argc != 4) && (argc != 5)) { @@ -1923,7 +1923,7 @@ TkpTestsendCmd( property = NULL; result = XGetWindowProperty(winPtr->dispPtr->display, w, propName, 0, 100000, False, XA_STRING, &actualType, &actualFormat, - &length, &bytesAfter, (unsigned char **) &property); + &length, &bytesAfter, (unsigned char **) propertyPtr); if ((result == Success) && (actualType != None) && (actualFormat == 8) && (actualType == XA_STRING)) { for (p = property; (unsigned long)(p-property) < length; p++) { |