From 811e11d96f5ae2fa6972ac1bf095eeebd9486f9a Mon Sep 17 00:00:00 2001
From: Andrey Nakin <andrey.nakin@gmail.com>
Date: 周一, 21 10月 2013 03:48:06 +0800
Subject: [PATCH] add function SCPI_ParamChoice

---
 libscpi/src/utils.h |   11 +++++++++++
 1 files changed, 11 insertions(+), 0 deletions(-)

diff --git a/libscpi/src/utils.h b/libscpi/src/utils.h
index 37e4a7e..6d3528f 100644
--- a/libscpi/src/utils.h
+++ b/libscpi/src/utils.h
@@ -38,13 +38,18 @@
 #define	SCPI_UTILS_H
 
 #include <stdint.h>
+#include "scpi/config.h"
 #include "scpi/types.h"
 
 #ifdef	__cplusplus
 extern "C" {
 #endif
 
+#if defined(__GNUC__) && (__GNUC__ >= 4)
     #define LOCAL __attribute__((visibility ("hidden")))
+#else
+    #define LOCAL
+#endif
 
     char * strnpbrk(const char *str, size_t size, const char *set) LOCAL;
     bool_t compareStr(const char * str1, size_t len1, const char * str2, size_t len2) LOCAL;
@@ -55,7 +60,13 @@
     bool_t locateText(const char * str1, size_t len1, const char ** str2, size_t * len2) LOCAL;
     bool_t locateStr(const char * str1, size_t len1, const char ** str2, size_t * len2) LOCAL;
     size_t skipWhitespace(const char * cmd, size_t len) LOCAL;
+    size_t skipColon(const char * cmd, size_t len) LOCAL;
     bool_t matchPattern(const char * pattern, size_t pattern_len, const char * str, size_t str_len) LOCAL;
+    bool_t matchCommand(const char * pattern, const char * cmd, size_t len) LOCAL;
+
+#if !HAVE_STRNLEN
+    size_t BSD_strnlen(const char *s, size_t maxlen);
+#endif
 
 #define min(a, b)  (((a) < (b)) ? (a) : (b))
 #define max(a, b)  (((a) > (b)) ? (a) : (b))

--
Gitblit v1.9.1