input prompt functions

Started by handsource-dyko, March 28, 2012, 09:16:35 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

handsource-dyko

I just thought of something could be usefull addition: console input functions like those from C: scanf(), fscanf() and sscanf(). These functions would be usefull in combination with say(), so that you can have input prompts in console applications without using commandline arguments.

Maybe a "graphical" version for use in combination with the write functions in mod_text is possible too. I know it's possible to make your own textinput function, but it's nicer to have something standard for this.

SplinterGU

Download Lastest BennuGD Release: http://www.bennugd.org/node/2

handsource-dyko

Why would scanf be impossible?  ???

SplinterGU

#3
this was talk several times.

scanf* are insecure functions... and scanf* are wait functions that will block all system.

bennugd can't be blocked.

and... scanf* need std key input... we can implement a own scanf* that use SDL input, but this functions aren't a good idea.
Download Lastest BennuGD Release: http://www.bennugd.org/node/2

handsource-dyko

But what about a self made function that's compatible with bennu's design instead using standard C or SDL functions? Or would that be similair to re-inventing the wheel?  :-\ Or is it because of the "semi-parallel" design that makes something like that very complicated?

SplinterGU

sorry, I don't have plans of add it to bennugd official release.
Download Lastest BennuGD Release: http://www.bennugd.org/node/2