home *** CD-ROM | disk | FTP | other *** search
- Program Pager.c -- print text file on 2 sides of paper
-
- Programmer: Dick Taylor, 99 Valley View Rd, Glastonbury CT 06033 USA
- Date: April 1991
-
- History: I wrote this program to print Anders Bjerin's C Manual from
- the Fred Fish disk collection.
-
- Preparation: I make a separate run of Pager for each chapter. In CLI
- I use JOIN to combine the chapter text with all examples for that chapter,
- to make one text file in ram:. If you wish to improve the readability
- of this JOIN'ed file, you could edit it to add a few blank lines between
- the examples.
-
- To run: Use CLI to start Pager. At start of execution, you are prompted
- to enter--
- 1) Input file name
- 2) Number of lines printed per page. I use 60 for 8 1/2 x 11 inch pages.
- 3) First page number. Obviously start with 1 for chapter 1. For
- following chapters, I recommend that you always use an odd number,
- so that the page numbers will appear on the outside page corner.
- This means that sometimes you will need to skip an even number
- following the end of the previous chapter.
-
- On the first pass, Pager prints the first page and every second following
- page--usually the odd page numbers, while the second page and every second
- following are saved in a temporary file in ram:--usually the even numbers.
- At the end of this step, the program pauses and prompts you to take out the
- printer paper, turn it over, position it to start printing on the back of
- the first page. Then you start it running again.
-
- Assumption: Line 1 of the text file is the chapter title. This will be
- printed at the top of each page, along with the page number.
-