curses library for gcc

November 15, 2008

For all those who type ‘sl’ instead of ‘ls’ often in the command window: Get the program ‘sl’

sudo apt-get install sl

From its man page:

NAME
sl – display animations aimed to correct users who accidentally enter sl instead of ls.

BUGS
It rarely shows contents of current directory.

When going through the source code for sl, I saw the use of the curses library. Its new implementation ncurses describes itself as “CRT screen handling and optimization package.”

The library is very useful. All the old Turbo C cursor functions, mouse functions, getch() and much more is implemented in this. [1]

[1] Avoid common mistakes: a) Read up on the function refresh(). b) When compiling in gcc, use the option -lcurses option.