]> pd.if.org Git - pdclib/blobdiff - functions/stdio/_PDCLIB_seek.c
dos2unix
[pdclib] / functions / stdio / _PDCLIB_seek.c
index f8dac3033704b3de365298ecba9f44904301913d..5d88a15cb9adb28ad083628eb029052a0f87929d 100644 (file)
@@ -1,41 +1,41 @@
-/* int64_t _PDCLIB_seek( FILE *, int64_t, int )\r
-\r
-   This file is part of the Public Domain C Library (PDCLib).\r
-   Permission is granted to use, modify, and / or redistribute at will.\r
-*/\r
-\r
-#include <stdio.h>\r
-#include <stdint.h>\r
-#include <errno.h>\r
-#ifndef REGTEST\r
-#include "_PDCLIB_io.h"\r
-\r
-int_fast64_t _PDCLIB_seek( FILE * stream, \r
-                           int_fast64_t offset, \r
-                           int whence )\r
-{\r
-    int_fast64_t newPos;\r
-    if(!stream->ops->seek(stream->handle, offset, whence, &newPos)) {\r
-        return EOF;\r
-    }\r
-\r
-    stream->ungetidx = 0;\r
-    stream->bufidx = 0;\r
-    stream->bufend = 0;\r
-    stream->pos.offset = newPos;\r
-    return newPos;\r
-}\r
-\r
-#endif\r
-\r
-#ifdef TEST\r
-#include "_PDCLIB_test.h"\r
-\r
-int main( void )\r
-{\r
-    /* Testing covered by ftell.c */\r
-    return TEST_RESULTS;\r
-}\r
-\r
-#endif\r
-\r
+/* int64_t _PDCLIB_seek( FILE *, int64_t, int )
+
+   This file is part of the Public Domain C Library (PDCLib).
+   Permission is granted to use, modify, and / or redistribute at will.
+*/
+
+#include <stdio.h>
+#include <stdint.h>
+#include <errno.h>
+#ifndef REGTEST
+#include "_PDCLIB_io.h"
+
+int_fast64_t _PDCLIB_seek( FILE * stream, 
+                           int_fast64_t offset, 
+                           int whence )
+{
+    int_fast64_t newPos;
+    if(!stream->ops->seek(stream->handle, offset, whence, &newPos)) {
+        return EOF;
+    }
+
+    stream->ungetidx = 0;
+    stream->bufidx = 0;
+    stream->bufend = 0;
+    stream->pos.offset = newPos;
+    return newPos;
+}
+
+#endif
+
+#ifdef TEST
+#include "_PDCLIB_test.h"
+
+int main( void )
+{
+    /* Testing covered by ftell.c */
+    return TEST_RESULTS;
+}
+
+#endif
+