[Liblas-commits] laszip: 2 new changesets

liblas-commits at liblas.org liblas-commits at liblas.org
Fri Dec 17 00:00:42 EST 2010


changeset 746fbdb3487b in /Volumes/Data/www/liblas.org/laszip
details: http://hg.liblas.orglaszip?cmd=changeset;node=746fbdb3487b
summary: dead code

changeset 0c2698631af8 in /Volumes/Data/www/liblas.org/laszip
details: http://hg.liblas.orglaszip?cmd=changeset;node=0c2698631af8
summary: consolidated the MC6 macro usage

diffstat:

 include/laszip/lasunzipper.hpp |   8 +----
 include/laszip/laszip.hpp      |   5 +++
 include/laszip/laszipper.hpp   |   8 +----
 include/laszip/liblaszip.hpp   |  47 -----------------------------
 src/bytestreamin_istream.hpp   |  22 +-----------
 src/bytestreamout_ostream.hpp  |  17 +--------
 src/liblaszip.cpp              |  24 ---------------
 tools/laszippertest.cpp        |  67 +++++------------------------------------
 8 files changed, 21 insertions(+), 177 deletions(-)

diffs (truncated from 419 to 300 lines):

diff -r 1d033bad3a73 -r 0c2698631af8 include/laszip/lasunzipper.hpp
--- a/include/laszip/lasunzipper.hpp	Wed Dec 15 16:36:05 2010 -0600
+++ b/include/laszip/lasunzipper.hpp	Thu Dec 16 21:00:21 2010 -0800
@@ -48,17 +48,11 @@
 
 #include <stdio.h>
 
-#if defined(_MSC_VER)
-#if _MSC_VER < 1300
+#ifdef LZ_WIN32_VC6
     #include <fstream.h>
 #else
     #include <istream>
     #include <fstream>
-
-#endif
-#else
-    #include <istream>
-    #include <fstream>
     using namespace std;
 #endif
 
diff -r 1d033bad3a73 -r 0c2698631af8 include/laszip/laszip.hpp
--- a/include/laszip/laszip.hpp	Wed Dec 15 16:36:05 2010 -0600
+++ b/include/laszip/laszip.hpp	Thu Dec 16 21:00:21 2010 -0800
@@ -47,6 +47,11 @@
 #ifndef LASZIP_H
 #define LASZIP_H
 
+#if defined(_MSC_VER) && (_MSC_VER < 1300)
+// VC6 is very special wrt C++ streams
+#define LZ_WIN32_VC6
+#endif
+
 #define LASZIP_COMPRESSION_NONE 0
 #define LASZIP_COMPRESSION_RANGE 1
 #define LASZIP_COMPRESSION_ARITHMETIC 2
diff -r 1d033bad3a73 -r 0c2698631af8 include/laszip/laszipper.hpp
--- a/include/laszip/laszipper.hpp	Wed Dec 15 16:36:05 2010 -0600
+++ b/include/laszip/laszipper.hpp	Thu Dec 16 21:00:21 2010 -0800
@@ -48,17 +48,11 @@
 
 #include <stdio.h>
 
-#if defined(_MSC_VER)
-#if _MSC_VER < 1300
+#ifdef LZ_WIN32_VC6
     #include <fstream.h>
 #else
     #include <istream>
     #include <fstream>
-
-#endif
-#else
-    #include <istream>
-    #include <fstream>
     using namespace std;
 #endif
 
diff -r 1d033bad3a73 -r 0c2698631af8 include/laszip/liblaszip.hpp
--- a/include/laszip/liblaszip.hpp	Wed Dec 15 16:36:05 2010 -0600
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,47 +0,0 @@
-/******************************************************************************
- *
- * Project:  laszip - http://liblas.org -
- * Purpose:
- * Author:   Michael P. Gerlek (mpg at flaxen.com)
- *
- ******************************************************************************
- * Copyright (c) 2010, Michael P. Gerlek
- *
- * 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.
- *
- ****************************************************************************/
-
-#ifndef LASZIP_H
-#define LASZIP_H
-
-// These are the public interfaces exported out for use by by liblas.
-// For now, they just wrap the "native" LASreader/LASwriter classes.
-
-class LASreader;
-class LASwriter;
-
-class LasZipReader
-{
-public:
-  LasZipReader(const char* file);
-  ~LasZipReader();
-
-private:
-    LASreader* m_reader;
-};
-
-class LasZipWriter
-{
-public:
-  LasZipWriter(const char* file);
-  ~LasZipWriter();
-
-private:
-   LASwriter* m_writer;
-};
-
-#endif
diff -r 1d033bad3a73 -r 0c2698631af8 src/bytestreamin_istream.hpp
--- a/src/bytestreamin_istream.hpp	Wed Dec 15 16:36:05 2010 -0600
+++ b/src/bytestreamin_istream.hpp	Thu Dec 16 21:00:21 2010 -0800
@@ -46,17 +46,11 @@
 
 #include "bytestreamin.hpp"
 
