
/******************************************************************************

    MODULE
	dev0.h

    DESCRIPTION
	standard short header for simple CLI commands

    HISTORY
	25-02-95 b_noll created

******************************************************************************/

#ifndef DEV0_H
#define DEV0_H

/**************************************
	    Includes
**************************************/

#ifndef   EXEC_LIBRARIES_H
# include <exec/libraries.h>
#endif /* EXEC_LIBRARIES_H */

#ifndef   CLIB_EXEC_PROTOS_H
# include <clib/exec_protos.h>
#endif /* CLIB_EXEC_PROTOS_H */

#ifndef   DOS_DOS_H
# include <dos/dos.h>
#endif /* DOS_DOS_H */

#ifndef   CLIB_DOS_PROTOS_H
# include <clib/dos_protos.h>
#endif /* CLIB_DOS_PROTOS_H */

#include <proto/dos.h>
#include <proto/exec.h>

/**************************************
	    Defines & Structures
**************************************/

/* ---- all following definitions are #ifdef'd, so they */
/*	might be redefined, if something changes ...	*/

/* ---- The header for c:version to recognize a program */

#ifndef VERSIONPREFIX
# define VERSIONPREFIX	 "\0$VER: "
# define VERSIONOFFSET	 0
#elif !defined( VERSIONOFFSET )
# define VERSIONOFFSET	 0
#endif
#define MK_VERSIONSTR(name,vers) (VERSIONPREFIX #name " " #vers " " __AMIGADATE__ + VERSIONOFFSET)

/* ---- My header to extract Templates from a binary */

#ifndef FORMATPREFIX
# define FORMATPREFIX	 "\0$ARG: "
# define FORMATOFFSET	 7
#elif !defined( FORMATOFFSET )
# define FORMATOFFSET (sizeof(FORMATPREFIX "" ) - 1)
#endif
#define MK_FORMATSTR(fmt) (FORMATPREFIX fmt "" + FORMATOFFSET)


/* ---- The only fix address in Amiga Operating System */
/*	(might be changed if Kickstart is ported)      */

#ifndef ABSEXECBASE
# define ABSEXECBASE ((struct ExecBase **)4L)
#endif


/* ---- BSTRs reserve the 1st char for strlen, so      */
/*	no BSTR can be longer than 1<<bitsinchar chars */

#ifndef MAXPATHLEN
# define MAXPATHLEN 256
#endif


/* ---- returnvalue of FGetC if at eof */

#ifndef EOF
# define EOF -1
#endif


/**************************************
	    Macros
**************************************/

/* ---- define a pointer to an aligned piece of the stack */

#define mk_Aligned(type,var)                   \
	    UBYTE _ ## var[sizeof (type) + 3]; \
	    type *var = (type *)(((ULONG)_ ## var + 3) & ~3);


/**************************************
	    Prototypes
**************************************/


#endif /* DEV0_H */

/******************************************************************************
*****  END dev0.h
******************************************************************************/

