Changeset 117 for trunk/IPs/systemC/Environment/Common
- Timestamp:
- May 16, 2009, 4:42:39 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/IPs/systemC/Environment/Common/include/Debug.h
r114 r117 2 2 #define ENVIRONMENT_COMMON_DEBUG_H 3 3 4 #define DEBUG_true true 4 5 #define DEBUG_ENVIRONMENT true 5 6 #define DEBUG_CACHE true … … 11 12 #define DEBUG_TTY true 12 13 13 # define _cout(component, str...) \ 14 #define MSG_ENVIRONMENT "[ENVIRONMENT]" 15 16 #define __cout(component,str...) \ 14 17 do \ 15 18 { \ 16 if ( DEBUG_ ## component == true ) \ 17 { \ 18 fprintf(stdout,str); \ 19 } \ 19 fprintf(stdout,str); \ 20 20 } \ 21 21 while(0) 22 22 23 # define _cerr(str...)\23 #define __cerr(str...) \ 24 24 do \ 25 25 { \ … … 28 28 while(0) 29 29 30 #define cout(str...) \ 31 do \ 32 { \ 33 fprintf(stdout,"%s ",MSG_ENVIRONMENT); \ 34 __cout(true,str); \ 35 fflush (stdout); \ 36 } \ 37 while(0) 38 39 #define cerr(str...) \ 40 do \ 41 { \ 42 fprintf(stderr,"%s ",MSG_ENVIRONMENT); \ 43 __cerr(str); \ 44 fflush (stderr); \ 45 } \ 46 while(0) 47 48 #define _cout(component, str...) \ 49 do \ 50 { \ 51 if (DEBUG_ ## component == true ) \ 52 { \ 53 cout(str); \ 54 } \ 55 } \ 56 while(0) 57 58 #define _cerr(str...) cerr(str) 59 30 60 #endif
Note: See TracChangeset
for help on using the changeset viewer.