X-Git-Url: http://git.itanic.dy.fi/?p=log-plotter;a=blobdiff_plain;f=options.c;h=582b4e73627c86f5547b56e7896b6bba97a00f71;hp=18db9c5e44e173ba1b24f70f4a44a44079187d6b;hb=1c1f69155571479f903195eea242f0de4d96cb05;hpb=807425ca03229203471d2733e36e42611b1402a6 diff --git a/options.c b/options.c index 18db9c5..582b4e7 100644 --- a/options.c +++ b/options.c @@ -3,7 +3,7 @@ #include #include -#include "options.h" +#include "config.h" #include "trace.h" void print_help_and_die(const char *exec_name) @@ -21,15 +21,15 @@ void print_help_and_die(const char *exec_name) exit(0); } -static void set_default_options(struct plotter_options *opts) +static void set_default_options(struct plotter_config *opts) { bzero(opts, sizeof(*opts)); - opts->baud_rate = 128000; + opts->baudrate = 128000; opts->device_path = "/dev/ttyUSB0"; } -int read_args(int argc, char *argv[], struct plotter_options *opts) +int read_args(int argc, char *argv[], struct plotter_config *opts) { int option_index = 0, c; static struct option long_options[] = { @@ -57,10 +57,10 @@ int read_args(int argc, char *argv[], struct plotter_options *opts) opts->device_path = optarg; break; case 'o': - opts->output_path = optarg; + opts->log_path = optarg; break; case 'b': - opts->baud_rate = atoi(optarg); + opts->baudrate = atoi(optarg); break; case 'v': trace_level++;