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 |
|
* mt160r.c - program to dump pixel file to Mannesman-Tally 160. |
6 |
|
* |
8 |
|
*/ |
9 |
|
|
10 |
|
#include <stdio.h> |
11 |
< |
#ifdef MSDOS |
15 |
< |
#include <fcntl.h> |
16 |
< |
#endif |
11 |
> |
#include <time.h> |
12 |
|
|
13 |
+ |
#include "platform.h" |
14 |
|
#include "color.h" |
15 |
|
#include "resolu.h" |
16 |
|
|
23 |
|
{ |
24 |
|
int i; |
25 |
|
int status = 0; |
26 |
< |
#ifdef MSDOS |
27 |
< |
extern int _fmode; |
28 |
< |
_fmode = O_BINARY; |
33 |
< |
setmode(fileno(stdin), O_BINARY); |
34 |
< |
setmode(fileno(stdout), O_BINARY); |
35 |
< |
#endif |
26 |
> |
SET_DEFAULT_BINARY(); |
27 |
> |
SET_FILE_BINARY(stdin); |
28 |
> |
SET_FILE_BINARY(stdout); |
29 |
|
if (argc < 2) |
30 |
|
status += printp(NULL) == -1; |
31 |
|
else |
66 |
|
} |
67 |
|
|
68 |
|
fputs("\033[6~\033[7z", stdout); |
76 |
– |
#ifdef _IOLBF |
77 |
– |
stdout->_flag &= ~_IOLBF; |
78 |
– |
#endif |
69 |
|
|
70 |
|
for (i = yres-1; i >= 0; i--) { |
71 |
|
if (freadcolrs(scanline, xres, input) < 0) { |