* mp(2) base parameters
@ 2015-12-31 11:08 Julius Schmidt
2015-12-31 15:24 ` [9front] " cinap_lenrek
0 siblings, 1 reply; 2+ messages in thread
From: Julius Schmidt @ 2015-12-31 11:08 UTC (permalink / raw)
To: 9front
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
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [9front] mp(2) base parameters
2015-12-31 11:08 mp(2) base parameters Julius Schmidt
@ 2015-12-31 15:24 ` cinap_lenrek
0 siblings, 0 replies; 2+ messages in thread
From: cinap_lenrek @ 2015-12-31 15:24 UTC (permalink / raw)
To: 9front
makes sense.
--
cinap
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-12-31 15:24 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-12-31 11:08 mp(2) base parameters Julius Schmidt
2015-12-31 15:24 ` [9front] " cinap_lenrek
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).