[Liblas-commits] laszip: a whole slug of #ifdefs for the VC6 iostream vs stl iost...

liblas-commits at liblas.org liblas-commits at liblas.org
Wed Dec 15 17:28:26 EST 2010


changeset 28c3ef5933da in /Volumes/Data/www/liblas.org/laszip
details: http://hg.liblas.orglaszip?cmd=changeset;node=28c3ef5933da
summary: a whole slug of #ifdefs for the VC6 iostream vs stl iostream stuff -- segfaults currently on OS X

diffstat:

 include/laszip/lasunzipper.hpp |   85 +++++++++++++++-------------
 include/laszip/laszipper.hpp   |   87 +++++++++++++++-------------
 src/CMakeLists.txt             |    3 +
 src/Makefile.am                |    5 +-
 src/bytestreamin_istream.hpp   |  112 ++++++++++++++++++++++---------------
 src/bytestreamout_ostream.hpp  |   86 +++++++++++++++++-----------
 tools/laszippertest.cpp        |  123 +++++++++++++++++++++++++++++++++++++++--
 7 files changed, 335 insertions(+), 166 deletions(-)

diffs (truncated from 761 to 300 lines):

diff -r 1fd6740c3f0a -r 28c3ef5933da include/laszip/lasunzipper.hpp
--- a/include/laszip/lasunzipper.hpp	Wed Dec 15 13:58:44 2010 -0800
+++ b/include/laszip/lasunzipper.hpp	Wed Dec 15 16:28:14 2010 -0600
@@ -1,21 +1,21 @@
-/******************************************************************************
- *
- * Project:  integrating laszip into liblas - http://liblas.org -
- * Purpose:
- * Author:   Martin Isenburg
- *           isenburg at cs.unc.edu
- *
- ******************************************************************************
- * Copyright (c) 2010, Martin Isenburg
- *
- * This is free software; you can redistribute and/or modify it under
- * the terms of the GNU Lesser General Licence as published
- * by the Free Software Foundation.
- *
- * See the COPYING file for more information.
- *
- ****************************************************************************/
-
+/******************************************************************************
+ *
+ * Project:  integrating laszip into liblas - http://liblas.org -
+ * Purpose:
+ * Author:   Martin Isenburg
+ *           isenburg at cs.unc.edu
+ *
+ ******************************************************************************
+ * Copyright (c) 2010, Martin Isenburg
+ *
+ * This is free software; you can redistribute and/or modify it under
+ * the terms of the GNU Lesser General Licence as published
+ * by the Free Software Foundation.
+ *
+ * See the COPYING file for more information.
+ *
+ ****************************************************************************/
+
 /*
 ===============================================================================
 
@@ -39,43 +39,50 @@
   
   CHANGE HISTORY:
   
-    12 December 2010 -- created from LASwriter/LASreader after Howard got pushy (-;
+    12 December 2010 -- created from LASwriter/LASreader after Howard got pushy (-;
   
 ===============================================================================
 */
 #ifndef LAS_UNZIPPER_H
 #define LAS_UNZIPPER_H
 
-#include <stdio.h>
-
-#if _MSC_VER < 1300
-#include <fstream.h>
-#else
-#include <fstream>
-using namespace std;
-#endif
-
-#include "laszip.hpp"
+#include <stdio.h>
 
-class ByteStreamIn;
-class LASreadPoint;
-
+#if defined(_MSC_VER)
+#if _MSC_VER < 1300
+    #include <fstream.h>
+#else
+    #include <istream>
+    #include <fstream>
+
+#endif
+#else
+    #include <istream>
+    #include <fstream>
+    using namespace std;
+#endif
+
+#include "laszip.hpp"
+
+class ByteStreamIn;
+class LASreadPoint;
+
 class LASunzipper
 {
 public:
 
-  bool open(FILE* file, unsigned int num_items, const LASitem* items, unsigned int compression=0);
-  bool open(istream* stream, unsigned int num_items, const LASitem* items, unsigned int compression=0);
-  bool read(unsigned char** point);
-  unsigned int close();
+  bool open(FILE* file, unsigned int num_items, const LASitem* items, unsigned int compression=0);
+  bool open(istream* stream, unsigned int num_items, const LASitem* items, unsigned int compression=0);
+  bool read(unsigned char** point);
+  unsigned int close();
 
   LASunzipper();
   ~LASunzipper();
 
-private:
+private:
   int count;
-  ByteStreamIn* stream;
-  LASreadPoint* reader;
+  ByteStreamIn* stream;
+  LASreadPoint* reader;
 };
 
 #endif
