From: Ben Pfaff Date: Tue, 25 Apr 2006 20:13:05 +0000 (+0000) Subject: Don't special-case MS-DOS line ends. X-Git-Tag: v0.6.0~951 X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=eae2d247589bc5154e560e93c9097be7c60037a5;p=pspp-builds.git Don't special-case MS-DOS line ends. --- diff --git a/src/language/data-io/ChangeLog b/src/language/data-io/ChangeLog index d6c0ba3c..9cdd1e54 100644 --- a/src/language/data-io/ChangeLog +++ b/src/language/data-io/ChangeLog @@ -1,3 +1,10 @@ +Tue Apr 25 13:11:55 2006 Ben Pfaff + + * print.c: Don't special-case MS-DOS line terminators. + (macro LINE_END_WIDTH) Removed. + (alloc_line) Line ends are 1 byte. + (print_trns_proc) Just output \n for line end. + Sun Apr 23 22:05:58 2006 Ben Pfaff Continue reforming error message support. In this phase, get rid diff --git a/src/language/data-io/print.c b/src/language/data-io/print.c index 52828400..2479b7c1 100644 --- a/src/language/data-io/print.c +++ b/src/language/data-io/print.c @@ -846,13 +846,6 @@ dump_table (const struct file_handle *fh) tab_submit (t); } -/* PORTME: The number of characters in a line terminator. */ -#ifdef __MSDOS__ -#define LINE_END_WIDTH 2 /* \r\n */ -#else -#define LINE_END_WIDTH 1 /* \n */ -#endif - /* Calculates the maximum possible line width and allocates a buffer big enough to contain it */ static void @@ -891,7 +884,7 @@ alloc_line (void) if (pot_w > w) w = pot_w; } - prt.max_width = w + LINE_END_WIDTH + 1; + prt.max_width = w + 2; prt.line = xmalloc (prt.max_width); } @@ -933,13 +926,7 @@ print_trns_proc (void *trns_, struct ccase *c, int case_num UNUSED) { if ((t->options & PRT_CMD_MASK) == PRT_PRINT || !(t->options & PRT_BINARY)) - { - /* PORTME: Line ends. */ -#ifdef __MSDOS__ - buf[len++] = '\r'; -#endif - buf[len++] = '\n'; - } + buf[len++] = '\n'; dfm_put_record (t->writer, buf, len); }