Re: Fix invalid access in insetcommandparams.C

2005-05-11 Thread Jose' Matos
On Monday 09 May 2005 10:00, Lars Gullik Bjønnes wrote: > > You forgot your spaces: "i ? cmd[i - 1] : 0" I hate lots of annoying spaces that don't improve readability... :-( In this case that is a reflex of following the PEP-0008 (in python): http://www.python.org/peps/pep-0008.html Whitespa

Re: Fix invalid access in insetcommandparams.C

2005-05-10 Thread Lars Gullik Bjønnes
Andre Poenitz <[EMAIL PROTECTED]> writes: | On Mon, May 09, 2005 at 10:57:10AM +0200, Lars Gullik Bjønnes wrote: >> Subscript is really unsigned so -1 -> 0x and we get a crash. > | Mind your manners. There is no requirement for -1 == 0x in | The Holy Standard. And I was wrong as w

Re: Fix invalid access in insetcommandparams.C

2005-05-10 Thread Lars Gullik Bjønnes
Andre Poenitz <[EMAIL PROTECTED]> writes: | On Mon, May 09, 2005 at 10:58:51AM +0200, Lars Gullik Bjønnes wrote: >> John Levon <[EMAIL PROTECTED]> writes: >> >> | On Thu, May 05, 2005 at 05:23:56PM +0100, Angus Leeming wrote: >> > >> >> Urs. Doesn't cmd[-1] mean cmd[cmd.length()-2]. Some nast

Re: Fix invalid access in insetcommandparams.C

2005-05-09 Thread Andre Poenitz
On Mon, May 09, 2005 at 10:58:51AM +0200, Lars Gullik Bjønnes wrote: > John Levon <[EMAIL PROTECTED]> writes: > > | On Thu, May 05, 2005 at 05:23:56PM +0100, Angus Leeming wrote: > > > >> Urs. Doesn't cmd[-1] mean cmd[cmd.length()-2]. Some nasty c-ism? > > > | No, it means what it says, one be

Re: Fix invalid access in insetcommandparams.C

2005-05-09 Thread Andre Poenitz
On Mon, May 09, 2005 at 10:57:10AM +0200, Lars Gullik Bjønnes wrote: > Subscript is really unsigned so -1 -> 0x and we get a crash. Mind your manners. There is no requirement for -1 == 0x in The Holy Standard. Andre'

Re: Fix invalid access in insetcommandparams.C

2005-05-09 Thread John Levon
On Mon, May 09, 2005 at 10:58:51AM +0200, Lars Gullik Bj?nnes wrote: > | On Thu, May 05, 2005 at 05:23:56PM +0100, Angus Leeming wrote: > > > >> Urs. Doesn't cmd[-1] mean cmd[cmd.length()-2]. Some nasty c-ism? > > > | No, it means what it says, one before the start of the array in this > | cas

Re: Fix invalid access in insetcommandparams.C

2005-05-09 Thread Lars Gullik Bjønnes
John Levon <[EMAIL PROTECTED]> writes: | On Thu, May 05, 2005 at 05:23:56PM +0100, Angus Leeming wrote: > >> Urs. Doesn't cmd[-1] mean cmd[cmd.length()-2]. Some nasty c-ism? > | No, it means what it says, one before the start of the array in this | case. Right ... except for the case where -1

Re: Fix invalid access in insetcommandparams.C

