home *** CD-ROM | disk | FTP | other *** search
- /*
- Listing 15.8. A new version of the previous page eject function.
- Author: Craig Yellick
- Excerpted from "Clipper 5: A Developer's Guide"
- Copyright (c) 1991 M&T Books
- 501 Galveston Drive
- Redwood City, CA 94063-4728
- (415) 366-3600
- */
-
- #define TOP_MAR 4
- #define BOT_MAR 6
- #define PAGE_LEN 66
-
- function PageEject()
- /*
- Check to see if it's time to eject the page.
- If so, eject and move down beyond top margin.
- Return .t. if we ejected. Correctly handles
- situation where printer is already positioned
- at the top of a page.
- */
- local need_eject := ((prow() +BOT_MAR) > PAGE_LEN) ;
- .or. (prow() = 0)
- if need_eject
- if prow() > 0
- eject
- setprc(0,0)
- endif
- @ prow() +TOP_MAR, 0 say ""
- endif
- return need_eject
-
- // end of file CHP1508.PRG
-