Re: [fpc-pascal] Function to create a record ?

2023-06-02 Thread Henry Vermaak via fpc-pascal
On Fri, 2 Jun 2023 at 01:36, Steve Litt via fpc-pascal wrote: > fillchar(junkvar, junkvar_size, 'b'); > person := modperson(person, 'Martin'); > person := modperson(person2, 'Maria'); Maybe a typo? (E.g. person2 := modperson(person2, 'Maria')) Henry

Re: [fpc-pascal] I am offering a $100 reward for linking static libraries

2022-08-25 Thread Henry Vermaak via fpc-pascal
On Thu, 25 Aug 2022 at 04:08, Anthony Walter via fpc-pascal wrote: > I've written a utility to extract mingw64 static library exports into a > searchable database. This allows me to search for possible missing functions > (see the screenshot below) > >

Re: [fpc-pascal] I am offering a $100 reward for linking static libraries

2022-08-23 Thread Henry Vermaak via fpc-pascal
On Mon, 22 Aug 2022 at 22:42, Pierre Muller via fpc-pascal wrote: > Le 22/08/2022 à 18:18, Henry Vermaak via fpc-pascal a écrit : > > On Sun, 21 Aug 2022 at 18:34, Anthony Walter via fpc-pascal > > wrote: > >> I am also able to use mingw32 gcc to compile this same C so

Re: [fpc-pascal] I am offering a $100 reward for linking static libraries

2022-08-22 Thread Henry Vermaak via fpc-pascal
On Sun, 21 Aug 2022 at 18:34, Anthony Walter via fpc-pascal wrote: > I am also able to use mingw32 gcc to compile this same C source into a static > library for Windows using these two commands while inside the folder > containing the Chipmunk2D sources: > > x86_64-w64-mingw32-gcc-win32 -static

Re: [fpc-pascal] Option type

2021-06-01 Thread Henry Vermaak via fpc-pascal
On Tue, 1 Jun 2021, 23:39 Ryan Joseph via fpc-pascal, < fpc-pascal@lists.freepascal.org> wrote: > > > > On Jun 1, 2021, at 12:56 PM, denisgolovan > wrote: > > > > That would limit supported types to class instances. > > I'll like to avoid that. > > Ideally TOption type should allow any type

Re: [fpc-pascal] How to find where my app consumes CPU?

2021-05-19 Thread Henry Vermaak via fpc-pascal
On Wed, 19 May 2021 at 14:36, Travis Siegel via fpc-pascal wrote: > > No doubt your sleep code works just fine. > > I'm not saying the sleep command doesn't work. > > I'm saying the sleep command doesn't release unused cpu cycles for other > threads/programs to use. No, fpc uses nanosleep()

Re: [fpc-pascal] FTP support gone - switch to HTTP ?

2021-05-18 Thread Henry Vermaak via fpc-pascal
On Tue, 18 May 2021 at 11:50, Sven Barth via fpc-pascal wrote: > I don't think we need to mention any specific clients (and why did your list > not include Filezilla? :P ) Because FileZilla bundles adware when you download from the homepage? Would actually be good to warn _against_ using it.

Re: [fpc-pascal] OpenCV

2020-02-14 Thread Henry Vermaak via fpc-pascal
On Thu, 13 Feb 2020 at 13:26, Adriaan van Os wrote: > > > I looked around on the web for OpenCV Pascal bindings. What I found, seems to > be based (mostly) on > the OpenCV C interfaces, which covers only part of OpenCV. > > Alternatives are: >8--- > 2. Hook into the Python wrapper/bindings

Re: [fpc-pascal] Detecting console close with red X on windows

2019-05-19 Thread Henry Vermaak
On Sun, 19 May 2019 at 14:33, James Richters wrote: > > Could I please get an example of this? I see lots of examples of how to do > it in C but when I try to translate to pascal I always struggle a quite a bit. Have a look at the fpc source in packages/fv/src/w32msg.inc and search for

Re: [fpc-pascal] Detecting console close with red X on windows

2019-05-19 Thread Henry Vermaak
On Sun, 19 May 2019, 13:23 James Richters, wrote: > Is there a way I can detect that a user has pushed the red X in the upper > right corner to close the console window in a free pascal console > application so I can save some files before the program terminates? > You can do that with

Re: [fpc-pascal] Unbuffering I/O

2018-08-30 Thread Henry Vermaak
On Thu, Aug 30, 2018 at 10:57:21AM +, Mark Morgan Lloyd wrote: > Ah yes, that's it, thanks very much. > > WriteLn(StdErr, Format('# Socket %s, clock resolution %8.6f uSec', > [socketName, ts.tv_nsec / 1000])); > ttextrec(StdErr).flushfunc:= ttextrec(StdErr).inoutfunc; > while

Re: [fpc-pascal] Unbuffering I/O

2018-08-30 Thread Henry Vermaak
On Thu, Aug 30, 2018 at 09:45:00AM +, Mark Morgan Lloyd wrote: > On 30/08/18 09:00, Henry Vermaak wrote: > >On Thu, Aug 30, 2018 at 07:52:54AM +0200, Martin Schreiber wrote: > > >In order to flush textfiles automatically I use> "> > >ttextrec().flushfun

Re: [fpc-pascal] Unbuffering I/O

