~ubuntu-branches/debian/jessie/bristol/jessie

« back to all changes in this revision

Viewing changes to libbristolmidi/midiTCPDevMan.c

  • Committer: Bazaar Package Importer
  • Author(s): Alessio Treglia
  • Date: 2009-11-10 12:21:04 UTC
  • mfrom: (1.1.2 upstream)
  • Revision ID: james.westby@ubuntu.com-20091110122104-432yau0haobyl122
Tags: 0.40.6-1
* Adopting this (Closes: #546954).
* Create new bristol-data runtime package, it will contain application's
  architecture-indipendent data files.
* Drop all patches, now useless.
* Switch to debhelper 7.
* debian/copyright: Update according to DEP-5 spec.
* debian/bristol.1: Fix little spelling mistake.
* Replace patch system, from dpatch to quilt.
* Add 01-spelling_errors.patch patch to fix spelling-error-in-binary.
* debian/rules: dh_makeshlibs doesn't touch shlibs/symbols file, libraries
  under /usr/lib/bristol/ are private.

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,2008
 
4
 *  Copyright (c) by Nick Copeland <nickycopeland@hotmail.com> 1996,2009
5
5
 *
6
6
 *
7
7
 *   This program is free software; you can redistribute it and/or modify
38
38
extern int initControlPort();
39
39
 
40
40
int
41
 
bristolMidiTCPOpen(char *devname, int flags, int chan, int msgs,
 
41
bristolMidiTCPOpen(char *host, int flags, int chan, int msgs,
42
42
int (*callback)(), void *param, int dev, int handle)
43
43
{
44
 
/* printf("bristolMidiTCPOpen(%s, %i, %i)\n", devname, chan, dev); */
 
44
/* printf("bristolMidiTCPOpen(%s, %i, %i)\n", host, chan, dev); */
45
45
        /*
46
46
         * See if we are active or passive.
47
47
         */
51
51
                 * This is the server, or in our case the engine, side of operations.
52
52
                 * we need to open a listening socket, and bind it to an address.
53
53
                 */
54
 
                return(bristolMidiTCPPassive(devname, flags, chan, msgs, callback,
 
54
                return(bristolMidiTCPPassive(host, flags, chan, msgs, callback,
55
55
                        param, dev, handle));
56
56
        } else {
57
57
                /*
58
58
                 * This is the client side, we should have a station address in "dev"
59
59
                 * and we connect to this address.
60
60
                 */
61
 
                return(bristolMidiTCPActive(devname, flags, chan, msgs, callback,
 
61
                return(bristolMidiTCPActive(host, flags, chan, msgs, callback,
62
62
                        param, dev, handle));
63
63
        }
64
64
}
65
65
 
66
66
int
67
 
bristolMidiTCPActive(char *devname, int conntype, int chan, int msgs,
 
67
bristolMidiTCPActive(char *host, int conntype, int chan, int msgs,
68
68
int (*callback)(), void *param, int dev, int handle)
69
69
{
70
70
#ifdef DEBUG
71
 
        printf("bristolMidiTCPActive(%i, %i)\n", dev, handle);
 
71
        printf("bristolMidiTCPActive(%i, %i)\n", host, handle);
72
72
#endif
73
73
 
74
74
        if (conntype & BRISTOL_CONN_UNIX)
89
89
 
90
90
        if (conntype)
91
91
        {
92
 
                if ((bmidi.dev[dev].fd = initControlPort(devname, chan)) < 0)
 
92
                if ((bmidi.dev[dev].fd = initControlPort(host, chan)) < 0)
93
93
                {
94
94
                        printf("connfailed\n");
95
95
                        return(BRISTOL_MIDI_CHANNEL);