Imported Upstream version 0.6.27
[platform/upstream/libsolv.git] / tools / helix2solv.c
index 764f195..04c6b48 100644 (file)
  */
 
 #include <sys/types.h>
-#include <limits.h>
-#include <fcntl.h>
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
 
 #include "pool.h"
 #include "repo_helix.h"
-#include "repo_write.h"
+#include "common_write.h"
 
 int
 main(int argc, char **argv)
 {
   Pool *pool = pool_create();
   Repo *repo = repo_create(pool, "<stdin>");
-  repo_add_helix(repo, stdin);
-  repo_write(repo, stdout, 0, 0, 0, 0);
+  if (repo_add_helix(repo, stdin, 0))
+    {
+      fprintf(stderr, "helix2solv: %s\n", pool_errstr(pool));
+      exit(1);
+    }
+  tool_write(repo, 0, 0);
   pool_free(pool);
   exit(0);
 }