changeset 1602:3d9a1b463163

view source: CR separates lines
author corvid <corvid@lavabit.com>
date Fri, 05 Mar 2010 00:54:54 +0000
parents 262bb5afd0f1
children a31eecbe5938
files dpi/vsource.c
diffstat 1 files changed, 4 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/dpi/vsource.c	Thu Mar 04 15:00:50 2010 -0300
+++ b/dpi/vsource.c	Fri Mar 05 00:54:54 2010 +0000
@@ -123,9 +123,11 @@
             a_Dpip_dsh_write_str(sh, 0, line_str);
             old_line = line;
          }
-         if ((p = strpbrk(q, "\n<&"))) {
-            if (*p == '\n') {
+         if ((p = strpbrk(q, "\r\n<&"))) {
+            if (*p == '\r' || *p == '\n') {
                a_Dpip_dsh_write(sh, 0, q, p - q + 1);
+               if (*p == '\r' && p[1] == '\n')
+                  p++;
                ++line;
             } else {
                a_Dpip_dsh_write(sh, 0, q, p - q);