--- ray/src/common/popen.c 1992/11/04 12:59:17 2.4 +++ ray/src/common/popen.c 2003/02/25 02:47:21 2.6 @@ -1,14 +1,15 @@ -/* Copyright (c) 1992 Regents of the University of California */ - #ifndef lint -static char SCCSid[] = "$SunId$ LBL"; +static const char RCSid[] = "$Id: popen.c,v 2.6 2003/02/25 02:47:21 greg Exp $"; #endif - /* * popen() and pclose() calls for systems without pipe facilities */ +#include "copyright.h" + #include +#include +#include #include #include "paths.h" @@ -27,7 +28,6 @@ popen(cmd, mode) /* open command for reading or writi register char *cmd; char *mode; { - extern char *malloc(), *strcpy(); FILE *fp; char *newcmd, *fname; register char *cp, *cp2 = NULL; @@ -37,8 +37,8 @@ char *mode; cmd++; if (!*cmd) return(NULL); - fname = malloc(TEMPLEN+1); - newcmd = malloc(TEMPLEN+6+strlen(cmd)); + fname = (char *)malloc(TEMPLEN+1); + newcmd = (char *)malloc(TEMPLEN+6+strlen(cmd)); if (fname == NULL | newcmd == NULL) return(NULL); mktemp(strcpy(fname,TEMPLATE));