]> pd.if.org Git - pdclib/commitdiff
Added stdinit.c to hold stdin, stdout, stderr initialization. Extended svn:ignore.
authorsolar <unknown>
Mon, 8 May 2006 15:59:26 +0000 (15:59 +0000)
committersolar <unknown>
Mon, 8 May 2006 15:59:26 +0000 (15:59 +0000)
platform/example/functions/_PDCLIB/stdinit.c [new file with mode: 0644]

diff --git a/platform/example/functions/_PDCLIB/stdinit.c b/platform/example/functions/_PDCLIB/stdinit.c
new file mode 100644 (file)
index 0000000..c8122c5
--- /dev/null
@@ -0,0 +1,33 @@
+/* $Id$ */
+
+/* _PDCLIB_stdinit
+
+   This file is part of the Public Domain C Library (PDCLib).
+   Permission is granted to use, modify, and / or redistribute at will.
+*/
+
+/* This is an example initialization of stdin, stdout and stderr to the integer
+   file descriptors 0, 1, and 2, respectively. This applies for a great variety
+   of operating systems, including POSIX compliant ones.
+*/
+
+#include <stdio.h>
+
+#ifndef REGTEST
+
+/* TODO: Initialize stdin, stdout, stderr */
+
+#endif
+
+#ifdef TEST
+/* TODO: Necessity of this undef should probably be circumvented. */
+#undef SEEK_SET
+#include <_PDCLIB_test.h>
+
+int main( void )
+{
+    TESTCASE( NO_TESTDRIVER );
+    return TEST_RESULTS;
+}
+
+#endif