#ifndef WOFF2_BUFFER_H_
#define WOFF2_BUFFER_H_
#if defined(_WIN32)
#include <stdlib.h>
typedef signed char int8_t;
typedef unsigned char uint8_t;
typedef short int16_t;
typedef unsigned short uint16_t;
typedef int int32_t;
typedef unsigned int uint32_t;
typedef __int64 int64_t;
typedef unsigned __int64 uint64_t;
#define ntohl …
#define ntohs …
#define htonl …
#define htons …
#else
#include <arpa/inet.h>
#include <stdint.h>
#endif
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <limits>
namespace woff2 {
#if defined(_MSC_VER) || !defined(FONT_COMPRESSION_DEBUG)
#define FONT_COMPRESSION_FAILURE() …
#else
#define FONT_COMPRESSION_FAILURE …
inline bool Failure(const char *f, int l, const char *fn) {
fprintf(stderr, "ERROR at %s:%d (%s)\n", f, l, fn);
fflush(stderr);
return false;
}
#endif
class Buffer { … };
}
#endif