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]
Date:	Fri, 6 Apr 2007 16:03:35 -0700
From:	Randy Dunlap <randy.dunlap@...cle.com>
To:	Jan Engelhardt <jengelh@...ux01.gwdg.de>
Cc:	lkml <linux-kernel@...r.kernel.org>,
	akpm <akpm@...ux-foundation.org>
Subject: Re: [PATCH] kernel-doc: handle spaces in array size

On Fri, 6 Apr 2007 21:24:48 +0200 (MEST) Jan Engelhardt wrote:

> On Apr 6 2007 11:47, Randy Dunlap wrote:
> >
> >Unfortunately, kernel-doc has problems with a struct field like this:
> >	uint8_t databuf[NAND_MAX_PAGESIZE + NAND_MAX_OOBSIZE];
> >
> >simply due to the spaces around the "+" sign, so drop all spaces inside
> >[...] so that parsing is done correctly (in some sense).
> >

...

> 
> 	while($arg =~ s/\[(.*)\s+(.*)\]/[$1$2]/) {
> 	}
> 
> should do it, and saves us the pre-matching. (Also note the + at \s)
> (No need to escape [ and ] in the target pattern.)

Yep, that works.  Want to send it with sign-off or shall I just
send a new patch to akpm?

> I can also offer this gem which should do it the most saving way by
> matching the inside of [] exactly once, and otherwise
> matching/replacing only on \s:
> 
> 	$arg =~ s{\[(.*)\]}{($_=$1)=~s/\s+//g;"[$_]"}e;
> 
> (I already hear everyone screaming... ;-)

No, thanks.

---
~Randy
*** Remember to use Documentation/SubmitChecklist when testing your code ***
-
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