home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Club Amiga de Montreal - CAM
/
CAM_CD_1.iso
/
files
/
412.lha
/
crabs
/
merge.c
< prev
next >
Wrap
C/C++ Source or Header
|
1990-08-29
|
556b
|
30 lines
/*
** This program will read two bitmap file for exactly the
** same format and create a or'd version on standard output
**
** This use is to merge rotated crabs to find the minimal mask
*/
#include <stdio.h>
main(argc, argv)
int argc;
char *argv[];
{
char c1, c2;
FILE *file;
if( (file = fopen(argv[1], "r")) == NULL ) {
fprintf(stderr,"Can't open the argument file\n");
exit(1);
}
while( (c1=getchar()) != EOF && (c2=getc(file)) != EOF ) {
if( c2=='*' )
c1='*';
putchar(c1);
}
fclose(file);
return 0;
}