Re: [fpc-pascal] fpmake addlibrary

2020-08-30 Thread Michael Van Canneyt via fpc-pascal
On Sun, 30 Aug 2020, Mattias Gaertner via fpc-pascal wrote: On Sun, 30 Aug 2020 13:38:12 +0200 (CEST) Michael Van Canneyt via fpc-pascal wrote: On Sun, 30 Aug 2020, Mattias Gaertner via fpc-pascal wrote: > Hi, > > AddLibrary('libbla.pp') creates under Linux "blalib.so"

Re: [fpc-pascal] fpmake addlibrary

2020-08-30 Thread Michael Van Canneyt via fpc-pascal
On Sun, 30 Aug 2020, Mattias Gaertner via fpc-pascal wrote: On Sun, 30 Aug 2020 14:16:14 +0200 (CEST) Michael Van Canneyt via fpc-pascal wrote: On Sun, 30 Aug 2020, Mattias Gaertner via fpc-pascal wrote: > On Sun, 30 Aug 2020 13:38:12 +0200 (CEST) > Michael Van Canneyt via fpc-

Re: [fpc-pascal] fpmake addlibrary

2020-08-30 Thread Michael Van Canneyt via fpc-pascal
On Sun, 30 Aug 2020, Mattias Gaertner via fpc-pascal wrote: Hi, AddLibrary('libbla.pp') creates under Linux "blalib.so". I want "bla.so". How to do that? AddLibrary('libbla.pp').SetExeName('bla'); Michael. ___ fpc-pascal maillist -

Re: [fpc-pascal] bug tracker (bugs.freepascal.org) APPLICATION ERROR #400 (db connection failed)

2020-08-30 Thread Michael Van Canneyt via fpc-pascal
On Sun, 30 Aug 2020, Christo Crause via fpc-pascal wrote: On Sun, Aug 30, 2020 at 9:45 AM Dmitry Boyarintsev via fpc-pascal < fpc-pascal@lists.freepascal.org> wrote: The site opens up with: APPLICATION ERROR #400 I also get the above mentioned error when trying to open the website.

Re: [fpc-pascal] Ethernet Relays

2020-09-06 Thread Michael Van Canneyt via fpc-pascal
On Sun, 6 Sep 2020, James Richters via fpc-pascal wrote: I've been using simpleget to control ethernet relays like this: S:=TFPHTTPCLIENT.SIMPLEGET('http://10.10.01.01/3/15'); But if the IP address does not exist on the network I get this error: An unhandled exception occurred at

Re: [fpc-pascal] Procedural generics question

2020-09-04 Thread Michael Van Canneyt via fpc-pascal
On Thu, 3 Sep 2020, Lars via fpc-pascal wrote: On 2020-08-26 05:44, Nico Neumann via fpc-pascal wrote: The TypeInfo function checks the code during run-time thus the generated code is 'bloated'. Better use the compiler intrinsic GetTypeKind. {$mode objfpc} uses typinfo; generic

Re: [fpc-pascal] Linux GTK-2 GUI app

2020-09-01 Thread Michael Van Canneyt via fpc-pascal
On Tue, 1 Sep 2020, Adriaan van Os via fpc-pascal wrote: leledumbo via fpc-pascal wrote: Or create different packages for different distros ? If you can afford the maintenance burden, this is the best that every specific distro user will love. Otherwise, just provide a compressed archive

Re: [fpc-pascal] Linux GTK-2 GUI app

2020-08-31 Thread Michael Van Canneyt via fpc-pascal
On Mon, 31 Aug 2020, Adriaan van Os via fpc-pascal wrote: Any recommendations for distributing a FPC gtk-2 GUI app on Linux ? I would prefer it to be as simple as possible. Use something like AppImage ? Create a .desktop file? Or create different packages for different distros ? The

Re: [fpc-pascal] Using built-in serial instead of synaser and the like for Linux console app?

2020-08-31 Thread Michael Van Canneyt via fpc-pascal
On Mon, 31 Aug 2020, Bo Berglund via fpc-pascal wrote: On Fri, 21 Aug 2020 21:03:31 +0200, Bo Berglund via fpc-pascal wrote: Instead I need to add a thread for reading data so I can have an event driven reception of data. It would read available data and fire off a NotifyEvent to handle

Re: [fpc-pascal] Linux GTK-2 GUI app

2020-08-31 Thread Michael Van Canneyt via fpc-pascal
On Mon, 31 Aug 2020, Adriaan van Os via fpc-pascal wrote: Michael Van Canneyt wrote: This is a puzzling sentence: "From the Linux Terminal only" - As opposed to what ? I meant to say that, without a .desktop file, the app is not double-clickable. Of course it is ? The .desktop file is

Re: [fpc-pascal] Sending Hex codes over TCP/IP

2020-09-11 Thread Michael Van Canneyt via fpc-pascal
On Fri, 11 Sep 2020, James Richters via fpc-pascal wrote: I'm trying to figure out how to send and receive Arrays of Bytes or perhaps a buffer of hex codes over TCP/IP, but everything I find seems to want to send and receive strings. Can someone please point me in the right direction on how

Re: [fpc-pascal] Ethernet Relays

2020-09-08 Thread Michael Van Canneyt via fpc-pascal
Add the ssockets unit to your uses clause. Michael On Mon, 7 Sep 2020, James Richters via fpc-pascal wrote: When I try to compile either of the examples below, I get Error: Identifier not found "ESocketError" Any ideas? James Yes, catch the ESocketError in a try..except: Try

Re: [fpc-pascal] Ethernet Relays

