Category : DeskTop Publishing in the 1990's
Archive   : DECAP.ZIP
Filename : DECAP.C

 
Output of file : DECAP.C contained in archive : DECAP.ZIP
/* decap - filter to remove MacBinary header (first 128 bytes) */
/* Ariel Frailich - CompuServe 72477,326 - CRS - GEnie A.FRAILICH */

/* v.1.0 26/05/88 initial release, written in Manx Aztec c */

#include

FILE *fopen() ,
*infile ,
*outfile ;

main( argc , argv )
int argc ;
char **argv ;
{
int c ;

if ( argc != 3 )
{
printf( "\n\nusage: decap infile outfile" ) ;
exit( 1 ) ;
}

if ( ( infile = fopen( argv[ 1 ] , "r" ) ) == NULL )
{
printf( "\n\ncouldn't open input file -- aborting." ) ;
exit( 2 ) ;
}

/* "x" means create new file */
if ( ( outfile = fopen( argv[ 2 ] , "x" ) ) == NULL )
{
printf( "\n\noutput file already exists -- aborting." ) ;
exit( 3 ) ;
}

if ( fseek( infile , 128L , 0 ) != 0 )
{
printf( "\n\nbad input file -- aborting." ) ;
exit( 4 ) ;
}

while ( ( c = getc( infile ) ) != EOF )
putc( c , outfile ) ;

fclose( infile ) ;
fclose( outfile ) ;
exit( 0 ) ;
}




  3 Responses to “Category : DeskTop Publishing in the 1990's
Archive   : DECAP.ZIP
Filename : DECAP.C

  1. Very nice! Thank you for this wonderful archive. I wonder why I found it only now. Long live the BBS file archives!

  2. This is so awesome! 😀 I’d be cool if you could download an entire archive of this at once, though.

  3. But one thing that puzzles me is the “mtswslnkmcjklsdlsbdmMICROSOFT” string. There is an article about it here. It is definitely worth a read: http://www.os2museum.com/wp/mtswslnk/