--- ray/src/px/panim.c 2003/06/30 14:59:12 2.3 +++ ray/src/px/panim.c 2003/11/10 12:28:56 2.5 @@ -1,5 +1,5 @@ #ifndef lint -static const char RCSid[] = "$Id: panim.c,v 2.3 2003/06/30 14:59:12 schorsch Exp $"; +static const char RCSid[] = "$Id: panim.c,v 2.5 2003/11/10 12:28:56 schorsch Exp $"; #endif /* * Send pictures to PC animation system. @@ -10,6 +10,7 @@ static const char RCSid[] = "$Id: panim.c,v 2.3 2003/0 #include #include +#include "rtprocess.h" #include "random.h" #include "color.h" #include "clntrpc.h" @@ -17,7 +18,6 @@ static const char RCSid[] = "$Id: panim.c,v 2.3 2003/0 #define GAMMA 2.0 /* gamma correction factor */ -FILE *popen(); char *pcom = NULL; /* pipe command */ @@ -74,7 +74,7 @@ char *argv[]; sendframe(file) /* convert and send a frame */ char *file; { - char command[128]; + char command[PATH_MAX]; COLR scanin[SCANLINE]; int xres, yres; int xbeg, ybeg; @@ -90,7 +90,7 @@ char *file; file = ""; } else { if (pcom != NULL) { - sprintf(command, "( %s ) < %s", pcom, file); + sprintf(command, "( %s ) < \"%s\"", pcom, file); fp = popen(command, "r"); } else fp = fopen(file, "r");