]> pd.if.org Git - pdclib/blobdiff - functions/_PDCLIB/filemode.c
No exceptions to regtestdrivers anymore.
[pdclib] / functions / _PDCLIB / filemode.c
index 0eca3922681ee91d721152b6636bf669f9b3b905..9c3ec248f93eae3afc33639f39c9d16299508a73 100644 (file)
@@ -6,6 +6,8 @@
 
 #include <stddef.h>
 
+#ifndef REGTEST
+
 /* Helper function that parses the C-style mode string passed to fopen() into
    the PDCLib flags FREAD, FWRITE, FAPPEND, FRW (read-write) and FBIN (binary
    mode).
@@ -52,11 +54,14 @@ unsigned int _PDCLIB_filemode( char const * const mode )
     return 0;
 }
 
+#endif
+
 #ifdef TEST
 #include "_PDCLIB_test.h"
 
 int main( void )
 {
+#ifndef REGTEST
     TESTCASE( _PDCLIB_filemode( "r" ) == _PDCLIB_FREAD );
     TESTCASE( _PDCLIB_filemode( "w" ) == _PDCLIB_FWRITE );
     TESTCASE( _PDCLIB_filemode( "a" ) == ( _PDCLIB_FAPPEND | _PDCLIB_FWRITE ) );
@@ -76,6 +81,7 @@ int main( void )
     TESTCASE( _PDCLIB_filemode( "r++" ) == 0 );
     TESTCASE( _PDCLIB_filemode( "wbb" ) == 0 );
     TESTCASE( _PDCLIB_filemode( "a+bx" ) == 0 );
+#endif
     return TEST_RESULTS;
 }