]> git.ipfire.org Git - thirdparty/glibc.git/blobdiff - stdio/fgetpos.c
update from main archive
[thirdparty/glibc.git] / stdio / fgetpos.c
index cb6a1588ba244057b15bfb75672f43cb00619c56..a615081c99dde40781a639c51c58602f168654b1 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1996 Free Software Foundation, Inc.
 This file is part of the GNU C Library.
 
 The GNU C Library is free software; you can redistribute it and/or
@@ -16,7 +16,6 @@ License along with the GNU C Library; see the file COPYING.LIB.  If
 not, write to the Free Software Foundation, Inc., 675 Mass Ave,
 Cambridge, MA 02139, USA.  */
 
-#include <ansidecl.h>
 #include <errno.h>
 #include <stdio.h>
 
@@ -25,16 +24,18 @@ Cambridge, MA 02139, USA.  */
 
 /* Put the current position of STREAM in *POS.  */
 int
-DEFUN(fgetpos, (stream, pos), FILE *stream AND fpos_t *pos)
+fgetpos (stream, pos)
+     FILE *stream;
+     fpos_t *pos;
 {
-  if (!__validfp(stream) || pos == NULL)
+  if (!__validfp (stream) || pos == NULL)
     {
-      errno = EINVAL;
-      return(-1);
+      __set_errno (EINVAL);
+      return -1;
     }
 
-  *pos = ftell(stream);
+  *pos = ftell (stream);
   if (*pos < 0L)
-    return(-1);
-  return(0);
+    return -1;
+  return 0;
 }