Examples&Exercises:

  1. Using the Terminal Interface; http://siber.cankaya.edu.tr/SystemsProgramming/cfiles/noecho.c noecho.c

  2. Changing Terminal Modes; http://siber.cankaya.edu.tr/SystemsProgramming/cfiles/rawmode.c rawmode.c

  3. Using terminfo; http://siber.cankaya.edu.tr/SystemsProgramming/cfiles/newgetcaps.c newgetcaps.c

  4. Illustrating ncurses Initialization and Termination; http://siber.cankaya.edu.tr/SystemsProgramming/cfiles/initcurs.c initcurs.c, http://siber.cankaya.edu.tr/SystemsProgramming/cfiles/newterm.c newterm.c. Compile with

    $ gcc -o curses_prog curses_prog.c -lcurses
  5. Input and Output; http://siber.cankaya.edu.tr/SystemsProgramming/cfiles/curschar.c curschar.c, http://siber.cankaya.edu.tr/SystemsProgramming/cfiles/cursstr.c cursstr.c, http://siber.cankaya.edu.tr/SystemsProgramming/cfiles/cursbox.c cursbox.c, http://siber.cankaya.edu.tr/SystemsProgramming/cfiles/cursinch.c cursinch.c, http://siber.cankaya.edu.tr/SystemsProgramming/cfiles/cursgstr.c cursgstr.c, http://siber.cankaya.edu.tr/SystemsProgramming/cfiles/color.c color.c, http://siber.cankaya.edu.tr/SystemsProgramming/cfiles/cursutil.c cursutil.c, http://siber.cankaya.edu.tr/SystemsProgramming/cfiles/utilfcns.c utilfcns.c. Compile with

    $ gcc -c utilfcns.c
    $ gcc -o curs_prog curs_prog.c -lcurses utilfcns.o
  6. X Window Programming; http://siber.cankaya.edu.tr/SystemsProgramming/cfiles/bifurcation.c bifurcation.c. Compile with

    $ locate libX11
    $ gcc -o bifurcation bifurcation.c -lX11 -L/usr/lib/
  7. Study the following example program creates and displays a simple window with Qt. It doesn't do anything other than display a line of text, but it gives you an idea of the fundamental requirements of a Qt program. http://siber.cankaya.edu.tr/SystemsProgramming/cfiles/helloworld.cpp helloworld.cpp http://siber.cankaya.edu.tr/SystemsProgramming/cfiles/makefile.qt makefile

  8. Study the following example program creates and displays a simple window with KDE. http://siber.cankaya.edu.tr/SystemsProgramming/cfiles/hellokde.cpp hellokde.cpp http://siber.cankaya.edu.tr/SystemsProgramming/cfiles/makefile.kde makefile