/*
 * OmniPlay, v0.98
 * by David Champion
 *
 * things everyone likes
 * 29 Aug 92
 */


#define PROGNAME	"oplay"

/** healthy macros **/
#define ABS(a)		((a)>=0?(a):-(a))
#define MAX(a, b)	((a)>(b)?(a):(b))
#define MIN(a, b)	((a)<(b)?(a):(b))
#define USERBREAK	(SetSignal(0L, SIGBREAKF_CTRL_C) & SIGBREAKF_CTRL_C)
#define shift		ac--; av++

/** conversion mode flags **/
#define CV_NONE	0	/* do nothing to data */
#define CV_FLIP	1<<0	/* unsign the data */
#define CV_ULAW	1<<1	/* ulaw decode */
#define CV_DOWN	1<<2	/* downshift from 16 bits to 8 */
#define CV_BEND	1<<3	/* data is big-endian */
#define	CV_LEND	1<<4	/* data is little-endian */

/** user-specified types **/
#define AUTO	0	/* figure out type */
#define RAWU	1<<0	/* force raw unsigned */
#define RAWS	1<<1	/* force raw signed */
#define RAWL	1<<2	/* force raw u-law */

/** misc **/
#define COL1	"\033[31m"
#define COL3	"\033[33m"

/** tmpfile() defines **/
/* path for tmpfiles */
#ifndef P_tmpdir
# define P_tmpdir	"t:"
#endif ~P_tmpdir

/* how many chars of commandname to include in tmpnam */
#define B_tmpnam	5

/* mx length of a filname */
#ifndef L_tmpnam
# define L_tmpnam 30
#endif
