#if !defined(lint) && !defined(__INSIGHT__)
static char sos__rcsid[] = "testconfig.c,v 1.1.1.1 1995/06/16 17:42:47 seth Exp";
static char sos__copyright[] = "Copyright (c) 1994, 1995 SOS Corporation";
static char sos__contact[] = "SOS Corporation <sos-info@soscorp.com> +1 800 SOS UNIX";
#endif /* not lint */

/*
 * ++Copyright Released Product++
 *
 * Copyright (c) 1994, 1995 Sources of Supply Corporation ("SOS").
 * All rights reserved.
 *
 * The SOS Released Product License Agreement specifies the terms and
 * conditions for redistribution.  You may find the License Agreement
 * in the file LICENSE.
 *
 * SOS Corporation
 * 461 5th Ave.; 16th floor
 * New York, NY 10017
 *
 * +1 800 SOS UNIX
 * <sos-info@soscorp.com>
 *
 * --Copyright Released Product--
 */

/*
 * Test config file stuff
 */

#include "sos.h"


main(int argc, char *argv[])
{
  int c; 
  sos_config_t config;

  if ( (config = sos_config_read(argv[1])) == NULL )
    {
      fprintf(stderr, "Error reading config file");
    }
  sos_config_print(config);
  (void)getchar();

  for (c=2; c < argc; c++)
    {

      if ( !strcmp(argv[c], "reload") )
	{
	  config=sos_config_reload(config,NULL);
	}
      else
	{
	  config=sos_config_reload(config,argv[c]);
	}

      if ( !config ) 
	{
	  fprintf(stderr,"Error reading config file\n");
	  continue;
	}

      sos_config_print(config);
      (void)getchar();

    }

  exit (0);
  
}
