#include <stdio.h>

int main(int argc, char **argv) {
  FILE *ofile;
  FILE *ifile;
  long word;
  long zeros = 0;

  if( argc < 3 ) {
    printf( "useage:\n" );
    printf( "  makeBin <infile> <outfile>\n" );
    exit(0);
  }
  ofile = fopen( argv[2], "wb" );
  if( ofile == NULL ) {
    printf( "Can't open output file %s\n", argv[2] );
    exit(0);
  }
  ifile = fopen( argv[1], "rb" );
  if( ifile == NULL ) {
    printf( "Can't open input file %s\n", argv[1] );
    exit(0);
  }
  
  while( !feof(ifile) ) {
    fscanf( ifile, "%ld\n", &word );
    fwrite( &word, 4, 1, ofile );
    fwrite( &zeros, 4, 1, ofile );
  }
  fclose(ifile);
  fclose(ofile);

  return(0);
}

