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 |
|
* ttyimage.c - program to dump pixel file to dumb terminal. |
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 |
|
|
33 |
|
fprintf(stderr, "%s: can't open file \"%s\"\n", argv[0], argv[1]); |
34 |
|
exit(1); |
35 |
|
} |
36 |
< |
#ifdef MSDOS |
41 |
< |
setmode(fileno(input), O_BINARY); |
42 |
< |
#endif |
36 |
> |
SET_FILE_BINARY(input); |
37 |
|
/* get picture dimensions */ |
38 |
|
if (checkheader(input, COLRFMT, NULL) < 0 || |
39 |
|
fgetresolu(&xres, &yres, input) < 0) { |