News:

Come Chat with us live! Learn how HERE!

Main Menu

Line Preservation?

Started by Bomb, July 23, 2008, 09:35:32 PM

Bomb

Does anyone know how the tremded console preserves the bottom line? That is, what keeps the output from overwriting your input?

Undeference

The input line is not actually preserved. When a new line of output is printed, the input line is replaced by output and printed to the next line. The result is that it looks like it never went away, but it really did. (Echoing is specifically disabled and stdin is made non-blocking.)
Need help? Ask intelligently. Please share solutions you find.

Quote from: tuple on February 15, 2008, 11:54:10 PMThats what we need, helpful players, not more powerful admins.

Bomb

How might one replicate this functionality with standard C functions (e.g. printf)?

epsy

best would be to just browse trem's source
Warning: All opinions expressed in my posts are mine and mine alone. Any connection to any group I am affiliated with - be it the ArmagetronAd Developers or any other group, is purely coincidental unless otherwise expressly stated. Don't be a dolt when you read my posts, as they *may* require some brainpower and thinking (also purely coincidental). Any opinion in my posts not expressed by me are purely figments of your imagination and will be dealt with accordingly.
SigTemplate by Khasla.

Bomb

#4
That's easier said than done. There are upwards of a hundred files to look through. Not to mention the fact that every print-related function calls a different function.

So, does anyone know how to do this?

[EDIT] How does the tremded know what the input line says?

Undeference

Need help? Ask intelligently. Please share solutions you find.

Quote from: tuple on February 15, 2008, 11:54:10 PMThats what we need, helpful players, not more powerful admins.

Bomb

Thanks Undeference. Much <3 to you!