From fcfb8169cfa5fefe5610bcc4297500ead2dfaf42 Mon Sep 17 00:00:00 2001 From: Steve Bennett Date: Sat, 11 Jan 2014 21:13:16 +1000 Subject: many comment changes, some small code changes Sweep through and clean up all (most) of the comments in the code. While there, adjust some variable and function names to be more consistent, and make a few small code changes - again, mostly for consistency. Signed-off-by: Steve Bennett --- jimregexp.h | 26 +++++++++----------------- 1 file changed, 9 insertions(+), 17 deletions(-) (limited to 'jimregexp.h') diff --git a/jimregexp.h b/jimregexp.h index 79a87e5..b7598d4 100644 --- a/jimregexp.h +++ b/jimregexp.h @@ -1,27 +1,17 @@ #ifndef JIMREGEXP_H #define JIMREGEXP_H -#ifndef _JIMAUTOCONF_H -#error Need jimautoconf.h -#endif - -#if defined(HAVE_REGCOMP) && !defined(JIM_REGEXP) -/* Use POSIX regex */ -#include +/** regexp(3)-compatible regular expression implementation for Jim. + * + * See jimregexp.c for details + */ -#else +#ifdef __cplusplus +extern "C" { +#endif #include -/* - * Definitions etc. for regexp(3) routines. - * - * Caveat: this is V8 regexp(3) [actually, a reimplementation thereof], - * not the System V one. - * - * 11/04/02 (seiwald) - const-ing for string literals - */ - typedef struct { int rm_so; int rm_eo; @@ -112,6 +102,8 @@ int regexec(regex_t *preg, const char *string, size_t nmatch, regmatch_t pmat size_t regerror(int errcode, const regex_t *preg, char *errbuf, size_t errbuf_size); void regfree(regex_t *preg); +#ifdef __cplusplus +} #endif #endif -- cgit v1.1