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

Source code for RExpand (which is Copyright ©1996 Peter Liljenberg)

Version 1.0
Author: Peter Liljenberg, 1996.

This code is fully Public Domain: you can use it in any way you want as
long as you don't violate the copyright of the _program_ RExpand. This
means that you can use the code for inspiration, for help or as an example;
and you can even cut code out and include it in your own programs, as long
as you don't make a program which, basicly, is RExpand and release it. You
can make modifications or add features to RExpand for your own use (and
maybe some friends' as well), but I'd be grateful if you would send me the
modified code so I can make a new version with this stuff added. You will
get due credit for the changes. In the same way, I expect to get a mention
in the docs if you make a program with any help of this code.

If this code in any way cause damage or loss of data, I'm not responsible;
you are.

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

#include <exec/types.h>
#include <exec/ports.h>
#include <exec/memory.h>
#include <exec/lists.h>
#include <dos/dos.h>
#include <dos/rdargs.h>
#include <intuition/intuition.h>
#include <intuition/gadgetclass.h>
#include <libraries/gadtools.h>
#include <rexx/storage.h>
#include <workbench/startup.h>
#include <workbench/workbench.h>
#include <clib/exec_protos.h>
#include <clib/dos_protos.h>
#include <clib/intuition_protos.h>
#include <clib/graphics_protos.h>
#include <clib/gadtools_protos.h>
#include <clib/rexxsyslib_protos.h>
#include <clib/icon_protos.h>
#include <clib/alib_protos.h>
#include <string.h>
#include <stdio.h>
#include <ctype.h>
#include <stdarg.h>

/* Default dir */
#define DEFDATADIR		"PROGDIR:Data/"

/* CLI Argument template */
#define CLI_TEMPLATE	"PORTNAME/K,FILES/M,DATADIR/K,NODEF=NODEFFILES/S"
#define CLI_ARG_PORTNAME	0
#define CLI_ARG_FILES		1
#define CLI_ARG_DATADIR		2
#define CLI_ARG_NODEFFILES	3
#define CLI_ARG_SIZE		4

/* ARexx command template*/
#define RXC_TEMPLATE	"EXPAND/K,VAR/K,STEM/K,FILES/K/M,"	\
						"ADD/S,REMOVE/S,ONLY/S,DATADIR/K,"	\
						"REQUESTER/S,REQTITLE/K,REQSCREEN/K," \
						"TO/K,ALL/S,QUIT/S"
#define RXC_ARG_EXPAND		0
#define RXC_ARG_VAR			1
#define RXC_ARG_STEM		2
#define RXC_ARG_FILES		3
#define RXC_ARG_ADD			4
#define RXC_ARG_REMOVE		5
#define RXC_ARG_ONLY		6
#define RXC_ARG_DATADIR		7
#define RXC_ARG_REQUESTER	8
#define RXC_ARG_REQTITLE	9
#define RXC_ARG_REQSCREEN	10
#define RXC_ARG_TO			11
#define RXC_ARG_ALL			12
#define RXC_ARG_QUIT		13
#define RXC_ARG_SIZE		14


extern BPTR				DataDir;
extern struct List		DataFiles;
extern BOOL				NoDefFiles;
extern struct RDArgs	*Rxc;
extern struct RexxMsg	*Rexxmsg;
extern struct List		ReqList;
extern LONG				listitems;

BPTR DDLock(STRPTR filename, BPTR datadir);
