From 3e98ae3c55d4135d56b3a9c2c5429ebba3f51a69 Mon Sep 17 00:00:00 2001
From: Jan Breuer <jan.breuer@jaybee.cz>
Date: 周二, 13 10月 2015 00:24:37 +0800
Subject: [PATCH] Cleanup of matchCommand

---
 libscpi/src/ieee488.c |   28 ++++++++++++++--------------
 1 files changed, 14 insertions(+), 14 deletions(-)

diff --git a/libscpi/src/ieee488.c b/libscpi/src/ieee488.c
index 0593d23..cd527e3 100644
--- a/libscpi/src/ieee488.c
+++ b/libscpi/src/ieee488.c
@@ -105,7 +105,7 @@
     if ((name >= SCPI_REG_COUNT) || (context->registers == NULL)) {
         return;
     }
-    
+
     /* store old register value */
     old_val = context->registers[name];
 
@@ -148,8 +148,8 @@
         case SCPI_REG_OPERE:
             regUpdate(context, SCPI_REG_OPER);
             break;
-            
-            
+
+
         case SCPI_REG_COUNT:
             /* nothing to do */
             break;
@@ -211,8 +211,8 @@
  */
 scpi_result_t SCPI_CoreEse(scpi_t * context) {
     int32_t new_ESE;
-    if (SCPI_ParamInt(context, &new_ESE, TRUE)) {
-        SCPI_RegSet(context, SCPI_REG_ESE, (scpi_reg_val_t)new_ESE);
+    if (SCPI_ParamInt32(context, &new_ESE, TRUE)) {
+        SCPI_RegSet(context, SCPI_REG_ESE, (scpi_reg_val_t) new_ESE);
     }
     return SCPI_RES_OK;
 }
@@ -223,7 +223,7 @@
  * @return 
  */
 scpi_result_t SCPI_CoreEseQ(scpi_t * context) {
-    SCPI_ResultInt(context, SCPI_RegGet(context, SCPI_REG_ESE));
+    SCPI_ResultInt32(context, SCPI_RegGet(context, SCPI_REG_ESE));
     return SCPI_RES_OK;
 }
 
@@ -233,7 +233,7 @@
  * @return 
  */
 scpi_result_t SCPI_CoreEsrQ(scpi_t * context) {
-    SCPI_ResultInt(context, SCPI_RegGet(context, SCPI_REG_ESR));
+    SCPI_ResultInt32(context, SCPI_RegGet(context, SCPI_REG_ESR));
     SCPI_RegSet(context, SCPI_REG_ESR, 0);
     return SCPI_RES_OK;
 }
@@ -251,7 +251,7 @@
  */
 scpi_result_t SCPI_CoreIdnQ(scpi_t * context) {
     int i;
-    for (i = 0; i<4; i++) {
+    for (i = 0; i < 4; i++) {
         if (context->idn[i]) {
             SCPI_ResultMnemonic(context, context->idn[i]);
         } else {
@@ -278,7 +278,7 @@
  */
 scpi_result_t SCPI_CoreOpcQ(scpi_t * context) {
     /* Operation is always completed */
-    SCPI_ResultInt(context, 1);
+    SCPI_ResultInt32(context, 1);
     return SCPI_RES_OK;
 }
 
@@ -301,8 +301,8 @@
  */
 scpi_result_t SCPI_CoreSre(scpi_t * context) {
     int32_t new_SRE;
-    if (SCPI_ParamInt(context, &new_SRE, TRUE)) {
-        SCPI_RegSet(context, SCPI_REG_SRE, (scpi_reg_val_t)new_SRE);
+    if (SCPI_ParamInt32(context, &new_SRE, TRUE)) {
+        SCPI_RegSet(context, SCPI_REG_SRE, (scpi_reg_val_t) new_SRE);
     }
     return SCPI_RES_OK;
 }
@@ -313,7 +313,7 @@
  * @return 
  */
 scpi_result_t SCPI_CoreSreQ(scpi_t * context) {
-    SCPI_ResultInt(context, SCPI_RegGet(context, SCPI_REG_SRE));
+    SCPI_ResultInt32(context, SCPI_RegGet(context, SCPI_REG_SRE));
     return SCPI_RES_OK;
 }
 
@@ -323,7 +323,7 @@
  * @return 
  */
 scpi_result_t SCPI_CoreStbQ(scpi_t * context) {
-    SCPI_ResultInt(context, SCPI_RegGet(context, SCPI_REG_STB));
+    SCPI_ResultInt32(context, SCPI_RegGet(context, SCPI_REG_STB));
     return SCPI_RES_OK;
 }
 
@@ -334,7 +334,7 @@
  */
 scpi_result_t SCPI_CoreTstQ(scpi_t * context) {
     (void) context;
-    SCPI_ResultInt(context, 0);
+    SCPI_ResultInt32(context, 0);
     return SCPI_RES_OK;
 }
 

--
Gitblit v1.9.1