This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [gfortran] add ISATTY and TTYNAM intrinsics


(Again, sorry for breaking threading)

:REVIEWURL http://gcc.gnu.org/ml/gcc-patches/2005-08/msg00410.html:

Fracois-Xavier Coudert wrote:
> Attached patch (with testcase and ChangeLog entries) adds g77 ISATTY and
TTYNAM
> intrinsics to gfortran.
>
> Built and regtested on i686-linux. OK for mainline and 4.0?

Not yet, because I see a few minor issues.

> GFC_LOGICAL_8
> isatty_i8 (GFC_INTEGER_8 *unit)
> {
>   gfc_unit *u;
>
>   u = find_unit (*unit);
>   if (u != NULL)
>     return (GFC_LOGICAL_8) stream_isatty (u->s);
>   else
>     return 0;
> }

This only works on low-endian systems: find_unit expects an int argument.  I'd
suggest changing the unit argument to type int *, changing the resolution to
convert the argument to use gfc_c_int_kind, and changing the other
implementation functions accordingly.

Thanks,
- Tobi




Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]