home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Tricks of the DOOM Gurus
/
TricksOfTheDoomGurus.iso
/
bonus
/
linux
/
waddir
/
main.c
< prev
next >
Wrap
C/C++ Source or Header
|
1994-06-25
|
335b
|
22 lines
#include <sys/types.h>
#include <fcntl.h>
#include <stdio.h>
main(int argc, char *argv[])
{
int fd;
if ( argc != 2 ) {
fprintf(stderr, "Usage: %s wadfile\n", argv[0]);
exit(1);
}
if ( (fd=open(argv[1], O_RDONLY, 0)) < 0 ) {
perror(argv[1]);
exit(2);
}
if ( waddir(fd) < 0 )
exit(2);
exit(0);
}