All of lore.kernel.org
 help / color / mirror / Atom feed
From: Adrian Bunk <bunk@kernel.org>
To: "Robert P. J. Day" <rpjday@crashcourse.ca>
Cc: Randy Dunlap <randy.dunlap@oracle.com>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: duplicated include files
Date: Sun, 4 Nov 2007 20:03:48 +0100	[thread overview]
Message-ID: <20071104190348.GN12045@stusta.de> (raw)
In-Reply-To: <Pine.LNX.4.64.0711041334590.5541@localhost.localdomain>

On Sun, Nov 04, 2007 at 01:37:31PM -0500, Robert P. J. Day wrote:
> On Sun, 4 Nov 2007, Randy Dunlap wrote:
> 
> > On Sun, 4 Nov 2007 12:31:38 -0500 (EST) Robert P. J. Day wrote:
> >
> > >
> > >   given the recent patches to remove duplicated #include preprocessor
> > > directives in source files, let it be known that there are a number of
> > > them:
> > >
> > >   http://www.crashcourse.ca/wiki/index.php/Duplicate_include_files
> > >
> > > help yourself.
> >
> > Could you make the tool (script?) available also, please?
> 
> trust me, it's not a script i'm particularly proud of:
> 
> ===========================
> #!/bin/sh
> 
> DIR=${1-*}              # by default, all directories
> 
> for cf in $(find ${DIR} -name *.c) ; do
>         echo ${cf}
>         grep "#include" $cf | sort | uniq -c | grep -v 1
> done | grep -B1 "#include" | grep -v -- "--"
> ===========================
> 
>   on the bright side, it took about 90 seconds to write, but i won't
> be winning any awards for style.
> 
>   i'll add it to the web page.


BTW:  "make includecheck" already does the same...


> rday


cu
Adrian

-- 

       "Is there not promise of rain?" Ling Tan asked suddenly out
        of the darkness. There had been need of rain for many days.
       "Only a promise," Lao Er said.
                                       Pearl S. Buck - Dragon Seed


  parent reply	other threads:[~2007-11-04 19:04 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-11-04 17:31 duplicated include files Robert P. J. Day
2007-11-04 18:07 ` Randy Dunlap
2007-11-04 18:37   ` Robert P. J. Day
2007-11-04 18:46     ` Randy Dunlap
2007-11-04 19:03     ` Adrian Bunk [this message]
2007-11-04 19:10       ` Robert P. J. Day
2007-11-05  3:02       ` Paul Mundt
2007-11-05  8:27 ` Geert Uytterhoeven
  -- strict thread matches above, loose matches on Subject: below --
2007-11-04 19:41 Marco Costalba
2007-11-04 19:43 ` Marco Costalba
2007-11-04 19:49   ` Robert P. J. Day
2007-11-04 23:20     ` Jeremy Fitzhardinge
2007-11-05  3:49       ` Robert P. J. Day
2007-11-04 23:43     ` Bernd Petrovitsch
2007-11-04 19:51   ` Randy Dunlap
2007-11-05 10:51 ` Geert Uytterhoeven
2007-11-05 11:38   ` Marco Costalba
2007-11-14 20:40   ` Sam Ravnborg

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20071104190348.GN12045@stusta.de \
    --to=bunk@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=randy.dunlap@oracle.com \
    --cc=rpjday@crashcourse.ca \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.