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 | |
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.
-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); } |