From: solar Date: Mon, 8 May 2006 15:59:26 +0000 (+0000) Subject: Added stdinit.c to hold stdin, stdout, stderr initialization. Extended svn:ignore. X-Git-Tag: v0.5~203 X-Git-Url: https://pd.if.org/git/?p=pdclib;a=commitdiff_plain;h=fe6a06a63364475c1a8cb2152b8e4074209271e2 Added stdinit.c to hold stdin, stdout, stderr initialization. Extended svn:ignore. --- diff --git a/platform/example/functions/_PDCLIB/stdinit.c b/platform/example/functions/_PDCLIB/stdinit.c new file mode 100644 index 0000000..c8122c5 --- /dev/null +++ b/platform/example/functions/_PDCLIB/stdinit.c @@ -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 + +#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