/*      ctypes.c                           22.11.93       */
/*
/  --------------------------------------------------------
/  COPYRIGHT (C) 1992: ATLAS ELEKTRONIK GMBH, D-2800 BREMEN
/  --------------------------------------------------------
/
/  HIER/SACHN: P: GE 6028 P 206 QE
/  BENENNUNG : __________________________________________________
/  ERSTELLER : BRAUN               :SAS 3
/  FREIGABE  :
/  AEND/STAND: 22.11.93
/  PRUEFVERM.:
/
/
/  SCHNITTSTELLE UND AUFGABENBESCHREIBUNG:
/  ---------------------------------------
/    transmitter for ethernet connection via xdr protocol
/
/  SPRACHE: C
/  
/  NAME UND STRUKTUR DER EINGABEPARAMETER:
/
/
/  NAME UND STRUKTUR DER AUSGABEPARAMETER:
/ 
/
/  AUFGABENBESCHREIBUNG:
/
*/


/* include files */

#include "standard.h"
#include "endian2.h"
#include "fl_doub.h"

int main(int argc, char *argv[])
{
typedef enum
{
	EINS,
	ZWEI,
	DREI,
} Enum;

	printf ("\n program ctypes - m. braun - 22.11.02 \n");

	printf (" show the size of some c data types \n\n");

#if (UNIX)
	system ("uname -a");
	printf ("\n");
#endif

/* determine big or little endian */
	printf ("platform type is ");
	if (get_endian_type() == BigEndian)
		 printf ("big endian\n\n");
	else printf ("little endian\n\n");

/* print sizes */
	printf (" sizeof (char     ) = %d \n", sizeof (char     ));
	printf (" sizeof (short    ) = %d \n", sizeof (short    ));
	printf (" sizeof (int      ) = %d \n", sizeof (int	    ));
	printf (" sizeof (long     ) = %d \n", sizeof (long     ));
	printf (" sizeof (size_t   ) = %d \n", sizeof (size_t   ));
	printf (" sizeof (Enum     ) = %d \n", sizeof (Enum     ));
	printf (" sizeof (bool     ) = %d \n", sizeof (bool     ));
	printf (" sizeof (float    ) = %d \n", sizeof (float    ));
	printf (" sizeof (double   ) = %d \n", sizeof (double   ));
#if (OPSYS_IS_UNIX)
	printf (" sizeof (long long) = %d \n", sizeof (long long));
#endif

	printf ("\n");

	printf (" (short)(0x1234)     = 0x%04x \n",	(short)0x1234);
	printf ("  htons (0x1234)     = 0x%04x \n", htons (0x1234));
	printf (" (long) (0x12345678) = 0x%08x \n",	(long) 0x12345678);
	printf ("  htonl (0x12345678) = 0x%08x \n", htonl (0x12345678));

	printf ("\n");

	show_float_and_double(M_PI);
	
	printf ("\n");	

	exit (0);
	return (0);
}  /* main */

