#include <import.h>
#include <device.h>

#include <export.h>

/*
 * Kurzes Programm zum Ausgeben der zur Verfgung stehenden
 * Schnittstellen und der mglichen Geschwindigkeiten:
 */
GLOBAL WORD main( VOID )
{
	DEV_LIST	*ports, *walk;
	LONG		*speeds;
	
	if( (ports=InitDevices( NULL, NULL ))==NULL )
		return( FAILURE );
	
	walk = ports;
	while( walk )
	{
		if( OpenDevice( walk ) )
		{
			speeds = GetSpeedList( walk );
			
			printf( "\nPort: %s (curr. DTE: %ld)", walk->name, walk->curr_dte );
			printf( "\nAvailable DTE speeds:" );
			while( *speeds>=0 )
				printf( "\n                      %ld", *speeds++ );
			
			CloseDevice( walk );
			
			printf( "\n\n                             ... [RETURN] to continue" );
			getchar( );
		}
		
		
		walk = walk->next;
	}
	
	TermDevices( );
	
	return( SUCCESS );
}

