Home My Page Projects Code Snippets Project Openings diderot
Summary Activity Tracker Tasks SCM

SCM Repository

[diderot] View of /branches/vis12/test/iso2d-polyline/main.c
ViewVC logotype

View of /branches/vis12/test/iso2d-polyline/main.c

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1856 - (download) (as text) (annotate)
Fri Apr 20 18:58:01 2012 UTC (7 years, 5 months ago) by glk
File size: 884 byte(s)
  fix main.c for new API
/*! \file main.c
 *
 * \author John Reppy
 */

/*
 * COPYRIGHT (c) 2012 The Diderot Project (http://diderot-language.cs.uchicago.edu)
 * All rights reserved.
 */

#include "iso2d-polyline.h"

int main (int argc, const char **argv)
{
    ISO_World_t *wrld = ISO_Init ();

    ISO_SetVerbose (wrld, true);

    ISO_Initially (wrld);

    uint32_t nSteps = ISO_Run (wrld, 0);

  // get results
    Nrrd *nLengths = nrrdNew();
    Nrrd *nData = nrrdNew();
    if (ISO_OutputGet_path (wrld, nLengths, nData)) {
      // error
	//fprintf(stderr, "Error getting nrrd data: %s\n", ((WorldPrefix_t *)wrld)->err);
	return 1;
    }

    if (nrrdSave("lengths.nrrd", nLengths, NULL) || nrrdSave("data.nrrd", nData, NULL)) {
        char *err = biffGetDone(NRRD);
        fprintf(stderr, "Trouble saving nrrd struct: %s\n", err);
        return 1;
    }

    ISO_Shutdown (wrld);

    return 0;
}

root@smlnj-gforge.cs.uchicago.edu
ViewVC Help
Powered by ViewVC 1.0.0