1 ?RCS: $Id: trnl.U 1 2006-08-24 12:32:52Z rmanfredi $
3 ?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
5 ?RCS: You may redistribute only under the terms of the Artistic Licence,
6 ?RCS: as specified in the README file that comes with the distribution.
7 ?RCS: You may reuse parts of this distribution only within the terms of
8 ?RCS: that same Artistic Licence; a copy of which may be found at the root
9 ?RCS: of the source tree for dist 4.0.
11 ?RCS: Copyright (c) 1998 Andy Dougherty
13 ?RCS: Original author Jarkko Hietaniemi <jhi@iki.fi>
14 ?RCS: Merged into dist by Andy Dougherty July 13, 1998
17 ?MAKE: -pick add $@ %<
19 ?S: This variable contains the value to be passed to the tr(1)
20 ?S: command to transliterate a newline. Typical values are
21 ?S: '\012' and '\n'. This is needed for EBCDIC systems where
22 ?S: newline is not necessarily '\012'.
25 : Find the appropriate value for a newline for tr
27 ?X: We can't use $tr since that would cause a circular dependency via Myread
28 ?X: dos djgpp uses '\015\012', but reportedly is happy with '\012' in the
29 ?X: tr command. I don't know why it passes the '\n' test but later
30 ?X: refuses to work correctly with it. --AD 6/14/98
31 if test -n "$DJGPP"; then
34 if test X"$trnl" = X; then
35 case "`echo foo | tr '\n' x 2>/dev/null`" in
39 if test X"$trnl" = X; then
40 case "`echo foo | tr '\012' x 2>/dev/null`" in
44 if test X"$trnl" = X; then
45 case "`echo foo | tr '\r\n' xy 2>/dev/null`" in
49 if test X"$trnl" = X; then
52 $me: Fatal Error: cannot figure out how to translate newlines with 'tr'.
57 echo "We'll use '$trnl' to transliterate a newline."