Changeset 452 for branches/thune/thread_safe/print.c
- Timestamp:
- 08/19/07 18:31:07 (15 months ago)
- Files:
-
- 1 modified
-
branches/thune/thread_safe/print.c (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/thune/thread_safe/print.c
r450 r452 32 32 33 33 extern int copyUtf16ToAscii( char* dest, const uint16_t* src, int len ); 34 35 36 static char charStr[] = "'?'";37 34 38 35 … … 1047 1044 switch( ur_int(val) ) 1048 1045 { 1049 case '\0':1050 append( out, "'^0'", 4 );1051 break;1052 1053 1046 case '\a': 1054 1047 append( out, "'^(bell)'", 9 ); … … 1080 1073 1081 1074 default: 1082 charStr[1] = (char) ur_int(val); 1083 append(out, charStr, 3); 1075 { 1076 char cstr[ 4 ]; 1077 cstr[0] = '\''; 1078 if( ur_int(val) < 10 ) 1079 { 1080 cstr[1] = '^'; 1081 cstr[2] = ur_int(val) + '0'; 1082 cstr[3] = '\''; 1083 append( out, cstr, 4 ); 1084 } 1085 else 1086 { 1087 cstr[1] = (char) ur_int(val); 1088 cstr[2] = '\''; 1089 append(out, cstr, 3); 1090 } 1091 } 1084 1092 break; 1085 1093 }