2018-08-30 Thread Henry Vermaak
On Thu, Aug 30, 2018 at 07:52:54AM +0200, Martin Schreiber wrote: > On Wednesday 29 August 2018 17:01:54 Mark Morgan Lloyd wrote: > > I think I've seen this question asked before, my apologies if this was > > recently. > > > > I've got two programs intended to be functionally identical, one in

Re: [fpc-pascal] Unbuffering I/O

2018-08-29 Thread Henry Vermaak
On Wed, Aug 29, 2018 at 03:01:54PM +, Mark Morgan Lloyd wrote: > I think I've seen this question asked before, my apologies if this was > recently. > > I've got two programs intended to be functionally identical, one in Perl and > the other in FPC. They read a unix-domain datagram, decode the

Re: [fpc-pascal] Syntax changes suggestions

2018-07-17 Thread Henry Vermaak
On Tue, Jul 17, 2018 at 12:07:10PM +0200, Michael Van Canneyt wrote: > >On Tue, Jul 17, 2018 at 11:14:31AM +0200, Michael Van Canneyt wrote: > If you need to "reduce the scope of variables", your routines are too long to > begin with. > > If of course you write routines of several hundreds of

Re: [fpc-pascal] Syntax changes suggestions

2018-07-17 Thread Henry Vermaak
On Tue, Jul 17, 2018 at 12:07:42PM +0200, Martin wrote: > On 17/07/2018 12:02, Henry Vermaak wrote: > >On Tue, Jul 17, 2018 at 11:45:26AM +0200, Sven Barth via fpc-pascal wrote: > >>*you* might do this, but there are enough developers that won't. I > >>already > >

Re: [fpc-pascal] Syntax changes suggestions

2018-07-17 Thread Henry Vermaak
On Tue, Jul 17, 2018 at 11:45:26AM +0200, Sven Barth via fpc-pascal wrote: > Henry Vermaak schrieb am Di., 17. Juli 2018, > 11:05: > > > On Mon, Jul 16, 2018 at 03:02:42PM +0200, Sven Barth via fpc-pascal wrote: > > > Santiago A. schrieb am Mo., 16. Juli 2018, 13:41: &

Re: [fpc-pascal] Syntax changes suggestions

2018-07-17 Thread Henry Vermaak
On Tue, Jul 17, 2018 at 11:14:31AM +0200, Michael Van Canneyt wrote: > On Tue, 17 Jul 2018, Henry Vermaak wrote: > >On Mon, Jul 16, 2018 at 03:02:42PM +0200, Sven Barth via fpc-pascal wrote: > >>Santiago A. schrieb am Mo., 16. Juli 2018, 13:41: > >> > >>

Re: [fpc-pascal] Syntax changes suggestions

2018-07-17 Thread Henry Vermaak
On Mon, Jul 16, 2018 at 03:02:42PM +0200, Sven Barth via fpc-pascal wrote: > Santiago A. schrieb am Mo., 16. Juli 2018, 13:41: > > > I have some suggestions of change to freepascal syntax, just to debate > > > > (All are backward compatible) > > > > - Declaring variables inside blocks, and loop

Re: [fpc-pascal] Libxml2 - How to get messages on Linux?

2018-05-25 Thread Henry Vermaak
On Fri, May 25, 2018 at 12:48:20PM +0200, Gabor Boros wrote: > 2018. 05. 24. 9:37 keltezéssel, Michael Van Canneyt írta: > >Are these functions callbacks ? If so, is the calling convention correct ? > > I used xmlSchemaSetValidErrors and the documentation say "Set the error and > warning callback

Re: [fpc-pascal] GetLocaleInfo returns ZZZ

2018-02-28 Thread Henry Vermaak
On Wed, Feb 28, 2018 at 01:36:31PM +0100, Bart wrote: > On Wed, Feb 28, 2018 at 10:58 AM, Henry Vermaak <henry.verm...@gmail.com> > wrote: > > The Windows implementation of GetLanguageIDs() in gettext.pp is not > > right. It uses GetLocaleInfo() wit

Re: [fpc-pascal] GetLocaleInfo returns ZZZ

2018-02-28 Thread Henry Vermaak
On Wed, Feb 21, 2018 at 12:11:10PM +0100, Darius Blaszyk wrote: > On my machine getlocaleinfo returns ZZZ when requesting the abbrev > langname. The country code is correctly set to NL. This makes > gettext.GetLanguageIDs return zz_NL. What could be causing this? > > Also the behavior of

Re: [fpc-pascal] Linux udev messages

2018-02-07 Thread Henry Vermaak
On 7 Feb 2018 09:54, "Mark Morgan Lloyd" wrote: Has anybody used NETLINK_KOBJECT_UEVENT on linux to get messages relating to device hotplugging and removal? It seems like the sort of thing that could be monitored by a TIdleTimer event handler for at least

Re: [fpc-pascal] Defining sonames?

2017-08-17 Thread Henry Vermaak
On 17 Aug 2017 21:21, "Graeme Geldenhuys" wrote: On 2017-08-17 16:52, Martin Schreiber wrote: > Exactly. So why not use the SONAME in the Pascal binding unit instead to > use > the base name as Free Pascal currently does in xlib.pp for example? > I forked the

Re: [fpc-pascal] Size of program vs library ?

