diff options
| -rw-r--r-- | src/calculer.c | 12 | 
1 files changed, 11 insertions, 1 deletions
| diff --git a/src/calculer.c b/src/calculer.c index 0e442de..6b279ec 100644 --- a/src/calculer.c +++ b/src/calculer.c @@ -84,6 +84,10 @@ print_usage(FILE *stream)  	print_opt_noarg("V", "Print version and exit.");  	print_opt_noarg("h", "Print help and exit.");  	print_opt_arg("l", "LOGFILE", "Use LOGFILE as log file.\n"); +	print_opt_arg("m", "MIN", +		      "Set MIN as the minimum value numbers can take.\n"); +	print_opt_arg("M", "MAX", +		      "Set MAX as the maximum value numbers can take.\n");  }  void @@ -113,7 +117,7 @@ main(int argc, char *argv[])  	assert(bytes_written);  	int opt; -	while ((opt = getopt(argc, argv, ":Vhl:")) != -1) +	while ((opt = getopt(argc, argv, ":Vhl:m:M:")) != -1)  	{  		switch (opt)  		{ @@ -126,6 +130,12 @@ main(int argc, char *argv[])  		case 'l':  			logpath = optarg;  			break; +		case 'm': +			lower = atoi(optarg); +			break; +		case 'M': +			upper = atoi(optarg); +			break;  		case ':':  			fprintf(stderr,  				"calculer: option %d requires an argument\n", | 
