diff options
author | patthoyts <patthoyts@users.sourceforge.net> | 2008-11-03 11:09:34 (GMT) |
---|---|---|
committer | patthoyts <patthoyts@users.sourceforge.net> | 2008-11-03 11:09:34 (GMT) |
commit | 8cf11854f1c55ec1026a5bddb868f6072dbf1a45 (patch) | |
tree | fccddbc3f0588e4f90f8c7571ee9c2be84e57217 /win | |
parent | 10ad3b7e6d4aa2d3a8be587ed4781c10ca4bd127 (diff) | |
download | tk-8cf11854f1c55ec1026a5bddb868f6072dbf1a45.zip tk-8cf11854f1c55ec1026a5bddb868f6072dbf1a45.tar.gz tk-8cf11854f1c55ec1026a5bddb868f6072dbf1a45.tar.bz2 |
const fixes for windows code
Diffstat (limited to 'win')
-rw-r--r-- | win/tkWinFont.c | 28 |
1 files changed, 15 insertions, 13 deletions
diff --git a/win/tkWinFont.c b/win/tkWinFont.c index a2eae27..c7d8d89 100644 --- a/win/tkWinFont.c +++ b/win/tkWinFont.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: tkWinFont.c,v 1.41 2008/10/18 11:31:29 patthoyts Exp $ + * RCS: @(#) $Id: tkWinFont.c,v 1.42 2008/11/03 11:09:35 patthoyts Exp $ */ #include "tkWinInt.h" @@ -191,13 +191,14 @@ static Tcl_Encoding systemEncoding; static FontFamily * AllocFontFamily(HDC hdc, HFONT hFont, int base); static SubFont * CanUseFallback(HDC hdc, WinFont *fontPtr, - char *fallbackName, int ch, + const char *fallbackName, int ch, SubFont **subFontPtrPtr); static SubFont * CanUseFallbackWithAliases(HDC hdc, WinFont *fontPtr, - char *faceName, int ch, Tcl_DString *nameTriedPtr, + const char *faceName, int ch, + Tcl_DString *nameTriedPtr, SubFont **subFontPtrPtr); static int FamilyExists(HDC hdc, const char *faceName); -static char * FamilyOrAliasExists(HDC hdc, const char *faceName); +static const char * FamilyOrAliasExists(HDC hdc, const char *faceName); static SubFont * FindSubFontForChar(WinFont *fontPtr, int ch, SubFont **subFontPtrPtr); static void FontMapInsert(SubFont *subFontPtr, int ch); @@ -500,7 +501,7 @@ TkpGetFontFromAttributes( HFONT hFont; Window window; WinFont *fontPtr; - char ***fontFallbacks; + const char *const *const *fontFallbacks; Tk_Uid faceName, fallback, actualName; tkwin = (Tk_Window) ((TkWindow *) tkwin)->mainPtr->winPtr; @@ -1758,9 +1759,10 @@ FindSubFontForChar( HDC hdc; int i, j, k; CanUse canUse; - char **aliases, **anyFallbacks; - char ***fontFallbacks; - char *fallbackName; + const char *const *aliases; + const char *const *anyFallbacks; + const char *const *const *fontFallbacks; + const char *fallbackName; SubFont *subFontPtr; Tcl_DString ds; @@ -2103,7 +2105,7 @@ CanUseFallbackWithAliases( HDC hdc, /* HDC in which font can be selected. */ WinFont *fontPtr, /* The font object that will own the new * screen font. */ - char *faceName, /* Desired face name for new screen font. */ + const char *faceName, /* Desired face name for new screen font. */ int ch, /* The Unicode character that the new screen * font must be able to display. */ Tcl_DString *nameTriedPtr, /* Records face names that have already been @@ -2114,7 +2116,7 @@ CanUseFallbackWithAliases( * array of subfonts. */ { int i; - char **aliases; + const char *const *aliases; SubFont *subFontPtr; if (SeenName(faceName, nameTriedPtr) == 0) { @@ -2206,7 +2208,7 @@ CanUseFallback( HDC hdc, /* HDC in which font can be selected. */ WinFont *fontPtr, /* The font object that will own the new * screen font. */ - char *faceName, /* Desired face name for new screen font. */ + const char *faceName, /* Desired face name for new screen font. */ int ch, /* The Unicode character that the new screen * font must be able to display. */ SubFont **subFontPtrPtr) /* Variable to fix-up if we realloc the array @@ -2413,12 +2415,12 @@ FamilyExists( return (result == 0); } -static char * +static const char * FamilyOrAliasExists( HDC hdc, const char *faceName) { - char **aliases; + const char *const *aliases; int i; if (FamilyExists(hdc, faceName) != 0) { |