2017-05-16 Thread Henry Vermaak
On Tue, May 16, 2017 at 01:15:34AM -0700, fredvs wrote: > It works for all situations, so I propose that fpc add --gc-sections > as parameter for the linker if the user has used -XX parameter to > compile a library. Does it work for all situations? I remember a bug for the rust compiler that

Re: [fpc-pascal] GUI multithreaded Win32 program sometimes freeze when quitting

2017-04-18 Thread Henry Vermaak
On Tue, Apr 18, 2017 at 07:32:21PM +0800, Dennis wrote: > Since this freezing behavour does not happen during debugging, I have spent > months trying to fix it but failed. > > Any suggestions are welcome. Try using a data race detector to see if it's a deadlock. I don't know about Windows, but

Re: [fpc-pascal] Call function in shared library from multiple threads

2017-03-31 Thread Henry Vermaak
On Fri, Mar 31, 2017 at 08:42:24AM -0700, fredvs wrote: > > Z:\home\fred\uos\examples\uos.pas(7438,29) Warning: (4046) Constructing a > > class "TThread" with abstract method "Execute" > > Huh, is it Is it serious doctor? I use this: function DummyThread(param: pointer): ptrint; begin Result

Re: [fpc-pascal] FreePascal Windows - Force files to write to disk

2017-03-22 Thread Henry Vermaak
On Wed, Mar 22, 2017 at 01:50:45PM +0100, Karoly Balogh (Charlie/SGR) wrote: > The usual way to work this problem around on Linux systems at least, is to > write a new file, then do an overwriting rename to the old file name. > There rename is an "atomic" operation, which will be either committed

Re: [fpc-pascal] FreePascal Windows - Force files to write to disk

2017-03-22 Thread Henry Vermaak
On Tue, Mar 21, 2017 at 06:01:17PM -0700, Ralf Quint wrote: > On 3/21/2017 11:58 AM, James Richters wrote: > >I have not tried FlushFileBuffers() yet, so I just tried it now, I am > >getting the same results. > Well, that is expected, as the issue has nothing to do with your program, > it's the

Re: [fpc-pascal] FreePascal Windows - Force files to write to disk

2017-03-21 Thread Henry Vermaak
On 21 Mar 2017 18:59, "James Richters" wrote: I have not tried FlushFileBuffers() yet, so I just tried it now, I am getting the same results. I have also tried disabling write caching in disk management and STILL have the same results. I am now thinking this

Re: [fpc-pascal] FreePascal Windows - Force files to write to disk

2017-03-21 Thread Henry Vermaak
On Tue, Mar 21, 2017 at 10:39:23AM -0400, James Richters wrote: > I am still having this issue. I've managed to narrow down what is happening > some. The problem is my data is not actually being written all the way to > disk. I now have a repeatable proven method to reproduce the issue. Here

Re: [fpc-pascal] Missing messages

2016-11-01 Thread Henry Vermaak
On Mon, Oct 31, 2016 at 09:12:12PM +0100, Florian Klämpfl wrote: > Am 30.10.2016 um 19:11 schrieb Graeme Geldenhuys: > > On 2016-10-30 17:24, Sven Barth wrote: > >> Same here... > > > > First Lazarus, now FPC. Can we not switch fpc-pascal to a NNTP newsgroup > > I used NNTP years ago the last

Re: [fpc-pascal] what is the correct way to write {$IFDEF FPC Version > 3.0}

2016-07-08 Thread Henry Vermaak
On Fri, Jul 08, 2016 at 06:47:19PM +0800, Dennis wrote: > what is the correct way to write {$IFDEF FPC Version > 3.0} {$if FPC_FULLVERSION > 3} See: http://www.freepascal.org/docs-html/current/prog/progap7.html Henry ___ fpc-pascal maillist -

Re: [fpc-pascal] What is the difference between TThread.Queue(aMethod: TThreadMethod) and Application.QueueAsyncCall(AMethod: TDataEvent; Data: PtrInt);

2016-07-01 Thread Henry Vermaak
On Fri, Jul 01, 2016 at 05:47:58PM +0200, Michael Van Canneyt wrote: > On Fri, 1 Jul 2016, Dennis wrote: > >Apart from the TThreadMethod and TDataEvent, what are the major > >differences? Are both of them thread safe to call from non-main > >thread? Will both of them overwrite some queue or

Re: [fpc-pascal] Bug in FPC 3.0.0 (was: Bug in FPC 3.0.0?)

2016-02-23 Thread Henry Vermaak
On Tue, Feb 23, 2016 at 02:13:52PM +0100, Jonas Maebe wrote: > It would probably be useful if we added support to the compiler to > generate a warning (or even error) in case a with statement hides an > existing symbol in scope though. Yes, please. Something like -Wshadow would be very useful.

Re: [fpc-pascal] New feature: IfThen() intrinsic

2016-02-02 Thread Henry Vermaak
On Tue, Feb 02, 2016 at 01:12:25PM +0100, Michael Van Canneyt wrote: > On Tue, 2 Feb 2016, Henry Vermaak wrote: > >So you are saying that relying on all function arguments being > >evaluated is bad? > > I am saying that the difference between this behaviour and the >

Re: [fpc-pascal] New feature: IfThen() intrinsic

2016-02-02 Thread Henry Vermaak
On Tue, Feb 02, 2016 at 10:49:03AM +0100, Michael Van Canneyt wrote: > So the iif in either functional or expression form has my vote. I'm surprised that you support iif in function call form. Making something that looks like a function call but may not behave as a function call (short cut eval)

