diff options
author | dkf <dkf@noemail.net> | 2010-03-29 09:16:42 (GMT) |
---|---|---|
committer | dkf <dkf@noemail.net> | 2010-03-29 09:16:42 (GMT) |
commit | 6501111b07265ecca21d4c464e3327bf772303ba (patch) | |
tree | ada40b470719fe2506e945dd2787945c366b26cc | |
parent | 49aaa6cc8d530c51492163a9272db1b4497e010c (diff) | |
download | tk-6501111b07265ecca21d4c464e3327bf772303ba.zip tk-6501111b07265ecca21d4c464e3327bf772303ba.tar.gz tk-6501111b07265ecca21d4c464e3327bf772303ba.tar.bz2 |
* unix/tkUnixRFont.c (GetFont): [Bug 2978410]: Do not use non-constant
initializers for structures, since HP-UX cc doesn't like it.
FossilOrigin-Name: c73eca4f8f1d9d0425adeb273b9dadc6eab306b6
-rw-r--r-- | ChangeLog | 11 | ||||
-rw-r--r-- | unix/tkUnixRFont.c | 13 |
2 files changed, 19 insertions, 5 deletions
@@ -1,9 +1,14 @@ +2010-03-29 Donal K. Fellows <dkf@users.sf.net> + + * unix/tkUnixRFont.c (GetFont): [Bug 2978410]: Do not use non-constant + initializers for structures, since HP-UX cc doesn't like it. + 2010-03-28 Joe English <jenglish@users.sourceforge.net> * generic/ttk/ttkTagSet.c, generic/ttk/ttkTheme.c, - generic/ttk/ttkTheme.h, generic/ttk/ttkTreeview.c, - generic/ttk/ttkWidget.h, doc/ttk_treeview.n, - tests/ttk/treetags.test: ttk::treeview widget: add 'tag names', + * generic/ttk/ttkTheme.h, generic/ttk/ttkTreeview.c, + * generic/ttk/ttkWidget.h, doc/ttk_treeview.n, + * tests/ttk/treetags.test: ttk::treeview widget: add 'tag names', 'tag add', and 'tag remove' methods. 2010-03-23 Donal K. Fellows <dkf@users.sf.net> 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); } |