Requested by Ronald Crichton.
See the documentation for the INSERT command in the PSPP manual for
more information.
+ * Text data files that PRINT and WRITE creates now use the system
+ native line ends by default (CRLF on Windows, LF only elsewhere).
+ Use the new ENDS subcommand on FILE HANDLE to override the default.
+
* A new Perl module allows Perl programs to read and write PSPP
system files.
extension) may be used to specify an alternate width. Use a TABWIDTH
of 0 to suppress tab expansion.
-By default, a file written in CHARACTER mode uses line feeds only at
-ends of lines, which is customary on Unix-like system. Specify ENDS
-as CR or CRLF to override the default. PSPP reads files using either
-convention on any kind of system, regardless of ENDS.
+A file written in CHARACTER mode by default uses the line ends of the
+system on which PSPP is running, that is, on Windows, the default is
+CR LF line ends, and on other systems the default is LF only. Specify
+ENDS as CR or CRLF to override the default. PSPP reads files using
+either convention on any kind of system, regardless of ENDS.
@item
In IMAGE mode, the data file is treated as a series of fixed-length
const struct fh_properties *
fh_default_properties (void)
{
+#if defined _WIN32 || defined __WIN32__
+#define DEFAULT_LINE_ENDS FH_END_CRLF
+#else
+#define DEFAULT_LINE_ENDS FH_END_LF
+#endif
+
static const struct fh_properties default_properties
- = {FH_MODE_TEXT, FH_END_LF, 1024, 4, (char *) "Auto"};
+ = {FH_MODE_TEXT, DEFAULT_LINE_ENDS, 1024, 4, (char *) "Auto"};
return &default_properties;
}