12 |
|
|
13 |
|
#include "standard.h" |
14 |
|
|
15 |
– |
#include <fcntl.h> |
16 |
– |
|
15 |
|
#include <ctype.h> |
16 |
|
|
17 |
|
#include "view.h" |
159 |
|
vresolu = atoi(argv[++i]); |
160 |
|
break; |
161 |
|
case 'p': /* pixel aspect */ |
162 |
< |
check(2,"f"); |
162 |
> |
if (argv[i][2] != 'a') |
163 |
> |
goto badopt; |
164 |
> |
check(3,"f"); |
165 |
|
pixaspect = atof(argv[++i]); |
166 |
|
break; |
167 |
|
case 'v': /* view file */ |
197 |
|
} |
198 |
|
normaspect(viewaspect(&ourview), &pixaspect, &hresolu, &vresolu); |
199 |
|
/* allocate frame */ |
200 |
< |
ourpict = (COLR *)malloc(hresolu*vresolu*sizeof(COLR)); |
201 |
< |
ourzbuf = (float *)calloc(hresolu*vresolu,sizeof(float)); |
200 |
> |
ourpict = (COLR *)bmalloc(hresolu*vresolu*sizeof(COLR)); |
201 |
> |
ourzbuf = (float *)bmalloc(hresolu*vresolu*sizeof(float)); |
202 |
|
if (ourpict == NULL || ourzbuf == NULL) |
203 |
|
syserror(); |
204 |
+ |
bzero((char *)ourzbuf, hresolu*vresolu*sizeof(float)); |
205 |
|
/* get input */ |
206 |
|
for ( ; i < argc; i += 2) |
207 |
|
addpicture(argv[i], argv[i+1]); |
386 |
|
float *zline; |
387 |
|
struct position *lasty; /* input/output */ |
388 |
|
{ |
388 |
– |
extern double sqrt(); |
389 |
|
FVECT pos; |
390 |
|
struct position lastx, newpos; |
391 |
|
register int x; |
633 |
|
writedistance(fname) /* write out z file */ |
634 |
|
char *fname; |
635 |
|
{ |
636 |
– |
extern double sqrt(); |
636 |
|
int donorm = normdist && ourview.type == VT_PER; |
637 |
|
int fd; |
638 |
|
int y; |