/*
This file is part of LilyPond, the GNU music typesetter.
- Copyright (C) 2001--2010 Han-Wen Nienhuys <hanwen@xs4all.nl>
+ Copyright (C) 2001--2011 Han-Wen Nienhuys <hanwen@xs4all.nl>
Jan Nieuwenhuizen <janneke@gnu.org>
#if 0
int x = 0;
int *track = &x;
-#define debug_print(f, args...) fprintf (stderr, "%s:%d: track: %p :" f, __FUNCTION__, __LINE__, *track, ##args)
+#define urg_debug_print(f, args...) fprintf (stderr, "%s:%d: track: %p: " f, __FUNCTION__, __LINE__, *track, ##args)
+#define debug_print(f, args...) fprintf (stderr, f, ##args)
#else
#define debug_print(f, args...)
#endif
sum = (sum << 8) + (unsigned char) (*str)[i];
*str += length;
- debug_print ("%d:\n", sum);
+ debug_print ("%ld:\n", sum);
return sum;
}
if (!(x & 0x80))
break;
}
- debug_print ("%d:\n", sum);
+ debug_print ("%ld:\n", sum);
return sum;
}
track_len = get_number (track, *track + 4, 4);
- debug_print ("track_len: %u\n", track_len);
- debug_print ("track_size: %u\n", track_size);
+ debug_print ("track_len: %lu\n", track_len);
+ debug_print ("track_size: %lu\n", track_size);
debug_print ("track begin: %p\n", track);
debug_print ("track end: %p\n", track + track_len);
format = get_number (midi, *midi + 2, 2);
tracks = get_number (midi, *midi + 2, 2);
- if (tracks > 32)
+ if (tracks > 256)
return midi_error (__FUNCTION__, ": too many tracks: ", compat_itoa (tracks));
division = get_number (midi, *midi + 2, 2) * 4;