Revision 6956,
357 bytes
checked in by probe, 31 years ago
(diff) |
Initial revision
|
Rev | Line | |
---|
[6956] | 1 | #include <stdio.h> |
---|
| 2 | #include "tfile.h" |
---|
| 3 | |
---|
| 4 | char bfr[2048]; |
---|
| 5 | tfile bar; |
---|
| 6 | |
---|
| 7 | main() |
---|
| 8 | { |
---|
| 9 | int code; |
---|
| 10 | int count; |
---|
| 11 | FILE *foo = fopen("/etc/termcap", "r"); |
---|
| 12 | extern tfile pager_tfile(); |
---|
| 13 | init_tfpager(); |
---|
| 14 | |
---|
| 15 | bar = pager_tfile(); |
---|
| 16 | |
---|
| 17 | topen(bar, 0, &code); |
---|
| 18 | while (1) { |
---|
| 19 | if (!(count=fread(bfr, 1, 2048, foo))) break; |
---|
| 20 | twrite(bar, bfr, count, &code); |
---|
| 21 | if (code) break; |
---|
| 22 | } |
---|
| 23 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.