File:  [Local Repository] / templates / template.c
Revision 1.1.1.1 (vendor branch): download - view: text, annotated - select for diffs
Thu Feb 24 15:05:27 2011 UTC (13 years, 10 months ago) by nick
Branches: v1_0, MAIN
CVS tags: templates, HEAD
Initial template import

/* *****************************************************************************
 * 
 *    Copyright Nicholas DeClario 2010
 *    Nicholas DeClario <nick@demandred.dyndns.org>
 *    June 2009
 * 	$Id: template.c,v 1.1.1.1 2011/02/24 15:05:27 nick Exp $
 * 
 * ****************************************************************************/
#include <ctype.h>
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <time.h>
#include <sys/types.h>

/*
 *  Static Defines 
 */
#define VERSION "$Id: template.c,v 1.1.1.1 2011/02/24 15:05:27 nick Exp $"

/*
 *  Structures 
 */
typedef struct {
	int help;
} optsObj;

/* 
 *  Function prototypes 
 */
optsObj fetchOptions( int argc, char **argv );
void dispHelp( void );

/*
 *  Variable declarations
 */
optsObj opts;


/* ****************************************************************************
 * 
 *  opts = fetchOptions( argc, argv );
 * 
 *       Grab our command line arguments and toss them in to optsObj struct
 * 
 * ***************************************************************************/
optsObj fetchOptions( int argc, char **argv ) {
	optsObj obj;
	int c;

	while( ( c = getopt ( argc, argv, "h:" ) ) != -1 )
		switch( c ) {	
			case 'h':
				opts.help = 1;
				dispHelp( );
				break;
			default:
				dispHelp( );
		}

	return obj;
}

/* ****************************************************************************
 * 
 * Display the default help screen
 * 
 * ***************************************************************************/
void dispHelp( void ) {
	fprintf( stderr, "Usage ...\n" );
	exit( 2 );
}

/* ****************************************************************************
 *
 *  Our main program starts here
 *  
 * ***************************************************************************/
int main( int argc, char **argv ) {
	opts = fetchOptions( argc, argv );	

	return EXIT_SUCCESS;
}



FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>