]> git.mxchange.org Git - simgear.git/commitdiff
fg_traits.hxx -> sg_traits.hxx
authorcurt <curt>
Sat, 24 Mar 2001 13:12:26 +0000 (13:12 +0000)
committercurt <curt>
Sat, 24 Mar 2001 13:12:26 +0000 (13:12 +0000)
fg_zlib.hxx -> sg_zlib.hxx

simgear/Makefile.am
simgear/debug/logstream.hxx
simgear/ephemeris/ephemeris.hxx
simgear/fg_traits.hxx [deleted file]
simgear/fg_zlib.h [deleted file]
simgear/math/interpolater.cxx
simgear/misc/zfstream.hxx
simgear/sg_traits.hxx [new file with mode: 0644]
simgear/sg_zlib.h [new file with mode: 0644]

index 7d62acec4ae8e5d0808a55ab654b9ba06648cfc8..dc6e96d2570024a0a6e8cab25b37a001ace702df 100644 (file)
@@ -22,7 +22,7 @@ METAR_DIRS = metar
 EXTRA_DIST = version.h.in
 
 include_HEADERS = \
-       compiler.h constants.h fg_traits.hxx fg_zlib.h inlines.h version.h
+       compiler.h constants.h inlines.h sg_traits.hxx sg_zlib.h version.h
 
 SUBDIRS = \
        bucket \
index c640461ad0cb71f25a1ae863af67bdba7a1555bc..e2977bf6d412863efce066f4e65223ac35add37e 100644 (file)
@@ -42,7 +42,7 @@
 # include <iostream>
 #else
 # include <iostream.h>
-# include <simgear/fg_traits.hxx>
+# include <simgear/sg_traits.hxx>
 #endif
 
 #include <simgear/debug/debug_types.h>
@@ -92,13 +92,24 @@ public:
     /** Is logging enabled? */
     bool enabled() { return logging_enabled; }
 
-    /** Set the logging level of subsequent messages. */
+    /**
+     * Set the logging level of subsequent messages.
+     * @param c debug class
+     * @param p priority
+     */
     void set_log_state( sgDebugClass c, sgDebugPriority p );
 
-    /** Set the global logging level. */
+    /**
+     * Set the global logging level.
+     * @param c debug class
+     * @param p priority
+     */
     static void set_log_level( sgDebugClass c, sgDebugPriority p );
 
-    /** Set the stream buffer */
+    /**
+     * Set the stream buffer
+     * @param sb stream buffer
+     */
     void set_sb( streambuf* sb );
 
 protected:
@@ -181,19 +192,32 @@ struct logstream_base
 class logstream : private logstream_base, public ostream
 {
 public:
-    /** The default is to send messages to cerr. */
+    /**
+     * The default is to send messages to cerr.
+     * @param out output stream
+     */
     logstream( ostream& out )
        // : logstream_base(out.rdbuf()),
        : logstream_base(),
          ostream(&lbuf) { lbuf.set_sb(out.rdbuf());}
 
-    /** Set the output stream */
+    /**
+     * Set the output stream
+     * @param out output stream
+     */
     void set_output( ostream& out ) { lbuf.set_sb( out.rdbuf() ); }
 
-    /** Set the global log class and priority level. */
+    /**
+     * Set the global log class and priority level.
+     * @param c debug class
+     * @param p priority
+     */
     void setLogLevels( sgDebugClass c, sgDebugPriority p );
 
-    /** Output operator to capture the debug level and priority of a message. */
+    /**
+     * Output operator to capture the debug level and priority of a message.
+     * @param l log level
+     */
     inline ostream& operator<< ( const loglevel& l );
 };
 
@@ -219,7 +243,10 @@ sglog()
 
 
 /** \def SG_LOG(C,P,M)
- * Log a message = M of class = C and priority = P
+ * Log a message.
+ * @param C debug class
+ * @param P priority
+ * @param M message
  */
 #ifdef FG_NDEBUG
 # define SG_LOG(C,P,M)
