From e58477fc4be8cfacc98ba7bd2f73ffcae83b6082 Mon Sep 17 00:00:00 2001 From: dkf Date: Mon, 29 Mar 2010 09:16:43 +0000 Subject: * unix/tkUnixRFont.c (GetFont): [Bug 2978410]: Do not use non-constant initializers for structures, since HP-UX cc doesn't like it. --- ChangeLog | 11 ++++++++--- unix/tkUnixRFont.c | 13 +++++++++++-- 2 files changed, 19 insertions(+), 5 deletions(-) diff --git a/ChangeLog b/ChangeLog index cf7daeb..d17cb40 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,9 +1,14 @@ +2010-03-29 Donal K. Fellows + + * 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 * 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 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); } -- cgit v0.12