mirror of
https://github.com/vasi/pixz
synced 2024-11-18 15:26:46 +00:00
20 lines
352 B
C
20 lines
352 B
C
#include "pixz.h"
|
|
|
|
#include <stdarg.h>
|
|
|
|
void pixz_die(const char *fmt, ...) {
|
|
va_list args;
|
|
va_start(args, fmt);
|
|
vfprintf(stderr, fmt, args);
|
|
fflush(stderr);
|
|
va_end(args);
|
|
exit(1);
|
|
}
|
|
|
|
// FIXME: Portability
|
|
#include <libkern/OSByteOrder.h>
|
|
|
|
void pixz_offset_write(uint64_t n, uint8_t *buf) {
|
|
OSWriteLittleInt64(buf, 0, n);
|
|
}
|