| 62 |
|
int gargc; /* global argc for printargs */ |
| 63 |
|
char **gargv; /* global argv for printargs */ |
| 64 |
|
|
| 65 |
+ |
static void setdefaults(void); |
| 66 |
+ |
static void setmove(struct ObjMove *om, char *ms); |
| 67 |
+ |
static void setrendparams(char *optf, char *qval); |
| 68 |
+ |
static void getradfile(char *rfargs); |
| 69 |
+ |
static void animate(void); |
| 70 |
+ |
static int countviews(void); /* XXX duplicated function */ |
| 71 |
+ |
static char * getobjname(struct ObjMove *om); |
| 72 |
+ |
static char * getxf(struct ObjMove *om, int n); |
| 73 |
|
|
| 74 |
+ |
|
| 75 |
|
int |
| 76 |
< |
main(argc, argv) |
| 77 |
< |
int argc; |
| 78 |
< |
char *argv[]; |
| 76 |
> |
main( |
| 77 |
> |
int argc, |
| 78 |
> |
char *argv[] |
| 79 |
> |
) |
| 80 |
|
{ |
| 81 |
|
int explicate = 0; |
| 82 |
|
char *cfname; |
| 163 |
|
"Usage: %s [-n nprocs][-f beg,end][-t sec][-d jnd][-s][-w][-e] anim_file\n", |
| 164 |
|
progname); |
| 165 |
|
quit(1); |
| 166 |
+ |
return 1; /* pro forma return */ |
| 167 |
|
} |
| 168 |
|
|
| 169 |
|
|
| 170 |
|
void |
| 171 |
< |
eputs(s) /* put string to stderr */ |
| 172 |
< |
register char *s; |
| 171 |
> |
eputs( /* put string to stderr */ |
| 172 |
> |
register char *s |
| 173 |
> |
) |
| 174 |
|
{ |
| 175 |
|
static int midline = 0; |
| 176 |
|
|
| 188 |
|
} |
| 189 |
|
|
| 190 |
|
|
| 191 |
< |
void |
| 192 |
< |
setdefaults() /* set default values */ |
| 191 |
> |
static void |
| 192 |
> |
setdefaults(void) /* set default values */ |
| 193 |
|
{ |
| 194 |
|
int nviews; |
| 195 |
|
int decades; |
| 265 |
|
} |
| 266 |
|
|
| 267 |
|
|
| 268 |
< |
void |
| 269 |
< |
setmove(om, ms) /* assign a move object from spec. */ |
| 270 |
< |
struct ObjMove *om; |
| 271 |
< |
char *ms; |
| 268 |
> |
static void |
| 269 |
> |
setmove( /* assign a move object from spec. */ |
| 270 |
> |
struct ObjMove *om, |
| 271 |
> |
char *ms |
| 272 |
> |
) |
| 273 |
|
{ |
| 274 |
|
char parname[128]; |
| 275 |
|
char *cp; |
| 326 |
|
} |
| 327 |
|
|
| 328 |
|
|
| 329 |
< |
void |
| 330 |
< |
setrendparams(optf, qval) /* set global rendering parameters */ |
| 331 |
< |
char *optf; |
| 332 |
< |
char *qval; |
| 329 |
> |
static void |
| 330 |
> |
setrendparams( /* set global rendering parameters */ |
| 331 |
> |
char *optf, |
| 332 |
> |
char *qval |
| 333 |
> |
) |
| 334 |
|
{ |
| 335 |
|
char *argv[1024]; |
| 336 |
|
char **av = argv; |
| 374 |
|
} |
| 375 |
|
|
| 376 |
|
|
| 377 |
< |
void |
| 378 |
< |
getradfile(rfargs) /* run rad and get needed variables */ |
| 379 |
< |
char *rfargs; |
| 377 |
> |
static void |
| 378 |
> |
getradfile( /* run rad and get needed variables */ |
| 379 |
> |
char *rfargs |
| 380 |
> |
) |
| 381 |
|
{ |
| 382 |
|
static short mvar[] = {OCONV,OCTREEF,RESOLUTION,EXPOSURE,-1}; |
| 383 |
|
char combuf[256]; |
| 384 |
|
register int i; |
| 385 |
|
register char *cp; |
| 386 |
< |
char *pippt; |
| 386 |
> |
char *pippt = NULL; |
| 387 |
|
/* create rad command */ |
| 388 |
|
strcpy(lorendoptf, "ranim0.opt"); |
| 389 |
|
sprintf(combuf, |
| 426 |
|
} |
| 427 |
|
|
| 428 |
|
|
| 429 |
< |
void |
| 430 |
< |
animate() /* run through animation */ |
| 429 |
> |
static void |
| 430 |
> |
animate(void) /* run through animation */ |
| 431 |
|
{ |
| 432 |
|
int rpass; |
| 433 |
|
|
| 458 |
|
} |
| 459 |
|
|
| 460 |
|
|
| 461 |
< |
VIEW * |
| 462 |
< |
getview(n) /* get view number n */ |
| 463 |
< |
int n; |
| 461 |
> |
extern VIEW * |
| 462 |
> |
getview( /* get view number n */ |
| 463 |
> |
int n |
| 464 |
> |
) |
| 465 |
|
{ |
| 466 |
|
static FILE *viewfp = NULL; /* view file pointer */ |
| 467 |
|
static int viewnum = 0; /* current view number */ |
| 509 |
|
} |
| 510 |
|
|
| 511 |
|
|
| 512 |
< |
int |
| 513 |
< |
countviews() /* count views in view file */ |
| 512 |
> |
static int |
| 513 |
> |
countviews(void) /* count views in view file */ |
| 514 |
|
{ |
| 515 |
|
int n; |
| 516 |
|
|
| 522 |
|
} |
| 523 |
|
|
| 524 |
|
|
| 525 |
< |
char * |
| 526 |
< |
getexp(n) /* get exposure for nth frame */ |
| 527 |
< |
int n; |
| 525 |
> |
extern char * |
| 526 |
> |
getexp( /* get exposure for nth frame */ |
| 527 |
> |
int n |
| 528 |
> |
) |
| 529 |
|
{ |
| 530 |
|
extern char *fskip(); |
| 531 |
|
static char expval[32]; |
| 577 |
|
sprintf(errmsg, "%s: exposure format error on line %d", |
| 578 |
|
vval(EXPOSURE), curfrm); |
| 579 |
|
error(USER, errmsg); |
| 580 |
+ |
return NULL; /* pro forma return */ |
| 581 |
|
} |
| 582 |
|
|
| 583 |
|
|
| 584 |
< |
double |
| 585 |
< |
expspec_val(s) /* get exposure value from spec. */ |
| 586 |
< |
char *s; |
| 584 |
> |
extern double |
| 585 |
> |
expspec_val( /* get exposure value from spec. */ |
| 586 |
> |
char *s |
| 587 |
> |
) |
| 588 |
|
{ |
| 589 |
|
double expval; |
| 590 |
|
|
| 598 |
|
} |
| 599 |
|
|
| 600 |
|
|
| 601 |
< |
char * |
| 602 |
< |
getoctspec(n) /* get octree for the given frame */ |
| 603 |
< |
int n; |
| 601 |
> |
extern char * |
| 602 |
> |
getoctspec( /* get octree for the given frame */ |
| 603 |
> |
int n |
| 604 |
> |
) |
| 605 |
|
{ |
| 606 |
|
static char combuf[1024]; |
| 607 |
|
int cfm = 0; |
| 653 |
|
} |
| 654 |
|
|
| 655 |
|
|
| 656 |
< |
char * |
| 657 |
< |
getobjname(om) /* get fully qualified object name */ |
| 658 |
< |
register struct ObjMove *om; |
| 656 |
> |
static char * |
| 657 |
> |
getobjname( /* get fully qualified object name */ |
| 658 |
> |
register struct ObjMove *om |
| 659 |
> |
) |
| 660 |
|
{ |
| 661 |
|
static char objName[512]; |
| 662 |
|
register char *cp = objName; |
| 672 |
|
} |
| 673 |
|
|
| 674 |
|
|
| 675 |
< |
char * |
| 676 |
< |
getxf(om, n) /* get total transform for object */ |
| 677 |
< |
register struct ObjMove *om; |
| 678 |
< |
int n; |
| 675 |
> |
static char * |
| 676 |
> |
getxf( /* get total transform for object */ |
| 677 |
> |
register struct ObjMove *om, |
| 678 |
> |
int n |
| 679 |
> |
) |
| 680 |
|
{ |
| 681 |
|
static char xfsbuf[4096]; |
| 682 |
|
char *xfp; |
| 795 |
|
} |
| 796 |
|
|
| 797 |
|
|
| 798 |
< |
int |
| 799 |
< |
getmove(obj) /* find matching move object */ |
| 800 |
< |
OBJECT obj; |
| 798 |
> |
extern int |
| 799 |
> |
getmove( /* find matching move object */ |
| 800 |
> |
OBJECT obj |
| 801 |
> |
) |
| 802 |
|
{ |
| 803 |
|
static int lasti; |
| 804 |
|
static OBJECT lasto = OVOID; |
| 829 |
|
} |
| 830 |
|
|
| 831 |
|
|
| 832 |
< |
double |
| 833 |
< |
obj_prio(obj) /* return priority for object */ |
| 834 |
< |
OBJECT obj; |
| 832 |
> |
extern double |
| 833 |
> |
obj_prio( /* return priority for object */ |
| 834 |
> |
OBJECT obj |
| 835 |
> |
) |
| 836 |
|
{ |
| 837 |
|
int moi; |
| 838 |
|
|
| 842 |
|
} |
| 843 |
|
|
| 844 |
|
|
| 845 |
< |
double |
| 846 |
< |
getTime() /* get current time (CPU or real) */ |
| 845 |
> |
extern double |
| 846 |
> |
getTime(void) /* get current time (CPU or real) */ |
| 847 |
|
{ |
| 848 |
|
struct timeval time_now; |
| 849 |
|
/* return CPU time if one process */ |