[PATCH,fortran] *The* ISO C Binding patch
FX Coudert
fxcoudert@gmail.com
Sun Jun 24 18:37:00 GMT 2007
>> +NAMED_CHARCST (ISOCBINDING_NULL_CHAR, "c_null_char", '\0')
>> +NAMED_CHARCST (ISOCBINDING_ALERT, "c_alert", '\a')
>> +NAMED_CHARCST (ISOCBINDING_BACKSPACE, "c_backspace", '\b')
>> +NAMED_CHARCST (ISOCBINDING_FORM_FEED, "c_form_feed", '\f')
>> +NAMED_CHARCST (ISOCBINDING_NEW_LINE, "c_new_line", '\n')
>> +NAMED_CHARCST (ISOCBINDING_CARRIAGE_RETURN, "c_carriage_return",
>> '\r')
>> +NAMED_CHARCST (ISOCBINDING_HORIZONTAL_TAB, "c_horizontal_tab", '\t')
>> +NAMED_CHARCST (ISOCBINDING_VERTICAL_TAB, "c_vertical_tab", '\v')
>
> Shouldn't those use the target character set?
Indeed they should. I thought I had taken care of it when I worked on
the F-E branch, but apparently I never committed it (or never got it
fully working).
For Steve : first, I'm sorry that I don't have time to deal with it
myself; second, the function you need for the translation is
lang_hooks.to_target_charset, you can see it used in trans-expr.c
(gfc_trans_string_copy), it's simply a matter of replacing '\b' with
lang_hooks.to_target_charset('\b'), and possibly #include
"langhooks.h" at the beginning of the file concerned.
FX
More information about the Fortran
mailing list