From fb2427e4c2fdf04fc13f434ff764f9679a48c770 Mon Sep 17 00:00:00 2001 From: Jan Breuer <jan.breuer@jaybee.cz> Date: 周三, 05 8月 2015 03:09:03 +0800 Subject: [PATCH] Remove unused debug functionality --- /dev/null | 53 ----------------------------------------------------- libscpi/Makefile | 4 ++-- libscpi/src/parser.c | 2 -- 3 files changed, 2 insertions(+), 57 deletions(-) diff --git a/libscpi/Makefile b/libscpi/Makefile index c703e8a..137ffef 100644 --- a/libscpi/Makefile +++ b/libscpi/Makefile @@ -13,7 +13,7 @@ STATICLIB = lib$(LIBNAME).a SRCS = $(addprefix src/, \ - debug.c error.c fifo.c ieee488.c \ + error.c fifo.c ieee488.c \ minimal.c parser.c units.c utils.c \ lexer.c \ ) @@ -21,7 +21,7 @@ OBJS = $(addprefix $(OBJDIR)/, $(notdir $(SRCS:.c=.o))) HDRS = $(addprefix inc/scpi/, \ - scpi.h constants.h debug.h error.h \ + scpi.h constants.h error.h \ ieee488.h minimal.h parser.h types.h units.h \ ) \ $(addprefix src/, \ diff --git a/libscpi/inc/scpi/debug.h b/libscpi/inc/scpi/debug.h deleted file mode 100644 index 8526a74..0000000 --- a/libscpi/inc/scpi/debug.h +++ /dev/null @@ -1,59 +0,0 @@ -/*- - * Copyright (c) 2012-2013 Jan Breuer, - * - * All Rights Reserved - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``AS IS'' AND ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR - * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE - * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN - * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/** - * @file debug.h - * @date Thu Nov 15 10:58:45 UTC 2012 - * - * @brief SCPI debug function - * - * - */ - -#ifndef SCPI_DEBUG_H -#define SCPI_DEBUG_H - -#include "scpi/types.h" - -#ifdef __cplusplus -extern "C" { -#endif - - - /* #define SCPI_DEBUG_COMMAND(a) SCPI_DebugCommand(a) */ - #define SCPI_DEBUG_COMMAND(a) - - - scpi_bool_t SCPI_DebugCommand(scpi_t * context); - - -#ifdef __cplusplus -} -#endif - -#endif /* SCPI_DEBUG_H */ - diff --git a/libscpi/src/debug.c b/libscpi/src/debug.c deleted file mode 100644 index 15c050c..0000000 --- a/libscpi/src/debug.c +++ /dev/null @@ -1,53 +0,0 @@ -/*- - * Copyright (c) 2012-2013 Jan Breuer, - * - * All Rights Reserved - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``AS IS'' AND ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR - * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE - * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN - * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/** - * @file scpi_debug.c - * @date Thu Nov 15 10:58:45 UTC 2012 - * - * @brief Debugging SCPI - * - * - */ - -#include <stdio.h> -#include "scpi/debug.h" - -/** - * Debug function: show current command and its parameters - * @param context - * @return - */ -scpi_bool_t SCPI_DebugCommand(scpi_t * context) { - size_t res; - printf("**DEBUG: %s (\"", context->param_list.cmd->pattern); - res = fwrite(context->param_list.lex_state.buffer, 1, context->param_list.lex_state.len, stdout); - (void)res; - printf("\" - %lu\r\n", (unsigned long)context->param_list.lex_state.len); - - return TRUE; -} diff --git a/libscpi/src/parser.c b/libscpi/src/parser.c index 921e885..6fa269b 100644 --- a/libscpi/src/parser.c +++ b/libscpi/src/parser.c @@ -44,7 +44,6 @@ #include "scpi/error.h" #include "scpi/constants.h" #include "scpi/utils.h" -#include "scpi/debug.h" /** * Write data to SCPI output @@ -130,7 +129,6 @@ context->output_count = 0; context->input_count = 0; - SCPI_DEBUG_COMMAND(context); /* if callback exists - call command callback */ if (cmd->callback != NULL) { if ((cmd->callback(context) != SCPI_RES_OK) && !context->cmd_error) { -- Gitblit v1.9.1