/* 
**
** File name: public.h
**
**
*/

#ifndef _PPS_PUBLIC__H
#define _PPS_PUBLIC__H

#include <sys/types.h>

#ifndef _T_BYTE
#define _T_BYTE
typedef unsigned char    BYTE;
#endif

#ifndef _T_WORD
#define _T_WORD
typedef unsigned short    WORD;
#endif

#ifndef _T_DWORD
#define _T_DWORD
typedef unsigned int    DWORD;
#endif

#ifndef _T_BOOL
#define _T_BOOL
typedef int  BOOL;
#endif

#ifndef NORMAL
#define NORMAL        (1)
#endif

#ifndef ABNORMAL
#define ABNORMAL       (-1)
#endif

#ifndef STANDBY
#define STANDBY       (0)
#endif

#ifndef SUCCESS        
#define SUCCESS       (0)
#endif

#ifndef FAILURE        
#define FAILURE      (-1)
#endif

//#ifndef OVERFLOW        
//#define OVERFLOW      (-1)
//#endif

#ifndef TRUE        
#define TRUE        (1)
#endif

#ifndef FALSE        
#define FALSE       (0)
#endif

#ifndef YES
#define YES        (1)
#endif

#ifndef NO
#define NO        (0)
#endif

#ifndef LED_ON  
#define LED_ON    (1)
#endif

#ifndef LED_OFF
#define LED_OFF   (0)
#endif

#ifndef ERROR        
#define ERROR      (-1)
#endif

#ifndef EMPTY
#define EMPTY      (0)
#endif

//#define BUFSIZE    8196

//#define MAXBUFLEN    8196
//#define MAXLINE      4096    

typedef enum _number_type {
	T_BIN, T_OCT, T_DEC, T_HEX
} _number_type;


#define MAX(a, b) ((a) > (b) ? (a) : (b))
#define MIN(a, b) ((a) < (b) ? (a) : (b))

#endif  /* PUBLIC__H */ 
