Changeset 15089
- Timestamp:
- 05/23/13 20:50:29 (12 years ago)
- Location:
- issm/trunk-jpl/src/c/shared/io/Print
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk-jpl/src/c/shared/io/Print/Print.h
r14910 r15089 24 24 /*}}}*/ 25 25 /* _printLine_ {{{*/ 26 /* macro to print a line, adds std::endl */26 /* macro to print a line, adds std::endl, only on cpu 0 */ 27 27 #define _printLine_(StreamArgs)\ 28 do{std::cout << StreamArgs << std::endl;}while(0) 28 do{std::ostringstream aLoNgAnDwEiRdLoCaLnAmeFoRtHiSmAcRoOnLy; \ 29 aLoNgAnDwEiRdLoCaLnAmeFoRtHiSmAcRoOnLy << StreamArgs << std::ends; \ 30 PrintfFunction3(aLoNgAnDwEiRdLoCaLnAmeFoRtHiSmAcRoOnLy.str());}while(0) 29 31 /*}}}*/ 30 32 /* _printString_ {{{*/ 31 /* macro to print some string */33 /* macro to print some string. Only on cpu0 */ 32 34 #define _printString_(StreamArgs)\ 33 do{std::cout << StreamArgs;}while(0) 35 do{std::ostringstream aLoNgAnDwEiRdLoCaLnAmeFoRtHiSmAcRoOnLy; \ 36 aLoNgAnDwEiRdLoCaLnAmeFoRtHiSmAcRoOnLy << StreamArgs << std::ends; \ 37 PrintfFunction4(aLoNgAnDwEiRdLoCaLnAmeFoRtHiSmAcRoOnLy.str());}while(0) 34 38 /*}}}*/ 35 39 /* _pprintLine_ {{{*/ … … 52 56 int PrintfFunction(const string & message); 53 57 int PrintfFunction2(const string & message); 58 int PrintfFunction3(const string & message); 59 int PrintfFunction4(const string & message); 54 60 55 61 #endif -
issm/trunk-jpl/src/c/shared/io/Print/PrintfFunction.cpp
r14950 r15089 87 87 return 1; 88 88 } 89 int PrintfFunction3(const string & message){ 90 91 #ifdef _HAVE_ANDROID_JNI_ 92 __android_log_print(ANDROID_LOG_INFO, "Native",message.c_str()); 93 #else 94 printf("%s\n",message.c_str()); 95 #endif 96 97 return 1; 98 } 99 int PrintfFunction4(const string & message){ 100 101 printf("%s",message.c_str()); 102 103 return 1; 104 }
Note:
See TracChangeset
for help on using the changeset viewer.