#include <stdio.h>

int main( int argn, char **argc )
{
  if( argn!=5 )
  {
    fprintf( stderr, "Usage: level <file> <vendor> <revision> <description>\n" );
    return 1;
  }

  FILE *exe( fopen( argc[1], "r+b" ) );

  if( !exe )
  {
    perror( argc[1] );
    return 2;
  }

  fseek( exe, 0, SEEK_END );
  fprintf( exe, "@#%s:%s#@ %s", argc[2], argc[3], argc[4] );
  fputc( 0, exe );
  fputc( 0, exe );
  fputc( 0, exe );
  fclose( exe );

  return 0;
}