Re: [patch]: biblio.C uses the STL

2002-11-07 Thread Lars Gullik Bjønnes
Angus Leeming <[EMAIL PROTECTED]> writes: | On Thursday 07 November 2002 4:51 pm, Lars Gullik Bjønnes wrote: | > Angus Leeming <[EMAIL PROTECTED]> writes: | > | Perfect. Shame boost isn't as clever as sed. | > | > Actually it seems that boost is not far behind: | > | > string litex(".|*?+(){}[

Re: [patch]: biblio.C uses the STL

2002-11-07 Thread Angus Leeming
On Thursday 07 November 2002 4:51 pm, Lars Gullik Bjønnes wrote: > Angus Leeming <[EMAIL PROTECTED]> writes: > | Perfect. Shame boost isn't as clever as sed. > > Actually it seems that boost is not far behind: > > string litex(".|*?+(){}[]^$\\"); > string fmt("$&"); > boost::R

Re: [patch]: biblio.C uses the STL

2002-11-07 Thread Lars Gullik Bjønnes
Angus Leeming <[EMAIL PROTECTED]> writes: | Perfect. Shame boost isn't as clever as sed. Actually it seems that boost is not far behind: string litex(".|*?+(){}[]^$\\"); string fmt("$&"); boost::RegEx reg("[].|*?+(){}\\[^$]"); string res = reg.Merge(litex,

Re: [patch]: biblio.C uses the STL

2002-11-07 Thread Angus Leeming
On Thursday 07 November 2002 1:59 pm, Lars Gullik Bjønnes wrote: > Angus Leeming <[EMAIL PROTECTED]> writes: > | On Wednesday 06 November 2002 4:24 pm, Andre Poenitz wrote: > >> On Wed, Nov 06, 2002 at 04:06:15PM +, Angus Leeming wrote: > >> > The whole point of this exercise was to clean-up th

Re: [patch]: biblio.C uses the STL

2002-11-07 Thread Lars Gullik Bjønnes
Angus Leeming <[EMAIL PROTECTED]> writes: | On Wednesday 06 November 2002 4:24 pm, Andre Poenitz wrote: >> On Wed, Nov 06, 2002 at 04:06:15PM +, Angus Leeming wrote: >> > The whole point of this exercise was to clean-up the code in biblio.C. As >> > a side effect, boost::regex searching now wo

Re: [patch]: biblio.C uses the STL

2002-11-07 Thread Andre Poenitz
On Thu, Nov 07, 2002 at 12:52:56PM +, Angus Leeming wrote: > Ok to apply? Well. Looks ok, so if it works... Andre' -- Those who desire to give up Freedom in order to gain Security, will not have, nor do they deserve, either one. (T. Jefferson)

Re: [patch]: biblio.C uses the STL

2002-11-07 Thread Angus Leeming
On Wednesday 06 November 2002 4:24 pm, Andre Poenitz wrote: > On Wed, Nov 06, 2002 at 04:06:15PM +, Angus Leeming wrote: > > The whole point of this exercise was to clean-up the code in biblio.C. As > > a side effect, boost::regex searching now works in the same way as 1.2. > > 95 lines added,

Re: [patch]: biblio.C uses the STL

2002-11-07 Thread Angus Leeming
On Thursday 07 November 2002 10:49 am, Andre Poenitz wrote: > On Thu, Nov 07, 2002 at 10:53:01AM +, Angus Leeming wrote: > > Why didn't I mention it before? I forgot! > > In any case, I wouldn't care. You can quote me later on: > > "Nobody ever will search for simple strings like '[^]'" ;-)

Re: [patch]: biblio.C uses the STL

2002-11-07 Thread Andre Poenitz
On Thu, Nov 07, 2002 at 10:53:01AM +, Angus Leeming wrote: > Why didn't I mention it before? I forgot! In any case, I wouldn't care. You can quote me later on: "Nobody ever will search for simple strings like '[^]'" Andre' -- Those who desire to give up Freedom in order to gain Security

Re: [patch]: biblio.C uses the STL

