#include <string.h>
#include <errno.h>
#include <unistd.h>
-#include <endian.h>
-#include <byteswap.h>
#if __BYTE_ORDER == __BIG_ENDIAN
#define STORE32_LE(X) bswap_32(X)
#define TRX_MAGIC 0x30524448 /* "HDR0" */
#define TRX_VERSION 1
-#define TRX_MAX_LEN 0x3A0000
+#define TRX_MAX_LEN 0x5A0000
#define TRX_NO_HEADER 1 /* Do not write TRX header */
struct trx_header {
void usage(void)
{
- fprintf(stderr, "Usage: trx [-o outfile] [-m maxlen] [-a align] [-b offset] file [file [file]]\n");
+ fprintf(stderr, "Usage: trx [-o outfile] [-m maxlen] [-a align] [-b offset] [-f file] [-f file [-f file]]\n");
exit(EXIT_FAILURE);
}
in = NULL;
i = 0;
- while ((c = getopt(argc, argv, "-:o:m:a:b:")) != -1) {
+ while ((c = getopt(argc, argv, "-:o:m:a:b:f:")) != -1) {
switch (c) {
+ case 'f':
case 1:
p->offsets[i++] = STORE32_LE(cur_len);