r3892 - in trunk: . tools



Author: stw
Date: 2006-09-17 07:45:29 -0400 (Sun, 17 Sep 2006)
New Revision: 3892

Modified:
   trunk/ChangeLog
   trunk/tools/bsefcompare.cc
   trunk/tools/bsefextract.cc
Log:
Sun Sep 17 13:39:49 2006  Stefan Westerfeld  <stefan space twc de>

	* tools/bsefextract.cc tools/bsefcompare.cc: Replace atof with
	g_ascii_strtod in option parsing, since otherwise the automatic tests
	in slowtests/audio (and other bsefextract/bsefcompare based scripts)
	will break when the system locale has a different "decimal point"
	setting.


Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog	2006-09-16 13:53:02 UTC (rev 3891)
+++ trunk/ChangeLog	2006-09-17 11:45:29 UTC (rev 3892)
@@ -1,3 +1,11 @@
+Sun Sep 17 13:39:49 2006  Stefan Westerfeld  <stefan space twc de>
+
+	* tools/bsefextract.cc tools/bsefcompare.cc: Replace atof with
+	g_ascii_strtod in option parsing, since otherwise the automatic tests
+	in slowtests/audio (and other bsefextract/bsefcompare based scripts)
+	will break when the system locale has a different "decimal point"
+	setting.
+
 Wed Aug 30 21:57:32 2006  Tim Janik  <timj gtk org>
 
 	* launchers/suidmain.c (main): abort the program if we failed to drop

Modified: trunk/tools/bsefcompare.cc
===================================================================
--- trunk/tools/bsefcompare.cc	2006-09-16 13:53:02 UTC (rev 3891)
+++ trunk/tools/bsefcompare.cc	2006-09-17 11:45:29 UTC (rev 3892)
@@ -145,7 +145,7 @@
       else if (check_arg (argc, argv, &i, "--permissive"))
         strict = false;
       else if (check_arg (argc, argv, &i, "--threshold", &opt_arg))
-        threshold = atof (opt_arg);
+        threshold = g_ascii_strtod (opt_arg, NULL);
     }
 
   /* resort argc/argv */

Modified: trunk/tools/bsefextract.cc
===================================================================
--- trunk/tools/bsefextract.cc	2006-09-16 13:53:02 UTC (rev 3891)
+++ trunk/tools/bsefextract.cc	2006-09-17 11:45:29 UTC (rev 3892)
@@ -1105,13 +1105,13 @@
 	    }
 	}
       else if (check_arg (argc, argv, &i, "--silence-threshold", &opt_arg))
-        silence_threshold = atof (opt_arg) / 32767.0;
+        silence_threshold = g_ascii_strtod (opt_arg, NULL) / 32767.0;
       else if (check_arg (argc, argv, &i, "--focus-width", &opt_arg))
-        validate_percent ("--focus-width", focus_width = atof (opt_arg));
+        validate_percent ("--focus-width", focus_width = g_ascii_strtod (opt_arg, NULL));
       else if (check_arg (argc, argv, &i, "--focus-center", &opt_arg))
-        validate_percent ("--focus-center", focus_center = atof (opt_arg));
+        validate_percent ("--focus-center", focus_center = g_ascii_strtod (opt_arg, NULL));
       else if (check_arg (argc, argv, &i, "--base-freq-hint", &opt_arg))
-        base_freq_hint = atof (opt_arg);
+        base_freq_hint = g_ascii_strtod (opt_arg, NULL);
       else if (check_arg (argc, argv, &i, "--channel", &opt_arg))
         channel = atoi (opt_arg);
       else




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]