/* Null context. */
flag_context_ty null_context =
{
+ undecided, false,
undecided, false,
undecided, false,
undecided, false
/* Transparent context. */
flag_context_ty passthrough_context =
{
+ undecided, true,
undecided, true,
undecided, true,
undecided, true
result.is_format3 = outer_context.is_format3;
result.pass_format3 = false;
}
+ if (result.pass_format4)
+ {
+ result.is_format4 = outer_context.is_format4;
+ result.pass_format4 = false;
+ }
return result;
}
static flag_context_list_ty passthrough_context_circular_list =
{
1,
- { undecided, true, undecided, true, undecided, true },
+ { undecided, true, undecided, true, undecided, true, undecided, true },
&passthrough_context_circular_list
};
flag_context_list_iterator_ty passthrough_context_list_iterator =
list->flags.is_format3 = value;
list->flags.pass_format3 = pass;
break;
+ case 3:
+ list->flags.is_format4 = value;
+ list->flags.pass_format4 = pass;
+ break;
default:
abort ();
}
list->flags.is_format3 = value;
list->flags.pass_format3 = pass;
break;
+ case 3:
+ list->flags.is_format4 = value;
+ list->flags.pass_format4 = pass;
+ break;
default:
abort ();
}
list->flags.is_format3 = value;
list->flags.pass_format3 = pass;
break;
+ case 3:
+ list->flags.is_format4 = value;
+ list->flags.pass_format4 = pass;
+ break;
default:
abort ();
}
list->flags.is_format3 = value;
list->flags.pass_format3 = pass;
break;
+ case 3:
+ list->flags.is_format4 = value;
+ list->flags.pass_format4 = pass;
+ break;
default:
abort ();
}
/* Keeping track of the flags that apply to a string extracted
in a certain context.
- Copyright (C) 2001-2018, 2020 Free Software Foundation, Inc.
+ Copyright (C) 2001-2018, 2020, 2023 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
/* Regarding the tertiary formatstring type. */
/*enum is_format*/ unsigned int is_format3 : 3;
/*bool*/ unsigned int pass_format3 : 1;
+ /* Regarding the fourth-ranked formatstring type. */
+ /*enum is_format*/ unsigned int is_format4 : 3;
+ /*bool*/ unsigned int pass_format4 : 1;
};
/* Null context. */
extern flag_context_ty null_context;
if (context.is_format1 != undecided
|| context.is_format2 != undecided
- || context.is_format3 != undecided)
+ || context.is_format3 != undecided
+ || context.is_format4 != undecided)
for (i = 0; i < NFORMATS; i++)
{
if (is_format[i] == undecided)
if (formatstring_parsers[i] == current_formatstring_parser3
&& context.is_format3 != undecided)
is_format[i] = (enum is_format) context.is_format3;
+ if (formatstring_parsers[i] == current_formatstring_parser4
+ && context.is_format4 != undecided)
+ is_format[i] = (enum is_format) context.is_format4;
}
if (possible_format_p (is_format[i]))
{
if (mp->is_format[i] == undecided
&& (formatstring_parsers[i] == current_formatstring_parser1
|| formatstring_parsers[i] == current_formatstring_parser2
- || formatstring_parsers[i] == current_formatstring_parser3)
+ || formatstring_parsers[i] == current_formatstring_parser3
+ || formatstring_parsers[i] == current_formatstring_parser4)
/* But avoid redundancy: objc-format is stronger than c-format. */
&& !(i == format_c && possible_format_p (mp->is_format[format_objc]))
&& !(i == format_objc && possible_format_p (mp->is_format[format_c]))
for (i = 0; i < NFORMATS; i++)
if ((formatstring_parsers[i] == current_formatstring_parser1
|| formatstring_parsers[i] == current_formatstring_parser2
- || formatstring_parsers[i] == current_formatstring_parser3)
+ || formatstring_parsers[i] == current_formatstring_parser3
+ || formatstring_parsers[i] == current_formatstring_parser4)
&& (mp->is_format[i] == undecided || mp->is_format[i] == possible)
/* But avoid redundancy: objc-format is stronger than c-format. */
&& !(i == format_c
struct formatstring_parser *formatstring_parser1;
struct formatstring_parser *formatstring_parser2;
struct formatstring_parser *formatstring_parser3;
+ struct formatstring_parser *formatstring_parser4;
};
string_list_ty *file_list;
char *output_file = NULL;
const char *language = NULL;
- extractor_ty extractor = { NULL, NULL, NULL, NULL, NULL, NULL };
+ extractor_ty extractor = { NULL, NULL, NULL, NULL, NULL, NULL, NULL };
int cnt;
size_t i;
/* Temporarily reset the directory list to empty, because file_name
is an output file and therefore should not be searched for. */
void *saved_directory_list = dir_list_save_reset ();
- extractor_ty po_extractor = { extract_po, NULL, NULL, NULL, NULL, NULL };
+ extractor_ty po_extractor =
+ { extract_po, NULL, NULL, NULL, NULL, NULL, NULL };
extract_from_file (file_name, po_extractor, mdlp);
if (!is_ascii_msgdomain_list (mdlp))
struct formatstring_parser *current_formatstring_parser1;
struct formatstring_parser *current_formatstring_parser2;
struct formatstring_parser *current_formatstring_parser3;
+struct formatstring_parser *current_formatstring_parser4;
static void
current_formatstring_parser1 = extractor.formatstring_parser1;
current_formatstring_parser2 = extractor.formatstring_parser2;
current_formatstring_parser3 = extractor.formatstring_parser3;
+ current_formatstring_parser4 = extractor.formatstring_parser4;
if (extractor.extract_from_stream)
{
current_formatstring_parser1 = NULL;
current_formatstring_parser2 = NULL;
current_formatstring_parser3 = NULL;
+ current_formatstring_parser4 = NULL;
}
static message_ty *
result.formatstring_parser1 = tp->formatstring_parser1;
result.formatstring_parser2 = tp->formatstring_parser2;
result.formatstring_parser3 = NULL;
+ result.formatstring_parser4 = NULL;
/* Handle --qt. It's preferrable to handle this facility here rather
than through an option --language=C++/Qt because the latter would
error (EXIT_FAILURE, 0, _("language '%s' unknown"), name);
/* NOTREACHED */
{
- extractor_ty result = { NULL, NULL, NULL, NULL, NULL, NULL };
+ extractor_ty result = { NULL, NULL, NULL, NULL, NULL, NULL, NULL };
return result;
}
}
/* xgettext common functions.
- Copyright (C) 2001-2003, 2005-2006, 2008-2009, 2011, 2013-2014, 2018, 2020 Free Software Foundation, Inc.
+ Copyright (C) 2001-2003, 2005-2006, 2008-2009, 2011, 2013-2014, 2018, 2020, 2023 Free Software Foundation, Inc.
Written by Peter Miller <millerp@canb.auug.org.au>
and Bruno Haible <haible@clisp.cons.org>, 2001.
extern struct formatstring_parser *current_formatstring_parser1;
extern struct formatstring_parser *current_formatstring_parser2;
extern struct formatstring_parser *current_formatstring_parser3;
+extern struct formatstring_parser *current_formatstring_parser4;
/* Record a flag in the appropriate backend's table. */