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:
10
src/util.c
10
src/util.c
@ -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;
|
||||
|
Reference in New Issue
Block a user