BSD 4_4 release
[unix-history] / usr / src / usr.bin / f77 / libU77 / fseek_.c
index dbddd71..06d17ad 100644 (file)
@@ -1,6 +1,17 @@
-/*
-char id_fseek[] = "@(#)fseek_.c        1.1";
+/*-
+ * Copyright (c) 1980 The Regents of the University of California.
+ * All rights reserved.
  *
  *
+ * This module is believed to contain source code proprietary to AT&T.
+ * Use and redistribution is subject to the Berkeley Software License
+ * Agreement and your Software Agreement with AT&T (Western Electric).
+ */
+
+#ifndef lint
+static char sccsid[] = "@(#)fseek_.c   5.2 (Berkeley) 4/12/91";
+#endif /* not lint */
+
+/*
  * position a file associated with a fortran logical unit
  *
  * calling sequence:
  * position a file associated with a fortran logical unit
  *
  * calling sequence:
@@ -23,7 +34,9 @@ extern unit units[];
 long fseek_(lu, off, from)
 long *lu, *off, *from;
 {
 long fseek_(lu, off, from)
 long *lu, *off, *from;
 {
-       if (*lu < 0 || *lu >= MXUNIT || *from < 0 || *from > 2)
+       if (*lu < 0 || *lu >= MXUNIT)
+               return((long)(errno=F_ERUNIT));
+       if (*from < 0 || *from > 2)
                return((long)(errno=F_ERARG));
        if (!units[*lu].ufd)
                return((long)(errno=F_ERNOPEN));
                return((long)(errno=F_ERARG));
        if (!units[*lu].ufd)
                return((long)(errno=F_ERNOPEN));