[brlcad-commits] SF.net SVN: brlcad: [30343] brlcad/trunk/src/vfont
Open Source Solid Modeling CAD
Brought to you by:
brlcad
From: <br...@us...> - 2008-02-18 08:35:27
|
Revision: 30343 http://brlcad.svn.sourceforge.net/brlcad/?rev=30343&view=rev Author: brlcad Date: 2008-02-18 00:35:32 -0800 (Mon, 18 Feb 2008) Log Message: ----------- get rid of the WORDS_BIGENDIAN use in favor of bu_byteorder() run-time detection Modified Paths: -------------- brlcad/trunk/src/vfont/Makefile.am brlcad/trunk/src/vfont/vfont.h Modified: brlcad/trunk/src/vfont/Makefile.am =================================================================== --- brlcad/trunk/src/vfont/Makefile.am 2008-02-18 08:28:53 UTC (rev 30342) +++ brlcad/trunk/src/vfont/Makefile.am 2008-02-18 08:35:32 UTC (rev 30343) @@ -4,7 +4,7 @@ libvfont_nil_la_SOURCES = getfont.c -noinst_HEADERS = font.h +noinst_HEADERS = vfont.h fontdir = $(BRLCAD_DATA)/vfont font_DATA = \ Modified: brlcad/trunk/src/vfont/vfont.h =================================================================== --- brlcad/trunk/src/vfont/vfont.h 2008-02-18 08:28:53 UTC (rev 30342) +++ brlcad/trunk/src/vfont/vfont.h 2008-02-18 08:35:32 UTC (rev 30343) @@ -23,19 +23,16 @@ * */ -#include "common.h" - #ifndef VFONT_FONT_H #define VFONT_FONT_H -#if defined(WORDS_BIGENDIAN) -# define SWAB(shrt) (shrt=(((shrt)>>8) & 0xff) | (((shrt)<<8) & 0xff00)) -# define SWABV(shrt) ((((shrt)>>8) & 0xff) | (((shrt)<<8) & 0xff00)) -#else -# define SWAB(shrt) -# define SWABV(shrt) (shrt) -#endif +#include "common.h" +#include "bu.h" + +#define SWAB(shrt) if (bu_byteorder() == BU_BIG_ENDIAN) (shrt=(((shrt)>>8) & 0xff) | (((shrt)<<8) & 0xff00)) +#define SWABV(shrt) (bu_byteorder() == BU_BIG_ENDIAN) ? ((((shrt)>>8) & 0xff) | (((shrt)<<8) & 0xff00)) : (shrt) + #define FONTBUFSZ 200 #define FONTNAME "times.r.6" /* Default font name. */ #define FONTNAMESZ 128 This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |