X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Flanguage%2Fexpressions%2Fhelpers.c;h=08f787fea2f30c14099df3c82808623b2e886e30;hb=7d34380bb2fddca820a6f414564738cc2f70afc9;hp=85705098a2df44e2ad0e39da0764f75684bc9407;hpb=7fbfc32fc3c636959b0a25b3e76609f86519e84a;p=pspp diff --git a/src/language/expressions/helpers.c b/src/language/expressions/helpers.c index 85705098a2..08f787fea2 100644 --- a/src/language/expressions/helpers.c +++ b/src/language/expressions/helpers.c @@ -1,5 +1,5 @@ /* PSPP - a program for statistical analysis. - Copyright (C) 2008 Free Software Foundation, Inc. + Copyright (C) 2008, 2010 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -30,10 +30,14 @@ expr_error (void *aux UNUSED, const char *format, ...) struct msg m; va_list args; - m.category = MSG_SYNTAX; - m.severity = MSG_ERROR; + m.category = MSG_C_SYNTAX; + m.severity = MSG_S_ERROR; va_start (args, format); m.text = xvasprintf (format, args); + m.where.file_name = NULL; + m.where.line_number = 0; + m.where.first_column = 0; + m.where.last_column = 0; va_end (args); msg_emit (&m); @@ -179,9 +183,11 @@ recognize_unit (struct substring name, enum date_unit *unit) return true; } - msg (SE, _("Unrecognized date unit \"%.*s\". " - "Valid date units are \"years\", \"quarters\", \"months\", " - "\"weeks\", \"days\", \"hours\", \"minutes\", and \"seconds\"."), + /* TRANSLATORS: Don't translate the the actual unit names `weeks', `days' etc + They must remain in their original English. */ + msg (SE, _("Unrecognized date unit `%.*s'. " + "Valid date units are `years', `quarters', `months', " + "`weeks', `days', `hours', `minutes', and `seconds'."), (int) ss_length (name), ss_data (name)); return false; } @@ -330,7 +336,7 @@ recognize_method (struct substring method_name, enum date_sum_method *method) else { msg (SE, _("Invalid DATESUM method. " - "Valid choices are \"closest\" and \"rollover\".")); + "Valid choices are `closest' and `rollover'.")); return false; } } @@ -404,7 +410,7 @@ expr_date_sum (double date, double quantity, struct substring unit_name, } int -compare_string (const struct substring *a, const struct substring *b) +compare_string_3way (const struct substring *a, const struct substring *b) { size_t i;