cppcharset.c (_cpp_interpret_string_notranslate): Rename and duplicate argument structure of cpp_interpret_string.

2004-02-11  Eric Christopher  <echristo@redhat.com>

        * cppcharset.c (_cpp_interpret_string_notranslate): Rename and
        duplicate argument structure of cpp_interpret_string.
        * cpphash.h: Move prototype...
        * cpplib.h: Here.
        * cpplib.c: Fix calls to match new function signature.

From-SVN: r77688
This commit is contained in:
Eric Christopher 2004-02-12 02:25:03 +00:00
parent 1c86f39d32
commit 423e95e204
5 changed files with 20 additions and 10 deletions

View File

@ -1,3 +1,11 @@
2004-02-11 Eric Christopher <echristo@redhat.com>
* cppcharset.c (_cpp_interpret_string_notranslate): Rename and
duplicate argument structure of cpp_interpret_string.
* cpphash.h: Move prototype...
* cpplib.h: Here.
* cpplib.c: Fix calls to match new function signature.
2004-02-11 Joseph S. Myers <jsm@polyomino.org.uk>
PR c/456
@ -117,7 +125,7 @@
source_location.
2004-02-11 Hartmut Penner <hpenner@de.ibm.com>
* config/rs6000/altivec.md (*movv4si_internal): At least one
operand must be register_operand.
(*movv8hi_internal1): Likewise.
@ -150,7 +158,7 @@
Set AltiVec ABI and vrsave as default for ppc64 linux.
(init_cumulative_args): Post error, if try to return
value in AltiVec register without enable AltiVec.
(function_arg_advance): Ditto for passing arguments.
(function_arg_advance): Ditto for passing arguments.
2004-02-11 Richard Sandiford <rsandifo@redhat.com>

View File

@ -1186,8 +1186,8 @@ cpp_interpret_string (cpp_reader *pfile, const cpp_string *from, size_t count,
/* Subroutine of do_line and do_linemarker. Convert escape sequences
in a string, but do not perform character set conversion. */
bool
_cpp_interpret_string_notranslate (cpp_reader *pfile, const cpp_string *in,
cpp_string *out)
cpp_interpret_string_notranslate (cpp_reader *pfile, const cpp_string *from,
size_t count, cpp_string *to, bool wide)
{
struct cset_converter save_narrow_cset_desc = pfile->narrow_cset_desc;
bool retval;
@ -1195,7 +1195,7 @@ _cpp_interpret_string_notranslate (cpp_reader *pfile, const cpp_string *in,
pfile->narrow_cset_desc.func = convert_no_conversion;
pfile->narrow_cset_desc.cd = (iconv_t) -1;
retval = cpp_interpret_string (pfile, in, 1, out, false);
retval = cpp_interpret_string (pfile, from, count, to, wide);
pfile->narrow_cset_desc = save_narrow_cset_desc;
return retval;

View File

@ -595,9 +595,6 @@ extern size_t _cpp_replacement_text_len (const cpp_macro *);
extern cppchar_t _cpp_valid_ucn (cpp_reader *, const uchar **,
const uchar *, int);
extern void _cpp_destroy_iconv (cpp_reader *);
extern bool _cpp_interpret_string_notranslate (cpp_reader *,
const cpp_string *,
cpp_string *);
extern uchar *_cpp_convert_input (cpp_reader *, const char *, uchar *,
size_t, size_t, off_t *);
extern const char *_cpp_default_encoding (void);

View File

@ -804,7 +804,8 @@ do_line (cpp_reader *pfile)
if (token->type == CPP_STRING)
{
cpp_string s = { 0, 0 };
if (_cpp_interpret_string_notranslate (pfile, &token->val.str, &s))
if (cpp_interpret_string_notranslate (pfile, &token->val.str, 1,
&s, false))
new_file = (const char *)s.text;
check_eol (pfile);
}
@ -855,7 +856,8 @@ do_linemarker (cpp_reader *pfile)
if (token->type == CPP_STRING)
{
cpp_string s = { 0, 0 };
if (_cpp_interpret_string_notranslate (pfile, &token->val.str, &s))
if (cpp_interpret_string_notranslate (pfile, &token->val.str,
1, &s, false))
new_file = (const char *)s.text;
new_sysp = 0;

View File

@ -581,6 +581,9 @@ extern cppchar_t cpp_interpret_charconst (cpp_reader *, const cpp_token *,
extern bool cpp_interpret_string (cpp_reader *,
const cpp_string *, size_t,
cpp_string *, bool);
extern bool cpp_interpret_string_notranslate (cpp_reader *,
const cpp_string *, size_t,
cpp_string *, bool);
/* Used to register macros and assertions, perhaps from the command line.
The text is the same as the command line argument. */