From 22942835068b8938982fd55a2aa490f0afd46b6b Mon Sep 17 00:00:00 2001 From: curt Date: Fri, 6 Apr 2001 18:08:07 +0000 Subject: [PATCH] Tweaks to lowlevel.[ch]xx from Norman. --- SimGear.dsp | 258 ++-------------------------------------- simgear/io/lowlevel.cxx | 26 ---- simgear/io/lowlevel.hxx | 45 +++++-- 3 files changed, 45 insertions(+), 284 deletions(-) diff --git a/SimGear.dsp b/SimGear.dsp index 1e79a3ef..612af646 100644 --- a/SimGear.dsp +++ b/SimGear.dsp @@ -1103,267 +1103,31 @@ SOURCE=.\simgear\sky\stars.cxx # End Source File # End Group -# Begin Group "Lib_sgtiming" +# Begin Group "Lib_sgthreads" # PROP Default_Filter "" # Begin Source File -SOURCE=.\simgear\timing\geocoord.cxx - -!IF "$(CFG)" == "SimGear - Win32 Release" - -# PROP Intermediate_Dir "Release\Lib_sgtiming" - -!ELSEIF "$(CFG)" == "SimGear - Win32 Debug" - -# PROP Intermediate_Dir "Debug\Lib_sgtiming" - -!ENDIF - -# End Source File -# Begin Source File - -SOURCE=.\simgear\timing\lowleveltime.cxx - -!IF "$(CFG)" == "SimGear - Win32 Release" - -# PROP Intermediate_Dir "Release\Lib_sgtiming" - -!ELSEIF "$(CFG)" == "SimGear - Win32 Debug" - -# PROP Intermediate_Dir "Debug\Lib_sgtiming" - -!ENDIF - -# End Source File -# Begin Source File - -SOURCE=.\simgear\timing\sg_time.cxx - -!IF "$(CFG)" == "SimGear - Win32 Release" - -# PROP Intermediate_Dir "Release\Lib_sgtiming" - -!ELSEIF "$(CFG)" == "SimGear - Win32 Debug" - -# PROP Intermediate_Dir "Debug\Lib_sgtiming" - -!ENDIF - -# End Source File -# Begin Source File - -SOURCE=.\simgear\timing\timezone.cxx +SOURCE=.\simgear\threads\SGThread.cxx !IF "$(CFG)" == "SimGear - Win32 Release" -# PROP Intermediate_Dir "Release\Lib_sgtiming" +# PROP Intermediate_Dir "Release\Lib_sgthreads" !ELSEIF "$(CFG)" == "SimGear - Win32 Debug" -# PROP Intermediate_Dir "Debug\Lib_sgtiming" - -!ENDIF - -# End Source File -# Begin Source File - -SOURCE=.\simgear\timing\# - -!IF "$(CFG)" == "SimGear - Win32 Release" - -# PROP Intermediate_Dir "Release\Lib_sgtiming" - -!ELSEIF "$(CFG)" == "SimGear - Win32 Debug" - -# PROP Intermediate_Dir "Debug\Lib_sgtiming" - -!ENDIF - -# End Source File -# Begin Source File - -SOURCE=.\simgear\timing\event.cxx - -!IF "$(CFG)" == "SimGear - Win32 Release" - -# PROP Intermediate_Dir "Release\Lib_sgtiming" - -!ELSEIF "$(CFG)" == "SimGear - Win32 Debug" - -# PROP Intermediate_Dir "Debug\Lib_sgtiming" - -!ENDIF - -# End Source File -# Begin Source File - -SOURCE=.\simgear\timing\event.hxx - -!IF "$(CFG)" == "SimGear - Win32 Release" - -# PROP Intermediate_Dir "Release\Lib_sgtiming" - -!ELSEIF "$(CFG)" == "SimGear - Win32 Debug" - -# PROP Intermediate_Dir "Debug\Lib_sgtiming" - -!ENDIF - -# End Source File -# Begin Source File - -SOURCE=.\simgear\timing\# - -!IF "$(CFG)" == "SimGear - Win32 Release" - -# PROP Intermediate_Dir "Release\Lib_sgtiming" - -!ELSEIF "$(CFG)" == "SimGear - Win32 Debug" - -# PROP Intermediate_Dir "Debug\Lib_sgtiming" - -!ENDIF - -# End Source File -# Begin Source File - -SOURCE=.\simgear\timing\fg_timer.cxx - -!IF "$(CFG)" == "SimGear - Win32 Release" - -# PROP Intermediate_Dir "Release\Lib_sgtiming" - -!ELSEIF "$(CFG)" == "SimGear - Win32 Debug" - -# PROP Intermediate_Dir "Debug\Lib_sgtiming" +# PROP Intermediate_Dir "Debug\Lib_sgthreads" !ENDIF # End Source File -# Begin Source File - -SOURCE=.\simgear\timing\fg_timer.hxx - -!IF "$(CFG)" == "SimGear - Win32 Release" - -# PROP Intermediate_Dir "Release\Lib_sgtiming" - -!ELSEIF "$(CFG)" == "SimGear - Win32 Debug" - -# PROP Intermediate_Dir "Debug\Lib_sgtiming" - -!ENDIF - -# End Source File -# Begin Source File - -SOURCE=.\simgear\timing\# - -!IF "$(CFG)" == "SimGear - Win32 Release" - -# PROP Intermediate_Dir "Release\Lib_sgtiming" - -!ELSEIF "$(CFG)" == "SimGear - Win32 Debug" - -# PROP Intermediate_Dir "Debug\Lib_sgtiming" - -!ENDIF - -# End Source File -# Begin Source File - -SOURCE=.\simgear\timing\light.cxx - -!IF "$(CFG)" == "SimGear - Win32 Release" - -# PROP Intermediate_Dir "Release\Lib_sgtiming" - -!ELSEIF "$(CFG)" == "SimGear - Win32 Debug" - -# PROP Intermediate_Dir "Debug\Lib_sgtiming" - -!ENDIF - -# End Source File -# Begin Source File - -SOURCE=.\simgear\timing\light.hxx - -!IF "$(CFG)" == "SimGear - Win32 Release" - -# PROP Intermediate_Dir "Release\Lib_sgtiming" - -!ELSEIF "$(CFG)" == "SimGear - Win32 Debug" - -# PROP Intermediate_Dir "Debug\Lib_sgtiming" - -!ENDIF - -# End Source File -# Begin Source File - -SOURCE=.\simgear\timing\# - -!IF "$(CFG)" == "SimGear - Win32 Release" - -# PROP Intermediate_Dir "Release\Lib_sgtiming" - -!ELSEIF "$(CFG)" == "SimGear - Win32 Debug" - -# PROP Intermediate_Dir "Debug\Lib_sgtiming" - -!ENDIF - -# End Source File -# Begin Source File - -SOURCE=.\simgear\timing\moonpos.cxx - -!IF "$(CFG)" == "SimGear - Win32 Release" - -# PROP Intermediate_Dir "Release\Lib_sgtiming" - -!ELSEIF "$(CFG)" == "SimGear - Win32 Debug" - -# PROP Intermediate_Dir "Debug\Lib_sgtiming" - -!ENDIF - -# End Source File -# Begin Source File - -SOURCE=.\simgear\timing\moonpos.hxx - -!IF "$(CFG)" == "SimGear - Win32 Release" - -# PROP Intermediate_Dir "Release\Lib_sgtiming" - -!ELSEIF "$(CFG)" == "SimGear - Win32 Debug" - -# PROP Intermediate_Dir "Debug\Lib_sgtiming" - -!ENDIF - -# End Source File -# Begin Source File - -SOURCE=.\simgear\timing\# - -!IF "$(CFG)" == "SimGear - Win32 Release" - -# PROP Intermediate_Dir "Release\Lib_sgtiming" - -!ELSEIF "$(CFG)" == "SimGear - Win32 Debug" - -# PROP Intermediate_Dir "Debug\Lib_sgtiming" - -!ENDIF +# End Group +# Begin Group "Lib_sgtiming" -# End Source File +# PROP Default_Filter "" # Begin Source File -SOURCE=.\simgear\timing\sunpos.cxx +SOURCE=.\simgear\timing\geocoord.cxx !IF "$(CFG)" == "SimGear - Win32 Release" @@ -1378,7 +1142,7 @@ SOURCE=.\simgear\timing\sunpos.cxx # End Source File # Begin Source File -SOURCE=.\simgear\timing\sunpos.hxx +SOURCE=.\simgear\timing\lowleveltime.cxx !IF "$(CFG)" == "SimGear - Win32 Release" @@ -1393,7 +1157,7 @@ SOURCE=.\simgear\timing\sunpos.hxx # End Source File # Begin Source File -SOURCE=.\simgear\timing\# +SOURCE=.\simgear\timing\sg_time.cxx !IF "$(CFG)" == "SimGear - Win32 Release" @@ -1408,7 +1172,7 @@ SOURCE=.\simgear\timing\# # End Source File # Begin Source File -SOURCE=.\simgear\timing\timestamp.hxx +SOURCE=.\simgear\timing\timezone.cxx !IF "$(CFG)" == "SimGear - Win32 Release" diff --git a/simgear/io/lowlevel.cxx b/simgear/io/lowlevel.cxx index 638b0666..54ba40c3 100644 --- a/simgear/io/lowlevel.cxx +++ b/simgear/io/lowlevel.cxx @@ -521,29 +521,3 @@ void sgWriteString ( gzFile fd, const char *var ) } -void sgReadVec2 ( gzFile fd, sgVec2 var ) { sgReadFloat ( fd, 2, var ) ; } -void sgWriteVec2 ( gzFile fd, const sgVec2 var ) { - sgWriteFloat ( fd, 2, var ) ; -} - -void sgReadVec3 ( gzFile fd, sgVec3 var ) { sgReadFloat ( fd, 3, var ) ; } -void sgWriteVec3 ( gzFile fd, const sgVec3 var ) { - sgWriteFloat ( fd, 3, var ) ; -} - -void sgReaddVec3 ( gzFile fd, sgdVec3 var ) { sgReadDouble ( fd, 3, var ) ; } -void sgWritedVec3 ( gzFile fd, const sgdVec3 var ) { - sgWriteDouble ( fd, 3, var ) ; -} - -void sgReadVec4 ( gzFile fd, sgVec4 var ) { sgReadFloat ( fd, 4, var ) ; } -void sgWriteVec4 ( gzFile fd, const sgVec4 var ) { - sgWriteFloat ( fd, 4, var ) ; -} - -void sgReadMat4 ( gzFile fd, sgMat4 var ) { - sgReadFloat ( fd, 16, (float *)var ) ; -} -void sgWriteMat4 ( gzFile fd, const sgMat4 var ) { - sgWriteFloat ( fd, 16, (float *)var ) ; -} diff --git a/simgear/io/lowlevel.hxx b/simgear/io/lowlevel.hxx index 979f243b..82e37928 100644 --- a/simgear/io/lowlevel.hxx +++ b/simgear/io/lowlevel.hxx @@ -79,17 +79,40 @@ void sgWriteBytes ( gzFile fd, const unsigned int n, const void *var ) ; void sgReadString ( gzFile fd, char **var ) ; void sgWriteString ( gzFile fd, const char *var ) ; -void sgReadVec2 ( gzFile fd, sgVec2 var ) ; -void sgWriteVec2 ( gzFile fd, const sgVec2 var ) ; -void sgReadVec3 ( gzFile fd, sgVec3 var ) ; -void sgWriteVec3 ( gzFile fd, const sgVec3 var ) ; -void sgReaddVec3 ( gzFile fd, sgdVec3 var ) ; -void sgWritedVec3 ( gzFile fd, const sgdVec3 var ) ; -void sgReadVec4 ( gzFile fd, sgVec4 var ) ; -void sgWriteVec4 ( gzFile fd, const sgVec4 var ) ; - -void sgReadMat4 ( gzFile fd, sgMat4 var ) ; -void sgWriteMat4 ( gzFile fd, const sgMat4 var ) ; +inline void sgReadVec2 ( gzFile fd, sgVec2 var ) { + sgReadFloat ( fd, 2, var ) ; +} +inline void sgWriteVec2 ( gzFile fd, const sgVec2 var ) { + sgWriteFloat ( fd, 2, var ) ; +} + +inline void sgReadVec3 ( gzFile fd, sgVec3 var ) { + sgReadFloat ( fd, 3, var ) ; +} +inline void sgWriteVec3 ( gzFile fd, const sgVec3 var ) { + sgWriteFloat ( fd, 3, var ) ; +} + +inline void sgReaddVec3 ( gzFile fd, sgdVec3 var ) { + sgReadDouble ( fd, 3, var ) ; +} +inline void sgWritedVec3 ( gzFile fd, const sgdVec3 var ) { + sgWriteDouble ( fd, 3, var ) ; +} + +inline void sgReadVec4 ( gzFile fd, sgVec4 var ) { + sgReadFloat ( fd, 4, var ) ; +} +inline void sgWriteVec4 ( gzFile fd, const sgVec4 var ) { + sgWriteFloat ( fd, 4, var ) ; +} + +inline void sgReadMat4 ( gzFile fd, sgMat4 var ) { + sgReadFloat ( fd, 16, (float *)var ) ; +} +inline void sgWriteMat4 ( gzFile fd, const sgMat4 var ) { + sgWriteFloat ( fd, 16, (float *)var ) ; +} void sgClearReadError(); void sgClearWriteError(); -- 2.39.5