Re: [fpc-pascal] New feature: IfThen() intrinsic

2016-02-02 Thread Henry Vermaak
On Tue, Feb 02, 2016 at 11:24:57AM +0100, Michael Van Canneyt wrote: > On Tue, 2 Feb 2016, Henry Vermaak wrote: > > >On Tue, Feb 02, 2016 at 10:49:03AM +0100, Michael Van Canneyt wrote: > >>So the iif in either functional or expression form has my vote. > > > >I

Re: [fpc-pascal] New feature: IfThen() intrinsic

2016-02-02 Thread Henry Vermaak
On Tue, Feb 02, 2016 at 12:03:14PM +0100, Michael Van Canneyt wrote: > On Tue, 2 Feb 2016, Henry Vermaak wrote: > >When you call a function all the arguments get evaluated before the > >function gets called. iif will look exactly like a function call, > >but all the arguments

Re: [fpc-pascal] New feature: IfThen() intrinsic

2016-02-02 Thread Henry Vermaak
On Tue, Feb 02, 2016 at 12:34:17PM +0100, Michael Van Canneyt wrote: > On Tue, 2 Feb 2016, Jonas Maebe wrote: > >Michael Van Canneyt wrote on Tue, 02 Feb 2016: > >>On Tue, 2 Feb 2016, Henry Vermaak wrote: > >>>On Tue, Feb 02, 2016 at 11:24:57AM +0100, Michael Van Ca

Re: [fpc-pascal] changes in TThread.OnTerminate in fcp-3.0?

2015-12-10 Thread Henry Vermaak
On Thu, Dec 10, 2015 at 10:26:29AM +0100, Luca Olivetti wrote: > Hello, > > in a couple of programs I'm using this idiom: > > > FMyThread:=TMyTread.Create; > FMyThread.FreeOnTerminate:=false; > FMyThread.OnTerminate:=@MyThreadTerminate > > procedure TMyForm.MyThreadTerminate(Sender:TObject); >

Re: [fpc-pascal] changes in TThread.OnTerminate in fcp-3.0?

2015-12-10 Thread Henry Vermaak
On Thu, Dec 10, 2015 at 05:23:41PM +0100, Sven Barth wrote: > Am 10.12.2015 15:06 schrieb "Henry Vermaak" <henry.verm...@gmail.com>: > > Is it worthwhile mentioning that OnTerminate gets called with > > Synchronize()? I had to dig into the source to verify this.

Re: [fpc-pascal] changes in TThread.OnTerminate in fcp-3.0?

2015-12-10 Thread Henry Vermaak
On Thu, Dec 10, 2015 at 02:49:50PM +0100, Sven Barth wrote: > Am 10.12.2015 12:15 schrieb "Luca Olivetti" : > > It's obvious that you cannot free the thread from inside a "normal" > Synchronize call, it's no so obvious you cannot do it in the > OnTerminate method, so maybe a note

Re: [fpc-pascal] using eventfd

2015-10-22 Thread Henry Vermaak
On Wed, Oct 21, 2015 at 06:43:41PM +0200, Andreas Klausmann wrote: > Hi, > > which unit(s) do I have to include to use eventfd() under Linux? I don't think anyone has added it to the linux unit, unfortunately. You'll have to call it directly with Do_SysCall() in unit syscall. > Is this function

Re: [fpc-pascal] Access GPIO pins on RPi2 without root?

2015-10-08 Thread Henry Vermaak
On Wed, Oct 07, 2015 at 01:09:58PM +0200, Bo Berglund wrote: > On Wed, 07 Oct 2015 10:05:03 +0200, Jonas Maebe > wrote: > >Bo Berglund wrote on Wed, 07 Oct 2015: > > > >> How can one control the GPIO outputs on a Raspberry Pi2 without > >> needing the program to run as

Re: [fpc-pascal] How to use serial or usb-ports in linux

2015-09-06 Thread Henry Vermaak
On Sun, Sep 06, 2015 at 12:16:31PM +0200, P. vanderWal wrote: > Hello all, > > I wrote a program to control a hobby milling machine.(Profiler, see > Elektor-forum). The programm is written in fpc-pascal and using > synaser in the windows version for control of the serial port(s). Now > I want to

Re: [fpc-pascal] Issue with Linking

