GLAST/LAT > DAQ and FSW > FSW > Doxygen Index > QCFG / V0-0-1

Constituent: qcfg     Tag: linux-gcc


Interface   Data Structures   File List   Data Fields   Globals  

args.c File Reference

Simple functions to handle command line arguments. More...

#include "RIM/lrd.h"
#include "args_p.h"
#include <string.h>
#include <stdio.h>
#include <stdlib.h>

Include dependency graph for args.c:


Functions

unsigned input_count (int argc, char **argv)
 Count the number of input files.
void input_collect (int argc, char **argv, char **list)
 Set the elements of the list array to be pointers to NULL terminated filenames.
char * output_collect (int argc, char **argv)
 Locate the output stub string in the command line arguments.
unsigned verbose_collect (int argc, char **argv)
 Check the command line arguments for the verbose flag.
unsigned filter_collect (int argc, char **argv)
 If a filter argument is present on the command line use it to construct a bit mask of components to write out.
unsigned get_bit (char *type)
 Lookup the type and return a one-bit bit mask with the corresponding bit set.

Detailed Description

Simple functions to handle command line arguments.

Author:
James Swain -- jswain@slac.stanford.edu

Function Documentation

unsigned filter_collect int  argc,
char **  argv
 

If a filter argument is present on the command line use it to construct a bit mask of components to write out.

Parameters:
argc Number of command line arguments
argv Array of command line arguments
Returns:
A bit mask of the components to write out

unsigned get_bit char *  type  ) 
 

Lookup the type and return a one-bit bit mask with the corresponding bit set.

Parameters:
type NULL terminated LATC type name
Returns:
Bit mask with the bit corresponding to type set.

void input_collect int  argc,
char **  argv,
char **  list
 

Set the elements of the list array to be pointers to NULL terminated filenames.

Parameters:
argc Number of command line arguments
argv Array of command line arguments
list Array of pointers to the filenames

unsigned input_count int  argc,
char **  argv
 

Count the number of input files.

Parameters:
argc Number of command line arguments
argv Array of command line arguments
Returns:
Number of comma separated filenames in the input argument

char* output_collect int  argc,
char **  argv
 

Locate the output stub string in the command line arguments.

Parameters:
argc Number of command line arguments
argv Array of command line arguments
Returns:
Pointer to the output stub string

unsigned verbose_collect int  argc,
char **  argv
 

Check the command line arguments for the verbose flag.

Parameters:
argc Number of command line arguments
argv Array of command line arguments
Return values:
0 If -v is not one of the command line arguments
1 If -v is one of the command line arguments


Generated on Fri Apr 14 00:28:59 2006 by  doxygen 1.4.4