From f8d0aa8ec41a50dee5b2b763b84c87c416eba5a7 Mon Sep 17 00:00:00 2001 From: Jan Breuer <jan.breuer@jaybee.cz> Date: 周六, 25 4月 2015 23:02:44 +0800 Subject: [PATCH] Update readme with Multiple Identical Capabilities --- examples/test-tcp/main.c | 8 +++----- 1 files changed, 3 insertions(+), 5 deletions(-) diff --git a/examples/test-tcp/main.c b/examples/test-tcp/main.c index 6aa99aa..03dbf88 100644 --- a/examples/test-tcp/main.c +++ b/examples/test-tcp/main.c @@ -44,6 +44,7 @@ #include <sys/ioctl.h> #include <errno.h> #include <arpa/inet.h> +#include <unistd.h> #include "scpi/scpi.h" #include "../common/scpi-def.h" @@ -63,7 +64,7 @@ int SCPI_Error(scpi_t * context, int_fast16_t err) { (void) context; // BEEP - fprintf(stderr, "**ERROR: %d, \"%s\"\r\n", (int32_t) err, SCPI_ErrorTranslate(err)); + fprintf(stderr, "**ERROR: %d, \"%s\"\r\n", (int16_t) err, SCPI_ErrorTranslate(err)); return 0; } @@ -76,12 +77,9 @@ return SCPI_RES_OK; } -/** - * Return 0 as OK and other number as error - */ scpi_result_t SCPI_Test(scpi_t * context) { fprintf(stderr, "**Test\r\n"); - return 0; + return SCPI_RES_OK; } scpi_result_t SCPI_Reset(scpi_t * context) { -- Gitblit v1.9.1