From: Matthias Koenig <mk@phasorlab.de>
amidi does not show all devices with the --list-devices option.
It assumes that all output ports equals input ports and does not
show an input only port.
This patch extends the output of amidi -l by one column which shows
the input/output direction of each port.
E.g.
zebra:amidi # ./amidi -l
Dir Device Name
IO hw:1,0 MPU-401 MIDI 1-0
IO hw:2,0,0 Keystation MIDI 1
IO hw:3,0,0 Miditerminal 1
IO hw:3,0,1 Miditerminal 2
IO hw:3,0,2 Miditerminal 3
IO hw:3,0,3 Miditerminal 4
I hw:3,0,4 Miditerminal SMPTE
Now all non-option arguments are read as data for the -S option,
instead of requiring exactly one argument for -S.
This fixes the bug that when specifying multiple bytes for the -S
option separated with spaces but without quoting, amidi would silently
ignore all but the first byte.