The input will be a (di)graph. (See the preamble for information on how the graph should be input and its format.)
These output files should have the file names block.i,
where i is an index, from 0 up to the number of blocks - 1.
So for example, if there where 4 blocks you would create the files:
block.0
block.1
block.2
block.3
#include < stdio.h > | ||||||||||||||
FILE *fhandle | ||||||||||||||
int get_handle(char *filename) | ||||||||||||||
{ | ||||||||||||||
| ||||||||||||||
} | ||||||||||||||
int write_block() | ||||||||||||||
{
| ||||||||||||||
} |
Note that this code is only meant to be illustrative. Using exit() on error is probably better (try man 3 exit).