From b2bb204fa2146d7606aa62cf138315d487206289 Mon Sep 17 00:00:00 2001 From: Dmitry Mikhirev Date: Thu, 27 Nov 2014 14:25:30 +0300 Subject: code comments --- GNUmakefile | 1 + pcre.c | 17 ++++++++++------- 2 files changed, 11 insertions(+), 7 deletions(-) diff --git a/GNUmakefile b/GNUmakefile index c9bf862..266bf8a 100644 --- a/GNUmakefile +++ b/GNUmakefile @@ -47,6 +47,7 @@ test005 = "$(m $(pat),$(subj),E)" = "$(subj)" -a "$(1)" = 1 -a "$(255)" = 255 # test parsing pattern options test006 = "$(m ^TEST+,testtttt,iU)" = test +# test passing `$' characters to variable test007 = "$(m a(.*)b,a\$$b)" = "a\$$b" -a "$(1)" = "\$$" ### END OF TEST EXPRESSIONS ### diff --git a/pcre.c b/pcre.c index 5630ac7..ec8a120 100644 --- a/pcre.c +++ b/pcre.c @@ -56,10 +56,11 @@ char *esc_str(const char *str) return esc; } +/* mk_error() - pass formatted string to error make function */ int mk_error(const char *fmt, ...) { - va_list args; - char *msg, *emsg, *mk; + va_list args; /* function arguments */ + char *msg, *emsg, *mk; /* buffer strings */ va_start(args, fmt); @@ -75,10 +76,11 @@ int mk_error(const char *fmt, ...) return 0; } +/* mk_warning() - pass formatted string to warning make function */ int mk_warning(const char *fmt, ...) { - va_list args; - char *msg, *emsg, *mk; + va_list args; /* function arguments */ + char *msg, *emsg, *mk; /* buffer strings */ va_start(args, fmt); @@ -94,10 +96,11 @@ int mk_warning(const char *fmt, ...) return 0; } +/* mk_info() - pass formatted string to info make function */ int mk_info(const char *fmt, ...) { - va_list args; - char *msg, *emsg, *mk; + va_list args; /* function arguments */ + char *msg, *emsg, *mk; /* buffer strings */ va_start(args, fmt); @@ -157,7 +160,7 @@ int def_nvar(int num, const char *value) return 0; } -/* set_comp_opt - set regexp option */ +/* parse_comp_opt - return regexp compilation option according to flag */ int parse_comp_opt(const char flag, const char *func) { int b; /* PCRE configuration option value */ -- cgit v1.2.1