source file of the GNU LilyPond music typesetter
- (c) 2001 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+ (c) 2001--2005 Han-Wen Nienhuys <hanwen@cs.uu.nl>
Jan Nieuwenhuizen <janneke@gnu.org>
*/
/*
-python2
+python
import midi
s = open ("s.midi").read ()
midi.parse_track (s)
*/
-#include "config.h"
-
-/* urg */
-#if HAVE_PYTHON2_PYTHON_H
-#include <python2/Python.h>
-#elif HAVE_PYTHON2_2_PYTHON_H
-#include <python2.2/Python.h>
-#elif HAVE_PYTHON2_1_PYTHON_H
-#include <python2.1/Python.h>
-#elif HAVE_PYTHON2_0_PYTHON_H
-#include <python2.0/Python.h>
-#elif HAVE_PYTHON1_5_PYTHON_H
-#include <python1.5/Python.h>
-#elif HAVE_PYTHON_PYTHON_H
-#define assert(x)
-#include <python/Python.h>
-#elif HAVE_PYTHON_H
-#define assert(x)
#include <Python.h>
-#else
-#error Need Python.h
-#endif
#if 0
int x = 0;
static PyObject *Midi_warning;
static PyObject *
-midi_error (char * func, char *s)
+midi_error (char const *func, char *s)
{
char*dest = (char*) malloc (sizeof (char) * (strlen (func) + strlen (s) + 1));
strcpy (dest, func);
}
static PyObject *
-midi_warning (char *s)
+midi_warning (char const *s)
{
PyErr_SetString (Midi_warning, s);
return 0;
{0, 0} /* Sentinel */
};
+void
initmidi ()
{
PyObject *m, *d;