5 |
|
* Generate renderable grids from a holodeck file |
6 |
|
*/ |
7 |
|
|
8 |
– |
#include <stdio.h> |
9 |
– |
|
8 |
|
#include "platform.h" |
9 |
|
#include "resolu.h" |
10 |
|
#include "holo.h" |
11 |
|
|
14 |
– |
char *progname; /* global argv[0] */ |
15 |
– |
|
12 |
|
char *mat, *name; /* material and object id */ |
13 |
|
double rad; /* grid line radius */ |
14 |
|
|
25 |
|
{ |
26 |
|
int sect; |
27 |
|
|
28 |
< |
progname = argv[0]; |
28 |
> |
fixargv0(argv[0]); |
29 |
|
if ((argc < 5) | (argc > 6)) |
30 |
|
goto userr; |
31 |
|
mat = argv[1]; |
55 |
|
int32 nextloc; |
56 |
|
int n; |
57 |
|
/* open holodeck file */ |
58 |
< |
if ((fp = fopen(fname, "r")) == NULL) { |
58 |
> |
if ((fp = fopen(fname, "rb")) == NULL) { |
59 |
|
sprintf(errmsg, "cannot open \"%s\"", fname); |
60 |
|
error(SYSTEM, errmsg); |
61 |
|
} |