#include <exec/types.h>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <exec/libraries.h>
#include <exec/memory.h>
#include <dos/dos.h>
#include <dos/dostags.h>
#include <intuition/intuition.h>
#include <workbench/icon.h>
#include <workbench/startup.h>
#include <workbench/workbench.h>

/* Prototypes for system functions */
#include <clib/dos_protos.h>
#include <clib/exec_protos.h>
#include <clib/gadtools_protos.h>
#include <clib/graphics_protos.h>
#include <clib/icon_protos.h>
#include <clib/intuition_protos.h>
#include <clib/wb_protos.h>

/* Version number & dates */
#define TM_VERSION "1.2"
#define TM_CRYEAR "1991"
#define TM_DATE "13.01.1991"

/* Entry for tool list */
struct ToolNode {
                 struct Node tn_Node;
                 BPTR tn_DirLock;
                 char *tn_RealName;
                 struct AppMenuItem *tn_MenuItem;
                 ULONG tn_ID;
                };

/* Prototypes for library functions */
struct ToolNode *GetHead(struct List *);
struct ToolNode *GetSucc(struct ToolNode *);

/* Prototypes for program functions */
void startup(void);
void mainloop(void);
BOOL WBAddToolNode(struct WBArg *, int);
BOOL AddToolNode(BPTR, char *, char *);
void RemToolNode(struct ToolNode *tn);
void RemoveTools(void);
ULONG OpenStatusWindow(void);
void RefreshStatusWindow(void);
void DetachToolList(void);
void AttachToolList(void);
BOOL HandleWindowEvent(void);
void CloseStatusWindow(void);
void cleanup(int);

/* Global variables */
extern struct MsgPort *MyMP;
extern struct List ToolList;
extern UWORD ToolCount;
extern char ConfigName[];
