sbml2biocham.c 506 Bytes
Newer Older
Thierry Martinez's avatar
Thierry Martinez committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
#include <stdio.h>
#include <sbml/SBMLTypes.h>

int
main (int argc, char *argv[])
{
  const char *filename;
  SBMLDocument_t *document;
  Model_t *model;
  if (argc != 2) {
    fprintf(stderr, "Usage: sbml2biocham filename\n");
    return 2;
  }
  filename = argv[1];
  document = readSBML(filename);
  if (SBMLDocument_getNumErrors(document) != 0) {
    SBMLDocument_printErrors(document, stderr);
    return 1;
  }
  model = SBMLDocument_getModel(document);
  SBMLDocument_free(document);
  return 0;
}