Minor cleanup of debugging output.
This commit is contained in:
parent
fe8fab22df
commit
58c2dad706
4
Makefile
4
Makefile
|
@ -10,9 +10,9 @@ DOCUMENT_PATH=$(PREFIX)/share/doc/non-sequencer/
|
||||||
USE_LASH=1
|
USE_LASH=1
|
||||||
|
|
||||||
# Debugging
|
# Debugging
|
||||||
CFLAGS:=-O0 -ggdb -fno-omit-frame-pointer -Wall
|
# CFLAGS:=-O0 -ggdb -fno-omit-frame-pointer -Wall
|
||||||
# Production
|
# Production
|
||||||
# CFLAGS:=-O3 -fomit-frame-pointer -DNDEBUG
|
CFLAGS:=-O3 -fomit-frame-pointer -DNDEBUG
|
||||||
|
|
||||||
CFLAGS+=-DINSTALL_PREFIX=\"$(PREFIX)\" \
|
CFLAGS+=-DINSTALL_PREFIX=\"$(PREFIX)\" \
|
||||||
-DSYSTEM_PATH=\"$(SYSTEM_PATH)\" \
|
-DSYSTEM_PATH=\"$(SYSTEM_PATH)\" \
|
||||||
|
|
5
debug.h
5
debug.h
|
@ -100,16 +100,15 @@ warnf ( warning_t level,
|
||||||
|
|
||||||
#ifndef NDEBUG
|
#ifndef NDEBUG
|
||||||
#define DEBUG( fmt, args... ) warnf( W_MESSAGE, __MODULE__, __FILE__, __FUNCTION__, __LINE__, fmt, ## args )
|
#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 ) )
|
#define ASSERT( pred, fmt, args... ) ( do { if ( ! (pred) ) warnf( W_ASSERTION, __MODULE__, __FILE__, __FUNCTION__, __LINE__, fmd, ## args ); abort(); } while ( 0 ) )
|
||||||
#else
|
#else
|
||||||
#define DEBUG( fmt, args... )
|
#define DEBUG( fmt, args... )
|
||||||
#define ASSERTION( fmt, args... )
|
|
||||||
#define ASSERT( pred, fmt, args... )
|
#define ASSERT( pred, fmt, args... )
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* this one's always defined */
|
/* these are always defined */
|
||||||
#define MESSAGE( fmt, args... ) warnf( W_MESSAGE, __MODULE__, __FILE__, __FUNCTION__, __LINE__, fmt, ## args )
|
#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 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
|
#endif
|
||||||
|
|
29
grid.C
29
grid.C
|
@ -25,9 +25,6 @@
|
||||||
|
|
||||||
#include "smf.H"
|
#include "smf.H"
|
||||||
|
|
||||||
#define RD ( _locked ? ASSERTION( "invalid read" ) : _rd )
|
|
||||||
#define WR ( ! locked ? ASSERTION( "invalid write" ) : _wr )
|
|
||||||
|
|
||||||
Grid::Grid ( void )
|
Grid::Grid ( void )
|
||||||
{
|
{
|
||||||
_name = NULL;
|
_name = NULL;
|
||||||
|
@ -98,26 +95,6 @@ Grid::Grid ( const Grid &rhs )
|
||||||
viewport = rhs.viewport;
|
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
|
void
|
||||||
Grid::lock ( void )
|
Grid::lock ( void )
|
||||||
{
|
{
|
||||||
|
@ -136,9 +113,6 @@ Grid::unlock ( void )
|
||||||
{
|
{
|
||||||
data *d = _history.front();
|
data *d = _history.front();
|
||||||
|
|
||||||
if ( d == _rw || d == _rd )
|
|
||||||
ASSERTION( "something bad has happend." );
|
|
||||||
|
|
||||||
delete d;
|
delete d;
|
||||||
|
|
||||||
_history.pop_front();
|
_history.pop_front();
|
||||||
|
@ -662,8 +636,7 @@ Grid::draw ( Canvas *c, int bx, int by, int bw, int bh )
|
||||||
|
|
||||||
|
|
||||||
tick_t ts = e->timestamp();
|
tick_t ts = e->timestamp();
|
||||||
if ( ! e->link() )
|
ASSERT( e->link(), "found a non-linked note" );
|
||||||
ASSERTION( "wtf. note is not linked!" );
|
|
||||||
|
|
||||||
tick_t tse = e->link()->timestamp();
|
tick_t tse = e->link()->timestamp();
|
||||||
|
|
||||||
|
|
2
lash.C
2
lash.C
|
@ -40,6 +40,8 @@ Lash::Lash ( )
|
||||||
bool
|
bool
|
||||||
Lash::init ( int *argc, char ***argv )
|
Lash::init ( int *argc, char ***argv )
|
||||||
{
|
{
|
||||||
|
MESSAGE( "Initializing LASH" );
|
||||||
|
|
||||||
if ( ! ( _client = lash_init( lash_extract_args( argc, argv ), APP_NAME,
|
if ( ! ( _client = lash_init( lash_extract_args( argc, argv ), APP_NAME,
|
||||||
LASH_Config_File, LASH_PROTOCOL( 2, 0 ) ) ) )
|
LASH_Config_File, LASH_PROTOCOL( 2, 0 ) ) ) )
|
||||||
return false;
|
return false;
|
||||||
|
|
Loading…
Reference in New Issue