264 |
|
|
265 |
|
static void |
266 |
|
rootname( /* remove tail from end of fn */ |
267 |
< |
register char *rn, |
268 |
< |
register char *fn |
267 |
> |
char *rn, |
268 |
> |
char *fn |
269 |
|
) |
270 |
|
{ |
271 |
|
char *tp, *dp; |
282 |
|
|
283 |
|
static time_t |
284 |
|
checklast( /* check files and find most recent */ |
285 |
< |
register char *fnames |
285 |
> |
char *fnames |
286 |
|
) |
287 |
|
{ |
288 |
|
char thisfile[PATH_MAX]; |
312 |
|
int pred |
313 |
|
) |
314 |
|
{ |
315 |
< |
register char *cp; |
316 |
< |
register int n; |
315 |
> |
char *cp; |
316 |
> |
int n; |
317 |
|
int suffix; |
318 |
|
|
319 |
|
n = 0; cp = orig; suffix = -1; /* suffix position, length */ |
378 |
|
double min[3], max[3]; |
379 |
|
char buf[1024]; |
380 |
|
FILE *fp; |
381 |
< |
register int i; |
381 |
> |
int i; |
382 |
|
|
383 |
|
if (osiz <= FTINY) { |
384 |
|
if (!nprocs && fdate(oct1name) < |
558 |
|
unlink(illumtmp); |
559 |
|
quit(1); |
560 |
|
} |
561 |
+ |
rmfile(oct0name); |
562 |
|
/* make octree1 (frozen) */ |
563 |
|
if (octreedate) |
564 |
|
sprintf(combuf, "%s%s -f -i %s %s > %s", c_oconv, |
587 |
|
|
588 |
|
static char * |
589 |
|
addarg( /* append argument and advance pointer */ |
590 |
< |
register char *op, |
591 |
< |
register char *arg |
590 |
> |
char *op, |
591 |
> |
char *arg |
592 |
|
) |
593 |
|
{ |
594 |
|
while (*op) |
602 |
|
|
603 |
|
static void |
604 |
|
oconvopts( /* get oconv options */ |
605 |
< |
register char *oo |
605 |
> |
char *oo |
606 |
|
) |
607 |
|
{ |
608 |
|
/* BEWARE: This may be called via setdefaults(), so no assumptions */ |
711 |
|
|
712 |
|
static void |
713 |
|
lowqopts( /* low quality rendering options */ |
714 |
< |
register char *op, |
714 |
> |
char *op, |
715 |
|
char *po |
716 |
|
) |
717 |
|
{ |
779 |
|
|
780 |
|
static void |
781 |
|
medqopts( /* medium quality rendering options */ |
782 |
< |
register char *op, |
782 |
> |
char *op, |
783 |
|
char *po |
784 |
|
) |
785 |
|
{ |
857 |
|
|
858 |
|
static void |
859 |
|
hiqopts( /* high quality rendering options */ |
860 |
< |
register char *op, |
860 |
> |
char *op, |
861 |
|
char *po |
862 |
|
) |
863 |
|
{ |
931 |
|
} |
932 |
|
|
933 |
|
|
934 |
+ |
#ifdef _WIN32 |
935 |
|
static void |
936 |
+ |
setenv( /* set an environment variable */ |
937 |
+ |
char *vname, |
938 |
+ |
char *value |
939 |
+ |
) |
940 |
+ |
{ |
941 |
+ |
char *evp; |
942 |
+ |
|
943 |
+ |
evp = bmalloc(strlen(vname)+strlen(value)+2); |
944 |
+ |
if (evp == NULL) |
945 |
+ |
syserr(progname); |
946 |
+ |
sprintf(evp, "%s=%s", vname, value); |
947 |
+ |
if (putenv(evp) != 0) { |
948 |
+ |
fprintf(stderr, "%s: out of environment space\n", progname); |
949 |
+ |
quit(1); |
950 |
+ |
} |
951 |
+ |
if (!silent) |
952 |
+ |
printf("set %s\n", evp); |
953 |
+ |
} |
954 |
+ |
#endif |
955 |
+ |
|
956 |
+ |
|
957 |
+ |
static void |
958 |
|
xferopts( /* transfer options if indicated */ |
959 |
|
char *ro |
960 |
|
) |
961 |
|
{ |
962 |
|
int fd, n; |
963 |
< |
register char *cp; |
963 |
> |
char *cp; |
964 |
|
|
965 |
|
n = strlen(ro); |
966 |
|
if (n < 2) |
989 |
|
|
990 |
|
static void |
991 |
|
pfiltopts( /* get pfilt options */ |
992 |
< |
register char *po |
992 |
> |
char *po |
993 |
|
) |
994 |
|
{ |
995 |
|
*po = '\0'; |
1016 |
|
|
1017 |
|
static int |
1018 |
|
matchword( /* match white-delimited words */ |
1019 |
< |
register char *s1, |
1020 |
< |
register char *s2 |
1019 |
> |
char *s1, |
1020 |
> |
char *s2 |
1021 |
|
) |
1022 |
|
{ |
1023 |
|
while (isspace(*s1)) s1++; |
1031 |
|
|
1032 |
|
static char * |
1033 |
|
specview( /* get proper view spec from vs */ |
1034 |
< |
register char *vs |
1034 |
> |
char *vs |
1035 |
|
) |
1036 |
|
{ |
1037 |
|
static char vup[7][12] = {"-vu 0 0 -1","-vu 0 -1 0","-vu -1 0 0", |
1038 |
|
"-vu 0 0 1", "-vu 1 0 0","-vu 0 1 0","-vu 0 0 1"}; |
1039 |
|
static char viewopts[128]; |
1040 |
< |
register char *cp; |
1040 |
> |
char *cp; |
1041 |
|
int xpos, ypos, zpos, viewtype, upax; |
1042 |
< |
register int i; |
1042 |
> |
int i; |
1043 |
|
double cent[3], dim[3], mult, d; |
1044 |
|
|
1045 |
|
if (vs == NULL || *vs == '-') |
1171 |
|
char *vn /* returned view name */ |
1172 |
|
) |
1173 |
|
{ |
1174 |
< |
register char *mv; |
1174 |
> |
char *mv; |
1175 |
|
|
1176 |
|
if (viewselect != NULL) { /* command-line selected */ |
1177 |
|
if (n) /* only do one */ |
1203 |
|
mv = nvalue(VIEWS, n); /* use view n */ |
1204 |
|
if ((vn != NULL) & (mv != NULL)) |
1205 |
|
if (*mv != '-') { |
1206 |
< |
register char *mv2 = mv; |
1206 |
> |
char *mv2 = mv; |
1207 |
|
while (*mv2 && !isspace(*mv2)) |
1208 |
|
*vn++ = *mv2++; |
1209 |
|
*vn = '\0'; |
1216 |
|
|
1217 |
|
static int |
1218 |
|
myprintview( /* print out selected view */ |
1219 |
< |
register char *vopts, |
1219 |
> |
char *vopts, |
1220 |
|
FILE *fp |
1221 |
|
) |
1222 |
|
{ |
1223 |
|
VIEW vwr; |
1224 |
|
char buf[128]; |
1225 |
< |
register char *cp; |
1225 |
> |
char *cp; |
1226 |
|
#ifdef _WIN32 |
1227 |
|
/* XXX Should we allow something like this for all platforms? */ |
1228 |
|
/* XXX Or is it still required at all? */ |
1411 |
|
int xdiv = 8+nprocs/3, ydiv = 8+nprocs/3; |
1412 |
|
if (rfdt >= oct1date) { |
1413 |
|
fprintf(stderr, |
1414 |
< |
"%s: partial output not created with rpiece\n", rawfile); |
1414 |
> |
"%s: partial output not created with %s\n", rawfile, c_rpiece); |
1415 |
|
quit(1); |
1416 |
|
} |
1417 |
|
if (rfdt) { /* start fresh */ |
1502 |
|
wait_process(1); |
1503 |
|
if (!syncf_done(sfile)) { |
1504 |
|
fprintf(stderr, |
1505 |
< |
"%s: rpiece did not complete rendering of view %s\n", |
1506 |
< |
progname, vs); |
1505 |
> |
"%s: %s did not complete rendering of view %s\n", |
1506 |
> |
progname, c_rpiece, vs); |
1507 |
|
quit(1); |
1508 |
|
} |
1509 |
|
} |
1702 |
|
return; /* in parent -- noop */ |
1703 |
|
exit(0); |
1704 |
|
} |
1681 |
– |
|
1682 |
– |
#ifdef _WIN32 |
1683 |
– |
setenv(vname, value) /* set an environment variable */ |
1684 |
– |
char *vname, *value; |
1685 |
– |
{ |
1686 |
– |
register char *evp; |
1687 |
– |
|
1688 |
– |
evp = bmalloc(strlen(vname)+strlen(value)+2); |
1689 |
– |
if (evp == NULL) |
1690 |
– |
syserr(progname); |
1691 |
– |
sprintf(evp, "%s=%s", vname, value); |
1692 |
– |
if (putenv(evp) != 0) { |
1693 |
– |
fprintf(stderr, "%s: out of environment space\n", progname); |
1694 |
– |
quit(1); |
1695 |
– |
} |
1696 |
– |
if (!silent) |
1697 |
– |
printf("set %s\n", evp); |
1698 |
– |
} |
1699 |
– |
#endif |
1705 |
|
|
1706 |
|
|
1707 |
|
static void |