]> git.cworth.org Git - apitrace/commitdiff
Merge branch 'trace-editing'
authorZack Rusin <zack@kde.org>
Mon, 18 Apr 2011 21:04:01 +0000 (17:04 -0400)
committerZack Rusin <zack@kde.org>
Mon, 18 Apr 2011 21:04:01 +0000 (17:04 -0400)
fixes #1

1  2 
CMakeLists.txt
trace_write.cpp

diff --combined CMakeLists.txt
index 1131ae4c61d62601976e10468fd9ffdd531583cb,0270d979184c2d3003f0a05498301665e0f50c66..a157889e3092e81457fb6aabc030c192b8c4a04b
mode 100755,100644..100755
@@@ -41,9 -41,6 +41,9 @@@ if (MSVC
      # Enable math constants defines
      add_definitions (-D_USE_MATH_DEFINES)
  
 +    # No min/max macros
 +    add_definitions (-DNOMINMAX)
 +
      # Adjust warnings
      add_definitions (-D_CRT_SECURE_NO_DEPRECATE -D_CRT_SECURE_NO_WARNINGS -D_CRT_NONSTDC_NO_WARNINGS)
      add_definitions (-D_SCL_SECURE_NO_DEPRECATE -D_SCL_SECURE_NO_WARNINGS)
@@@ -210,10 -207,10 +210,10 @@@ else (WIN32
      set (glws glws_glx.cpp)
  endif (WIN32)
  
- add_library (trace trace_model.cpp trace_parser.cpp ${os})
+ add_library (trace trace_model.cpp trace_parser.cpp trace_write.cpp ${os})
  
 -add_executable (dump dump.cpp)
 -target_link_libraries (dump trace)
 +add_executable (tracedump tracedump.cpp)
 +target_link_libraries (tracedump trace)
  
  add_custom_command (
      OUTPUT glretrace_gl.cpp
diff --combined trace_write.cpp
index f77a275524a611e76ceea8586806f3819bd45740,7167d35dfb8033b6c60155acd927b7937de1d04b..3187b9972ab1ab125fad58f87199de81a8bc9547
@@@ -148,10 -148,6 +148,6 @@@ void Open(void) 
      }
  }
  
- void Close(void) {
-     _Close();
- }
  static unsigned call_no = 0;
  
  inline bool lookup(std::vector<bool> &map, size_t index) {
@@@ -169,6 -165,15 +165,15 @@@ static std::vector<bool> enums
  static std::vector<bool> bitmasks;
  
  
+ void Close(void) {
+     _Close();
+     call_no = 0;
+     functions = std::vector<bool>();
+     structs = std::vector<bool>();
+     enums = std::vector<bool>();
+     bitmasks = std::vector<bool>();
+ }
  unsigned BeginEnter(const FunctionSig &function) {
      OS::AcquireMutex();
      Open();
@@@ -347,7 -352,7 +352,7 @@@ void Abort(void) 
  } /* namespace Trace */
  
  
 -#ifdef WIN32
 +#ifdef _WIN32
  
  #if 0
  BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved) {