Re: [fpc-pascal] Segmentation fault with cthreads on FreeBSD

2020-06-08 Thread fredvs via fpc-pascal
> @fredvs yes I install from source code.

Hum, so, imho, the MakeFile provided by official FPC download source has
something wrong.
I did try to using fpmake to re-create it but the resulted MakeFile did not
fix the problem.

Maybe the creator of the fpc FreeBSD package could give some light what to
change in the MakeFile.

I used this script:

!/bin/sh 
COMPILER=/usr/local/lib/fpc/3.0.4/ppcx64
gmake clean
gmake all FPC=$COMPILER OPT="-Fl/usr/local/lib" 
gmake FPC=$COMPILER install INSTALL_PREFIX=/usr/local/

This compiles and install fpc 3.0.4 but, like explained, your application
compiles ok but crash while running.

A contrario the compiler installed via the official pkg of FreeBSD gives a
compiled program that runs ok:

$ sudo pkg update
$ sudo pkg install fpc
$ sudo pkg install lang/fpc-units





--
Sent from: http://free-pascal-general.1045716.n5.nabble.com/
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] Segmentation fault with cthreads on FreeBSD

2020-06-08 Thread fredvs via fpc-pascal
Hello.

When compiling your code with fpc installed from freebsd package:

$ sudo pkg install fpc
$ sudo pkg install lang/fpc-units

All is OK, your test.pas run as expected.

But compiling your code with fpc compiled from source, there is indeed that
error message:
fish: "./test" terminated by signal SIGSEGV 5Address boundary error)



--
Sent from: http://free-pascal-general.1045716.n5.nabble.com/
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] Search path order for fpc.cfg

2020-04-13 Thread fredvs via fpc-pascal
> (Even in an apology, you call us a tri... well, maybe there is a reason
> for that) 

For me a tribe of gurus is not insult, nor tribe, nor gurus, sorry if you
feel it like that.
I surprised by so much reaction for a patch that I proposed.

I will not annoy you anymore, promise.

And if you dont want to accept my apologize, sorry for you and me.

Take care of you.

Fre;D




--
Sent from: http://free-pascal-general.1045716.n5.nabble.com/
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] Search path order for fpc.cfg

2020-04-12 Thread fredvs via fpc-pascal
>I would think this is about the biggest failure of all for a compiler ? 

Imo, the worst thing is when the compilation is ok but code are bad
interpreted.

> simply because unix does not do this.

OK, like I did for all my arguments, can you prove that?
I never hear that is was forbidden to place a config file in same dir than
executable and forbidden to use that config file in a search.

But, ok, I am very tired of all that discussion, thanks for all what was
already done.

Fre




--
Sent from: http://free-pascal-general.1045716.n5.nabble.com/
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] Search path order for fpc.cfg

2020-04-12 Thread fredvs via fpc-pascal
> committed in rev. 44697

Yep, excellent!

> Note that this still may cause surprises, because paramstr(0) is not 100%
reliable.

Hum, ok, but I assume to take the risk.
Finally, the worst that can happen is fail to compil.

Nice, FPC is nearly OOTB now.
Only miss a very, very little patches: the "so.n" of course and the
searchpath order.

I feel that "so.n" patch has a possibility to be apply, I dont feel so much
hostility about it.

So I keep my force for the last combat, the "searchpath order":
compiler/option.pas line 3349 

function check_configfile(fn:string; var foundfn:string):boolean;
 
  if not FileExists(fn) then // current dir
if
CfgFileExists(IncludeTrailingBackslash(ExtractFilePath(ParamStr(0)))+fn)
then // add this:
   foundfn:=IncludeTrailingBackslash(ExtractFilePath(ParamStr(0)))+fn //
dir of compiler
else 

Just convince that placing a config file in the same directory than then
compiler is not a crime in Unix.

And prove that directory of compiler has to be in second position for
searching.
And that it will not break any compatibility, even for Windows.

OK, I am ready for the combat, I am sure of my arguments.

Fre;D







--
Sent from: http://free-pascal-general.1045716.n5.nabble.com/
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] Search path order for fpc.cfg

2020-04-11 Thread fredvs via fpc-pascal
I promise, it is the last for tonight.

It would be wonderful if in /compiler/globals.pas, at line 906, you add this
line (or something like that):

 { Replace some macros }

