blob: b3818c9dc5797dae8a38dda226fc394f7428d512 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
#include "config.h"
int align_size(int s, int a) {
return (s + (a - 1)) & -a;
}
void pad_file(int size, FILE* outfile) {
const char n = 0;
int as = align_size(size, allocation_default_alignment);
int i = as - size;
for (; i; i--)
fwrite(&n, 1, 1, outfile);
}
|