getopt
[libbu (utility functions)]

Collaboration diagram for getopt:


Files

file  getopt.c
 Special re-entrant version of getopt.

Defines

#define BADCH   (int)'?'
#define EMSG   ""
#define tell(s)

Functions

int bu_getopt (int nargc, char *const nargv[], const char *ostr)
int bu_getopt (int nargc, char *const *nargv, const char *ostr)

Variables

int bu_opterr
int bu_optind
int bu_optopt
char * bu_optarg
int bu_opterr = 1
int bu_optind = 1
int bu_optopt = 0
char * bu_optarg = NULL

Define Documentation

#define BADCH   (int)'?'
 

Definition at line 59 of file getopt.c.

#define EMSG   ""
 

Definition at line 60 of file getopt.c.

Referenced by bu_getopt().

#define tell  ) 
 

Value:

if(bu_opterr)  { \
                fputs(*nargv,stderr);fputs(s,stderr); \
                fputc(bu_optopt,stderr);fputc('\n',stderr); \
        } return(BADCH);

Definition at line 61 of file getopt.c.

Referenced by bu_getopt().


Function Documentation

int bu_getopt int  nargc,
char *const   nargv[],
const char *  ostr
 

Referenced by dgo_E_cmd(), dgo_get_autoview_cmd(), wdb_binary_cmd(), wdb_bot_decimate_cmd(), wdb_comb_std_cmd(), wdb_facetize_cmd(), wdb_find_cmd(), wdb_ls_cmd(), wdb_push_cmd(), wdb_tops_cmd(), and wdb_tree_cmd().

int bu_getopt int  nargc,
char *const *  nargv,
const char *  ostr
 

B U _ G E T O P T

get option letter from argument vector

Definition at line 73 of file getopt.c.

References bu_optarg, bu_optind, bu_optopt, EMSG, NULL, and tell.


Variable Documentation

int bu_opterr
 

set to zero to suppress errors

Definition at line 54 of file getopt.c.

Referenced by wdb_binary_cmd(), and wdb_bot_decimate_cmd().

int bu_optind
 

index into parent argv vector

Definition at line 55 of file getopt.c.

Referenced by bu_getopt(), dgo_E_cmd(), dgo_get_autoview_cmd(), wdb_binary_cmd(), wdb_bot_decimate_cmd(), wdb_comb_std_cmd(), wdb_facetize_cmd(), wdb_find_cmd(), wdb_ls_cmd(), wdb_push_cmd(), wdb_tops_cmd(), and wdb_tree_cmd().

int bu_optopt
 

character checked for validity

Definition at line 56 of file getopt.c.

Referenced by bu_getopt().

char* bu_optarg
 

argument associated with option

Definition at line 57 of file getopt.c.

Referenced by bu_getopt(), dgo_E_cmd(), wdb_bot_decimate_cmd(), wdb_push_cmd(), and wdb_tree_cmd().

int bu_opterr = 1
 

set to zero to suppress errors

Definition at line 54 of file getopt.c.

Referenced by wdb_binary_cmd(), and wdb_bot_decimate_cmd().

int bu_optind = 1
 

index into parent argv vector

Definition at line 55 of file getopt.c.

Referenced by bu_getopt(), dgo_E_cmd(), dgo_get_autoview_cmd(), wdb_binary_cmd(), wdb_bot_decimate_cmd(), wdb_comb_std_cmd(), wdb_facetize_cmd(), wdb_find_cmd(), wdb_ls_cmd(), wdb_push_cmd(), wdb_tops_cmd(), and wdb_tree_cmd().

int bu_optopt = 0
 

character checked for validity

Definition at line 56 of file getopt.c.

Referenced by bu_getopt().

char* bu_optarg = NULL
 

argument associated with option

Definition at line 57 of file getopt.c.

Referenced by bu_getopt(), dgo_E_cmd(), wdb_bot_decimate_cmd(), wdb_push_cmd(), and wdb_tree_cmd().


Generated on Mon Sep 18 01:25:19 2006 for BRL-CAD by  doxygen 1.4.6