objective c - Rewrite in place - stdout -


because i'm setting new server use, i've been using lot of command-line programs curl , wget, , i've noticed interesting. when run in terminal, print current progress in place (e.g. 54% become 55% in place, instead of 55% being printed on next line - download large file , see mean).

i've been wondering how programs can this. writing stdout nothing new me, i'm puzzled @ how work. i've tried writing stdout, seeking backwards , writing again; printing backspace characters ('\b'), , printing new things; etc, nothing seems work.

is there no api in objective-c or c this? (c, instance, has ungetc(), no unputc()). there hacks can achieve this?
interesting know more about...

thanks!

the ncurses project might of interest you. once beyond simple stuff, want focussing on core of app's logic, not presentation!

gnu ncurses used every pretty terminal ui application come across.


Comments

Popular posts from this blog

ASP.NET/SQL find the element ID and update database -

jquery - appear modal windows bottom -

c++ - Compiling static TagLib 1.6.3 libraries for Windows -