diff -r 1fd6740c3f0a -r 28c3ef5933da include/laszip/laszipper.hpp
--- a/include/laszip/laszipper.hpp	Wed Dec 15 13:58:44 2010 -0800
+++ b/include/laszip/laszipper.hpp	Wed Dec 15 16:28:14 2010 -0600
@@ -1,21 +1,21 @@
-/******************************************************************************
- *
- * Project:  integrating laszip into liblas - http://liblas.org -
- * Purpose:
- * Author:   Martin Isenburg
- *           isenburg at cs.unc.edu
- *
- ******************************************************************************
- * Copyright (c) 2010, Martin Isenburg
- *
- * This is free software; you can redistribute and/or modify it under
- * the terms of the GNU Lesser General Licence as published
- * by the Free Software Foundation.
- *
- * See the COPYING file for more information.
- *
- ****************************************************************************/
-
+/******************************************************************************
+ *
+ * Project:  integrating laszip into liblas - http://liblas.org -
+ * Purpose:
+ * Author:   Martin Isenburg
+ *           isenburg at cs.unc.edu
+ *
+ ******************************************************************************
+ * Copyright (c) 2010, Martin Isenburg
+ *
+ * This is free software; you can redistribute and/or modify it under
+ * the terms of the GNU Lesser General Licence as published
+ * by the Free Software Foundation.
+ *
+ * See the COPYING file for more information.
+ *
+ ****************************************************************************/
+
 /*
 ===============================================================================
 
@@ -39,44 +39,51 @@
   
   CHANGE HISTORY:
   
-    12 December 2010 -- created from LASwriter/LASreader after Howard got pushy (-;
+    12 December 2010 -- created from LASwriter/LASreader after Howard got pushy (-;
   
 ===============================================================================
 */
 #ifndef LAS_ZIPPER_H
 #define LAS_ZIPPER_H
 
-#include <stdio.h>
-
-#if _MSC_VER < 1300
-#include <fstream.h>
-#else
-#include <fstream>
-using namespace std;
-#endif
-
-#include "laszip.hpp"
+#include <stdio.h>
 
-class ByteStreamOut;
-class LASwritePoint;
-
+#if defined(_MSC_VER)
+#if _MSC_VER < 1300
+    #include <fstream.h>
+#else
+    #include <istream>
+    #include <fstream>
+
+#endif
+#else
+    #include <istream>
+    #include <fstream>
+    using namespace std;
+#endif
+
+#include "laszip.hpp"
+
+class ByteStreamOut;
+class LASwritePoint;
+
 class LASzipper
 {
 public:
 
-  bool open(FILE* outfile, unsigned int num_items, LASitem* items, unsigned int compression=0);
-  bool open(ostream* outstream, unsigned int num_items, LASitem* items, unsigned int compression=0);
-  bool write(unsigned char** point);
-  bool chunk(LASchunk* chunk);
-  unsigned int close(LASchunk* chunk=0);
+  bool open(FILE* outfile, unsigned int num_items, LASitem* items, unsigned int compression=0);
+  bool open(ostream* outstream, unsigned int num_items, LASitem* items, unsigned int compression=0);
+  bool write(unsigned char** point);
+  bool chunk(LASchunk* chunk);
+  unsigned int close(LASchunk* chunk=0);
 
   LASzipper();
   ~LASzipper();
 
-private:
+private:
   int count;
-  ByteStreamOut* stream;
-  LASwritePoint* writer;
+  ByteStreamOut* stream;
+  LASwritePoint* writer;
 };
 
 #endif
diff -r 1fd6740c3f0a -r 28c3ef5933da src/CMakeLists.txt
--- a/src/CMakeLists.txt	Wed Dec 15 13:58:44 2010 -0800
+++ b/src/CMakeLists.txt	Wed Dec 15 16:28:14 2010 -0600
@@ -45,6 +45,9 @@
     laswriteitemcompressed_v1.cpp
     laswritepoint.cpp
     laszipper.cpp
+    rangeencoder.cpp
+    rangedecoder.cpp
+    rangemodel.cpp
 )
 
 set(LASZIP_SOURCES
diff -r 1fd6740c3f0a -r 28c3ef5933da src/Makefile.am
--- a/src/Makefile.am	Wed Dec 15 13:58:44 2010 -0800
+++ b/src/Makefile.am	Wed Dec 15 16:28:14 2010 -0600
@@ -12,4 +12,7 @@
 						laswritepoint.cpp \
 						lasreadpoint.cpp \
 						laszipper.cpp \
-						lasunzipper.cpp
+						lasunzipper.cpp \
+						rangeencoder.cpp \
+						rangedecoder.cpp \
+						rangemodel.cpp
diff -r 1fd6740c3f0a -r 28c3ef5933da src/bytestreamin_istream.hpp
--- a/src/bytestreamin_istream.hpp	Wed Dec 15 13:58:44 2010 -0800
+++ b/src/bytestreamin_istream.hpp	Wed Dec 15 16:28:14 2010 -0600
@@ -16,49 +16,56 @@
  *
  ****************************************************************************/
 
-/*
-===============================================================================
-
-  FILE:  bytestreamin_istream.hpp
-  
-  CONTENTS:
-      
-  PROGRAMMERS:
-  
-    martin isenburg at cs.unc.edu
-  
-  COPYRIGHT:
-  
-    copyright (C) 2010  martin isenburg at cs.unc.edu
-    
-    This software is distributed in the hope that it will be useful,
-    but WITHOUT ANY WARRANTY; without even the implied warranty of
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-  
-  CHANGE HISTORY:
-  
+/*
+===============================================================================
+
+  FILE:  bytestreamin_istream.hpp
+  
+  CONTENTS:
+      
+  PROGRAMMERS:
+  
+    martin isenburg at cs.unc.edu
+  
+  COPYRIGHT:
+  
+    copyright (C) 2010  martin isenburg at cs.unc.edu
+    


More information about the Liblas-commits mailing list