Hi Chris, Thanks for your patch. Could you add it to a mail as a separate file. This included patch doesn't work when copied back into a file as the mailing programs modified it.
Harry 2009/3/1 cspiel <[email protected]> > > Harry - > > File "enfuse.cc" defines OPTION_DELIMITERS to be ",;:/", so > the comma ends up as a number _separator_. Therefore, it cannot be > used as a radix point inside a number anymore. This explains why > --EdgeScale=0,3:3,0:2,5 > causes you problems. However, it has nothing to do with the problem > when parsing > --EdgeScale=3:3:5 > Here, the error message > enfuse: illegal numeric format "..." for EdgeScale > tells us that the conversion function strtod(3) could not convert the > string into a floating-point number. > > I have attached a patch that > (i) drops the comma from the list of option delimiters making it a > viable radix point again and that > (ii) explicitely clears the error indicator before converting a string > into a number. HTH. > > Please holler if the problems persist. > > > Cheers, > Chris > > > > diff -r c48aaa8e667a src/enfuse.cc > --- a/src/enfuse.cc Sun Mar 01 08:11:44 2009 +0100 > +++ b/src/enfuse.cc Sun Mar 01 08:37:19 2009 +0100 > @@ -78,7 +78,7 @@ > #include <boost/random/mersenne_twister.hpp> > #include <lcms.h> > > -#define OPTION_DELIMITERS ",;:/" > +#define OPTION_DELIMITERS ";:/" > > struct AlternativePercentage { > double value; > @@ -421,6 +421,7 @@ > switch (option_index) { > case MinCurvatureId: { > char *tail; > + errno = 0; > MinCurvature.value = strtod(optarg, &tail); > if (errno == 0) { > if (*tail == 0) { > @@ -452,6 +453,7 @@ > << "EdgeScale is required." << endl; > exit(1); > } > + errno = 0; > FilterConfig.edgeScale = strtod(token, &tail); > if (errno == 0) { > if (*tail != 0) { > @@ -467,6 +469,7 @@ > > token = strtoken_r(NULL, OPTION_DELIMITERS, > &save_ptr); > if (token != NULL && *token != 0) { > + errno = 0; > FilterConfig.lceScale = strtod(token, &tail); > if (errno == 0) { > if (strcmp(tail, "%") == 0) { > @@ -485,6 +488,7 @@ > > token = strtoken_r(NULL, OPTION_DELIMITERS, > &save_ptr); > if (token != NULL && *token != 0) { > + errno = 0; > FilterConfig.lceFactor = strtod(token, &tail); > if (errno == 0) { > if (strcmp(tail, "%") == 0) { > @@ -522,6 +526,7 @@ > << "LowerCutOff is required." << endl; > exit(1); > } > + errno = 0; > EntropyLowerCutoff.value = strtod(token, &tail); > if (errno == 0) { > if (*tail == 0) { > @@ -541,6 +546,7 @@ > > token = strtoken_r(NULL, OPTION_DELIMITERS, > &save_ptr); > if (token != NULL && *token != 0) { > + errno = 0; > EntropyUpperCutoff.value = strtod(token, &tail); > if (errno == 0) { > if (*tail == 0) { > @@ -614,6 +620,7 @@ > } > > char *lastChar = NULL; > + errno = 0; > double value = strtod(optarg, &lastChar); > if ((lastChar == optarg || value < 0.0 || value > 1.0) && > (option_index == WeightExposureId || option_index == > WeightContrastId || > > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "hugin and other free panoramic software" group. A list of frequently asked questions is available at: http://wiki.panotools.org/Hugin_FAQ To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/hugin-ptx -~----------~----~----~----~------~----~------~--~---
