X-Git-Url: https://arthur.barton.de/cgi-bin/gitweb.cgi?p=ngircd-alex.git;a=blobdiff_plain;f=src%2Fportab%2Fportabtest.c;h=d7e8d8146be58a56326d89489c3833df9ebde094;hp=8c3c44b4a09b0fe80500e104f6b244efe6a50051;hb=e553829a59f2f39b1cd6b0fdf559cdc5045abc9f;hpb=7049b60af48382ce5f4623d32c5fca6d0c9f4fc5 diff --git a/src/portab/portabtest.c b/src/portab/portabtest.c index 8c3c44b4..d7e8d814 100644 --- a/src/portab/portabtest.c +++ b/src/portab/portabtest.c @@ -9,7 +9,7 @@ * Naehere Informationen entnehmen Sie bitter der Datei COPYING. Eine Liste * der an ngIRCd beteiligten Autoren finden Sie in der Datei AUTHORS. * - * $Id: portabtest.c,v 1.2 2002/03/12 15:19:12 alex Exp $ + * $Id: portabtest.c,v 1.8 2002/09/09 10:05:10 alex Exp $ * * portabtest.c: Testprogramm fuer portab.h */ @@ -23,38 +23,21 @@ #include "exp.h" -LOCAL BOOLEAN portab_check_types( VOID ); - - -GLOBAL INT main( VOID ) -{ - INT ret = 0; - - printf( "- datatypes: "); - if( ! portab_check_types( )) - { - puts( "FAILED!" ); - ret = 1; - } - else puts( "ok." ); - - puts( "- system type: "TARGET_OS"/"TARGET_CPU ); - - return ret; -} /* main */ - - -LOCAL BOOLEAN portab_check_types( VOID ) +GLOBAL int +main( VOID ) { - if( FALSE != 0 ) return 0; - if( TRUE != 1 ) return 0; - if( sizeof( INT8 ) != 1 ) return 0; - if( sizeof( UINT8 ) != 1 ) return 0; - if( sizeof( INT16 ) != 2 ) return 0; - if( sizeof( UINT16 ) != 2 ) return 0; - if( sizeof( INT32 ) != 4 ) return 0; - if( sizeof( UINT32 ) != 4 ) return 0; - return 1; + /* Datentypen pruefen */ + if( FALSE != 0 ) return 1; + if( TRUE != 1 ) return 1; + if( sizeof( INT8 ) != 1 ) return 1; + if( sizeof( UINT8 ) != 1 ) return 1; + if( sizeof( INT16 ) != 2 ) return 1; + if( sizeof( UINT16 ) != 2 ) return 1; + if( sizeof( INT32 ) != 4 ) return 1; + if( sizeof( UINT32 ) != 4 ) return 1; + + /* kein Fehler */ + return 0; } /* portab_check_types */