Revision 1440,
378 bytes
checked in by paul, 36 years ago
(diff) |
New reset command; fixed garbled-header bug; must be "if" in printcap
|
Line | |
---|
1 | #include <sys/file.h> |
---|
2 | #include <sgtty.h> |
---|
3 | |
---|
4 | char *str= "\033[!p"; /* Reset printer. */ |
---|
5 | char *lnm = "\033[20h"; /* Line feed new line mode on. */ |
---|
6 | |
---|
7 | main() |
---|
8 | { |
---|
9 | register int count; |
---|
10 | char buf[1024]; |
---|
11 | |
---|
12 | write(1, str, 4); |
---|
13 | write(1, lnm, 5); |
---|
14 | while ((count = read(0, buf, 1024)) > 0) write(1, buf, count); |
---|
15 | write(1, str, 4); |
---|
16 | write(1, lnm, 5); |
---|
17 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.