1 |
– |
/* Copyright (c) 1992 Regents of the University of California */ |
2 |
– |
|
1 |
|
#ifndef lint |
2 |
< |
static char SCCSid[] = "$SunId$ LBL"; |
2 |
> |
static const char RCSid[] = "$Id$"; |
3 |
|
#endif |
6 |
– |
|
4 |
|
/* |
5 |
|
* oki20c.c - program to dump pixel file to OkiMate 20 color printer. |
6 |
|
*/ |
7 |
|
|
8 |
|
#include <stdio.h> |
9 |
< |
#ifdef MSDOS |
13 |
< |
#include <fcntl.h> |
14 |
< |
#endif |
9 |
> |
#include <time.h> |
10 |
|
|
11 |
+ |
#include "platform.h" |
12 |
+ |
#include "rtprocess.h" |
13 |
|
#include "color.h" |
14 |
|
#include "resolu.h" |
15 |
|
|
30 |
|
|
31 |
|
int dofilter = 0; /* filter through pfilt first? */ |
32 |
|
|
36 |
– |
extern FILE *popen(); |
33 |
|
|
38 |
– |
|
34 |
|
main(argc, argv) |
35 |
|
int argc; |
36 |
|
char *argv[]; |
37 |
|
{ |
38 |
|
int i, status = 0; |
39 |
< |
#ifdef MSDOS |
40 |
< |
extern int _fmode; |
41 |
< |
_fmode = O_BINARY; |
47 |
< |
setmode(fileno(stdin), O_BINARY); |
48 |
< |
setmode(fileno(stdout), O_BINARY); |
49 |
< |
#endif |
39 |
> |
SET_DEFAULT_BINARY(); |
40 |
> |
SET_FILE_BINARY(stdin); |
41 |
> |
SET_FILE_BINARY(stdout); |
42 |
|
if (argc > 1 && !strcmp(argv[1], "-p")) { |
43 |
|
dofilter++; |
44 |
|
argv++; argc--; |
124 |
|
register long c; |
125 |
|
register int i, j; |
126 |
|
|
127 |
< |
if (bpos = y % 23) { |
127 |
> |
if ( (bpos = y % 23) ) { |
128 |
|
|
129 |
|
for (j = 0; j < 3; j++) |
130 |
|
for (i = 0; i < len; i++) |