home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
GEMini Atari
/
GEMini_Atari_CD-ROM_Walnut_Creek_December_1993.iso
/
files
/
mint
/
mntlib16
/
pipe.c
< prev
next >
Encoding:
Amiga
Atari
Commodore
DOS
FM Towns/JPY
Macintosh
Macintosh JP
Macintosh to JP
NeXTSTEP
RISC OS/Acorn
Shift JIS
UTF-8
Wrap
C/C++ Source or Header
|
1993-08-03
|
333 b
|
26 lines
/*
* pipe: create a pipe
* works only under MiNT
*/
#include <osbind.h>
#include <errno.h>
#include "mintbind.h"
int
pipe(fd)
int *fd;
{
short mint_handle[2];
long r;
r = Fpipe(mint_handle);
if (r < 0) {
errno = -r;
return -1;
}
fd[0] = mint_handle[0];
fd[1] = mint_handle[1];
return 0;
}