[Javanetsim-cvs] IceScan/icesockets iceregex.h, 1.2, 1.3 test.cc, 1.2, NONE
Status: Beta
Brought to you by:
darkkey
From: Alexander B. <da...@us...> - 2006-11-30 15:25:51
|
Update of /cvsroot/javanetsim/IceScan/icesockets In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv2586/icesockets Modified Files: iceregex.h Removed Files: test.cc Log Message: no message Index: iceregex.h =================================================================== RCS file: /cvsroot/javanetsim/IceScan/icesockets/iceregex.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** iceregex.h 30 Nov 2006 15:13:05 -0000 1.2 --- iceregex.h 30 Nov 2006 15:25:48 -0000 1.3 *************** *** 18,35 **** class IceRegex { public: ! IceRegex (const icestring& pattern){ ! init_regex(pattern.c_str()); } IceRegex (const char pattern[]){ ! init_regex(pattern); } ! void init_regex(const char pattern[]){ const char *error; int error_offset; ! pcre_ = pcre_compile ( ! pattern, 0, &error, --- 18,42 ---- class IceRegex { public: ! IceRegex (const icestring pattern){ ! this->pattern = pattern; ! init_regex(); } IceRegex (const char pattern[]){ ! icestring is(pattern); ! this->pattern = is; ! init_regex(); } ! ~IceRegex(){ ! delete ovector_; ! } ! ! void init_regex(){ const char *error; int error_offset; ! pcre_ = pcre_compile ( ! pattern.c_str(), 0, &error, *************** *** 42,45 **** --- 49,54 ---- } + capture_count_ = 0; + int rc; rc = pcre_fullinfo( *************** *** 48,52 **** PCRE_INFO_CAPTURECOUNT, /* what is required */ &capture_count_); /* where to put the data */ ! ovector_ = new int[3*(capture_count_+1)]; } --- 57,61 ---- PCRE_INFO_CAPTURECOUNT, /* what is required */ &capture_count_); /* where to put the data */ ! ovector_ = new int[3*(capture_count_+1)]; } *************** *** 95,98 **** --- 104,108 ---- pcre* pcre_; unsigned long int capture_count_; + icestring pattern; int* ovector_; //UGLY --- test.cc DELETED --- |