#include <exec/types.h>


#define RAWARROW 501
#define UPARROW 300
#define DOWNARROW 400
#define LEFTARROW 500
#define RIGHTARROW 600
#define HISTORY 999
#define MAXHIST 20
#define MAXFLAGFILES 50

/********************** the defines.h file *****************/
#define SUCCESS 0
#define PRIVATE 10
#define FAILURE 1
#define NOTALLOWED 1
#define ABORT    -2
#define GadgetList1 Gadget1

#ifndef FOREVER
#	define FOREVER for(;;)
#endif  FOREVER

#undef TRUE
#undef FALSE

#define FALSE 0
#define TRUE  1

#define SYSOP_LOGON   1
#define LOCAL_LOGON   2
#define REMOTE_LOGON  3
#define RE_LOGON      4
#define SUSPEND_LOGON 5

#define OFFLINETOOLS	100

#define STANDARD_LOGOFF	1
#define SLEEP_LOGOFF	2
#define OVERTIME_LOGOFF	3
#define CARRIER_LOGOFF	4
#define ILLEGAL_LOGOFF	5

#define WAIT     600
#define NOWAIT   FALSE
#define YES      TRUE
#define NO       FALSE
#define ECHO     TRUE
#define NOECHO   FALSE
#define CSI      0x9B

extern  int timeout, car_lost;
extern  BYTE ANSI,SYSOP;

#define IOFLAG_FIL_IN	0
#define IOFLAG_KBD_IN	1
#define IOFLAG_SER_IN	2
#define IOFLAG_FIL_OUT	3
#define IOFLAG_PRT_OUT	4
#define IOFLAG_SCR_OUT	5
#define IOFLAG_SER_OUT	6

#define TIMEOUT      -9  // -3
#define NO_CARRIER   -10 // -4
#define GOODBYE      -2  // -7

#define BaseOff      0
#define BaseBoth     1
#define BaseDownload 2
#define BaseUpload   3

#define Public 1
#define Sysop -1
#define UnVal -2

#define A 1
#define B 2
#define C 3

#define Normal_Send_Receive   1
#define Ano_Send              2
#define Ano_Receive           3
#define Ano_Send_Receive      4

#define SCAN                  1
#define VERBOSE               2
#define QUICK                 3
#define NORMAL                4


#define  rp          window->RastPort
#define  RN          0L
#define raster abortwindow->RPort
#define drw icon->RPort

#define PRIVATE_MSG     0
#define PUBLIC_MSG      1
#define PASSWORD_MSG    2
#define MUSTREAD_MSG    3

#define NO_SECRET       0
#define SECRET          1

#define FEEDBACK        0
#define NORMAL_MESSAGE  1
#define REPLY           2
#define REPLYPRIVATE    10
#define PERSONAL      1
#define PRIORITY      5

#define GOT           0
#define WROTE         1
#define BOTH          2

extern struct Iconify Icon;
extern struct Editor Ed;
extern long Global_TimeStorage,Selected_FileSize,Selected_Bytes;
extern long Time_connect, Time_system, Time_menu_entry, Time_remaining;
extern long Time_limit, Bytes_Xfered, Xfer_Time, Xfer_Throughput, Xfer_Speed;
extern BYTE IconShow;

#define OK_FILE     1
#define INCOMPLETE  2
#define ABORTED     3

#define UP 1
#define DOWN 2
#define LEFT 3
#define RIGT 4
#define S_UP 5
#define S_DOWN 6
#define S_LEFT 7
#define S_RIGT 8




// long UserBits;               32 bits of toggle info for the user

#define B_EXPERT         (1<<0)  // Expert Mode On/Off
#define B_ANSI           (1<<1)  // Ansi        On/Off
#define B_MSGSTATS       (1<<2)  // Msg Info    On/Off
#define B_TIMEBAR        (1<<3)  // Time Bar    On/Off
#define B_BLANKLINE      (1<<4)  // Not USed?
#define B_REJOIN         (1<<5)  // Last in Msg or File Area (On=File Area)
#define B_INTERNAL_ED    (1<<6)  // Internal / Full Screen Editors
#define B_CHECK_EMAIL    (1<<7)  // Auot Email Check On/oFf
#define B_FSCAN          (1<<8)  // File Scan direction
#define B_NEWUSERF       (1<<9)  // 0=Normal User, 1=NEW
#define B_SCRCLEAR       (1<<10) // 0=No , 1=Yes Screen Clear
#define B_PRESERVE       (1<<11) // 0=OK to delete, 1=Preserve
#define B_KEEPFLAGFILES  (1<<12) // Keep FlaggedFiles after logoff
#define B_ANNOUNCEUSERS  (1<<13) // Whether BBS Annouces other user's login/logoff
//#define                (1<<14)
//#define                (1<<15)
//#define                (1<<16)
//#define                (1<<17)
//#define                (1<<18)
//#define                (1<<19)
//#define                (1<<20)
//#define                (1<<21)
//#define                (1<<22)
//#define                (1<<23)
//#define                (1<<24)
//#define                (1<<25)
//#define                (1<<26)
//#define                (1<<27)
//#define                (1<<28)
//#define                (1<<29)
//#define                (1<<30)
//#define                (1<<31)


// Catalog Bit Flags

#define C_ACTIVE   (1<<0) // Active File Yes/No
#define C_FREE     (1<<1) // Free File   Yes/No
#define C_EXTDESC  (1<<2) // Extended Description Yes/No
#define C_DLOCK    (1<<3) // Deletion Protection (On=Protected)
#define C_ELOCK    (1<<4) // Editable Protection (On=Protected)
#define C_HDSTATUS (1<<5) // (On=Offline File)
#define C_ARCTEST  (1<<6) // Archive Tested
//#define C_       (1<<7)
