1 |
– |
/* Copyright (c) 1991 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 |
|
* prot.c - program to rotate picture file 90 degrees clockwise. |
6 |
|
* |
11 |
|
|
12 |
|
#include "color.h" |
13 |
|
|
14 |
+ |
#include <time.h> |
15 |
+ |
|
16 |
|
#include "resolu.h" |
17 |
|
|
18 |
|
int order; /* input scanline order */ |
141 |
|
exit(1); |
142 |
|
} |
143 |
|
for (inx = 0; inx < nrows && xoff+inx < xres; inx++) |
144 |
< |
bcopy((char *)inln[xoff+inx], |
145 |
< |
(char *)scanbar[inx*yres+iny], |
147 |
< |
sizeof(COLR)); |
144 |
> |
copycolr(scanbar[inx*yres+iny], |
145 |
> |
inln[xoff+inx]); |
146 |
|
} |
147 |
|
for (inx = 0; inx < nrows && xoff+inx < xres; inx++) |
148 |
|
if (fwritecolrs(scanbar+inx*yres, yres, stdout) < 0) { |
150 |
|
exit(1); |
151 |
|
} |
152 |
|
} |
153 |
< |
free((char *)inln); |
153 |
> |
free((void *)inln); |
154 |
|
} |
155 |
|
|
156 |
|
|
177 |
|
exit(1); |
178 |
|
} |
179 |
|
for (inx = 0; inx < nrows && xoff-inx >= 0; inx++) |
180 |
< |
bcopy((char *)inln[xoff-inx], |
181 |
< |
(char *)scanbar[inx*yres+iny], |
184 |
< |
sizeof(COLR)); |
180 |
> |
copycolr(scanbar[inx*yres+iny], |
181 |
> |
inln[xoff-inx]); |
182 |
|
} |
183 |
|
for (inx = 0; inx < nrows && xoff-inx >= 0; inx++) |
184 |
|
if (fwritecolrs(scanbar+inx*yres, yres, stdout) < 0) { |
186 |
|
exit(1); |
187 |
|
} |
188 |
|
} |
189 |
< |
free((char *)inln); |
189 |
> |
free((void *)inln); |
190 |
|
} |