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