ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/radiance/ray/src/common/popen.c
(Generate patch)

Comparing ray/src/common/popen.c (file contents):
Revision 2.4 by greg, Wed Nov 4 12:59:17 1992 UTC vs.
Revision 2.6 by greg, Tue Feb 25 02:47:21 2003 UTC

# Line 1 | Line 1
1 /* Copyright (c) 1992 Regents of the University of California */
2
1   #ifndef lint
2 < static char SCCSid[] = "$SunId$ LBL";
2 > static const char       RCSid[] = "$Id$";
3   #endif
6
4   /*
5   * popen() and pclose() calls for systems without pipe facilities
6   */
7  
8 + #include "copyright.h"
9 +
10   #include <stdio.h>
11 + #include <stdlib.h>
12 + #include <string.h>
13   #include <ctype.h>
14   #include "paths.h"
15  
# Line 27 | Line 28 | popen(cmd, mode)               /* open command for reading or writi
28   register char   *cmd;
29   char    *mode;
30   {
30        extern char     *malloc(), *strcpy();
31          FILE    *fp;
32          char    *newcmd, *fname;
33          register char   *cp, *cp2 = NULL;
# Line 37 | Line 37 | char   *mode;
37                  cmd++;
38          if (!*cmd)
39                  return(NULL);
40 <        fname = malloc(TEMPLEN+1);
41 <        newcmd = malloc(TEMPLEN+6+strlen(cmd));
40 >        fname = (char *)malloc(TEMPLEN+1);
41 >        newcmd = (char *)malloc(TEMPLEN+6+strlen(cmd));
42          if (fname == NULL | newcmd == NULL)
43                  return(NULL);
44          mktemp(strcpy(fname,TEMPLATE));

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines