ci_environment/src/ci_environment.cxx
// Returns 0 in case of success, 1 if failure.
// mode is set to the enum to indicate the desired function.
Returns 0 in case of success, 1 if failure.
mode is set to the enum to indicate the desired function.
Returns 0 in case of success 1 if failure . mode is set to the enum to indicate the desired function .
int args(int argc, char *argv[], int *mode, bool *check_only) {
    int psethome = 0;
    int disim = 0;
    int garbage = 0;
    int help = 0;
    int i;
    *mode = get_nothing;
    *check_only = false;
    for (i = 1; i < argc; i += 1) {
	if (strcmp(argv[i], "--psethome") == 0) {
		psethome = 1;
		*mode = get_psethome;
	}
	else if (strcmp(argv[i], "--disim") == 0) {
		disim = 1;
		*mode = get_disim;
	}
	else if (strcmp(argv[i], "--check") == 0) {
		*check_only = true;
	}
	else if (strcmp(argv[i], "--help") == 0) {
		help = 1;
		*mode = get_help;
	}
	else if (strcmp(argv[i], "-?") == 0) {
		help = 1;
		*mode = get_help;
	}
	else {
		garbage = 1;
	}
    }
    return (psethome + disim + help + garbage <= 1 && !garbage) ? 0 : 1;
}
int args ( int argc , char * argv [ ] , int * mode , bool * check_only ) { int psethome = 0 ; int disim = 0 ; int garbage = 0 ; int help = 0 ; int i ; * mode = get_nothing ; * check_only = false ; for ( i = 1 ; i < argc ; i += 1 ) { if ( strcmp ( argv [ i ] , " " ) == 0 ) { psethome = 1 ; * mode = get_psethome ; } else if ( strcmp ( argv [ i ] , " " ) == 0 ) { disim = 1 ; * mode = get_disim ; } else if ( strcmp ( argv [ i ] , " " ) == 0 ) { * check_only = true ; } else if ( strcmp ( argv [ i ] , " " ) == 0 ) { help = 1 ; * mode = get_help ; } else if ( strcmp ( argv [ i ] , " " ) == 0 ) { help = 1 ; * mode = get_help ; } else { garbage = 1 ; } } return ( psethome + disim + help + garbage <= 1 && ! garbage ) ? 0 : 1 ; }
Returns 0 in case of success, 1 if failure.
Returns 0 in case of success 1 if failure .