From unknown Mon Jun 23 06:03:29 2025 X-Loop: help-debbugs@gnu.org Subject: bug#17012: [3 PATCHES] Whitespace cleanup : Replace code-alignment tabs with spaces. Resent-From: behoffski Original-Sender: "Debbugs-submit" Resent-CC: bug-grep@gnu.org Resent-Date: Fri, 14 Mar 2014 10:04:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 17012 X-GNU-PR-Package: grep X-GNU-PR-Keywords: patch To: 17012@debbugs.gnu.org X-Debbugs-Original-To: bug-grep@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.13947914286384 (code B ref -1); Fri, 14 Mar 2014 10:04:01 +0000 Received: (at submit) by debbugs.gnu.org; 14 Mar 2014 10:03:48 +0000 Received: from localhost ([127.0.0.1]:36487 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WOOxv-0001es-Gg for submit@debbugs.gnu.org; Fri, 14 Mar 2014 06:03:48 -0400 Received: from eggs.gnu.org ([208.118.235.92]:43002) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WOOxs-0001ek-Qa for submit@debbugs.gnu.org; Fri, 14 Mar 2014 06:03:45 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WOOxr-0004YT-BX for submit@debbugs.gnu.org; Fri, 14 Mar 2014 06:03:44 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50 autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:45225) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WOOxr-0004YP-8L for submit@debbugs.gnu.org; Fri, 14 Mar 2014 06:03:43 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:44720) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WOOxq-00045c-2f for bug-grep@gnu.org; Fri, 14 Mar 2014 06:03:43 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WOOxo-0004XT-RL for bug-grep@gnu.org; Fri, 14 Mar 2014 06:03:42 -0400 Received: from ipmail04.adl6.internode.on.net ([2001:44b8:8060:ff02:300:1:6:4]:14518) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WOOxo-0004O4-4N for bug-grep@gnu.org; Fri, 14 Mar 2014 06:03:40 -0400 Received: from ppp118-210-133-98.lns20.adl6.internode.on.net (HELO [192.168.1.1]) ([118.210.133.98]) by ipmail04.adl6.internode.on.net with ESMTP; 14 Mar 2014 20:33:29 +1030 Message-ID: <5322D3F0.3060403@grouse.com.au> Date: Fri, 14 Mar 2014 20:33:28 +1030 From: behoffski User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.3.0 MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="------------030907030805040305080304" X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -5.0 (-----) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) This is a multi-part message in MIME format. --------------030907030805040305080304 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit G'day, I've been looking at the grep sources with various tools, and have found on a couple of occasions that tab characters (ASCII code 09, ^I) confused me where they occurred in the code. For example, in commit ...c73ca06859c0820d9d, Paul Eggert had to pacify "make dist", which calls "make syntax-check", as a line had leading tabs: * src/dfa.c (parse_bracket_exp): Reindent with spaces. I've worked on other projects where consistent and concise code formatting is stringently applied (usually as code commit hooks that run Perl scripts), and have found this environment useful, as there is a "canonical" representation of the source to refer to. GNU grep has made several steps in this direction (e.g. no leading tabs, no trailing whitespace), but the translation isn't complete: Tabs still appear in a few selected places in the code. One easy way to spot tab characters in C sources (merely .c and .h files here) is to use "cat -T", which replaces the horizontal tab character with "^I": for f in *.[ch] ; do TMPFILE =`mktemp` echo "$f" ; cat -T "$f" >"$TMPFILE" ; \ diff "$f" "$TMPFILE" ; rm -f "$TMPFILE" done Another way (ASCII) is to look for hex code "09" in an octal dump of a source: for f in *.[ch] ; do echo "$f" ; od -txC "$f" | grep " 09" done Attached are three small, concise patches, each changing one file in the grep/src directory (I'm not daring to tackle gnulib at present). These are small, self-contained and should be fairly easy to review. The files modified are grep.h, kwset.h and dosbuf.c. Please let me know if these changes are considered to be worthwhile, and, if so, I'll submit larger patches for kwset.c, main.c and dfa.c. cheers, behoffski (Brenton Hoff) Programmer, Grouse Software --------------030907030805040305080304 Content-Type: text/x-patch; name="maint-dosbuf.c-tabs-spaces.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="maint-dosbuf.c-tabs-spaces.patch" >From d83855f738b4084b65088724c71357dc1bd8b861 Mon Sep 17 00:00:00 2001 From: behoffski Date: Fri, 14 Mar 2014 19:39:38 +1030 Subject: [PATCH 3/3] maint: dosbuf.c: Replace code-alignment tabs with spaces. Tabs are already forbidden as leading character of a line, and trailing whitespace is also not allowed. This change is part of an effort to tighten source layout options to improve consistency and repeatability. --- src/dosbuf.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/dosbuf.c b/src/dosbuf.c index 3648371..c880ab6 100644 --- a/src/dosbuf.c +++ b/src/dosbuf.c @@ -35,8 +35,8 @@ typedef enum { } File_type; struct dos_map { - off_t pos; /* position in buffer passed to matcher */ - off_t add; /* how much to add when reporting char position */ + off_t pos; /* position in buffer passed to matcher */ + off_t add; /* how much to add when reporting char position */ }; static int dos_report_unix_offset = 0; -- 1.8.3.2 --------------030907030805040305080304 Content-Type: text/x-patch; name="maint-grep.h-tabs-spaces.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="maint-grep.h-tabs-spaces.patch" >From 6dcda3e3e38ad38cfde95252d1baacb44fae30d1 Mon Sep 17 00:00:00 2001 From: behoffski Date: Fri, 14 Mar 2014 19:38:34 +1030 Subject: [PATCH 1/3] maint: grep.h: Replace code-alignment tabs with spaces. Tabs are already forbidden as leading character of a line, and trailing whitespace is also not allowed. This change is part of an effort to tighten source layout options to improve consistency and repeatability. --- src/grep.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/grep.h b/src/grep.h index 4d642a1..84844a1 100644 --- a/src/grep.h +++ b/src/grep.h @@ -39,9 +39,9 @@ extern const char after_options[]; /* The following flags are exported from grep for the matchers to look at. */ -extern int match_icase; /* -i */ -extern int match_words; /* -w */ -extern int match_lines; /* -x */ -extern unsigned char eolbyte; /* -z */ +extern int match_icase; /* -i */ +extern int match_words; /* -w */ +extern int match_lines; /* -x */ +extern unsigned char eolbyte; /* -z */ #endif -- 1.8.3.2 --------------030907030805040305080304 Content-Type: text/x-patch; name="maint-kwset.h-tabs-spaces.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="maint-kwset.h-tabs-spaces.patch" >From a41d1a3746610a2693981cbb6bdfcf45e135beb8 Mon Sep 17 00:00:00 2001 From: behoffski Date: Fri, 14 Mar 2014 19:39:06 +1030 Subject: [PATCH 2/3] maint: kwset.h: Replace code-alignment tabs with spaces. Tabs are already forbidden as leading character of a line, and trailing whitespace is also not allowed. This change is part of an effort to tighten source layout options to improve consistency and repeatability. --- src/kwset.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/kwset.h b/src/kwset.h index 2d3cdd9..977f9f0 100644 --- a/src/kwset.h +++ b/src/kwset.h @@ -23,9 +23,9 @@ struct kwsmatch { - size_t index; /* Index number of matching keyword. */ - size_t offset[1]; /* Offset of each submatch. */ - size_t size[1]; /* Length of each submatch. */ + size_t index; /* Index number of matching keyword. */ + size_t offset[1]; /* Offset of each submatch. */ + size_t size[1]; /* Length of each submatch. */ }; #include "arg-nonnull.h" -- 1.8.3.2 --------------030907030805040305080304-- From unknown Mon Jun 23 06:03:29 2025 X-Loop: help-debbugs@gnu.org Subject: bug#17012: [3 PATCHES] Whitespace cleanup : Replace code-alignment tabs with spaces. Resent-From: Paul Eggert Original-Sender: "Debbugs-submit" Resent-CC: bug-grep@gnu.org Resent-Date: Fri, 14 Mar 2014 14:37:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 17012 X-GNU-PR-Package: grep X-GNU-PR-Keywords: patch To: behoffski , 17012@debbugs.gnu.org Received: via spool by 17012-submit@debbugs.gnu.org id=B17012.139480781510552 (code B ref 17012); Fri, 14 Mar 2014 14:37:02 +0000 Received: (at 17012) by debbugs.gnu.org; 14 Mar 2014 14:36:55 +0000 Received: from localhost ([127.0.0.1]:36933 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WOTEF-0002k8-5I for submit@debbugs.gnu.org; Fri, 14 Mar 2014 10:36:55 -0400 Received: from smtp.cs.ucla.edu ([131.179.128.62]:34509) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WOTED-0002jw-0f for 17012@debbugs.gnu.org; Fri, 14 Mar 2014 10:36:53 -0400 Received: from localhost (localhost.localdomain [127.0.0.1]) by smtp.cs.ucla.edu (Postfix) with ESMTP id 31CF9A60002; Fri, 14 Mar 2014 07:36:51 -0700 (PDT) X-Virus-Scanned: amavisd-new at smtp.cs.ucla.edu Received: from smtp.cs.ucla.edu ([127.0.0.1]) by localhost (smtp.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id pr-xcB02O3C3; Fri, 14 Mar 2014 07:36:50 -0700 (PDT) Received: from [192.168.1.9] (pool-108-0-233-62.lsanca.fios.verizon.net [108.0.233.62]) by smtp.cs.ucla.edu (Postfix) with ESMTPSA id CE8DFA60001; Fri, 14 Mar 2014 07:36:50 -0700 (PDT) Message-ID: <53231402.3010507@cs.ucla.edu> Date: Fri, 14 Mar 2014 07:36:50 -0700 From: Paul Eggert Organization: UCLA Computer Science Department User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.3.0 MIME-Version: 1.0 References: <5322D3F0.3060403@grouse.com.au> In-Reply-To: <5322D3F0.3060403@grouse.com.au> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) behoffski wrote: > One easy way to spot tab characters in C sources This is grep, right? So we should use "grep ' '". Jim Meyering has the strongest feeling about tabs, so I assume he'll pick this one up. From unknown Mon Jun 23 06:03:29 2025 X-Loop: help-debbugs@gnu.org Subject: bug#17012: [3 PATCHES] Whitespace cleanup : Replace code-alignment tabs with spaces. Resent-From: Jim Meyering Original-Sender: "Debbugs-submit" Resent-CC: bug-grep@gnu.org Resent-Date: Fri, 14 Mar 2014 16:13:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 17012 X-GNU-PR-Package: grep X-GNU-PR-Keywords: patch To: Paul Eggert Cc: 17012@debbugs.gnu.org, behoffski Received: via spool by 17012-submit@debbugs.gnu.org id=B17012.139481355525859 (code B ref 17012); Fri, 14 Mar 2014 16:13:02 +0000 Received: (at 17012) by debbugs.gnu.org; 14 Mar 2014 16:12:35 +0000 Received: from localhost ([127.0.0.1]:36980 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WOUip-0006j1-Ea for submit@debbugs.gnu.org; Fri, 14 Mar 2014 12:12:35 -0400 Received: from mail-pd0-f174.google.com ([209.85.192.174]:47659) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WOUin-0006ir-HN for 17012@debbugs.gnu.org; Fri, 14 Mar 2014 12:12:34 -0400 Received: by mail-pd0-f174.google.com with SMTP id y13so2735129pdi.33 for <17012@debbugs.gnu.org>; Fri, 14 Mar 2014 09:12:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc:content-type; bh=1Iakev1z5vZ2AVOatY0LMpFh44xaY6pAYErSVe5AS2A=; b=eZ4I3TxURExITb2C7IalClehgzmZq9bPvcyg2RZwTFusx3zTmQZAfPuhqZVnlETLsF rPtn0g8DKcOsRIRBiF+zgi3ZuIVMLOgdGkLEwZ0CVLMdW5c1ClUEInG0kSxoSCA0qfwz vZuPbtNtV9/TKmruKyNU6hJCIYxmgyiI//tpj3Ipntqqj+FYyKcnT7oJ1/DFd1p/rkBK LhFjgsiAN5Kpyd1+dj89fezXQ1hTFi3+J19QS249E2gwZKtlPwReMn1Bz4hCAO27fGUd EWCD8uwJi+GnDkZdg3aEi2xiJJZtiFwHfj7taIZPcZpXOoXVFruItwgbrX0hSgKWmbNZ j1+g== X-Received: by 10.66.164.36 with SMTP id yn4mr9925087pab.25.1394813552774; Fri, 14 Mar 2014 09:12:32 -0700 (PDT) MIME-Version: 1.0 Received: by 10.68.201.231 with HTTP; Fri, 14 Mar 2014 09:12:12 -0700 (PDT) In-Reply-To: <53231402.3010507@cs.ucla.edu> References: <5322D3F0.3060403@grouse.com.au> <53231402.3010507@cs.ucla.edu> From: Jim Meyering Date: Fri, 14 Mar 2014 09:12:12 -0700 X-Google-Sender-Auth: DTvCdCetn-62YAAmB7B6G3oSSYQ Message-ID: Content-Type: text/plain; charset=ISO-8859-1 X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.0 (/) On Fri, Mar 14, 2014 at 7:36 AM, Paul Eggert wrote: > behoffski wrote: >> >> One easy way to spot tab characters in C sources > > > This is grep, right? So we should use "grep ' '". > > Jim Meyering has the strongest feeling about tabs, so I assume he'll pick > this one up. Hi Brenton, I do indeed have strong feelings about tabs :-) Like remove all leading ones, and any TAB-after-space. [rules to enforce that are in maint.mk and cfg.mk] However, a few times when a crusade led me to do what you're proposing and eliminate all of them, I later realized that I found value in TAB-aligned comments, and actually regretted performing that particular TAB->SP+ conversion. On a code normalization front, I am inclined to fully automate the process, and have spent time (though not recently) trying to find the combination of settings in the uncrustify tool that recreate the style we use in a few projects. If you feel like pursuing this, please look at uncrustify and see if you can minimize the changes required to move grep to something uncrustify-generated. Bottom line, I'm not terribly keen on changing comment-aligning tabs to spaces. Thanks, Jim From unknown Mon Jun 23 06:03:29 2025 X-Loop: help-debbugs@gnu.org Subject: bug#17012: [3 PATCHES] Whitespace cleanup : Replace code-alignment tabs with spaces. Resent-From: Bruce Dubbs Original-Sender: "Debbugs-submit" Resent-CC: bug-grep@gnu.org Resent-Date: Fri, 14 Mar 2014 18:59:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 17012 X-GNU-PR-Package: grep X-GNU-PR-Keywords: patch To: 17012@debbugs.gnu.org Cc: Paul Eggert Received: via spool by 17012-submit@debbugs.gnu.org id=B17012.139482349113365 (code B ref 17012); Fri, 14 Mar 2014 18:59:01 +0000 Received: (at 17012) by debbugs.gnu.org; 14 Mar 2014 18:58:11 +0000 Received: from localhost ([127.0.0.1]:37097 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WOXJ4-0003TU-7J for submit@debbugs.gnu.org; Fri, 14 Mar 2014 14:58:10 -0400 Received: from mail-ob0-f169.google.com ([209.85.214.169]:33721) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WOXJ1-0003TM-VW for 17012@debbugs.gnu.org; Fri, 14 Mar 2014 14:58:08 -0400 Received: by mail-ob0-f169.google.com with SMTP id va2so3019311obc.28 for <17012@debbugs.gnu.org>; Fri, 14 Mar 2014 11:58:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; bh=3fjIb0BuQHf7N1pxKjbMZwa7c/o57eLJ+tTm8p8sogU=; b=GapSNySbKGl6QvylWJoJ7R5oKMoGPd53Az386yLdxgaop4cojxUC4ZbJT2MUFjQtBX N7p2F53ZXVezjlkTCc1T8AeqKuJIHi8sLXT/iPQikRKXmaiCkH+nbi8KzVXceFhS1nzF M9x0mz2cB63XX9W6X8M8Asne3v2zrsmaWo7vQUWNvqHvxIioG6uvp3H7uyImV86p1A6e ZK8EErR3MlyovSZr759TmVflcO/eLPnQrslug1XCfGR72ZAcuKOaUIYZgkoHQ7c+WhMX kkIloDoSmBLSei9mooRcmZVZAXM2FzsQQZGeRmLpVkOuk4Aim8u9DBfq1VotRDw0RBgL b3jg== X-Received: by 10.60.120.34 with SMTP id kz2mr2575045oeb.76.1394823487189; Fri, 14 Mar 2014 11:58:07 -0700 (PDT) Received: from [192.168.0.75] (cpe-72-178-123-130.satx.res.rr.com. [72.178.123.130]) by mx.google.com with ESMTPSA id dg2sm4814948obb.17.2014.03.14.11.58.05 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 14 Mar 2014 11:58:06 -0700 (PDT) Message-ID: <5323513C.4050102@gmail.com> Date: Fri, 14 Mar 2014 13:58:04 -0500 From: Bruce Dubbs User-Agent: Mozilla/5.0 (X11; Linux i686; rv:13.0) Gecko/20120628 Firefox/13.0.1 SeaMonkey/2.10.1 MIME-Version: 1.0 References: <5322D3F0.3060403@grouse.com.au> <53231402.3010507@cs.ucla.edu> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) Jim Meyering wrote: > On Fri, Mar 14, 2014 at 7:36 AM, Paul Eggert wrote: >> behoffski wrote: >>> >>> One easy way to spot tab characters in C sources >> >> >> This is grep, right? So we should use "grep ' '". >> >> Jim Meyering has the strongest feeling about tabs, so I assume he'll pick >> this one up. > > Hi Brenton, > > I do indeed have strong feelings about tabs :-) > Like remove all leading ones, and any TAB-after-space. > [rules to enforce that are in maint.mk and cfg.mk] > However, a few times when a crusade led me to do > what you're proposing and eliminate all of them, I later realized > that I found value in TAB-aligned comments, and actually regretted > performing that particular TAB->SP+ conversion. > > On a code normalization front, I am inclined to fully automate the > process, and have spent time (though not recently) trying to find > the combination of settings in the uncrustify tool that recreate the > style we use in a few projects. If you feel like pursuing this, please > look at uncrustify and see if you can minimize the changes required > to move grep to something uncrustify-generated. > > Bottom line, I'm not terribly keen on changing comment-aligning > tabs to spaces. Tabs in code are indeed evil. Different users have different tab stops. I would convert *all* tabs to spaces and add to each file: /* -*- tab-width:8; intent-tabs-mode:nil; -*- */ /* ex: set tabstop=8 expandtab: */ A lot of people make a lot of effort to make their code look good. Then someone makes a change and uses a different tab setting and makes it look ugly, either in a pager or an editor. Bottom line is to not permit patches with tabs. -- Bruce Dubbs linuxfromscratch.org P.S. There was a considerable amount of research in the 1980s that investigated cognitive interpretation of code at different tab stops. The general conclusion was that between 2 and 4 spaces maximizes comprehension. From unknown Mon Jun 23 06:03:29 2025 X-Loop: help-debbugs@gnu.org Subject: bug#17012: [3 PATCHES] Whitespace cleanup : Replace code-alignment tabs with spaces. Resent-From: Jim Meyering Original-Sender: "Debbugs-submit" Resent-CC: bug-grep@gnu.org Resent-Date: Sat, 15 Mar 2014 04:05:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 17012 X-GNU-PR-Package: grep X-GNU-PR-Keywords: patch To: Bruce Dubbs Cc: 17012 <17012@debbugs.gnu.org>, Paul Eggert Received: via spool by 17012-submit@debbugs.gnu.org id=B17012.139485627810888 (code B ref 17012); Sat, 15 Mar 2014 04:05:02 +0000 Received: (at 17012) by debbugs.gnu.org; 15 Mar 2014 04:04:38 +0000 Received: from localhost ([127.0.0.1]:37203 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WOfpu-0002pY-81 for submit@debbugs.gnu.org; Sat, 15 Mar 2014 00:04:38 -0400 Received: from mail-pa0-f44.google.com ([209.85.220.44]:56029) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WOfpr-0002pM-Bb for 17012@debbugs.gnu.org; Sat, 15 Mar 2014 00:04:36 -0400 Received: by mail-pa0-f44.google.com with SMTP id bj1so3478863pad.3 for <17012@debbugs.gnu.org>; Fri, 14 Mar 2014 21:04:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc:content-type; bh=Prg4VWBsLVbV4v0Z1wVc+IzZ1kNtnFfrX9bKqBmnIJs=; b=DScb1+MKBwl+ZBUIGMsB/onDQUkonesZIfe0bh6izAfXnNGgDTrhyZ+E4Ht9IktPtc gvUr2YqGObfKERNzaCXpenPakxH3gJUZds7HOTQ8z6vuWf90ens9XlP1ZkP+jLUsM0NA AVwdI00lVaA+BHxCQnuU8FNajEOme8Aj5Az3P5IqNKGsbVgjFaxJjYG5qb7IkwoDAvOV BKQIfH0mT9snOHVVN076GmCKN2p9jDnGZRTrPTB0OyegfuSCpR03n9AsgBoC0FMmHssG THm02zx5PryGpm3p1qJ6dJvIdwG2aFCAJh9e6ape5J6lDCxl3a0QI/WztYtsO/4gMTa8 sXZA== X-Received: by 10.66.171.76 with SMTP id as12mr12930696pac.52.1394856274208; Fri, 14 Mar 2014 21:04:34 -0700 (PDT) MIME-Version: 1.0 Received: by 10.68.201.231 with HTTP; Fri, 14 Mar 2014 21:04:14 -0700 (PDT) In-Reply-To: <5323513C.4050102@gmail.com> References: <5322D3F0.3060403@grouse.com.au> <53231402.3010507@cs.ucla.edu> <5323513C.4050102@gmail.com> From: Jim Meyering Date: Fri, 14 Mar 2014 21:04:14 -0700 X-Google-Sender-Auth: fGr5-rSDB5QYzy6cZyyLntLUjMU Message-ID: Content-Type: text/plain; charset=ISO-8859-1 X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) On Fri, Mar 14, 2014 at 11:58 AM, Bruce Dubbs wrote: > Jim Meyering wrote: >> >> On Fri, Mar 14, 2014 at 7:36 AM, Paul Eggert wrote: >>> >>> behoffski wrote: >>>> >>>> >>>> One easy way to spot tab characters in C sources >>> >>> >>> >>> This is grep, right? So we should use "grep ' '". >>> >>> Jim Meyering has the strongest feeling about tabs, so I assume he'll pick >>> this one up. >> >> >> Hi Brenton, >> >> I do indeed have strong feelings about tabs :-) >> Like remove all leading ones, and any TAB-after-space. >> [rules to enforce that are in maint.mk and cfg.mk] >> However, a few times when a crusade led me to do >> what you're proposing and eliminate all of them, I later realized >> that I found value in TAB-aligned comments, and actually regretted >> performing that particular TAB->SP+ conversion. >> >> On a code normalization front, I am inclined to fully automate the >> process, and have spent time (though not recently) trying to find >> the combination of settings in the uncrustify tool that recreate the >> style we use in a few projects. If you feel like pursuing this, please >> look at uncrustify and see if you can minimize the changes required >> to move grep to something uncrustify-generated. >> >> Bottom line, I'm not terribly keen on changing comment-aligning >> tabs to spaces. > > > Tabs in code are indeed evil. Different users have different tab stops. > I would convert *all* tabs to spaces and add to each file: > > /* -*- tab-width:8; intent-tabs-mode:nil; -*- */ > /* ex: set tabstop=8 expandtab: */ For the record, I think that such comments should be made unnecessary. I.e., maintain coding standards with enough automated infrastructure that that type of crutch is not required. See the guidelines in coreutils' HACKING file. Speaking of which, grep's HACKING needs a refresher. > A lot of people make a lot of effort to make their code look good. Then > someone makes a change and uses a different tab setting and makes it look > ugly, either in a pager or an editor. > > Bottom line is to not permit patches with tabs. > > -- Bruce Dubbs > linuxfromscratch.org > > P.S. There was a considerable amount of research in the 1980s that > investigated cognitive interpretation of code at different tab stops. The > general conclusion was that between 2 and 4 spaces maximizes comprehension. That is why we impose the existing no-TAB rules. The few remaining ones, for comment alignment, not code alignment, are less problematic. From unknown Mon Jun 23 06:03:29 2025 X-Loop: help-debbugs@gnu.org Subject: bug#17012: [3 PATCHES] Whitespace cleanup : Replace code-alignment tabs with spaces. Resent-From: Bruce Dubbs Original-Sender: "Debbugs-submit" Resent-CC: bug-grep@gnu.org Resent-Date: Sat, 15 Mar 2014 04:33:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 17012 X-GNU-PR-Package: grep X-GNU-PR-Keywords: patch To: Jim Meyering Cc: 17012 <17012@debbugs.gnu.org>, Paul Eggert Received: via spool by 17012-submit@debbugs.gnu.org id=B17012.139485794714288 (code B ref 17012); Sat, 15 Mar 2014 04:33:01 +0000 Received: (at 17012) by debbugs.gnu.org; 15 Mar 2014 04:32:27 +0000 Received: from localhost ([127.0.0.1]:37214 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WOgGo-0003iN-QK for submit@debbugs.gnu.org; Sat, 15 Mar 2014 00:32:27 -0400 Received: from mail-ob0-f176.google.com ([209.85.214.176]:64331) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WOgGn-0003iG-3f for 17012@debbugs.gnu.org; Sat, 15 Mar 2014 00:32:25 -0400 Received: by mail-ob0-f176.google.com with SMTP id wp18so3458506obc.35 for <17012@debbugs.gnu.org>; Fri, 14 Mar 2014 21:32:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; bh=Bpv4OeScamz6AaQsZn37bjQmTCh6JsM82EKXzC1X6iM=; b=XMn5BpEfeHwBGaOk1h2vqRIo7M6VBWF+jt70GQPLXY8a3ambsicIXS9F0+34wP4Q7a QENUnKc+RPIJUGdU7y07m+OG+/6V6qVoe6J045zi5y0k8F0tIjcKjkMueHJzYnOedBaH RQEroQmfCKFJpb6y548l9VHGCU5sTrqi6ljP+mloygMP6iUSGLpoFCmVCsTGrYZeXUjr +8JpMg6KFWIw2MUe4AszSfKzVketSLoBkRfC7OtsqOQq468/J6FftfTaEAF744gJ3sC7 xJ0I+mC0wFvriY/Q8QH5EJbKg8qRt73veKvWz/bQ+IBRX8OjMUypD+ld1r1MS5SEX7pI Sujg== X-Received: by 10.182.48.233 with SMTP id p9mr10296254obn.44.1394857944320; Fri, 14 Mar 2014 21:32:24 -0700 (PDT) Received: from [192.168.0.75] (cpe-72-178-123-130.satx.res.rr.com. [72.178.123.130]) by mx.google.com with ESMTPSA id cz10sm14355696oec.10.2014.03.14.21.32.22 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 14 Mar 2014 21:32:23 -0700 (PDT) Message-ID: <5323D7D5.1000804@gmail.com> Date: Fri, 14 Mar 2014 23:32:21 -0500 From: Bruce Dubbs User-Agent: Mozilla/5.0 (X11; Linux i686; rv:13.0) Gecko/20120628 Firefox/13.0.1 SeaMonkey/2.10.1 MIME-Version: 1.0 References: <5322D3F0.3060403@grouse.com.au> <53231402.3010507@cs.ucla.edu> <5323513C.4050102@gmail.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) Jim Meyering wrote: >> Tabs in code are indeed evil. Different users have different tab stops. >> I would convert *all* tabs to spaces and add to each file: >> >> /* -*- tab-width:8; intent-tabs-mode:nil; -*- */ >> /* ex: set tabstop=8 expandtab: */ > > For the record, I think that such comments should be made unnecessary. > I.e., maintain coding standards with enough automated infrastructure > that that type of crutch is not required. See the guidelines in coreutils' > HACKING file. Speaking of which, grep's HACKING needs a refresher. Interesting. Looking at the coreutils-8.22 tarball, there is no HACKING file. It's not in the coreutils-8.17 tarball either. It is in the git tree though. -- Bruce From unknown Mon Jun 23 06:03:29 2025 X-Loop: help-debbugs@gnu.org Subject: bug#17012: [3 PATCHES] Whitespace cleanup : Replace code-alignment tabs with spaces. Resent-From: Jim Meyering Original-Sender: "Debbugs-submit" Resent-CC: bug-grep@gnu.org Resent-Date: Sat, 15 Mar 2014 04:45:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 17012 X-GNU-PR-Package: grep X-GNU-PR-Keywords: patch To: Bruce Dubbs Cc: 17012 <17012@debbugs.gnu.org>, Paul Eggert Received: via spool by 17012-submit@debbugs.gnu.org id=B17012.139485869715838 (code B ref 17012); Sat, 15 Mar 2014 04:45:02 +0000 Received: (at 17012) by debbugs.gnu.org; 15 Mar 2014 04:44:57 +0000 Received: from localhost ([127.0.0.1]:37218 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WOgSv-00047N-95 for submit@debbugs.gnu.org; Sat, 15 Mar 2014 00:44:57 -0400 Received: from mail-pd0-f176.google.com ([209.85.192.176]:41123) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WOgSr-000479-Mp for 17012@debbugs.gnu.org; Sat, 15 Mar 2014 00:44:54 -0400 Received: by mail-pd0-f176.google.com with SMTP id r10so3357640pdi.7 for <17012@debbugs.gnu.org>; Fri, 14 Mar 2014 21:44:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc:content-type; bh=VHGXLGoLgs7xsrLz/uPQPCQcxXQnC5RNM6ZQvIJQA6Q=; b=1B7D6/CGq9uQwTh1L29AYNzpRwSANh1iiGMeEO0OqVpKmUlYMN4MDdmTJRirv9A3HT dzbZpM1dr3rzw7SEYn/6e1LJTwWaakf/7k6OfubbBEmL4hEy1wBn7n5P2jzBL3ro8mu2 ljGEovXmZCY5EV1gWoP3xpgshI1IzELy7475m8BTPbrcUKV+v4chghMI3/vYQbS+QiGa SQBH8whVqqyYTIbII5ouOXDLiBFS3KzYMrF8rGaBqn0y8oae2Q9JGt/HtLIVwbr+Nixm 0O5ZM0f+GefctsJ0oZ04dm03D64r0kPRdplwYEWLgcGuvBVPARP4SABmtFVDTjj/+jMp oN1A== X-Received: by 10.68.106.130 with SMTP id gu2mr12932163pbb.59.1394858692888; Fri, 14 Mar 2014 21:44:52 -0700 (PDT) MIME-Version: 1.0 Received: by 10.68.201.231 with HTTP; Fri, 14 Mar 2014 21:44:32 -0700 (PDT) In-Reply-To: <5323D7D5.1000804@gmail.com> References: <5322D3F0.3060403@grouse.com.au> <53231402.3010507@cs.ucla.edu> <5323513C.4050102@gmail.com> <5323D7D5.1000804@gmail.com> From: Jim Meyering Date: Fri, 14 Mar 2014 21:44:32 -0700 X-Google-Sender-Auth: awOUiMh8qminV6U7k7SarWIgiOo Message-ID: Content-Type: text/plain; charset=ISO-8859-1 X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.0 (/) On Fri, Mar 14, 2014 at 9:32 PM, Bruce Dubbs wrote: ... >> For the record, I think that such comments should be made unnecessary. >> I.e., maintain coding standards with enough automated infrastructure >> that that type of crutch is not required. See the guidelines in >> coreutils' >> HACKING file. Speaking of which, grep's HACKING needs a refresher. > > Interesting. Looking at the coreutils-8.22 tarball, there is no HACKING > file. It's not in the coreutils-8.17 tarball either. It is in the git tree > though. FYI, that is deliberate. You can get it here, too: http://git.savannah.gnu.org/cgit/coreutils.git/tree/HACKING If you're hacking on coreutils (as with most pkgs), you should be doing so via a git clone, with the very latest, not starting from a tarball, which is almost always out of date by at least a few commits. From unknown Mon Jun 23 06:03:29 2025 X-Loop: help-debbugs@gnu.org Subject: bug#17012: [3 PATCHES] Whitespace cleanup : Replace code-alignment tabs with spaces. Resent-From: Bruce Dubbs Original-Sender: "Debbugs-submit" Resent-CC: bug-grep@gnu.org Resent-Date: Sat, 15 Mar 2014 05:04:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 17012 X-GNU-PR-Package: grep X-GNU-PR-Keywords: patch To: Jim Meyering Cc: 17012 <17012@debbugs.gnu.org>, Paul Eggert Received: via spool by 17012-submit@debbugs.gnu.org id=B17012.139485979317968 (code B ref 17012); Sat, 15 Mar 2014 05:04:02 +0000 Received: (at 17012) by debbugs.gnu.org; 15 Mar 2014 05:03:13 +0000 Received: from localhost ([127.0.0.1]:37226 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WOgkb-0004fk-4J for submit@debbugs.gnu.org; Sat, 15 Mar 2014 01:03:13 -0400 Received: from mail-ob0-f171.google.com ([209.85.214.171]:55581) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WOgkY-0004fb-O0 for 17012@debbugs.gnu.org; Sat, 15 Mar 2014 01:03:11 -0400 Received: by mail-ob0-f171.google.com with SMTP id wn1so3493717obc.16 for <17012@debbugs.gnu.org>; Fri, 14 Mar 2014 22:03:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; bh=OhKs1Hq9sMVRMAT+Rq5CrjAlryUKD9CxOLWus8umwzk=; b=z2UoNQ+RXsv2dZK7NtDFhyw7gfWHPGEkAKWgzonebl1bWt8/nwI7OybVMg36UVz30e VvpE8MItjwOeuebaemNg6COm13pNE2KuL2qRWl0B1LVbibYScjJumybCDI1vGB/b46uj /Wtb7B7J35aeKeZvQ1h7JaG/TcXqc6rfRBW7sR/DpKm1ktD6WxTRjy8dAjCwowjC30Ts lL7YS9yrkllnx6PtI2mfG6676a/qTiG4oQR45Ay0QF18Q01kIAxE53i9t+4ypeQCZQNX cspWGkpQThltiDhJ6kEmK1U0it9/N1k+PnhhKTg334L51KmmR6wZ5EKJadvf6uuzOW8y Allw== X-Received: by 10.60.94.52 with SMTP id cz20mr10149561oeb.43.1394859790081; Fri, 14 Mar 2014 22:03:10 -0700 (PDT) Received: from [192.168.0.75] (cpe-72-178-123-130.satx.res.rr.com. [72.178.123.130]) by mx.google.com with ESMTPSA id j9sm7101464obh.23.2014.03.14.22.03.08 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 14 Mar 2014 22:03:09 -0700 (PDT) Message-ID: <5323DF0B.5050803@gmail.com> Date: Sat, 15 Mar 2014 00:03:07 -0500 From: Bruce Dubbs User-Agent: Mozilla/5.0 (X11; Linux i686; rv:13.0) Gecko/20120628 Firefox/13.0.1 SeaMonkey/2.10.1 MIME-Version: 1.0 References: <5322D3F0.3060403@grouse.com.au> <53231402.3010507@cs.ucla.edu> <5323513C.4050102@gmail.com> <5323D7D5.1000804@gmail.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) Jim Meyering wrote: > On Fri, Mar 14, 2014 at 9:32 PM, Bruce Dubbs wrote: > ... >>> For the record, I think that such comments should be made unnecessary. >>> I.e., maintain coding standards with enough automated infrastructure >>> that that type of crutch is not required. See the guidelines in >>> coreutils' >>> HACKING file. Speaking of which, grep's HACKING needs a refresher. >> >> Interesting. Looking at the coreutils-8.22 tarball, there is no HACKING >> file. It's not in the coreutils-8.17 tarball either. It is in the git tree >> though. > > FYI, that is deliberate. > You can get it here, too: > > http://git.savannah.gnu.org/cgit/coreutils.git/tree/HACKING > > If you're hacking on coreutils (as with most pkgs), you should be doing > so via a git clone, with the very latest, not starting from a tarball, > which is almost always out of date by at least a few commits. That makes sense, but I'd think that the above sentence should be in the tarball in a fairly prominent location. I see a reference to README-hacking and HACKING in the README file, but it's not clear that those are only available via git clone. -- Bruce From unknown Mon Jun 23 06:03:29 2025 X-Loop: help-debbugs@gnu.org Subject: bug#17012: [3 PATCHES] Whitespace cleanup : Replace code-alignment tabs with spaces. Resent-From: Jim Meyering Original-Sender: "Debbugs-submit" Resent-CC: bug-grep@gnu.org Resent-Date: Sat, 15 Mar 2014 18:47:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 17012 X-GNU-PR-Package: grep X-GNU-PR-Keywords: patch To: Bruce Dubbs Cc: 17012 <17012@debbugs.gnu.org>, Paul Eggert Received: via spool by 17012-submit@debbugs.gnu.org id=B17012.139490921726771 (code B ref 17012); Sat, 15 Mar 2014 18:47:02 +0000 Received: (at 17012) by debbugs.gnu.org; 15 Mar 2014 18:46:57 +0000 Received: from localhost ([127.0.0.1]:37693 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WOtbl-0006xj-Cj for submit@debbugs.gnu.org; Sat, 15 Mar 2014 14:46:57 -0400 Received: from mail-pa0-f45.google.com ([209.85.220.45]:61479) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WOtbj-0006xa-Ug for 17012@debbugs.gnu.org; Sat, 15 Mar 2014 14:46:56 -0400 Received: by mail-pa0-f45.google.com with SMTP id kl14so4036765pab.32 for <17012@debbugs.gnu.org>; Sat, 15 Mar 2014 11:46:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc:content-type; bh=u8+Qk4BIGMZpydyoiS55w4BAvG0GyXJDhw03v2e6VFI=; b=hRViMb+LzVXzFjpq5k3K8Jq7I6jlt3Dv/0kaFPLzRltF8fLEjG3RAcwhW1aZZrUd+1 8s6sVrwbAJCi/gN+/AUBJwMZMD/8hILJwLvMkCyRi93+17gQW8RiD5vxBYQsvrahJ7W9 MIhcHM1TxF6n+ZR2eQZ/FGT01xxcHYrH7hH7uNmm1nKm23kBInE3vXpah5XpXk7LVS9e l+Wg9D3DRE90fDNEltKFII8bAppCt6+tgbSp+ChwbnX66SW8xCcxqOqsOHgYr9v36WEn 4zeGMq3+HB7aDltbgDHL76q4xYZ8rbNYOrMx+JR0CwmEwaZCo0Vh4HPKFUxN7UNkNVm9 nv3w== X-Received: by 10.66.122.36 with SMTP id lp4mr16366954pab.82.1394909214717; Sat, 15 Mar 2014 11:46:54 -0700 (PDT) MIME-Version: 1.0 Received: by 10.68.201.231 with HTTP; Sat, 15 Mar 2014 11:46:34 -0700 (PDT) In-Reply-To: <5323DF0B.5050803@gmail.com> References: <5322D3F0.3060403@grouse.com.au> <53231402.3010507@cs.ucla.edu> <5323513C.4050102@gmail.com> <5323D7D5.1000804@gmail.com> <5323DF0B.5050803@gmail.com> From: Jim Meyering Date: Sat, 15 Mar 2014 11:46:34 -0700 X-Google-Sender-Auth: -s4CuXaQClWL0bATxCdDJNsK5ug Message-ID: Content-Type: text/plain; charset=ISO-8859-1 X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) On Fri, Mar 14, 2014 at 10:03 PM, Bruce Dubbs wrote: ... >> FYI, that is deliberate. >> You can get it here, too: >> >> http://git.savannah.gnu.org/cgit/coreutils.git/tree/HACKING >> >> If you're hacking on coreutils (as with most pkgs), you should be doing >> so via a git clone, with the very latest, not starting from a tarball, >> which is almost always out of date by at least a few commits. > > That makes sense, but I'd think that the above sentence should be in the > tarball in a fairly prominent location. I see a reference to > README-hacking and HACKING in the README file, but it's not clear that those > are only available via git clone. Just after the sentence in README that mentions those two other files, you will find tips on reporting and fixing problems, including this: Here are instructions for checking out the latest development sources: http://savannah.gnu.org/git/?group=coreutils Or just google "coreutils hacking". From unknown Mon Jun 23 06:03:29 2025 X-Loop: help-debbugs@gnu.org Subject: bug#17012: [3 PATCHES] Whitespace cleanup : Replace code-alignment tabs with spaces. Resent-From: Johannes Meixner Original-Sender: "Debbugs-submit" Resent-CC: bug-grep@gnu.org Resent-Date: Tue, 18 Mar 2014 09:03:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 17012 X-GNU-PR-Package: grep X-GNU-PR-Keywords: patch To: 17012@debbugs.gnu.org Cc: bruce.dubbs@gmail.com X-Debbugs-Original-To: bug-grep@gnu.org X-Debbugs-Original-Cc: 17012 <17012@debbugs.gnu.org>, bug-grep@gnu.org, Bruce Dubbs Received: via spool by submit@debbugs.gnu.org id=B.139513334729547 (code B ref -1); Tue, 18 Mar 2014 09:03:01 +0000 Received: (at submit) by debbugs.gnu.org; 18 Mar 2014 09:02:27 +0000 Received: from localhost ([127.0.0.1]:39531 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WPpuk-0007gT-Is for submit@debbugs.gnu.org; Tue, 18 Mar 2014 05:02:27 -0400 Received: from eggs.gnu.org ([208.118.235.92]:57180) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WPpui-0007gJ-G2 for submit@debbugs.gnu.org; Tue, 18 Mar 2014 05:02:24 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WPpuc-0004J3-IA for submit@debbugs.gnu.org; Tue, 18 Mar 2014 05:02:24 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50 autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:54950) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WPpuc-0004Iz-GH for submit@debbugs.gnu.org; Tue, 18 Mar 2014 05:02:18 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:58892) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WPpuX-0005XA-8Z for bug-grep@gnu.org; Tue, 18 Mar 2014 05:02:18 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WPpuR-0004IR-41 for bug-grep@gnu.org; Tue, 18 Mar 2014 05:02:13 -0400 Received: from cantor2.suse.de ([195.135.220.15]:46661 helo=mx2.suse.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WPpuQ-0004HK-Ps for bug-grep@gnu.org; Tue, 18 Mar 2014 05:02:07 -0400 Received: from relay2.suse.de (charybdis-ext.suse.de [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id B6DC57501C; Tue, 18 Mar 2014 09:02:04 +0000 (UTC) Date: Tue, 18 Mar 2014 10:02:04 +0100 (CET) From: Johannes Meixner In-Reply-To: Message-ID: References: <5322D3F0.3060403@grouse.com.au> <53231402.3010507@cs.ucla.edu> <5323513C.4050102@gmail.com> <5323D7D5.1000804@gmail.com> User-Agent: Alpine 2.00 (LNX 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -5.0 (-----) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) Hello, On Mar 14 21:44 Jim Meyering wrote (excerpt): > On Fri, Mar 14, 2014 at 9:32 PM, Bruce Dubbs wrote: >>> See the guidelines in coreutils' HACKING file. ... >> Interesting. Looking at the coreutils-8.22 tarball, there is no HACKING >> file. It's not in the coreutils-8.17 tarball either. It is in the git tree >> though. > > FYI, that is deliberate. > You can get it here, too: > > http://git.savannah.gnu.org/cgit/coreutils.git/tree/HACKING > > If you're hacking on coreutils (as with most pkgs), you should be doing > so via a git clone, with the very latest, not starting from a tarball, > which is almost always out of date by at least a few commits. I agree for real upstream developers (i.e. who work as authors). But for casual external contributors it could be different: In particular experienced users that have it installed as binary software package from a (Linux) distributor (e.g. as RPM package). Those users may find an issue and then install the matching source package (e.g. a source RPM) so that they get the matching tarball of their currently installed binary software, then change that sources and provide a bugreport with patch to upstream. I think it won't hurt when even the binary software package contains such files as documentation. If for example coreutils' HACKING file would be installed as documentation, at least some experienced users may find and read it and contribute to upstream accordingly. In general I think the installed documentation should be complete. For example the coreutils README file could provide more specific information how to contribute correctly to upstream. My currently installed coreutils-8.22 README file (from an openSUSE coreutils-8.22 RPM package) contains ------------------------------------------------------------------------ If you obtained this file as part of a "git clone", then see the README-hacking file. If this file came to you as part of a tar archive, then see the file INSTALL for compilation and installation instructions. ... Send bug reports, questions, comments, etc. to bug-coreutils@gnu.org. If you would like to suggest a patch, see the files README-hacking and HACKING for tips. ------------------------------------------------------------------------ but I neither have README-hacking nor INSTALL nor HACKING installed. Therefore the installed coreutils documentation looks incomplete from my point of view regardless that it is probably considered correct from upstream's point of view. Perhaps this is a packaging issue because the openSUSE coreutils RPM coreutils.spec file basically contains ------------------------------------------------------------------------ %install ... make install DESTDIR="%buildroot" pkglibexecdir=%{_libdir}/%{name} . . . %files ... %doc COPYING NEWS README THANKS ------------------------------------------------------------------------ see https://build.opensuse.org/package/view_file/Base:System/coreutils/coreutils.spec?expand=1 According to the INSTALL file in my coreutils-8.22 tarball a plain "make install" should do "the right thing": ------------------------------------------------------------------------ 4. Type `make install' to install the programs and any data files and documentation. ------------------------------------------------------------------------ As far as I see it seems by default there is no documentation installed (except man pages) which means that each coreutils distributor installs a different set of documentation files. I assume this is intended but I do not understand the reason behind. By the way: I wonder why is there no INSTALL file in the coreutils git source repository at git://git.sv.gnu.org/coreutils I assume all this is intended and there are good reasons for it but from my point of view it looks somehow strange. Kind Regards Johannes Meixner -- SUSE LINUX Products GmbH -- Maxfeldstrasse 5 -- 90409 Nuernberg -- Germany HRB 16746 (AG Nuernberg) GF: Jeff Hawn, Jennifer Guild, Felix Imendoerffer From unknown Mon Jun 23 06:03:29 2025 X-Loop: help-debbugs@gnu.org Subject: bug#17012: [3 PATCHES] Whitespace cleanup : Replace code-alignment tabs with spaces. Resent-From: Jim Meyering Original-Sender: "Debbugs-submit" Resent-CC: bug-grep@gnu.org Resent-Date: Wed, 19 Mar 2014 01:34:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 17012 X-GNU-PR-Package: grep X-GNU-PR-Keywords: patch To: Johannes Meixner Cc: 17012 <17012@debbugs.gnu.org>, Coreutils Received: via spool by 17012-submit@debbugs.gnu.org id=B17012.139519279721112 (code B ref 17012); Wed, 19 Mar 2014 01:34:02 +0000 Received: (at 17012) by debbugs.gnu.org; 19 Mar 2014 01:33:17 +0000 Received: from localhost ([127.0.0.1]:40555 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WQ5Nc-0005US-Uy for submit@debbugs.gnu.org; Tue, 18 Mar 2014 21:33:17 -0400 Received: from mail-pb0-f52.google.com ([209.85.160.52]:52968) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WQ5Na-0005UG-R7 for 17012@debbugs.gnu.org; Tue, 18 Mar 2014 21:33:15 -0400 Received: by mail-pb0-f52.google.com with SMTP id rr13so8111496pbb.25 for <17012@debbugs.gnu.org>; Tue, 18 Mar 2014 18:33:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc:content-type; bh=0cSXGcy4N+KssaSEtoJbSo6HZ6dvu9Vet6dVwuOHG2I=; b=WsXf+qXLBTxEupea1T9lTCjMGkv2n2gfOB3ZRkrTXN4kHSAQFYk7CLzHlZr/VkagBb NF2nq5pKnYVfzpo7xLSrA9VHl4IxKasrO4n/71eMIUFEtZiRGiQNW4S5q3tOIxsB+qyh 5rQP1ACUg7gceR3F0yFB3SQkdO6zHNvRXBBazMmRWBQm3U3X572M9T2DmPR/ehXOsdah 8AHoq1RYimrGGBPwPQVSNdRiJsn+EcZwjB2oUPGOSrHeuiclLFfLABgv6T5ZVlGNB+lE cLjTUZ0tiFAkywB1jKJXRFzZ1IaT+acZNpCYsWDq4WiCaO3tDAn1QySaz1nsXXRNYcH3 kA4g== X-Received: by 10.66.121.195 with SMTP id lm3mr14302336pab.154.1395192793651; Tue, 18 Mar 2014 18:33:13 -0700 (PDT) MIME-Version: 1.0 Received: by 10.68.201.231 with HTTP; Tue, 18 Mar 2014 18:32:53 -0700 (PDT) In-Reply-To: References: <5322D3F0.3060403@grouse.com.au> <53231402.3010507@cs.ucla.edu> <5323513C.4050102@gmail.com> <5323D7D5.1000804@gmail.com> From: Jim Meyering Date: Tue, 18 Mar 2014 18:32:53 -0700 X-Google-Sender-Auth: ShLwYV4I76VxsTaIkoL9oii2JO8 Message-ID: Content-Type: text/plain; charset=ISO-8859-1 X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) On Tue, Mar 18, 2014 at 2:02 AM, Johannes Meixner wrote: > On Mar 14 21:44 Jim Meyering wrote (excerpt): >> >> On Fri, Mar 14, 2014 at 9:32 PM, Bruce Dubbs >> wrote: >>>> >>>> See the guidelines in coreutils' HACKING file. > > ... > >>> Interesting. Looking at the coreutils-8.22 tarball, there is no HACKING >>> file. It's not in the coreutils-8.17 tarball either. It is in the git >>> tree >>> though. >> >> >> FYI, that is deliberate. >> You can get it here, too: >> >> http://git.savannah.gnu.org/cgit/coreutils.git/tree/HACKING >> >> If you're hacking on coreutils (as with most pkgs), you should be doing >> so via a git clone, with the very latest, not starting from a tarball, >> which is almost always out of date by at least a few commits. > > I agree for real upstream developers (i.e. who work as authors). > > But for casual external contributors it could be different: > > In particular experienced users that have it installed as binary > software package from a (Linux) distributor (e.g. as RPM package). > > Those users may find an issue and then install the matching source > package (e.g. a source RPM) so that they get the matching tarball > of their currently installed binary software, then change > that sources and provide a bugreport with patch to upstream. > > I think it won't hurt when even the binary software package contains > such files as documentation. If for example coreutils' HACKING file > would be installed as documentation, at least some experienced users > may find and read it and contribute to upstream accordingly. This might help. I've Cc'd the coreutils discussion list. > In general I think the installed documentation should be complete. > > For example the coreutils README file could provide more specific > information how to contribute correctly to upstream. > > My currently installed coreutils-8.22 README file > (from an openSUSE coreutils-8.22 RPM package) contains > ------------------------------------------------------------------------ > If you obtained this file as part of a "git clone", then see the > README-hacking file. If this file came to you as part of a tar archive, > then see the file INSTALL for compilation and installation instructions. > ... > Send bug reports, questions, comments, etc. to bug-coreutils@gnu.org. > If you would like to suggest a patch, see the files README-hacking > and HACKING for tips. > ------------------------------------------------------------------------ > but I neither have README-hacking nor INSTALL nor HACKING installed. Those things are typically useful to tarball(INSTALL) or cloned-sources consumers, but as mentioned, at least README-hacking and HACKING may help a few new contributors get started. > Therefore the installed coreutils documentation looks incomplete from > my point of view regardless that it is probably considered correct > from upstream's point of view. > > Perhaps this is a packaging issue because the openSUSE coreutils RPM > coreutils.spec file basically contains > ------------------------------------------------------------------------ > %install > ... > make install DESTDIR="%buildroot" pkglibexecdir=%{_libdir}/%{name} > . > . > . > %files > ... > %doc COPYING NEWS README THANKS > ------------------------------------------------------------------------ > see > https://build.opensuse.org/package/view_file/Base:System/coreutils/coreutils.spec?expand=1 > > According to the INSTALL file in my coreutils-8.22 tarball > a plain "make install" should do "the right thing": > ------------------------------------------------------------------------ > 4. Type `make install' to install the programs and any data files and > documentation. > ------------------------------------------------------------------------ > > As far as I see it seems by default there is no documentation installed > (except man pages) which means that each coreutils distributor installs > a different set of documentation files. Installed by "make install"? That installs the build doc/*.info files, too. Those constitute the primary documentation. > I assume this is intended but I do not understand the reason behind. > > By the way: > I wonder why is there no INSTALL file in the coreutils > git source repository at git://git.sv.gnu.org/coreutils It is imported from the gnulib submodule when you run ./bootstrap, as you must when building from cloned sources. > I assume all this is intended and there are good reasons for it > but from my point of view it looks somehow strange. > > Kind Regards > Johannes Meixner Thanks for the feedback. From debbugs-submit-bounces@debbugs.gnu.org Sun Apr 06 01:32:25 2014 Received: (at control) by debbugs.gnu.org; 6 Apr 2014 05:32:25 +0000 Received: from localhost ([127.0.0.1]:37367 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WWfgu-0006mT-Ui for submit@debbugs.gnu.org; Sun, 06 Apr 2014 01:32:25 -0400 Received: from smtp.cs.ucla.edu ([131.179.128.62]:47109) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WWfgs-0006mL-NW for control@debbugs.gnu.org; Sun, 06 Apr 2014 01:32:23 -0400 Received: from localhost (localhost.localdomain [127.0.0.1]) by smtp.cs.ucla.edu (Postfix) with ESMTP id 32B6839E8014 for ; Sat, 5 Apr 2014 22:32:22 -0700 (PDT) X-Virus-Scanned: amavisd-new at smtp.cs.ucla.edu Received: from smtp.cs.ucla.edu ([127.0.0.1]) by localhost (smtp.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 7eAOe0b+X4fE for ; Sat, 5 Apr 2014 22:32:13 -0700 (PDT) Received: from [192.168.1.9] (pool-108-0-233-62.lsanca.fios.verizon.net [108.0.233.62]) by smtp.cs.ucla.edu (Postfix) with ESMTPSA id 4CAEAA60010 for ; Sat, 5 Apr 2014 22:32:10 -0700 (PDT) Message-ID: <5340E6D9.1010501@cs.ucla.edu> Date: Sat, 05 Apr 2014 22:32:09 -0700 From: Paul Eggert Organization: UCLA Computer Science Department User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.4.0 MIME-Version: 1.0 To: control@debbugs.gnu.org Subject: 17012 seems to be not a bug Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Score: -2.9 (--) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.9 (--) tags 17012 + notabug From unknown Mon Jun 23 06:03:29 2025 MIME-Version: 1.0 X-Mailer: MIME-tools 5.503 (Entity 5.503) X-Loop: help-debbugs@gnu.org From: help-debbugs@gnu.org (GNU bug Tracking System) To: behoffski Subject: bug#17012: closed (Re: [3 PATCHES] Whitespace cleanup : Replace code-alignment tabs with spaces.) Message-ID: References: <5340E758.3090300@cs.ucla.edu> <5322D3F0.3060403@grouse.com.au> X-Gnu-PR-Message: they-closed 17012 X-Gnu-PR-Package: grep X-Gnu-PR-Keywords: notabug patch Reply-To: 17012@debbugs.gnu.org Date: Sun, 06 Apr 2014 05:35:03 +0000 Content-Type: multipart/mixed; boundary="----------=_1396762503-26349-1" This is a multi-part message in MIME format... ------------=_1396762503-26349-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Your bug report #17012: [3 PATCHES] Whitespace cleanup : Replace code-alignment tabs with s= paces. which was filed against the grep package, has been closed. The explanation is attached below, along with your original report. If you require more details, please reply to 17012@debbugs.gnu.org. --=20 17012: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D17012 GNU Bug Tracking System Contact help-debbugs@gnu.org with problems ------------=_1396762503-26349-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 17012-done) by debbugs.gnu.org; 6 Apr 2014 05:34:29 +0000 Received: from localhost ([127.0.0.1]:37372 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WWfiu-0006q2-HK for submit@debbugs.gnu.org; Sun, 06 Apr 2014 01:34:28 -0400 Received: from smtp.cs.ucla.edu ([131.179.128.62]:47187) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WWfis-0006pq-Gh for 17012-done@debbugs.gnu.org; Sun, 06 Apr 2014 01:34:26 -0400 Received: from localhost (localhost.localdomain [127.0.0.1]) by smtp.cs.ucla.edu (Postfix) with ESMTP id 19CF039E8018 for <17012-done@debbugs.gnu.org>; Sat, 5 Apr 2014 22:34:26 -0700 (PDT) X-Virus-Scanned: amavisd-new at smtp.cs.ucla.edu Received: from smtp.cs.ucla.edu ([127.0.0.1]) by localhost (smtp.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id UMh6YBWYSc6j for <17012-done@debbugs.gnu.org>; Sat, 5 Apr 2014 22:34:17 -0700 (PDT) Received: from [192.168.1.9] (pool-108-0-233-62.lsanca.fios.verizon.net [108.0.233.62]) by smtp.cs.ucla.edu (Postfix) with ESMTPSA id 69D5A39E8014 for <17012-done@debbugs.gnu.org>; Sat, 5 Apr 2014 22:34:17 -0700 (PDT) Message-ID: <5340E758.3090300@cs.ucla.edu> Date: Sat, 05 Apr 2014 22:34:16 -0700 From: Paul Eggert Organization: UCLA Computer Science Department User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.4.0 MIME-Version: 1.0 To: 17012-done@debbugs.gnu.org Subject: Re: [3 PATCHES] Whitespace cleanup : Replace code-alignment tabs with spaces. Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Score: -2.9 (--) X-Debbugs-Envelope-To: 17012-done X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.9 (--) As the original issue here seems to have been resolved with a "that's not a bug", I'm closing the report. ------------=_1396762503-26349-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at submit) by debbugs.gnu.org; 14 Mar 2014 10:03:48 +0000 Received: from localhost ([127.0.0.1]:36487 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WOOxv-0001es-Gg for submit@debbugs.gnu.org; Fri, 14 Mar 2014 06:03:48 -0400 Received: from eggs.gnu.org ([208.118.235.92]:43002) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WOOxs-0001ek-Qa for submit@debbugs.gnu.org; Fri, 14 Mar 2014 06:03:45 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WOOxr-0004YT-BX for submit@debbugs.gnu.org; Fri, 14 Mar 2014 06:03:44 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50 autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:45225) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WOOxr-0004YP-8L for submit@debbugs.gnu.org; Fri, 14 Mar 2014 06:03:43 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:44720) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WOOxq-00045c-2f for bug-grep@gnu.org; Fri, 14 Mar 2014 06:03:43 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WOOxo-0004XT-RL for bug-grep@gnu.org; Fri, 14 Mar 2014 06:03:42 -0400 Received: from ipmail04.adl6.internode.on.net ([2001:44b8:8060:ff02:300:1:6:4]:14518) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WOOxo-0004O4-4N for bug-grep@gnu.org; Fri, 14 Mar 2014 06:03:40 -0400 Received: from ppp118-210-133-98.lns20.adl6.internode.on.net (HELO [192.168.1.1]) ([118.210.133.98]) by ipmail04.adl6.internode.on.net with ESMTP; 14 Mar 2014 20:33:29 +1030 Message-ID: <5322D3F0.3060403@grouse.com.au> Date: Fri, 14 Mar 2014 20:33:28 +1030 From: behoffski User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.3.0 MIME-Version: 1.0 To: bug-grep@gnu.org Subject: [3 PATCHES] Whitespace cleanup : Replace code-alignment tabs with spaces. Content-Type: multipart/mixed; boundary="------------030907030805040305080304" X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) This is a multi-part message in MIME format. --------------030907030805040305080304 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit G'day, I've been looking at the grep sources with various tools, and have found on a couple of occasions that tab characters (ASCII code 09, ^I) confused me where they occurred in the code. For example, in commit ...c73ca06859c0820d9d, Paul Eggert had to pacify "make dist", which calls "make syntax-check", as a line had leading tabs: * src/dfa.c (parse_bracket_exp): Reindent with spaces. I've worked on other projects where consistent and concise code formatting is stringently applied (usually as code commit hooks that run Perl scripts), and have found this environment useful, as there is a "canonical" representation of the source to refer to. GNU grep has made several steps in this direction (e.g. no leading tabs, no trailing whitespace), but the translation isn't complete: Tabs still appear in a few selected places in the code. One easy way to spot tab characters in C sources (merely .c and .h files here) is to use "cat -T", which replaces the horizontal tab character with "^I": for f in *.[ch] ; do TMPFILE =`mktemp` echo "$f" ; cat -T "$f" >"$TMPFILE" ; \ diff "$f" "$TMPFILE" ; rm -f "$TMPFILE" done Another way (ASCII) is to look for hex code "09" in an octal dump of a source: for f in *.[ch] ; do echo "$f" ; od -txC "$f" | grep " 09" done Attached are three small, concise patches, each changing one file in the grep/src directory (I'm not daring to tackle gnulib at present). These are small, self-contained and should be fairly easy to review. The files modified are grep.h, kwset.h and dosbuf.c. Please let me know if these changes are considered to be worthwhile, and, if so, I'll submit larger patches for kwset.c, main.c and dfa.c. cheers, behoffski (Brenton Hoff) Programmer, Grouse Software --------------030907030805040305080304 Content-Type: text/x-patch; name="maint-dosbuf.c-tabs-spaces.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="maint-dosbuf.c-tabs-spaces.patch" >From d83855f738b4084b65088724c71357dc1bd8b861 Mon Sep 17 00:00:00 2001 From: behoffski Date: Fri, 14 Mar 2014 19:39:38 +1030 Subject: [PATCH 3/3] maint: dosbuf.c: Replace code-alignment tabs with spaces. Tabs are already forbidden as leading character of a line, and trailing whitespace is also not allowed. This change is part of an effort to tighten source layout options to improve consistency and repeatability. --- src/dosbuf.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/dosbuf.c b/src/dosbuf.c index 3648371..c880ab6 100644 --- a/src/dosbuf.c +++ b/src/dosbuf.c @@ -35,8 +35,8 @@ typedef enum { } File_type; struct dos_map { - off_t pos; /* position in buffer passed to matcher */ - off_t add; /* how much to add when reporting char position */ + off_t pos; /* position in buffer passed to matcher */ + off_t add; /* how much to add when reporting char position */ }; static int dos_report_unix_offset = 0; -- 1.8.3.2 --------------030907030805040305080304 Content-Type: text/x-patch; name="maint-grep.h-tabs-spaces.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="maint-grep.h-tabs-spaces.patch" >From 6dcda3e3e38ad38cfde95252d1baacb44fae30d1 Mon Sep 17 00:00:00 2001 From: behoffski Date: Fri, 14 Mar 2014 19:38:34 +1030 Subject: [PATCH 1/3] maint: grep.h: Replace code-alignment tabs with spaces. Tabs are already forbidden as leading character of a line, and trailing whitespace is also not allowed. This change is part of an effort to tighten source layout options to improve consistency and repeatability. --- src/grep.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/grep.h b/src/grep.h index 4d642a1..84844a1 100644 --- a/src/grep.h +++ b/src/grep.h @@ -39,9 +39,9 @@ extern const char after_options[]; /* The following flags are exported from grep for the matchers to look at. */ -extern int match_icase; /* -i */ -extern int match_words; /* -w */ -extern int match_lines; /* -x */ -extern unsigned char eolbyte; /* -z */ +extern int match_icase; /* -i */ +extern int match_words; /* -w */ +extern int match_lines; /* -x */ +extern unsigned char eolbyte; /* -z */ #endif -- 1.8.3.2 --------------030907030805040305080304 Content-Type: text/x-patch; name="maint-kwset.h-tabs-spaces.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="maint-kwset.h-tabs-spaces.patch" >From a41d1a3746610a2693981cbb6bdfcf45e135beb8 Mon Sep 17 00:00:00 2001 From: behoffski Date: Fri, 14 Mar 2014 19:39:06 +1030 Subject: [PATCH 2/3] maint: kwset.h: Replace code-alignment tabs with spaces. Tabs are already forbidden as leading character of a line, and trailing whitespace is also not allowed. This change is part of an effort to tighten source layout options to improve consistency and repeatability. --- src/kwset.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/kwset.h b/src/kwset.h index 2d3cdd9..977f9f0 100644 --- a/src/kwset.h +++ b/src/kwset.h @@ -23,9 +23,9 @@ struct kwsmatch { - size_t index; /* Index number of matching keyword. */ - size_t offset[1]; /* Offset of each submatch. */ - size_t size[1]; /* Length of each submatch. */ + size_t index; /* Index number of matching keyword. */ + size_t offset[1]; /* Offset of each submatch. */ + size_t size[1]; /* Length of each submatch. */ }; #include "arg-nonnull.h" -- 1.8.3.2 --------------030907030805040305080304-- ------------=_1396762503-26349-1--