diff options
author | dkf <donal.k.fellows@manchester.ac.uk> | 2010-03-29 09:16:43 (GMT) |
---|---|---|
committer | dkf <donal.k.fellows@manchester.ac.uk> | 2010-03-29 09:16:43 (GMT) |
commit | e58477fc4be8cfacc98ba7bd2f73ffcae83b6082 (patch) | |
tree | ada40b470719fe2506e945dd2787945c366b26cc /unix/tkUnixRFont.c | |
parent | d57497b08ca7f6e28de6e670b3319f92e8fc18b7 (diff) | |
download | tk-e58477fc4be8cfacc98ba7bd2f73ffcae83b6082.zip tk-e58477fc4be8cfacc98ba7bd2f73ffcae83b6082.tar.gz tk-e58477fc4be8cfacc98ba7bd2f73ffcae83b6082.tar.bz2 |
* unix/tkUnixRFont.c (GetFont): [Bug 2978410]: Do not use non-constant
initializers for structures, since HP-UX cc doesn't like it.
Diffstat (limited to 'unix/tkUnixRFont.c')
-rw-r--r-- | unix/tkUnixRFont.c | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/unix/tkUnixRFont.c b/unix/tkUnixRFont.c index 34f504e..381aab2 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.33 2010/01/05 08:49:50 dkf Exp $ + * RCS: @(#) $Id: tkUnixRFont.c,v 1.34 2010/03/29 09:16:47 dkf Exp $ */ #include "tkUnixInt.h" @@ -87,9 +87,18 @@ GetFont( FcPattern *pat = FcFontRenderPrepare(0, fontPtr->pattern, fontPtr->faces[i].source); double s = sin(angle*PI/180.0), c = cos(angle*PI/180.0); - FcMatrix mat = {c, -s, s, c}; + FcMatrix mat; XftFont *ftFont; + /* + * Initialize the matrix manually so this can compile with HP-UX cc + * (which does not allow non-constant structure initializers). [Bug + * 2978410] + */ + + mat.xx = mat.yy = c; + mat.xy = -(mat.yx = s); + if (angle != 0.0) { FcPatternAddMatrix(pat, FC_MATRIX, &mat); } |