Changeset 10042
- Timestamp:
- 04/13/09 11:58:21 (4 years ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
OpenSceneGraph-TrainingMaterials/trunk/Sources/Exercises/utils/runapp/runapp.cpp
r10027 r10042 8 8 #include <stdlib.h> 9 9 10 // #define DEBUG 11 10 12 int main(int argc, char** argv) 11 13 { 12 14 osg::ArgumentParser arguments(&argc, argv); 13 15 14 #if DEBUG16 #ifdef DEBUG 15 17 std::ofstream fout("output.txt"); 16 18 #endif … … 131 133 std::string var = argument.substr(start_pos+2, end_pos-start_pos-2); 132 134 const char* str = getenv(var.c_str()); 133 #if DEBUG134 std::cout<<"for argument = ["<<argument<<"]"<<std::endl;135 std::cout<<"Found ["<<var<<"] = "<<str<<std::endl;135 #ifdef DEBUG 136 fout<<"for argument = ["<<argument<<"]"<<std::endl; 137 fout<<"Found ["<<var<<"] = "<<str<<std::endl; 136 138 #endif 137 139 argument.erase(start_pos, end_pos-start_pos+1); 138 140 argument.insert(start_pos, str); 139 141 140 #if DEBUG141 std::cout<<"new argument = ["<<argument<<"]"<<std::endl;142 #ifdef DEBUG 143 fout<<"new argument = ["<<argument<<"]"<<std::endl; 142 144 #endif 143 145 } … … 157 159 158 160 std::cout<<"Running : "<<runstring<<std::endl; 159 #if DEBUG161 #ifdef DEBUG 160 162 fout<<"Running : "<<runstring<<std::endl; 161 163 #endif … … 176 178 std::cout<<"File : "<<runstring<<std::endl; 177 179 178 #if DEBUG180 #ifdef DEBUG 179 181 fout<<"File : "<<runstring<<std::endl; 180 182 #endif … … 226 228 std::cout<<"Running : "<<runstring<<std::endl; 227 229 228 #if DEBUG230 #ifdef DEBUG 229 231 fout<<"Running : "<<runstring<<std::endl; 230 232 #endif
