[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: DD converts LF -> CR / LF
From: |
Paul Eggert |
Subject: |
Re: DD converts LF -> CR / LF |
Date: |
Fri, 06 May 2005 11:01:13 -0700 |
User-agent: |
Gnus/5.1006 (Gnus v5.10.6) Emacs/21.4 (gnu/linux) |
That looks pretty complicated. How about if we just rely on "open"
and "fcntl" to do the work? If they don't work, they should.
I installed this into coreutils:
2005-05-06 Paul Eggert <address@hidden>
* NEWS: dd has new iflag= and oflag= flags "binary" and "text".
* doc/coreutils.texi (dd invocation): Document it.
* src/dd.c (flags, usage): Support it.
Index: NEWS
===================================================================
RCS file: /fetish/cu/NEWS,v
retrieving revision 1.285
diff -p -u -r1.285 NEWS
--- NEWS 4 May 2005 17:22:08 -0000 1.285
+++ NEWS 6 May 2005 17:53:12 -0000
@@ -127,6 +127,9 @@ GNU coreutils NEWS
chmod -w now complains if its behavior differs from what chmod a-w
would do, and similarly for chmod -r, chmod -x, etc.
+ dd has new iflag= and oflag= flags "binary" and "text", which have an
+ effect only on nonstandard platforms that distinguish text from binary I/O.
+
join now supports a NUL field separator, e.g., "join -t '\0'".
join now detects and reports incompatible options, e.g., "join -t x -t y",
Index: doc/coreutils.texi
===================================================================
RCS file: /fetish/cu/doc/coreutils.texi,v
retrieving revision 1.255
diff -p -u -r1.255 coreutils.texi
--- doc/coreutils.texi 4 May 2005 17:24:49 -0000 1.255
+++ doc/coreutils.texi 6 May 2005 17:53:20 -0000
@@ -6881,6 +6881,18 @@ This has no effect when the file is not
On many hosts (e.g., @acronym{GNU}/Linux hosts), this option has no effect
at all.
address@hidden binary
address@hidden binary
address@hidden binary I/O
+Use binary I/O. This option has an effect only on nonstandard
+platforms that distinguish binary from text I/O.
+
address@hidden text
address@hidden text
address@hidden text I/O
+Use text I/O. Like @samp{binary}, this option has no effect on
+standard platforms.
+
@end table
These flags are not supported on all systems, and @samp{dd} rejects
Index: src/dd.c
===================================================================
RCS file: /fetish/cu/src/dd.c,v
retrieving revision 1.178
diff -p -u -r1.178 dd.c
--- src/dd.c 18 Apr 2005 07:03:50 -0000 1.178
+++ src/dd.c 6 May 2005 17:53:21 -0000
@@ -251,12 +251,14 @@ static struct symbol_value const convers
static struct symbol_value const flags[] =
{
{"append", O_APPEND},
+ {"binary", O_BINARY},
{"direct", O_DIRECT},
{"dsync", O_DSYNC},
{"noctty", O_NOCTTY},
{"nofollow", O_NOFOLLOW},
{"nonblock", O_NONBLOCK},
{"sync", O_SYNC},
+ {"text", O_TEXT},
{"", 0}
};
@@ -458,6 +460,10 @@ Each FLAG symbol may be:\n\
if (O_NOCTTY)
fputs (_(" noctty do not assign controlling terminal from file\n"),
stdout);
+ if (O_BINARY)
+ fputs (_(" binary use binary I/O for data\n"), stdout);
+ if (O_TEXT)
+ fputs (_(" text use text I/O for data\n"), stdout);
{
char const *siginfo_name = (SIGINFO == SIGUSR1 ? "USR1" : "INFO");
- Re: DD converts LF -> CR / LF, Eric Blake, 2005/05/06
- Re: DD converts LF -> CR / LF, Brian Dessent, 2005/05/06
- Re: DD converts LF -> CR / LF,
Paul Eggert <=
- Re: DD converts LF -> CR / LF, Eric Blake, 2005/05/07
- Re: DD converts LF -> CR / LF, Sebastian Schuberth, 2005/05/08
- Re: DD converts LF -> CR / LF, Paul Eggert, 2005/05/08
- Re: DD converts LF -> CR / LF, Sebastian Schuberth, 2005/05/08
- Re: DD converts LF -> CR / LF, Christopher Faylor, 2005/05/09
- Re: DD converts LF -> CR / LF, Eric Blake, 2005/05/09