Re: [Vala] Beginners question about keyboard input

2008-12-03 Thread David Keijser
Oh, my bad then. Thanks for pointing it out. 2008/12/3 Thomas Chust <[EMAIL PROTECTED]>: > David Keijser schrieb: >> [...] >> I second this. readline is not only better but gets() is not even safe >> (see man 3 gets) >> [...] > > True. It should be noted, though, that Vala does *not* provide a bin

Re: [Vala] Beginners question about keyboard input

2008-12-03 Thread Thomas Chust
David Keijser schrieb: > [...] > I second this. readline is not only better but gets() is not even safe > (see man 3 gets) > [...] True. It should be noted, though, that Vala does *not* provide a binding for gets(3), but only for fgets(3). The latter function does *not* share the inherent buffer o

Re: [Vala] Beginners question about keyboard input

2008-12-03 Thread Barry Kauler
Thanks for the responses! That's great news about readline. After I received the first reply, from Thomas, I got stuck into implementing it and also expanded my "File and console I/O" page: http://puppylinux.com/genie/inputoutput.htm Important: my Genie tutorials are definitely a work-in-progres

Re: [Vala] Beginners question about keyboard input

2008-12-03 Thread Clément DAVID
I just use it at vala-benchmarks and security take time :) Of course for real application prefer readline. 2008/12/3 Frederik <[EMAIL PROTECTED]>: > David Keijser wrote: >> >> I second this. readline is not only better but gets() is not even safe >> (see man 3 gets) > > I have created a patch wit

Re: [Vala] Beginners question about keyboard input

2008-12-02 Thread Frederik
David Keijser wrote: I second this. readline is not only better but gets() is not even safe (see man 3 gets) I have created a patch with the beginning of GNU Readline bindings: http://bugzilla.gnome.org/show_bug.cgi?id=563057 ___ Vala-list mailing lis

Re: [Vala] Beginners question about keyboard input

2008-12-02 Thread David Keijser
2008/12/3 Frederik <[EMAIL PROTECTED]>: > Clément DAVID wrote: >> >> Hi, >> >> I don't use the Genie syntax but a working sample for vala is : >> >> using GLib; >> >> public class SumCol { >> >>public static it main(string [] args) >>{ >>int MAXLINELEN = 128; >> >>

Re: [Vala] Beginners question about keyboard input

2008-12-02 Thread Frederik
Clément DAVID wrote: Hi, I don't use the Genie syntax but a working sample for vala is : using GLib; public class SumCol { public static it main(string [] args) { int MAXLINELEN = 128; int sum = 0; char[] str = n

Re: [Vala] Beginners question about keyboard input

2008-12-01 Thread Clément DAVID
Hi, I don't use the Genie syntax but a working sample for vala is : >> using GLib; public class SumCol { public static it main(string [] args) { int MAXLINELEN = 128; int sum = 0; char[] str = new char [MAXLINELEN]

[Vala] Beginners question about keyboard input

2008-12-01 Thread Barry Kauler
I'm learning Vala, using the Genie syntax, and I'm stuck on something. It would be great if a kind soul reading this would take a moment to help me out. I'm writing a console app and I want to read one line from the keyboard. The C function gets() seems to be the one, however I get this this far: