From 730831504cde7db84721e75a8f942ffc32300fe2 Mon Sep 17 00:00:00 2001
From: Jan Breuer <jan.breuer@jaybee.cz>
Date: 周三, 25 12月 2013 04:56:32 +0800
Subject: [PATCH] Refactor bool_t to scpi_bool_t

---
 libscpi/src/parser.c |   20 ++++++++++----------
 1 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/libscpi/src/parser.c b/libscpi/src/parser.c
index d5728af..1f4e9d7 100644
--- a/libscpi/src/parser.c
+++ b/libscpi/src/parser.c
@@ -52,7 +52,7 @@
 
 static void paramSkipBytes(scpi_t * context, size_t num);
 static void paramSkipWhitespace(scpi_t * context);
-static bool_t paramNext(scpi_t * context, bool_t mandatory);
+static scpi_bool_t paramNext(scpi_t * context, scpi_bool_t mandatory);
 
 /*
 int _strnicmp(const char* s1, const char* s2, size_t len) {
@@ -226,7 +226,7 @@
  * @param context
  * @result TRUE if context->paramlist is filled with correct values
  */
-static bool_t findCommand(scpi_t * context, const char * cmdline_ptr, size_t cmdline_len, size_t cmd_len) {
+static scpi_bool_t findCommand(scpi_t * context, const char * cmdline_ptr, size_t cmdline_len, size_t cmd_len) {
     int32_t i;
     const scpi_command_t * cmd;
 
@@ -392,7 +392,7 @@
  * @param val
  * @return 
  */
-size_t SCPI_ResultBool(scpi_t * context, bool_t val) {
+size_t SCPI_ResultBool(scpi_t * context, scpi_bool_t val) {
 	return SCPI_ResultInt(context, val ? 1 : 0);
 }
 
@@ -459,7 +459,7 @@
  * @param mandatory
  * @return 
  */
-bool_t paramNext(scpi_t * context, bool_t mandatory) {
+scpi_bool_t paramNext(scpi_t * context, scpi_bool_t mandatory) {
     paramSkipWhitespace(context);
     if (context->paramlist.length == 0) {
         if (mandatory) {
@@ -487,7 +487,7 @@
  * @param mandatory
  * @return 
  */
-bool_t SCPI_ParamInt(scpi_t * context, int32_t * value, bool_t mandatory) {
+scpi_bool_t SCPI_ParamInt(scpi_t * context, int32_t * value, scpi_bool_t mandatory) {
     const char * param;
     size_t param_len;
     size_t num_len;
@@ -517,7 +517,7 @@
  * @param mandatory
  * @return 
  */
-bool_t SCPI_ParamDouble(scpi_t * context, double * value, bool_t mandatory) {
+scpi_bool_t SCPI_ParamDouble(scpi_t * context, double * value, scpi_bool_t mandatory) {
     const char * param;
     size_t param_len;
     size_t num_len;
@@ -548,7 +548,7 @@
  * @param mandatory
  * @return 
  */
-bool_t SCPI_ParamString(scpi_t * context, const char ** value, size_t * len, bool_t mandatory) {
+scpi_bool_t SCPI_ParamString(scpi_t * context, const char ** value, size_t * len, scpi_bool_t mandatory) {
     size_t length;
 
     if (!value || !len) {
@@ -579,7 +579,7 @@
  * @param mandatory
  * @return 
  */
-bool_t SCPI_ParamText(scpi_t * context, const char ** value, size_t * len, bool_t mandatory) {
+scpi_bool_t SCPI_ParamText(scpi_t * context, const char ** value, size_t * len, scpi_bool_t mandatory) {
     size_t length;
 
     if (!value || !len) {
@@ -608,7 +608,7 @@
  * @param mandatory
  * @return 
  */
-bool_t SCPI_ParamBool(scpi_t * context, bool_t * value, bool_t mandatory) {
+scpi_bool_t SCPI_ParamBool(scpi_t * context, scpi_bool_t * value, scpi_bool_t mandatory) {
     const char * param;
     size_t param_len;
     size_t num_len;
@@ -648,7 +648,7 @@
  * @param mandatory
  * @return 
  */
-bool_t SCPI_ParamChoice(scpi_t * context, const char * options[], int32_t * value, bool_t mandatory) {
+scpi_bool_t SCPI_ParamChoice(scpi_t * context, const char * options[], int32_t * value, scpi_bool_t mandatory) {
     const char * param;
     size_t param_len;
     size_t res;

--
Gitblit v1.9.1