summaryrefslogtreecommitdiff
path: root/gnu/lib/libf2c/libU77/ttynam_.c
diff options
context:
space:
mode:
Diffstat (limited to 'gnu/lib/libf2c/libU77/ttynam_.c')
-rw-r--r--gnu/lib/libf2c/libU77/ttynam_.c29
1 files changed, 13 insertions, 16 deletions
diff --git a/gnu/lib/libf2c/libU77/ttynam_.c b/gnu/lib/libf2c/libU77/ttynam_.c
index c7610fb0c87..ffdf5bfdf9a 100644
--- a/gnu/lib/libf2c/libU77/ttynam_.c
+++ b/gnu/lib/libf2c/libU77/ttynam_.c
@@ -35,28 +35,25 @@ Boston, MA 02111-1307, USA. */
#include <errno.h> /* for ENOSYS */
#include "f2c.h"
-#ifdef KR_headers
-extern void s_copy ();
-extern integer G77_fnum_0 ();
-/* Character */ void G77_ttynam_0 (ret_val, ret_val_len, lunit)
- char *ret_val; ftnlen ret_val_len; integer *lunit
-#else
-extern integer G77_fnum_0 (integer *lunit);
-extern void s_copy(register char *a, register char *b, ftnlen la, ftnlen lb);
-/* Character */ void G77_ttynam_0 (char *ret_val, ftnlen ret_val_len, integer *lunit)
-#endif
+extern integer G77_fnum_0 (integer * lunit);
+extern void s_copy (register char *a, register char *b, ftnlen la, ftnlen lb);
+/* Character */ void
+G77_ttynam_0 (char *ret_val, ftnlen ret_val_len, integer * lunit)
{
#if defined (HAVE_TTYNAME)
size_t i;
char *p;
p = ttyname (G77_fnum_0 (lunit));
- if (p != NULL) {
- i = strlen (p);
- s_copy (ret_val, p, ret_val_len, i);
- } else {
- s_copy (ret_val, " ", ret_val_len, 1);
- }
+ if (p != NULL)
+ {
+ i = strlen (p);
+ s_copy (ret_val, p, ret_val_len, i);
+ }
+ else
+ {
+ s_copy (ret_val, " ", ret_val_len, 1);
+ }
#else
errno = ENOSYS;
s_copy (ret_val, " ", ret_val_len, 1);