This repository has been archived on 2024-12-16. You can view files and clone it, but cannot push or open issues or pull requests.
CodeBlocksPortable/WATCOM/samples/clibexam/_grow_ha.c

21 lines
407 B
C

#include <stdio.h>
FILE *fp[ 50 ];
void main()
{
int hndl_count;
int i;
hndl_count = _NFILES;
if( hndl_count < 50 ) {
hndl_count = _grow_handles( 50 );
}
for( i = 0; i < hndl_count; i++ ) {
fp[ i ] = tmpfile();
if( fp[ i ] == NULL ) break;
printf( "File %d successfully opened\n", i );
}
printf( "%d files were successfully opened\n", i );
}