Jan Breuer
2015-10-12 6110e0eeedb48c81fad0e5175aa3639f1a703bfa
Format and trailing space cleanup
29个文件已修改
194 ■■■■■ 已修改文件
examples/common/scpi-def.c 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
examples/common/scpi-def.cpp 19 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
examples/test-CVI_w_GUI/TestLibscpi.h 补丁 | 查看 | 原始文档 | blame | 历史
examples/test-CVI_w_GUI/main.c 78 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
examples/test-LwIP-netconn/scpi_server.c 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
examples/test-interactive/main.c 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
examples/test-parser/main.c 补丁 | 查看 | 原始文档 | blame | 历史
examples/test-tcp-srq/main.c 19 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
examples/test-tcp/main.c 15 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
libscpi/inc/scpi/constants.h 补丁 | 查看 | 原始文档 | blame | 历史
libscpi/inc/scpi/error.h 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
libscpi/inc/scpi/expression.h 补丁 | 查看 | 原始文档 | blame | 历史
libscpi/inc/scpi/ieee488.h 补丁 | 查看 | 原始文档 | blame | 历史
libscpi/inc/scpi/parser.h 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
libscpi/inc/scpi/scpi.h 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
libscpi/inc/scpi/types.h 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
libscpi/src/error.c 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
libscpi/src/expression.c 21 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
libscpi/src/fifo.c 补丁 | 查看 | 原始文档 | blame | 历史
libscpi/src/ieee488.c 补丁 | 查看 | 原始文档 | blame | 历史
libscpi/src/minimal.c 补丁 | 查看 | 原始文档 | blame | 历史
libscpi/src/parser.c 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
libscpi/src/units.c 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
libscpi/src/utils.c 补丁 | 查看 | 原始文档 | blame | 历史
libscpi/src/utils_private.h 补丁 | 查看 | 原始文档 | blame | 历史
libscpi/test/test_fifo.c 补丁 | 查看 | 原始文档 | blame | 历史
libscpi/test/test_lexer_parser.c 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
libscpi/test/test_parser.c 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
libscpi/test/test_scpi_utils.c 补丁 | 查看 | 原始文档 | blame | 历史
examples/common/scpi-def.c
@@ -68,7 +68,6 @@
    return SCPI_RES_OK;
}
static scpi_result_t DMM_MeasureVoltageAcQ(scpi_t * context) {
    scpi_number_t param1, param2;
    char bf[15];
@@ -137,7 +136,6 @@
    {"EXTernal", 7},
    SCPI_CHOICE_LIST_END /* termination of option list */
};
static scpi_result_t TEST_ChoiceQ(scpi_t * context) {
@@ -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"},
};
examples/common/scpi-def.cpp
@@ -68,7 +68,6 @@
    return SCPI_RES_OK;
}
scpi_result_t DMM_MeasureVoltageAcQ(scpi_t * context) {
    scpi_number_t param1, param2;
    char bf[15];
@@ -137,7 +136,6 @@
    {"EXTernal", 7},
    SCPI_CHOICE_LIST_END /* termination of option list */
};
scpi_result_t TEST_ChoiceQ(scpi_t * context) {
@@ -277,8 +275,12 @@
scpi_t scpi_context = {
    /* cmdlist */ scpi_commands,
    /* buffer */ { /* length */ SCPI_INPUT_BUFFER_LENGTH, /* position */ 0, /* data */ scpi_input_buffer},
    /* param_list */ { /* cmd */ NULL, /* lex_state */ {NULL, NULL, 0}, /* cmd_raw */ {0, 0, NULL}},
    /* buffer */
    { /* length */ SCPI_INPUT_BUFFER_LENGTH, /* position */ 0, /* data */ scpi_input_buffer},
    /* param_list */
    { /* cmd */ NULL, /* lex_state */
        {NULL, NULL, 0}, /* cmd_raw */
        {0, 0, NULL}},
    /* interface */ &scpi_interface,
    /* output_count */ 0,
    /* input_count */ 0,
@@ -287,7 +289,12 @@
    /* registers */ scpi_regs,
    /* units */ scpi_units_def,
    /* user_context */ NULL,
    /* parser_state */ { /* programHeader */ {SCPI_TOKEN_UNKNOWN, NULL, 0}, /* programData */ {SCPI_TOKEN_UNKNOWN, NULL, 0}, /* numberOfParameters */ 0, /* termination */ SCPI_MESSAGE_TERMINATION_NONE},
    /* idn */ {"MANUFACTURE", "INSTR2013", NULL, "01-02"},
    /* parser_state */
    { /* programHeader */
        {SCPI_TOKEN_UNKNOWN, NULL, 0}, /* programData */
        {SCPI_TOKEN_UNKNOWN, NULL, 0}, /* numberOfParameters */ 0, /* termination */ SCPI_MESSAGE_TERMINATION_NONE
    },
    /* idn */
    {"MANUFACTURE", "INSTR2013", NULL, "01-02"},
};
examples/test-CVI_w_GUI/TestLibscpi.h
examples/test-CVI_w_GUI/main.c
@@ -69,17 +69,15 @@
/* helper function to remove <LF> and <CR> from the end of a string */
/* this is needed only here for the GUI, there is a 'insert line to a text box' function */
/* that automatically adds a new line, so this prohibits double line feeds for the GUI */
void removeTrailingEndcodes(char *buf)
{
void removeTrailingEndcodes(char *buf) {
   int len;
   len = strlen(buf);
   
   while(len > 0)
   {
    while (len > 0) {
      len--;
      switch(buf[len])
      {
        switch (buf[len]) {
         case '\n'   :
         case '\r'   :
                        buf[len] = '\0';
@@ -92,34 +90,29 @@
}
/* wrapper for debugging output, collects debug output until a <LF> */
/* is received, then removes the <LF> and outputs the line on the GUI */
void debug_output(char *buf)
{
void debug_output(char *buf) {
   static char pbuf[512];
   static int pos = 0;
   int len;
   
   len = strlen(buf);
   if(buf[len-1] == '\n')
   {
    if (buf[len - 1] == '\n') {
      buf[len-1] == '\0';
      len--;
      memcpy(&pbuf[pos], buf, len);
      pos = 0;
      InsertTextBoxLine (panelHandle, PANEL_OUTPUTDEBUG, -1, pbuf);
   }
   else
   {
    } else {
      memcpy(&pbuf[pos], buf, len);
      pos += len;
   }
   
}
size_t SCPI_Write(scpi_t * context, const char * data, size_t len)
{
   if((SCPI_outputBuffer_idx + len) > (SCPI_OUPUT_BUFFER_SIZE-1))
   {
size_t SCPI_Write(scpi_t * context, const char * data, size_t len) {
    if ((SCPI_outputBuffer_idx + len) > (SCPI_OUPUT_BUFFER_SIZE - 1)) {
      len = (SCPI_OUPUT_BUFFER_SIZE-1) - SCPI_outputBuffer_idx;    // limit length to left over space
      // apparently there is no mechanism to cope with buffers that are too small
   }
@@ -131,8 +124,7 @@
   return len;
}
scpi_result_t SCPI_Flush(scpi_t * context)
{
scpi_result_t SCPI_Flush(scpi_t * context) {
// fwrite(SCPI_outputBuffer, 1, SCPI_outputBuffer_idx, stdout);
   removeTrailingEndcodes(SCPI_outputBuffer);
   InsertTextBoxLine (panelHandle, PANEL_OUTPUT, -1, SCPI_outputBuffer);
@@ -140,8 +132,7 @@
   return SCPI_RES_OK;
}
int SCPI_Error(scpi_t * context, int_fast16_t err)
{
int SCPI_Error(scpi_t * context, int_fast16_t err) {
   char buf[512];
   
//  fprintf(stderr, "**ERROR: %d, \"%s\"\r\n", (int16_t) err, SCPI_ErrorTranslate(err));
@@ -172,12 +163,10 @@
    return SCPI_RES_ERR;
}
/*
 * 
 */
int main(int argc, char** argv)
{
int main(int argc, char** argv) {
   int result;
   SCPI_Init(&scpi_context);
@@ -196,17 +185,14 @@
   return (EXIT_SUCCESS);
}
void updateSSCPIRegister(void)
{
void updateSSCPIRegister(void) {
   updateSTB();
   updateSRE();
   updateESR();
   updateESE();
}
void updateSTB(void)
{
void updateSTB(void) {
   scpi_reg_val_t regVal;
   
   regVal = SCPI_RegGet(&scpi_context, SCPI_REG_STB);
@@ -214,8 +200,7 @@
   gui_updateSTB((uint8_t)(0x00FF & regVal));
}
void updateESR(void)
{
void updateESR(void) {
   scpi_reg_val_t regVal;
   
   regVal = SCPI_RegGet(&scpi_context, SCPI_REG_ESR);
@@ -223,8 +208,7 @@
   gui_updateESR((uint8_t)(0x00FF & regVal));
}
void updateESE(void)
{
void updateESE(void) {
   scpi_reg_val_t regVal;
   
   regVal = SCPI_RegGet(&scpi_context, SCPI_REG_ESE);
@@ -232,8 +216,7 @@
   gui_updateESE((uint8_t)(0x00FF & regVal));
}
void updateSRE(void)
{
void updateSRE(void) {
   scpi_reg_val_t regVal;
   
   regVal = SCPI_RegGet(&scpi_context, SCPI_REG_SRE);
@@ -241,19 +224,16 @@
   gui_updateSRE((uint8_t)(0x00FF & regVal));
}
/*
 *  The CALLBACK functions below are called from the CVI runtime engine when
 *  user clicks on buttons, inputs data on the GUI etc. 
 */
int CVICALLBACK cb_scpi_input (int panel, int control, int event,
      void *callbackData, int eventData1, int eventData2)
{
        void *callbackData, int eventData1, int eventData2) {
   char buf[256];
   int len;
   
   switch (event)
   {
    switch (event) {
      case EVENT_COMMIT:
         GetCtrlVal(panel, control, buf);
         /* we have to add a endcode to make SCPI accept the string, here a <LF> is added */
@@ -269,10 +249,8 @@
}
int CVICALLBACK cb_quit (int panel, int control, int event,
      void *callbackData, int eventData1, int eventData2)
{
   switch (event)
   {
        void *callbackData, int eventData1, int eventData2) {
    switch (event) {
      case EVENT_COMMIT:
         QuitUserInterface (0);
         break;
@@ -283,8 +261,7 @@
/*
 * Helper functions for GUI
 */
void gui_updateSTB(uint8_t newSTB)
{
void gui_updateSTB(uint8_t newSTB) {
   char buf[5];
   
   sprintf(buf, "0x%02X", newSTB);
@@ -303,8 +280,7 @@
}
void gui_updateESR(uint8_t newESR)
{
void gui_updateESR(uint8_t newESR) {
   char buf[5];
   
   sprintf(buf, "0x%02X", newESR);
@@ -320,8 +296,7 @@
   SetCtrlVal(panelHandle, PANEL_ESR7, (newESR & 0x80));
}
void gui_updateESE(uint8_t newESE)
{
void gui_updateESE(uint8_t newESE) {
   char buf[5];
   
   sprintf(buf, "0x%02X", newESE);
@@ -337,8 +312,7 @@
   SetCtrlVal(panelHandle, PANEL_ESE7, (newESE & 0x80));
}
void gui_updateSRE(uint8_t newSRE)
{
void gui_updateSRE(uint8_t newSRE) {
   char buf[5];
   
   sprintf(buf, "0x%02X", newSRE);
examples/test-LwIP-netconn/scpi_server.c
@@ -73,8 +73,7 @@
    //fd_set fds;
} user_data_t;
struct _queue_event_t
{
struct _queue_event_t {
    uint8_t cmd;
    uint8_t param1;
    int16_t param2;
@@ -155,7 +154,6 @@
    SCPI_ResultInt(context, CONTROL_PORT);
    return SCPI_RES_OK;
}
static void setEseReq(void) {
    SCPI_RegSetBits(&scpi_context, SCPI_REG_ESR, ESR_REQ);
examples/test-interactive/main.c
@@ -73,6 +73,7 @@
scpi_result_t SCPI_SystemCommTcpipControlQ(scpi_t * context) {
    return SCPI_RES_ERR;
}
/*
 * 
 */
examples/test-parser/main.c
examples/test-tcp-srq/main.c
@@ -51,8 +51,6 @@
#define CONTROL_PORT 5026
typedef struct {
    int io;
    int io_listen;
@@ -88,7 +86,6 @@
    fprintf(stderr, "**ERROR: %d, \"%s\"\r\n", (int16_t) err, SCPI_ErrorTranslate(err));
    return 0;
}
scpi_result_t SCPI_Control(scpi_t * context, scpi_ctrl_name_t ctrl, scpi_reg_val_t val) {
    char b[16];
@@ -133,16 +130,14 @@
    
    /* Create socket */
    fd = socket(AF_INET,SOCK_STREAM, 0);
    if (fd < 0)
    {
    if (fd < 0) {
        perror("socket() failed");
        exit(-1);
    }    
    
    /* Set address reuse enable */
    rc = setsockopt(fd, SOL_SOCKET,  SO_REUSEADDR, (char *)&on, sizeof(on));
    if (rc < 0)
    {
    if (rc < 0) {
        perror("setsockopt() failed");
        close(fd);
        exit(-1);
@@ -150,8 +145,7 @@
   
    /* Set non blocking */
    rc = ioctl(fd, FIONBIO, (char *)&on);
    if (rc < 0)
    {
    if (rc < 0) {
        perror("ioctl() failed");
        close(fd);
        exit(-1);
@@ -159,8 +153,7 @@
    
    /* Bind to socket */
    rc = bind(fd, (struct sockaddr *)&servaddr, sizeof(servaddr));
    if (rc < 0)
    {
    if (rc < 0) {
        perror("bind() failed");
        close(fd);
        exit(-1);
@@ -168,8 +161,7 @@
    
    /* Listen on socket */
    listen(fd, 1);
    if (rc < 0)
    {
    if (rc < 0) {
        perror("listen() failed");
        close(fd);
        exit(-1);
@@ -207,7 +199,6 @@
    
    return rc;
}
static int processIoListen(user_data_t * user_data) {
    struct sockaddr_in cliaddr;
examples/test-tcp/main.c
@@ -100,16 +100,14 @@
    
    /* Create socket */
    fd = socket(AF_INET,SOCK_STREAM, 0);
    if (fd < 0)
    {
    if (fd < 0) {
        perror("socket() failed");
        exit(-1);
    }    
    
    /* Set address reuse enable */
    rc = setsockopt(fd, SOL_SOCKET,  SO_REUSEADDR, (char *)&on, sizeof(on));
    if (rc < 0)
    {
    if (rc < 0) {
        perror("setsockopt() failed");
        close(fd);
        exit(-1);
@@ -117,8 +115,7 @@
   
    /* Set non blocking */
    rc = ioctl(fd, FIONBIO, (char *)&on);
    if (rc < 0)
    {
    if (rc < 0) {
        perror("ioctl() failed");
        close(fd);
        exit(-1);
@@ -126,8 +123,7 @@
    
    /* Bind to socket */
    rc = bind(fd, (struct sockaddr *)&servaddr, sizeof(servaddr));
    if (rc < 0)
    {
    if (rc < 0) {
        perror("bind() failed");
        close(fd);
        exit(-1);
@@ -135,8 +131,7 @@
    
    /* Listen on socket */
    listen(fd, 1);
    if (rc < 0)
    {
    if (rc < 0) {
        perror("listen() failed");
        close(fd);
        exit(-1);
libscpi/inc/scpi/constants.h
libscpi/inc/scpi/error.h
@@ -180,6 +180,7 @@
    XE(SCPI_ERROR_REQUEST_CONTROL,              -700, "Request control")                              \
    XE(SCPI_ERROR_OPERATION_COMPLETE,           -800, "Operation complete")                           \
enum {
#define X(def, val, str) def = val,
#if USE_FULL_ERROR_LIST
libscpi/inc/scpi/expression.h
libscpi/inc/scpi/ieee488.h
libscpi/inc/scpi/parser.h
@@ -48,7 +48,6 @@
    int SCPI_Input(scpi_t * context, const char * data, int len);
    int SCPI_Parse(scpi_t * context, char * data, int len);
    size_t SCPI_ResultCharacters(scpi_t * context, const char * data, size_t len);
#define SCPI_ResultMnemonic(context, data) SCPI_ResultCharacters((context), (data), strlen(data))
    size_t SCPI_ResultUInt32Base(scpi_t * context, uint32_t val, int8_t base);
@@ -60,7 +59,6 @@
    size_t SCPI_ResultText(scpi_t * context, const char * data);
    size_t SCPI_ResultArbitraryBlock(scpi_t * context, const char * data, size_t len);
    size_t SCPI_ResultBool(scpi_t * context, scpi_bool_t val);
    scpi_bool_t SCPI_Parameter(scpi_t * context, scpi_parameter_t * parameter, scpi_bool_t mandatory);
    scpi_bool_t SCPI_ParamIsValid(scpi_parameter_t * parameter);
@@ -74,7 +72,6 @@
    scpi_bool_t SCPI_ParamToDouble(scpi_t * context, scpi_parameter_t * parameter, double * value);
    scpi_bool_t SCPI_ParamToChoice(scpi_t * context, scpi_parameter_t * parameter, const scpi_choice_def_t * options, int32_t * value);
    scpi_bool_t SCPI_ChoiceToName(const scpi_choice_def_t * options, int32_t tag, const char ** text);
    scpi_bool_t SCPI_ParamInt32(scpi_t * context, int32_t * value, scpi_bool_t mandatory);
    scpi_bool_t SCPI_ParamUInt32(scpi_t * context, uint32_t * value, scpi_bool_t mandatory);
@@ -93,7 +90,6 @@
    int32_t SCPI_CmdTag(scpi_t * context);
    scpi_bool_t SCPI_Match(const char * pattern, const char * value, size_t len);
    scpi_bool_t SCPI_CommandNumbers(scpi_t * context, int32_t * numbers, size_t len, int32_t default_value);
    // deprecated finction, should be removed later
#define SCPI_ResultIntBase(context, val, base) SCPI_ResultInt32Base ((context), (val), (base), TRUE)
libscpi/inc/scpi/scpi.h
@@ -46,6 +46,5 @@
#include "scpi/utils.h"
#include "scpi/expression.h"
#endif    /* SCPI_H */
libscpi/inc/scpi/types.h
@@ -255,6 +255,7 @@
    struct _scpi_number_parameter_t {
        scpi_bool_t special;
        union {
            double value;
            int32_t tag;
libscpi/src/error.c
@@ -44,7 +44,6 @@
/* basic FIFO */
static scpi_fifo_t local_error_queue;
/**
 * Initialize error queue
 * @param context - scpi context
libscpi/src/expression.c
@@ -49,8 +49,7 @@
 *         SCPI_EXPR_ERROR - parser error
 *         SCPI_EXPR_NO_MORE - no more data
 */
static scpi_expr_result_t numericRange(lex_state_t * state, scpi_bool_t * isRange, scpi_token_t * valueFrom, scpi_token_t * valueTo)
{
static scpi_expr_result_t numericRange(lex_state_t * state, scpi_bool_t * isRange, scpi_token_t * valueFrom, scpi_token_t * valueTo) {
    if (scpiLex_DecimalNumericProgramData(state, valueFrom)) {
        if (scpiLex_Colon(state, valueTo)) {
            *isRange = TRUE;
@@ -81,8 +80,7 @@
 *         SCPI_EXPR_NO_MORE - no more data
 * @see SCPI_ExprNumericListEntryInt, SCPI_ExprNumericListEntryDouble
 */
scpi_expr_result_t SCPI_ExprNumericListEntry(scpi_t * context, scpi_parameter_t * param, int index, scpi_bool_t * isRange, scpi_parameter_t * valueFrom, scpi_parameter_t * valueTo)
{
scpi_expr_result_t SCPI_ExprNumericListEntry(scpi_t * context, scpi_parameter_t * param, int index, scpi_bool_t * isRange, scpi_parameter_t * valueFrom, scpi_parameter_t * valueTo) {
    lex_state_t lex;
    int i;
    scpi_expr_result_t res = SCPI_EXPR_OK;
@@ -133,8 +131,7 @@
 *         SCPI_EXPR_NO_MORE - no more data
 * @see SCPI_ExprNumericListEntry, SCPI_ExprNumericListEntryDouble
 */
scpi_expr_result_t SCPI_ExprNumericListEntryInt(scpi_t * context, scpi_parameter_t * param, int index, scpi_bool_t * isRange, int32_t * valueFrom, int32_t * valueTo)
{
scpi_expr_result_t SCPI_ExprNumericListEntryInt(scpi_t * context, scpi_parameter_t * param, int index, scpi_bool_t * isRange, int32_t * valueFrom, int32_t * valueTo) {
    scpi_expr_result_t res;
    scpi_bool_t range = FALSE;
    scpi_parameter_t paramFrom;
@@ -165,8 +162,7 @@
 *         SCPI_EXPR_NO_MORE - no more data
 * @see SCPI_ExprNumericListEntry, SCPI_ExprNumericListEntryInt
 */
scpi_expr_result_t SCPI_ExprNumericListEntryDouble(scpi_t * context, scpi_parameter_t * param, int index, scpi_bool_t * isRange, double * valueFrom, double * valueTo)
{
scpi_expr_result_t SCPI_ExprNumericListEntryDouble(scpi_t * context, scpi_parameter_t * param, int index, scpi_bool_t * isRange, double * valueFrom, double * valueTo) {
    scpi_expr_result_t res;
    scpi_bool_t range = FALSE;
    scpi_parameter_t paramFrom;
@@ -192,8 +188,7 @@
 * @param length length of values array
 * @param dimensions real number of dimensions
 */
static scpi_expr_result_t channelSpec(scpi_t * context, lex_state_t * state, int32_t * values, size_t length, size_t * dimensions)
{
static scpi_expr_result_t channelSpec(scpi_t * context, lex_state_t * state, int32_t * values, size_t length, size_t * dimensions) {
    scpi_parameter_t param;
    size_t i = 0;
    while(scpiLex_DecimalNumericProgramData(state, &param)) {
@@ -227,8 +222,7 @@
 * @param length length of values arrays
 * @param dimensions real number of dimensions
 */
static scpi_expr_result_t channelRange(scpi_t * context, lex_state_t * state, scpi_bool_t * isRange, int32_t * valuesFrom, int32_t * valuesTo, size_t length, size_t * dimensions)
{
static scpi_expr_result_t channelRange(scpi_t * context, lex_state_t * state, scpi_bool_t * isRange, int32_t * valuesFrom, int32_t * valuesTo, size_t length, size_t * dimensions) {
    scpi_token_t token;
    scpi_expr_result_t err;
    size_t fromDimensions;
@@ -267,8 +261,7 @@
 * @param length length of values arrays
 * @param dimensions real number of dimensions
 */
scpi_expr_result_t SCPI_ExprChannelListEntry(scpi_t * context, scpi_parameter_t * param, int index, scpi_bool_t * isRange, int32_t * valuesFrom, int32_t * valuesTo, size_t length, size_t * dimensions)
{
scpi_expr_result_t SCPI_ExprChannelListEntry(scpi_t * context, scpi_parameter_t * param, int index, scpi_bool_t * isRange, int32_t * valuesFrom, int32_t * valuesTo, size_t length, size_t * dimensions) {
    lex_state_t lex;
    int i;
    scpi_expr_result_t res = SCPI_EXPR_OK;
libscpi/src/fifo.c
libscpi/src/ieee488.c
libscpi/src/minimal.c
libscpi/src/parser.c
@@ -1364,8 +1364,7 @@
 * @param parameter
 * @return
 */
scpi_bool_t SCPI_ParamIsValid(scpi_parameter_t * parameter)
{
scpi_bool_t SCPI_ParamIsValid(scpi_parameter_t * parameter) {
    return parameter->type == SCPI_TOKEN_UNKNOWN ? FALSE : TRUE;
}
@@ -1374,7 +1373,6 @@
 * @param context
 * @return
 */
scpi_bool_t SCPI_ParamErrorOccurred(scpi_t * context)
{
scpi_bool_t SCPI_ParamErrorOccurred(scpi_t * context) {
    return context->cmd_error;
}
libscpi/src/units.c
@@ -200,8 +200,7 @@
 * @param mandatory if the parameter is mandatory
 * @return 
 */
scpi_bool_t SCPI_ParamNumber(scpi_t * context, const scpi_choice_def_t * special, scpi_number_t * value, scpi_bool_t mandatory)
{
scpi_bool_t SCPI_ParamNumber(scpi_t * context, const scpi_choice_def_t * special, scpi_number_t * value, scpi_bool_t mandatory) {
    scpi_token_t token;
    lex_state_t state;
    scpi_parameter_t param;
libscpi/src/utils.c
libscpi/src/utils_private.h
libscpi/test/test_fifo.c
libscpi/test/test_lexer_parser.c
@@ -101,7 +101,6 @@
    if (len != token.len) printToken(&token);   \
} while(0)
static void testWhiteSpace(void) {
    TEST_TOKEN("  \t MEAS", scpiLex_WhiteSpace, 0, 4, SCPI_TOKEN_WS);
    TEST_TOKEN("MEAS", scpiLex_WhiteSpace, 0, 0, SCPI_TOKEN_UNKNOWN);
@@ -234,7 +233,6 @@
    else                                        \
    if (len != token.len) printToken(&token);   \
} while(0)
static void testAllProgramData(void) {
    TEST_ALL_TOKEN("1.5E12 V", scpiParser_parseAllProgramData, 0, 8, SCPI_TOKEN_ALL_PROGRAM_DATA, 1);
libscpi/test/test_parser.c
@@ -99,6 +99,7 @@
}
scpi_t scpi_context;
static void error_buffer_clear(void) {
    err_buffer[0] = 0;
    err_buffer_pos = 0;
@@ -112,7 +113,6 @@
    err_buffer[err_buffer_pos] = err;
    err_buffer_pos++;
}
static size_t SCPI_Write(scpi_t * context, const char * data, size_t len) {
    (void) context;
@@ -135,6 +135,7 @@
}
scpi_reg_val_t srq_val = 0;
static scpi_result_t SCPI_Control(scpi_t * context, scpi_ctrl_name_t ctrl, scpi_reg_val_t val) {
    (void) context;
@@ -171,16 +172,17 @@
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 = {"MA", "IN", NULL, "VER"},
    .idn =
    {"MA", "IN", NULL, "VER"},
};
static int init_suite(void) {
    SCPI_Init(&scpi_context);
libscpi/test/test_scpi_utils.c