]> pd.if.org Git - pdclib/blobdiff - platform/example/functions/_PDCLIB/allocpages.c
No exceptions to regtestdrivers anymore.
[pdclib] / platform / example / functions / _PDCLIB / allocpages.c
index 081adfb99993847b1d267cf882eb47ba348e7255..f3414bbb0bc8058925f0d67a8c107e0a894adbef 100644 (file)
@@ -11,6 +11,8 @@
 #include <stdint.h>
 #include <stddef.h>
 
+#ifndef REGTEST
+
 int brk( void * );
 void * sbrk( intptr_t );
 
@@ -53,13 +55,14 @@ void * _PDCLIB_allocpages( int const n )
     }
 }
 
+#endif
+
 #ifdef TEST
 #include "_PDCLIB_test.h"
 
 int main( void )
 {
 #ifndef REGTEST
-    {
     char * startbreak = sbrk( 0 );
     TESTCASE( _PDCLIB_allocpages( 0 ) );
     TESTCASE( ( (char *)sbrk( 0 ) - startbreak ) <= _PDCLIB_PAGESIZE );
@@ -70,7 +73,6 @@ int main( void )
     TESTCASE( sbrk( 0 ) == startbreak + ( 6 * _PDCLIB_PAGESIZE ) );
     TESTCASE( _PDCLIB_allocpages( -3 ) );
     TESTCASE( sbrk( 0 ) == startbreak + ( 3 * _PDCLIB_PAGESIZE ) );
-    }
 #endif
     return TEST_RESULTS;
 }