Replace(s,'$FPCPATH',AnsiString(IncludeTrailingBackslash(ExtractFilePath(ParamStr(0);

So in fpc.cfg you may do:

-Fu$FPCPATH/units/$fpctarget
-Fu$FPCPATH/units/$fpctarget/*
-Fu$FPCPATH/units/$fpctarget/rtl

And it works like charm.

@Jonas, I apologize, really, you kindly answered but I feel alone against a
tribe of gurus who want to eat me.

OK, I go to sleep (if I can).

Fred










--
Sent from: http://free-pascal-general.1045716.n5.nabble.com/
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] Search path order for fpc.cfg

2020-04-11 Thread fredvs via fpc-pascal
I did try this without luck:

-Fu$PPC_EXEC_PATH/units/$fpctarget
-Fu$PPC_EXEC_PATH/units/$fpctarget/*
-Fu$PPC_EXEC_PATH/units/$fpctarget/rtl

Fred



--
Sent from: http://free-pascal-general.1045716.n5.nabble.com/
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] Search path order for fpc.cfg

2020-04-11 Thread fredvs via fpc-pascal
> You can do

> -Fu$PPC_CONFIG_PATH/../units/whatever 

> We can add some extra macros there if you want, 

Could you add the macro PPC_COMPILER_PATH ?

Fred



--
Sent from: http://free-pascal-general.1045716.n5.nabble.com/
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] Search path order for fpc.cfg

2020-04-11 Thread fredvs via fpc-pascal
Hello Alexander.

Thanks for the tips, but all that is too much complicated for a totally
newbie.

I did not really understand the argument that is a absolutely wrong way to
store the fpc.cfg in the same directory as the compiler, like it is allowed
for Windows.

But I accept the choice.

With the patch, I agree, it is maybe to simple, unzip it, compile it, no
script needed, no break of compatibility (even I would prefer change the
search order), the fpc.cfg is in the directory of fpc and all the -Fu's are
like -Fu./units/ to point to child directories.

Do you know the OOTB concept?
https://en.wikipedia.org/wiki/Out_of_the_box_(feature)

Fre;D







--
Sent from: http://free-pascal-general.1045716.n5.nabble.com/
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] Search path order for fpc.cfg

2020-04-11 Thread fredvs via fpc-pascal
> if the .so.n issue was really so urgent for you,

Ho, it was urgent for we since the first time I did use it 15 years ago!

And each time that I request it, it finished by insult.

And when I created uos, problems of linking to libs where solved by
loadlibrary() because with ld it was not possible.

Sorry but now it is the time to change and fast.

Fred




--
Sent from: http://free-pascal-general.1045716.n5.nabble.com/
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] Search path order for fpc.cfg

2020-04-11 Thread fredvs via fpc-pascal
> You just need to be a little patient 

Huh, if I may, the so.n bug date from 3 years ago and is not yet assigned.

Sorry Michael but I need a fpc-wob (works out the box) now.
And when all my needs will be fixed in fpc original, I will come back to the
original.

Sorry but time goes out, I dont have time to be patient any more.

Fred 



--
Sent from: http://free-pascal-general.1045716.n5.nabble.com/
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] Search path order for fpc.cfg

2020-04-11 Thread fredvs via fpc-pascal
> It's perfectly fine to change the name. See e.g. the first answer to
> https://stackoverflow.com/questions/4475319/how-to-rebrand-copyright-a-forked-project-gnu-gpl#

Really, did you think that I ever had the idea to change anything in the
copyright and not claim that it is a fork from fpc?

You know what, please choose the name, I will use it.

Fred





--
Sent from: http://free-pascal-general.1045716.n5.nabble.com/
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] Search path order for fpc.cfg

2020-04-11 Thread fredvs via fpc-pascal
>  then you should probably change the name

Humm, in previous post it was said that I am not allowed to change the name?






--
Sent from: http://free-pascal-general.1045716.n5.nabble.com/
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] Search path order for fpc.cfg

2020-04-11 Thread fredvs via fpc-pascal
> We have different opinions about what is needed and what is not. Or what
> even is the right approach. 

And it is why I like the concept of open source, different opinions may
exist and no one is obliged to impose his own.

Only do a fork, respect the rules of the license and do the change you want
without be dependent of what the parent of the fork think or do.

And even more, if it is done with goodwill, parent and fork can stimulate
their self.

Fred





--
Sent from: http://free-pascal-general.1045716.n5.nabble.com/
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] Search path order for fpc.cfg

2020-04-11 Thread fredvs via fpc-pascal
> doesn't the 2nd one already cover the 3rd one? 

Yes, sorry, it was just a example of the layout.

Fred



--
Sent from: http://free-pascal-general.1045716.n5.nabble.com/
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] Search path order for fpc.cfg

2020-04-11 Thread fredvs via fpc-pascal
Hello Michael.

I will deeply study your proposition.

I am also highly interested by this:

> You can do
> -Fu$PPC_CONFIG_PATH/../units/whatever  

Maybe it can solve some problem and the last patch about dealing with './'
will not be needed.

I hope that you understand that:

https://github.com/fredvs/freepascal

was done not for create a new war but because some features are really
needed.

And if some similar patches are applied to official fpc, I the repository
can be deleted.

Fre;D






--
Sent from: http://free-pascal-general.1045716.n5.nabble.com/
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] Search path order for fpc.cfg

2020-04-11 Thread fredvs via fpc-pascal
> On unix, a simple 'unzip' is simply not the standard way to do things. 

There are tons of application that do that.

GoogleEarth, lot of utilities, ... MSEide,  




--
Sent from: http://free-pascal-general.1045716.n5.nabble.com/
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] Search path order for fpc.cfg

2020-04-11 Thread fredvs via fpc-pascal
> It will create one in your home directory if it detects you do not have
root access. 

Could you explain that?
Of course if you can show me a trick for configuring a script that will
install fpc in the home directory (.fpc.cfg), with for example the
hard-coded directory /home/user/instantfpc, I will use it.

But the condition will be that the user has nothing write, only run a
script.

Fre;D




--
Sent from: http://free-pascal-general.1045716.n5.nabble.com/
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] Search path order for fpc.cfg

2020-04-11 Thread fredvs via fpc-pascal
> There's a prompt in the freepascal installer that asks for the prefix. Your
users should be capable of that?

As explained in previous post, the goal is to not touch the system.
If you use the fpc installer, even if you install it in the user's home
directory, the installer will create a fpc.cfg in /etc and that needs root
access.

Of course users can do that but the goal of that patch is to have a compiler
totally out-of-the-box, that even dont need to configure or set anything.

Sorry but not all users are gurus.
And sorry also if it dont follow the rules of the good old boy way.

Fred





--
Sent from: http://free-pascal-general.1045716.n5.nabble.com/
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] Search path order for fpc.cfg

2020-04-11 Thread fredvs via fpc-pascal
Hello.

The target of that "patched" fpc is mainly the Raspbian RPi.

I want a fpc out-of-the-box, only a zip file that people may unzip where
they want, without need to touch anything to the system.

All what I have found in fpc doc always require to touch to system.

Also, I want that people can compile out-of-the-box, without the need to
install dev package because that army of Rpi is not connected.

I thanks you for the warnings about using fpc.cfg in the same directory than
the compiler.
But for my need there is no problem with that, even if you create a symlink
and run fpc from that symlink.

I do propose my patch here to inform what I am changing in 
https://github.com/fredvs/freepascal

Fre;D






--
Sent from: http://free-pascal-general.1045716.n5.nabble.com/
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] Search path order for fpc.cfg

2020-04-10 Thread fredvs via fpc-pascal
> Does fpc accept relative path for -Fu in the fpc.cfg config file, something
> like:

> -Fu./units/$fpctarget
> -Fu./units/$fpctarget/*
> -Fu./units/$fpctarget/rtl 

No, it seems that it is not possible.

So I propose to do this, dont hurt existing code, only gives happiness:

in cfileutls.pas do this:

procedure TSearchPathList.AddPath(s:TCmdStr;addfirst:boolean);  
begin
  if system.copy(s,1,2) = './' then
 begin s :=
AnsiString(IncludeTrailingBackslash(ExtractFilePath(ParamStr(0))) + 
 system.copy(s,3,length(s)-2));
  end;
  AddLibraryPath('',s,AddFirst);
 end;

Tested and re-tested, committed, it works like charms, with fpc.cfg in same
dir than fpc (first patch):

# searchpath for units and other system dependent things
-Fu./units/$fpctarget
-Fu./units/$fpctarget/*
-Fu./units/$fpctarget/rtl

OK, I let you in peace.

Take care of you.

Fre;D



--
Sent from: http://free-pascal-general.1045716.n5.nabble.com/
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] Search path order for fpc.cfg

2020-04-10 Thread fredvs via fpc-pascal
Hello.

The last line of function check_configfile(fn:string; var
foundfn:string):boolean;
should be something like this:
   
...
  else
 if CfgFileExists(IncludeTrailingBackslash(ExtractFilePath(ParamStr(0)))+fn)
then
   foundfn:=IncludeTrailingBackslash(ExtractFilePath(ParamStr(0)))+fn
  else  
  check_configfile:=false;





--
Sent from: http://free-pascal-general.1045716.n5.nabble.com/
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] Search path order for fpc.cfg

2020-04-10 Thread fredvs via fpc-pascal
Hello.

In fpc code /compiler/options.pas, for
function check_configfile(fn:string; var foundfn:string):boolean;

 {
Order to read configuration file :
try reading fpc.cfg in :
 1 - current dir
 2 - configpath
 3 - compiler path
  }

But if you check in code, the option 3 is never done.

Fre;D





--
Sent from: http://free-pascal-general.1045716.n5.nabble.com/
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


[fpc-pascal] Search path order for fpc.cfg

2020-04-10 Thread fredvs via fpc-pascal
Hello.

According:
https://wiki.freepascal.org/Configuration_file

 Under a Unix or Unix-like operating systems (e.g. FreeBSD, Linux)

1)The current directory.
2)Your home directory, it looks for .fpc.cfg.
3)The directory specified in the environment variable PPC_CONFIG_PATH,
and if it is not set, it will look in the etc directory above the compiler
directory. (For instance, if the compiler is in /usr/local/bin, it will look
in /usr/local/etc)
The directory /etc.

Would it be possible to have a 4th: the directory of the binary compiler and
maybe change his order?

Does fpc accept relative path for -Fu in the fpc.cfg config file, something
like:

-Fu../units/$fpctarget
-Fu../units/$fpctarget/*
-Fu../units/$fpctarget/rtl

Thanks.

Fre;D






--
Sent from: http://free-pascal-general.1045716.n5.nabble.com/
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] About fpc license.

2020-04-10 Thread fredvs via fpc-pascal
> But you need it to compile and link it (especially in C/C++).

Yes, for C/C++ sometimes developers needs the .a static libraries, the new
library.h header, .la files, etc.
And by convenience some libraries give a "dev" packages with all that,
included the "nude" symlink that point to the develop library.

But this is not needed by fpc, fpc needs the .so dynamic library for
linking, no more.

Fred



--
Sent from: http://free-pascal-general.1045716.n5.nabble.com/
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] About fpc license.

2020-04-10 Thread fredvs via fpc-pascal
@Michael: Thanks.

<3

Fre;D



--
Sent from: http://free-pascal-general.1045716.n5.nabble.com/
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] About fpc license.

2020-04-10 Thread fredvs via fpc-pascal
> I'm surprised you want to distribute your own version of the compiler. 

Huh, https://bugs.freepascal.org/view.php?id=32367

No answer, no no good will, hate, dont want to understand, ... --->
conclusion:

https://github.com/fredvs/freepascal

Fre;D







--
Sent from: http://free-pascal-general.1045716.n5.nabble.com/
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


[fpc-pascal] About fpc license.

2020-04-09 Thread fredvs via fpc-pascal
Hello.

I have done a fork of fpc fixes_3_2 and made some modification of original
code.

May I distribute the fpc binary of that patched version with the units
files, ready to use out-of-the-box?

Must I add the source of the change done?

What I am not allowed to do?

Thanks.

Fre;D





--
Sent from: http://free-pascal-general.1045716.n5.nabble.com/
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] Forum + test...

2020-04-05 Thread fredvs via fpc-pascal
Sorry fpc, I dont know what appends, this should be sent in the mse-org
mailing list.

Please ignore it.



--
Sent from: http://free-pascal-general.1045716.n5.nabble.com/
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


[fpc-pascal] Forum + test...

2020-04-05 Thread fredvs via fpc-pascal
I did sent already 3 mails in mse-mailing list but they do not appear.

Is this new there?

Hola, can you see me?

There is also mse-org forum:
http://mse-org.111682.n8.nabble.com/

Fre;D



--
Sent from: http://free-pascal-general.1045716.n5.nabble.com/
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] New release of MSEide.

2020-04-05 Thread fredvs via fpc-pascal
Hello Graeme.

Thanks for the thanks but the real truth is that without your fixes this new
release would never exist.

Fre;D



--
Sent from: http://free-pascal-general.1045716.n5.nabble.com/
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] Wine + Unsupported ioctl

2020-04-04 Thread fredvs via fpc-pascal
> Ok, the fatal error was the "Path "..\" does not exist" instead of
"Unsupported ioctl".

Not sure to understand.

So is it ok, only a warning to fix "Unsupported ioctl" or the linking still
fails?



--
Sent from: http://free-pascal-general.1045716.n5.nabble.com/
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] Wine + Unsupported ioctl

2020-04-04 Thread fredvs via fpc-pascal
Hello Juha.

Here on Linux Dedian 10.2 64 bit multi-arch it is working perfectly.
I use wine + fpc.exe to compile many project, included MSEide or ideU.

Where did you install fpc.exe, in .wine/drive_ ?

Here where I did install it:

/home/fred/.wine/drive_c/FPC/3.0.4/bin/i386-win32/ppc386.exe

Did you install the Lazarus source also in .wine/drive_c ?

What command line are you using, I use this?

wine /home/fred/.wine/drive_c/FPC/3.0.4/bin/i386-win32/ppc386.exe
myprogram.pas

Fre;D




--
Sent from: http://free-pascal-general.1045716.n5.nabble.com/
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] New release of MSEide.

2020-04-02 Thread fredvs via fpc-pascal
Hello Rainer.

I discover MSEide-MSEgui in 2010.

In 2012, I decided to fork MSEide to create ideU:
https://github.com/fredvs/ideU

The goal was to have a ide voice-assisted, multi languages, multi compilers.
Martin created the voice-assistive interface kindly for that.

Also I did create other msegui applications:
https://github.com/fredvs/strumpract

I absolutely dont have the skill of Martin.

So all what is changed in all new commit is highly discussed in MSE mailing
list, with users and mse-org team.

That new release is the result of many help from many people with brave
heart.

Fre;D









--
Sent from: http://free-pascal-general.1045716.n5.nabble.com/
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


[fpc-pascal] New release of MSEide.

2020-04-02 Thread fredvs via fpc-pascal
Hello everybody.

The mse-org team is very happy to announce the new release of MSEide+MSEgui.

MSEide+MSEgui is a Pascal Cross Platform GUI Development System.

- Compiles with FPC 2.6.4, 3.0.0, 3.0.2, 3.0.4 or 3.2.0.
- For FreeBSD-x86_64, Linux-i386, Linux-x86_64, Linux-arm(Raspberry Pi),
  Windows-i386, Windows-x86_64.
- Links to xlib and gdi32, no external widget library needed.
- Internal character encoding is utf-16.
- Uses anti aliased fonts on Linux (Xft).
- All screen drawing is double buffered.
- Has docking forms and MDI.
- Has embedded forms (similar to TFrame).
- Has sophisticated database access components and data edit widgets.
- Internationalization functionality with resource modules.
- Report generator.

IDE:
- Integrated debugging.
- Source code highlighting.
- Source code navigation with support for include files.
- Code completion for classes.
- Procedures list.
- Integrated visual form designer with source code update for components and
  events.
- Flexible and handy build system with switchable macros.
- Visual form inheritance.
- Integrated report designer.

Release of binary MSEide for Windows 64/32, Linux 64/32, FreeBSD 64 and Rpi
ARM can be found here:
https://github.com/mse-org/mseide-msegui/releases/

Source code of MSEide+MSEgui are here:
https://github.com/mse-org/mseide-msegui

Many thanks to fpc team that helped so much for that release (particularly
Sven).

Have a lot of fun.

Fre;D



--
Sent from: http://free-pascal-general.1045716.n5.nabble.com/
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] Why external execution so slow?

2020-03-31 Thread fredvs via fpc-pascal
> Does FPC come as a 64 bit release now?

https://sourceforge.net/projects/freepascal/files/Win32/3.0.4/fpc-3.0.4.i386-win32.cross.x86_64-win64.exe/download



-
Many thanks ;-)
--
Sent from: http://free-pascal-general.1045716.n5.nabble.com/
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] FPC 3.2.0RC1 released!

2020-03-29 Thread fredvs via fpc-pascal
> If you want you can report what you have done here ... or in the maillist. 

- Download fpc-3.2.0rc1.x86_64-linux.tar: OK
- Unzip fpc-3.2.0rc1.x86_64-linux.tar: OK
- $ cd /home/test/fpc320RC1/fpc-3.2.0rc1.x86_64-linux: OK
- $ sudo install.sh : OK (perfect)

Compiled big complicated application with it: OK
Run that application: OK

Perfect, la plus grande distinction.

Fre;D








-
Many thanks ;-)
--
Sent from: http://free-pascal-general.1045716.n5.nabble.com/
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] FPC 3.2.0RC1 released!

2020-03-29 Thread fredvs via fpc-pascal
Yep, well done Marco!

I liked already FPC 3.2.0 Beta so I am very happy that RC1 is ready.

Fre;D



-
Many thanks ;-)
--
Sent from: http://free-pascal-general.1045716.n5.nabble.com/
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] Disable Warning: (6060) Case statement does not handle all possible cases

2020-03-27 Thread fredvs via fpc-pascal
> If you have a uses clause, try adding it after the uses clause. 

Yep, indeed that did the trick.
But note also that it must be after the "uses" clause after "implementation"
(otherwise after first "uses" it does not work).

Also, to make earlier fpc versions happy, this must be added:

{$if fpc_fullversion >= 030300}
  {$warn 6060 off}
{$endif}

OK, thanks Jonas.

Fre;D





-
Many thanks ;-)
--
Sent from: http://free-pascal-general.1045716.n5.nabble.com/
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] Disable Warning: (6060) Case statement does not handle all possible cases

2020-03-27 Thread fredvs via fpc-pascal
> It works for me: 

It seems that you did try to use {$warn 6060 off}  in a program-file.

But did you try with a unit-file?

Fre;D



-
Many thanks ;-)
--
Sent from: http://free-pascal-general.1045716.n5.nabble.com/
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] Disable Warning: (6060) Case statement does not handle all possible cases

2020-03-27 Thread fredvs via fpc-pascal
> cat" is a program

Ha, ok.

>> Will it disable all the warnings concerned for all the code of the unit?
> Yes. 

Hum, here, adding {$warn 6060 off} after "unit", on Linux 64 bit, compiled
with fpc 3.3.1 trunk of 7 days ago, the warnings are still there.

Fre;D



-
Many thanks ;-)
--
Sent from: http://free-pascal-general.1045716.n5.nabble.com/
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] Disable Warning: (6060) Case statement does not handle all possible cases

2020-03-27 Thread fredvs via fpc-pascal
> It works for me:

> $ cat tt.pp
> {$warn 6060 off}

Ha, on Linux too?

By the way, what is "$ cat tt.pp", is it needed to disable the warning?
And where did you place the code, just after "units" like explained in doc.

Will it disable all the warnings concerned for all the code of the unit?

Fre;D




-
Many thanks ;-)
--
Sent from: http://free-pascal-general.1045716.n5.nabble.com/
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] Range check error warning.

2020-03-24 Thread fredvs via fpc-pascal
Many thanks Gerhald.

Now I have to deeply study your code, I did not catch all at first glance.

Write you later.

Fre;D 



-
Many thanks ;-)
--
Sent from: http://free-pascal-general.1045716.n5.nabble.com/
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] Range check error warning.

2020-03-24 Thread fredvs via fpc-pascal
> what about

> foldlevelmask = (not (foldhiddenmask or currentfoldhiddenmask)) and $ff ;

Ha, this one fpc 3.3.1 like it!

No more warning nor error.

May I ask you what "and $ff" does, is it the same as "abs()" or keep it the
negative value?

Many thanks.

Fre;D 



-
Many thanks ;-)
--
Sent from: http://free-pascal-general.1045716.n5.nabble.com/
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] Range check error warning.

2020-03-24 Thread fredvs via fpc-pascal
> perhaps calculate those results by hand and assign them.. then fix it
later? hehe

Yes, that is the thing with the gurus, it must seem complicated.

I agree that writing this:

> foldlevelmask = byte(not (foldhiddenmask or currentfoldhiddenmask)); 

is much more impressive than writing this:

> foldlevelmask = -193

;-)






-
Many thanks ;-)
--
Sent from: http://free-pascal-general.1045716.n5.nabble.com/
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] Range check error warning.

2020-03-24 Thread fredvs via fpc-pascal
> what mode are you compiling with?

{$mode objfpc}{$h+}



-
Many thanks ;-)
--
Sent from: http://free-pascal-general.1045716.n5.nabble.com/
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] Range check error warning.

2020-03-24 Thread fredvs via fpc-pascal
This make the compiler happy:

foldlevelmask = byte(abs(not (foldhiddenmask or currentfoldhiddenmask)));

Not sure it is better to do abs() but so no more warning.

Let's fix with it?







-
Many thanks ;-)
--
Sent from: http://free-pascal-general.1045716.n5.nabble.com/
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] Range check error warning.

2020-03-24 Thread fredvs via fpc-pascal
And doing this:

 foldhiddenbit = byte(7);
 foldhiddenmask = byte(1 shl foldhiddenbit);
 currentfoldhiddenbit = byte(6);
 currentfoldhiddenmask = byte(1 shl currentfoldhiddenbit);
 foldlevelmask = abs(byte(not (foldhiddenmask or currentfoldhiddenmask)));
// line 891

Gives also a warning:
msedatalist.pas(891,22) Warning: (4110) Range check error while evaluating
constants (-193 must be between 0 and 255)

OK, I stop.

Fre;D







-
Many thanks ;-)
--
Sent from: http://free-pascal-general.1045716.n5.nabble.com/
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] Range check error warning.

2020-03-24 Thread fredvs via fpc-pascal
And only changing this:

> foldhiddenbit: byte = 7;

Gives also a error message on next line unchanged:

> foldhiddenmask = 1 shl foldhiddenbit; // raise a error on that line.

Error: (3203) Illegal expression

Fre;D



-
Many thanks ;-)
--
Sent from: http://free-pascal-general.1045716.n5.nabble.com/
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] Range check error warning.

2020-03-24 Thread fredvs via fpc-pascal
Hello Alexander.

I did:

const
   foldhiddenbit : byte = 7; // line 896
   foldhiddenmask : byte = 1 shl foldhiddenbit; // line 897
   currentfoldhiddenbit : byte = 6; // line 898
   currentfoldhiddenmask : byte = 1 shl currentfoldhiddenbit; // line 899
   foldlevelmask : byte = not (foldhiddenmask or currentfoldhiddenmask); //
line 900

That gives that error messages:

msedatalist.pas(897,47) Error: (3203) Illegal expression
msedatalist.pas(899,61) Error: (3203) Illegal expression
msedatalist.pas(900,72) Error: (3203) Illegal expression
msedatalist.pas(1126,1) Fatal: (10026) There were 3 errors compiling module,
stopping

Fre;D



-
Many thanks ;-)
--
Sent from: http://free-pascal-general.1045716.n5.nabble.com/
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] Range check error warning.

2020-03-24 Thread fredvs via fpc-pascal
Hello WKitty.

   foldhiddenmask : byte = 1 shl foldhiddenbit;
   currentfoldhiddenmask : byte = 1 shl currentfoldhiddenbit;
   foldlevelmask : byte = not (foldhiddenmask or currentfoldhiddenmask);

  =

  msedatalist.pas(897,47) Error: (3203) Illegal expression
  msedatalist.pas(899,61) Error: (3203) Illegal expression
  msedatalist.pas(900,72) Error: (3203) Illegal expression


Thanks for the links for calculation, indeed the result is -193.

I did play with abs(), for example:

foldlevelmask = abs(byte(not (foldhiddenmask or currentfoldhiddenmask)));

But strangely still that warning:
Warning: (4110) Range check error while evaluating constants (-193 must be
between 0 and 255)

Fre;D


Fre;D 

  



-
Many thanks ;-)
--
Sent from: http://free-pascal-general.1045716.n5.nabble.com/
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] Disable Warning: (6060) Case statement does not handle all possible cases

2020-03-24 Thread fredvs via fpc-pascal
Hello.

According to:

 https://wiki.freepascal.org/Turn_warnings_and_hints_on_or_off

> Control specific warnings:

> Add

> {$warn  off}

> just after the unit name.


So doing this:

> unit myunit;   

>  {$warn 6060 off}

Still gives some  "Warning: (6060) Case statement does not handle all
possible cases"

How to disable it?

Thanks.





-
Many thanks ;-)
--
Sent from: http://free-pascal-general.1045716.n5.nabble.com/
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


[fpc-pascal] Range check error warning.

2020-03-23 Thread fredvs via fpc-pascal
Hello.

With fpc 3.3.1 there is this warning:

"Warning: (4110) Range check error while evaluating constants (-193 must be
between 0 and 255)"

Here the code pointed by the warning:

const
 foldhiddenbit = 7;
 foldhiddenmask = 1 shl foldhiddenbit;
 currentfoldhiddenbit = 6;
 currentfoldhiddenmask = 1 shl currentfoldhiddenbit;
 foldlevelmask = byte(not (foldhiddenmask or currentfoldhiddenmask));
>Here the warning

I dont understand how the compiler can find -193 as value for
foldlevelmask...

Fre;D







-
Many thanks ;-)
--
Sent from: http://free-pascal-general.1045716.n5.nabble.com/
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


[fpc-pascal] Disable Warning: (6060) Case statement does not handle all possible cases

2020-03-23 Thread fredvs via fpc-pascal
Hello.

How to disable the Warning: (6060) Case statement does not handle all
possible cases ?

I did try with this without luck, the warning is still there:

interface

  {$warn 6060 off}

Fre;D



-
Many thanks ;-)
--
Sent from: http://free-pascal-general.1045716.n5.nabble.com/
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] Size of pdynarraytypeinfo

2020-03-23 Thread fredvs via fpc-pascal
Super.

And I am so happy that the best representative of what fpc can do is still
in the game.

Thanks Sven.

Fre;D



-
Many thanks ;-)
--
Sent from: http://free-pascal-general.1045716.n5.nabble.com/
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] Size of pdynarraytypeinfo

2020-03-23 Thread fredvs via fpc-pascal
> Time to commit it (but I wait for your green light Sven). 

I did commit the change because after many tests, I cannot find problems
(but if you see a warning or a tip, it is welcome).

Many thanks Sven.

Fre;D 



-
Many thanks ;-)
--
Sent from: http://free-pascal-general.1045716.n5.nabble.com/
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] Size of pdynarraytypeinfo

2020-03-23 Thread fredvs via fpc-pascal
> By the way, may I use this tip for fpc < 3.3.1 or is it ok only with fpc
trunk? 

Ok, I did compile it with FPC 3.0.4, FPC 3.2.0 and FPC 3.3.1.

And...

...

Yes, all 3 works as expected.

;-) x 1000.

Time to commit it (but I wait for your green light Sven).

Fre;D 



-
Many thanks ;-)
--
Sent from: http://free-pascal-general.1045716.n5.nabble.com/
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] Size of pdynarraytypeinfo

2020-03-23 Thread fredvs via fpc-pascal
Hello Sven.

Always good news with you!

OK, I did replace all call to pdynarraytypeinfo with PTypeInfo and adapt all
code for this.

And you know what: IT WORKS!

I am totally surprised but now msestat files are ok with fpc 3.3.1.

Well, well, well done Sven (you could not imagine how happy I am).

Now I will do extended test to check is all is really ok.

By the way, may I use this tip for fpc < 3.3.1 or is it ok only with fpc
trunk?

Many thanks Sven.

Fre;D












-
Many thanks ;-)
--
Sent from: http://free-pascal-general.1045716.n5.nabble.com/
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] Size of pdynarraytypeinfo

2020-03-23 Thread fredvs via fpc-pascal
Some more infos:

This gives the correct size with fpc <= 3.2.0:

function dynarrayelesize(const typinfo: pdynarraytypeinfo): sizeint; 
var
 ti: pdynarraytypeinfo;
begin
 ti:= typinfo;
 inc(pointer(ti),ord(pdynarraytypeinfo(ti)^.namelen)+2);
 result:= psizeint(ti)^;
end;

But with last trunk fpc 3.3.1 the result is always = 0.

Why?




-
Many thanks ;-)
--
Sent from: http://free-pascal-general.1045716.n5.nabble.com/
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


[fpc-pascal] Size of pdynarraytypeinfo

2020-03-23 Thread fredvs via fpc-pascal
Hello.

How to do to retrieve the size of the array of pdynarraytypeinfo?

Thanks

Fre;D



-
Many thanks ;-)
--
Sent from: http://free-pascal-general.1045716.n5.nabble.com/
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] Killing the mail list

2020-03-15 Thread fredvs via fpc-pascal
Hello.

You may use http://free-pascal-general.1045716.n5.nabble.com/

This forum is an archive for the mailing list
fpc-pascal@lists.freepascal.org 

Fre;D



-
Many thanks ;-)
--
Sent from: http://free-pascal-general.1045716.n5.nabble.com/
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] New Warnings with fpc >= 3.2.0 (fredvs)

2020-03-14 Thread fredvs via fpc-pascal
Hello Sven.

OK, perfectly explained.

Many thanks for all that infos.

(It was needed to become Doctor es Enum).

And a trick from a Doctor es Enum:

"Always initialize by your self your enum before to use it". 

Fre;D



-
Many thanks ;-)
--
Sent from: http://free-pascal-general.1045716.n5.nabble.com/
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] New Warnings with fpc >= 3.2.0

2020-03-14 Thread fredvs via fpc-pascal
> as there are a lot of messages in this thread 

Yes, it is an epidemic, and it has already muted there:

http://free-pascal-general.1045716.n5.nabble.com/Re-New-Warnings-with-fpc-gt-3-2-0-fredvs-td5735027.html

You will see with last message that all is not so simple:

Initialization of a enum-var is set it to 0.

Then with tabulatorkindty =
(tak_none=-1,tak_left,tak_right,tak_centered,tak_decimal);

kind will be initialized with 0 and not with -1;

Hum, the enum-saga is not yet closed.

Fre;D 



-
Many thanks ;-)
--
Sent from: http://free-pascal-general.1045716.n5.nabble.com/
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] New Warnings with fpc >= 3.2.0 (fredvs)

2020-03-14 Thread fredvs via fpc-pascal
Hi Sven, sorry to come back, (dont forget I am a enum-guru now).

But to be totally logic, in the previous code:

> if kind = tabulatorkindty(0) then 

Should it not be something illegal because of definition:

> tabulatorkindty = 
> (tak_none := 1,tak_left,tak_right,tak_centered,tak_decimal); 

the values assigned are tak_none = 1, tak_left = 2, tak_right = 3,
tak_centered = 4, tak_decimal = 5
and 0 is never assigned.

Then (re-imho) there is something strange with initialization with 0 because
0 should be out of range.

Fre;D









-
Many thanks ;-)
--
Sent from: http://free-pascal-general.1045716.n5.nabble.com/
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] New Warnings with fpc >= 3.2.0 (fredvs)

2020-03-14 Thread fredvs via fpc-pascal
> much better to put it first in the list for numerous reasons... 

Not sure it is much better but, yes, I will do it with the "better boy" way.

Thanks.

Fre;D





-
Many thanks ;-)
--
Sent from: http://free-pascal-general.1045716.n5.nabble.com/
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] New Warnings with fpc >= 3.2.0 (fredvs)

2020-03-14 Thread fredvs via fpc-pascal
> And it's not initialized with the first item, but with 0.

Well said, indeed, that example (see tak_none := 1):

PROGRAM enumtest;

type
tabulatorkindty =
(tak_none := 1,tak_left,tak_right,tak_centered,tak_decimal);
 
var
  kind: tabulatorkindty;
   
begin
if kind = tak_none then
WriteLn('OK it is tak_none')
  else WriteLn('No is is not tak_none') ;

   if kind = tabulatorkindty(0) then
WriteLn('OK it is 0')
  else WriteLn('No is is not 0') ;
end. 

___

Gives as result:

$ /home/fred/enumtest
> No it is not tak_none
> OK it is 0

And, cherry on the cake, now at compilation, there is that warning:

> Compiling /home/fred/weird/enumtest.pas
> enumtest.pas(10,8) Warning: Variable "kind" does not seem to be
> initialized

Hum, I feel to become a enum-guru.

Thanks Sven!

Fre;D



-
Many thanks ;-)
--
Sent from: http://free-pascal-general.1045716.n5.nabble.com/
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] New Warnings with fpc >= 3.2.0 (fredvs)

2020-03-14 Thread fredvs via fpc-pascal
>Note that if you depend on this technique you should add a comment where the
type is defined that the order of the items is
> significant so that someone in the future does not change the order out of
> ignorance!

Yes, that is the main problem.
If you do it the "logical" way, placing at first without initialization,
when ord(kind) is used in code, because the order has changed, lot of code
must be re-written.

But if you place it at last you only have to initialize at creation with
nk_none and replace all use of "high(enumty)" by the last - 1 item of the
enum.

Fre;D 




-
Many thanks ;-)
--
Sent from: http://free-pascal-general.1045716.n5.nabble.com/
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] New Warnings with fpc >= 3.2.0 (fredvs)

2020-03-14 Thread fredvs via fpc-pascal
Hello BrunoK

>so a field in an object is by default initialized to tak_none during the
> object's creation. 

Hum, doing this:
_

PROGRAM enumtest;

type
tabulatorkindty =
(tak_none,tak_left,tak_right,tak_centered,tak_decimal); 
 
var
  kind: tabulatorkindty;
   
begin
if kind = tak_none then
WriteLn('OK it is tak_none')
  else WriteLn('No is is not tak_none') ;
end.
__

Gives as result:

$ enumtest

OK it is tak_none

_

So, thanks for the tip, "kind" seems indeed initialized with first item.

And with your tip, one more candidate for code to choose/use to fix the bug.

Many thanks BrunoK.

Fre;D






-
Many thanks ;-)
--
Sent from: http://free-pascal-general.1045716.n5.nabble.com/
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] New Warnings with fpc >= 3.2.0

2020-03-13 Thread fredvs via fpc-pascal
> type Set_Of_tabulatorkindty= set of  tabulatorkindty; 

Yes, it was proposed too.
It has the advantage to fix the tabulatorkindty(-1) bug without adding a new
item-enum.

But the disadvantage is: lot of change in code, maybe more than simply
adding "tak_nil" at end of the enum-array.
And initialize it with "kind := tak_nil".

It is not yet decided in mse-org forum what we will use (+- 50 similar
cases).
I vote for keeping type enum + adding at end "tak_nil" in array + 
initialize "kind := tak_nil".

Gracias Santiago.

Fre;D






-
Many thanks ;-)
--
Sent from: http://free-pascal-general.1045716.n5.nabble.com/
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] New Warnings with fpc >= 3.2.0

2020-03-13 Thread fredvs via fpc-pascal
> ---> kind := tabulatorkindty(-1);
> makes no sense.

Yes of course, it is the reason of that topic.
fpc 3.0.4 does not give any warning for this (strange...).

And it is fpc 3.2.0 that reveals that bug, giving a warning for that.

Note that fpc 3.2.0 is still tolerant, with a strict compiler, the
application should raise a exception when calling this:

kind := tabulatorkindty(-1);

But that is a other story. (For me, I am happy with a tolerant fpc that
gives warnings for "bad boy" code).

> kind := tak_none
> Yeah. That is the way. 

Yes, thanks to this topic, imho, all is clear and fixed now.

Thanks to all of you.

Fre;D 






-
Many thanks ;-)
--
Sent from: http://free-pascal-general.1045716.n5.nabble.com/
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] New Warnings with fpc >= 3.2.0

2020-03-13 Thread fredvs via fpc-pascal
Hello Santiago.

> I supposse you are reading from a format that stores
> tabulatorkindty value as an integer

No, imho it was a bug, tabulatorkindty is a enumeration array and using
integer instead of a enum is not ok.

>  if (intValue>=ord(Low(tabulatorkindty))) and
> (intValue<=ord(high(tabulatorkindty)))
>   then Result:=tabulatorkindty(intValue)
>   else Result:=tak_none; 

Yes, this is the good solution for integer value in enum or if
tabulatorkindty was not initialized.

But in mse code, originally tabulatorkindty was initialized with:

---> kind := tabulatorkindty(-1); // not good coding

And now, with the last enum item added, the initialization is done with:

---> kind := tak_none;

So, imho, this can be used :

  if (kind <>  tak_none) then dosomething;

What do you think?

Fre;D










-
Many thanks ;-)
--
Sent from: http://free-pascal-general.1045716.n5.nabble.com/
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] New Warnings with fpc >= 3.2.0

2020-03-12 Thread fredvs via fpc-pascal
> ( and that can be considered, imho, as a bug).

I was talking about mse code, not new behavior of warning of fpc 3.2.0.

Fre;D




-
Many thanks ;-)
--
Sent from: http://free-pascal-general.1045716.n5.nabble.com/
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] New Warnings with fpc >= 3.2.0

2020-03-12 Thread fredvs via fpc-pascal
> which will make it always true. I see no reason for that "if" to exists
> at least not with out the code. 

Yes I know, it is strange.

But, like explained Roland Chastain in a other topic:

> With FPC 3.0.4, the following code compiles without warning and works:

>type
>  tabulatorkindty = (ak_left, tak_right, tak_centered, tak_decimal);
 
> var
>  kind: tabulatorkindty;
   
> begin
>  kind := tabulatorkindty(-1);
>  if kind = tabulatorkindty(-1) then
>WriteLn('hello');
> end. 

fpc <= 3.0.4 accept it, without any warnings.

It is fpc 3.2.0 that reveals it and gives warnings ( and that can be
considered, imho, as a bug).

Fre;D






-
Many thanks ;-)
--
Sent from: http://free-pascal-general.1045716.n5.nabble.com/
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] New Warnings with fpc >= 3.2.0

2020-03-11 Thread fredvs via fpc-pascal
> f (kind in tabulatorkindty) then 

Yes, I like it!

But, sadly, the compiler no.

"Error: Operator is not overloaded"...

Fre;D




-
Many thanks ;-)
--
Sent from: http://free-pascal-general.1045716.n5.nabble.com/
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] New Warnings with fpc >= 3.2.0

2020-03-11 Thread fredvs via fpc-pascal
> You are abusing enums. Either use them correctly or not at all

Hum, it is not my code but, yes I understood, I will fix it with the "good
boy" way.

Thanks for all that clear, fast and with solutions answers.

Fre;D



-
Many thanks ;-)
--
Sent from: http://free-pascal-general.1045716.n5.nabble.com/
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] New Warnings with fpc >= 3.2.0

2020-03-11 Thread fredvs via fpc-pascal
Thanks Michael.

> You'll need to disable that particular warning if you want to use such
> tricks. 

For the "-1" trick, it can be easy fixed with 

if (kind = tabulatorkindty(tak_lef)) or (kind = tabulatorkindty(tak_right))
or (kind = tabulatorkindty(tak_centered)) or (kind =
tabulatorkindty(tak_decimal)) then

But for the other example:

--> tdataevent(de_afterapplyupdate)

Do you think it would be better to add the "extended" elements of the array
like
de_afterapplyupdate:

--> de_afterapplyupdate = ord(high(tdataevent))+6; 

Directly in the original tdataevent array?

By the way, huh, yes, if I am totally sure that the code is safe, I would be
happy to know the code-number of those Warning and disable it.

Of course in last resort (no time to be lazy).

Fre;D



-
Many thanks ;-)
--
Sent from: http://free-pascal-general.1045716.n5.nabble.com/
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] New Warnings with fpc >= 3.2.0

2020-03-11 Thread fredvs via fpc-pascal
> Do it properly, and add a tab_None or somesuch

If I may, I would prefer "somesuch" vs adding a new constant.

But, really, would it not possible to write the equivalent of 

if (kind <> tabulatorkindty(-1)) then

Maybe using in this case:

if (kind = tabulatorkindty(tak_lef)) or (kind = tabulatorkindty(tak_right))
or (kind = tabulatorkindty(tak_centered)) or (kind =
tabulatorkindty(tak_decimal)) then

But I would prefer a shorter way, mainly if the array is big.

--

Other question relative to Warnings:

How to do this:

tdataevent(de_afterapplyupdate)

where TDataEvent is defined as 

 TDataEvent = (deFieldChange, deRecordChange, deDataSetChange,
deDataSetScroll, deLayoutChange, deUpdateRecord, deUpdateState,
deCheckBrowseMode, dePropertyChange, deFieldListChange, deFocusControl,
deParentScroll,deConnectChange,deReconcileError,deDisabledStateChange);

and de_afterapplyupdate was defined with:

const
...
 de_afterapplyupdate = ord(high(tdataevent))+6;



Now:

--->  tdataevent(de_afterapplyupdate)

Gives as Warning:

"msebufdataset.pas(4070,16) Warning: range check error while evaluating
constants (20 must be between 0 and 14)"

?

> It is a warning not an error. 

Yes, but it shows that something is wrong and it is time now to fix this
before problems

Fre;D






-
Many thanks ;-)
--
Sent from: http://free-pascal-general.1045716.n5.nabble.com/
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] New Warnings with fpc >= 3.2.0

2020-03-11 Thread fredvs via fpc-pascal
Re-hello.

> What must be changed, a new constant should be added at end of the array, 

Lot of work because with this the array must be initialized with tak_none.

But maybe there is now a new fpc trick to write:

--> if (kind <> tabulatorkindty(-1))

That will say "if kind is different of something that is not in the array
tabulatorkindty"

?

PS: Imho, using "-1" was a nice trick and it is sad that it cannot more be
used.

Fre;D




-
Many thanks ;-)
--
Sent from: http://free-pascal-general.1045716.n5.nabble.com/
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


[fpc-pascal] New Warnings with fpc >= 3.2.0

2020-03-11 Thread fredvs via fpc-pascal
Hello.

Compiling that code with fpc 3.2.0 gives the warning that follows:

--->  if (kind <> tabulatorkindty(-1)) --> gives now the warning:

"msedrawtext.pas(1115,48) Warning: range check error while evaluating
constants (-1 must be between 0 and 3)"

tabulatorkindty is declared as:

---> tabulatorkindty = (tak_left,tak_right,tak_centered,tak_decimal);

So, if I understand ok, with new feature of fpc, "-1" is no more permitted.

What must be changed, a new constant should be added at end of the array,
something like:

---> tabulatorkindty = (tak_left,tak_right,tak_centered,tak_decimal,
tak_none);

?

And then use:

--->  if (kind <> tabulatorkindty(tak_none) ?

Or do you have a other idea?

Thanks.

Fre;D



-
Many thanks ;-)
--
Sent from: http://free-pascal-general.1045716.n5.nabble.com/
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] fpc trunk = Operator is not overloaded: "Class Of TBlobField" and "Boolean"

2020-03-08 Thread fredvs via fpc-pascal
@Bart.

I just did try what you proposed (I promise without to read you before) and
come here to announce that if solves the thing.

--> if (fld1 is tblobfield) and (self.fblobintf <> nil) then begin

makes fpc trunk happy!

Well seen Florian, Bart and Micha.

;-)

Now, only msestat-files remain the problem with fpc rev 42375, but sure, the
solution is near.

Happy sunday.

Fre;D





-
Many thanks ;-)
--
Sent from: http://free-pascal-general.1045716.n5.nabble.com/
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] fpc trunk = Operator is not overloaded: "Class Of TBlobField" and "Boolean"

2020-03-08 Thread fredvs via fpc-pascal
> You wrote before the code is:
> if fld1 is tblobfield then
> ? 

Yes, it was to isolate the problem.

The original line that generates error is:

---> if fld1 is tblobfield and (self.fblobintf <> nil) then begin 

As work-around, removing "fld1 is tblobfield" makes trunk happy:

---> if self.fblobintf <> nil then begin 

To resume, the problem comes from "if fld1 is tblobfield".








-
Many thanks ;-)
--
Sent from: http://free-pascal-general.1045716.n5.nabble.com/
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] fpc trunk = Operator is not overloaded: "Class Of TBlobField" and "Boolean"

2020-03-08 Thread fredvs via fpc-pascal
> Can point out a link to the whole source code containing this line? 

More than welcome!

https://github.com/mse-org/mseide-msegui/blob/master/lib/common/db/msesqlquery.pas

At line 1719:

 if fld1 is tblobfield and (self.fblobintf <> nil) then begin

Fre;D





-
Many thanks ;-)
--
Sent from: http://free-pascal-general.1045716.n5.nabble.com/
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] fpc trunk = Operator is not overloaded: "Class Of TBlobField" and "Boolean"

2020-03-08 Thread fredvs via fpc-pascal
Hello Michael.

The error comes after commit 4266 of 06-03-2020:

git-svn-id: https://svn.freepascal.org/svn/fpc/trunk@44266

Fre;D



-
Many thanks ;-)
--
Sent from: http://free-pascal-general.1045716.n5.nabble.com/
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] fpc trunk = Operator is not overloaded: "Class Of TBlobField" and "Boolean"

2020-03-08 Thread fredvs via fpc-pascal
> This is a bug, it should be permitted. 

Huh, from msegui or from fpc?

Fre;D



-
Many thanks ;-)
--
Sent from: http://free-pascal-general.1045716.n5.nabble.com/
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


[fpc-pascal] fpc trunk = Operator is not overloaded: "Class Of TBlobField" and "Boolean"

2020-03-08 Thread fredvs via fpc-pascal
Hello.

I did try last fpc trunk and get that error message when compiling a program
(mseide):

---> Error: Operator is not overloaded: "Class Of TBlobField" and "Boolean"

This comes from that line:

---> if fld1 is tblobfield then // here error.

Do you know what is the new equivalent for:
  "if aclass is tblobfield" // boolean no more permitted

?

Thanks.

Fre;D

PS: I have a big stock of Aspirina.









-
Many thanks ;-)
--
Sent from: http://free-pascal-general.1045716.n5.nabble.com/
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] ptop and comma.

2020-02-24 Thread fredvs via fpc-pascal
Hello Bart.

OK, I did try your idea, changing the original code with this (see 2 last
lines):

procedure TPToP.Usage(ECode: word);
begin
  writeLn('ptop : Usage : ');
  writeLn('ptop [-v] [-i indent] [-b bufsize ][-c optsfile][-l linesize]
infile outfile');
  writeLn(' converts infile to outfile.');
  writeLn(' -c : read options from optsfile');
  writeLn(' -i : Set number of indent spaces.');
  writeLn(' -l : Set maximum output linesize.');
  writeLn(' -b : Use buffers of size bufsize');
  writeLn(' -v : be verbose');
  writeLn('ptop -g ofile');
  writeLn(' generate default options file');
  writeLn('ptop -h : This help');
  ExitCode := ECode; // this change instead of halt(ECode);
  Terminate;   // this change instead of halt(ECode);
end;

Is it what you are thinking?
Indeed, no more memory leak and error preserved with this.

Heap dump by heaptrc unit of ptop
29 memory blocks allocated : 2242/2280
29 memory blocks freed : 2242/2280
0 unfreed memory blocks : 0
True heap size : 131072
True free heap : 131072

Fre;D




-
Many thanks ;-)
--
Sent from: http://free-pascal-general.1045716.n5.nabble.com/
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] ptop and comma.

2020-02-24 Thread fredvs via fpc-pascal
>If you really dislike the memory leak (since it's not "nice
>programming"), maybe you can set ExitCode before calling terminate?
>(Untested idea (TM))

Hello Bart.

Thanks for that constructive and respectful answer that gives solution.

Indeed, I **really** dont like programs that generate memory leak and all
the bla-bla that try to to convince me that it is not important, that the OS
will remove it, ... etc dont work on me.

I will test your idea.

Thanks.

Fre;D






-
Many thanks ;-)
--
Sent from: http://free-pascal-general.1045716.n5.nabble.com/
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] ptop and comma.

2020-02-23 Thread fredvs via fpc-pascal
Tomas Hajny-2 wrote
> The difference between your version and the original one is that the 
> original finishes the program with some error code thus allowing some 
> error checking in case the program was called from some script, etc., 
> whereas your version finishes with a result of 0 even if the processing 
> encountered some errors.

No, I dont think so, all error code are still there.
Even more, if the user dont use a filename as parameter, help-messages are
displayed.

And also I dont see what it could have to do with the memory leak.

Anyway, ptop is a great program.

Sorry for the noise.

Fre;D



-
Many thanks ;-)
--
Sent from: http://free-pascal-general.1045716.n5.nabble.com/
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] ptop and comma.

2020-02-23 Thread fredvs via fpc-pascal
Hello Tomas and thanks for the infos.

Hum, ok, so I give you the hand to find  why the original code finishes the
program with some memory leak.

Fre;D




-
Many thanks ;-)
--
Sent from: http://free-pascal-general.1045716.n5.nabble.com/
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] ptop and comma.

2020-02-23 Thread fredvs via fpc-pascal
Hello.

OK, I opted for changing in procedure Tjtop.Usage(ECode: word);

  halt(Ecode); //--> This produces a memory leak 

with 

 terminate; // --> No nore memory leak.

There is a Github site forked from original ptop.
It include ptop with extended comma feature.

Also was added jtop, a beautifier for Java based on ptop.

https://github.com/fredvs/xtop

Fre;D



-
Many thanks ;-)
--
Sent from: http://free-pascal-general.1045716.n5.nabble.com/
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] ptop and comma.

2020-02-23 Thread fredvs via fpc-pascal
Hello everybody and especially Michael.

OK, I did find the very well hidden memory leak.

In ptop.pp it comes from Procedure TPToP.DoRun, line 140 --->  Usage(1);

And in the procedure Usage(), the last line produces the memory leak.

Procedure TPToP.Usage(ECode : Word);
begin
  Writeln ('ptop : Usage : ');
  Writeln ('ptop [-v] [-i indent] [-b bufsize ][-c optsfile][-l linesize]
infile outfile');
  Writeln (' converts infile to outfile.');
  Writeln (' -c : read options from optsfile');
  Writeln (' -i : Set number of indent spaces.');
  Writeln (' -l : Set maximum output linesize.');
  Writeln (' -b : Use buffers of size bufsize');
  Writeln (' -v : be verbose');
  writeln ('ptop -g ofile');
  writeln (' generate default options file');
  Writeln ('ptop -h : This help');
  halt(Ecode);  --> This produces a memory leak 
end;
  
So the big question is: What is the purpose of "halt(Ecode)" and would it be
a crime to remove it?

Thanks.

Fre;D




-
Many thanks ;-)
--
Sent from: http://free-pascal-general.1045716.n5.nabble.com/
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] ptop and comma.

2020-02-12 Thread fredvs via fpc-pascal
> Well, there have been changes in trunk. I obviously did a diff with the
> trunk version, so probably that is the cause. 

Ha, nice, I will study this asap.

Other thing, I did many search on internet to have the same as ptop: simple
command line program-executable but for Java.
Sadly this does not exist, only plugin for tenors like Eclipse, etc all Java
applets of course.

So why not a Jtop pure fpc, without any dependencies?

;)

Good night Michael.

Fre;D




-
Many thanks ;-)
--
Sent from: http://free-pascal-general.1045716.n5.nabble.com/
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] ptop and comma.

2020-02-12 Thread fredvs via fpc-pascal
Re-hello.

In the previous zip file there is the ptopu.pp file (not ptop.pp that I did
not touch).

Fre;D



-
Many thanks ;-)
--
Sent from: http://free-pascal-general.1045716.n5.nabble.com/
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] ptop and comma.

2020-02-12 Thread fredvs via fpc-pascal
> The diff is quite big, and it's not whitespace changes... 
> is that intentional, or if not, where did you get the original ptopu.pp

It comes from source of fpc 3.0.4.

Hum, so big?

To add a "comma" keyword,

1) Insert comma in keysymbol array.
2) Add "comma" in EntryNames.
3) Add option[t,comma]^.dindsym := ...] in procedure SetDefaultIndents.
4) Add option[t,comma]^.selected := [spaft] in Procedure SetDefaults.

So, not so much.

By the way, there is a little memory leak in original fpc 3.0.4 ptop:

Heap dump by heaptrc unit of /home/fred/ptop/ptop
31 memory blocks allocated : 2383/2424
30 memory blocks freed : 2175/2216
1 unfreed memory blocks : 208
True heap size : 393216
True free heap : 392800
Should be : 392816
Call trace for block $77F8A100 size 208

And this one is very well hidden, I dont see anything in ptop.pp and
ptopu.pp that could do it.
Maybe from a used units?

Fre;D


   
 



-
Many thanks ;-)
--
Sent from: http://free-pascal-general.1045716.n5.nabble.com/
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] ptop and comma.

2020-02-12 Thread fredvs via fpc-pascal
Hello Michael.

I have added in ptopu.pp "comma" keyword and option[t,comma]^.selected :=
[spaft];

Works like charm.

Included patched ptopu.pp
ptopu.zip
  

Fre;D



-
Many thanks ;-)
--
Sent from: http://free-pascal-general.1045716.n5.nabble.com/
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] ptop and comma.

2020-02-11 Thread fredvs via fpc-pascal
> It should be relatively easily possible, because colon, period and so on
are also treated specially.
> if "," is recognized, a 'spaft' option will do what you want. 

Ha, ok, I will explore this.

Thanks.

Fre;D



-
Many thanks ;-)
--
Sent from: http://free-pascal-general.1045716.n5.nabble.com/
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


[fpc-pascal] ptop and comma.

2020-02-11 Thread fredvs via fpc-pascal
Hello everybody.

I just discovered ptop.
Well done Michael!

Thanks to ptop, I was able to make the code of uos.pas (+- 10.000 lines)
more beautiful.
Congratulation Michael, ptop can deal with the lot of  {$IF
DEFINED(something)} of my code.

I was not able to do it with Jedi, who refused my code.

So, once again, wow.

Now about configuration of ptop;

Is it possible to format code with comma?

For example, format this:

Uses
unit1,unit2,unit3

to get that (a space added after comma)

Uses
unit1, unit2, unit3

Jedi does it, maybe ptop does it too?

Thanks.

Fre;D




-
Many thanks ;-)
--
Sent from: http://free-pascal-general.1045716.n5.nabble.com/
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] Compatibility problems with fpc > 3.3.1 rev 42375

2020-02-03 Thread fredvs via fpc-pascal
Hello.

I did try using aligntoqword() but without luck, I only get crash at
loading.

It is very sad but I dont have the skill to fix this and mse depends of a
guru with brave heart to make it compatible with fpc 3.3.1.

Anyway, many thanks Martin for your light.

Fre;D



-
Many thanks ;-)
--
Sent from: http://free-pascal-general.1045716.n5.nabble.com/
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] Compatibility problems with fpc > 3.3.1 rev 42375

2020-02-02 Thread fredvs via fpc-pascal
Hello Martin.

Wow.

Indeed, I did a check in mse code and only exists, in msearrayutils.pas:

function aligntoptr(p: pointer): pointer; inline;
begin
{$ifdef FPC_REQUIRES_PROPER_ALIGNMENT}
 result:= align(p,sizeof(p));
{$else FPC_REQUIRES_PROPER_ALIGNMENT}
 result:=p;
{$endif FPC_REQUIRES_PROPER_ALIGNMENT}
end;

And nothing about aligntoqword()

I dont know if a function aligntoqword(p: pointer): pointer; inline;
must be added in msearrayutils.pas.

I will try using aligntoqword() of fpc and adapting mse code for it (ti:=
aligntoqword(ti); 

If you see a other way, please advice.

Many, many, many thanks.

Fre;D

 



-
Many thanks ;-)
--
Sent from: http://free-pascal-general.1045716.n5.nabble.com/
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] Compatibility problems with fpc > 3.3.1 rev 42375

2020-02-01 Thread fredvs via fpc-pascal
Hello everybody.

Good time to go back with that problem and fix it forever the right way!
The problem is isolated and is fixed "hardcoded".

From rev 42375, in msegui function dynarrayelesize(const typinfo:
pdynarraytypeinfo): sizeint; inline;
the result is always = 0.

This function is used in additempo() function, used mainly in the
msestat.pas file.
This is used to restore, for example, the position and size of windows.

To fix with a turn-around, I did first compile mseide with fpc 3.2.0 to know
what is the value of dynarrayelesize(typeinfo).
It is always 16 and then I use that constant instead of
dynarrayelesize(typeinfo).

It works like charm and can use now fpc 3.3.1 without problems.

Great but, for the Champions, would it be somebody that can explain why the
result is always = 0 from rev 42375 ?

Here the problematic function:

function dynarrayelesize(const typinfo: pdynarraytypeinfo): sizeint; inline;
var
 ti: pdynarraytypeinfo;
begin
 ti:= typinfo;
{$ifdef FPC}
 inc(pointer(ti),ord(pdynarraytypeinfo(ti)^.namelen)+2);
 ti:= aligntoptr(ti);
 result:= psizeint(ti)^;
{$else}
 inc(pchar(ti),length(ti^.name));
 result:= ti^.elsize;
{$endif}
end;




-
Many thanks ;-)
--
Sent from: http://free-pascal-general.1045716.n5.nabble.com/
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


  1   2   3   4   5   6   >