2002-11-07 Thread Angus Leeming
On Thursday 07 November 2002 10:44 am, Lars Gullik Bjønnes wrote: > | Actually, I was hoping you'd just volunteer ;-) > already did it... Good man! > #include > #include > #include > > using namespace std; > > int main() > { > string litex(".|*?+(){}[]^$\\"); > string fmt("$&")

Re: [patch]: biblio.C uses the STL

2002-11-07 Thread Lars Gullik Bjønnes
Angus Leeming <[EMAIL PROTECTED]> writes: | On Thursday 07 November 2002 10:15 am, Lars Gullik Bjønnes wrote: >> Angus Leeming <[EMAIL PROTECTED]> writes: >> | Reading the boost::regex docs: >> |// All characters are literals except: .|*?+(){}[]^$\ >> |// These characters are literals when

Re: [patch]: biblio.C uses the STL

2002-11-07 Thread Angus Leeming
On Thursday 07 November 2002 10:15 am, Lars Gullik Bjønnes wrote: > Angus Leeming <[EMAIL PROTECTED]> writes: > | Reading the boost::regex docs: > | // All characters are literals except: .|*?+(){}[]^$\ > | // These characters are literals when preceded by a "\". > | > | This sed expression

Re: [patch]: biblio.C uses the STL

2002-11-07 Thread Jean-Marc Lasgouttes
> "Andre" == Andre Poenitz <[EMAIL PROTECTED]> writes: Andre> On Thu, Nov 07, 2002 at 10:38:44AM +0100, Jean-Marc Lasgouttes Andre> wrote: >> Let's admit it, even for people who like to use regexps, most of >> the time searches in bibliography do not require them. This is just >> a nifty gadge

Re: [patch]: biblio.C uses the STL

2002-11-07 Thread Andre Poenitz
On Thu, Nov 07, 2002 at 10:38:44AM +0100, Jean-Marc Lasgouttes wrote: > Let's admit it, even for people who like to use regexps, most of the > time searches in bibliography do not require them. This is just a > nifty gadget. Sure. But implementing both separately is overkill if one can be done by

Re: [patch]: biblio.C uses the STL

2002-11-07 Thread Lars Gullik Bjønnes
Angus Leeming <[EMAIL PROTECTED]> writes: | Reading the boost::regex docs: | // All characters are literals except: .|*?+(){}[]^$\ | // These characters are literals when preceded by a "\". > | This sed expression works: > | aleem-> search_expr='. | * ? + ( ) { } [ ] ^ $ \' | aleem-> e

Re: [patch]: biblio.C uses the STL

2002-11-07 Thread Angus Leeming
On Thursday 07 November 2002 9:38 am, Jean-Marc Lasgouttes wrote: > > "Lars" == Lars Gullik Bjønnes <[EMAIL PROTECTED]> writes: > > Lars> We used to have code in the xfroms FileDialog that made a bit > Lars> simpler for beginners, in that it allowed simple glob patterns > Lars> as well. > > Lar

Re: [patch]: biblio.C uses the STL

2002-11-07 Thread Andre Poenitz
On Thu, Nov 07, 2002 at 10:18:50AM +0100, Jean-Marc Lasgouttes wrote: > Angus> Yes. Good point. I'll investigate further. > > Yes, but regex can be confusing, especially if people want to use > things like ".", "[" and don't want to know why this does not work. > Believe, me, regex are really real

Re: [patch]: biblio.C uses the STL

2002-11-07 Thread Jean-Marc Lasgouttes
> "Lars" == Lars Gullik Bjønnes <[EMAIL PROTECTED]> writes: Lars> We used to have code in the xfroms FileDialog that made a bit Lars> simpler for beginners, in that it allowed simple glob patterns Lars> as well. Lars> Typically we just rewrote "*" -> ".*" and "." -> "\." Lars> I don't agree

Re: [patch]: biblio.C uses the STL

