X-Git-Url: https://pd.if.org/git/?a=blobdiff_plain;f=platform%2Fexample%2Ffunctions%2Fstdio%2Ftmpfile.c;h=cb942ff345114d58680939725c8777cacf2d230b;hb=d865c4403fc91d1f1ac95ba76febcee9f429bb97;hp=b778f3f9dabe374c63a54b551b4e2bbf38d61669;hpb=a7a8d2f1c85c2d7760d4d3479e90466cc3a81b04;p=pdclib diff --git a/platform/example/functions/stdio/tmpfile.c b/platform/example/functions/stdio/tmpfile.c index b778f3f..cb942ff 100644 --- a/platform/example/functions/stdio/tmpfile.c +++ b/platform/example/functions/stdio/tmpfile.c @@ -1,5 +1,3 @@ -/* $Id$ */ - /* tmpfile( void ) This file is part of the Public Domain C Library (PDCLib). @@ -10,12 +8,12 @@ #ifndef REGTEST +#include "_PDCLIB_glue.h" + #include #include #include -#include <_PDCLIB_glue.h> - #include #include #include @@ -49,7 +47,7 @@ struct _PDCLIB_file_t * tmpfile( void ) generate the filename candidate, which is *also* platform-dependent. */ unsigned int random; - fscanf( randomsource, "%u", &random ); + fscanf( randomsource, "%u", &random ); sprintf( filename, "/tmp/%u.tmp", random ); /* Check if file of this name exists. Note that fopen() is a very weak check, which does not take e.g. access permissions into account @@ -88,10 +86,12 @@ struct _PDCLIB_file_t * tmpfile( void ) #endif #ifdef TEST -#include <_PDCLIB_test.h> + +#include "_PDCLIB_test.h" + #include -int main() +int main( void ) { FILE * fh; #ifndef REGTEST @@ -112,4 +112,3 @@ int main() } #endif -