120 lines
4.2 KiB
C
120 lines
4.2 KiB
C
/*---------------------------------------------------------------------------------*/
|
|
/* $RCSfile: demo0.c,v $ */
|
|
/*---------------------------------------------------------------------------------*/
|
|
/* $Revision: 1.1 $ */
|
|
/* $Name: $ */
|
|
/* $Date: 2003/01/20 00:18:09 $ */
|
|
/* $Author: agibert $ */
|
|
/*---------------------------------------------------------------------------------*/
|
|
|
|
/*---------------------------------------------------------------------------------*/
|
|
/* This file is part of LibVer */
|
|
/* */
|
|
/* LibVer is free software; you can redistribute it and/or modify */
|
|
/* it under the terms of the GNU General Public Licence as published by */
|
|
/* the Free Software Foundation; either version 2 of the License, or */
|
|
/* (at your option) any later version. */
|
|
/* */
|
|
/* LibVer is distributed in the hope that it will be useful, */
|
|
/* but WITHOUT ANY WARRANTY; without even the implied warranty of */
|
|
/* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */
|
|
/* GNU Lesser General Public License for more details. */
|
|
/* */
|
|
/* You should have received a copy of the GNU General Public License */
|
|
/* along with Foobar; if not, write to the Free Software */
|
|
/* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
|
|
/*---------------------------------------------------------------------------------*/
|
|
|
|
|
|
|
|
|
|
|
|
/*---------------------------------------------------------------------------------*/
|
|
/* Includes */
|
|
/*---------------------------------------------------------------------------------*/
|
|
|
|
#include <stdio.h>
|
|
#include <errno.h>
|
|
|
|
#ifdef _LIBVER_SUPPORT
|
|
# include <ver.h>
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/*---------------------------------------------------------------------------------*/
|
|
/* Constants */
|
|
/*---------------------------------------------------------------------------------*/
|
|
|
|
#ifdef _LIBVER_SUPPORT
|
|
VER_INFO_EXPORT( demo0, "$Revision: 1.1 $", "$Name: $", __FILE__, "$Author: agibert $")
|
|
# define USAGE "Usage : %s [ --help | --version [-v]]\n"
|
|
#else
|
|
# define USAGE "Usage : %s [ --help]\n"
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/*---------------------------------------------------------------------------------*/
|
|
/* Prototypes */
|
|
/*---------------------------------------------------------------------------------*/
|
|
|
|
extern void obj( void);
|
|
extern void slib( void);
|
|
extern void dlib( void);
|
|
|
|
int main( int, char **);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/*---------------------------------------------------------------------------------*/
|
|
/* */
|
|
/*---------------------------------------------------------------------------------*/
|
|
|
|
int main( int argc, char **argv)
|
|
{
|
|
/* Args Parsing */
|
|
|
|
if( argc >= 2)
|
|
{
|
|
if( !strcmp( argv[1], "--help"))
|
|
{
|
|
fprintf( stderr, USAGE, argv[0]);
|
|
return( 1);
|
|
}
|
|
#ifdef _LIBVER_SUPPORT
|
|
else if( !strcmp( argv[1], "--version"))
|
|
{
|
|
if( argc >= 3 && !strcmp( argv[2], "-v"))
|
|
{
|
|
return( VER_Object_Print( stdout, VERD_VERBOSE));
|
|
}
|
|
else
|
|
{
|
|
return( VER_Object_Print( stdout, VERD_MINIMAL));
|
|
}
|
|
}
|
|
#endif
|
|
}
|
|
|
|
printf( "demo0_main: Start !\n");
|
|
|
|
obj();
|
|
slib();
|
|
dlib();
|
|
|
|
printf( "demo0_main: End !\n");
|
|
}
|