Autor Tema: input prompt functions  (Leído 2556 veces)

0 Usuarios y 2 Visitantes están viendo este tema.

Desconectado handsource-dyko

  • Hero Member
  • *****
  • Mensajes: 568
  • Karma: 32
  • Sexo: Masculino
  • I'm the eye in the sky.
    • Ver Perfil
    • dyko designs
input prompt functions
« en: Marzo 28, 2012, 01:16:35 am »
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.

Desconectado SplinterGU

  • Hero Member
  • *****
  • Mensajes: 12360
  • Karma: 365
  • Sexo: Masculino
    • Ver Perfil
Re:input prompt functions
« Respuesta #1 en: Marzo 28, 2012, 05:27:41 am »
imposible...
Download Lastest BennuGD Release: http://www.bennugd.org/node/2

Desconectado handsource-dyko

  • Hero Member
  • *****
  • Mensajes: 568
  • Karma: 32
  • Sexo: Masculino
  • I'm the eye in the sky.
    • Ver Perfil
    • dyko designs
Re:input prompt functions
« Respuesta #2 en: Marzo 28, 2012, 06:49:13 am »
Why would scanf be impossible?  ???

Desconectado SplinterGU

  • Hero Member
  • *****
  • Mensajes: 12360
  • Karma: 365
  • Sexo: Masculino
    • Ver Perfil
Re:input prompt functions
« Respuesta #3 en: Marzo 28, 2012, 07:00:03 am »
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.
« última modificación: Marzo 28, 2012, 07:01:52 am por SplinterGU »
Download Lastest BennuGD Release: http://www.bennugd.org/node/2

Desconectado handsource-dyko

  • Hero Member
  • *****
  • Mensajes: 568
  • Karma: 32
  • Sexo: Masculino
  • I'm the eye in the sky.
    • Ver Perfil
    • dyko designs
Re:input prompt functions
« Respuesta #4 en: Marzo 28, 2012, 07:35:26 am »
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?

Desconectado SplinterGU

  • Hero Member
  • *****
  • Mensajes: 12360
  • Karma: 365
  • Sexo: Masculino
    • Ver Perfil
Re:input prompt functions
« Respuesta #5 en: Marzo 28, 2012, 08:04:41 am »
sorry, I don't have plans of add it to bennugd official release.
Download Lastest BennuGD Release: http://www.bennugd.org/node/2