Commit 423e95e2 by Eric Christopher

cppcharset.c (_cpp_interpret_string_notranslate): Rename and duplicate argument…

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
parent 1c86f39d
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> 2004-02-11 Joseph S. Myers <jsm@polyomino.org.uk>
PR c/456 PR c/456
...@@ -117,7 +125,7 @@ ...@@ -117,7 +125,7 @@
source_location. source_location.
2004-02-11 Hartmut Penner <hpenner@de.ibm.com> 2004-02-11 Hartmut Penner <hpenner@de.ibm.com>
* config/rs6000/altivec.md (*movv4si_internal): At least one * config/rs6000/altivec.md (*movv4si_internal): At least one
operand must be register_operand. operand must be register_operand.
(*movv8hi_internal1): Likewise. (*movv8hi_internal1): Likewise.
...@@ -150,7 +158,7 @@ ...@@ -150,7 +158,7 @@
Set AltiVec ABI and vrsave as default for ppc64 linux. Set AltiVec ABI and vrsave as default for ppc64 linux.
(init_cumulative_args): Post error, if try to return (init_cumulative_args): Post error, if try to return
value in AltiVec register without enable AltiVec. 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> 2004-02-11 Richard Sandiford <rsandifo@redhat.com>
......
...@@ -1186,8 +1186,8 @@ cpp_interpret_string (cpp_reader *pfile, const cpp_string *from, size_t count, ...@@ -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 /* Subroutine of do_line and do_linemarker. Convert escape sequences
in a string, but do not perform character set conversion. */ in a string, but do not perform character set conversion. */
bool bool
_cpp_interpret_string_notranslate (cpp_reader *pfile, const cpp_string *in, cpp_interpret_string_notranslate (cpp_reader *pfile, const cpp_string *from,
cpp_string *out) size_t count, cpp_string *to, bool wide)
{ {
struct cset_converter save_narrow_cset_desc = pfile->narrow_cset_desc; struct cset_converter save_narrow_cset_desc = pfile->narrow_cset_desc;
bool retval; bool retval;
...@@ -1195,7 +1195,7 @@ _cpp_interpret_string_notranslate (cpp_reader *pfile, const cpp_string *in, ...@@ -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.func = convert_no_conversion;
pfile->narrow_cset_desc.cd = (iconv_t) -1; 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; pfile->narrow_cset_desc = save_narrow_cset_desc;
return retval; return retval;
......
...@@ -595,9 +595,6 @@ extern size_t _cpp_replacement_text_len (const cpp_macro *); ...@@ -595,9 +595,6 @@ extern size_t _cpp_replacement_text_len (const cpp_macro *);
extern cppchar_t _cpp_valid_ucn (cpp_reader *, const uchar **, extern cppchar_t _cpp_valid_ucn (cpp_reader *, const uchar **,
const uchar *, int); const uchar *, int);
extern void _cpp_destroy_iconv (cpp_reader *); 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 *, extern uchar *_cpp_convert_input (cpp_reader *, const char *, uchar *,
size_t, size_t, off_t *); size_t, size_t, off_t *);
extern const char *_cpp_default_encoding (void); extern const char *_cpp_default_encoding (void);
......
...@@ -804,7 +804,8 @@ do_line (cpp_reader *pfile) ...@@ -804,7 +804,8 @@ do_line (cpp_reader *pfile)
if (token->type == CPP_STRING) if (token->type == CPP_STRING)
{ {
cpp_string s = { 0, 0 }; 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_file = (const char *)s.text;
check_eol (pfile); check_eol (pfile);
} }
...@@ -855,7 +856,8 @@ do_linemarker (cpp_reader *pfile) ...@@ -855,7 +856,8 @@ do_linemarker (cpp_reader *pfile)
if (token->type == CPP_STRING) if (token->type == CPP_STRING)
{ {
cpp_string s = { 0, 0 }; 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_file = (const char *)s.text;
new_sysp = 0; new_sysp = 0;
......
...@@ -581,6 +581,9 @@ extern cppchar_t cpp_interpret_charconst (cpp_reader *, const cpp_token *, ...@@ -581,6 +581,9 @@ extern cppchar_t cpp_interpret_charconst (cpp_reader *, const cpp_token *,
extern bool cpp_interpret_string (cpp_reader *, extern bool cpp_interpret_string (cpp_reader *,
const cpp_string *, size_t, const cpp_string *, size_t,
cpp_string *, bool); 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. /* Used to register macros and assertions, perhaps from the command line.
The text is the same as the command line argument. */ The text is the same as the command line argument. */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment