#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); }