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 |
|
* flip picture file horizontally and/or vertically |
6 |
|
*/ |
7 |
|
|
8 |
|
#include <stdio.h> |
9 |
+ |
#include <time.h> |
10 |
|
|
11 |
< |
#ifdef MSDOS |
14 |
< |
#include <fcntl.h> |
15 |
< |
#endif |
16 |
< |
|
11 |
> |
#include "platform.h" |
12 |
|
#include "color.h" |
18 |
– |
|
13 |
|
#include "resolu.h" |
14 |
|
|
15 |
|
int order; /* input orientation */ |
25 |
|
|
26 |
|
char *progname; |
27 |
|
|
34 |
– |
extern char *malloc(); |
28 |
|
|
36 |
– |
|
29 |
|
int |
30 |
|
neworder() /* figure out new order from old */ |
31 |
|
{ |
50 |
|
{ |
51 |
|
static char picfmt[LPICFMT+1] = PICFMT; |
52 |
|
int i, rval; |
53 |
< |
#ifdef MSDOS |
54 |
< |
extern int _fmode; |
63 |
< |
_fmode = O_BINARY; |
64 |
< |
setmode(fileno(stdout), O_BINARY); |
65 |
< |
#endif |
53 |
> |
SET_DEFAULT_BINARY(); |
54 |
> |
SET_FILE_BINARY(stdout); |
55 |
|
progname = argv[0]; |
56 |
|
|
57 |
|
for (i = 1; i < argc; i++) |
127 |
|
} |
128 |
|
} |
129 |
|
scanpos[0] = ftell(fin); |
130 |
< |
free((char *)scanin); |
130 |
> |
free((void *)scanin); |
131 |
|
} |
132 |
|
|
133 |
|
|
161 |
|
exit(1); |
162 |
|
} |
163 |
|
} |
164 |
< |
free((char *)scanin); |
164 |
> |
free((void *)scanin); |
165 |
|
if (fhoriz) |
166 |
< |
free((char *)scanout); |
166 |
> |
free((void *)scanout); |
167 |
|
} |