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

SCM Repository

[diderot] View of /branches/vis12-cl/src/compiler/c-util/fragments/nrrd-save-helper.in
ViewVC logotype

View of /branches/vis12-cl/src/compiler/c-util/fragments/nrrd-save-helper.in

Parent Directory Parent Directory | Revision Log Revision Log


Revision 3081 - (download) (annotate)
Mon Mar 16 22:08:21 2015 UTC (4 years, 4 months ago) by jhr
File size: 462 byte(s)
  detabbing
/* helper function for saving output to nrrd file */
STATIC_INLINE int NrrdSaveHelper (const char *stem, const char *suffix, const char *ext, Nrrd *nData)
{
    size_t len = strlen(stem) + strlen(suffix) + strlen(ext) + 2;
    char *buf = (char *)malloc(strlen(stem) + strlen(suffix) + strlen(ext) + 1);
    if (buf == 0)
	return 1;
    snprintf(buf, len, "%s%s.%s", stem, suffix, ext);
    int sts = nrrdSave (buf, nData, NULL);
    free (buf);
    return 0;
}

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