From 9de8dd37bcc0af2bd702113a04349eebb09ef0c7 Mon Sep 17 00:00:00 2001 From: Benno Schulenberg Date: Sun, 10 Feb 2013 19:02:04 +0100 Subject: [PATCH 1/3] doc: do not gettextize debugging messages meant for developers * src/numfmt.c: Remove the call to gettext() around developer messages. --- src/numfmt.c | 46 +++++++++++++++++++++++----------------------- 1 files changed, 23 insertions(+), 23 deletions(-) diff --git a/src/numfmt.c b/src/numfmt.c index e42cbf8..117f19b 100644 --- a/src/numfmt.c +++ b/src/numfmt.c @@ -584,8 +584,8 @@ simple_strtod_human (const char *input_str, int scale_base = default_scale_base (allowed_scaling); if (dev_debug) - error (0, 0, _("simple_strtod_human:\n input string: '%s'\n " - "locale decimal-point: '%s'\n"), input_str, decimal_point); + error (0, 0, "simple_strtod_human:\n input string: '%s'\n " + "locale decimal-point: '%s'\n", input_str, decimal_point); enum simple_strtod_error e = simple_strtod_float (input_str, endptr, value, precision); @@ -593,8 +593,8 @@ simple_strtod_human (const char *input_str, return e; if (dev_debug) - error (0, 0, _(" parsed numeric value: %Lf\n" - " input precision = %d\n"), *value, (int)*precision); + error (0, 0, " parsed numeric value: %Lf\n" + " input precision = %d\n", *value, (int)*precision); if (**endptr != '\0') { @@ -620,7 +620,7 @@ simple_strtod_human (const char *input_str, scale_base = 1024; (*endptr)++; /* skip second ('i') suffix character. */ if (dev_debug) - error (0, 0, _(" Auto-scaling, found 'i', switching to base %d\n"), + error (0, 0, " Auto-scaling, found 'i', switching to base %d\n", scale_base); } @@ -638,14 +638,14 @@ simple_strtod_human (const char *input_str, long double multiplier = powerld (scale_base, power); if (dev_debug) - error (0, 0, _(" suffix power=%d^%d = %Lf\n"), + error (0, 0, " suffix power=%d^%d = %Lf\n", scale_base, power, multiplier); /* TODO: detect loss of precision and overflows. */ (*value) = (*value) * multiplier; if (dev_debug) - error (0, 0, _(" returning value: %Lf (%LG)\n"), *value, *value); + error (0, 0, " returning value: %Lf (%LG)\n", *value, *value); return e; } @@ -696,7 +696,7 @@ double_to_human (long double val, int precision, enum scale_type scale, int group, enum round_type round) { if (dev_debug) - error (0, 0, _("double_to_human:\n")); + error (0, 0, "double_to_human:\n"); if (scale == scale_none) { @@ -707,7 +707,7 @@ double_to_human (long double val, int precision, if (dev_debug) error (0, 0, (group) ? - _(" no scaling, returning (grouped) value: %'.*Lf\n") : + " no scaling, returning (grouped) value: %'.*Lf\n" : _(" no scaling, returning value: %.*Lf\n"), precision, val); int i = snprintf (buf, buf_size, (group) ? "%'.*Lf" : "%.*Lf", @@ -725,7 +725,7 @@ double_to_human (long double val, int precision, unsigned int power = 0; val = expld (val, scale_base, &power); if (dev_debug) - error (0, 0, _(" scaled value to %Lf * %0.f ^ %d\n"), + error (0, 0, " scaled value to %Lf * %0.f ^ %d\n", val, scale_base, power); /* Perform rounding. */ @@ -755,7 +755,7 @@ double_to_human (long double val, int precision, /* && (absld (val) > simple_round_floor (val))) */ if (dev_debug) - error (0, 0, _(" after rounding, value=%Lf * %0.f ^ %d\n"), + error (0, 0, " after rounding, value=%Lf * %0.f ^ %d\n", val, scale_base, power); snprintf (buf, buf_size, (show_decimal_point) ? "%.1Lf%s" : "%.0Lf%s", @@ -765,7 +765,7 @@ double_to_human (long double val, int precision, strncat (buf, "i", buf_size - strlen (buf) - 1); if (dev_debug) - error (0, 0, _(" returning value: '%s'\n"), buf); + error (0, 0, " returning value: '%s'\n", buf); return; } @@ -1013,9 +1013,9 @@ parse_format_string (char const *fmt) } if (dev_debug) - error (0, 0, _("format String:\n input: %s\n grouping: %s\n" - " padding width: %ld\n alignment: %s\n" - " prefix: '%s'\n suffix: '%s'\n"), + error (0, 0, "format String:\n input: %s\n grouping: %s\n" + " padding width: %ld\n alignment: %s\n" + " prefix: '%s'\n suffix: '%s'\n", quote (fmt), (grouping) ? "yes" : "no", padding_width, (padding_alignment == MBS_ALIGN_LEFT) ? "Left" : "Right", @@ -1088,7 +1088,7 @@ prepare_padded_number (const long double val, size_t precision) strncat (buf, suffix, sizeof (buf) - strlen (buf) -1); if (dev_debug) - error (0, 0, _("formatting output:\n value: %Lf\n humanized: '%s'\n"), + error (0, 0, "formatting output:\n value: %Lf\n humanized: '%s'\n", val, buf); @@ -1099,7 +1099,7 @@ prepare_padded_number (const long double val, size_t precision) padding_alignment, MBA_UNIBYTE_ONLY); if (dev_debug) - error (0, 0, _(" After padding: '%s'\n"), padding_buffer); + error (0, 0, " After padding: '%s'\n", padding_buffer); } else @@ -1137,12 +1137,12 @@ process_suffixed_number (char *text, long double *result, size_t *precision) /* trim suffix, ONLY if it's at the end of the text. */ *possible_suffix = '\0'; if (dev_debug) - error (0, 0, _("trimming suffix '%s'\n"), suffix); + error (0, 0, "trimming suffix '%s'\n", suffix); } else { if (dev_debug) - error (0, 0, _("no valid suffix found\n")); + error (0, 0, "no valid suffix found\n"); } } @@ -1165,7 +1165,7 @@ process_suffixed_number (char *text, long double *result, size_t *precision) padding_width = 0; } if (dev_debug) - error (0, 0, _("setting Auto-Padding to %ld characters\n"), + error (0, 0, "setting Auto-Padding to %ld characters\n", padding_width); } @@ -1234,7 +1234,7 @@ extract_fields (char *line, int _field, *_suffix = NULL; if (dev_debug) - error (0, 0, _("extracting Fields:\n input: '%s'\n field: %d\n"), + error (0, 0, "extracting Fields:\n input: '%s'\n field: %d\n", line, _field); if (field > 1) @@ -1246,7 +1246,7 @@ extract_fields (char *line, int _field, { /* not enough fields in the input - print warning? */ if (dev_debug) - error (0, 0, _(" TOO FEW FIELDS!\n prefix: '%s'\n"), *_prefix); + error (0, 0, " TOO FEW FIELDS!\n prefix: '%s'\n", *_prefix); return; } @@ -1267,7 +1267,7 @@ extract_fields (char *line, int _field, *_suffix = NULL; if (dev_debug) - error (0, 0, _(" prefix: '%s'\n number: '%s'\n suffix: '%s'\n"), + error (0, 0, " prefix: '%s'\n number: '%s'\n suffix: '%s'\n", *_prefix, *_data, *_suffix); } -- 1.7.0.4