Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Apply formatting and remove more trace statements #209

Open
wants to merge 2 commits into
base: dev
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ spotless {
java {
importOrder()
removeUnusedImports()
endWithNewline()
eclipse()
}
}
Expand Down
62 changes: 0 additions & 62 deletions src/main/c/include/SerialImp.h
Original file line number Diff line number Diff line change
Expand Up @@ -294,68 +294,6 @@ Trent
# define SELECT select
#endif /* WIN32 */

#if defined(DEBUG_TIMING) && ! defined(WIN32) /* WIN32 does not have gettimeofday() */
struct timeval snow, enow, seloop, eeloop;
#ifdef __APPLE__
#define report_time_eventLoop( ) { \
if ( seloop.tv_sec == eeloop.tv_sec && seloop.tv_usec == eeloop.tv_usec ) \
{ \
gettimeofday(&eeloop, NULL); \
seloop.tv_sec = eeloop.tv_sec; \
seloop.tv_usec = eeloop.tv_usec; \
printf("%8li sec : %8i usec\n", eeloop.tv_sec - seloop.tv_sec, eeloop.tv_usec - seloop.tv_usec); \
} \
}
#define report_time( ) \
{ \
struct timeval now; \
gettimeofday(&now, NULL); \
printf("%8s : %5i : %8li sec : %8i usec\n", __TIME__, __LINE__, now.tv_sec, now.tv_usec); \
}
#define report_time_start( ) \
{ \
gettimeofday(&snow, NULL); \
printf("%8s : %5i : %8li sec : %8i usec", __TIME__, __LINE__, snow.tv_sec, snow.tv_usec); \
}
#define report_time_end( ) \
{ \
gettimeofday(&enow, NULL); \
printf("%8li sec : %8i usec\n", enow.tv_sec - snow.tv_sec, enow.tv_sec - snow.tv_sec?snow.tv_usec-enow.tv_usec:enow.tv_usec - snow.tv_usec); \
}
#else /* ! __APPLE__ */
#define report_time_eventLoop( ) { \
if ( seloop.tv_sec == eeloop.tv_sec && seloop.tv_usec == eeloop.tv_usec ) \
{ \
gettimeofday(&eeloop, NULL); \
seloop.tv_sec = eeloop.tv_sec; \
seloop.tv_usec = eeloop.tv_usec; \
printf("%8li sec : %8li usec\n", eeloop.tv_sec - seloop.tv_sec, eeloop.tv_usec - seloop.tv_usec); \
} \
}
#define report_time( ) \
{ \
struct timeval now; \
gettimeofday(&now, NULL); \
printf("%8s : %5i : %8li sec : %8li usec\n", __TIME__, __LINE__, now.tv_sec, now.tv_usec); \
}
#define report_time_start( ) \
{ \
gettimeofday(&snow, NULL); \
printf("%8s : %5i : %8li sec : %8li usec", __TIME__, __LINE__, snow.tv_sec, snow.tv_usec); \
}
#define report_time_end( ) \
{ \
gettimeofday(&enow, NULL); \
printf("%8li sec : %8li usec\n", enow.tv_sec - snow.tv_sec, enow.tv_sec - snow.tv_sec?snow.tv_usec-enow.tv_usec:enow.tv_usec - snow.tv_usec); \
}
#endif /* __APPLE__ */
#else /* ! DEBUG_TIMING || WIN32 */
#define report_time_eventLoop( ){};
#define report_time( ) {}
#define report_time_start( ) {}
#define report_time_end( ) {}
#endif /* DEBUG_TIMING && ! WIN32 */

/* allow people to override the directories */
/* #define USER_LOCK_DIRECTORY "/home/tjarvi/1.5/build" */
#ifdef USER_LOCK_DIRECTORY
Expand Down
5 changes: 0 additions & 5 deletions src/main/c/include/slf4j.h
Original file line number Diff line number Diff line change
Expand Up @@ -91,11 +91,6 @@ typedef enum LogLevel
LOG_LEVELS
} LogLevel;

/** \brief Trace-level log to denote entering a function. */
#define ENTER(x) slf4j_log(LOG_TRACE, "entering " x)
/** \brief Trace-level log to denote leaving a function. */
#define LEAVE(x) slf4j_log(LOG_TRACE, "leaving " x)

/**
* \brief Log a ERROR-level message through SLF4J.
*
Expand Down
7 changes: 0 additions & 7 deletions src/main/c/include/windows/win32termios.h
Original file line number Diff line number Diff line change
Expand Up @@ -60,13 +60,6 @@
#include <windows.h>
#include <sys/types.h>
#include <io.h>
#ifdef TRACE
#define ENTER(x) report("entering "x" \n");
#define LEAVE(x) report("leaving "x" \n");
#else
#define ENTER(x)
#define LEAVE(x)
#endif /* TRACE */
#if defined(_MSC_VER)
# define snprintf _snprintf
#endif
Expand Down
Loading