~ubuntu-branches/debian/stretch/bristol/stretch

« back to all changes in this revision

Viewing changes to libbristolmidi/midiRoutines.c

  • Committer: Bazaar Package Importer
  • Author(s): Alessio Treglia
  • Date: 2010-04-23 09:49:32 UTC
  • mfrom: (1.2.1 upstream) (6.1.3 sid)
  • Revision ID: james.westby@ubuntu.com-20100423094932-btfvxmt11hv8dj4p
Tags: 0.60.0-4
* Switch back to deb format 1.0, bug#578693 has been fixed.
* Refresh and improvements, another attempt to fix FTBFS on
  hppa,sparc,s390.
* Drop debian/patches/02-implicit_pointer_conversion.patch patch,
  applied upstream.
* Patch to fix FTBFS on hurd-i386.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
 
2
2
/*
3
3
 *  Diverse Bristol midi routines.
4
 
 *  Copyright (c) by Nick Copeland <nickycopeland@hotmail.com> 1996,2009
 
4
 *  Copyright (c) by Nick Copeland <nickycopeland@hotmail.com> 1996,2010
5
5
 *
6
6
 *
7
7
 *   This program is free software; you can redistribute it and/or modify
8
8
 *   it under the terms of the GNU General Public License as published by
9
 
 *   the Free Software Foundation; either version 2 of the License, or
 
9
 *   the Free Software Foundation; either version 3 of the License, or
10
10
 *   (at your option) any later version.
11
11
 *
12
12
 *   This program is distributed in the hope that it will be useful,
15
15
 *   GNU General Public License for more details.
16
16
 *
17
17
 *   You should have received a copy of the GNU General Public License
18
 
 *   along with this program; if not, write to the Free Software
19
 
 *   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 
18
 *   along with this program; if not, see <http://www.gnu.org/licenses/>.
20
19
 *
21
20
 */
22
21
 
79
78
        return(BRISTOL_MIDI_OK);
80
79
}
81
80
 
 
81
void
 
82
bristolMidiPrintHandle(handle)
 
83
{
 
84
        printf("        Handle:  %i\n", bmidi.handle[handle].handle);
 
85
        printf("        State:   %i\n", bmidi.handle[handle].state);
 
86
        printf("        Channel: %i\n", bmidi.handle[handle].channel);
 
87
        printf("        Dev:     %i\n", bmidi.handle[handle].dev);
 
88
        printf("        Flags:   %x\n", bmidi.handle[handle].flags);
 
89
 
 
90
        if ((bmidi.handle[handle].dev < 0)
 
91
                || (bmidi.handle[handle].dev >= BRISTOL_MIDI_DEVCOUNT))
 
92
                return;
 
93
 
 
94
        printf("                devfd:  %i\n", bmidi.dev[bmidi.handle[handle].dev].fd);
 
95
        printf("                state:  %i\n", bmidi.dev[bmidi.handle[handle].dev].state);
 
96
        printf("                hcount: %i\n", bmidi.dev[bmidi.handle[handle].dev].handleCount);
 
97
}
 
98
 
82
99
int
83
100
bristolMidiSanity(handle)
84
101
{
89
106
        if ((handle < 0) || (handle > BRISTOL_MIDI_HANDLES))
90
107
                return(BRISTOL_MIDI_HANDLE);
91
108
 
 
109
        /*
 
110
         * So we can at least print it
 
111
        bristolMidiPrintHandle(handle);
 
112
         */
 
113
 
92
114
        if (bmidi.handle[handle].state < 0)
93
115
                return(BRISTOL_MIDI_HANDLE);
94
116