From 23838cbb7fc78a020bf5939f652e94d326c6d57e Mon Sep 17 00:00:00 2001 From: Thomas White Date: Wed, 10 Mar 2010 18:14:24 +0100 Subject: Make DirAx verbosity optional --- src/dirax.c | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) (limited to 'src') diff --git a/src/dirax.c b/src/dirax.c index a9288f2f..a9694f46 100644 --- a/src/dirax.c +++ b/src/dirax.c @@ -39,6 +39,9 @@ #include "peaks.h" +#define DIRAX_VERBOSE 0 + + typedef enum { DIRAX_INPUT_NONE, DIRAX_INPUT_LINE, @@ -48,7 +51,9 @@ typedef enum { static void dirax_parseline(const char *line, struct image *image) { - int i, rf; + int rf, i; + + #if DIRAX_VERBOSE char *copy; copy = strdup(line); @@ -56,8 +61,9 @@ static void dirax_parseline(const char *line, struct image *image) if ( copy[i] == '\r' ) copy[i]='r'; if ( copy[i] == '\n' ) copy[i]='\0'; } - //STATUS("DirAx: %s\n", copy); + STATUS("DirAx: %s\n", copy); free(copy); + #endif if ( strstr(line, "reflections from file") ) { ERROR("DirAx can't understand this data.\n"); @@ -110,18 +116,20 @@ static void dirax_parseline(const char *line, struct image *image) static void dirax_sendline(const char *line, struct image *image) { + #if DIRAX_VERBOSE char *copy; int i; - write(image->dirax_pty, line, strlen(line)); - copy = strdup(line); for ( i=0; idirax_pty, line, strlen(line)); } -- cgit v1.2.3