
Let's add to the program functions of the opening of databases those
names which are specified in the command line.

If any  errors are  detected, then  the program  returns to  the OS,
otherwise we will close the opened files and complete the program.

#include "dbf.h"

struct	DBF	*d1, *d2;

void	help();
void	error(char *s);

int
main(int argc, char *argv[])
{

 if (argc<3) help();

 d1=OpenBase(argv[1]);
 d2=OpenBase(argv[2]);
 if (!d1 || !d2) error("Open error...");



 CloseBase(d1);
 CloseBase(d2);

 return 0;
}

void
help()
{
 puts("DBF File Compare. Version 1.00 Copyright (c) Sergey Chehuta, 2001\n"
      "Use:\n"
      "\tDFC <file1.dbf> <file2.dbf> [switches]\n"
     );
 exit(0);
}

void
error(char *s)
{
 puts(s);
 exit(1);
}
