/* versionchk.c */

/* Copyright 1997 by Eberhard Mattes <mattes@azu.informatik.uni-stuttgart.de>
   Donated to the public domain.  No warranty.

   1997-09-12 Initial version */

#include <stdio.h>
#include <stdlib.h>
#include "libemfw.h"

void libemfw_version_check (unsigned lo, unsigned hi)
{
  unsigned v = libemfw_version ();
  if (v < lo)
    {
      printf ("Need libemfw version %u or later instead of version %u.\n",
	      lo, v);
      exit (1);
    }
  if (v > hi)
    {
      printf ("Need libemfw version %u or older instead of version %u.\n",
	      hi, v);
      exit (1);
    }
}
