/*
 * $Id$
 *
 * :ts=4
 *
 * COPYRIGHT:
 *
 *   Unless otherwise noted, all files are Copyright (c) 1999 Amiga, Inc.
 *   All rights reserved.
 *
 * DISCLAIMER:
 *
 *   This software is provided "as is". No representations or warranties
 *   are made with respect to the accuracy, reliability, performance,
 *   currentness, or operation of this software, and all use is at your
 *   own risk. Neither Amiga nor the authors assume any responsibility
 *   or liability whatsoever with respect to your use of this software.
 *
 */

#include <workbench/workbench.h>

#include <exec/libraries.h>

#include <clib/dos_protos.h>
#include <clib/wb_protos.h>

#include <pragmas/dos_pragmas.h>
#include <pragmas/wb_pragmas.h>

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

extern struct Library * DOSBase;
extern struct Library * WorkbenchBase;

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

int
main(int argc,char **argv)
{
	if(WorkbenchBase->lib_Version >= 44)
	{
		struct List * list = NULL;

		if(WorkbenchControl(NULL,
			WBCTRLA_GetOpenDrawerList,&list,
		TAG_DONE))
		{
			struct Node * node;

			for(node = list->lh_Head ;
			    node->ln_Succ != NULL ;
			    node = node->ln_Succ)
			{
				Printf("%s\n",node->ln_Name);
			}

			WorkbenchControl(NULL,
				WBCTRLA_FreeOpenDrawerList,list,
			TAG_DONE);
		}
	}

	return(0);
}
