This is an automated email from the git hooks/post-receive script. hmmr-guest pushed a commit to branch master in repository cnrun.
commit ac0ae9def85d58932b1cac4c1ea2b1c4cd085dcc Author: Andrei Zavada <[email protected]> Date: Tue Sep 17 19:42:16 2013 +0300 deboostify (part 2/2) --- debian/changelog | 6 ++++ debian/control | 4 +-- upstream/INSTALL | 2 +- upstream/doc/README | 2 +- upstream/src/libcn/model-nmlio.cc | 12 ++++---- upstream/src/libcn/model-struct.cc | 54 +++++++++++++++++------------------- 6 files changed, 42 insertions(+), 38 deletions(-) diff --git a/debian/changelog b/debian/changelog index f8f026d..7bdecf0 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +cnrun (1.1.14-1) unstable; urgency=low + + * New upstream version. + + -- Andrei Zavada <[email protected]> Tue, 17 sep 2013 19:37:12 +0200 + cnrun (1.1.13-2) unstable; urgency=low * Update Vcs-* fields to point to git.debian.org/debian-med. diff --git a/debian/control b/debian/control index a41fce6..4550581 100644 --- a/debian/control +++ b/debian/control @@ -2,8 +2,8 @@ Source: cnrun Section: science Priority: optional Maintainer: Andrei Zavada <[email protected]> -Build-Depends: debhelper (>= 9), hardening-wrapper, hardening-includes, dh-autoreconf, autoconf-archive, libgomp1, libreadline6-dev, libboost-regex-dev (>= 1.41), pkg-config, libgsl0-dev, libxml2-dev -Standards-Version: 3.9.3 +Build-Depends: debhelper (>= 9), hardening-wrapper, hardening-includes, dh-autoreconf, autoconf-archive, libgomp1, libreadline6-dev, pkg-config, libgsl0-dev, libxml2-dev +Standards-Version: 3.9.4 Homepage: http://johnhommer.com/academic/code/cnrun Vcs-Git: git://git.debian.org/git/debian-med/cnrun.git Vcs-Browser: http://anonscm.debian.org/gitweb/?p=debian-med/cnrun.git;a=summary diff --git a/upstream/INSTALL b/upstream/INSTALL index e688c33..9ccf15b 100644 --- a/upstream/INSTALL +++ b/upstream/INSTALL @@ -4,7 +4,7 @@ Installation Instructions Cnrun is fully autotools compliant, and normally installable by ./configure && make install. -Dependencies include boost_regex, libxml2. +Dependencies include: libxml2. The ./configure option --enable-tools will build these three executables in addition to cnrun: varfold, spike2sdf, and diff --git a/upstream/doc/README b/upstream/doc/README index df3e126..e1594fb 100644 --- a/upstream/doc/README +++ b/upstream/doc/README @@ -50,7 +50,7 @@ iterators. Since gcc 4.4.4, the keyword auto has come as a great relief in this regard; versions of gcc prior to 4.4.4, therefore, will not compile CNRun. -Cnrun depends on libreadline, libgsl, libxml2, boost, whichever +Cnrun depends on libreadline, libgsl, libxml2, whichever version is current at the time of release. diff --git a/upstream/src/libcn/model-nmlio.cc b/upstream/src/libcn/model-nmlio.cc index be1f74b..79e8eb2 100644 --- a/upstream/src/libcn/model-nmlio.cc +++ b/upstream/src/libcn/model-nmlio.cc @@ -10,6 +10,7 @@ #include <string> #include <iostream> +#include <regex.h> #include "model.hh" @@ -103,11 +104,12 @@ import_NetworkML( xmlDoc *doc, const char *fname, bool appending) if ( n->type == XML_ELEMENT_NODE ) { // only concern ourselves with nodes of this type xmlChar *notes_s = xmlNodeGetContent( n); // look for a substring specific to neuroConstruct, which is obviously speculative - boost::regex pattern( ".*project: (\\w*).*"); - boost::cmatch found; - name = boost::regex_match( (char*)notes_s, found, pattern) - ? name = found[1] - : "(unnamed)"; + regex_t RE; + regcomp( &RE, ".*project: (\\w*).*", REG_EXTENDED); + regmatch_t M[1+1]; + name = (0 == regexec( &RE, (char*)notes_s, 1+1, M, 0)) + ? string ((char*)notes_s + M[1].rm_so, M[1].rm_eo - M[1].rm_so) + : "(unnamed)"; xmlFree( notes_s); } else name = "(unnamed)"; diff --git a/upstream/src/libcn/model-struct.cc b/upstream/src/libcn/model-struct.cc index f98a5df..d9c82c3 100644 --- a/upstream/src/libcn/model-struct.cc +++ b/upstream/src/libcn/model-struct.cc @@ -14,7 +14,7 @@ #include <set> #include <algorithm> -#include <boost/regex.hpp> +#include <regex.h> #include "../libstilton/pointaligned-s.hh" @@ -923,10 +923,10 @@ CNRun::CModel:: process_listener_tags( const list<STagGroupListener> &Listeners) { for ( auto P = Listeners.begin(); P != Listeners.end(); P++ ) { - boost::regex pattern( P->pattern.c_str()); - boost::cmatch found; + regex_t RE; + regcomp( &RE, P->pattern.c_str(), REG_EXTENDED); for_all_units (U) { - if ( boost::regex_match( (*U)->_label, found, pattern) ) { + if ( regexec( &RE, (*U)->_label, 0, 0, 0) == 0 ) { if ( P->enable ) { (*U) -> start_listening( P->bits); if ( verbosely > 3 ) @@ -950,10 +950,10 @@ CNRun::CModel:: process_spikelogger_tags( const list<STagGroupSpikelogger> &Spikeloggers) { for ( auto P = Spikeloggers.begin(); P != Spikeloggers.end(); P++ ) { - boost::regex pattern( P->pattern.c_str()); - boost::cmatch found; + regex_t RE; + regcomp( &RE, P->pattern.c_str(), REG_EXTENDED); for_all_standalone_neurons (N) { - if ( boost::regex_match( (*N)->_label, found, pattern) ) { + if ( regexec( &RE, (*N)->_label, 0, 0, 0) == 0 ) { if ( P->enable ) { bool log_sdf = !(P->period == 0. || P->sigma == 0.); if ( ( log_sdf && !(*N)->enable_spikelogging_service( P->period, P->sigma, P->from)) @@ -972,7 +972,7 @@ process_spikelogger_tags( const list<STagGroupSpikelogger> &Spikeloggers) } } for_all_hosted_neurons (N) { - if ( boost::regex_match( (*N)->_label, found, pattern) ) { + if ( regexec( &RE, (*N)->_label, 0, 0, 0) == 0 ) { if ( P->enable ) { bool log_sdf = !(P->period == 0. || P->sigma == 0.); if ( ( log_sdf && !(*N)->enable_spikelogging_service( P->period, P->sigma, P->from)) @@ -1002,10 +1002,10 @@ process_putout_tags( const list<STagGroup> &ToRemove) { // execute some for ( auto P = ToRemove.begin(); P != ToRemove.end(); P++ ) { - boost::regex pattern( P->pattern.c_str()); - boost::cmatch found; + regex_t RE; + regcomp( &RE, P->pattern.c_str(), REG_EXTENDED); for_all_units (U) { - if ( boost::regex_match( (*U)->_label, found, pattern) ) { + if ( regexec( &RE, (*U)->_label, 0, 0, 0) == 0 ) { if ( verbosely > 2 ) printf( " (put out unit \"%s\")\n", (*U)->_label); @@ -1030,13 +1030,13 @@ process_decimate_tags( const list<STagGroupDecimate> &ToDecimate) { // decimate others for ( auto P = ToDecimate.begin(); P != ToDecimate.end(); P++ ) { - boost::regex pattern( P->pattern.c_str()); - boost::cmatch found; + regex_t RE; + regcomp( &RE, P->pattern.c_str(), REG_EXTENDED); // collect group vector<C_BaseUnit*> dcmgroup; for_all_units (U) - if ( boost::regex_match( (*U)->_label, found, pattern) ) + if ( regexec( &RE, (*U)->_label, 0, 0, 0) == 0 ) dcmgroup.push_back( *U); random_shuffle( dcmgroup.begin(), dcmgroup.end()); @@ -1065,13 +1065,13 @@ CNRun::CModel:: process_paramset_static_tags( const list<STagGroupNeuronParmSet> &tags) { for ( auto P = tags.begin(); P != tags.end(); P++ ) { - boost::regex pattern( P->pattern.c_str()); - boost::cmatch found; + regex_t RE; + regcomp( &RE, P->pattern.c_str(), REG_EXTENDED); vector<string> current_tag_assigned_labels; for_all_neurons (U) { - if ( !boost::regex_match( (*U)->label(), found, pattern) ) + if ( regexec( &RE, (*U)->_label, 0, 0, 0) == 0 ) continue; // because a named parameter can map to a different param_id in different units, rather // do lookup every time @@ -1126,10 +1126,9 @@ CNRun::CModel:: process_paramset_static_tags( const list<STagGroupSynapseParmSet> &tags) { for ( list<STagGroupSynapseParmSet>::const_iterator P = tags.begin(); P != tags.end(); P++ ) { - boost::regex - pattern_src (P->pattern.c_str()), // P->pattern acting as src - pattern_tgt (P->target.c_str()); - boost::cmatch found; + regex_t REsrc, REtgt; + regcomp( &REsrc, P->pattern.c_str(), REG_EXTENDED); // P->pattern acting as src + regcomp( &REtgt, P->target.c_str(), REG_EXTENDED); vector<string> current_tag_assigned_labels; @@ -1139,11 +1138,11 @@ process_paramset_static_tags( const list<STagGroupSynapseParmSet> &tags) printf( "== setting %s -> %s {%s} = %g...\n", P->pattern.c_str(), P->target.c_str(), P->parm.c_str(), P->value); for_all_neurons (Us) { - if ( !boost::regex_match( (*Us)->label(), found, pattern_src) ) + if ( regexec( &REsrc, (*Us)->label(), 0, 0, 0) == 0 ) continue; for_all_neurons (Ut) { - if ( !boost::regex_match( (*Ut)->label(), found, pattern_tgt) /* || Us == Ut */ ) + if ( regexec( &REtgt, (*Ut)->label(), 0, 0, 0) == 0 ) /* || Us == Ut */ continue; C_BaseSynapse *y = static_cast<C_BaseNeuron*>(*Us) -> connects_via( *static_cast<C_BaseNeuron*>(*Ut)); if ( !y ) @@ -1244,11 +1243,11 @@ CNRun::CModel:: process_paramset_source_tags( const list<STagGroupSource> &tags) { for ( list<STagGroupSource>::const_iterator P = tags.begin(); P != tags.end(); P++ ) { - boost::regex pattern( P->pattern.c_str()); - boost::cmatch found; + regex_t RE; + regcomp( &RE, P->pattern.c_str(), REG_EXTENDED); for_all_units (U) { - if ( !boost::regex_match( (*U)->label(), found, pattern) ) + if ( regexec( &RE, (*U)->label(), 0, 0, 0) == 0 ) continue; int p_d = -1; @@ -1396,6 +1395,3 @@ dump_units( FILE *strm) fprintf( strm, "\n"); } - - -// eof -- Alioth's /git/debian-med/git-commit-notice on /srv/git.debian.org/git/debian-med/cnrun.git _______________________________________________ debian-med-commit mailing list [email protected] http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/debian-med-commit
