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.61.0706041805560.20829@yvahk01.tjqt.qr>
Date:	Mon, 4 Jun 2007 18:07:10 +0200 (MEST)
From:	Jan Engelhardt <jengelh@...ux01.gwdg.de>
To:	Sam Ravnborg <sam@...nborg.org>
cc:	LKML <linux-kernel@...r.kernel.org>,
	Andrew Morton <akpm@...ux-foundation.org>,
	kbuild-devel@...ts.sourceforge.net
Subject: Re: [PATCH 08/19] scripts: Make cleanfile/cleanpatch warn about long
 lines


On Jun 3 2007 22:47, Sam Ravnborg wrote:
>
>Make the "cleanfile" and "cleanpatch" script warn about long lines,
>by default lines whose visual width exceeds 79 characters.

Nice, nice. But, am I asking too much if tabs and kernel codestyle
could be used? (/me hides..., but see scripts/checkpatch.pl :-)

>+# Compute the visual width of a string
>+sub strwidth($) {
>+    no bytes;			# Tab alignment depends on characters
>+
>+    my($li) = @_;
>+    my($c, $i);
>+    my $pos = 0;
>+    my $mlen = 0;
>+
>+    for ($i = 0; $i < length($li); $i++) {
>+	$c = substr($li,$i,1);
>+	if ($c eq "\t") {
>+	    $pos = ($pos+8) & ~7;
>+	} elsif ($c eq "\n") {
>+	    $mlen = $pos if ($pos > $mlen);
>+	    $pos = 0;
>+	} else {
>+	    $pos++;
>+	}
>+    }
>+
>+    $mlen = $pos if ($pos > $mlen);
>+    return $mlen;
>+}
>+


	Jan
-- 
-
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