1
0
mirror of git://projects.qi-hardware.com/ben-wpan.git synced 2024-11-26 14:11:53 +02:00

atrf-path.c (usage, main): use ... [[sweeps] samples] with and without GUI

This was just too confusing ...
This commit is contained in:
Werner Almesberger 2011-04-13 20:55:45 -03:00
parent 9e3d17460a
commit 87b76af2fa

View File

@ -283,7 +283,7 @@ static void read_profile(const char *name, struct sweep *sweep)
static void usage(const char *name) static void usage(const char *name)
{ {
fprintf(stderr, fprintf(stderr,
"usage: %s common_args [sweeps [samples]]\n" "usage: %s common_args [[sweeps] samples]\n"
#ifdef HAVE_GFX #ifdef HAVE_GFX
"%6s %s -g common_args [[sweeps] samples]\n" "%6s %s -g common_args [[sweeps] samples]\n"
@ -376,9 +376,9 @@ int main(int argc, char **argv)
sweeps = strtoul(argv[optind+2], &end, 0); sweeps = strtoul(argv[optind+2], &end, 0);
if (*end) if (*end)
usage(*argv); usage(*argv);
if (graphical && argc-optind == 3) { if (argc-optind == 3) {
sweep.samples = sweeps; sweep.samples = sweeps;
sweeps = 0; sweeps = graphical ? 0 : 1;
} }
/* fall through */ /* fall through */
case 2: case 2: