Fixed ARM Unicode cross compilation issue (STR #2432)

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@7873 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
This commit is contained in:
Matthias Melcher 2010-11-18 18:43:41 +00:00
parent 8fa3fc272a
commit 983a0d8ce4
2 changed files with 21 additions and 5 deletions

View File

@ -1,5 +1,6 @@
CHANGES IN FLTK 1.3.0
- Fixed ARM Unicode cross compilation issue (STR #2432)
- Improved support for faulty X11 clients (STR #2385)
- Fixed xclass support for Fl_Window (STR #2053)
- Fixed Caps Lock handling in X11/XIM (STR #2366)

View File

@ -43,6 +43,21 @@
* extern const char *encoding_name(int num);
*/
/* The ARM header files have a bug by not taking into account that ARM cpu
* likes pacing to 4 bytes. This little trick defines our own version of
* XChar2b which does not have this problem
*/
typedef struct {
unsigned char byte1;
unsigned char byte2;
}
#if defined(__GNUC__) && defined(__arm__) && !defined(__ARM_EABI__)
__attribute__ ((packed))
#endif
Fl_XChar2b;
/*********************************************************************/
/** extract a list of font from the base font name list **/
/*********************************************************************/
@ -328,8 +343,8 @@ XUtf8DrawRtlString(Display *display,
int *encodings; /* encodings array */
XFontStruct **fonts; /* fonts array */
XChar2b buf[128]; /* drawing buffer */
XChar2b *ptr; /* pointer to the drawing buffer */
Fl_XChar2b buf[128]; /* drawing buffer */
Fl_XChar2b *ptr; /* pointer to the drawing buffer */
int fnum; /* index of the current font in the fonts array*/
int i; /* current byte in the XChar2b buffer */
int first; /* first valid font index */
@ -449,7 +464,7 @@ XUtf8DrawString(Display *display,
int *encodings; /* encodings array */
XFontStruct **fonts; /* fonts array */
XChar2b buf[128]; /* drawing buffer */
Fl_XChar2b buf[128]; /* drawing buffer */
int fnum; /* index of the current font in the fonts array*/
int i; /* current byte in the XChar2b buffer */
int first; /* first valid font index */
@ -559,7 +574,7 @@ XUtf8TextWidth(XUtf8FontStruct *font_set,
int x;
int *encodings; /* encodings array */
XFontStruct **fonts; /* fonts array */
XChar2b buf[128]; /* drawing buffer */
Fl_XChar2b buf[128]; /* drawing buffer */
int fnum; /* index of the current font in the fonts array*/
int i; /* current byte in the XChar2b buffer */
int first; /* first valid font index */
@ -739,7 +754,7 @@ XUtf8UcsWidth(XUtf8FontStruct *font_set,
int x;
int *encodings; /* encodings array */
XFontStruct **fonts; /* fonts array */
XChar2b buf[8]; /* drawing buffer */
Fl_XChar2b buf[8]; /* drawing buffer */
int fnum; /* index of the current font in the fonts array*/
int i; /* current byte in the XChar2b buffer */
int first; /* first valid font index */