Check-in Number:
|
889 | |
Date: |
2001-Sep-07 16:49:08 (local)
2001-Sep-07 14:49:08 (UTC) |
User: | thl |
Branch: | |
Comment: |
better readable text dumping |
Tickets: |
|
Inspections: |
|
Files: |
|
ossp-pkg/l2/l2_ut_fmtcb.c 1.2 -> 1.3
--- l2_ut_fmtcb.c 2001/09/06 14:37:53 1.2
+++ l2_ut_fmtcb.c 2001/09/07 14:49:08 1.3
@@ -96,6 +96,17 @@
*cpO++ = '\\';
*cpO++ = '\\';
}
+ else if (uc == '\t' || uc == '\r' || uc == '\n') {
+ if ((char *)(cpO+1) >= (bufptr+bufsize))
+ return L2_ERR_MEM;
+ *cpO++ = '\\';
+ switch ((int)uc) {
+ case '\t': *cpO++ = 't'; break;
+ case '\r': *cpO++ = 'r'; break;
+ case '\n': *cpO++ = 'n'; break;
+ default: break;
+ }
+ }
else {
if ((char *)(cpO+3) >= (bufptr+bufsize))
return L2_ERR_MEM;
|
|