Re: [kbuild-devel] Another version of cleanfile/cleanpatch

2007-06-07 Thread Oleg Verych
On Thu, Jun 07, 2007 at 04:19:56PM -0700, H. Peter Anvin wrote:
 Oleg Verych wrote:
  
  Because of that, i think, following is redundant:
  
  - to check for binary files
 
 find . -type f | xargs cleanfile

What about patches?

Anyway, by agreement (with myself), i've stopped on having per-file-name
division (prev. message first patch, and that was last design remaining
from cleanfile/cleanpatch). So:

for f in $*
do clean-whitespace $f 21 /dev/null
done

But this doesn't look like interactive usage, which i've concluded.
Plus copy is saved in $f.clean file, so user can `diff -u` to see any
destruction and possibly report a bug.

[] 
  - scan whole file for long lines, with useless bunch of messages about
ones. Useless, because script doesn't fix that, it can't do that!
 
 Still useful to let the human know what is going on, and why.

What i've done was `cleanpatch patch-2.6.21-rc4-rc5`
That's where usefulness comes from ;)

   -hpa


-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
kbuild-devel mailing list
kbuild-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kbuild-devel


Re: [kbuild-devel] Sunifdef

2007-06-07 Thread Oleg Verych

* From: David Woodhouse
* Date: Thu, 24 May 2007 11:32:45 -0400

 On Wed, 2007-05-23 at 13:29 +0100, Jonathan Underwood wrote:
 Dear Kernel list,
 
 I've noticed in the past that unifdef is used in kernel package
 building. I wonder if you're aware of a maintained and more
 featureful program, Sunifdef, which has evolved from unifdef (which
 seems mostly unmaintained). It's packaged for Fedora, and has a
 website here.

 The kernel no longer uses an external unifdef -- it has its own in
 scripts/unifdef.c. If you want to work with the upstream kernel to
 change that to sunifdef, go ahead.

 Can 'sunifdef -U__KERNEL__' fix up stuff like...

 #if defined(__KERNEL__)  defined(__FOO__)
  and
 #if defined(__KERNEL__) || defined(__BAR__)

 ... by treating them as '#if 0' (and eliding completely) and by
 rewriting to just #ifdef __BAR__, respectively? If so, changing the
 upstream kernel seems like it would be useful.

If, what you've wrote would be policy (with watchdog script in the git),
i think, simple (sed) scripts can be written to unifdef __KERNEL__ for
userspace headers, with further sed'ing them(compiler.h), without any
need of external or internal *programs*.

Linux coding standards got rid of many C obfustications, happily.

-*-
[EMAIL PROTECTED]:/tmp$ grep -e __KERNEL /usr/include/linux/soundcard.h | grep 
'!'
#if (!defined(__KERNEL__)  !defined(KERNEL)  !defined(INKERNEL)  
!defined(_KERNEL)) || defined(USE_SEQ_MACROS)
[EMAIL PROTECTED]:/tmp$
-*-
Even this one is simple regex, but anyway, policy would be good.

 -- 
 dwmw2


-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
kbuild-devel mailing list
kbuild-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kbuild-devel