main(argc,argv)
int argc;
char **argv;
{
  long atol();

  if (argc < 4) {
    printf("\nUsage:  TRUNCATE <Filename> <Original Size> <New Size>");
    exit(1);
  }

  if (filesize(argv[1]) == 0L || atol(argv[2]) != filesize(argv[1])) {
    printf("\nUnable to truncate %s",argv[1]);
    exit(1);
  }

  if (truncate(argv[1],atol(argv[3])))
    printf("\nError truncating %s",argv[1]);
  else
    printf("FILE: %s, changed from %s to %s bytes",argv[1],argv[2],argv[3]);
}
