X-Git-Url: https://diplodocus.org/git/nmh/blobdiff_plain/e37c47de66b204837f684bc57f113aedbc19275a..d9c88cd101a63778a85dfd55a01a3af0db2465c9:/sbr/context_find.c diff --git a/sbr/context_find.c b/sbr/context_find.c index afeff37e..48ab8d0a 100644 --- a/sbr/context_find.c +++ b/sbr/context_find.c @@ -5,7 +5,9 @@ * complete copyright information. */ -#include +#include "h/mh.h" +#include "concat.h" +#include "context_find.h" char * @@ -13,9 +15,10 @@ context_find (const char *str) { struct node *np; + str = FENDNULL(str); for (np = m_defs; np; np = np->n_next) - if (!strcasecmp (FENDNULL(np->n_name), FENDNULL(str))) - return (np->n_field); + if (!strcasecmp(FENDNULL(np->n_name), str)) + return np->n_field; return NULL; } @@ -29,7 +32,8 @@ context_find (const char *str) */ char * context_find_by_type (const char *string, const char *type, - const char *subtype) { + const char *subtype) +{ char *value = NULL; if (subtype) { @@ -57,7 +61,8 @@ context_find_by_type (const char *string, const char *type, * The search is case insensitive. */ int -context_find_prefix (const char *prefix) { +context_find_prefix (const char *prefix) +{ struct node *np; size_t len;