Minor cleanup of debugging output.
This commit is contained in:
parent
fe8fab22df
commit
58c2dad706
8
Makefile
8
Makefile
|
@ -10,16 +10,16 @@ DOCUMENT_PATH=$(PREFIX)/share/doc/non-sequencer/
|
|||
USE_LASH=1
|
||||
|
||||
# Debugging
|
||||
CFLAGS:=-O0 -ggdb -fno-omit-frame-pointer -Wall
|
||||
# CFLAGS:=-O0 -ggdb -fno-omit-frame-pointer -Wall
|
||||
# Production
|
||||
# CFLAGS:=-O3 -fomit-frame-pointer -DNDEBUG
|
||||
CFLAGS:=-O3 -fomit-frame-pointer -DNDEBUG
|
||||
|
||||
CFLAGS+=-DINSTALL_PREFIX=\"$(PREFIX)\" \
|
||||
-DSYSTEM_PATH=\"$(SYSTEM_PATH)\" \
|
||||
-DDOCUMENT_PATH=\"$(DOCUMENT_PATH)\"
|
||||
|
||||
CXXFLAGS:=$(CFLAGS) -fno-exceptions -fno-rtti `fltk-config --cxxflags` `pkg-config jack --atleast-version 0.105 || echo -DJACK_MIDI_PROTO_API` `pkg-config jack --cflags` `pkg-config --cflags sigc++-2.0`
|
||||
LIBS=`pkg-config --libs jack` `fltk-config --use-images --ldflags` `pkg-config --libs sigc++-2.0`
|
||||
LIBS=`pkg-config --libs jack` `fltk-config --use-images --ldflags` `pkg-config --libs sigc++-2.0`
|
||||
|
||||
ifeq ($(USE_LASH),1)
|
||||
LIBS+=-llash
|
||||
|
@ -53,7 +53,7 @@ SRCS= \
|
|||
|
||||
OBJS=$(SRCS:.C=.o)
|
||||
|
||||
.PHONEY: all clean install
|
||||
.PHONEY: all clean install
|
||||
|
||||
all: non makedepend
|
||||
|
||||
|
|
5
debug.h
5
debug.h
|
@ -100,16 +100,15 @@ warnf ( warning_t level,
|
|||
|
||||
#ifndef NDEBUG
|
||||
#define DEBUG( fmt, args... ) warnf( W_MESSAGE, __MODULE__, __FILE__, __FUNCTION__, __LINE__, fmt, ## args )
|
||||
#define ASSERTION( fmt, args... ) ( warnf( W_ASSERTION, __MODULE__, __FILE__, __FUNCTION__, __LINE__, fmt, ## args ), abort() )
|
||||
#define ASSERT( pred, fmt, args... ) ( do { if ( ! (pred) ) warnf( W_ASSERTION, __MODULE__, __FILE__, __FUNCTION__, __LINE__, fmd, ## args ); abort(); } while ( 0 ) )
|
||||
#else
|
||||
#define DEBUG( fmt, args... )
|
||||
#define ASSERTION( fmt, args... )
|
||||
#define ASSERT( pred, fmt, args... )
|
||||
#endif
|
||||
|
||||
/* this one's always defined */
|
||||
/* these are always defined */
|
||||
#define MESSAGE( fmt, args... ) warnf( W_MESSAGE, __MODULE__, __FILE__, __FUNCTION__, __LINE__, fmt, ## args )
|
||||
#define WARNING( fmt, args... ) warnf( W_WARNING, __MODULE__, __FILE__, __FUNCTION__, __LINE__, fmt, ## args )
|
||||
#define ASSERTION( fmt, args... ) ( warnf( W_ASSERTION, __MODULE__, __FILE__, __FUNCTION__, __LINE__, fmt, ## args ), abort() )
|
||||
|
||||
#endif
|
||||
|
|
29
grid.C
29
grid.C
|
@ -25,9 +25,6 @@
|
|||
|
||||
#include "smf.H"
|
||||
|
||||
#define RD ( _locked ? ASSERTION( "invalid read" ) : _rd )
|
||||
#define WR ( ! locked ? ASSERTION( "invalid write" ) : _wr )
|
||||
|
||||
Grid::Grid ( void )
|
||||
{
|
||||
_name = NULL;
|
||||
|
@ -98,26 +95,6 @@ Grid::Grid ( const Grid &rhs )
|
|||
viewport = rhs.viewport;
|
||||
}
|
||||
|
||||
#if 0
|
||||
const data *
|
||||
Grid::rd ( void )
|
||||
{
|
||||
if ( _locked )
|
||||
ASSERTION( "invalid read" );
|
||||
|
||||
return _rd;
|
||||
}
|
||||
|
||||
data *
|
||||
Grid::wr ( void )
|
||||
{
|
||||
if ( ! _locked )
|
||||
ASSERTION( "invalid write" );
|
||||
|
||||
return _rw;
|
||||
}
|
||||
#endif
|
||||
|
||||
void
|
||||
Grid::lock ( void )
|
||||
{
|
||||
|
@ -136,9 +113,6 @@ Grid::unlock ( void )
|
|||
{
|
||||
data *d = _history.front();
|
||||
|
||||
if ( d == _rw || d == _rd )
|
||||
ASSERTION( "something bad has happend." );
|
||||
|
||||
delete d;
|
||||
|
||||
_history.pop_front();
|
||||
|
@ -662,8 +636,7 @@ Grid::draw ( Canvas *c, int bx, int by, int bw, int bh )
|
|||
|
||||
|
||||
tick_t ts = e->timestamp();
|
||||
if ( ! e->link() )
|
||||
ASSERTION( "wtf. note is not linked!" );
|
||||
ASSERT( e->link(), "found a non-linked note" );
|
||||
|
||||
tick_t tse = e->link()->timestamp();
|
||||
|
||||
|
|
Loading…
Reference in New Issue