/* vi: set sw=4 ts=4: */
/*
* split - split a file into pieces
- * Copyright (c) 2007 Bernhard Fischer
+ * Copyright (c) 2007 Bernhard Reutner-Fischer
*
* Licensed under GPLv2 or later, see file LICENSE in this tarball for details.
*/
#if ENABLE_FEATURE_SPLIT_FANCY
{ "g", 1024*1024*1024 },
#endif
- { }
+ { "", 0 }
};
/* Increment the suffix part of the filename.
#define SPLIT_OPT_a (1<<2)
int split_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
-int split_main(int argc ATTRIBUTE_UNUSED, char **argv)
+int split_main(int argc UNUSED_PARAM, char **argv)
{
unsigned suffix_len = 2;
char *pfx;
}
while (1) {
- bytes_read = safe_read(0, read_buffer, READ_BUFFER_SIZE);
+ bytes_read = safe_read(STDIN_FILENO, read_buffer, READ_BUFFER_SIZE);
if (!bytes_read)
break;
if (bytes_read < 0)
}
}
- xwrite(1, src, to_write);
+ xwrite(STDOUT_FILENO, src, to_write);
bytes_read -= to_write;
src += to_write;
} while (bytes_read);