2005-05-09 Thread Lars Gullik Bjønnes
"Jose' Matos" <[EMAIL PROTECTED]> writes: | @@ -72,7 +71,8 @@ void InsetCommandParams::scanCommand(str | case OPTION:toptions += c; break; | case SECOPTION: tsecoptions += c; break; | case CONTENT: tcontents += c; break; | - case WS: | +

Re: Fix invalid access in insetcommandparams.C

2005-05-09 Thread Lars Gullik Bjønnes
Angus Leeming <[EMAIL PROTECTED]> writes: | Jose' Matos wrote: > >> Hi, >> am I the only one using FC3 with the latest gcc? > | If by "latest" you mean whatever ships with FC3, updated with up2date, | then no, you're not the only one. That's my home system too. > >> After I bit of research I foun

Re: Fix invalid access in insetcommandparams.C

2005-05-07 Thread Andre Poenitz
On Sat, May 07, 2005 at 12:39:19PM +0200, Alfredo Braunstein wrote: > Andre Poenitz wrote: > > > On Thu, May 05, 2005 at 05:23:56PM +0100, Angus Leeming wrote: > >> Urs. Doesn't cmd[-1] mean cmd[cmd.length()-2]. Some nasty c-ism? > > > > Only for cmd.lenght() == -1. > > I think you should re

Re: Fix invalid access in insetcommandparams.C

2005-05-07 Thread Alfredo Braunstein
Andre Poenitz wrote: > On Thu, May 05, 2005 at 05:23:56PM +0100, Angus Leeming wrote: >> Urs. Doesn't cmd[-1] mean cmd[cmd.length()-2]. Some nasty c-ism? > > Only for cmd.lenght() == -1. I think you should redo your math ;-P Alfredo

Re: Fix invalid access in insetcommandparams.C

2005-05-06 Thread Jose' Matos
On Friday 06 May 2005 15:32, Angus Leeming wrote: > Here's the wrapper script to configure that I use. Edit the options to > suit. I will do. :-) Thank you. -- Josà AbÃlio

Re: Fix invalid access in insetcommandparams.C

2005-05-06 Thread Angus Leeming
Jose' Matos wrote: > On Thursday 05 May 2005 19:27, Angus Leeming wrote: >> >> "char const b" (and c) wouldn't hurt though :) > > Done. Committed. > >> Also, if your used a separate build tree from your source tree, you >> wouldn't have those >> >> ? frontends/gtk/pch.h.gch >> ? frontends/gtk/

Re: Fix invalid access in insetcommandparams.C

2005-05-06 Thread Jose' Matos
On Thursday 05 May 2005 19:27, Angus Leeming wrote: > > "char const b" (and c) wouldn't hurt though :) Done. Committed. > Also, if your used a separate build tree from your source tree, you > wouldn't have those > > ? frontends/gtk/pch.h.gch > ? frontends/gtk/pch.h.gch.dep > > :-P True but e

Re: Fix invalid access in insetcommandparams.C

2005-05-06 Thread Andre Poenitz
On Thu, May 05, 2005 at 05:23:56PM +0100, Angus Leeming wrote: > Urs. Doesn't cmd[-1] mean cmd[cmd.length()-2]. Some nasty c-ism? Only for cmd.lenght() == -1. Andre'

Re: Fix invalid access in insetcommandparams.C

2005-05-05 Thread Angus Leeming
Jose' Matos wrote: > On Thursday 05 May 2005 18:39, Angus Leeming wrote: >> >> I'd like you to fix it. > > Is the attached patch OK? > > I noticed that you have used '\0', for the null character is that style > favored over a plain 0? Dunno "char const b" (and c) wouldn't hurt though :) A

Re: Fix invalid access in insetcommandparams.C

2005-05-05 Thread Jose' Matos
On Thursday 05 May 2005 18:39, Angus Leeming wrote: > > I'd like you to fix it. Is the attached patch OK? I noticed that you have used '\0', for the null character is that style favored over a plain 0? Thanks, -- José Abílio ? frontends/gtk/pch.h.gch ? frontends/gtk/pch.h.gch.dep Index:

Re: Fix invalid access in insetcommandparams.C

2005-05-05 Thread Angus Leeming
Jose' Matos wrote: > Will you do it, or do want me to patch it? I'd like you to fix it. -- Angus

Re: Fix invalid access in insetcommandparams.C

2005-05-05 Thread Jose' Matos
On Thursday 05 May 2005 17:23, Angus Leeming wrote: > >   Is this the right fix? > > Urs. Doesn't cmd[-1] mean cmd[cmd.length()-2]. Some nasty c-ism? :-D That is python, I knew that its influence was spreading inside of you, but I didn't suspect its dissemination was so advanced. ;-) > A

Re: Fix invalid access in insetcommandparams.C

2005-05-05 Thread John Levon
On Thu, May 05, 2005 at 05:23:56PM +0100, Angus Leeming wrote: > Urs. Doesn't cmd[-1] mean cmd[cmd.length()-2]. Some nasty c-ism? No, it means what it says, one before the start of the array in this case. john

Re: Fix invalid access in insetcommandparams.C

2005-05-05 Thread Angus Leeming
Jose' Matos wrote: > Hi, > am I the only one using FC3 with the latest gcc? If by "latest" you mean whatever ships with FC3, updated with up2date, then no, you're not the only one. That's my home system too. > After I bit of research I found the culprit: > > Index: src/insets/insetcommandparam