shithub: ft2play

ref: 1933d1c0d5a61983615cb3a1ddcafa50874a2989
dir: /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