[fpc-devel] ptop inconsistent with defaults config file specified

Graeme Geldenhuys graemeg.lists at gmail.com
Tue Mar 20 08:49:27 CET 2007


Hi Michael,

I played around with the ptopu.pp unit and I believe I fixed the
problem.  I'll test it a bit more and if all checks out, submit a
patch.

Can ptop remove spaces infront of keywords and symbols or would I have
to add that feature myself?  For example.

before:
    procedure MyFunc (AParam : string) ;
after:
    procedure MyFunc(AParam: string);

The space in front of the '(' and the ':' and the ';' was removed.


Regards,
  - Graeme -


On 3/19/07, Michael Van Canneyt <michael.vancanneyt at wisa.be> wrote:
>
>
> On Mon, 19 Mar 2007, Graeme Geldenhuys wrote:
>
> > Hi,
> >
> > I saved the default settings of 'ptop' to a file using the following
> >
> >  ptop -g ptop.cfg
> >
> > Now using that config file with the -c parameter and not specifying it
> > at all should give me the same results, but it does!  Anybody that can
> > shed some light on this.  I'm in the process of creating a Borland
> > Object Pascal coding standards config file and came across this
> > stumbling block.
> >
> > Here is how I used the ptop application with the defaults and defaults
> > generated config file:
> >
> > 1)    ptop test3.pp test3_out.pp
> > 2)    ptop -c ptop.cfg test3.pp test3_out.pp
> >
> >
> > Here is the content of the test3.pp file
> >
> > -------------------[ test3.pp ]--------------------------
> > procedure TestTryProc;
> > begin
> >
> > try ShowMessage ('Start'); try ShowMessage ('trying');
> > try ShowMessage ('still trying');
> > finally ShowMessage ('going...'); end;
> > except ShowMessage ('except'); end;
> > finally ShowMessage ('Finally!'); end;
> >
> > end;
> > -------------------[ end ]--------------------------
> >
> >
> > Here is the output of 1) above.  Notice the difference in indentation
> > of the try/finally and try/except blocks in 1) and 2).
>
> I don't have much time at the moment, and it has been a long time since I
> looked at the ptopu unit. The unit was originally intended for TP code,
> and try/finally/end did not exist back then. The support I added for this
> was a quick hack. I'm sorry to say that at the moment I don't have time to
> look at the config file problem, so you'll have to do some testing :/
>
> If you mail me in private, I can try to help.
>
> Michael.
> _______________________________________________
> fpc-devel maillist  -  fpc-devel at lists.freepascal.org
> http://lists.freepascal.org/mailman/listinfo/fpc-devel
>


-- 
Graeme Geldenhuys

There's no place like S34° 03.168'  E018° 49.342'



More information about the fpc-devel mailing list