lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Pine.LNX.4.64.0711041334590.5541@localhost.localdomain>
Date:	Sun, 4 Nov 2007 13:37:31 -0500 (EST)
From:	"Robert P. J. Day" <rpjday@...shcourse.ca>
To:	Randy Dunlap <randy.dunlap@...cle.com>
cc:	Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: duplicated include files

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.

rday
-- 
========================================================================
Robert P. J. Day
Linux Consulting, Training and Annoying Kernel Pedantry
Waterloo, Ontario, CANADA

http://crashcourse.ca
========================================================================
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