2 * Copyright 2013 Ecole Normale Superieure
4 * Use of this software is governed by the MIT license
6 * Written by Sven Verdoolaege,
7 * Ecole Normale Superieure, 45 rue d’Ulm, 75230 Paris, France
14 /* Copy the contents of "input" from offset "start" to "end" to "output".
16 void copy(FILE *input
, FILE *output
, long start
, long end
)
22 fseek(input
, 0, SEEK_END
);
26 fseek(input
, start
, SEEK_SET
);
32 n
= fread(buffer
, 1, n
, input
);
34 m
= fwrite(buffer
, 1, n
, output
);