From unknown Sun Jun 22 04:20:19 2025 X-Loop: help-debbugs@gnu.org Subject: bug#7085: fmt (GNU coreutils) 6.10 Resent-From: "Denis M. Wilson" Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-coreutils@gnu.org Resent-Date: Wed, 22 Sep 2010 20:23:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 7085 X-GNU-PR-Package: coreutils X-GNU-PR-Keywords: To: 7085@debbugs.gnu.org X-Debbugs-Original-To: bug-coreutils@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.128518694516095 (code B ref -1); Wed, 22 Sep 2010 20:23:01 +0000 Received: (at submit) by debbugs.gnu.org; 22 Sep 2010 20:22:25 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OyVpg-0004BY-Rf for submit@debbugs.gnu.org; Wed, 22 Sep 2010 16:22:25 -0400 Received: from eggs.gnu.org ([140.186.70.92]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OyVQB-00040M-Ru for submit@debbugs.gnu.org; Wed, 22 Sep 2010 15:56:04 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OyVSg-0007TK-Ii for submit@debbugs.gnu.org; Wed, 22 Sep 2010 15:58:39 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_LOW autolearn=unavailable version=3.3.1 Received: from lists.gnu.org ([199.232.76.165]:42571) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OyVSg-0007TD-H1 for submit@debbugs.gnu.org; Wed, 22 Sep 2010 15:58:38 -0400 Received: from [140.186.70.92] (port=48748 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OyVSe-0008FQ-DG for bug-coreutils@gnu.org; Wed, 22 Sep 2010 15:58:38 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OyVSd-0007SG-7R for bug-coreutils@gnu.org; Wed, 22 Sep 2010 15:58:36 -0400 Received: from relay.pcl-ipout02.plus.net ([212.159.7.100]:41687) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OyVSd-0007Rt-3b for bug-coreutils@gnu.org; Wed, 22 Sep 2010 15:58:35 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AikFAGv8mUzUnw4S/2dsb2JhbACUN411ccVXhUEEjTY Received: from outmx06.plus.net ([212.159.14.18]) by relay.pcl-ipout02.plus.net with ESMTP; 22 Sep 2010 20:58:32 +0100 Received: from [87.115.128.243] (helo=dell-desktop.example.com) by outmx06.plus.net with esmtp (Exim) id 1OyVSZ-0008UH-NN for bug-coreutils@gnu.org; Wed, 22 Sep 2010 20:58:31 +0100 Date: Wed, 22 Sep 2010 20:59:06 +0100 From: "Denis M. Wilson" Message-ID: <20100922205906.790ce9be@dell-desktop.example.com> X-Mailer: Claws Mail 3.3.1 (GTK+ 2.12.9; i486-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) X-Spam-Score: -6.6 (------) X-Mailman-Approved-At: Wed, 22 Sep 2010 16:22:22 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -6.6 (------) This program does not deal properly with CRLF terminators. Gratuitous CRs are left in joined lines; they should be removed. The user may want to keep the CRLF style or change to Unix (LF). There should be an option for this. Denis M. Wilson -- From unknown Sun Jun 22 04:20:19 2025 X-Loop: help-debbugs@gnu.org Subject: bug#7085: fmt (GNU coreutils) 6.10 Resent-From: Eric Blake Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-coreutils@gnu.org Resent-Date: Wed, 22 Sep 2010 21:06:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 7085 X-GNU-PR-Package: coreutils X-GNU-PR-Keywords: To: "Denis M. Wilson" Cc: 7085@debbugs.gnu.org Received: via spool by 7085-submit@debbugs.gnu.org id=B7085.128518953017322 (code B ref 7085); Wed, 22 Sep 2010 21:06:02 +0000 Received: (at 7085) by debbugs.gnu.org; 22 Sep 2010 21:05:30 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OyWVN-0004VL-UM for submit@debbugs.gnu.org; Wed, 22 Sep 2010 17:05:30 -0400 Received: from mx1.redhat.com ([209.132.183.28]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OyWVL-0004VF-4g for 7085@debbugs.gnu.org; Wed, 22 Sep 2010 17:05:28 -0400 Received: from int-mx03.intmail.prod.int.phx2.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.16]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o8ML822i014802 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Wed, 22 Sep 2010 17:08:02 -0400 Received: from [10.3.113.109] (ovpn-113-109.phx2.redhat.com [10.3.113.109]) by int-mx03.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id o8ML81oQ001156; Wed, 22 Sep 2010 17:08:01 -0400 Message-ID: <4C9A7031.8070407@redhat.com> Date: Wed, 22 Sep 2010 15:08:01 -0600 From: Eric Blake Organization: Red Hat User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.9) Gecko/20100907 Fedora/3.1.3-1.fc13 Mnenhy/0.8.3 Thunderbird/3.1.3 MIME-Version: 1.0 References: <20100922205906.790ce9be@dell-desktop.example.com> In-Reply-To: <20100922205906.790ce9be@dell-desktop.example.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.67 on 10.5.11.16 X-Spam-Score: -8.8 (--------) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -10.1 (----------) On 09/22/2010 01:59 PM, Denis M. Wilson wrote: > This program does not deal properly with CRLF terminators. > Gratuitous CRs are left in joined lines; they should be > removed. The user may want to keep the CRLF style or change > to Unix (LF). There should be an option for this. Thanks for the report. POSIX is clear that CR is data and not a line terminator, so the existing behavior (in the absence of any new command-line option) is correct. Now, we have a philosphy question - is it better to teach fmt a new command line option, and then have to wait for a new enough coreutils installation to propagate to various machines where you plan on using that extension, or is it better to use existing tools that are already portable according to POSIX and do the job now? If you answered this question the same as me, then a solution that works now is favorable, so it becomes a question of massaging your files to get rid of the CR characters prior to using fmt on the file. Something as simple as: tr -d '\r' < file > file.out && mv file.out file will do the trick. Other common wrappers, like dos2unix, exist to make this sanitization process even easier. So, I'm reluctant to add such a feature myself, and it will take some pretty strong arguments (such as existing practice in other fmt implementations) to convince me that a new option is worthwhile. Meanwhile, you may want to consider upgrading to a newer coreutils; the latest stable version is 8.5, with a number of bug fixes in various tools. -- Eric Blake eblake@redhat.com +1-801-349-2682 Libvirt virtualization library http://libvirt.org From unknown Sun Jun 22 04:20:19 2025 X-Loop: help-debbugs@gnu.org Subject: bug#7085: fmt (GNU coreutils) 6.10 Resent-From: William Plusnick Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-coreutils@gnu.org Resent-Date: Mon, 27 Sep 2010 22:24:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 7085 X-GNU-PR-Package: coreutils X-GNU-PR-Keywords: To: "Denis M. Wilson" Cc: 7085@debbugs.gnu.org Received: via spool by 7085-submit@debbugs.gnu.org id=B7085.12856262038021 (code B ref 7085); Mon, 27 Sep 2010 22:24:01 +0000 Received: (at 7085) by debbugs.gnu.org; 27 Sep 2010 22:23:23 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1P0M6U-00025K-A0 for submit@debbugs.gnu.org; Mon, 27 Sep 2010 18:23:22 -0400 Received: from mail-qy0-f172.google.com ([209.85.216.172]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1P0M6T-00025F-AH for 7085@debbugs.gnu.org; Mon, 27 Sep 2010 18:23:22 -0400 Received: by qyk1 with SMTP id 1so5419570qyk.3 for <7085@debbugs.gnu.org>; Mon, 27 Sep 2010 15:26:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:cc:content-type; bh=tluJWJcAjHPn4LBWjJ0lImV/Ixw+VwmK86EkPp7SVaw=; b=pcPQbMgPMPoTvnetuknxHRPtmG8v7CX4xWCVOZaWVh3jGYpzYbajtgE2niqd/hdfwA N7LoYFnldSW9i8hVc5r1IijMJWp93OQRoR9kSl/zVi6V+0RkILv344EUSKJRyUMn90Gh jo2doUwEhds4xjKJmu/0DZknAUon0sDpHISkw= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; b=h/SZt09/X8H3VQiES0fXCFmK+aAKK1XT0uSJZHp83NqzzVRz5KOPdJWBJVvYzeeNC0 aJQyK+/Ydm8JJwgF0UO/4Xu7U/CLwpgDroaApy8yF5WZFHbaGFqn/MsElYqoHNqkls8H 3p3/9geu1lsQil470voA8NTVOeN5HbVqE9ZtY= MIME-Version: 1.0 Received: by 10.229.2.7 with SMTP id 7mr5996309qch.277.1285626369713; Mon, 27 Sep 2010 15:26:09 -0700 (PDT) Received: by 10.229.242.6 with HTTP; Mon, 27 Sep 2010 15:26:09 -0700 (PDT) In-Reply-To: <20100922205906.790ce9be@dell-desktop.example.com> References: <20100922205906.790ce9be@dell-desktop.example.com> Date: Mon, 27 Sep 2010 17:26:09 -0500 Message-ID: From: William Plusnick Content-Type: multipart/alternative; boundary=00148537acda14c48d049145370c X-Spam-Score: -1.6 (-) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.6 (--) --00148537acda14c48d049145370c Content-Type: text/plain; charset=ISO-8859-1 On Wed, Sep 22, 2010 at 2:59 PM, Denis M. Wilson wrote: > This program does not deal properly with CRLF terminators. > Gratuitous CRs are left in joined lines; they should be > removed. The user may want to keep the CRLF style or change > to Unix (LF). There should be an option for this. > > Denis M. Wilson > > -- > > > > Here is a patch that I wrote because I was bored today (I finished all my homework this weekend :^p) that will remove CRs from lines ending in CRLF. I must warn you that I didn't add documentation to the --help (and by implication the man page) or to the texi files. I did this to minimize the number of changes, so as to become less likely to conflict with future commits, since this is most likely not going into the mainstream repository. You invoke it like this: fmt -d [file] or alternatively: fmt --dos [file] The reason I sent this to everyone and not just Denis Wilson is that I wanted to be able to point to it in the future if people want this feature and are willing to risk future incompatibility. I believe it works, though I haven't tested it too throughly. Though Valgrind doesn't complain and it seems to do the job. (I downloaded a file written on MS-DOS and it ran it through via: 'fmt -d file.txt' and it works on it.) Hope this helps someone, William >From 12a2bee879e3c803f872fe1960a1dedaed485d10 Mon Sep 17 00:00:00 2001 From: Patrick W. Plusnick II Date: Mon, 27 Sep 2010 16:57:06 -0500 Subject: [PATCH] fmt: added the -d option so that it removes Carriage Returns from MS-DOS files * src/fmt.c: simply removes the Carriage Returns from lines ending with CRLF. --- src/fmt.c | 13 +++++++++++-- 1 files changed, 11 insertions(+), 2 deletions(-) diff --git a/src/fmt.c b/src/fmt.c index 8a5d8bd..9150f43 100644 --- a/src/fmt.c +++ b/src/fmt.c @@ -173,6 +173,8 @@ static void put_space (int space); /* If true, first 2 lines may have different indent (default false). */ static bool crown; +/* If true, Removes the CR out of CRLFs. Mainly for MS-DOS files */ +static bool trunc_crlf; /* If true, first 2 lines _must_ have different indent (default false). */ static bool tagged; @@ -304,6 +306,7 @@ With no FILE, or when FILE is -, read standard input.\n"), static struct option const long_options[] = { {"crown-margin", no_argument, NULL, 'c'}, + {"dos", no_argument, NULL, 'd'}, {"prefix", required_argument, NULL, 'p'}, {"split-only", no_argument, NULL, 's'}, {"tagged-paragraph", no_argument, NULL, 't'}, @@ -329,7 +332,7 @@ main (int argc, char **argv) atexit (close_stdout); - crown = tagged = split = uniform = false; + crown = trunc_crlf = tagged = split = uniform = false; max_width = WIDTH; prefix = ""; prefix_length = prefix_lead_space = prefix_full_length = 0; @@ -345,7 +348,7 @@ main (int argc, char **argv) argc--; } - while ((optchar = getopt_long (argc, argv, "0123456789cstuw:p:", + while ((optchar = getopt_long (argc, argv, "0123456789cdstuw:p:", long_options, NULL)) != -1) switch (optchar) @@ -361,6 +364,10 @@ main (int argc, char **argv) crown = true; break; + case 'd': + trunc_crlf = true; + break; + case 's': split = true; break; @@ -691,6 +698,8 @@ get_line (FILE *f, int c) word_limit++; } while (c != '\n' && c != EOF); + if (c == '\n' && *(wptr-1) == '\r' && trunc_crlf) + *--wptr = '\n'; return get_prefix (f); } -- 1.7.0.4 --00148537acda14c48d049145370c Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable

