[Mplayer-cvslog] CVS: main/TOOLS/subfont-c Makefile,1.4,1.5 README,1.4,1.5 subfont.c,1.9,1.10
Artur Zaprzala
zybi at mplayer.dev.hu
Fri Aug 24 12:46:33 CEST 2001
Update of /cvsroot/mplayer/main/TOOLS/subfont-c
In directory mplayer:/var/tmp.root/cvs-serv5756
Modified Files:
Makefile README subfont.c
Log Message:
Resolved endianess issues.
Index: Makefile
===================================================================
RCS file: /cvsroot/mplayer/main/TOOLS/subfont-c/Makefile,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- Makefile 21 Aug 2001 14:00:57 -0000 1.4
+++ Makefile 24 Aug 2001 10:46:31 -0000 1.5
@@ -12,10 +12,10 @@
subfont: subfont.o
-subfont.o: subfont.c Makefile
+subfont.o: subfont.c Makefile ../../bswap.h
-subfont.S: subfont.c
- $(CC) $(CFLAGS) -S $^ -o $@
+subfont.S: subfont.c Makefile ../../bswap.h
+ $(CC) $(CFLAGS) -S $< -o $@
clean:
rm -f subfont subfont.o core
Index: README
===================================================================
RCS file: /cvsroot/mplayer/main/TOOLS/subfont-c/README,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- README 24 Aug 2001 10:05:46 -0000 1.4
+++ README 24 Aug 2001 10:46:31 -0000 1.5
@@ -100,8 +100,6 @@
+ Starting x position of each character and the bitmap width is aligned
to multiple of 8 (required by mplayer).
- + Currently subfont won't work on big-endian systems. I need help.
-
+ My development platform is RedHat 7.1. FreeType versions tested are
2.0.1 through 2.0.4.
Index: subfont.c
===================================================================
RCS file: /cvsroot/mplayer/main/TOOLS/subfont-c/subfont.c,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- subfont.c 24 Aug 2001 08:55:00 -0000 1.9
+++ subfont.c 24 Aug 2001 10:46:31 -0000 1.10
@@ -17,18 +17,18 @@
#ifndef OLD_FREETYPE2
-
#include <ft2build.h>
#include FT_FREETYPE_H
#include FT_GLYPH_H
-
#else /* freetype 2.0.1 */
-
#include <freetype/freetype.h>
#include <freetype/ftglyph.h>
-
#endif
+
+#include "../../bswap.h"
+
+
#ifndef DEBUG
#define DEBUG 0
#endif
@@ -418,14 +418,12 @@
int outbytesleft = sizeof(FT_ULong);
size_t count = iconv(cd, &inbuf, &inbytesleft, &outbuf, &outbytesleft);
-// if (count==-1) o = 0; // not OK, at least my iconv() returns E2BIG for all
- if (outbytesleft!=0) o = 0;
- /* convert unicode BE -> LE */
- o = ((o>>24)&0xff)
- | ((o>>8)&0xff00)
- | ((o&0xff00)<<8)
- | ((o&0xff)<<24);
+ /* convert unicode BigEndian -> MachineEndian */
+ o = be2me_32(o);
+
+ // if (count==-1) o = 0; // not OK, at least my iconv() returns E2BIG for all
+ if (outbytesleft!=0) o = 0;
/* we don't want control characters */
if (o>=0x7f && o<0xa0) o = 0;
More information about the MPlayer-cvslog
mailing list