OSSP CVS Repository

ossp - Difference in ossp-pkg/l2/l2_ut_fmtcb.c versions 1.2 and 1.3
Not logged in
[Honeypot]  [Browse]  [Home]  [Login]  [Reports
[Search]  [Ticket]  [Timeline
  [History

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;

CVSTrac 2.0.1