/* awk format strings.
- Copyright (C) 2001-2004, 2006-2007, 2009, 2019-2020 Free Software Foundation, Inc.
+ Copyright (C) 2001-2004, 2006-2007, 2009, 2019-2020, 2023 Free Software Foundation, Inc.
Written by Bruno Haible <haible@clisp.cons.org>, 2002.
This program is free software: you can redistribute it and/or modify
unnumbered_arg_count = 0;
for (; *format != '\0';)
+ /* Invariant: spec.numbered_arg_count == 0 || unnumbered_arg_count == 0. */
if (*format++ == '%')
{
/* A directive. */
unsigned int n1 = spec1->numbered_arg_count;
unsigned int n2 = spec2->numbered_arg_count;
- /* Check the argument names are the same.
+ /* Check that the argument numbers are the same.
Both arrays are sorted. We search for the first difference. */
for (i = 0, j = 0; i < n1 || j < n2; )
{
/* Boost format strings.
- Copyright (C) 2001-2004, 2006-2007, 2009, 2019-2020 Free Software Foundation, Inc.
+ Copyright (C) 2001-2004, 2006-2007, 2009, 2019-2020, 2023 Free Software Foundation, Inc.
Written by Bruno Haible <haible@clisp.cons.org>, 2006.
This program is free software: you can redistribute it and/or modify
unnumbered_arg_count = 0;
for (; *format != '\0';)
+ /* Invariant: spec.numbered_arg_count == 0 || unnumbered_arg_count == 0. */
if (*format++ == '%')
{
/* A directive. */
unsigned int n1 = spec1->numbered_arg_count;
unsigned int n2 = spec2->numbered_arg_count;
- /* Check the argument names are the same.
+ /* Check that the argument numbers are the same.
Both arrays are sorted. We search for the first difference. */
for (i = 0, j = 0; i < n1 || j < n2; )
{
allocated = 0;
for (; *format != '\0';)
+ /* Invariant: spec.unnumbered_arg_count == 0 || numbered_arg_count == 0. */
if (*format++ == '%')
{
/* A directive. */
unsigned int n1 = spec1->numbered_arg_count;
unsigned int n2 = spec2->numbered_arg_count;
- /* Check the argument names are the same.
+ /* Check that the argument numbers are the same.
Both arrays are sorted. We search for the first difference. */
for (i = 0, j = 0; i < n1 || j < n2; )
{
/* GCC internal format strings.
- Copyright (C) 2003-2009, 2019-2020 Free Software Foundation, Inc.
+ Copyright (C) 2003-2009, 2019-2020, 2023 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2003.
This program is free software: you can redistribute it and/or modify
unnumbered_arg_count = 0;
for (; *format != '\0';)
+ /* Invariant: spec.numbered_arg_count == 0 || unnumbered_arg_count == 0. */
if (*format++ == '%')
{
/* A directive. */
unsigned int n1 = spec1->numbered_arg_count;
unsigned int n2 = spec2->numbered_arg_count;
- /* Check the argument names are the same.
+ /* Check that the argument numbers are the same.
Both arrays are sorted. We search for the first difference. */
for (i = 0, j = 0; i < n1 || j < n2; )
{
/* Java printf format strings.
- Copyright (C) 2001-2004, 2006-2007, 2009-2010, 2018-2020 Free Software
- Foundation, Inc.
+ Copyright (C) 2001-2004, 2006-2007, 2009-2010, 2018-2020, 2023 Free Software Foundation, Inc.
Written by Bruno Haible <haible@clisp.cons.org>, 2001.
This program is free software: you can redistribute it and/or modify
unsigned int n1 = spec1->numbered_arg_count;
unsigned int n2 = spec2->numbered_arg_count;
- /* Check the argument names are the same.
+ /* Check that the argument numbers are the same.
Both arrays are sorted. We search for the first difference. */
for (i = 0, j = 0; i < n1 || j < n2; )
{
/* Java MessageFormat format strings.
- Copyright (C) 2001-2004, 2006-2007, 2009, 2019 Free Software Foundation, Inc.
+ Copyright (C) 2001-2004, 2006-2007, 2009, 2019, 2023 Free Software Foundation, Inc.
Written by Bruno Haible <haible@clisp.cons.org>, 2001.
This program is free software: you can redistribute it and/or modify
unsigned int n1 = spec1->numbered_arg_count;
unsigned int n2 = spec2->numbered_arg_count;
- /* Check the argument names are the same.
+ /* Check that the argument numbers are the same.
Both arrays are sorted. We search for the first difference. */
for (i = 0, j = 0; i < n1 || j < n2; )
{
/* JavaScript format strings.
- Copyright (C) 2001-2004, 2006-2010, 2013, 2016, 2019-2020 Free Software Foundation, Inc.
+ Copyright (C) 2001-2004, 2006-2010, 2013, 2016, 2019-2020, 2023 Free Software Foundation, Inc.
Written by Andreas Stricker <andy@knitter.ch>, 2010.
It's based on python format module from Bruno Haible.
unnumbered_arg_count = 0;
for (; *format != '\0';)
+ /* Invariant: spec.numbered_arg_count == 0 || unnumbered_arg_count == 0. */
if (*format++ == '%')
{
/* A directive. */
unsigned int n1 = spec1->numbered_arg_count;
unsigned int n2 = spec2->numbered_arg_count;
- /* Check the argument names are the same.
+ /* Check that the argument numbers are the same.
Both arrays are sorted. We search for the first difference. */
for (i = 0, j = 0; i < n1 || j < n2; )
{
/* KDE format strings.
- Copyright (C) 2003-2004, 2006-2007, 2009, 2019-2020 Free Software Foundation, Inc.
+ Copyright (C) 2003-2004, 2006-2007, 2009, 2019-2020, 2023 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2007.
This program is free software: you can redistribute it and/or modify
unsigned int n2 = spec2->numbered_arg_count;
unsigned int missing = 0; /* only used if !equality */
- /* Check the argument names are the same.
+ /* Check that the argument numbers are the same.
Both arrays are sorted. We search for the first difference. */
for (i = 0, j = 0; i < n1 || j < n2; )
{
/* librep format strings.
- Copyright (C) 2001-2004, 2006-2007, 2009, 2019-2020 Free Software Foundation, Inc.
+ Copyright (C) 2001-2004, 2006-2007, 2009, 2019-2020, 2023 Free Software Foundation, Inc.
Written by Bruno Haible <haible@clisp.cons.org>, 2001.
This program is free software: you can redistribute it and/or modify
unsigned int n1 = spec1->numbered_arg_count;
unsigned int n2 = spec2->numbered_arg_count;
- /* Check the argument names are the same.
+ /* Check that the argument numbers are the same.
Both arrays are sorted. We search for the first difference. */
for (i = 0, j = 0; i < n1 || j < n2; )
{
/* Object Pascal format strings.
- Copyright (C) 2001-2004, 2006-2007, 2009-2010, 2018-2020 Free Software
- Foundation, Inc.
+ Copyright (C) 2001-2004, 2006-2007, 2009-2010, 2018-2020, 2023 Free Software Foundation, Inc.
Written by Bruno Haible <haible@clisp.cons.org>, 2001.
This program is free software: you can redistribute it and/or modify
unsigned int n1 = spec1->numbered_arg_count;
unsigned int n2 = spec2->numbered_arg_count;
- /* Check the argument names are the same.
+ /* Check that the argument numbers are the same.
Both arrays are sorted. We search for the first difference. */
for (i = 0, j = 0; i < n1 || j < n2; )
{
/* Perl format strings.
- Copyright (C) 2004, 2006-2007, 2009, 2019-2020 Free Software Foundation, Inc.
+ Copyright (C) 2004, 2006-2007, 2009, 2019-2020, 2023 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2003.
This program is free software: you can redistribute it and/or modify
unsigned int n1 = spec1->numbered_arg_count;
unsigned int n2 = spec2->numbered_arg_count;
- /* Check the argument names are the same.
+ /* Check that the argument numbers are the same.
Both arrays are sorted. We search for the first difference. */
for (i = 0, j = 0; i < n1 || j < n2; )
{
/* PHP format strings.
- Copyright (C) 2001-2004, 2006-2007, 2009, 2019-2020 Free Software Foundation, Inc.
+ Copyright (C) 2001-2004, 2006-2007, 2009, 2019-2020, 2023 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2002.
This program is free software: you can redistribute it and/or modify
unsigned int n1 = spec1->numbered_arg_count;
unsigned int n2 = spec2->numbered_arg_count;
- /* Check the argument names are the same.
+ /* Check that the argument numbers are the same.
Both arrays are sorted. We search for the first difference. */
for (i = 0, j = 0; i < n1 || j < n2; )
{
/* Python format strings.
- Copyright (C) 2001-2004, 2006-2009, 2019-2020 Free Software Foundation, Inc.
+ Copyright (C) 2001-2004, 2006-2009, 2019-2020, 2023 Free Software Foundation, Inc.
Written by Bruno Haible <haible@clisp.cons.org>, 2001.
This program is free software: you can redistribute it and/or modify
unsigned int n1 = spec1->named_arg_count;
unsigned int n2 = spec2->named_arg_count;
- /* Check the argument names are the same.
+ /* Check that the argument names are the same.
Both arrays are sorted. We search for the first difference. */
for (i = 0, j = 0; i < n1 || j < n2; )
{
/* Ruby format strings.
- Copyright (C) 2001-2004, 2006-2009, 2019-2020 Free Software Foundation, Inc.
+ Copyright (C) 2001-2004, 2006-2009, 2019-2020, 2023 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2020.
This program is free software: you can redistribute it and/or modify
allocated = 0;
for (; *format != '\0';)
+ /* Invariant: spec.numbered_arg_count == 0 || unnumbered_arg_count == 0. */
if (*format++ == '%')
{
/* A directive. */
unsigned int n1 = spec1->named_arg_count;
unsigned int n2 = spec2->named_arg_count;
- /* Check the argument names are the same.
+ /* Check that the argument names are the same.
Both arrays are sorted. We search for the first difference. */
for (i = 0, j = 0; i < n1 || j < n2; )
{
/* Shell format strings.
- Copyright (C) 2003-2004, 2006-2007, 2009, 2019-2020 Free Software Foundation, Inc.
+ Copyright (C) 2003-2004, 2006-2007, 2009, 2019-2020, 2023 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2003.
This program is free software: you can redistribute it and/or modify
unsigned int n1 = spec1->named_arg_count;
unsigned int n2 = spec2->named_arg_count;
- /* Check the argument names are the same.
+ /* Check that the argument names are the same.
Both arrays are sorted. We search for the first difference. */
for (i = 0, j = 0; i < n1 || j < n2; )
{
/* Tcl format strings.
- Copyright (C) 2001-2004, 2006-2007, 2009, 2019-2020 Free Software Foundation, Inc.
+ Copyright (C) 2001-2004, 2006-2007, 2009, 2019-2020, 2023 Free Software Foundation, Inc.
Written by Bruno Haible <haible@clisp.cons.org>, 2002.
This program is free software: you can redistribute it and/or modify
number = 1;
for (; *format != '\0';)
+ /* Invariant: !seen_numbered_arg || !seen_unnumbered_arg. */
if (*format++ == '%')
{
/* A directive. */
unsigned int n1 = spec1->numbered_arg_count;
unsigned int n2 = spec2->numbered_arg_count;
- /* Check the argument names are the same.
+ /* Check that the argument numbers are the same.
Both arrays are sorted. We search for the first difference. */
for (i = 0, j = 0; i < n1 || j < n2; )
{