From 6110e0eeedb48c81fad0e5175aa3639f1a703bfa Mon Sep 17 00:00:00 2001
From: Jan Breuer <jan.breuer@jaybee.cz>
Date: 周一, 12 10月 2015 21:51:20 +0800
Subject: [PATCH] Format and trailing space cleanup

---
 examples/common/scpi-def.c |   30 +++++++++++++++---------------
 1 files changed, 15 insertions(+), 15 deletions(-)

diff --git a/examples/common/scpi-def.c b/examples/common/scpi-def.c
index 91658e6..64c9d45 100644
--- a/examples/common/scpi-def.c
+++ b/examples/common/scpi-def.c
@@ -55,19 +55,18 @@
         // do something, if parameter not present
     }
 
-    
+
     SCPI_NumberToStr(context, scpi_special_numbers_def, &param1, bf, 15);
     fprintf(stderr, "\tP1=%s\r\n", bf);
 
-    
+
     SCPI_NumberToStr(context, scpi_special_numbers_def, &param2, bf, 15);
     fprintf(stderr, "\tP2=%s\r\n", bf);
 
     SCPI_ResultDouble(context, 0);
-    
+
     return SCPI_RES_OK;
 }
-
 
 static scpi_result_t DMM_MeasureVoltageAcQ(scpi_t * context) {
     scpi_number_t param1, param2;
@@ -84,16 +83,16 @@
         // do something, if parameter not present
     }
 
-    
+
     SCPI_NumberToStr(context, scpi_special_numbers_def, &param1, bf, 15);
     fprintf(stderr, "\tP1=%s\r\n", bf);
 
-    
+
     SCPI_NumberToStr(context, scpi_special_numbers_def, &param2, bf, 15);
     fprintf(stderr, "\tP2=%s\r\n", bf);
 
     SCPI_ResultDouble(context, 0);
-    
+
     return SCPI_RES_OK;
 }
 
@@ -138,19 +137,18 @@
     SCPI_CHOICE_LIST_END /* termination of option list */
 };
 
-
 static scpi_result_t TEST_ChoiceQ(scpi_t * context) {
 
     int32_t param;
     const char * name;
-    
+
     if (!SCPI_ParamChoice(context, trigger_source, &param, TRUE)) {
         return SCPI_RES_ERR;
     }
-    
+
     SCPI_ChoiceToName(trigger_source, param, &name);
-    fprintf(stderr, "\tP1=%s (%ld)\r\n", name, (long int)param);
-    
+    fprintf(stderr, "\tP1=%s (%ld)\r\n", name, (long int) param);
+
     SCPI_ResultInt32(context, param);
 
     return SCPI_RES_OK;
@@ -170,7 +168,7 @@
     char buffer[100];
     size_t copy_len;
 
-    if (!SCPI_ParamCopyText(context, buffer, sizeof(buffer), &copy_len, FALSE)) {
+    if (!SCPI_ParamCopyText(context, buffer, sizeof (buffer), &copy_len, FALSE)) {
         buffer[0] = '\0';
     }
 
@@ -278,13 +276,15 @@
 
 scpi_t scpi_context = {
     .cmdlist = scpi_commands,
-    .buffer = {
+    .buffer =
+    {
         .length = SCPI_INPUT_BUFFER_LENGTH,
         .data = scpi_input_buffer,
     },
     .interface = &scpi_interface,
     .registers = scpi_regs,
     .units = scpi_units_def,
-    .idn = {"MANUFACTURE", "INSTR2013", NULL, "01-02"},
+    .idn =
+    {"MANUFACTURE", "INSTR2013", NULL, "01-02"},
 };
 

--
Gitblit v1.9.1