Deprecation in core.sys.posix.termios

H. S. Teoh hsteoh at quickfur.ath.cx
Fri Nov 16 10:35:10 PST 2012


On Fri, Nov 16, 2012 at 07:15:01PM +0100, Alex Rønne Petersen wrote:
> On 16-11-2012 19:14, H. S. Teoh wrote:
> >Due to the deprecation of octal literals, core.sys.posix.termios doesn't
> >compile anymore. But because this is in druntime, we can't use
> >std.conv.octal. What should be done about this?
> >
> >
> >T
> >
> 
> I fixed this in a pull request of mine because it happened to get in
> my way too:
> https://github.com/D-Programming-Language/druntime/pull/340
> 
> (I really wish someone would review/merge that pull request.)

Yeah somebody please merge that pull request!


> Generally, we just turn octal literals into hex literals in druntime
> (and write the octal number in a comment if necessary).
[...]

On another note, I love vim/perl 1-liners:

	'<,'>!perl -pe's/\b(0\d+)/sprintf("0x\%04x", oct $1)/eg;'

Automatically converts all octal literals into 4-digit padded hex
literals in selection. :-)


T

-- 
IBM = I Blame Microsoft


More information about the Digitalmars-d mailing list