xref: /original-bsd/lib/libcurses/PSD.doc/appen.A (revision 306a1b7a)
Copyright (c) 1980, 1993
The Regents of the University of California. All rights reserved.

%sccs.include.redist.roff%

@(#)appen.A 8.1 (Berkeley) 06/08/93

.eh 'PS1:19-%''\*(Ln Appendix A' .bp .(x .b "Appendix A" .)x .sh 1 "Examples" 1 .pp Here we present a few examples of how to use the package. They attempt to be representative, though not comprehensive. Further examples can be found in the games section of the source tree and in various utilities that use the screen such as .i systat(1) . .pp The following examples are intended to demonstrate the basic structure of a program using the package. An additional, more comprehensive, program can be found in the source code in the examples subdirectory. .sh 2 "Simple Character Output" .pp This program demonstrates how to set up a window and output characters to it. Also, it demonstrates how one might control the output to the window. If you run this program, you will get a demonstration of the character output chracteristics discussed in the above Character Output section. .(l I .so ex1.gr .)l .sh 2 "Twinkle" .pp This is a moderately simple program which prints patterns on the screen. It switches between patterns of asterisks, putting them on one by one in random order, and then taking them off in the same fashion. It is more efficient to write this using only the motion optimization, as is demonstrated below. .(l I .so twinkle1.gr .)l