X-Git-Url: https://pd.if.org/git/?a=blobdiff_plain;f=platform%2Fexample%2Ffunctions%2F_PDCLIB%2Fallocpages.c;h=9de9314ea64cc733de4ec3c02dbb73167902e158;hb=3044c7be997666943201e01b1a429833e826694f;hp=55dd9d82a9e767d1f11701a1216df904b6e97e26;hpb=d02f38605b53cdff5460cc6b9e1b2a80c3a2ba4c;p=pdclib diff --git a/platform/example/functions/_PDCLIB/allocpages.c b/platform/example/functions/_PDCLIB/allocpages.c index 55dd9d8..9de9314 100644 --- a/platform/example/functions/_PDCLIB/allocpages.c +++ b/platform/example/functions/_PDCLIB/allocpages.c @@ -1,7 +1,3 @@ -/* $Id$ */ - -/* Release $Name$ */ - /* _PDCLIB_allocpages( int const ) This file is part of the Public Domain C Library (PDCLib). @@ -15,13 +11,12 @@ #include #include +#ifndef REGTEST + int brk( void * ); void * sbrk( intptr_t ); -#ifndef _PDCLIB_GLUE_H -#define _PDCLIB_GLUE_H _PDCLIB_GLUE_H -#include <_PDCLIB_glue.h> -#endif +#include "_PDCLIB_glue.h" static void * membreak = NULL; @@ -60,13 +55,15 @@ void * _PDCLIB_allocpages( int const n ) } } +#endif + #ifdef TEST -#include <_PDCLIB_test.h> + +#include "_PDCLIB_test.h" int main( void ) { #ifndef REGTEST - { char * startbreak = sbrk( 0 ); TESTCASE( _PDCLIB_allocpages( 0 ) ); TESTCASE( ( (char *)sbrk( 0 ) - startbreak ) <= _PDCLIB_PAGESIZE ); @@ -77,7 +74,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; }