index 6f487c3ea1dbf6d16a0992b0695c9a91f5a75db6..664b5c5f454d82614fca085af6c2aab598aea503 100644 (file)
@@ -50,6 +50,9 @@
 
 
 /** Ephemeris class
+ *
+ * Written by Durk Talsma <d.talsma@direct.a2000.nl> and Curtis Olson
+ * <curt@flightgear.org>
  *
  * Introduction 
  *
diff --git a/simgear/fg_traits.hxx b/simgear/fg_traits.hxx
deleted file mode 100644 (file)
index ed8c926..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-#ifndef _FG_TRAITS_HXX
-#define _FG_TRAITS_HXX
-
-#include <simgear/compiler.h>
-
-#ifndef SG_HAVE_TRAITS
-
-// Dummy up some char traits for now.
-template<class charT> struct char_traits{};
-
-SG_TEMPLATE_NULL
-struct char_traits<char>
-{
-    typedef char      char_type;
-    typedef int       int_type;
-    typedef streampos pos_type;
-    typedef streamoff off_type;
-
-    static int_type eof() { return EOF; }
-};
-#endif // SG_HAVE_TRAITS
-
-#endif // _FG_TRAITS_HXX
diff --git a/simgear/fg_zlib.h b/simgear/fg_zlib.h
deleted file mode 100644 (file)
index fb4178b..0000000
+++ /dev/null
@@ -1,87 +0,0 @@
-/**************************************************************************
- * fg_zlib.h -- a zlib wrapper to replace zlib calls with normal uncompressed
- *              calls for systems that have problems building zlib.
- *
- * Written by Curtis Olson, started April 1998.
- *
- * Copyright (C) 1998  Curtis L. Olson  - curt@me.umn.edu
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library 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.  See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public
- * License along with this library; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA  02111-1307, USA.
- *
- * $Id$
- **************************************************************************/
-
-
-#ifndef _FG_ZLIB_H
-#define _FG_ZLIB_H
-
-
-#ifdef HAVE_CONFIG_H
-#  include <config.h>
-#endif
-
-
-#ifdef AVOID_USING_ZLIB
-
-  #include <stdio.h>
-
-  #define fgFile FILE *
-
-  /* fgFile fgopen(char *filename, const char *flags) */
-  #define fgopen(P, F)  (fopen((P), (F)))
-
-  /* int fgseek(fgFile *file, long offset, int whence) */
-  #define fgseek(F, O, W)  (fseek((F), (O), (W)))
-
-  /* fgread(fgFile file, void *buf, int size); */
-  #define fgread(F, B, S)  (fread((B), (S), 1, (F)))
-
-  /* int fggets(fgFile fd, char *buffer, int len) */
-  #define fggets(F, B, L)  (fgets((B), (L), (F)))
-
-  /* int fgclose(fgFile fd) */
-  #define fgclose(F)  (fclose((F)))
-#else
-
-#ifdef HAVE_ZLIB
-  #include <zlib.h>
-#else
-  #include <simgear/zlib/zlib.h>
-#endif
-
-  #define fgFile gzFile
-
-  /* fgFile fgopen(char *filename, const char *flags) */
-  #define fgopen(P, F)  (gzopen((P), (F)))
-
-  /* int fgseek(fgFile *file, long offset, int whence) */
-  #define fgseek(F, O, W)  (gzseek((F), (O), (W)))
-
-  /* fgread(fgFile file, void *buf, int size); */
-  #define fgread(F, B, S)  (gzread((F), (B), (S)))
-
-  /* int fggets(fgFile fd, char *buffer, int len) */
-  #define fggets(F, B, L)  (gzgets((F), (B), (L)))
-
-  /* int fgclose(fgFile fd) */
-  #define fgclose(F)  (gzclose((F)))
-
-#endif /* #ifdef AVOID_USING_ZLIB #else #endif */
-
-
-#endif /* _FG_ZLIB_H */
-
-
index 064443ad07233a9319017ded2a87863d7a580284..52410453f5beff224abfeec1676ee66945ce826a 100644 (file)
@@ -30,7 +30,7 @@
 
 #include STL_STRING
 
-#include <simgear/fg_zlib.h>
+// depricated - #include <simgear/sg_zlib.h>
 #include <simgear/debug/logstream.hxx>
 #include <simgear/misc/fgstream.hxx>
 
