#ifndef _VIEWTUBE_HELPERS_H
#define _VIEWTUBE_HELPERS_H

#if (DEBUG)
#include <stdio.h>
#define debug(fmt, ...) \
            do { if (DEBUG) fprintf(stderr, fmt, __VA_ARGS__); } while (0)
#else
#define debug(fmt, ...) \
            

#endif 

unsigned short ushort_min(unsigned short left, unsigned short right);
unsigned short ushort_max(unsigned short left, unsigned short right);
unsigned short decrease(unsigned short original, unsigned short interval, unsigned short bound);
unsigned short increase(unsigned short original, unsigned short interval, unsigned short bound);


#endif