Re: std.stdio.stderr

2017-06-10 Thread Russel Winder via Digitalmars-d-learn
On Sat, 2017-06-10 at 16:45 +, Antonio Corbi via Digitalmars-d- learn wrote: > […] > > It seems to work for me with a dumb example: […] Spurred on by your report of success, I discovered my error. D treats a char[1024] as 1024 characters when using the %s format specifier. I had to use

Re: std.stdio.stderr

2017-06-10 Thread Antonio Corbi via Digitalmars-d-learn
On Saturday, 10 June 2017 at 16:10:18 UTC, Russel Winder wrote: It appears that std.stdio.stderr does not wor exactly as stdio stderr does. In particular std.stdio.stderr.writef(…) does not work as fprintf(stderr…) does. Some code I am porting from C++ to D makes use of ANSI escape codes

std.stdio.stderr

2017-06-10 Thread Russel Winder via Digitalmars-d-learn
It appears that std.stdio.stderr does not wor exactly as stdio stderr does. In particular std.stdio.stderr.writef(…) does not work as fprintf(stderr…) does. Some code I am porting from C++ to D makes use of ANSI escape codes to go up a line and overwrite what was there, as well as change colours

core.stdc.stdio.stderr != std.stdio.stderr ?

2011-08-19 Thread bearophile
Is this all correct? static import core.stdc.stdio; static import std.stdio; void main() { std.stdio.fprintf(core.stdc.stdio.stderr, Error\n); // OK std.stdio.fprintf(std.stdio.stderr, Error\n); // line 5, error } The latest DMD gives: test.d(5): Error: function core.stdc.stdio.fprintf

Re: core.stdc.stdio.stderr != std.stdio.stderr ?

2011-08-19 Thread Steven Schveighoffer
On Fri, 19 Aug 2011 10:12:11 -0400, bearophile bearophileh...@lycos.com wrote: Is this all correct? static import core.stdc.stdio; static import std.stdio; void main() { std.stdio.fprintf(core.stdc.stdio.stderr, Error\n); // OK std.stdio.fprintf(std.stdio.stderr, Error\n); // line 5

Re: core.stdc.stdio.stderr != std.stdio.stderr ?

2011-08-19 Thread David Nadlinger
On 8/19/11 4:12 PM, bearophile wrote: static import core.stdc.stdio; static import std.stdio; void main() { std.stdio.fprintf(core.stdc.stdio.stderr, Error\n); // OK std.stdio.fprintf(std.stdio.stderr, Error\n); // line 5, error } std.stdio.stderr is a wrapper around