8 |
|
#include "standard.h" |
9 |
|
|
10 |
|
#include <ctype.h> |
11 |
+ |
#include <time.h> |
12 |
|
|
13 |
|
#include "platform.h" |
14 |
|
#include "view.h" |
15 |
|
#include "paths.h" |
16 |
|
#include "vars.h" |
17 |
|
|
18 |
+ |
#ifdef _WIN32 |
19 |
+ |
#define DELCMD "del" |
20 |
+ |
#define RENAMECMD "rename" |
21 |
+ |
#else |
22 |
+ |
#define DELCMD "rm -f" |
23 |
+ |
#define RENAMECMD "mv" |
24 |
+ |
#endif |
25 |
+ |
|
26 |
|
/* variables (alphabetical by name) */ |
27 |
|
#define AMBFILE 0 /* ambient file name */ |
28 |
|
#define DETAIL 1 /* level of scene detail */ |
89 |
|
char overfile[] = "overture.unf"; |
90 |
|
#endif |
91 |
|
|
83 |
– |
extern time_t time(); |
92 |
|
|
93 |
|
time_t scenedate; /* date of latest scene or object file */ |
94 |
|
time_t octreedate; /* date of octree */ |
318 |
|
FILE *fp; |
319 |
|
register int i; |
320 |
|
|
321 |
< |
if (osiz <= FTINY) |
321 |
> |
if (osiz <= FTINY) { |
322 |
|
if (!nprocs && fdate(oct1name) < |
323 |
|
(scenedate>illumdate?scenedate:illumdate)) { |
324 |
|
/* run getbbox */ |
354 |
|
} |
355 |
|
pclose(fp); |
356 |
|
} |
357 |
+ |
} |
358 |
|
org[0] = oorg[0]; org[1] = oorg[1]; org[2] = oorg[2]; *sizp = osiz; |
359 |
|
} |
360 |
|
|
559 |
|
return; |
560 |
|
if (!(afdate = fdate(vval(AMBFILE)))) |
561 |
|
return; |
562 |
< |
if (oct1date > afdate) |
562 |
> |
if (oct1date > afdate) { |
563 |
|
if (touchonly) |
564 |
|
touch(vval(AMBFILE)); |
565 |
|
else |
566 |
|
rmfile(vval(AMBFILE)); |
567 |
+ |
} |
568 |
|
} |
569 |
|
|
570 |
|
|
1069 |
|
goto again; |
1070 |
|
} |
1071 |
|
#endif |
1072 |
< |
copystruct(&vwr, &stdview); |
1072 |
> |
vwr = stdview; |
1073 |
|
sscanview(&vwr, cp=vopts); /* set initial options */ |
1074 |
|
while ((cp = strstr(cp, "-vf ")) != NULL && |
1075 |
|
*atos(buf, sizeof(buf), cp += 4)) { |
1316 |
|
char *fn; |
1317 |
|
{ |
1318 |
|
if (!silent) |
1319 |
< |
#ifdef _WIN32 |
1310 |
< |
printf("\tdel %s\n", fn); |
1311 |
< |
#else |
1312 |
< |
printf("\trm -f %s\n", fn); |
1313 |
< |
#endif |
1319 |
> |
printf("\t%s %s\n", DELCMD, fn); |
1320 |
|
if (!nprocs) |
1321 |
|
return(0); |
1322 |
|
return(unlink(fn)); |
1327 |
|
char *fold, *fnew; |
1328 |
|
{ |
1329 |
|
if (!silent) |
1330 |
< |
#ifdef _WIN32 |
1325 |
< |
printf("\trename %s %s\n", fold, fnew); |
1326 |
< |
#else |
1327 |
< |
printf("\tmv %s %s\n", fold, fnew); |
1328 |
< |
#endif |
1330 |
> |
printf("\t%s %s %s\n", RENAMECMD, fold, fnew); |
1331 |
|
if (!nprocs) |
1332 |
|
return(0); |
1333 |
|
return(rename(fold, fnew)); |