On Wed, Sep 22, 2010 at 2:59 PM, Denis M= . Wilson <dm= w@oxytropis.plus.com> wrote:
This program does not deal properly with CRLF terminators.
Gratuitous CRs are left in joined lines; they should be
removed. The user may want to keep the CRLF style or change
to Unix (LF). There should be an option for this.

Denis M. Wilson

--



Here is a patch that I wrote because I was bored = today (I finished all my homework this weekend :^p) that will remove CRs fr= om lines ending in CRLF. I must warn you that I didn't add documentatio= n to the --help (and by implication the man page) or to the texi files. I d= id this to minimize the number of changes, so as to become less likely to c= onflict with future commits, since this is most likely not going into the m= ainstream repository. You invoke it like this:
fmt -d [file]

or alternatively:
fmt --dos [file]

The reaso= n I sent this to everyone and not just Denis Wilson is that I wanted to be = able to point to it in the future if people want this feature and are willi= ng to risk future incompatibility.

I believe it works, though I haven't tested it too throughly. Thoug= h Valgrind doesn't complain and it seems to do the job. (I downloaded a= file written on MS-DOS and it ran it through via: 'fmt -d file.txt'= ; and it works on it.)

Hope this helps someone,
William
From 1= 2a2bee879e3c803f872fe1960a1dedaed485d10 Mon Sep 17 00:00:00 2001
From: P= atrick W. Plusnick II <pwplusni= ck2@gmail.com>
Date: Mon, 27 Sep 2010 16:57:06 -0500
Subject: [PATCH] fmt: added the -d= option so that it removes Carriage Returns from MS-DOS files

