| 5 |
|
* flip picture file horizontally and/or vertically |
| 6 |
|
*/ |
| 7 |
|
|
| 8 |
< |
#include <stdio.h> |
| 9 |
< |
#include <time.h> |
| 10 |
< |
#include <string.h> |
| 11 |
< |
|
| 8 |
> |
#include "rtio.h" |
| 9 |
|
#include "platform.h" |
| 10 |
|
#include "color.h" |
| 11 |
|
#include "resolu.h" |
| 21 |
|
|
| 22 |
|
FILE *fin; /* input file */ |
| 23 |
|
|
| 27 |
– |
char *progname; |
| 24 |
|
|
| 29 |
– |
|
| 25 |
|
static void memerr(void); |
| 26 |
|
static void scanfile(void); |
| 27 |
|
static void flip(void); |
| 50 |
|
char *argv[] |
| 51 |
|
) |
| 52 |
|
{ |
| 53 |
< |
static char picfmt[LPICFMT+1] = PICFMT; |
| 53 |
> |
static char picfmt[MAXFMTLEN] = PICFMT; |
| 54 |
|
int i, rval; |
| 55 |
+ |
|
| 56 |
|
SET_DEFAULT_BINARY(); |
| 57 |
|
SET_FILE_BINARY(stdout); |
| 58 |
< |
progname = argv[0]; |
| 58 |
> |
fixargv0(argv[0]); |
| 59 |
|
|
| 60 |
|
for (i = 1; i < argc; i++) |
| 61 |
|
if (!strcmp(argv[i], "-h")) |