[Kstars-devel] KDE/kdeedu/kstars/kstars

Akarsh Simha akarshsimha at gmail.com
Mon Aug 10 12:43:09 CEST 2009


SVN commit 1009566 by asimha:

This commit attempts to fix bug #199941 by adding a byteorder.h that
checks if the system headers that define 16-bit and 32-bit
byteswapping macros are present, and defines custom-made bswap_16 and
bswap_32 macros otherwise.

This has not been tested, but should fix the bug. Please reopen if
required.

CCMAIL: kstars-devel at kde.org
BUG: 199941



 M  +1 -1      binfilehelper.cpp  
 A             byteorder.h   [License: GPL (v2+)]
 M  +1 -1      data/tools/binfile.h  
 M  +1 -1      data/tools/binfiletester.c  
 M  +1 -1      data/tools/nomadbinfiletester.c  
 M  +1 -1      data/tools/readnomadbindump.c  
 M  +1 -1      skycomponents/deepstarcomponent.cpp  
 M  +1 -1      skycomponents/starcomponent.cpp  
 M  +1 -1      skycomponents/starcomponent.h  


--- trunk/KDE/kdeedu/kstars/kstars/binfilehelper.cpp #1009565:1009566
@@ -20,7 +20,7 @@
 
 #include <kstandarddirs.h>
 #include <kde_file.h>
-#include <byteswap.h>
+#include "byteorder.h"
 
 class BinFileHelper;
 
--- trunk/KDE/kdeedu/kstars/kstars/data/tools/binfile.h #1009565:1009566
@@ -35,7 +35,7 @@
 #include <stdlib.h>
 #include <stdio.h>
 #include <math.h>
-#include <byteswap.h>
+#include "byteorder.h"
 
 /* NOTE: HTM_LEVEL and other HTM-related stuff must be defined before using this header */
 
--- trunk/KDE/kdeedu/kstars/kstars/data/tools/binfiletester.c #1009565:1009566
@@ -21,7 +21,7 @@
 #include <math.h>
 #include <sys/types.h>
 #include <string.h>
-#include <byteswap.h>
+#include "byteorder.h"
 
 #define HTM_LEVEL 3
 #define INDEX_ENTRY_SIZE 12
--- trunk/KDE/kdeedu/kstars/kstars/data/tools/nomadbinfiletester.c #1009565:1009566
@@ -26,7 +26,7 @@
 #include <math.h>
 #include <sys/types.h>
 #include <string.h>
-#include <byteswap.h>
+#include "byteorder.h"
 
 
 /*
--- trunk/KDE/kdeedu/kstars/kstars/data/tools/readnomadbindump.c #1009565:1009566
@@ -24,7 +24,7 @@
 #include <math.h>
 #include <sys/types.h>
 #include <string.h>
-#include "byteswap.h"
+#include "byteorder.h"
 
 
 
--- trunk/KDE/kdeedu/kstars/kstars/skycomponents/deepstarcomponent.cpp #1009565:1009566
@@ -35,7 +35,7 @@
 #include "starcomponent.h"
 
 #include <kde_file.h>
-#include <byteswap.h>
+#include "byteorder.h"
 
 DeepStarComponent::DeepStarComponent( SkyComponent *parent, QString fileName, float trigMag, bool staticstars )
     : ListComponent(parent), m_reindexNum( J2000 ), triggerMag( trigMag ), m_FaintMagnitude(-5.0), 
--- trunk/KDE/kdeedu/kstars/kstars/skycomponents/starcomponent.cpp #1009565:1009566
@@ -43,7 +43,7 @@
 #define bswap_16(x) bswap16(x)
 #define bswap_32(x) bswap32(x)
 #else
-#include <byteswap.h>
+#include "byteorder.h"
 #endif
 
 #include <kde_file.h>
--- trunk/KDE/kdeedu/kstars/kstars/skycomponents/starcomponent.h #1009565:1009566
@@ -165,7 +165,7 @@
 
     SkyObject* findByHDIndex( int HDnum );
 
-    // TODO: Make byteSwap a template method and put it in byteswap.h
+    // TODO: Make byteSwap a template method and put it in byteorder.h
     // It should ideally handle 32-bit, 16-bit fields and starData and
     // deepStarData fields
     static void byteSwap( starData *stardata );


More information about the Kstars-devel mailing list