Laboratory 11

Objectives

  1. Learn to use terminal control to create programs that are more professional.
  2. Begin building a library of useful routines for further programming efforts.

Preparation

In Lab Activities

One of the flourishes that you could add to this program would be terminal control that doesn't require that you press enter to send a command or that will not echo the characters typed. This is all described in the example program.

There are more attributes for tcsetattr than you can shake a stick at. These options are contained in the termios structure and can be divided into the following groups:

An in depth study of the terminal IO process is beyond the scope of this course, but you should avail yourself of the man pages and resources in the library or on the web if you want to know more. Suffice it to say that you have complete control of the IO stream for a terminal.