Message ID | b630d5ab-da0d-d92f-010b-b8c8e4698be7@sakamocchi.jp (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
On Aug 13 2016 20:14, Takashi Sakamoto wrote: > Need to modify a table for short options. > > diff --git a/amidi/amidi.c b/amidi/amidi.c > index 290df48..ea61cba 100644 > --- a/amidi/amidi.c > +++ b/amidi/amidi.c > @@ -411,7 +411,7 @@ static void add_send_hex_data(const char *str) > > int main(int argc, char *argv[]) > { > - static const char short_options[] = "hVlLp:s:r:S::dt:a"; > + static const char short_options[] = "hVlLp:s:r:S::dt:a:c"; Oops. This should be "hVlLp:s:r:S::dt:ac"... > static const struct option long_options[] = { > {"help", 0, NULL, 'h'}, > {"version", 0, NULL, 'V'}, Regards Takashi Sakamoto
Clemens Ladisch (2): amidi: ignore not only Active Sensing but also Clock bytes amidi: fix timeout handling v2: fix short_options amidi/amidi.1 | 19 ++++++++--- amidi/amidi.c | 84 ++++++++++++++++++++++++++++++++++++++------------ 2 files changed, 79 insertions(+), 24 deletions(-)
On Aug 13 2016 23:40, Clemens Ladisch wrote: > Clemens Ladisch (2): > amidi: ignore not only Active Sensing but also Clock bytes > amidi: fix timeout handling > > v2: fix short_options > > amidi/amidi.1 | 19 ++++++++--- > amidi/amidi.c | 84 ++++++++++++++++++++++++++++++++++++++------------ > 2 files changed, 79 insertions(+), 24 deletions(-) Reviewd-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Tested-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> I tested these patches with loopbacked MIDI interface and this program. Then, This command finishes as expected. $ ./amidi -p hw:1,0,0 -d -t 5 -------- 8< -------- #include <stdio.h> #include <stdlib.h> #include <sys/types.h> #include <sys/stat.h> #include <fcntl.h> #include <stdint.h> #include <unistd.h> int main(void) { int fd; uint8_t buf = 0xfe; fd = open("/dev/snd/midiC1D0", O_WRONLY); if (fd < 0) { return EXIT_FAILURE; } while (write(fd, &buf, sizeof(buf)) > 0) ; close(fd); return EXIT_FAILURE; } -------- 8< -------- Regards Takashi Sakamoto
On Sat, 13 Aug 2016 16:40:43 +0200, Clemens Ladisch wrote: > > Clemens Ladisch (2): > amidi: ignore not only Active Sensing but also Clock bytes > amidi: fix timeout handling > > v2: fix short_options Applied both patches now. Thanks! Takashi
diff --git a/amidi/amidi.c b/amidi/amidi.c index 290df48..ea61cba 100644 --- a/amidi/amidi.c +++ b/amidi/amidi.c @@ -411,7 +411,7 @@ static void add_send_hex_data(const char *str) int main(int argc, char *argv[]) { - static const char short_options[] = "hVlLp:s:r:S::dt:a"; + static const char short_options[] = "hVlLp:s:r:S::dt:a:c"; static const struct option long_options[] = { {"help", 0, NULL, 'h'}, {"version", 0, NULL, 'V'},