2020-09-08 Thread Michael Van Canneyt via fpc-pascal
On Tue, 8 Sep 2020, James Richters via fpc-pascal wrote: I added ssockets now I can compile it. I have this working with the ssockets unit added: Try S:=TFPHTTPCLIENT.SIMPLEGET('http://10.10.01.01/3/15'); except On E: ESocketError do Writeln('Could not connect to server'); end;

Re: [fpc-pascal] Ethernet Relays

2020-09-08 Thread Michael Van Canneyt via fpc-pascal
On Tue, 8 Sep 2020, James Richters via fpc-pascal wrote: Yes 10 was too short, I made it larger and larger until it worked. 1000 was the lowest value that worked so I set it to 2000, that's still quite a bit faster than the default. If I make a mistake in the link but the server IP

Re: [fpc-pascal] TFPTimer does not fire, why?

2020-09-07 Thread Michael Van Canneyt via fpc-pascal
On Mon, 7 Sep 2020, Bo Berglund via fpc-pascal wrote: Ì have a problem using TFpTimer on Linux (FPC 3.0.4, Lazarus 2.0.8 on Raspbian). The application is a small GUI test app where I have added a timer in order to update the display with incoming data. So I have it set up like this: {$mode

Re: [fpc-pascal] TFPTimer does not fire, why?

2020-09-07 Thread Michael Van Canneyt via fpc-pascal
On Mon, 7 Sep 2020, Bo Berglund via fpc-pascal wrote: On Mon, 7 Sep 2020 12:40:07 +0200 (CEST), Michael Van Canneyt via fpc-pascal wrote: Why does the FpTimer event not fire? Do you call checksynchronize at regular intervals ? The default timer is threaded, and the OnTimer event

Re: [fpc-pascal] netdb and DNS queries for MX, TXT, and other resource types

2020-09-16 Thread Michael Van Canneyt via fpc-pascal
On Wed, 16 Sep 2020, Noel Duffy via fpc-pascal wrote: I'm in need of a library to perform DNS lookups for a range of different resource types such as MX, TXT, PTR and so on. At first I thought that netdb would do the job, but it turns out that it only supports direct A and AAA lookups.

Re: [fpc-pascal] String literals and code page of .pas source file

2020-09-14 Thread Michael Van Canneyt via fpc-pascal
On Mon, 14 Sep 2020, Tomas Hajny via fpc-pascal wrote: On 2020-09-12 23:03, Tomas Hajny wrote: On 2020-09-12 18:51, Jonas Maebe via fpc-pascal wrote: On 12/09/2020 18:44, Sven Barth via fpc-pascal wrote: Jonas Maebe via fpc-pascal > schrieb am Sa.,

Re: [fpc-pascal] String literals and code page of .pas source file

2020-09-14 Thread Michael Van Canneyt via fpc-pascal
On Mon, 14 Sep 2020, Tomas Hajny via fpc-pascal wrote: application (let's say notepad.exe) will result in garbage. I don't say that it is necessarily bad, but it should be documented at least if we want to keep it that way. I would definitely keep it that way. As I see it: Redirection or

Re: [fpc-pascal] String literals and code page of .pas source file

2020-09-14 Thread Michael Van Canneyt via fpc-pascal
On Mon, 14 Sep 2020, Tomas Hajny via fpc-pascal wrote: opened: {$ifdef FPC_HAS_FEATURE_ANSISTRINGS} { if no codepage is yet assigned then assign default ansi codepage } TextRec(t).CodePage:=TranslatePlaceholderCP(TextRec(t).CodePage); {$else FPC_HAS_FEATURE_ANSISTRINGS} I see no need to

Re: [fpc-pascal] String literals and code page of .pas source file

2020-09-14 Thread Michael Van Canneyt via fpc-pascal
On Mon, 14 Sep 2020, Tomas Hajny via fpc-pascal wrote: On 2020-09-14 13:39, Michael Van Canneyt wrote: On Mon, 14 Sep 2020, Tomas Hajny via fpc-pascal wrote: On 2020-09-12 23:03, Tomas Hajny wrote: On 2020-09-12 18:51, Jonas Maebe via fpc-pascal wrote: On 12/09/2020 18:44, Sven Barth via

Re: [fpc-pascal] Linux GTK-2 GUI app

2020-09-01 Thread Michael Van Canneyt via fpc-pascal
On Tue, 1 Sep 2020, Adriaan van Os via fpc-pascal wrote: Michael Van Canneyt wrote: Normally a zip file with a the binary and supporing files, plus a README file should be enough. Can you refer me to an example ? You can't get more simple than this I think:

Re: [fpc-pascal] Using built-in serial instead of synaser and the like for Linux console app?

2020-09-01 Thread Michael Van Canneyt via fpc-pascal
On Tue, 1 Sep 2020, Bo Berglund via fpc-pascal wrote: On Tue, 01 Sep 2020 10:22:08 +0200, Bo Berglund via fpc-pascal wrote: Maybe I could tie the timeout to the actual baud used? Slower speeds use longer timeout etc? Timeout could be set to the time it takes to transfer the number of bytes

Re: [fpc-pascal] fpcmake packaging

2020-09-01 Thread Michael Van Canneyt via fpc-pascal
On Tue, 1 Sep 2020, Ryan Joseph via fpc-pascal wrote: I've never used fpcmake before and instead relied on my own custom build system solutions which are a pain to maintain and non-standard which it makes extra work configuring the pascal language server I'm using now. My first question of

Re: [fpc-pascal] Using built-in serial instead of synaser and the like for Linux console app?

2020-09-01 Thread Michael Van Canneyt via fpc-pascal
On Tue, 1 Sep 2020, Bo Berglund via fpc-pascal wrote: On Tue, 1 Sep 2020 14:21:44 +0200 (CEST), Michael Van Canneyt via fpc-pascal wrote: You must still set the default value in the constructor. Note that the thread itself has no idea what is the baudrate in use so it cannot calculate

Re: [fpc-pascal] Adding file to string to the RTL

2020-10-07 Thread Michael Van Canneyt via fpc-pascal
On Tue, 6 Oct 2020, Ryan Joseph via fpc-pascal wrote: Since we're on the topic how about another one-liner for reading all the files in directory into a dynamic array? This has the added benefit of getting enumeration for free. This is standard stuff for working with files in scripting

Re: [fpc-pascal] Adding file to string to the RTL

2020-10-08 Thread Michael Van Canneyt via fpc-pascal
On Thu, 8 Oct 2020, Ryan Joseph via fpc-pascal wrote: On Oct 6, 2020, at 2:12 AM, Michael Van Canneyt via fpc-pascal wrote: // Read raw content as bytes Function GetFileContents(Const aFileName : RawByteString) : TBytes; Function GetFileContents(Const aFileName : UnicodeString

Re: [fpc-pascal] Are record fields zeroed on declaration of a record?

2020-10-08 Thread Michael Van Canneyt via fpc-pascal
On Thu, 8 Oct 2020, Ryan Joseph via fpc-pascal wrote: On Oct 8, 2020, at 5:14 AM, gabor via fpc-pascal wrote: You can define typed constant and assign it to variable. type TMyRecord = record X, Y: Integer; S: String; end; const MYDEFREC: TMyRecord = (X: 1; Y: 2; S: 'ABC');

Re: [fpc-pascal] Are record fields zeroed on declaration of a record?

2020-10-09 Thread Michael Van Canneyt via fpc-pascal
On Fri, 9 Oct 2020, Bo Berglund via fpc-pascal wrote: On Thu, 8 Oct 2020 23:00:32 +0200 (CEST), Michael Van Canneyt via fpc-pascal wrote: On Thu, 8 Oct 2020, Ryan Joseph via fpc-pascal wrote: On Oct 8, 2020, at 5:14 AM, gabor via fpc-pascal wrote: You can define typed constant

Re: [fpc-pascal] Adding file to string to the RTL

2020-10-05 Thread Michael Van Canneyt via fpc-pascal
On Mon, 5 Oct 2020, Ryan Joseph via fpc-pascal wrote: I often need to use a function which reads a file into a string, as is so common in so many scripting languages. Can it be considered to add something like this to the RTL? Since we have a refcounted Ansistring type it's natural for

Re: [fpc-pascal] Adding file to string to the RTL

2020-10-06 Thread Michael Van Canneyt via fpc-pascal
On Mon, 5 Oct 2020, Ryan Joseph via fpc-pascal wrote: On Oct 5, 2020, at 3:23 PM, Michael Van Canneyt via fpc-pascal wrote: So I think you're looking at 6 or even 8 versions of this hypothetical function... Ouch. :) I'm sure this code already exists in the RTL though, right? I

Re: [fpc-pascal] Adding file to string to the RTL

2020-10-06 Thread Michael Van Canneyt via fpc-pascal
On Mon, 5 Oct 2020, Ryan Joseph via fpc-pascal wrote: On Oct 5, 2020, at 5:08 PM, Jean SUZINEAU via fpc-pascal wrote: In my own code I use BlockRead/BlockWrite, but I'm wondering if I've not seen this somewhere in RTL. This looks good to me what about the concerns raised by

Re: [fpc-pascal] netdb, DNS and TCP

2020-10-12 Thread Michael Van Canneyt via fpc-pascal
On Mon, 12 Oct 2020, Noel Duffy via fpc-pascal wrote: On 11/10/20 9:42 pm, Michael Van Canneyt via fpc-pascal wrote: On Sun, 11 Oct 2020, Noel Duffy via fpc-pascal wrote: To avoid that duplication, the code would need to use a dynamic buffer and fill it just before socket writing

Re: [fpc-pascal] netdb, DNS and TCP

2020-10-11 Thread Michael Van Canneyt via fpc-pascal
On Sun, 11 Oct 2020, Noel Duffy via fpc-pascal wrote: Hi all, To keep track of the work I've been doing on DNS in netdb, I created bug #37906 in Mantis. https://bugs.freepascal.org/view.php?id=37906 I've attached to a note on that bug report a proof-of-concept version of netdb.pp and a

Re: [fpc-pascal] Adding file to string to the RTL

2020-10-06 Thread Michael Van Canneyt via fpc-pascal
On Tue, 6 Oct 2020, Ryan Joseph via fpc-pascal wrote: On Oct 6, 2020, at 2:12 AM, Michael Van Canneyt via fpc-pascal wrote: I added the following functions to the sysutils unit (rev 47056): Great, thanks Michael. I've always used AnsiString so why is UnicodeString preferable here

Re: [fpc-pascal] Adding file to string to the RTL

2020-10-06 Thread Michael Van Canneyt via fpc-pascal
On Tue, 6 Oct 2020, Bart via fpc-pascal wrote: On Tue, Oct 6, 2020 at 10:12 AM Michael Van Canneyt via fpc-pascal wrote: // Assume TEncoding.SystemEncoding Function GetFileAsString(Const aFileName : RawByteString) : RawByteString; // Specify encoding Function GetFileAsString(Const

Re: [fpc-pascal] Adding file to string to the RTL

2020-10-06 Thread Michael Van Canneyt via fpc-pascal
be only one way in the RTL for this task and not two once *IOUtils* (foundation webpage says it's planned anyway) is implemented. Am Di., 6. Okt. 2020 um 10:12 Uhr schrieb Michael Van Canneyt via fpc-pascal : On Mon, 5 Oct 2020, Ryan Joseph via fpc-pascal wrote: On Oct 5, 2020, at 5:08 PM

Re: [fpc-pascal] Are record fields zeroed on declaration of a record?

2020-10-08 Thread Michael Van Canneyt via fpc-pascal
On Thu, 8 Oct 2020, Bo Berglund via fpc-pascal wrote: I would like to know if data containers of type packed record are zeroed when the item is declared? type TMyRecord = packed record AField1: byte; AField2: word; AField3: single; AField4: boolean; AField5: array[0..15] of

Re: [fpc-pascal] Precedence of compiler switches/directives

2020-10-08 Thread Michael Van Canneyt via fpc-pascal
On Thu, 8 Oct 2020, Peter via fpc-pascal wrote: I'm curious about who wins, if switches/directives are set to different values in different places. They could be set in fpg.cfg Command line or Lazarus lpi Directives in the code. Is there some AND/OR logic, or is it a strict precedence

Re: [fpc-pascal] Are record fields zeroed on declaration of a record?

2020-10-08 Thread Michael Van Canneyt via fpc-pascal
On Thu, 8 Oct 2020, Bo Berglund via fpc-pascal wrote: On Thu, 8 Oct 2020 10:47:52 +0200 (CEST), Michael Van Canneyt via fpc-pascal wrote: On Thu, 8 Oct 2020, Bo Berglund via fpc-pascal wrote: I would like to know if data containers of type packed record are zeroed when the item

Re: [fpc-pascal] FPC coding standards

2020-08-18 Thread Michael Van Canneyt via fpc-pascal
On Tue, 18 Aug 2020, Dwight Schauer via fpc-pascal wrote: On Tue, 2020-08-18 at 23:17 +0200, Marco van de Voort via fpc-pascal wrote: Op 2020-08-18 om 23:01 schreef Sven Barth via fpc-pascal: > Might be the even better solution as fcl-passrc will be better > maintained due to it being used

Re: [fpc-pascal] Regression in 3.2.0 ??

2020-08-19 Thread Michael Van Canneyt via fpc-pascal
On Tue, 18 Aug 2020, Peter via fpc-pascal wrote: I wondering if there is a regression in 3.2.0. The Lazarus file fpguiwsprivate.pp no longer compiles. It was fine in 3.0.4. The error message "No matching implementation for interface method ... CDecl; found " is strange as the interface and

Re: [fpc-pascal] FFI or RTTI invoke for Apple arm64

2020-08-19 Thread Michael Van Canneyt via fpc-pascal
On Wed, 19 Aug 2020, Carlo Kok via fpc-pascal wrote: Hi, for PascalScript FFI support, are there plans to support RTTI .Invoke, or any form of FFI available to do dynamic invoke from Pascalscript to FPC/api code? As far as I know, the RTTI.Invoke is there. There are even tests for it. We

Re: [fpc-pascal] Using built-in serial instead of synaser and the like for Linux console app?

2020-08-21 Thread Michael Van Canneyt via fpc-pascal
On Fri, 21 Aug 2020, Bo Berglund via fpc-pascal wrote: What is the advantage of using synaser over serial in a simple non-gui program running in the console in Linux? I have been struggling making LazSerial work in a console app and been adviced to instead use synaser (which is what

Re: [fpc-pascal] Archive libraries

2020-08-22 Thread Michael Van Canneyt via fpc-pascal
On Sat, 22 Aug 2020, Darius Blaszyk via fpc-pascal wrote: On Thu, Aug 20, 2020 at 11:43 PM Darius Blaszyk wrote: I have done so for the xz format already. The code checks first if the utility is available and then invokes it. Potentially any other utility might be included that way.

Re: [fpc-pascal] Can't disable quoting in TStrings

2020-08-20 Thread Michael Van Canneyt via fpc-pascal
On Wed, 19 Aug 2020, Luis - SoftSAT Sistemas via fpc-pascal wrote: As stated in http://docwiki.embarcadero.com/Libraries/Tokyo/en/System.Classes.TStrings.QuoteChar setting QuoteChar to null should disable the quote, but it won't work in FPC 3.2. Hm. Seems they introduced this in XE6.

Re: [fpc-pascal] fpmake addlibrary

2020-08-30 Thread Michael Van Canneyt via fpc-pascal
On Sun, 30 Aug 2020, Mattias Gaertner via fpc-pascal wrote: On Sun, 30 Aug 2020 16:22:58 +0200 (CEST) Michael Van Canneyt wrote: On Sun, 30 Aug 2020, Mattias Gaertner wrote: > On Sun, 30 Aug 2020 14:30:11 +0200 (CEST) > Michael Van Canneyt wrote: > >> [...] >>> Is there a workaround

Re: [fpc-pascal] json parser line numbers

2020-09-29 Thread Michael Van Canneyt via fpc-pascal
On Tue, 29 Sep 2020, Benito van der Zander via fpc-pascal wrote: Hi, the line numbering of the json parser has been changed recently. It used to say "Error at line 1"... when there was an error in the first line, but now it says "Error at line 0"... Was that on purpose, or can someone

Re: [fpc-pascal] json parsing: detecting invalid escape sequences

2020-09-29 Thread Michael Van Canneyt via fpc-pascal
On Tue, 29 Sep 2020, Benito van der Zander via fpc-pascal wrote: Hi, I am supposed to find invalid escape sequences when parsing JSON and replace them with a user defined fallback. Invalid in the sense that the unicode codepoint is not defined or a missing surrogate, not syntactically

Re: [fpc-pascal] stdcall without the ;

2020-09-23 Thread Michael Van Canneyt via fpc-pascal
On Wed, 23 Sep 2020, Luca Olivetti via fpc-pascal wrote: But I don't have the hardware managed by the DLL so the callbacks are never called here. Can't you create a stub DLL to test? it doesn't need to do anything, just log the params maybe... Michael.

Re: [fpc-pascal] stdcall without the ;

2020-09-23 Thread Michael Van Canneyt via fpc-pascal
On Wed, 23 Sep 2020, Luca Olivetti via fpc-pascal wrote: Hello, I just compiled a lazarus project made in 2105 with fpc 3.2.0 and, while it works here, it fails when the customer runs it. I noticed that I'm using a dll and the functions and callbacks are declared stdcall (the platform is

Re: [fpc-pascal] Buffer size for TCP DNS queries in netdb

2020-09-26 Thread Michael Van Canneyt via fpc-pascal
On Sat, 26 Sep 2020, Noel Duffy via fpc-pascal wrote: Hi all, I've spent some time this past couple of weeks reading through the DNS resolver code in netdb and poring over RFCs that specify the protocol with a view to adding support for additional resource record queries. Things like TXT,

Re: [fpc-pascal] Buffer size for TCP DNS queries in netdb

2020-09-27 Thread Michael Van Canneyt via fpc-pascal
On Sun, 27 Sep 2020, Noel Duffy via fpc-pascal wrote: On 26/09/20 9:07 pm, Michael Van Canneyt via fpc-pascal wrote: On Sat, 26 Sep 2020, Noel Duffy via fpc-pascal wrote: To restate the question, is 64k too much overhead for DNS queries? That overhead would be present on all queries

Re: [fpc-pascal] Cross platform question about lpi file content

2020-10-01 Thread Michael Van Canneyt via fpc-pascal
On Wed, 30 Sep 2020, Sven Barth via fpc-pascal wrote: Lazarus is not Delphi. In Delphi this worked, because on Windows the GUI libraries are always available and Windows doesn't care if you use UI code in a "console" binary. On other systems (especially Linux and BSD) this might not be the

Re: [fpc-pascal] TFPGMapObject duplicate errors

2020-10-03 Thread Michael Van Canneyt via fpc-pascal
On Fri, 2 Oct 2020, Ryan Joseph via fpc-pascal wrote: On Oct 1, 2020, at 7:00 PM, Vojtěch Čihák via fpc-pascal wrote: I looked to code, it gives error only when map is Sorted=True. Thanks. Sneaky that sorted had to be set to true. Not sure why that would be. Because otherwise it

Re: [fpc-pascal] TFPGMapObject duplicate errors

2020-10-03 Thread Michael Van Canneyt via fpc-pascal
On Sat, 3 Oct 2020, Mattias Gaertner via fpc-pascal wrote: On Sat, 3 Oct 2020 15:53:58 +0200 (CEST) Michael Van Canneyt via fpc-pascal wrote: On Fri, 2 Oct 2020, Ryan Joseph via fpc-pascal wrote: [...] > Thanks. Sneaky that sorted had to be set to true. Not sure why that >

Re: [fpc-pascal] Converting date formats

2020-10-03 Thread Michael Van Canneyt via fpc-pascal
On Sat, 3 Oct 2020, Ryan Joseph via fpc-pascal wrote: I have some dates formats like this which I would like to convert to TDateTime. Are these supported in the RTL? I tried using the StrToDate functions but I got errors. program test; uses SysUtils; begin

Re: [fpc-pascal] Converting date formats

2020-10-03 Thread Michael Van Canneyt via fpc-pascal
On Sat, 3 Oct 2020, Ryan Joseph via fpc-pascal wrote: I have no idea about dates and where to find these functions in the RTL. I just saw the date at https://tools.ietf.org/html/rfc3339. Well, if you are really ignorant about these functions, why not go to the index page (linked to from

Re: [fpc-pascal] netdb and DNS queries for MX, TXT, and other resource types

2020-09-16 Thread Michael Van Canneyt via fpc-pascal
On Wed, 16 Sep 2020, Noel Duffy via fpc-pascal wrote: On 16/09/20 8:43 pm, Michael Van Canneyt via fpc-pascal wrote: On Wed, 16 Sep 2020, Noel Duffy via fpc-pascal wrote: I'm in need of a library to perform DNS lookups for a range of different resource types such as MX, TXT, PTR and so

Re: [fpc-pascal] -Fu unit search path and network paths

2020-09-21 Thread Michael Van Canneyt via fpc-pascal
On Mon, 21 Sep 2020, Ryan Joseph via fpc-pascal wrote: On Sep 21, 2020, at 2:16 PM, LacaK via fpc-pascal wrote: when I use in *uses* clause: I never knew "in" even existed! This totally blows my mind. Was it something added from Delphi that I never heard about? Since the very first

Re: [fpc-pascal] New package to evaluate Pascal-expressions

2020-10-21 Thread Michael Van Canneyt via fpc-pascal
On Wed, 21 Oct 2020, Joost van der Sluis via fpc-pascal wrote: Hi all, Working on fpDebug, I've got onto a side-track and created an expression-evaluator based on fcl-passrc . So that you can evaluate Pascal-expressions at runtime.

Re: [fpc-pascal] fcl-web: Trequest.RemoteAddr is empty (sometimes)

2021-01-12 Thread Michael Van Canneyt via fpc-pascal
On Tue, 12 Jan 2021, Luca Olivetti via fpc-pascal wrote: El 12/1/21 a les 10:24, Michael Van Canneyt via fpc-pascal ha escrit: Am I right thinking that, even if several copies of the above method are running, each will get it's own local variables, so the LocCommandQueue variable

Re: [fpc-pascal] SQLDB: Set port in TSQLConnector

2021-01-12 Thread Michael Van Canneyt via fpc-pascal
On Mon, 11 Jan 2021, Virgo Pärna via fpc-pascal wrote: On Fri, 08 Jan 2021 14:25:09 -0300, Luis - SoftSAT Sistemas via fpc-pascal wrote: I'm trying to connect to a Firebird database with TSQLConnector, but I can't seem to find a way to set the port number. Looking at TIBConnection, there

Re: [fpc-pascal] fcl-web: Trequest.RemoteAddr is empty (sometimes)

2021-01-12 Thread Michael Van Canneyt via fpc-pascal
On Tue, 12 Jan 2021, Luca Olivetti via fpc-pascal wrote: El 8/1/21 a les 11:14, Luca Olivetti via fpc-pascal ha escrit: El 8/1/21 a les 11:06, Michael Van Canneyt via fpc-pascal ha escrit: Are you using https ? No, plain text http. An even weirder fact is that I seem to get the wrong ip

Re: [fpc-pascal] TCustomStream still using LongInt and not Int64

2020-12-27 Thread Michael Van Canneyt via fpc-pascal
On Sun, 27 Dec 2020, Graeme Geldenhuys via fpc-pascal wrote: Hi, Is this a bug in FPC 3.2.0 where TCustomStream still uses LongInt in the Read() method, where all other methods in in the class uses Int64 type? Here is the FPC code: TCustomMemoryStream = class(TStream) private FMemory:

Re: [fpc-pascal] netdb, TCP, and DNS queries

2020-12-06 Thread Michael Van Canneyt via fpc-pascal
On Sun, 6 Dec 2020, Noel Duffy via fpc-pascal wrote: Hi all, Following up on the work I've being doing to add support for DNS queries over TCP to netdb and to add support for querying all of the standard resource types such as MX, SOA, TXT, NS, etc, I've added the proposed changes to a

Re: [fpc-pascal] netdb, TCP, and DNS queries

2020-12-06 Thread Michael Van Canneyt via fpc-pascal
On Mon, 7 Dec 2020, Noel Duffy via fpc-pascal wrote: On 7/12/20 12:41 am, Michael Van Canneyt via fpc-pascal wrote: On Sun, 6 Dec 2020, Noel Duffy via fpc-pascal wrote: Hi all, Following up on the work I've being doing to add support for DNS queries over TCP to netdb and to add support

[fpc-pascal] Daily docs

2020-11-28 Thread Michael Van Canneyt via fpc-pascal
Hello, I finally decided to tackle something which was on my TODO list for many years. From now on we generate daily documentation updates. They are accessible from this page: https://www.freepascal.org/daily/daily.html This is not only the FPC documentation as generated from the sources,

Re: [fpc-pascal] Initialization of constant record member of pointer type

2020-12-01 Thread Michael Van Canneyt via fpc-pascal
On Mon, 30 Nov 2020, Sven Barth via fpc-pascal wrote: Am 30.11.2020 um 13:20 schrieb LacaK via fpc-pascal: Hi, is there a way how to initialize record member of pointer type (other than PChar) in the following example: type   TMyRec=record     a: PByte; // if I change PByte to PAnsiChar

Re: [fpc-pascal] How to get the current translation of a resource string?

2020-12-02 Thread Michael Van Canneyt via fpc-pascal
On Tue, 1 Dec 2020, Luca Olivetti via fpc-pascal wrote: Since I want to treat a specific exception that cannot be distinguished by the class alone but only by the class and message, I need to find the current translation of the resource string used to create the exception. The

Re: [fpc-pascal] Initialization of constant record member of pointer type

2020-12-01 Thread Michael Van Canneyt via fpc-pascal
On Tue, 1 Dec 2020, Ladislav Karrach via fpc-pascal wrote: Because MyConst1 is not an *untyped* constant. Only untyped constants can be used in constant expressions (a pointer to something can be considered an untyped constant). The following might work though I did not test it: ===

Re: [fpc-pascal] How to get the current translation of a resource string?

2020-12-02 Thread Michael Van Canneyt via fpc-pascal
On Wed, 2 Dec 2020, Mattias Gaertner via fpc-pascal wrote: On Wed, 2 Dec 2020 13:30:13 +0100 (CET) Michael Van Canneyt via fpc-pascal wrote: On Wed, 2 Dec 2020, Luca Olivetti via fpc-pascal wrote: [...] > but it doesn't work (sCannotFocus holds the original, not the > translated,

Re: [fpc-pascal] How to get the current translation of a resource string?

2020-12-02 Thread Michael Van Canneyt via fpc-pascal
On Wed, 2 Dec 2020, Luca Olivetti via fpc-pascal wrote: But the 'current translation' is simply the value of the resourcestring, so you should not need to look it up ? How? I'm trying to detect this specific exception raise EInvalidOperation.Create(sCannotFocus); (where

Re: [fpc-pascal] FCL-DB Classes Implementation.

2020-12-22 Thread Michael Van Canneyt via fpc-pascal
Unfortunately not, I have sidetracked that project for the time being: I accidentally reformatted the USB stick with the sources, and since the need was no longer there for me I didn't have the courage to restart it :/ Sorry about that :( Michhael On Tue, 22 Dec 2020, Kakoulidis Ioulianos

Re: [fpc-pascal] fppdf textwidth

2020-11-09 Thread Michael Van Canneyt via fpc-pascal
On Mon, 9 Nov 2020, Mattias Gaertner via fpc-pascal wrote: Hi all, This has probably been asked before but I can't find the answer. How to get the text width of a string? I see code for the standard pdf fonts, but all these functions are private. The PDF classes do not support

Re: [fpc-pascal] I'm working on automated Help Output for console apps

2020-11-19 Thread Michael Van Canneyt via fpc-pascal
On Fri, 20 Nov 2020, Sven Barth via fpc-pascal wrote: Graeme Geldenhuys via fpc-pascal schrieb am Fr., 20. Nov. 2020, 01:33: For those console programmers out there... Is there anything in console help output that you like or wish you had. That way I could possibly add it and make this

Re: [fpc-pascal] Compilation speed on Apple M1

2020-11-22 Thread Michael Van Canneyt via fpc-pascal
On Sun, 22 Nov 2020, Florian Klämpfl via fpc-pascal wrote: Am 21.11.2020 um 12:54 schrieb Tobias Giesen via fpc-pascal: Hello, first and foremost, many thanks to the creators and contributors of FPC and Lazarus, who enabled me to release my product natively for Apple Silicon only one day

Re: [fpc-pascal] FPC 3.2fixes UTF8Decode strange place

2020-10-29 Thread Michael Van Canneyt via fpc-pascal
On Thu, 29 Oct 2020, AlexeyT via fpc-pascal wrote:  So can you COMMENT that dead part with "and FALSE" and dead part II with "if ... =#10"? It will make things faster for people! It will make things faster for people as well if you point at the right unit or mail on the right mailing list.

Re: [fpc-pascal] fcl-web: Trequest.RemoteAddr is empty (sometimes)

2021-01-08 Thread Michael Van Canneyt via fpc-pascal
On Fri, 8 Jan 2021, Luca Olivetti via fpc-pascal wrote: El 7/1/21 a les 16:59, Luca Olivetti via fpc-pascal ha escrit: El 7/1/21 a les 16:15, Luca Olivetti via fpc-pascal ha escrit: Hello, I need to tailor the content based on the remote ip address. I use the property RemoteAddr of a

Re: [fpc-pascal] FPDoc now with Markdown support

2021-01-04 Thread Michael Van Canneyt via fpc-pascal
On Mon, 4 Jan 2021, Bo Berglund via fpc-pascal wrote: On Sat, 2 Jan 2021 15:31:11 +0100 (CET), Michael Van Canneyt via fpc-pascal wrote: Hello ! I didn't make it quite in time for the new year, but still: The fpdoc engine (what is used to document the FPC & Lazarus units) is

Re: [fpc-pascal] bug or feature

2021-01-01 Thread Michael Van Canneyt via fpc-pascal
On Fri, 1 Jan 2021, Mattias Gaertner via fpc-pascal wrote: Hi, library test; procedure Test; begin end; exports Test name 3 'abc'; //^^^ end. I think this is a bug. Delphi also barfs on it. However the following does work: exports Test index 1 name 'abc'; Although

[fpc-pascal] FPDoc now with Markdown support

2021-01-02 Thread Michael Van Canneyt via fpc-pascal
Hello ! I didn't make it quite in time for the new year, but still: The fpdoc engine (what is used to document the FPC & Lazarus units) is now capable of outputting the documentation in markdown. This can be used as input for mkdocs or another engine such as sphinx. As a first engine, I

Re: [fpc-pascal] FPDoc now with Markdown support

2021-01-02 Thread Michael Van Canneyt via fpc-pascal
On Sat, 2 Jan 2021, Marco van de Voort via fpc-pascal wrote: Op 2021-01-02 om 15:31 schreef Michael Van Canneyt via fpc-pascal: Hello ! I didn't make it quite in time for the new year, but still: The fpdoc engine (what is used to document the FPC & Lazarus units) is now cap

Re: [fpc-pascal] Patches for Issue #37906 - DNS over TCP

2021-01-30 Thread Michael Van Canneyt via fpc-pascal
On Sat, 30 Jan 2021, Noel Duffy via fpc-pascal wrote: I've added patches to resolve issue #37906, DNS over TCP, to the bug tracker: https://bugs.freepascal.org/view.php?id=37906 I've broken the changes into three patches: 1. netdb.patch, which updates packages/fcl-net/src/netdb.pp, adding

Re: [fpc-pascal] Patches for Issue #37906 - DNS over TCP

2021-01-30 Thread Michael Van Canneyt via fpc-pascal
On Sat, 30 Jan 2021, Noel Duffy via fpc-pascal wrote: On 30/01/21 9:45 pm, Michael Van Canneyt via fpc-pascal wrote: On Sat, 30 Jan 2021, Noel Duffy via fpc-pascal wrote: I've added patches to resolve issue #37906, DNS over TCP, to the bug tracker: https://bugs.freepascal.org/view.php

Re: [fpc-pascal] Patches for Issue #37906 - DNS over TCP

2021-01-30 Thread Michael Van Canneyt via fpc-pascal
On Sat, 30 Jan 2021, Sven Barth via fpc-pascal wrote: In addition to new code for DNS over TCP, this latest set of patches adds checks for writes beyond buffer boundaries and other potential security issues. Since the last update I've also added support for SRV records, as defined in RFC

Re: [fpc-pascal] TMemoryStream.SetSize question.

2021-06-14 Thread Michael Van Canneyt via fpc-pascal
On Mon, 14 Jun 2021, gabor via fpc-pascal wrote: Why does TMemoryStream only implement one version of SetSize method? https://svn.freepascal.org/cgi-bin/viewvc.cgi/trunk/rtl/objpas/classes/classesh.inc?revision=49038=markup#l1225 The TStream class has two versions of SetSize method

Re: [fpc-pascal] Will the size of an executable depend on the uses clause

2021-06-16 Thread Michael Van Canneyt via fpc-pascal
On Wed, 16 Jun 2021, Tomas Hajny via fpc-pascal wrote: On 2021-06-16 11:38, Marco van de Voort via fpc-pascal wrote: Op 2021-06-16 om 11:21 schreef Tomas Hajny via fpc-pascal:  Or if they contain $R inclusions. ...or many other things which may not be smartlinked, either because it is not

Re: [fpc-pascal] Will the size of an executable depend on the uses clause

2021-06-16 Thread Michael Van Canneyt via fpc-pascal
On Wed, 16 Jun 2021, Bo Berglund via fpc-pascal wrote: I had to add SysUtils to make it work but Lazarus put Classes in there by itself. Since the final binary size after using strip -s on the exe file is 271 kb it seems a bit big! Or is there a lot behind the scenes I have missed? I see

Re: [fpc-pascal] TMemoryStream.SetSize question.

2021-06-14 Thread Michael Van Canneyt via fpc-pascal
On Mon, 14 Jun 2021, gabor via fpc-pascal wrote: W dniu 2021-06-14 o 21:27, Michael Van Canneyt via fpc-pascal pisze: On Mon, 14 Jun 2021, gabor via fpc-pascal wrote: Why does TMemoryStream only implement one version of SetSize method? https://svn.freepascal.org/cgi-bin/viewvc.cgi

[fpc-pascal] Push rules

2021-06-22 Thread Michael Van Canneyt via fpc-pascal
Hello, Martin asked how we intend to go about git commit authors/emails. These can of course be manipulated at will in Git. But gitlab can place some restrictions on what is pushed to the repo: https://docs.gitlab.com/ee/push_rules/push_rules.html From what I understood, the lazarus team is

[fpc-pascal] FPC & Lazarus moving to gitlab

2021-06-22 Thread Michael Van Canneyt via fpc-pascal
Hello All, The Free Pascal and Lazarus teams are in the process of switching to Gitlab to manage their source code and issue reports. In order to lower maintenance of their own infrastructure, a hosted solution has been chosen, and an open source license was granted to the teams. You can

Re: [fpc-pascal] Dependency of OpenSSL 1.0.2 still in FPC 3.2.0 on some platforms?

2021-05-12 Thread Michael Van Canneyt via fpc-pascal
On Tue, 11 May 2021, Bo Berglund via fpc-pascal wrote: On Mon, 10 May 2021 09:24:37 - (UTC), Virgo Pärna via fpc-pascal wrote: On Mon, 10 May 2021 10:08:53 +0200 (CEST), Michael Van Canneyt via fpc-pascal wrote: That's it. From your story, it seems you just need to set

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

2021-05-18 Thread Michael Van Canneyt via fpc-pascal
On Tue, 18 May 2021, Graeme Geldenhuys via fpc-pascal wrote: On 17/05/2021 3:13 pm, Karoly Balogh via fpc-pascal wrote: I'd actually keep FTP enabled, as it doesn't hurt anything and it's still a thing for retro downloads. Not just "retro" but a more efficient and faster protocol for file

Re: [fpc-pascal] Dependency of OpenSSL 1.0.2 still in FPC 3.2.0 on some platforms?

2021-05-10 Thread Michael Van Canneyt via fpc-pascal
On Mon, 10 May 2021, Bo Berglund via fpc-pascal wrote: I have now installed Synapse 40.1 in LKazarus 2.0.12 with Fpc 3.2.0 I use it myself in a headless FPC-created server running on linux, since many many years, and use it in a Delphi-created server also running on linux, so I'm very

Re: [fpc-pascal] Dependency of OpenSSL 1.0.2 still in FPC 3.2.0 on some platforms?

2021-05-10 Thread Michael Van Canneyt via fpc-pascal
On Mon, 10 May 2021, Bo Berglund via fpc-pascal wrote: Not so simple when you read scores of Internet pages on the subject... 99% of what is written on internet is junk or outdated. OK, maybe it's only 98%. Check the synapse sources, that's all you need. The handling of attachments is

Re: [fpc-pascal] Dependency of OpenSSL 1.0.2 still in FPC 3.2.0 on some platforms?

2021-05-05 Thread Michael Van Canneyt via fpc-pascal
On Wed, 5 May 2021, Bo Berglund via fpc-pascal wrote: On Wed, 5 May 2021 16:51:06 +0200 (CEST), Michael Van Canneyt via fpc-pascal wrote: On Wed, 5 May 2021, Nico Neumann via fpc-pascal wrote: Indy has support for OpenSSL 1.1.1, just not officially (yet). See https://github.com

Re: [fpc-pascal] Dependency of OpenSSL 1.0.2 still in FPC 3.2.0 on some platforms?

2021-05-06 Thread Michael Van Canneyt via fpc-pascal
On Thu, 6 May 2021, Bo Berglund via fpc-pascal wrote: I highly recommend Synapse over Indy. I had great troubles a year or so ago when I tried using some serial packages based on synapse because they brought in GUI stuff that made it impossible to compile a simple program aimed at running

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

2021-05-17 Thread Michael Van Canneyt via fpc-pascal
Hello, Mattias Gaertner pointed out that Chrome no longer supports FTP downloads. I know that Firefox will follow suit really soon (if they haven't already). Since Edge now also uses Chromium, they will soon also have this disabled. This wil surely cause problems for many users. So I think

Re: [fpc-pascal] Dependency of OpenSSL 1.0.2 still in FPC 3.2.0 on some platforms?

2021-05-15 Thread Michael Van Canneyt via fpc-pascal
On Sat, 15 May 2021, Bo Berglund via fpc-pascal wrote: It is not a size problem, the test mail contains just a very small zipfile sample (5 kb in size). And the mail is not in the spam folder either, it is simply silently rejected by GMail... No error message. It turns out that GMail

  1   2   3   4   5   >