Implement Writer for file contents.

Some aspects, such as better reporting of file bigger or smaller than 
expected is needed, but all situations are handled propertly.
This commit is contained in:
Vreixo Formoso
2007-12-20 22:17:18 +01:00
parent 449ed65fe9
commit 2f383215ff
7 changed files with 238 additions and 51 deletions

View File

@ -18,16 +18,6 @@
#include <ctype.h>
#include <stdio.h>
int div_up(int n, int div)
{
return (n + div - 1) / div;
}
int round_up(int n, int mul)
{
return div_up(n, mul) * mul;
}
int int_pow(int base, int power)
{
int result = 1;