-#if defined(_MSC_VER)
-#if _MSC_VER < 1300
+#ifdef LZ_WIN32_VC6
     #include <fstream.h>
 #else
     #include <istream>
     #include <fstream>
-
-#endif
-#else
-    #include <istream>
-    #include <fstream>
     using namespace std;
 #endif
 
@@ -78,15 +72,11 @@
   istream* stream;
  
 
-#if defined(_MSC_VER)
-#if _MSC_VER < 1300
+#ifdef LZ_WIN32_VC6
     long start;
 #else
     ios::off_type start;
 #endif
-#else
-    ios::off_type start;
-#endif
 
 
 };
@@ -121,17 +111,11 @@
 inline unsigned int ByteStreamInIstream::byteCount() const
 {
 
-#if defined(_MSC_VER)
-#if _MSC_VER < 1300
+#ifdef LZ_WIN32_VC6
     return (stream->tellg() - start);
 #else
   ios::off_type size = stream->tellg() - start;
   return static_cast<unsigned int>(size);
-
-#endif
-#else
-  ios::off_type size = stream->tellg() - start;
-  return static_cast<unsigned int>(size);
 #endif
 
 }
diff -r 1d033bad3a73 -r 0c2698631af8 src/bytestreamout_ostream.hpp
--- a/src/bytestreamout_ostream.hpp	Wed Dec 15 16:36:05 2010 -0600
+++ b/src/bytestreamout_ostream.hpp	Thu Dec 16 21:00:21 2010 -0800
@@ -46,7 +46,7 @@
 
 #include "bytestreamout.hpp"
 
-#if _MSC_VER < 1300
+#ifdef LZ_WIN32_VC6
 #include <fstream.h>
 #else
 #include <fstream>
@@ -70,15 +70,11 @@
 private:
   ostream* stream;
   
-#if defined(_MSC_VER)
-#if _MSC_VER < 1300
+#ifdef LZ_WIN32_VC6
     long start;
 #else
     ios::off_type start;
 #endif
-#else
-    ios::off_type start;
-#endif
 
 };
 
@@ -103,19 +99,12 @@
 inline unsigned int ByteStreamOutOstream::byteCount() const
 {
 
-#if defined(_MSC_VER)
-#if _MSC_VER < 1300
+#ifdef LZ_WIN32_VC6
   return (stream->tellp() - start);
 #else
   ios::pos_type end = stream->tellp();
   ios::off_type size = end - start;
   return static_cast<unsigned int>(size);
-
-#endif
-#else
-  ios::pos_type end = stream->tellp();
-  ios::off_type size = end - start;
-  return static_cast<unsigned int>(size);
 #endif
 
 
diff -r 1d033bad3a73 -r 0c2698631af8 src/liblaszip.cpp
--- a/src/liblaszip.cpp	Wed Dec 15 16:36:05 2010 -0600
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,24 +0,0 @@
-/******************************************************************************
- *
- * Project:  laszip - http://liblas.org -
- * Purpose:
- * Author:   Martin Isenburg
- *           isenburg at cs.unc.edu
- *
- ******************************************************************************
- * Copyright (c) 2010, Michael P. Gerlek (mpg at flaxen.com)
- *
- * 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.
- *
- ****************************************************************************/
-
-#include "liblaszip.hpp"
-
-
-#include <stdlib.h>
-#include <string.h>
-
diff -r 1d033bad3a73 -r 0c2698631af8 tools/laszippertest.cpp
--- a/tools/laszippertest.cpp	Wed Dec 15 16:36:05 2010 -0600
+++ b/tools/laszippertest.cpp	Thu Dec 16 21:00:21 2010 -0800
@@ -48,17 +48,11 @@
 #include "laszipper.hpp"
 #include "lasunzipper.hpp"
 
-#if defined(_MSC_VER)
-#if _MSC_VER < 1300
+#ifdef LZ_WIN32_VC6
     #include <fstream.h>
 #else
     #include <istream>
     #include <fstream>
-
-#endif
-#else
-    #include <istream>
-    #include <fstream>
     using namespace std;
 #endif
 
@@ -81,8 +75,7 @@
   filebuf ofb3;
 
 
-#if defined(_MSC_VER)
-#if _MSC_VER < 1300
+#ifdef LZ_WIN32_VC6
   ostream* ostream1 = 0;
   ostream* ostream2 = 0;
   ostream* ostream3 = 0;
@@ -97,14 +90,6 @@
   ifstream* istream2 = 0;
   ifstream* istream3 = 0;  
 #endif
-#else
-  ofstream* ostream1 = 0;
-  ofstream* ostream2 = 0;
-  ofstream* ostream3 = 0;
-  ifstream* istream1 = 0;
-  ifstream* istream2 = 0;
-  ifstream* istream3 = 0;  
-#endif
 
 
 
@@ -164,19 +149,13 @@
   if (use_iostream)
   {
 
-#if defined(_MSC_VER)
-#if _MSC_VER < 1300
+#ifdef LZ_WIN32_VC6


More information about the Liblas-commits mailing list