diff --git a/TODO b/TODO index 8aaec19..34bc9fb 100644 --- a/TODO +++ b/TODO @@ -1,4 +1,2 @@ - - Move sexp related functions and macros to libsexpr - Split connection.c to message.c, channel.c and support/misc .c (partially done) - Optimize a lot of repeating code, sometimes to static inline - - Move cache related functions to libtdata diff --git a/configure.ac b/configure.ac index 683e5f6..bab26fe 100644 --- a/configure.ac +++ b/configure.ac @@ -46,8 +46,8 @@ AS_IF([test "x$enable_win32_build" = "xyes"], [ PKG_CHECK_MODULES(OPENSSL, [openssl]) dnl PKG_CHECK_MODULES(LIBUUID, [uuid]) -PKG_CHECK_MODULES(LIBTDATA, [libtdata]) -PKG_CHECK_MODULES(LIBSEXPR, [libsexpr]) +PKG_CHECK_MODULES(LIBTDATA, [libtdata >= 0.2.2]) +PKG_CHECK_MODULES(LIBSEXPR, [libsexpr >= 1.3.1]) AM_CONDITIONAL(BUILD_WIN32, test "x$enable_win32_build" = "xyes") diff --git a/debian/control b/debian/control index 92c4c4b..d393f91 100644 --- a/debian/control +++ b/debian/control @@ -18,6 +18,6 @@ Description: Development files for libsntl Package: libsntl Section: libs Architecture: any -Depends: ${shlibs:Depends}, ${misc:Depends}, libsexpr, libssl1.0.0, libtdata, libuuid1 +Depends: ${shlibs:Depends}, ${misc:Depends}, libsexpr (>= 1.3.1), libssl1.0.0, libtdata (>= 0.2.2), libuuid1 Description: Secure Networking Transport Layer implementation library Library used to develop secure services diff --git a/include/sntl/connection.h b/include/sntl/connection.h index 2684a07..e03a457 100644 --- a/include/sntl/connection.h +++ b/include/sntl/connection.h @@ -31,25 +31,6 @@ #define ESXNOCHANSUP 48 #define ESXRAPIDREPLY 49 -/* sexp helpers */ -#define SEXP_IS_LIST(sx) \ - ((sx)->ty == SEXP_LIST) ? 1 : 0 - -#define SEXP_IS_TYPE(sx,type) \ - ((sx)->ty == SEXP_VALUE && (sx)->aty == (type)) ? 1 : 0 - -#define SEXP_ITERATE_LIST(lst, iter, ind) \ - for((ind) = 0, (iter) = (lst)->list; (ind) < sexp_list_length(lst); \ - (ind)++, (iter) = (iter)->next) -#ifdef __cplusplus -extern "C" { -#endif -int sexp_list_cdr(sexp_t *expr, sexp_t **sx); -int sexp_list_car(sexp_t *expr, sexp_t **sx); -#ifdef __cplusplus -} -#endif - #define VERIFY_DEPTH 1 /* FIXME: */ #define MAX_CONNECTIONS 32768 diff --git a/lib/support.c b/lib/support.c index 12efbff..a6e5883 100644 --- a/lib/support.c +++ b/lib/support.c @@ -123,24 +123,3 @@ int __resolvehost(const char *hostname, char *buf, int buf_len, } #endif -/* sexp helpers */ -int sexp_list_car(sexp_t *expr, sexp_t **sx) -{ - if (!SEXP_IS_LIST(expr) || expr->list->ty != SEXP_VALUE) return 1; - - *sx = expr->list; - - return 0; -} - -int sexp_list_cdr(sexp_t *expr, sexp_t **sx) -{ - /* Dummy function. Can we do cdr properly? */ - if (!SEXP_IS_LIST(expr) || expr->list->ty != SEXP_VALUE) return 1; - - if (!expr->list->next) *sx = NULL; - else *sx = expr->list->next; - - return 0; -} -