(root)/
gettext-0.22.4/
gettext-tools/
src/
format-invalid.h
       1  /* Common reasons that make a format string invalid.
       2     Copyright (C) 2003 Free Software Foundation, Inc.
       3     Written by Bruno Haible <bruno@clisp.org>, 2003.
       4  
       5     This program is free software: you can redistribute it and/or modify
       6     it under the terms of the GNU General Public License as published by
       7     the Free Software Foundation; either version 3 of the License, or
       8     (at your option) any later version.
       9  
      10     This program is distributed in the hope that it will be useful,
      11     but WITHOUT ANY WARRANTY; without even the implied warranty of
      12     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
      13     GNU General Public License for more details.
      14  
      15     You should have received a copy of the GNU General Public License
      16     along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
      17  
      18  /* These macros return freshly allocated error message strings, intended
      19     to be stored in *invalid_reason.  */
      20  
      21  #define INVALID_UNTERMINATED_DIRECTIVE() \
      22    xstrdup (_("The string ends in the middle of a directive."))
      23  
      24  #define INVALID_MIXES_NUMBERED_UNNUMBERED() \
      25    xstrdup (_("The string refers to arguments both through absolute argument numbers and through unnumbered argument specifications."))
      26  
      27  #define INVALID_ARGNO_0(directive_number) \
      28    xasprintf (_("In the directive number %u, the argument number 0 is not a positive integer."), directive_number)
      29  #define INVALID_WIDTH_ARGNO_0(directive_number) \
      30    xasprintf (_("In the directive number %u, the width's argument number 0 is not a positive integer."), directive_number)
      31  #define INVALID_PRECISION_ARGNO_0(directive_number) \
      32    xasprintf (_("In the directive number %u, the precision's argument number 0 is not a positive integer."), directive_number)
      33  
      34  #define INVALID_CONVERSION_SPECIFIER(directive_number,conv_char) \
      35    (c_isprint (conv_char) \
      36     ? xasprintf (_("In the directive number %u, the character '%c' is not a valid conversion specifier."), directive_number, conv_char) \
      37     : xasprintf (_("The character that terminates the directive number %u is not a valid conversion specifier."), directive_number))
      38  
      39  #define INVALID_INCOMPATIBLE_ARG_TYPES(arg_number) \
      40    xasprintf (_("The string refers to argument number %u in incompatible ways."), arg_number)