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: <alpine.LNX.2.01.1209141624530.18169@frira.zrqbmnf.qr>
Date:	Fri, 14 Sep 2012 16:25:15 +0200 (CEST)
From:	Jan Engelhardt <jengelh@...i.de>
To:	Jim Rees <rees@...ch.edu>
cc:	Bernd Petrovitsch <bernd@...rovitsch.priv.at>,
	"J. Bruce Fields" <bfields@...ldses.org>,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH] strings: helper for maximum decimal encoding of an
 unsigned integer

On Friday 2012-09-14 15:46, Jim Rees wrote:

>Jan Engelhardt wrote:
>
>  >A pure K&R-C version would use a string:
>  >#define base10len(i) "\0x1\0x3\0x5\0x8\0x0A\0x0D\0x0F\0x11\0x14"[sizeof(i)]
>  >(if I converted them properly into hexadecimal)
>  The syntax is \x01\x03\x05...
>
>K&R doesn't have the \x escape, only \0 (octal).

People recommend K&R only for the introductory reading, not for its 
actuality.
--
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