Bioplib
Protein Structure C Library
|
Open a file for writing unless the filename starts with a | in which case open as a pipe. More...
#include "port.h"
#include <stdio.h>
#include <stdlib.h>
#include <signal.h>
#include <string.h>
#include "macros.h"
Go to the source code of this file.
Functions | |
FILE * | popen (char *, char *) |
int | pclose (FILE *) |
FILE * | blOpenOrPipe (char *filename) |
int | blCloseOrPipe (FILE *fp) |
Open a file for writing unless the filename starts with a | in which case open as a pipe.
This code is NOT IN THE PUBLIC DOMAIN, but it may be copied according to the conditions laid out in the accompanying file COPYING.DOC.
The code may be modified as required, but any modifications must be documented so that the person responsible can be identified.
The code may not be sold commercially or included as part of a commercial product except as described in the file COPYING.DOC.
Definition in file openorpipe.c.
int blCloseOrPipe | ( | FILE * | fp | ) |
[in] | *fp | File pointer to be closed |
Attempts to close a file pointer as a pipe. If it isn't associated with a pipe (i.e. pclose returns (-1)), tries again to close it as a normal file.
Definition at line 172 of file openorpipe.c.
FILE* blOpenOrPipe | ( | char * | filename | ) |
[in] | *filename | A file or pipe to be opened |
Opens a file for writing unless the filename begins with a | in which case it is opened as a pipe.
Broken pipe signals are ignored.
Definition at line 128 of file openorpipe.c.
int pclose | ( | FILE * | ) |
FILE* popen | ( | char * | , |
char * | |||
) |