extern void useage();
extern file_size_t * read_input_file();
extern file_size_t * splitter(file_size_t *input, const char *output,
- unsigned long long splitgroesse, int length);
+ unsigned long long splitgroesse);
int struct_array_length = 0;
unsigned long long split = 0;
int num = 1;
while (struct_array_length > 0) {
sprintf(outname, "%s%03d", output, num++);
- fs = splitter(fs, outname, split, struct_array_length);
+ fs = splitter(fs, outname, split);
}
free(fs);
}
file_size_t * splitter(file_size_t *input, const char *output,
- unsigned long long splitgroesse, int length)
+ unsigned long long splitgroesse)
{
file_size_t *rest = (file_size_t *)
- malloc(length * sizeof(file_size_t));
+ malloc(struct_array_length * sizeof(file_size_t));
file_size_t *disc = (file_size_t *)
- malloc(length * sizeof(file_size_t));
+ malloc(struct_array_length * sizeof(file_size_t));
unsigned long long filesize = 0;
int restcount = 0;
int disccount = 0;
- for (int i = 0; i < length; i++) {
+ for (int i = 0; i < struct_array_length; i++) {
// ISO9660 filesystem overhead
filesize = ceil(input[i].fsize / 2048.0) * 2048;
* @return Restlaenge des neuen Arrays
*/
file_size_t * splitter(file_size_t *input, const char *output,
- unsigned long long splitgroesse, int length);
+ unsigned long long splitgroesse);
#endif