| 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 |
|
|
| 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; |
| 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)); |