index 3c2ce34fbf4c02492d6295fde79b839694846b25..ddd63011f9a8e89ee39cccacf5af4e2f938ff658 100644 (file)
@@ -92,7 +92,7 @@ SG_USING_STD(streamoff);
 #  define ios_badbit   ios::badbit
 #  define ios_failbit  ios::failbit
 
-#  include <simgear/fg_traits.hxx>
+#  include <simgear/sg_traits.hxx>
 
 #endif // SG_HAVE_STD_INCLUDES
 
diff --git a/simgear/sg_traits.hxx b/simgear/sg_traits.hxx
new file mode 100644 (file)
index 0000000..500f739
--- /dev/null
@@ -0,0 +1,28 @@
+/** \file sg_traits.hxx
+ * Provides a char_traits declaration for systems without it.
+ * \internal
+ */
+
+#ifndef _SG_TRAITS_HXX
+#define _SG_TRAITS_HXX
+
+#include <simgear/compiler.h>
+
+#ifndef SG_HAVE_TRAITS
+
+// Dummy up some char traits for now.
+template<class charT> struct char_traits{};
+
+SG_TEMPLATE_NULL
+struct char_traits<char>
+{
+    typedef char      char_type;
+    typedef int       int_type;
+    typedef streampos pos_type;
+    typedef streamoff off_type;
+
+    static int_type eof() { return EOF; }
+};
+#endif // SG_HAVE_TRAITS
+
+#endif // _SG_TRAITS_HXX
diff --git a/simgear/sg_zlib.h b/simgear/sg_zlib.h
new file mode 100644 (file)
index 0000000..c8b41e0
--- /dev/null
@@ -0,0 +1,92 @@
+/**
+ * \file sg_zlib.h
+ * A file IO wrapper system that can select at compile time if the system
+ * should use zlib calls or normal uncompressed calls for systems that have
+ * problems building zlib.
+ * Define AVOID_USING_ZLIB to use standard uncompressed calls.
+ */
+
+/*
+ * Written by Curtis Olson, started April 1998.
+ *
+ * Copyright (C) 1998  Curtis L. Olson  - curt@me.umn.edu
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library 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.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA  02111-1307, USA.
+ *
+ * $Id$
+ **************************************************************************/
+
+
+#ifndef _SG_ZLIB_H
+#define _SG_ZLIB_H
+
+
+#ifdef HAVE_CONFIG_H
+#  include <config.h>
+#endif
+
+
+#ifdef AVOID_USING_ZLIB
+
+  #include <stdio.h>
+
+  #define sgFile FILE *
+
+  /* sgFile sgopen(char *filename, const char *flags) */
+  #define sgopen(P, F)  (fopen((P), (F)))
+
+  /* int sgseek(sgFile *file, long offset, int whence) */
+  #define sgseek(F, O, W)  (fseek((F), (O), (W)))
+
+  /* sgread(sgFile file, void *buf, int size); */
+  #define sgread(F, B, S)  (fread((B), (S), 1, (F)))
+
+  /* int sggets(sgFile fd, char *buffer, int len) */
+  #define sggets(F, B, L)  (sgets((B), (L), (F)))
+
+  /* int sgclose(sgFile fd) */
+  #define sgclose(F)  (fclose((F)))
+#else
+
+#ifdef HAVE_ZLIB
+  #include <zlib.h>
+#else
+  #include <simgear/zlib/zlib.h>
+#endif
+
+  #define sgFile gzFile
+
+  /* sgFile sgopen(char *filename, const char *flags) */
+  #define sgopen(P, F)  (gzopen((P), (F)))
+
+  /* int sgseek(sgFile *file, long offset, int whence) */
+  #define sgseek(F, O, W)  (gzseek((F), (O), (W)))
+
+  /* sgread(sgFile file, void *buf, int size); */
+  #define sgread(F, B, S)  (gzread((F), (B), (S)))
+
+  /* int sggets(sgFile fd, char *buffer, int len) */
+  #define sggets(F, B, L)  (gzgets((F), (B), (L)))
+
+  /* int sgclose(sgFile fd) */
+  #define sgclose(F)  (gzclose((F)))
+
+#endif /* #ifdef AVOID_USING_ZLIB #else #endif */
+
+
+#endif /* _SG_ZLIB_H */
+
+