From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from phicode.de ([46.4.89.174]) by ur; Thu Dec 31 06:08:14 EST 2015 Received: from localhost (localhost [127.0.0.1]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by phicode.de (Postfix) with ESMTPS id C975F40040 for <9front@9front.org>; Thu, 31 Dec 2015 12:08:14 +0100 (CET) Date: Thu, 31 Dec 2015 12:08:14 +0100 (CET) From: Julius Schmidt X-X-Sender: aiju@localhost To: 9front@9front.org Subject: mp(2) base parameters Message-ID: List-ID: <9front.9front.org> List-Help: X-Glyph: ➈ X-Bullshit: object-oriented overflow-preventing hardware plugin SVG descriptor wrapper-based locator User-Agent: Alpine 2.00 (LNX 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; format=flowed; charset=US-ASCII A lot of mp(2) string-related functions currently default to base 16 if no base is supplied. I would like to see the following changes to this behaviour: - strtomp should treat 0 the same as strtol (i.e. interpret 0x prefix etc.) - other functions may treat 0 as 16 for compatibility - any value of base that is neither 0 nor a currently implemented base should call abort() This allows further expansion of support for various bases without breaking existing behaviour in subtle ways (I've already added support for bases 2, 4, 8 in various places). Of course, this change WILL break existing code but hopefully in a more obvious way. The strtomp 0 change is probably the most dangerous but I also think it makes a lot of sense. Ideally someone would write code that can handle any base (within limits). aiju