#include <libvisual/libvisual.h>
#include <cstdio>

int main(int argc, char **argv)
{
   int result = visual_init(&argc, &argv);
   if (result != VISUAL_OK) {
      std::fprintf(stderr, "visual_init failed: %d\n", result);
      return 1;
   }

   if (!visual_is_initialized()) {
      std::fprintf(stderr, "libvisual did not report initialized state\n");
      visual_quit();
      return 1;
   }

   result = visual_quit();
   if (result != VISUAL_OK) {
      std::fprintf(stderr, "visual_quit failed: %d\n", result);
      return 1;
   }

   return 0;
}