2015-08-20 Thread Henry Vermaak
On Thu, Aug 20, 2015 at 07:03:11AM -0700, Chris Moody wrote: Assembling dentist Linking Dentist /usr/bin/ld: warning: link.res contains output sections; did you forget -T? /home/pi/fpc-2.6.4/lib/fpc/2.6.4/units/arm-linux/rtl/cprt0.o: In function `_haltproc_eabi': (.text+0x88): undefined

Re: [fpc-pascal] Issue with Linking

2015-08-20 Thread Henry Vermaak
On Thu, Aug 20, 2015 at 04:19:33PM +0200, Jonas Maebe wrote: On 20/08/15 16:15, Henry Vermaak wrote: Those symbols (_fini and _init) are defined in crti.o. Try `locate crti.o`, you'll get something like /usr/lib/{arch-triplet}/crti.o. Add this directory to your fpc options with -Fl. E.g

Re: [fpc-pascal] IsATTY

2015-04-17 Thread Henry Vermaak
On Fri, Apr 17, 2015 at 09:55:26AM -0400, David Copeland wrote: This function is a part the unit oldlinux. Is there a replacement for it somewhere? I have looked in the Linux, Unix, etc units but didn't see it. It's in termio. Henry ___ fpc-pascal

Re: [fpc-pascal] fpGetTimeOfDay

2015-03-09 Thread Henry Vermaak
On Mon, Mar 09, 2015 at 01:30:28PM +0100, Marco van de Voort wrote: In our previous episode, Mark Morgan Lloyd said: Are there any known issues with this sort of thing fpGetTimeOfDay (@TimeVal, nil) on various platforms? FPC 2.6.4 and 2.7.1 seem to be OK on x86, but on x64 (and FWIW

Re: [fpc-pascal] Use sleep in thread

2015-02-26 Thread Henry Vermaak
On Thu, Feb 26, 2015 at 09:23:33PM +0800, Xiangrong Fang wrote: ​I use rtlevent, but only meant to maintain a pool of threads, while there is no task for a thread it is blocked waiting for an event. BUT, that cannot be used to prioritize a thread. While you block a thread using rtlevent, it

Re: [fpc-pascal] Use sleep in thread

2015-02-26 Thread Henry Vermaak
On Thu, Feb 26, 2015 at 11:20:41AM +0100, Michael Schnell wrote: On 02/26/2015 11:14 AM, Michael Schnell wrote: I don't know what this does. With stepping in ASM I verified that (after some calculation) it does just a single syscall (via a sysenter Assembler instruction). so the overhead is

Re: [fpc-pascal] Use sleep in thread

2015-02-26 Thread Henry Vermaak
On Thu, Feb 26, 2015 at 11:40:44AM +0100, Michael Schnell wrote: On 02/26/2015 11:33 AM, Henry Vermaak wrote: Blocking with an even will sleep until someone wakes you up, it's very efficient. Using sleep() you will have to wake up, check if someone needs you, go to sleep again, etc

Re: [fpc-pascal] Use sleep in thread

2015-02-25 Thread Henry Vermaak
On Wed, Feb 25, 2015 at 06:17:17PM +0300, hinsta...@yandex.ru wrote: I mean T.Suspend, so u resume it then suspend it TThread.Suspend and TThread.Resume are deprecated (since 2.4.4), don't use them. Henry ___ fpc-pascal maillist -

Re: [fpc-pascal] Use sleep in thread

2015-02-25 Thread Henry Vermaak
On Wed, Feb 25, 2015 at 10:41:58PM +0800, Xiangrong Fang wrote: Hi All, Can I use Sleep() in a thread to give up cpu time to other threads running at the same time, so as to adjust the relative niceness of a group of workers working on the same subject (in which each thread take part of the

Re: [fpc-pascal] linux ACL

2015-01-23 Thread Henry Vermaak
On Fri, Jan 23, 2015 at 11:33:51AM +, Mark Morgan Lloyd wrote: Henry Vermaak wrote: On Fri, Jan 23, 2015 at 11:37:05AM +0100, Koenraad Lelong wrote: Hi, I need to set ACL's on files on Linux. Is there something ready-made in fpc ? Or should I use a TProcess and execute a setfacl

Re: [fpc-pascal] linux ACL

2015-01-23 Thread Henry Vermaak
On Fri, Jan 23, 2015 at 11:37:05AM +0100, Koenraad Lelong wrote: Hi, I need to set ACL's on files on Linux. Is there something ready-made in fpc ? Or should I use a TProcess and execute a setfacl that way ? Easiest would be to create a binding for libacl. ACL is specified by POSIX, so

Re: [fpc-pascal] TImage : how to avoid flickering when changing image

2014-08-05 Thread Henry Vermaak
On Tue, Aug 05, 2014 at 07:06:43PM +0800, Dennis Poon wrote: every few seconds, I want the same TImage to load a different jpg file but now it flickers whenever TheImage.Picture.LoadFromFile('new.jpg'); How do I avoid the flickering? I assume you're on Windows. Have you tried to set

Re: [fpc-pascal] TImage : how to avoid flickering when changing image

2014-08-05 Thread Henry Vermaak
On Tue, Aug 05, 2014 at 12:19:22PM +0100, Henry Vermaak wrote: On Tue, Aug 05, 2014 at 07:06:43PM +0800, Dennis Poon wrote: every few seconds, I want the same TImage to load a different jpg file but now it flickers whenever TheImage.Picture.LoadFromFile('new.jpg'); How do I avoid

Re: [fpc-pascal] cthreads

2014-07-27 Thread Henry Vermaak
On Sun, Jul 27, 2014 at 02:39:58PM +0200, Sven Barth wrote: On 27.07.2014 11:39, Mark Morgan Lloyd wrote: Sven Barth wrote: On 26.07.2014 19:50, leledumbo wrote: Because then all apps are linked to it, also the ones that don't need threads. Same for clocale and cwstrings. If the widestring

Re: [fpc-pascal] EpikTimer v1.0.1 released

2014-05-28 Thread Henry Vermaak
On Wed, May 28, 2014 at 02:00:06PM +0200, Marco van de Voort wrote: In fact I do want the best possible stuff and not a fork. I am just trying to help (as I would like to use it in the said current project). In that case some attention points: - help implementing and testing fine grained

Re: [fpc-pascal] EpikTimer v1.0.1 released

2014-05-28 Thread Henry Vermaak
On Wed, May 28, 2014 at 02:00:06PM +0200, Marco van de Voort wrote: - Is rdtsc safe for CPUs that can vary clock of cores independently like Core Mono? What if the process changed CPU to a different clocked core? I've read that on recent CPUs, the TSC is unaffected by the actual clock rate

Re: [fpc-pascal] EpikTimer v1.0.1 released

2014-05-28 Thread Henry Vermaak
On Wed, May 28, 2014 at 05:41:08PM +0200, Marco van de Voort wrote: In our previous episode, Henry Vermaak said: On linux, The TSC gets calibrated and the synchronisation is tested, which may result in the TSC clock source being marked as unstable and disabled. In this case, it will fall

Re: [fpc-pascal] EpikTimer v1.0.1 released

2014-05-28 Thread Henry Vermaak
On Wed, May 28, 2014 at 04:31:53PM +0200, Michael Schnell wrote: On 05/28/2014 04:26 PM, Henry Vermaak wrote: - The rdtsc instruction needs to be protected from out of order execution. Some people use cpuid, which is expensive. It looks like the linux kernel uses mfence or lfence

Re: [fpc-pascal] Watching for file change

2014-04-12 Thread Henry Vermaak
On Sat, Apr 12, 2014 at 12:32:14AM +0100, Graeme Geldenhuys wrote: On 2014-04-11 20:06, Krzysztof wrote: idea how to do this in thread loop but maybe FPC has OS solution As the others have said, the OS solutions are very version/distro dependent - especially under Linux which changes

Re: [fpc-pascal] Watching for file change

2014-04-12 Thread Henry Vermaak
On Sat, Apr 12, 2014 at 08:08:20PM +, Mark Morgan Lloyd wrote: Henry Vermaak wrote: On Sat, Apr 12, 2014 at 12:32:14AM +0100, Graeme Geldenhuys wrote: On 2014-04-11 20:06, Krzysztof wrote: idea how to do this in thread loop but maybe FPC has OS solution As the others have said, the OS

Re: [fpc-pascal] Watching for file change

2014-04-11 Thread Henry Vermaak
On 11 Apr 2014 20:07, Krzysztof dib...@wp.pl wrote: Hi, Does FPC have some file watching solution? I need this only for linux. I need notifications: - File/folder changed / removed / added in watched directory. I have idea how to do this in thread loop but maybe FPC has OS solution You can

Re: [fpc-pascal] Watching for file change

2014-04-11 Thread Henry Vermaak
On 11 Apr 2014 21:39, Mark Morgan Lloyd markmll.fpc-pas...@telemetry.co.uk wrote: waldo kitty wrote: On 4/11/2014 3:06 PM, Krzysztof wrote: Hi, Does FPC have some file watching solution? I need this only for linux. I need notifications: - File/folder changed / removed / added in watched

Re: [fpc-pascal] How to remove verbose compiler output

2014-04-04 Thread Henry Vermaak
On Fri, Apr 04, 2014 at 04:03:10AM +0100, Graeme Geldenhuys wrote: Hi, I'm trying to reduce the compiler output for cron jobs. I have tried to specify -v0 or even -v- -v0 but still the compiler outputs loads of 'Hint' and 'Warning' message about unused parameters, unused units,

Re: [fpc-pascal] cannot read /sys/class/net/eth1/address even as root user on linux

2013-12-05 Thread Henry Vermaak
On Thu, Dec 05, 2013 at 07:33:38PM +0800, Dennis Poon wrote: I tried to read the mac address in the captioned file path. In terminal, I can simply 'cat' and display the mac address. In FPC, when I tried to use TFileStream to read it, FS :=

Re: [fpc-pascal] GUI confusion

2013-10-01 Thread Henry Vermaak
On Mon, Sep 30, 2013 at 11:25:34AM +0100, Graeme Geldenhuys wrote: On 29/09/13 23:33, Patrick wrote: BTW, Would it be correct to compare LCL to WxWidgets ? In the sense that it is a meta-widget toolkit? Yes, that would be an accurate comparison. LCL and WxWidgets are a common front-end

Re: [fpc-pascal] lnet for TCP daemon

2013-09-18 Thread Henry Vermaak
On Wed, Sep 18, 2013 at 01:26:46PM +0200, Marco van de Voort wrote: In our previous episode, Michael Schnell said: The fptimer unit implements a timer with a thread, but this forces the use of threads on your application which is not always desirable. Should be doable, as well. AFAIK,

Re: [fpc-pascal] lnet for TCP daemon

2013-09-18 Thread Henry Vermaak
On Wed, Sep 18, 2013 at 03:57:36PM +0200, Marco van de Voort wrote: In our previous episode, Henry Vermaak said: Should be doable, as well. AFAIK, mse (for Linux) uses signals on that behalf. We might want to steal some ideas there. While there is sigalarm, but can you have

Re: [fpc-pascal] DoDirSeparators and special filenames on Windows

2013-09-12 Thread Henry Vermaak
On Thu, Sep 12, 2013 at 12:01:30PM +0200, Reimar Grabowski wrote: On Thu, 12 Sep 2013 07:10:19 +0200 Jürgen Hestermann juergen.hesterm...@gmx.de wrote: Ahh, that's the reason: It's (another) sloppiness in Unix systems and has creeped into Windows from there. Unfortunately M$ hasn't

Re: [fpc-pascal] Any suggestion for raspberry pi ?

2013-08-30 Thread Henry Vermaak
On Fri, Aug 30, 2013 at 03:44:35PM +0200, Stefan Fischer wrote: Hi, a longer time ago, i've installed lazarus on my raspberry pi with wheezy. The fpc version was 2.6.0-xxx I could compile without any problem. Today I've downloaded fpc 2.6.2 and installed it. But now I have problems

Re: [fpc-pascal] Re: Library callback : how do I do that?

2013-08-09 Thread Henry Vermaak
On Fri, Aug 09, 2013 at 09:28:47AM +0200, Michael Schnell wrote: On 08/08/2013 02:41 PM, Lukasz Sokol wrote: Very well then, thanks :) I suggest that - to exclude problems that might be imposed by some external non-Lazarus and software not by yourself - you do a test creating a combination

Re: [fpc-pascal] Re: Library callback : how do I do that?

2013-08-08 Thread Henry Vermaak
On Thu, Aug 08, 2013 at 12:15:44PM +0100, Lukasz Sokol wrote: but I would then need to make the wrapper object aware of the Application or its forms then? I wanted the wrapper unit to be as self-contained as much as possible, (so the callback function is defined in a unit that only has

Re: [fpc-pascal] GetCurrentDir

2013-04-22 Thread Henry Vermaak
On Mon, Apr 22, 2013 at 09:57:06AM +0200, Michael Van Canneyt wrote: On Mon, 22 Apr 2013, Marco van de Voort wrote: In our previous episode, Mattias Gaertner said: The FPC code tries to work its way up from '.' in such a case. I just tried, but it gives a correct result in my case. Maybe

Re: [fpc-pascal] Porting C macro

2013-03-11 Thread Henry Vermaak
On Mon, Mar 11, 2013 at 11:26:57PM +0100, Darius Blaszyk wrote: I'm stuck porting a macro from C. Below is the original define. The part I'm struggeling with is the right most part after the - sign. #define GETNEXT(x) ((LList *)(((char *) x) - ((char *) (((LList *)0)^.next I'm

Re: [fpc-pascal] Object pascal language compatiblity - was: Does FPC 2.8.0 can actually still be called Pascal ?

2013-03-01 Thread Henry Vermaak
On Fri, Mar 01, 2013 at 09:23:29AM +, Mark Morgan Lloyd wrote: Sven Barth wrote: An llvm target will move the optimisation burden away from fpc, which would be very interesting. While we would welcome a LLVM backend it is basically a consent in the development team that this would

Re: [fpc-pascal] Object pascal language compatiblity - was: Does FPC 2.8.0 can actually still be called Pascal ?

2013-02-28 Thread Henry Vermaak
On Thu, Feb 28, 2013 at 10:45:08AM +, Graeme Geldenhuys wrote: On 2013-02-28 09:28, Marc Pertron wrote: We need better optimisations at least as much as fancy 123.tostring. Bottom line optimisation work is just not as sexy and exciting as adding the latest Delphi/Java/C#/C

Re: [fpc-pascal] Object pascal language compatiblity - was: Does FPC 2.8.0 can actually still be called Pascal ?

2013-02-28 Thread Henry Vermaak
On Thu, Feb 28, 2013 at 07:43:15AM -0600, Kenneth Cochran wrote: On Feb 28, 2013 5:23 AM, Henry Vermaak henry.verm...@gmail.com wrote: On Thu, Feb 28, 2013 at 10:45:08AM +, Graeme Geldenhuys wrote: On 2013-02-28 09:28, Marc Pertron wrote: We need better optimisations at least

Re: [fpc-pascal] differences between .pp and .pas files

2013-02-25 Thread Henry Vermaak
On Mon, Feb 25, 2013 at 11:00:25AM +, Graeme Geldenhuys wrote: On 2013-02-25 10:51, Sven Barth wrote: That's indeed a valid argument pro .pp And a large argument against .pp extensions is that NO editor out there (except for FP Text IDE and Lazarus) knows about .pp, so pascal syntax

Re: [fpc-pascal] Cross-compiler installation

2013-02-22 Thread Henry Vermaak
On Fri, Feb 22, 2013 at 10:52:09AM -0300, silvioprog wrote: Hello, What is cross-compiler installation mentioned in this article?: http://wiki.freepascal.org/Android (please see: http://imagebin.org/247728) And where do I download it? The heading of that section is Building cross

Re: [fpc-pascal] Cross-compiler installation

2013-02-22 Thread Henry Vermaak
On Fri, Feb 22, 2013 at 11:09:45AM -0300, silvioprog wrote: OK, but... I added the following paths on PATH env. variable: C:\lazarus\fpc\2.7.1\bin\i386-win32 C:\Program Files (x86)\Android SDK\android-ndk-r8d\toolchains\arm-linux-androideabi-4.7\prebuilt\windows\bin And after:

Re: [fpc-pascal] Changing variable in conditional

2013-01-09 Thread Henry Vermaak
On Wed, Jan 09, 2013 at 08:42:22AM +, Mark Morgan Lloyd wrote: But if you want an example of a very nasty bug caused by C/C++ multiple assignment, there was a well-documented attempt to slip a privilege escalation into the Linux kernel based on this a few years ago. It's very easy to

Re: [fpc-pascal] Changing variable in conditional

2013-01-09 Thread Henry Vermaak
On Wed, Jan 09, 2013 at 10:46:54AM +, Mark Morgan Lloyd wrote: I've got a vague recollection that since that episode the kernel maintainers have mandated a use of parentheses that helps the compiler pick up the distinction between an equality and an Assignment inside if statements are

Re: [fpc-pascal] Changing variable in conditional

2013-01-09 Thread Henry Vermaak
On Wed, Jan 09, 2013 at 08:31:14PM +0100, Marco van de Voort wrote: I guess that is the bright side of it all. Sooner or later we can have an obfuscated Pascal contest, just like the other ones :-) I'm sure we can already have a contest just with the careful application of macros :) Henry

Re: [fpc-pascal] Changing variable in conditional

2013-01-08 Thread Henry Vermaak
On Tue, Jan 08, 2013 at 09:58:19AM +0100, Krzysztof wrote: I don't like a lot of C++ syntax but this one is interesting. You really don't like it? :) Most C programmers I've dealt with (including myself) consider this bad practise. Henry ___

Re: [fpc-pascal] Changing variable in conditional

2013-01-08 Thread Henry Vermaak
On Tue, Jan 08, 2013 at 08:19:15AM -0300, Jorge Aldo G. de F. Junior wrote: C programmers are (usually, but there are a lot of exceptions) bad programmers who confuse the power of a language with the capability of decrease the ammount of typing needed to reach a certain goal. They despise

Re: [fpc-pascal] wayland support for FPC

2012-11-09 Thread Henry Vermaak
On 09/11/12 11:06, Graeme Geldenhuys wrote: On 2012-11-09 10:42, Marco van de Voort wrote: IOW, I wouldn't desperately try to support Wayland native at this point. That can be done if the native api turns out to be stable, Wayland truely takes over X11, and all distros package it. Now it is

Re: [fpc-pascal] Using flag field in Getopts

2012-10-30 Thread Henry Vermaak
On 30/10/12 10:05, luciano de souza wrote: Hello listers, Getopts offers very good features to process commandline arguments. As far as I could understand, I used it successfully. But it remains one unknown aspect for me. What is the field flag of TOption record? How to use it? TOption =

Re: [fpc-pascal] Re: problems compiling FPC

2012-10-30 Thread Henry Vermaak
On 30/10/12 14:04, Mattias Gaertner wrote: Rich Cook Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning. Ah, you beat me to it :) Henry

Re: [fpc-pascal] libusb header translation and OOP wrapper

2012-09-25 Thread Henry Vermaak
On 25 September 2012 20:57, Christo christo.cra...@gmail.com wrote: Any ideas on how to define the calling convention in the import unit so that it is either stdcall or cdecl depending on the target OS? I've used a macro for this in the past. E.g. : {$macro on} {$ifdef windows} {$define

Re: [fpc-pascal] libusb header translation and OOP wrapper

2012-09-24 Thread Henry Vermaak
On 24 September 2012 14:39, Christo christo.cra...@gmail.com wrote: Unfortunately the master branch appears to be 2 months old. Any idea how I can clone the libusb-1.0 branch? I'm new to using git so it may be something trivial I'm missing. Try to clone

Re: [fpc-pascal] Malformed email messages

2012-08-16 Thread Henry Vermaak
On 16/08/12 13:53, microc...@zoho.com wrote: Is anybody else receiving mailformed emails from the list? The only weirdness I get is Ludo's subject header. The subject of the first message in the thread was: [fpc-pascal] linux: should we hard-code versioned or unversioned shared libraries in

Re: [fpc-pascal] linux: should we hard-code versioned or unversioned shared libraries in our apps?

2012-08-15 Thread Henry Vermaak
On 15/08/12 12:37, Mark Morgan Lloyd wrote: Jonas Maebe wrote: In both these cases, I manually created unversioned symlinks to those libraries, and that got my applications working again. This is not ideal, but I don't know how else to handle this. The official way to get the unversioned

Re: [fpc-pascal] linux: should we hard-code versioned or unversioned shared libraries in our apps?

2012-08-15 Thread Henry Vermaak
On 15/08/12 13:43, Mark Morgan Lloyd wrote: I do agree with Graeme's position though: a -dev is described as containing files for developers, and it should not be necessary for a non-developer user to start encumbering his system with .h files etc. What's more, part of the reason that I've

Re: [fpc-pascal] Inline bytes

2012-08-09 Thread Henry Vermaak
On 09/08/12 14:25, Rainer Stratmann wrote: Am Thursday 09 August 2012 15:14:29 schrieb Jonas Maebe: Rainer Stratmann wrote on Thu, 09 Aug 2012: How is it possible to put some inline bytes in the code like the former inline( $1f , $ef , $1A ); instruction? {$asmmode att} asm .byte

Re: [fpc-pascal] Re: Runs correctly when debugging.

2012-05-08 Thread Henry Vermaak
On 07/05/12 12:35, Guillermo Martínez Jiménez wrote: Thanks, Henry, Can you give any more information about how it fails? It's a SIGSEGV. The library is the Allegro library version 5.0.6. The error is inside an internal procedure that uploads a texture to OpenGL context, and it is used

  1   2   3   4   5   >