aboutsummaryrefslogtreecommitdiff
path: root/gcc/fortran/intrinsic.c
diff options
context:
space:
mode:
authorFrançois-Xavier Coudert <fxcoudert@gcc.gnu.org>2005-08-09 17:33:17 +0000
committerFrançois-Xavier Coudert <fxcoudert@gcc.gnu.org>2005-08-09 17:33:17 +0000
commitae8b87895f3ae2557674aad472f58efc2274440b (patch)
treec536f14d5c459cba9c9c7a629d3857e4fb6248ec /gcc/fortran/intrinsic.c
parent0ed414a4f6aa5a2d5fb5e2b6b3e508333cea047e (diff)
downloadgcc-ae8b87895f3ae2557674aad472f58efc2274440b.zip
gcc-ae8b87895f3ae2557674aad472f58efc2274440b.tar.gz
gcc-ae8b87895f3ae2557674aad472f58efc2274440b.tar.bz2
check.c (gfc_check_ttynam_sub, [...]): Add check functions for new intrinsics TTYNAM and ISATTY.
* check.c (gfc_check_ttynam_sub, gfc_check_isatty): Add check functions for new intrinsics TTYNAM and ISATTY. * intrinsic.c (add_functions, add_subroutines): Add new intrinsics. * intrinsic.h: Add prototypes for new check and resolve functions. * iresolve.c (gfc_resolve_isatty, gfc_resolve_ttynam_sub): New resolve functions for intrinsics TTYNAM and ISATTY. * gfortran.h (gfc_generic_isym_id): Add symbol for ISATTY. * trans-intrinsic.c: Add case for GFC_ISYM_ISATTY. * Makefile.am: Add file intrinsics/tty.c to Makefile process. * Makefile.in: Regenerate. * io/io.h: Prototypes for new functions stream_isatty and stream_ttyname. * io/unix (stream_isatty, stream_ttyname): New functions to call isatty() and ttyname() on a given unit. * intrinsics/tty.c: New file to implement g77 intrinsics TTYNAM and ISATTY. From-SVN: r102915
Diffstat (limited to 'gcc/fortran/intrinsic.c')
-rw-r--r--gcc/fortran/intrinsic.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/gcc/fortran/intrinsic.c b/gcc/fortran/intrinsic.c
index 67d95df..a304fbd 100644
--- a/gcc/fortran/intrinsic.c
+++ b/gcc/fortran/intrinsic.c
@@ -1468,6 +1468,12 @@ add_functions (void)
make_generic ("irand", GFC_ISYM_IRAND, GFC_STD_GNU);
+ add_sym_1 ("isatty", 0, 0, BT_LOGICAL, dl, GFC_STD_GNU,
+ gfc_check_isatty, NULL, gfc_resolve_isatty,
+ ut, BT_INTEGER, di, REQUIRED);
+
+ make_generic ("isatty", GFC_ISYM_ISATTY, GFC_STD_GNU);
+
add_sym_2 ("ishft", 1, 1, BT_INTEGER, di, GFC_STD_F95,
gfc_check_ishft, gfc_simplify_ishft, gfc_resolve_ishft,
i, BT_INTEGER, di, REQUIRED, sh, BT_INTEGER, di, REQUIRED);
@@ -2247,6 +2253,10 @@ add_subroutines (void)
c, BT_INTEGER, di, OPTIONAL, cr, BT_INTEGER, di, OPTIONAL,
cm, BT_INTEGER, di, OPTIONAL);
+ add_sym_2s ("ttynam", 0, 1, BT_UNKNOWN, 0, GFC_STD_GNU,
+ gfc_check_ttynam_sub, NULL, gfc_resolve_ttynam_sub,
+ ut, BT_INTEGER, di, REQUIRED, c, BT_CHARACTER, dc, REQUIRED);
+
add_sym_2s ("umask", 0, 1, BT_UNKNOWN, 0, GFC_STD_GNU,
gfc_check_umask_sub, NULL, gfc_resolve_umask_sub,
val, BT_INTEGER, di, REQUIRED, num, BT_INTEGER, di, OPTIONAL);