* gettext-tools/src/pos.h (struct lex_pos_ty): Change type of file_name field to
'const char *'.
* gettext-tools/src/read-catalog.c (default_destructor,
default_reset_comment_state): Cast file_name to 'char *' before free()ing it.
* gettext-tools/src/xg-arglist-parser.h (arglist_parser_remember,
arglist_parser_remember_msgctxt): Change type of file_name parameter.
* gettext-tools/src/xg-arglist-parser.c (arglist_parser_remember,
arglist_parser_remember_msgctxt): Likewise.
/* Source file positions.
- Copyright (C) 1995-1998, 2000-2001, 2021 Free Software Foundation, Inc.
+ Copyright (C) 1995-1998, 2000-2001, 2021, 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
typedef struct lex_pos_ty lex_pos_ty;
struct lex_pos_ty
{
- char *file_name;
+ const char *file_name;
size_t line_number;
};
/* Reading PO files.
- Copyright (C) 1995-1998, 2000-2003, 2005-2006, 2008-2009, 2014-2016 Free
- Software Foundation, Inc.
+ Copyright (C) 1995-1998, 2000-2003, 2005-2006, 2008-2009, 2014-2016, 2023 Free Software Foundation, Inc.
This file was written by Peter Miller <millerp@canb.auug.org.au>
This program is free software: you can redistribute it and/or modify
}
for (j = 0; j < this->filepos_count; ++j)
- free (this->filepos[j].file_name);
+ free ((char *) this->filepos[j].file_name);
if (this->filepos != NULL)
free (this->filepos);
}
}
}
for (j = 0; j < this->filepos_count; ++j)
- free (this->filepos[j].file_name);
+ free ((char *) this->filepos[j].file_name);
if (this->filepos != NULL)
free (this->filepos);
this->filepos_count = 0;
arglist_parser_remember (struct arglist_parser *ap,
int argnum, mixed_string_ty *string,
flag_context_ty context,
- char *file_name, size_t line_number,
+ const char *file_name, size_t line_number,
refcounted_string_list_ty *comment,
bool comment_is_utf8)
{
arglist_parser_remember_msgctxt (struct arglist_parser *ap,
mixed_string_ty *string,
flag_context_ty context,
- char *file_name, size_t line_number)
+ const char *file_name, size_t line_number)
{
bool stored_string = false;
size_t nalternatives = ap->nalternatives;
extern void arglist_parser_remember (struct arglist_parser *ap,
int argnum, mixed_string_ty *string,
flag_context_ty context,
- char *file_name, size_t line_number,
+ const char *file_name, size_t line_number,
refcounted_string_list_ty *comment,
bool comment_is_utf8);
/* Adds a string argument as msgctxt to an arglist_parser, without incrementing
extern void arglist_parser_remember_msgctxt (struct arglist_parser *ap,
mixed_string_ty *string,
flag_context_ty context,
- char *file_name, size_t line_number);
+ const char *file_name, size_t line_number);
/* Tests whether an arglist_parser has is not waiting for more arguments after
argument ARGNUM. */
extern bool arglist_parser_decidedp (struct arglist_parser *ap, int argnum);