Project/Real_code/gnu/gawk-3.1.3/main.c
static void
init_args(int argc0, int argc, char *argv0, char **argv)
{
	int i, j;
	NODE **aptr;

	ARGV_node = install("ARGV", node((NODE *) NULL, Node_var_array, (NODE *) NULL));
	aptr = assoc_lookup(ARGV_node, tmp_number(0.0), FALSE);
	*aptr = make_string(argv0, strlen(argv0));
	(*aptr)->flags |= MAYBE_NUM;
	for (i = argc0, j = 1; i < argc; i++) {
		aptr = assoc_lookup(ARGV_node, tmp_number((AWKNUM) j), FALSE);
		*aptr = make_string(argv[i], strlen(argv[i]));
		(*aptr)->flags |= MAYBE_NUM;
		j++;
	}
	ARGC_node = install("ARGC",
			node(make_number((AWKNUM) j), Node_var, (NODE *) NULL));
}
/* init_args --- set up ARGV from stuff on the command line */
set up ARGV from stuff on the command line
set up ARGV from stuff on the command line
static void
init_args(int argc0, int argc, char *argv0, char **argv)
{
	int i, j;
	NODE **aptr;
	ARGV_node = install("ARGV", node((NODE *) NULL, Node_var_array, (NODE *) NULL));
	aptr = assoc_lookup(ARGV_node, tmp_number(0.0), FALSE);
	*aptr = make_string(argv0, strlen(argv0));
	(*aptr)->flags |= MAYBE_NUM;
	for (i = argc0, j = 1; i < argc; i++) {
		aptr = assoc_lookup(ARGV_node, tmp_number((AWKNUM) j), FALSE);
		*aptr = make_string(argv[i], strlen(argv[i]));
		(*aptr)->flags |= MAYBE_NUM;
		j++;
	}
	ARGC_node = install("ARGC",
			node(make_number((AWKNUM) j), Node_var, (NODE *) NULL));
}
static void init_args ( int argc0 , int argc , char * argv0 , char * * argv ) { int i , j ; NODE * * aptr ; ARGV_node = install ( " " , node ( ( NODE * ) NULL , Node_var_array , ( NODE * ) NULL ) ) ; aptr = assoc_lookup ( ARGV_node , tmp_number ( 0.0 ) , FALSE ) ; * aptr = make_string ( argv0 , strlen ( argv0 ) ) ; ( * aptr ) -> flags |= MAYBE_NUM ; for ( i = argc0 , j = 1 ; i < argc ; i ++ ) { aptr = assoc_lookup ( ARGV_node , tmp_number ( ( AWKNUM ) j ) , FALSE ) ; * aptr = make_string ( argv [ i ] , strlen ( argv [ i ] ) ) ; ( * aptr ) -> flags |= MAYBE_NUM ; j ++ ; } ARGC_node = install ( " " , node ( make_number ( ( AWKNUM ) j ) , Node_var , ( NODE * ) NULL ) ) ; }
init_args --- set up ARGV from stuff on the command line
init_args --- set up ARGV from stuff on the command line