home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
C++ Games Programming
/
CPPGAMES.ISO
/
povnet
/
testpov.c
< prev
next >
Wrap
C/C++ Source or Header
|
1995-02-09
|
785b
|
37 lines
// --- testpov.c
// compile with Borland C
#include <stdio.h>
#include <conio.h>
#include <stdlib.h>
#include <dir.h>
#include <dos.h>
#include <string.h>
int main(int argc, char *argv[])
{
if (argc > 1) {
char fname[128], *cp, cmd[200];
struct ffblk ff;
memset(fname, 0, 13);
strncpy(fname, argv[1], 120);
cp = fname+strlen(fname);
strcpy(cp, ".pov");
if (findfirst(fname, &ff, 0) != -1) {
if (ff.ff_attrib && FA_ARCH)
printf("\n%s is being rendered.", ff.ff_name);
else {
printf("\n------ %s has been rendered ------", ff.ff_name);
strcpy(cp, ".out");
sprintf(cmd, "type %s", fname);
system(cmd);
strcpy(cp, ".err");
sprintf(cmd, "type %s", fname);
system(cmd);
}
}
}
return 0;
}