* src/= fmt.c: simply removes the Carriage Returns from lines ending with CRLF.
---
=A0src/fmt.c |=A0=A0 13 +++++++++++--
=A01 files changed, 11 inse= rtions(+), 2 deletions(-)

diff --git a/src/fmt.c b/src/fmt.c
inde= x 8a5d8bd..9150f43 100644
--- a/src/fmt.c
+++ b/src/fmt.c
@@ -173,= 6 +173,8 @@ static void put_space (int space);
=A0/* If true, first 2 lines may have different indent (default false).=A0 = */
=A0static bool crown;
=A0
+/* If true, Removes the CR out of CR= LFs. Mainly for MS-DOS files */
+static bool trunc_crlf;
=A0/* If tru= e, first 2 lines _must_ have different indent (default false).=A0 */
=A0static bool tagged;
=A0
@@ -304,6 +306,7 @@ With no FILE, or when = FILE is -, read standard input.\n"),
=A0static struct option const = long_options[] =3D
=A0{
=A0=A0 {"crown-margin", no_argument= , NULL, 'c'},
+=A0 {"dos", no_argument, NULL, 'd'},
=A0=A0 {"pr= efix", required_argument, NULL, 'p'},
=A0=A0 {"split-o= nly", no_argument, NULL, 's'},
=A0=A0 {"tagged-paragra= ph", no_argument, NULL, 't'},
@@ -329,7 +332,7 @@ main (int argc, char **argv)
=A0
=A0=A0 atexit (c= lose_stdout);
=A0
-=A0 crown =3D tagged =3D split =3D uniform =3D fal= se;
+=A0 crown =3D trunc_crlf =3D tagged =3D split =3D uniform =3D false= ;
=A0=A0 max_width =3D WIDTH;
=A0=A0 prefix =3D "";
=A0=A0 prefix_length =3D prefix_lead_spa= ce =3D prefix_full_length =3D 0;
@@ -345,7 +348,7 @@ main (int argc, cha= r **argv)
=A0=A0=A0=A0=A0=A0 argc--;
=A0=A0=A0=A0 }
=A0
-=A0 wh= ile ((optchar =3D getopt_long (argc, argv, "0123456789cstuw:p:",<= br> +=A0 while ((optchar =3D getopt_long (argc, argv, "0123456789cdstuw:p:= ",
=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 long_options, NULL))
=A0=A0=A0=A0= =A0=A0=A0=A0=A0 !=3D -1)
=A0=A0=A0=A0 switch (optchar)
@@ -361,6 +364= ,10 @@ main (int argc, char **argv)
=A0=A0=A0=A0=A0=A0=A0=A0 crown =3D true;
=A0=A0=A0=A0=A0=A0=A0=A0 break;=
=A0
+=A0=A0=A0=A0=A0 case 'd':
+=A0=A0=A0=A0=A0=A0=A0 tru= nc_crlf =3D true;
+=A0=A0=A0 break;
+
=A0=A0=A0=A0=A0=A0 case '= ;s':
=A0=A0=A0=A0=A0=A0=A0=A0 split =3D true;
=A0=A0=A0=A0=A0=A0= =A0=A0 break;
@@ -691,6 +698,8 @@ get_line (FILE *f, int c)
=A0=A0=A0=A0=A0=A0 word_limit++;
=A0=A0=A0=A0 }
=A0=A0 while (c !=3D = '\n' && c !=3D EOF);
+=A0 if (c =3D=3D '\n' &= ;& *(wptr-1) =3D=3D '\r' && trunc_crlf)
+=A0=A0=A0 *= --wptr =3D '\n';
=A0=A0 return get_prefix (f);
=A0}
=A0
--
1.7.0.4



--00148537acda14c48d049145370c-- From unknown Sun Jun 22 04:20:19 2025 X-Loop: help-debbugs@gnu.org Subject: bug#7085: fmt (GNU coreutils) 6.10 Resent-From: William Plusnick Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-coreutils@gnu.org Resent-Date: Mon, 27 Sep 2010 23:21:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 7085 X-GNU-PR-Package: coreutils X-GNU-PR-Keywords: To: "Denis M. Wilson" Cc: 7085@debbugs.gnu.org Received: via spool by 7085-submit@debbugs.gnu.org id=B7085.12856296599544 (code B ref 7085); Mon, 27 Sep 2010 23:21:02 +0000 Received: (at 7085) by debbugs.gnu.org; 27 Sep 2010 23:20:59 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1P0N0E-0002Tt-78 for submit@debbugs.gnu.org; Mon, 27 Sep 2010 19:20:58 -0400 Received: from mail-qy0-f179.google.com ([209.85.216.179]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1P0N0C-0002To-5J for 7085@debbugs.gnu.org; Mon, 27 Sep 2010 19:20:56 -0400 Received: by qyk2 with SMTP id 2so6428979qyk.3 for <7085@debbugs.gnu.org>; Mon, 27 Sep 2010 16:23:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:cc:content-type; bh=jSh8UGloHMr2oDQ4UwyA4d/GgG9arGCEsS9yTJjMIBw=; b=mPvS8SvAaXHpAh/NDpsiG0wEcdkoOywCMW266zy3h79SQceuZh/bovFK9O24m5XLyy +CneXzJ8vFc1AAHNZpOdmgFTRByYjim+VYgop34mJdmTNQps01xWF/GxZQnQMc5Alrw9 8PyErUoML8Ns46/PXJVN5hej6rkUw8KJbgtqQ= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; b=t0p2DDzKOT737ZKI3MT1CqLgUjWTZW8PFi4IhuoEOxp4iq5d+mT6pjHa1KgPz2I6/2 KBRMjwLKlAQNzh7LfYzjtMQGU5IFUEi9maEpBN2quMCUuAgl03fAzreMjQKT7n7PqFH1 7NGFlXYmEr5+/Ak8iBTmlBVQuVVKtCLwy5cYc= MIME-Version: 1.0 Received: by 10.229.95.66 with SMTP id c2mr6324659qcn.85.1285629824778; Mon, 27 Sep 2010 16:23:44 -0700 (PDT) Received: by 10.229.242.6 with HTTP; Mon, 27 Sep 2010 16:23:44 -0700 (PDT) In-Reply-To: References: <20100922205906.790ce9be@dell-desktop.example.com> Date: Mon, 27 Sep 2010 18:23:44 -0500 Message-ID: From: William Plusnick Content-Type: multipart/alternative; boundary=00163642753f04c278049146059a X-Spam-Score: -2.6 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.6 (--) --00163642753f04c278049146059a Content-Type: text/plain; charset=ISO-8859-1 > > I believe it works, though I haven't tested it too throughly. Though > Valgrind doesn't complain and it seems to do the job. (I downloaded a file > written on MS-DOS and it ran it through via: 'fmt -d file.txt' and it works > on it.) > Well this is a bit embarrassing, it appears that my patch does indeed change the output a bit that was subtle in the particular file I was working with and it is obvious as to why now. Oh well, that is what I get for not testing much. So it is indeed a broken, unofficial feature. I'll try to fix it, William --00163642753f04c278049146059a Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
I believe it works, though I haven't tested it too throughly.= Though Valgrind doesn't complain and it seems to do the job. (I downlo= aded a file written on MS-DOS and it ran it through via: 'fmt -d file.t= xt' and it works on it.)

Well this is a bit embarrassing, it appears that my = patch does indeed change the output a bit that was subtle in the particular= file I was working with and it is obvious as to why now. Oh well, that is = what I get for not testing much.

So it is indeed a broken, unofficial feature.

I'll try to fi= x it,
William
--00163642753f04c278049146059a-- From unknown Sun Jun 22 04:20:19 2025 X-Loop: help-debbugs@gnu.org Subject: bug#7085: fmt (GNU coreutils) 6.10 Resent-From: Bob Proulx Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-coreutils@gnu.org Resent-Date: Tue, 28 Sep 2010 03:26:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 7085 X-GNU-PR-Package: coreutils X-GNU-PR-Keywords: To: William Plusnick Cc: 7085@debbugs.gnu.org, "Denis M. Wilson" Received: via spool by 7085-submit@debbugs.gnu.org id=B7085.128564431315530 (code B ref 7085); Tue, 28 Sep 2010 03:26:01 +0000 Received: (at 7085) by debbugs.gnu.org; 28 Sep 2010 03:25:13 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1P0Qob-00042R-3D for submit@debbugs.gnu.org; Mon, 27 Sep 2010 23:25:13 -0400 Received: from joseki.proulx.com ([216.17.153.58]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1P0QoZ-00042M-PL for 7085@debbugs.gnu.org; Mon, 27 Sep 2010 23:25:12 -0400 Received: from hysteria.proulx.com (hysteria.proulx.com [192.168.230.119]) by joseki.proulx.com (Postfix) with ESMTP id 5433921310; Mon, 27 Sep 2010 21:28:00 -0600 (MDT) Received: by hysteria.proulx.com (Postfix, from userid 1000) id 3FFC32DCBE; Mon, 27 Sep 2010 21:28:00 -0600 (MDT) Date: Mon, 27 Sep 2010 21:28:00 -0600 From: Bob Proulx Message-ID: <20100928032800.GA6198@hysteria.proulx.com> References: <20100922205906.790ce9be@dell-desktop.example.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.20 (2009-06-14) X-Spam-Score: -1.1 (-) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.4 (--) William Plusnick wrote: > The reason I sent this to everyone and not just Denis Wilson is that I > wanted to be able to point to it in the future if people want this feature > and are willing to risk future incompatibility. Isn't the more modular flow that Eric suggested more in keeping with the Unix philosophy and the better solution? If you want to do both stripping of carriage returns and word wrapping together then you can pipe them together. tr -d '\r' < somefile | fmt Or if you are calling it as a stdin filter such as within an editor: tr -d '\r' | fmt Bob From unknown Sun Jun 22 04:20:19 2025 X-Loop: help-debbugs@gnu.org Subject: bug#7085: fmt (GNU coreutils) 6.10 Resent-From: William Plusnick Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-coreutils@gnu.org Resent-Date: Wed, 29 Sep 2010 20:18:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 7085 X-GNU-PR-Package: coreutils X-GNU-PR-Keywords: To: Bob Proulx Cc: 7085@debbugs.gnu.org Received: via spool by 7085-submit@debbugs.gnu.org id=B7085.12857914602734 (code B ref 7085); Wed, 29 Sep 2010 20:18:02 +0000 Received: (at 7085) by debbugs.gnu.org; 29 Sep 2010 20:17:40 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1P135v-0000i3-Ri for submit@debbugs.gnu.org; Wed, 29 Sep 2010 16:17:40 -0400 Received: from mail-qy0-f172.google.com ([209.85.216.172]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1P135u-0000hy-3b for 7085@debbugs.gnu.org; Wed, 29 Sep 2010 16:17:38 -0400 Received: by qyk31 with SMTP id 31so1393677qyk.3 for <7085@debbugs.gnu.org>; Wed, 29 Sep 2010 13:20:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=8TT/Xfgg6v0ya86rDmA5Phghj1eOwjamg8qtvMwaygs=; b=abRtWhPCBwo5lIIJvNDeB9UwF2yk8rFk0k7Gk1RZQpQbzAEuZ1GeTaUGoD+xU1knVr ZGhUl6LemY8RzSwohAH4sROLj2ntEyWQ2h9nxbty+u7bsJyhTqnMgqwAS6Flk7EGpfaV 1Q2CeZamXWwtXGhe2j33BKe+HLHHKmzouXxks= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=hItH8ftZoE+/LGiJo2txvPMx3xmrMAKZSU2k6kTTtHVAwNgYZ2YT2chtDS7NEU4+Qa 2MVpWJTB7tZdU+x/9AVvhIDsoLAv1WfsTrTJi8PMpX42RfxLBbFzjTc2VURPYt6Kh1RZ fgUVe9NjCDtUQqAjfQLQAfOKMMPhMoUm+LWSE= MIME-Version: 1.0 Received: by 10.224.37.14 with SMTP id v14mr1578181qad.298.1285791631683; Wed, 29 Sep 2010 13:20:31 -0700 (PDT) Received: by 10.229.242.6 with HTTP; Wed, 29 Sep 2010 13:20:31 -0700 (PDT) In-Reply-To: <20100928032800.GA6198@hysteria.proulx.com> References: <20100922205906.790ce9be@dell-desktop.example.com> <20100928032800.GA6198@hysteria.proulx.com> Date: Wed, 29 Sep 2010 15:20:31 -0500 Message-ID: From: William Plusnick Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -1.4 (-) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.5 (--) > Isn't the more modular flow that Eric suggested more in keeping with > the Unix philosophy and the better solution? =A0If you want to do both > stripping of carriage returns and word wrapping together then you can > pipe them together. > > =A0tr -d '\r' < somefile | fmt > > Or if you are calling it as a stdin filter such as within an editor: > > =A0tr -d '\r' | fmt > > Bob > Yes, it is indeed. I don't know exactly why I chose to try (and ultimately fail) writing that patch. I think the koan ESR wrote for The Rootless Root: The Unix Koans Of Master Foo has some truth to it: =93There is more Unix-nature in one line of shell script than there is in ten thousand lines of C.=94 Finally in true koan fashion, "I am enlightened." :^) William From unknown Sun Jun 22 04:20:19 2025 MIME-Version: 1.0 X-Mailer: MIME-tools 5.427 (Entity 5.427) X-Loop: help-debbugs@gnu.org From: help-debbugs@gnu.org (GNU bug Tracking System) To: "Denis M. Wilson" Subject: bug#7085: closed (Re: bug#7085: fmt (GNU coreutils) 6.10) Message-ID: References: <87ei1i55k3.fsf@rho.meyering.net> <20100922205906.790ce9be@dell-desktop.example.com> X-Gnu-PR-Message: they-closed 7085 X-Gnu-PR-Package: coreutils Reply-To: 7085@debbugs.gnu.org Date: Fri, 22 Jul 2011 22:13:01 +0000 Content-Type: multipart/mixed; boundary="----------=_1311372781-27438-1" This is a multi-part message in MIME format... ------------=_1311372781-27438-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Your bug report #7085: fmt (GNU coreutils) 6.10 which was filed against the coreutils package, has been closed. The explanation is attached below, along with your original report. If you require more details, please reply to 7085@debbugs.gnu.org. --=20 7085: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D7085 GNU Bug Tracking System Contact help-debbugs@gnu.org with problems ------------=_1311372781-27438-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 7085-done) by debbugs.gnu.org; 22 Jul 2011 22:12:18 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QkNxB-00077f-Pd for submit@debbugs.gnu.org; Fri, 22 Jul 2011 18:12:18 -0400 Received: from mx.meyering.net ([82.230.74.64]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QkNxA-00077U-Rh for 7085-done@debbugs.gnu.org; Fri, 22 Jul 2011 18:12:17 -0400 Received: from rho.meyering.net (localhost.localdomain [127.0.0.1]) by rho.meyering.net (Acme Bit-Twister) with ESMTP id EE02E6006C for <7085-done@debbugs.gnu.org>; Sat, 23 Jul 2011 00:11:40 +0200 (CEST) From: Jim Meyering To: 7085-done@debbugs.gnu.org Subject: Re: bug#7085: fmt (GNU coreutils) 6.10 In-Reply-To: <20100922205906.790ce9be@dell-desktop.example.com> (Denis M. Wilson's message of "Wed, 22 Sep 2010 20:59:06 +0100") References: <20100922205906.790ce9be@dell-desktop.example.com> Date: Sat, 23 Jul 2011 00:11:40 +0200 Message-ID: <87ei1i55k3.fsf@rho.meyering.net> Lines: 11 MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -6.1 (------) X-Debbugs-Envelope-To: 7085-done X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -6.1 (------) tags 7085 + notabug close 7085 thanks Denis M. Wilson wrote: > This program does not deal properly with CRLF terminators. > Gratuitous CRs are left in joined lines; they should be > removed. The user may want to keep the CRLF style or change > to Unix (LF). There should be an option for this. As seen in the rest of this thread, this is not a bug. ------------=_1311372781-27438-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at submit) by debbugs.gnu.org; 22 Sep 2010 20:22:25 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OyVpg-0004BY-Rf for submit@debbugs.gnu.org; Wed, 22 Sep 2010 16:22:25 -0400 Received: from eggs.gnu.org ([140.186.70.92]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OyVQB-00040M-Ru for submit@debbugs.gnu.org; Wed, 22 Sep 2010 15:56:04 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OyVSg-0007TK-Ii for submit@debbugs.gnu.org; Wed, 22 Sep 2010 15:58:39 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_LOW autolearn=unavailable version=3.3.1 Received: from lists.gnu.org ([199.232.76.165]:42571) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OyVSg-0007TD-H1 for submit@debbugs.gnu.org; Wed, 22 Sep 2010 15:58:38 -0400 Received: from [140.186.70.92] (port=48748 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OyVSe-0008FQ-DG for bug-coreutils@gnu.org; Wed, 22 Sep 2010 15:58:38 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OyVSd-0007SG-7R for bug-coreutils@gnu.org; Wed, 22 Sep 2010 15:58:36 -0400 Received: from relay.pcl-ipout02.plus.net ([212.159.7.100]:41687) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OyVSd-0007Rt-3b for bug-coreutils@gnu.org; Wed, 22 Sep 2010 15:58:35 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AikFAGv8mUzUnw4S/2dsb2JhbACUN411ccVXhUEEjTY Received: from outmx06.plus.net ([212.159.14.18]) by relay.pcl-ipout02.plus.net with ESMTP; 22 Sep 2010 20:58:32 +0100 Received: from [87.115.128.243] (helo=dell-desktop.example.com) by outmx06.plus.net with esmtp (Exim) id 1OyVSZ-0008UH-NN for bug-coreutils@gnu.org; Wed, 22 Sep 2010 20:58:31 +0100 Date: Wed, 22 Sep 2010 20:59:06 +0100 From: "Denis M. Wilson" To: bug-coreutils@gnu.org Subject: fmt (GNU coreutils) 6.10 Message-ID: <20100922205906.790ce9be@dell-desktop.example.com> X-Mailer: Claws Mail 3.3.1 (GTK+ 2.12.9; i486-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) X-Spam-Score: -6.6 (------) X-Debbugs-Envelope-To: submit X-Mailman-Approved-At: Wed, 22 Sep 2010 16:22:22 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -6.6 (------) This program does not deal properly with CRLF terminators. Gratuitous CRs are left in joined lines; they should be removed. The user may want to keep the CRLF style or change to Unix (LF). There should be an option for this. Denis M. Wilson -- ------------=_1311372781-27438-1--