Re: [Vala] `stdout.puts' doesn't have "\n"?
- From: jryan <jryan curious-os com>
- To: vala-list <vala-list gnome org>
- Subject: Re: [Vala] `stdout.puts' doesn't have "\n"?
- Date: Mon, 02 May 2011 00:47:12 -0400
Excerpts from Mike Ma's message of 2011-05-01 23:58:52 -0400:
I wrote a Hello World app like this:
int main ()
{
stdout.puts ("Hello World");
return 0;
}
then,
$ valac hello.vala
$ ./hello
Hello World$ #NO \n!
Is it a bug?
Looking in the vapi:
public class FileStream {
...
[CCode (cname="fputs",...)]
public void puts(string s);
}
Then looking at man fputs():
fputs() writes the string s to stream, without its trailing '\0'
...
puts() writes the string s and a trailing newline to stdout
Why is puts(string s) set to fputs again? Formatting?
--
Jonathan Ryan
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]