From 9a9466f1fdad6fb6c94c5ef8ddb1a687a7bcd874 Mon Sep 17 00:00:00 2001 From: Chris Hall Date: Thu, 31 Mar 2011 00:37:47 +0100 Subject: Small improvements to speed of reading of configuration file. Tidy up signalling of "ready" to command loop, and checking of appropriate state to close written configuration file. --- lib/elstring.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'lib/elstring.h') diff --git a/lib/elstring.h b/lib/elstring.h index 8ab1c58d..2b8e77fc 100644 --- a/lib/elstring.h +++ b/lib/elstring.h @@ -52,10 +52,9 @@ typedef struct elstring* elstring ; /* Setting an elstring object to all zeros is enough to initialise it to * an empty string. */ -enum -{ - ELSTRING_INIT_ALL_ZEROS = true -} ; +enum { ELSTRING_INIT_ALL_ZEROS = true } ; + +#define ELSTRING_INIT { { { NULL }, 0 } } /*============================================================================== * Pointer pair and unsigned pointer pair and const versions. @@ -177,7 +176,8 @@ extern elstring els_new(void) ; extern elstring els_free(elstring els) ; extern int els_cmp(elstring a, elstring b) ; -extern int els_cmp_word(elstring a, const char* w) ; +extern int els_nn_cmp(const void* ap, ulen al, const void* bp, ulen bl) ; +extern int els_cmp_word(elstring a, elstring w) ; extern int els_cmp_sig(elstring a, elstring b) ; extern bool els_equal(elstring a, elstring b) ; extern bool els_substring(elstring a, elstring b) ; -- cgit v1.2.3