summaryrefslogtreecommitdiffstats
path: root/lib/libI77/open.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libI77/open.c')
-rw-r--r--lib/libI77/open.c15
1 files changed, 7 insertions, 8 deletions
diff --git a/lib/libI77/open.c b/lib/libI77/open.c
index beb525e..75386b9 100644
--- a/lib/libI77/open.c
+++ b/lib/libI77/open.c
@@ -1,4 +1,3 @@
-#include <unistd.h>
#ifndef NON_UNIX_STDIO
#include "sys/types.h"
#include "sys/stat.h"
@@ -29,9 +28,9 @@ char *f__w_mode[4] = {"wb", "w", "r+b", "r+"};
#endif
#ifdef KR_headers
-int f__isdev(s) char *s;
+f__isdev(s) char *s;
#else
-int f__isdev(char *s)
+f__isdev(char *s)
#endif
{
#ifdef NON_UNIX_STDIO
@@ -165,7 +164,7 @@ integer f_open(olist *a)
case 'R':
replace:
#ifdef NON_UNIX_STDIO
- if ( (tf = fopen(buf,f__w_mode[0])) )
+ if (tf = fopen(buf,f__w_mode[0]))
fclose(tf);
#else
(void) close(creat(buf, 0666));
@@ -188,9 +187,9 @@ integer f_open(olist *a)
else {
if(!(b->ufd = fopen(buf, f__r_mode[ufmt]))) {
#ifdef NON_UNIX_STDIO
- if ( (b->ufd = fopen(buf, f__w_mode[ufmt|2])) )
+ if (b->ufd = fopen(buf, f__w_mode[ufmt|2]))
b->uwrt = 2;
- else if ( (b->ufd = fopen(buf, f__w_mode[ufmt])) )
+ else if (b->ufd = fopen(buf, f__w_mode[ufmt]))
b->uwrt = 1;
else
#else
@@ -220,9 +219,9 @@ integer f_open(olist *a)
return(0);
}
#ifdef KR_headers
-int fk_open(seq,fmt,n) ftnint n;
+fk_open(seq,fmt,n) ftnint n;
#else
-int fk_open(int seq, int fmt, ftnint n)
+fk_open(int seq, int fmt, ftnint n)
#endif
{ char nbuf[10];
olist a;
OpenPOWER on IntegriCloud