39 int& nopt=(
int&) _nopt;
43 if (strlen(sp_options))
45 size_t string_size = (strlen(sp_options)+5)*
sizeof(
char);
47 p = (
char *) malloc(string_size);
55 ptmp = strtok(NULL,
" ");
68 strcpy(a[nopt++],ptmp);
73 ptmp = strtok(NULL,
" ");
77 strcpy(a[nopt++],ptmp);
105 int& nopt=(
int&) _nopt;
107 unsigned int nopt2 = 2;
108 char** a = (
char**)malloc(nopt2 *
sizeof(
char*));
112 a[0] = (
char*)malloc((strlen(pname)+5)*
sizeof(
char));
131 for (
int i=0;i<=nopt;i++)
148 #if !defined(_MSC_VER)
161 #if !defined(_MSC_VER)
367 cerr <<
"string too long in string_parser" <<
endl;
371 str=
new char[strlen(s)+20];
384 while (*
nt !=
' ' && *
nt !=
'\0')
420 while (*
nt !=
' ' && *
nt !=
'\0')
445 const int maxargs=200;
446 char** a = (
char**)malloc(
sizeof(
char*)*(maxargs+2));
449 int& argc=(
int&)(_argc);
450 for (
int i=0;i<=maxargs;i++)
465 cerr <<
"maximum number of command line arguments exceeded"
468 a[ii]=(
char*)malloc(
sizeof(
char)*(n+2));
470 cout << a[ii] <<
endl;
474 a[0]=(
char*)malloc(
sizeof(
char)*(strlen(pname)+6));
char ** no_dll_options(char *pname, const int &argc)
static uistream * global_bparfile
char ** parse_dll_options(char *pname, const int &argc, char *dll_options)
void do_dll_housekeeping(int argc, char **argv)
prnstream & endl(prnstream &)
Description not yet available.
void cleanup_argv(int nopt, char ***pa)
void davesnobullshitstrncpy(char *a, const char *b, const size_t n)
static int num_initial_params
static cifstream * global_datafile
int option_match(int argc, char *argv[], const char *string)
Checks if the program has been invoked with a particular command line argument ("string").
static cifstream * global_parfile
string_parser(char *s, const size_t n)
char * get_next_option(size_t &n)
~string_parser()
Destructor.
static int num_stddev_params
void ad_make_code_reentrant(void)
static int num_likeprof_params
Author: David Fournier Copyright (c) 2008-2012 Regents of the University of California.