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

SCM Repository

[diderot] Diff of /branches/vis15/src/lib/common/util.cxx
ViewVC logotype

Diff of /branches/vis15/src/lib/common/util.cxx

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 3907, Mon May 23 23:30:23 2016 UTC revision 3908, Tue May 24 14:33:23 2016 UTC
# Line 13  Line 13 
13  #include <cstdlib>  #include <cstdlib>
14  #include "diderot/image.hxx"  #include "diderot/image.hxx"
15  #include "diderot/world.hxx"  #include "diderot/world.hxx"
16  #include "teem/biff.h"  #include <teem/biff.h>
17    
18  namespace diderot {  namespace diderot {
19    
20  Nrrd *load_nrrd_file (struct world_base *wrld, std::string const &filename)  Nrrd *world_base::load_nrrd_file (std::string const &filename)
21  {  {
22    /* create a nrrd; at this point it is just an empty container */    /* create a nrrd; at this point it is just an empty container */
23      Nrrd *nin = nrrdNew();      Nrrd *nin = nrrdNew();
# Line 25  Line 25 
25    /* read in the nrrd from the file */    /* read in the nrrd from the file */
26      if (nrrdLoad(nin, filename.c_str(), nullptr) != 0) {      if (nrrdLoad(nin, filename.c_str(), nullptr) != 0) {
27          char *msg = biffGetDone(NRRD);          char *msg = biffGetDone(NRRD);
28          biffMsgAdd (wrld->_errors, msg);          biffMsgAdd (this->_errors, msg);
29          free (msg);          std::free (msg);
30          return nullptr;          return nullptr;
31      }      }
32    
# Line 34  Line 34 
34    
35  }  }
36    
37  void error (struct world_base *wrld, const char *fmt, ...)  void world_base::error (const char *fmt, ...)
38  {  {
39      char buf[1024];      char buf[1024];
40      va_list ap;      va_list ap;
# Line 45  Line 45 
45      vsnprintf (buf, sizeof(buf), fmt, ap);      vsnprintf (buf, sizeof(buf), fmt, ap);
46      va_end (ap);      va_end (ap);
47    
48      biffMsgAdd (wrld->errors, buf);      biffMsgAdd (this->_errors, buf);
49  }  }
50    
51    

Legend:
Removed from v.3907  
changed lines
  Added in v.3908

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