curses library for gcc

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.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: