X-Git-Url: https://arthur.barton.de/cgi-bin/gitweb.cgi?p=ngircd-alex.git;a=blobdiff_plain;f=src%2Fportab%2Fportabtest.c;h=457410ca956de4646beb079a91bf297db943c379;hp=29ea7f60a52bdfc6cf37edca5eee45cd7b185630;hb=f0d633b5ac8dbf1cef26778bd0f3b2cf1b2242f3;hpb=d18ca0b85d3a7ff429fb4dfd5a60ce4e84ac67e4 diff --git a/src/portab/portabtest.c b/src/portab/portabtest.c index 29ea7f60..457410ca 100644 --- a/src/portab/portabtest.c +++ b/src/portab/portabtest.c @@ -2,59 +2,41 @@ * ngIRCd -- The Next Generation IRC Daemon * Copyright (c)2001,2002 by Alexander Barton (alex@barton.de) * - * Dieses Programm ist freie Software. Sie koennen es unter den Bedingungen - * der GNU General Public License (GPL), wie von der Free Software Foundation - * herausgegeben, weitergeben und/oder modifizieren, entweder unter Version 2 - * der Lizenz oder (wenn Sie es wuenschen) jeder spaeteren Version. - * Naehere Informationen entnehmen Sie bitter der Datei COPYING. Eine Liste - * der an ngIRCd beteiligten Autoren finden Sie in der Datei AUTHORS. + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * Please read the file COPYING, README and AUTHORS for more information. * - * $Id: portabtest.c,v 1.1 2002/03/12 14:36:44 alex Exp $ - * - * portabtest.c: Testprogramm fuer portab.h + * test program for portab.h and friends ;-) */ #include "portab.h" +static char UNUSED id[] = "$Id: portabtest.c,v 1.9 2002/12/12 11:38:46 alex Exp $"; + #include "imp.h" #include #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: "P_OSNAME"/"P_ARCHNAME ); - - 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 */