| 16 |
|
|
| 17 |
|
#include "object.h" |
| 18 |
|
|
| 19 |
– |
#ifndef DEFPATH |
| 20 |
– |
#define DEFPATH ":/usr/local/lib/ray" |
| 21 |
– |
#endif |
| 22 |
– |
|
| 19 |
|
char *progname; /* argv[0] */ |
| 20 |
|
|
| 25 |
– |
char *libpath; /* library search path */ |
| 26 |
– |
|
| 21 |
|
int nowarn = 0; /* supress warnings? */ |
| 22 |
|
|
| 23 |
|
int (*addobjnotify[])() = {NULL}; /* new object notifier functions */ |
| 35 |
|
int argc; |
| 36 |
|
char **argv; |
| 37 |
|
{ |
| 38 |
< |
char *getenv(); |
| 45 |
< |
double atof(); |
| 38 |
> |
extern char *getenv(); |
| 39 |
|
int nohead = 0; |
| 40 |
|
int i; |
| 41 |
|
|
| 42 |
|
progname = argv[0]; |
| 43 |
|
|
| 51 |
– |
if ((libpath = getenv("RAYPATH")) == NULL) |
| 52 |
– |
libpath = DEFPATH; |
| 53 |
– |
|
| 44 |
|
for (i = 1; i < argc && argv[i][0] == '-'; i++) { |
| 45 |
|
switch (argv[i][1]) { |
| 46 |
|
case 'w': |
| 67 |
|
/* print bounding box */ |
| 68 |
|
if (!nohead) |
| 69 |
|
printf( |
| 70 |
< |
" xmin xmax ymin ymax zmin zmax\n"); |
| 70 |
> |
" xmin xmax ymin ymax zmin zmax\n"); |
| 71 |
|
|
| 72 |
|
printf("%9g %9g %9g %9g %9g %9g\n", bbmin[0], bbmax[0], |
| 73 |
|
bbmin[1], bbmax[1], bbmin[2], bbmax[2]); |