Changeset d13e27 for src/comm/comm_serial.cpp
- Timestamp:
- Mar 29, 2013, 5:03:13 PM (13 years ago)
- Children:
- f57182
- Parents:
- 5ba22b
- File:
-
- 1 edited
-
src/comm/comm_serial.cpp (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/comm/comm_serial.cpp
r5ba22b rd13e27 126 126 127 127 } 128 129 #ifdef DEBUG_MATRIX_CHECKS130 grid.IsConsistent();131 #endif132 128 } 133 129 … … 168 164 169 165 } 170 171 #ifdef DEBUG_MATRIX_CHECKS172 grid.IsConsistent();173 #endif174 166 } 175 167 … … 192 184 } 193 185 194 void CommSerial::PrintString(const char* format, ...) 195 { 196 va_list args; 197 va_start(args, format); 198 vsprintf(print_buffer, format, args); 199 printf("VMG: %s\n", print_buffer); 200 va_end(args); 201 } 202 203 void CommSerial::PrintStringOnce(const char* format, ...) 204 { 205 va_list args; 206 va_start(args, format); 207 vsprintf(print_buffer, format, args); 208 printf("VMG: %s\n", print_buffer); 209 va_end(args); 186 void CommSerial::Print(const OutputLevel level, const char* format, ...) 187 { 188 bool print = (level == Output); 189 190 #ifdef OUTPUT_INFO 191 print |= (level == Info); 192 #endif 193 #ifdef OUTPUT_DEBUG 194 print |= (level == Debug); 195 #endif 196 #ifdef OUTPUT_TIMING 197 print |= (level == Timing); 198 #endif 199 200 if (print) { 201 va_list args; 202 va_start(args, format); 203 vsprintf(print_buffer, format, args); 204 printf("VMG: %s\n", print_buffer); 205 va_end(args); 206 } 207 } 208 209 void CommSerial::PrintOnce(const OutputLevel level, const char* format, ...) 210 { 211 bool print = (level == Output); 212 213 #ifdef OUTPUT_INFO 214 print |= (level == Info); 215 #endif 216 #ifdef OUTPUT_DEBUG 217 print |= (level == Debug); 218 #endif 219 #ifdef OUTPUT_TIMING 220 print |= (level == Timing); 221 #endif 222 223 if (print) { 224 va_list args; 225 va_start(args, format); 226 vsprintf(print_buffer, format, args); 227 printf("VMG: %s\n", print_buffer); 228 va_end(args); 229 } 210 230 } 211 231 … … 497 517 498 518 if (!out.good()) { 499 #ifdef DEBUG_OUTPUT 500 printf("Multigrid: File %s not accessible.\n", path_str); 501 #endif /* DEBUG_OUTPUT */ 519 Print(Info, "File %s not accessible.", path_str); 502 520 return; 503 521 }
Note:
See TracChangeset
for help on using the changeset viewer.
