/* Copyright (c) 2001-2009 by SoftIntegration, Inc. All Rights Reserved */
/*************************************************
* Get Ch version information
*************************************************/
#include<stdio.h>
#include<ch.h>

EXPORTCH void chversion_chdl(void *varg) {
  ChInterp_t interp;
  ChVaList_t ap;
  ChInfo_t info;

  Ch_VaStart(interp, ap, varg); 
  if(Ch_Version(interp, &info)==CH_ERROR)
       printf("Error: Ch_Version() failed.\n");
  printf("info.edition  = %s\n", info.edition);
  printf("info.releasedate = %s\n", info.releasedate);
  printf("info.version  = %s\n", info.version);
  printf("info.vermajor = %d\n", info.vermajor);
  printf("info.verminor = %d\n", info.verminor);
  printf("info.vermicro = %d\n", info.vermicro);
  printf("info.verbuild = %d\n", info.verbuild);
  printf("Ch %s Edition v%d.%d.%d.%d %s released by %s\n", info.edition,
           info.vermajor, info.verminor, info.vermicro, info.verbuild,
           info.version, info.releasedate);
  Ch_VaEnd(interp, ap);
  return;
}
