/*-- Rev Header - do NOT edit!
 *
 *  Filename : ShowRequest.c
 *  Purpose  : Hilfsroutine zum Anzeigen von einem Requester
 *
 *  Program  : -
 *  Author   : Gerhard Müller
 *  Copyright: (c) by Gerhard Müller
 *  Creation : Fri Sep 10 00:41:01 1993
 *
 *  compile  : makefile
 *
 *  Compile version  : 0.1
 *  Ext. Version     : 0.1
 *
 *  REVISION HISTORY
 *
 *  Date                     Comment
 *  ------------------------ -------------------------------------------------
 *  Fri Sep 17 01:02:09 1993 Taken from another source-Text, I don't remeber
 *                           where, sigh...
 *
 *
 *
 *-- REV_END --
 */

	/*
	 * C-Includes, C-Definitionen
	 *
	 */

#include <exec/types.h>
#include <intuition/classusr.h>
#include <intuition/intuition.h>
#include <dos/dos.h>
#include <inline/stubs.h>
#include <stdarg.h>
#ifdef __OPTIMIZE__
#include <inline/exec.h>
#include <inline/dos.h>
#include <inline/intuition.h>
#else
#include <clib/exec_protos.h>
#include <clib/dos_protos.h>
#include <clib/intuition_protos.h>
#endif

#include "add.h"

	/* ShowRequest(struct Window *window,UBYTE *Title,UBYTE *Text,UBYTE *Gadgets,...)
	 *
	 *	Display an Intuition EasyRequest.
	 */

ULONG
ShowRequest(struct Window *window,UBYTE *Title,UBYTE *Text,UBYTE *Gadgets,...)
{
	struct EasyStruct	Easy;
	BOOL				Result;
	ULONG				IDCMP = NULL;
	va_list	 			VarArgs;

		/* Initialize the EasyStruct structure with default values. */

	Easy . es_StructSize	= sizeof(struct EasyStruct);
	Easy . es_Flags			= NULL;
	Easy . es_Title			= (UBYTE *)Title;
	Easy . es_TextFormat	= (UBYTE *)Text;
	Easy . es_GadgetFormat	= (UBYTE *)Gadgets;

		/* Pick up the arguments passed to this routine and
		 * put up the requester.
		 */

	va_start(VarArgs,Gadgets);
	Result = EasyRequestArgs(window,&Easy,&IDCMP,VarArgs);
	va_end(VarArgs);

		/* Return the result. */

	return(Result);
}
