shithub: ft2play

ref: 9f77a97152139c86ed8c86e8aa45060084314c66
dir: ft2play/common.h

View raw version
#ifdef __plan9__
#include <u.h>
#include <libc.h>
#include <stdio.h>
typedef s64int int64_t;
typedef u32int uint32_t;
typedef s32int int32_t;
typedef u16int uint16_t;
typedef s16int int16_t;
typedef u8int uint8_t;
typedef s8int int8_t;
typedef ulong size_t;
typedef enum { false, true } bool;
#define lockMixer()
#define unlockMixer()
#define openMixer(f,s) true
#define closeMixer()
static double
round(double d)
{
	double f = modf(d, &d);
	if(f == 0.0 || d == 0.0)
		return d;
	return d > 0 ? d+1 : d-1;
}
#else
#include <assert.h>
#include <math.h>
#include <stdbool.h>
#include <stdint.h>
#include <stdlib.h>
#include <string.h>
#include <stdio.h>
#define USED(x) (void)x
#endif