45 "Usage: m2gmetis [options] <meshfile> <graphfile>",
47 " Required parameters",
48 " meshfile Stores the input mesh.",
49 " graphfile The filename of the output graph.",
51 " Optional parameters",
53 " Specifies the graph that will be generated.",
54 " The possible values are:",
55 " dual - Generate dual graph of the mesh [default]",
56 " nodal - Generate the nodal graph of the mesh",
58 " -ncommon=int [applies when gtype=dual]",
59 " Specifies the common number of nodes that two elements must have",
60 " in order to put an edge between them in the dual graph. Default is 1.",
63 " Selects the dbglvl.",
66 " Prints this message.",
72 " Usage: m2gmetis [options] <meshfile> <graphfile>",
73 " use 'm2gmetis -help' for a summary of the options.",
89 memset((
void *)params, 0,
sizeof(
params_t));
116 errexit(
"The -ncommon option should specify a number >= 1.\n");
124 for (i=0; strlen(
helpstr[i]) > 0; i++)
130 errexit(
"Illegal command-line option(s)\n" 131 "Use %s -help for a summary of the options.\n", argv[0]);
136 printf(
"Missing parameters.");
The structure that stores the information about the command-line options.
void errexit(char *f_str,...)
int gk_optind
Index in ARGV of the next element to be scanned.
static char shorthelpstr[][100]
#define gk_clearcputimer(tmr)
static SmartStereoProjectionParams params
char * gk_strdup(char *orgstr)
Duplicates a string.
char * gk_optarg
For communication arguments to the caller.
static gk_StringMap_t gtype_options[]
void * gk_malloc(size_t nbytes, char *msg)
Annotation for function names.
int gk_GetStringID(gk_StringMap_t *strmap, char *key)
params_t * parse_cmdline(int argc, char *argv[])
static char helpstr[][100]
static struct gk_option long_options[]
int gk_getopt_long_only(int argc, char **argv, char *options, struct gk_option *long_options, int *opt_index)
Parse command-line arguments with only long options.