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

SCM Repository

[diderot] Diff of /branches/pure-cfg/src/lib/common/input.c
ViewVC logotype

Diff of /branches/pure-cfg/src/lib/common/input.c

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

revision 1648, Mon Nov 21 15:52:35 2011 UTC revision 1649, Mon Nov 21 17:50:39 2011 UTC
# Line 12  Line 12 
12    
13  bool     VerboseFlg = false;            //! true if running in verbose mode  bool     VerboseFlg = false;            //! true if running in verbose mode
14  bool     TimingFlg = false;             //! true if timing computation  bool     TimingFlg = false;             //! true if timing computation
15  bool     NrrdOutputFlg = true;          //! true if output is in Nrrd format  bool     NrrdOutputFlg = false;         //! true if output is in Nrrd format
16    
17  //! Option type tags  //! Option type tags
18  typedef enum {  typedef enum {
# Line 277  Line 277 
277  {  {
278      char buf[AIR_STRLEN_HUGE] = "";      char buf[AIR_STRLEN_HUGE] = "";
279      if (hasDflt) {      if (hasDflt) {
280          sprintf(buf, "%ld", (long)*v);          snprintf(buf, sizeof(buf), "%ld", (long)*v);
281      }      }
282      opt_def_t *odf = OptAdd(dopts, name, desc, (void*)v, optTypeInt);      opt_def_t *odf = OptAdd(dopts, name, desc, (void*)v, optTypeInt);
283      hestOptAdd (      hestOptAdd (
# Line 298  Line 298 
298  {  {
299      char buf[AIR_STRLEN_HUGE] = "";      char buf[AIR_STRLEN_HUGE] = "";
300      if (hasDflt) {      if (hasDflt) {
301          sprintf(buf, "%lf", (double)*v);          snprintf(buf, sizeof(buf), "%lf", (double)*v);
302      }      }
303      opt_def_t *odf = OptAdd(dopts, name, desc, (void*)v, optTypeReal);      opt_def_t *odf = OptAdd(dopts, name, desc, (void*)v, optTypeReal);
304      hestOptAdd (      hestOptAdd (
# Line 322  Line 322 
322      if (hasDflt) {      if (hasDflt) {
323          Diderot_union2_t u;          Diderot_union2_t u;
324          u.v = *v;          u.v = *v;
325          sprintf(buf, "%lf %lf", (double)(u.r[0]), (double)(u.r[1]));          snprintf(buf, sizeof(buf), "%lf %lf", (double)(u.r[0]), (double)(u.r[1]));
326      }      }
327      opt_def_t *odf = OptAdd(dopts, name, desc, (void*)v, optTypeReal2);      opt_def_t *odf = OptAdd(dopts, name, desc, (void*)v, optTypeReal2);
328      hestOptAdd (      hestOptAdd (
# Line 346  Line 346 
346      if (hasDflt) {      if (hasDflt) {
347          Diderot_union3_t u;          Diderot_union3_t u;
348          u.v = *v;          u.v = *v;
349          sprintf(buf, "%lf %lf %lf",          snprintf(buf, sizeof(buf), "%lf %lf %lf",
350                  (double)(u.r[0]), (double)(u.r[1]), (double)(u.r[2]));                  (double)(u.r[0]), (double)(u.r[1]), (double)(u.r[2]));
351      }      }
352      opt_def_t *odf = OptAdd(dopts, name, desc, (void*)v, optTypeReal3);      opt_def_t *odf = OptAdd(dopts, name, desc, (void*)v, optTypeReal3);
# Line 372  Line 372 
372      if (hasDflt) {      if (hasDflt) {
373          Diderot_union4_t u;          Diderot_union4_t u;
374          u.v = *v;          u.v = *v;
375          sprintf(buf, "%lf %lf %lf %lf",          snprintf(buf, sizeof(buf), "%lf %lf %lf %lf",
376              (double)(u.r[0]), (double)(u.r[1]),              (double)(u.r[0]), (double)(u.r[1]),
377              (double)(u.r[2]), (double)(u.r[3]));              (double)(u.r[2]), (double)(u.r[3]));
378      }      }

Legend:
Removed from v.1648  
changed lines
  Added in v.1649

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