]> pd.if.org Git - pdclib/blobdiff - functions/stdio/rename.c
Porting current working set from CVS.
[pdclib] / functions / stdio / rename.c
diff --git a/functions/stdio/rename.c b/functions/stdio/rename.c
new file mode 100644 (file)
index 0000000..4a1cc85
--- /dev/null
@@ -0,0 +1,33 @@
+/* $Id$ */
+
+/* Release $Name$ */
+
+/* rename( const char *, const char * )
+
+   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>
+
+#ifndef REGTEST
+#include <_PDCLIB_glue.h>
+
+int rename( const char * old, const char * new )
+{
+    /* TODO: Search open file list, flush and close file */
+    return _PDCLIB_rename( old, new );
+}
+
+#endif
+
+#ifdef TEST
+#include <_PDCLIB_test.h>
+
+int main( void )
+{
+    TESTCASE( NO_TESTDRIVER );
+    return TEST_RESULTS;
+}
+
+#endif