This is the mail archive of the
fortran@gcc.gnu.org
mailing list for the GNU Fortran project.
Re: [PATCH,fortran] *The* ISO C Binding patch
- From: FX Coudert <fxcoudert at gmail dot com>
- To: Andreas Schwab <schwab at suse dot de>
- Cc: Steve Kargl <sgk at troutmask dot apl dot washington dot edu>, fortran at gcc dot gnu dot org, gcc-patches at gcc dot gnu dot org
- Date: Sun, 24 Jun 2007 20:37:45 +0200
- Subject: Re: [PATCH,fortran] *The* ISO C Binding patch
- Dkim-signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:in-reply-to:references:mime-version:content-type:message-id:cc:content-transfer-encoding:from:subject:date:to:x-mailer; b=eTz/lSN72SR18cnt6A2hnGyHea8uVp1rCHfyW20W5uaSkqZE1V6MBf9cqbKFli4iGEY0QmOCIqKgDyHOr4Gf27nBtPtVkUkOBg1cdrlgqrg6qGoND1IvQ7uikPAM+foiZBNKbLq8mcw9eg+YTPIRiV74D/bPGMJkddeuMBv/hYY=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:in-reply-to:references:mime-version:content-type:message-id:cc:content-transfer-encoding:from:subject:date:to:x-mailer; b=tn9O00eeHrBsETuP8YuS/Ft7P7v7FxLJWH0a4tjR94G0RVYtNCdc4mkYmDdB/twkRsD6Wf1CXNWnMG3qDNYdY4nBbv+8+kNuawhckgEWuPfhkR7WXaqQSEPdE/PdtVePLJvtlf0Tk6aGiiOHBtM+H1/Yqze0VJ3m0oW2ykBIrPM=
- References: <20070624051848.GA28624@troutmask.apl.washington.edu> <jeejk14oz8.fsf@sykes.suse.de>
+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