2002-11-07 Thread Lars Gullik Bjønnes
Jean-Marc Lasgouttes <[EMAIL PROTECTED]> writes: | > "Angus" == Angus Leeming <[EMAIL PROTECTED]> writes: | | >> Is it necessary to have the simple/regex distinction at all? regex | >> alone should be sufficient, shouldn't it? | | Angus> Yes. Good point. I'll investigate further. | | Yes, b

Re: [patch]: biblio.C uses the STL

2002-11-07 Thread Jean-Marc Lasgouttes
> "Angus" == Angus Leeming <[EMAIL PROTECTED]> writes: >> Is it necessary to have the simple/regex distinction at all? regex >> alone should be sufficient, shouldn't it? Angus> Yes. Good point. I'll investigate further. Yes, but regex can be confusing, especially if people want to use things

Re: [patch]: biblio.C uses the STL

2002-11-06 Thread Andre Poenitz
On Wed, Nov 06, 2002 at 06:36:16PM +, Angus Leeming wrote: > > > The whole point of this exercise was to clean-up the code in biblio.C. As > > > a side effect, boost::regex searching now works in the same way as 1.2. > > > > 95 lines added, 71 removed... I'd like the other way round better... >

Re: [patch]: biblio.C uses the STL

2002-11-06 Thread Lars Gullik Bjønnes
Angus Leeming <[EMAIL PROTECTED]> writes: | Those are the (only) choices I'm giving you ;-) Which do you prefer? neither | Anyway, as André points out, this is all academic because the "simple" search | is a subset of the regex. I'll just remove that option. then that is the version I'll go fo

Re: [patch]: biblio.C uses the STL

2002-11-06 Thread Angus Leeming
On Wednesday 06 November 2002 4:24 pm, Andre Poenitz wrote: > On Wed, Nov 06, 2002 at 04:06:15PM +, Angus Leeming wrote: > > The whole point of this exercise was to clean-up the code in biblio.C. As > > a side effect, boost::regex searching now works in the same way as 1.2. > > 95 lines added,

Re: [patch]: biblio.C uses the STL

2002-11-06 Thread Angus Leeming
On Wednesday 06 November 2002 6:25 pm, Lars Gullik Bjønnes wrote: > Angus Leeming <[EMAIL PROTECTED]> writes: > | On Wednesday 06 November 2002 5:13 pm, Lars Gullik Bjønnes wrote: > >> use a switch: > | > | If I do that I get a (spurious) warning: > | > | cxx: Warning: ../../../../src/frontends/con

Re: [patch]: biblio.C uses the STL

2002-11-06 Thread Lars Gullik Bjønnes
Angus Leeming <[EMAIL PROTECTED]> writes: | On Wednesday 06 November 2002 5:13 pm, Lars Gullik Bjønnes wrote: > >> use a switch: | If I do that I get a (spurious) warning: > | cxx: Warning: ../../../../src/frontends/controllers/biblio.C, line 365: #117-D | missing return statement at end

Re: [patch]: biblio.C uses the STL

2002-11-06 Thread Angus Leeming
On Wednesday 06 November 2002 5:13 pm, Lars Gullik Bjønnes wrote: > use a switch: If I do that I get a (spurious) warning: cxx: Warning: ../../../../src/frontends/controllers/biblio.C, line 365: #117-D missing return statement at end of non-void function "biblio::searchKeys"

Re: [patch]: biblio.C uses the STL

2002-11-06 Thread Lars Gullik Bjønnes
Angus Leeming <[EMAIL PROTECTED]> writes: | The whole point of this exercise was to clean-up the code in biblio.C. As a | side effect, boost::regex searching now works in the same way as 1.2. > | Ok to apply? Ok, but I belive it could be further simplified. | vector::const_iterator | searchKe

Re: [patch]: biblio.C uses the STL

2002-11-06 Thread Andre Poenitz
On Wed, Nov 06, 2002 at 04:06:15PM +, Angus Leeming wrote: > The whole point of this exercise was to clean-up the code in biblio.C. As a > side effect, boost::regex searching now works in the same way as 1.2. 95 lines added, 71 removed... I'd like the other way round better... Is it necessar