diff options
Diffstat (limited to 'alsa-utils/amidi')
-rw-r--r-- | alsa-utils/amidi/Makefile.am | 5 | ||||
-rw-r--r-- | alsa-utils/amidi/Makefile.in | 498 | ||||
-rw-r--r-- | alsa-utils/amidi/amidi.1 | 155 | ||||
-rw-r--r-- | alsa-utils/amidi/amidi.c | 679 |
4 files changed, 0 insertions, 1337 deletions
diff --git a/alsa-utils/amidi/Makefile.am b/alsa-utils/amidi/Makefile.am deleted file mode 100644 index 0b31a67..0000000 --- a/alsa-utils/amidi/Makefile.am +++ /dev/null @@ -1,5 +0,0 @@ -INCLUDES = -I$(top_srcdir)/include -EXTRA_DIST = amidi.1 - -bin_PROGRAMS = amidi -man_MANS = amidi.1 diff --git a/alsa-utils/amidi/Makefile.in b/alsa-utils/amidi/Makefile.in deleted file mode 100644 index ea7361b..0000000 --- a/alsa-utils/amidi/Makefile.in +++ /dev/null @@ -1,498 +0,0 @@ -# Makefile.in generated by automake 1.9.6 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005 Free Software Foundation, Inc. -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ - -srcdir = @srcdir@ -top_srcdir = @top_srcdir@ -VPATH = @srcdir@ -pkgdatadir = $(datadir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -top_builddir = .. -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -INSTALL = @INSTALL@ -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -bin_PROGRAMS = amidi$(EXEEXT) -subdir = amidi -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/m4/gettext.m4 \ - $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/lib-ld.m4 \ - $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \ - $(top_srcdir)/m4/nls.m4 $(top_srcdir)/m4/po.m4 \ - $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/acinclude.m4 \ - $(top_srcdir)/configure.in -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -mkinstalldirs = $(install_sh) -d -CONFIG_HEADER = $(top_builddir)/include/aconfig.h -CONFIG_CLEAN_FILES = -am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(man1dir)" -binPROGRAMS_INSTALL = $(INSTALL_PROGRAM) -PROGRAMS = $(bin_PROGRAMS) -amidi_SOURCES = amidi.c -amidi_OBJECTS = amidi.$(OBJEXT) -amidi_LDADD = $(LDADD) -DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)/include -depcomp = $(SHELL) $(top_srcdir)/depcomp -am__depfiles_maybe = depfiles -COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -CCLD = $(CC) -LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ -SOURCES = amidi.c -DIST_SOURCES = amidi.c -man1dir = $(mandir)/man1 -NROFF = nroff -MANS = $(man_MANS) -ETAGS = etags -CTAGS = ctags -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = @ACLOCAL@ -ALSACONF_FALSE = @ALSACONF_FALSE@ -ALSACONF_TRUE = @ALSACONF_TRUE@ -ALSAMIXER_FALSE = @ALSAMIXER_FALSE@ -ALSAMIXER_TRUE = @ALSAMIXER_TRUE@ -ALSA_CFLAGS = @ALSA_CFLAGS@ -ALSA_LIBS = @ALSA_LIBS@ -AMDEP_FALSE = @AMDEP_FALSE@ -AMDEP_TRUE = @AMDEP_TRUE@ -AMTAR = @AMTAR@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CURSESINC = @CURSESINC@ -CURSESLIB = @CURSESLIB@ -CURSES_CFLAGS = @CURSES_CFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -GMSGFMT = @GMSGFMT@ -GMSGFMT_015 = @GMSGFMT_015@ -GREP = @GREP@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -INTLLIBS = @INTLLIBS@ -INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@ -LDFLAGS = @LDFLAGS@ -LIBICONV = @LIBICONV@ -LIBINTL = @LIBINTL@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LN_S = @LN_S@ -LTLIBICONV = @LTLIBICONV@ -LTLIBINTL = @LTLIBINTL@ -LTLIBOBJS = @LTLIBOBJS@ -MAKEINFO = @MAKEINFO@ -MSGFMT = @MSGFMT@ -MSGFMT_015 = @MSGFMT_015@ -MSGMERGE = @MSGMERGE@ -OBJEXT = @OBJEXT@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -POSUB = @POSUB@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -SND_UTIL_MAJOR = @SND_UTIL_MAJOR@ -SND_UTIL_MINOR = @SND_UTIL_MINOR@ -SND_UTIL_SUBMINOR = @SND_UTIL_SUBMINOR@ -SND_UTIL_VERSION = @SND_UTIL_VERSION@ -STRIP = @STRIP@ -TESTSOUND = @TESTSOUND@ -USE_NLS = @USE_NLS@ -USE_XMLTO_FALSE = @USE_XMLTO_FALSE@ -USE_XMLTO_TRUE = @USE_XMLTO_TRUE@ -VERSION = @VERSION@ -XGETTEXT = @XGETTEXT@ -XGETTEXT_015 = @XGETTEXT_015@ -ac_ct_CC = @ac_ct_CC@ -am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ -am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -datadir = @datadir@ -datarootdir = @datarootdir@ -docdir = @docdir@ -dvidir = @dvidir@ -exec_prefix = @exec_prefix@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localedir = @localedir@ -localstatedir = @localstatedir@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -ncurses5_config = @ncurses5_config@ -ncursesw5_config = @ncursesw5_config@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -xmlto = @xmlto@ -INCLUDES = -I$(top_srcdir)/include -EXTRA_DIST = amidi.1 -man_MANS = amidi.1 -all: all-am - -.SUFFIXES: -.SUFFIXES: .c .o .obj -$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ - && exit 0; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign amidi/Makefile'; \ - cd $(top_srcdir) && \ - $(AUTOMAKE) --foreign amidi/Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -install-binPROGRAMS: $(bin_PROGRAMS) - @$(NORMAL_INSTALL) - test -z "$(bindir)" || $(mkdir_p) "$(DESTDIR)$(bindir)" - @list='$(bin_PROGRAMS)'; for p in $$list; do \ - p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ - if test -f $$p \ - ; then \ - f=`echo "$$p1" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \ - echo " $(INSTALL_PROGRAM_ENV) $(binPROGRAMS_INSTALL) '$$p' '$(DESTDIR)$(bindir)/$$f'"; \ - $(INSTALL_PROGRAM_ENV) $(binPROGRAMS_INSTALL) "$$p" "$(DESTDIR)$(bindir)/$$f" || exit 1; \ - else :; fi; \ - done - -uninstall-binPROGRAMS: - @$(NORMAL_UNINSTALL) - @list='$(bin_PROGRAMS)'; for p in $$list; do \ - f=`echo "$$p" | sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \ - echo " rm -f '$(DESTDIR)$(bindir)/$$f'"; \ - rm -f "$(DESTDIR)$(bindir)/$$f"; \ - done - -clean-binPROGRAMS: - -test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS) -amidi$(EXEEXT): $(amidi_OBJECTS) $(amidi_DEPENDENCIES) - @rm -f amidi$(EXEEXT) - $(LINK) $(amidi_LDFLAGS) $(amidi_OBJECTS) $(amidi_LDADD) $(LIBS) - -mostlyclean-compile: - -rm -f *.$(OBJEXT) - -distclean-compile: - -rm -f *.tab.c - -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/amidi.Po@am__quote@ - -.c.o: -@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ -@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c $< - -.c.obj: -@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \ -@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` -uninstall-info-am: -install-man1: $(man1_MANS) $(man_MANS) - @$(NORMAL_INSTALL) - test -z "$(man1dir)" || $(mkdir_p) "$(DESTDIR)$(man1dir)" - @list='$(man1_MANS) $(dist_man1_MANS) $(nodist_man1_MANS)'; \ - l2='$(man_MANS) $(dist_man_MANS) $(nodist_man_MANS)'; \ - for i in $$l2; do \ - case "$$i" in \ - *.1*) list="$$list $$i" ;; \ - esac; \ - done; \ - for i in $$list; do \ - if test -f $(srcdir)/$$i; then file=$(srcdir)/$$i; \ - else file=$$i; fi; \ - ext=`echo $$i | sed -e 's/^.*\\.//'`; \ - case "$$ext" in \ - 1*) ;; \ - *) ext='1' ;; \ - esac; \ - inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \ - inst=`echo $$inst | sed -e 's/^.*\///'`; \ - inst=`echo $$inst | sed '$(transform)'`.$$ext; \ - echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man1dir)/$$inst'"; \ - $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man1dir)/$$inst"; \ - done -uninstall-man1: - @$(NORMAL_UNINSTALL) - @list='$(man1_MANS) $(dist_man1_MANS) $(nodist_man1_MANS)'; \ - l2='$(man_MANS) $(dist_man_MANS) $(nodist_man_MANS)'; \ - for i in $$l2; do \ - case "$$i" in \ - *.1*) list="$$list $$i" ;; \ - esac; \ - done; \ - for i in $$list; do \ - ext=`echo $$i | sed -e 's/^.*\\.//'`; \ - case "$$ext" in \ - 1*) ;; \ - *) ext='1' ;; \ - esac; \ - inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \ - inst=`echo $$inst | sed -e 's/^.*\///'`; \ - inst=`echo $$inst | sed '$(transform)'`.$$ext; \ - echo " rm -f '$(DESTDIR)$(man1dir)/$$inst'"; \ - rm -f "$(DESTDIR)$(man1dir)/$$inst"; \ - done - -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - mkid -fID $$unique -tags: TAGS - -TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ - test -n "$$unique" || unique=$$empty_fix; \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$tags $$unique; \ - fi -ctags: CTAGS -CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - test -z "$(CTAGS_ARGS)$$tags$$unique" \ - || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$tags $$unique - -GTAGS: - here=`$(am__cd) $(top_builddir) && pwd` \ - && cd $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) $$here - -distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - -distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ - list='$(DISTFILES)'; for file in $$list; do \ - case $$file in \ - $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ - $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ - esac; \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test "$$dir" != "$$file" && test "$$dir" != "."; then \ - dir="/$$dir"; \ - $(mkdir_p) "$(distdir)$$dir"; \ - else \ - dir=''; \ - fi; \ - if test -d $$d/$$file; then \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ - fi; \ - cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ - else \ - test -f $(distdir)/$$file \ - || cp -p $$d/$$file $(distdir)/$$file \ - || exit 1; \ - fi; \ - done -check-am: all-am -check: check-am -all-am: Makefile $(PROGRAMS) $(MANS) -installdirs: - for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(man1dir)"; do \ - test -z "$$dir" || $(mkdir_p) "$$dir"; \ - done -install: install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-am -install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install -mostlyclean-generic: - -clean-generic: - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." -clean: clean-am - -clean-am: clean-binPROGRAMS clean-generic mostlyclean-am - -distclean: distclean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -distclean-am: clean-am distclean-compile distclean-generic \ - distclean-tags - -dvi: dvi-am - -dvi-am: - -html: html-am - -info: info-am - -info-am: - -install-data-am: install-man - -install-exec-am: install-binPROGRAMS - -install-info: install-info-am - -install-man: install-man1 - -installcheck-am: - -maintainer-clean: maintainer-clean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-am - -mostlyclean-am: mostlyclean-compile mostlyclean-generic - -pdf: pdf-am - -pdf-am: - -ps: ps-am - -ps-am: - -uninstall-am: uninstall-binPROGRAMS uninstall-info-am uninstall-man - -uninstall-man: uninstall-man1 - -.PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \ - clean-generic ctags distclean distclean-compile \ - distclean-generic distclean-tags distdir dvi dvi-am html \ - html-am info info-am install install-am install-binPROGRAMS \ - install-data install-data-am install-exec install-exec-am \ - install-info install-info-am install-man install-man1 \ - install-strip installcheck installcheck-am installdirs \ - maintainer-clean maintainer-clean-generic mostlyclean \ - mostlyclean-compile mostlyclean-generic pdf pdf-am ps ps-am \ - tags uninstall uninstall-am uninstall-binPROGRAMS \ - uninstall-info-am uninstall-man uninstall-man1 - -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff --git a/alsa-utils/amidi/amidi.1 b/alsa-utils/amidi/amidi.1 deleted file mode 100644 index c58d65c..0000000 --- a/alsa-utils/amidi/amidi.1 +++ /dev/null @@ -1,155 +0,0 @@ -.TH AMIDI 1 "26 Jun 2006" - -.SH NAME -amidi \- read from and write to ALSA RawMIDI ports - -.SH SYNOPSIS -\fBamidi\fP [\fI\-p port\fP] [\fI\-s file\fP | \fI\-S data\fP] -[\fI\-r file\fP] [\fI\-d\fP] [\fI\-t seconds\fP] [\fI\-a\fP] - -.SH DESCRIPTION -.B amidi -is a command-line utility which allows to receive and send -SysEx (system exclusive) data from/to external MIDI devices. -It can also send any other MIDI commands. - -.B amidi -handles only files containing raw MIDI commands, without timing -information. -.B amidi -does not support Standard MIDI (.mid) files, but -.B aplaymidi(1) -and -.B arecordmidi(1) -do. - -.SH OPTIONS - -Use the -.I \-h, -.I \-V, -.I \-l, -or -.I \-L -options to display information; -or use at least one of the -.I \-s, -.I \-r, -.I \-S, -or -.I \-d -options to specify what data to send or receive. - -.TP -.I \-h, \-\-help -Help: prints a list of options. - -.TP -.I \-V, \-\-version -Prints the current version. - -.TP -.I \-l, \-\-list\-devices -Prints a list of all hardware MIDI ports. - -.TP -.I \-L, \-\-list\-rawmidis -Prints all RawMIDI definitions. -(used when debugging configuration files) - -.TP -.I \-p, \-\-port=name -Sets the name of the ALSA RawMIDI port to use. -If this is not specified, -.B amidi -uses the default port defined in the configuration file -(the default for this is port 0 on card 0, which may not exist). - -.TP -.I \-s, \-\-send=filename -Sends the contents of the specified file to the MIDI port. -The file must contain raw MIDI commands (e.g. a .syx file); -for Standard MIDI (.mid) files, use -.B aplaymidi(1). - -.TP -.I \-r, \-\-receive=filename -Writes data received from the MIDI port into the specified file. -The file will contain raw MIDI commands (such as in a .syx file); -to record a Standard MIDI (.mid) file, use -.B arecordmidi(1). - -.B amidi -will filter out any Active Sensing bytes (FEh), unless the -.I \-a -option has been given. - -.TP -.I \-S, \-\-send\-hex="..." -Sends the bytes specified as hexadecimal numbers to the MIDI port. - -.TP -.I \-d, \-\-dump -Prints data received from the MIDI port as hexadecimal bytes. -Active Sensing bytes (FEh) will not be shown, unless the -.I \-a -option has been given. - -This option is useful for debugging. - -.TP -.I \-t, \-\-timeout=seconds -Stops receiving data when no data has been received for the specified -amount of time. - -If this option has not been given, you must press Ctrl+C (or kill -.B amidi\fR) -to stop receiving data. - -.TP -.I \-a, \-\-active\-sensing -Does not ignore Active Sensing bytes (FEh) when saving or printing -received MIDI commands. - -.SH EXAMPLES - -.TP -.B amidi \-p hw:0 \-s my_settings.syx -will send the MIDI commands in -.I my_settings.syx -to port -.I hw:0. - -.TP -.B amidi \-S 'F0 43 10 4C 00 00 7E 00 F7' -sends an XG Reset to the default port. - -.TP -.B amidi \-p hw:1,2 \-S F0411042110C000000000074F7 \-r dump.syx \-t 1 -sends a \(lqParameter Dump Request\(rq to a GS device, saves the received -parameter data to the file -.I dump.syx, -and stops after the device has finished sending data -(when no data has been received for one second). - -.TP -.B amidi \-p virtual \-d -creates a virtual RawMIDI port and prints all data sent to this port. - -.SH FILES -.I /usr/share/alsa/alsa.conf -default rawmidi definitions -.br -.I /etc/asound.conf -system-wide rawmidi definitions -.br -.I ~/.asoundrc -user specific rawmidi definitions - -.SH SEE ALSO -aplaymidi(1) -.br -arecordmidi(1) - -.SH AUTHOR -Clemens Ladisch <clemens@ladisch.de> diff --git a/alsa-utils/amidi/amidi.c b/alsa-utils/amidi/amidi.c deleted file mode 100644 index 2e970ae..0000000 --- a/alsa-utils/amidi/amidi.c +++ /dev/null @@ -1,679 +0,0 @@ -/* - * amidi.c - read from/write to RawMIDI ports - * - * Copyright (c) Clemens Ladisch <clemens@ladisch.de> - * - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - */ - -#define _GNU_SOURCE -#include <stdio.h> -#include <stdlib.h> -#include <stdarg.h> -#include <string.h> -#include <ctype.h> -#include <getopt.h> -#include <errno.h> -#include <signal.h> -#include <sys/types.h> -#include <sys/poll.h> -#include <sys/stat.h> -#include <unistd.h> -#include <fcntl.h> -#include <alsa/asoundlib.h> -#include "aconfig.h" -#include "version.h" - -static int do_device_list, do_rawmidi_list; -static char *port_name = "default"; -static char *send_file_name; -static char *receive_file_name; -static char *send_hex; -static char *send_data; -static int send_data_length; -static int receive_file; -static int dump; -static int timeout; -static int stop; -static snd_rawmidi_t *input, **inputp; -static snd_rawmidi_t *output, **outputp; - -static void error(const char *format, ...) -{ - va_list ap; - - va_start(ap, format); - vfprintf(stderr, format, ap); - va_end(ap); - putc('\n', stderr); -} - -static void usage(void) -{ - printf( - "Usage: amidi options\n" - "\n" - "-h, --help this help\n" - "-V, --version print current version\n" - "-l, --list-devices list all hardware ports\n" - "-L, --list-rawmidis list all RawMIDI definitions\n" - "-p, --port=name select port by name\n" - "-s, --send=file send the contents of a (.syx) file\n" - "-r, --receive=file write received data into a file\n" - "-S, --send-hex=\"...\" send hexadecimal bytes\n" - "-d, --dump print received data as hexadecimal bytes\n" - "-t, --timeout=seconds exits when no data has been received\n" - " for the specified duration\n" - "-a, --active-sensing don't ignore active sensing bytes\n"); -} - -static void version(void) -{ - puts("amidi version " SND_UTIL_VERSION_STR); -} - -static void *my_malloc(size_t size) -{ - void *p = malloc(size); - if (!p) { - error("out of memory"); - exit(EXIT_FAILURE); - } - return p; -} - -static int is_input(snd_ctl_t *ctl, int card, int device, int sub) -{ - snd_rawmidi_info_t *info; - int err; - - snd_rawmidi_info_alloca(&info); - snd_rawmidi_info_set_device(info, device); - snd_rawmidi_info_set_subdevice(info, sub); - snd_rawmidi_info_set_stream(info, SND_RAWMIDI_STREAM_INPUT); - - if ((err = snd_ctl_rawmidi_info(ctl, info)) < 0 && err != -ENXIO) - return err; - else if (err == 0) - return 1; - - return 0; -} - -static int is_output(snd_ctl_t *ctl, int card, int device, int sub) -{ - snd_rawmidi_info_t *info; - int err; - - snd_rawmidi_info_alloca(&info); - snd_rawmidi_info_set_device(info, device); - snd_rawmidi_info_set_subdevice(info, sub); - snd_rawmidi_info_set_stream(info, SND_RAWMIDI_STREAM_OUTPUT); - - if ((err = snd_ctl_rawmidi_info(ctl, info)) < 0 && err != -ENXIO) - return err; - else if (err == 0) - return 1; - - return 0; -} - -static void list_device(snd_ctl_t *ctl, int card, int device) -{ - snd_rawmidi_info_t *info; - const char *name; - const char *sub_name; - int subs, subs_in, subs_out; - int sub, in, out; - int err; - - snd_rawmidi_info_alloca(&info); - snd_rawmidi_info_set_device(info, device); - - snd_rawmidi_info_set_stream(info, SND_RAWMIDI_STREAM_INPUT); - snd_ctl_rawmidi_info(ctl, info); - subs_in = snd_rawmidi_info_get_subdevices_count(info); - snd_rawmidi_info_set_stream(info, SND_RAWMIDI_STREAM_OUTPUT); - snd_ctl_rawmidi_info(ctl, info); - subs_out = snd_rawmidi_info_get_subdevices_count(info); - subs = subs_in > subs_out ? subs_in : subs_out; - - sub = 0; - in = out = 0; - if ((err = is_output(ctl, card, device, sub)) < 0) { - error("cannot get rawmidi information %d:%d: %s", - card, device, snd_strerror(err)); - return; - } else if (err) - out = 1; - - if (err == 0) { - if ((err = is_input(ctl, card, device, sub)) < 0) { - error("cannot get rawmidi information %d:%d: %s", - card, device, snd_strerror(err)); - return; - } - } else if (err) - in = 1; - - if (err == 0) - return; - - name = snd_rawmidi_info_get_name(info); - sub_name = snd_rawmidi_info_get_subdevice_name(info); - if (sub_name[0] == '\0') { - if (subs == 1) { - printf("%c%c hw:%d,%d %s\n", - in ? 'I' : ' ', out ? 'O' : ' ', - card, device, name); - } else - printf("%c%c hw:%d,%d %s (%d subdevices)\n", - in ? 'I' : ' ', out ? 'O' : ' ', - card, device, name, subs); - } else { - sub = 0; - for (;;) { - printf("%c%c hw:%d,%d,%d %s\n", - in ? 'I' : ' ', out ? 'O' : ' ', - card, device, sub, sub_name); - if (++sub >= subs) - break; - - in = is_input(ctl, card, device, sub); - out = is_output(ctl, card, device, sub); - snd_rawmidi_info_set_subdevice(info, sub); - if (out) { - snd_rawmidi_info_set_stream(info, SND_RAWMIDI_STREAM_OUTPUT); - if ((err = snd_ctl_rawmidi_info(ctl, info)) < 0) { - error("cannot get rawmidi information %d:%d:%d: %s", - card, device, sub, snd_strerror(err)); - break; - } - } else { - snd_rawmidi_info_set_stream(info, SND_RAWMIDI_STREAM_INPUT); - if ((err = snd_ctl_rawmidi_info(ctl, info)) < 0) { - error("cannot get rawmidi information %d:%d:%d: %s", - card, device, sub, snd_strerror(err)); - break; - } - } - sub_name = snd_rawmidi_info_get_subdevice_name(info); - } - } -} - -static void list_card_devices(int card) -{ - snd_ctl_t *ctl; - char name[32]; - int device; - int err; - - sprintf(name, "hw:%d", card); - if ((err = snd_ctl_open(&ctl, name, 0)) < 0) { - error("cannot open control for card %d: %s", card, snd_strerror(err)); - return; - } - device = -1; - for (;;) { - if ((err = snd_ctl_rawmidi_next_device(ctl, &device)) < 0) { - error("cannot determine device number: %s", snd_strerror(err)); - break; - } - if (device < 0) - break; - list_device(ctl, card, device); - } - snd_ctl_close(ctl); -} - -static void device_list(void) -{ - int card, err; - - card = -1; - if ((err = snd_card_next(&card)) < 0) { - error("cannot determine card number: %s", snd_strerror(err)); - return; - } - if (card < 0) { - error("no sound card found"); - return; - } - puts("Dir Device Name"); - do { - list_card_devices(card); - if ((err = snd_card_next(&card)) < 0) { - error("cannot determine card number: %s", snd_strerror(err)); - break; - } - } while (card >= 0); -} - -static void rawmidi_list(void) -{ - snd_output_t *output; - snd_config_t *config; - int err; - - if ((err = snd_config_update()) < 0) { - error("snd_config_update failed: %s", snd_strerror(err)); - return; - } - if ((err = snd_output_stdio_attach(&output, stdout, 0)) < 0) { - error("snd_output_stdio_attach failed: %s", snd_strerror(err)); - return; - } - if (snd_config_search(snd_config, "rawmidi", &config) >= 0) { - puts("RawMIDI list:"); - snd_config_save(config, output); - } - snd_output_close(output); -} - -static void load_file(void) -{ - int fd; - off_t length; - - fd = open(send_file_name, O_RDONLY); - if (fd == -1) { - error("cannot open %s - %s", send_file_name, strerror(errno)); - return; - } - length = lseek(fd, 0, SEEK_END); - if (length == (off_t)-1) { - error("cannot determine length of %s: %s", send_file_name, strerror(errno)); - goto _error; - } - send_data = my_malloc(length); - lseek(fd, 0, SEEK_SET); - if (read(fd, send_data, length) != length) { - error("cannot read from %s: %s", send_file_name, strerror(errno)); - goto _error; - } - if (length >= 4 && !memcmp(send_data, "MThd", 4)) { - error("%s is a Standard MIDI File; use aplaymidi to send it", send_file_name); - goto _error; - } - send_data_length = length; - goto _exit; -_error: - free(send_data); - send_data = NULL; -_exit: - close(fd); -} - -static int hex_value(char c) -{ - if ('0' <= c && c <= '9') - return c - '0'; - if ('A' <= c && c <= 'F') - return c - 'A' + 10; - if ('a' <= c && c <= 'f') - return c - 'a' + 10; - error("invalid character %c", c); - return -1; -} - -static void parse_data(void) -{ - const char *p; - int i, value; - - send_data = my_malloc(strlen(send_hex)); /* guesstimate */ - i = 0; - value = -1; /* value is >= 0 when the first hex digit of a byte has been read */ - for (p = send_hex; *p; ++p) { - int digit; - if (isspace((unsigned char)*p)) { - if (value >= 0) { - send_data[i++] = value; - value = -1; - } - continue; - } - digit = hex_value(*p); - if (digit < 0) { - send_data = NULL; - return; - } - if (value < 0) { - value = digit; - } else { - send_data[i++] = (value << 4) | digit; - value = -1; - } - } - if (value >= 0) - send_data[i++] = value; - send_data_length = i; -} - -/* - * prints MIDI commands, formatting them nicely - */ -static void print_byte(unsigned char byte) -{ - static enum { - STATE_UNKNOWN, - STATE_1PARAM, - STATE_1PARAM_CONTINUE, - STATE_2PARAM_1, - STATE_2PARAM_2, - STATE_2PARAM_1_CONTINUE, - STATE_SYSEX - } state = STATE_UNKNOWN; - int newline = 0; - - if (byte >= 0xf8) - newline = 1; - else if (byte >= 0xf0) { - newline = 1; - switch (byte) { - case 0xf0: - state = STATE_SYSEX; - break; - case 0xf1: - case 0xf3: - state = STATE_1PARAM; - break; - case 0xf2: - state = STATE_2PARAM_1; - break; - case 0xf4: - case 0xf5: - case 0xf6: - state = STATE_UNKNOWN; - break; - case 0xf7: - newline = state != STATE_SYSEX; - state = STATE_UNKNOWN; - break; - } - } else if (byte >= 0x80) { - newline = 1; - if (byte >= 0xc0 && byte <= 0xdf) - state = STATE_1PARAM; - else - state = STATE_2PARAM_1; - } else /* b < 0x80 */ { - int running_status = 0; - newline = state == STATE_UNKNOWN; - switch (state) { - case STATE_1PARAM: - state = STATE_1PARAM_CONTINUE; - break; - case STATE_1PARAM_CONTINUE: - running_status = 1; - break; - case STATE_2PARAM_1: - state = STATE_2PARAM_2; - break; - case STATE_2PARAM_2: - state = STATE_2PARAM_1_CONTINUE; - break; - case STATE_2PARAM_1_CONTINUE: - running_status = 1; - state = STATE_2PARAM_2; - break; - default: - break; - } - if (running_status) - fputs("\n ", stdout); - } - printf("%c%02X", newline ? '\n' : ' ', byte); -} - -static void sig_handler(int dummy) -{ - stop = 1; -} - -static void add_send_hex_data(const char *str) -{ - int length; - char *s; - - length = (send_hex ? strlen(send_hex) + 1 : 0) + strlen(str) + 1; - s = my_malloc(length); - if (send_hex) { - strcpy(s, send_hex); - strcat(s, " "); - } else { - s[0] = '\0'; - } - strcat(s, str); - free(send_hex); - send_hex = s; -} - -int main(int argc, char *argv[]) -{ - static const char short_options[] = "hVlLp:s:r:S::dt:a"; - static const struct option long_options[] = { - {"help", 0, NULL, 'h'}, - {"version", 0, NULL, 'V'}, - {"list-devices", 0, NULL, 'l'}, - {"list-rawmidis", 0, NULL, 'L'}, - {"port", 1, NULL, 'p'}, - {"send", 1, NULL, 's'}, - {"receive", 1, NULL, 'r'}, - {"send-hex", 2, NULL, 'S'}, - {"dump", 0, NULL, 'd'}, - {"timeout", 1, NULL, 't'}, - {"active-sensing", 0, NULL, 'a'}, - { } - }; - int c, err, ok = 0; - int ignore_active_sensing = 1; - int do_send_hex = 0; - - while ((c = getopt_long(argc, argv, short_options, - long_options, NULL)) != -1) { - switch (c) { - case 'h': - usage(); - return 0; - case 'V': - version(); - return 0; - case 'l': - do_device_list = 1; - break; - case 'L': - do_rawmidi_list = 1; - break; - case 'p': - port_name = optarg; - break; - case 's': - send_file_name = optarg; - break; - case 'r': - receive_file_name = optarg; - break; - case 'S': - do_send_hex = 1; - if (optarg) - add_send_hex_data(optarg); - break; - case 'd': - dump = 1; - break; - case 't': - timeout = atoi(optarg); - break; - case 'a': - ignore_active_sensing = 0; - break; - default: - error("Try `amidi --help' for more information."); - return 1; - } - } - if (do_send_hex) { - /* data for -S can be specified as multiple arguments */ - if (!send_hex && !argv[optind]) { - error("Please specify some data for --send-hex."); - return 1; - } - for (; argv[optind]; ++optind) - add_send_hex_data(argv[optind]); - } else { - if (argv[optind]) { - error("%s is not an option.", argv[optind]); - return 1; - } - } - - if (do_rawmidi_list) - rawmidi_list(); - if (do_device_list) - device_list(); - if (do_rawmidi_list || do_device_list) - return 0; - - if (!send_file_name && !receive_file_name && !send_hex && !dump) { - error("Please specify at least one of --send, --receive, --send-hex, or --dump."); - return 1; - } - if (send_file_name && send_hex) { - error("--send and --send-hex cannot be specified at the same time."); - return 1; - } - - if (send_file_name) - load_file(); - else if (send_hex) - parse_data(); - if ((send_file_name || send_hex) && !send_data) - return 1; - - if (receive_file_name) { - receive_file = creat(receive_file_name, 0666); - if (receive_file == -1) { - error("cannot create %s: %s", receive_file_name, strerror(errno)); - return -1; - } - } else { - receive_file = -1; - } - - if (receive_file_name || dump) - inputp = &input; - else - inputp = NULL; - if (send_data) - outputp = &output; - else - outputp = NULL; - - if ((err = snd_rawmidi_open(inputp, outputp, port_name, SND_RAWMIDI_NONBLOCK)) < 0) { - error("cannot open port \"%s\": %s", port_name, snd_strerror(err)); - goto _exit2; - } - - if (inputp) - snd_rawmidi_read(input, NULL, 0); /* trigger reading */ - - if (send_data) { - if ((err = snd_rawmidi_nonblock(output, 0)) < 0) { - error("cannot set blocking mode: %s", snd_strerror(err)); - goto _exit; - } - if ((err = snd_rawmidi_write(output, send_data, send_data_length)) < 0) { - error("cannot send data: %s", snd_strerror(err)); - goto _exit; - } - } - - if (inputp) { - int read = 0; - int npfds, time = 0; - struct pollfd *pfds; - - timeout *= 1000; - npfds = snd_rawmidi_poll_descriptors_count(input); - pfds = alloca(npfds * sizeof(struct pollfd)); - snd_rawmidi_poll_descriptors(input, pfds, npfds); - signal(SIGINT, sig_handler); - for (;;) { - unsigned char buf[256]; - int i, length; - unsigned short revents; - - err = poll(pfds, npfds, 200); - if (stop || (err < 0 && errno == EINTR)) - break; - if (err < 0) { - error("poll failed: %s", strerror(errno)); - break; - } - if (err == 0) { - time += 200; - if (timeout && time >= timeout) - break; - continue; - } - if ((err = snd_rawmidi_poll_descriptors_revents(input, pfds, npfds, &revents)) < 0) { - error("cannot get poll events: %s", snd_strerror(errno)); - break; - } - if (revents & (POLLERR | POLLHUP)) - break; - if (!(revents & POLLIN)) - continue; - err = snd_rawmidi_read(input, buf, sizeof(buf)); - if (err == -EAGAIN) - continue; - if (err < 0) { - error("cannot read from port \"%s\": %s", port_name, snd_strerror(err)); - break; - } - length = 0; - for (i = 0; i < err; ++i) - if (!ignore_active_sensing || buf[i] != 0xfe) - buf[length++] = buf[i]; - if (length == 0) - continue; - read += length; - time = 0; - if (receive_file != -1) - write(receive_file, buf, length); - if (dump) { - for (i = 0; i < length; ++i) - print_byte(buf[i]); - fflush(stdout); - } - } - if (isatty(fileno(stdout))) - printf("\n%d bytes read\n", read); - } - - ok = 1; -_exit: - if (inputp) - snd_rawmidi_close(input); - if (outputp) - snd_rawmidi_close(output); -_exit2: - if (receive_file != -1) - close(receive_file); - return !ok; -} |