Re: [fpc-pascal] Return value of StrToHostAddr and StrToHostAddr6 in sockets unit

2020-05-12 Thread Marc Weustink via fpc-pascal
On 12-5-2020 14:56, Marco van de Voort wrote: Op 2020-05-12 om 12:32 schreef Michael Van Canneyt: The names I use here are the libc names, which many other languages also use. Now, StrToHostAddr and StrToHostAddr6 can call the appropriate function, and programs that use those functions w

Re: [fpc-pascal] Return value of StrToHostAddr and StrToHostAddr6 in sockets unit

2020-05-12 Thread Christo Crause via fpc-pascal
On Tue, May 12, 2020 at 11:11 PM Noel Duffy via fpc-pascal < fpc-pascal@lists.freepascal.org> wrote: > Sure, I can do that. I will look at creating a patch for this. For your > purposes, do you prefer to have a new bug in the bug tracker opened for > tracking this change? > If your patch is relat

Re: [fpc-pascal] Code tools and changing include file text

2020-05-12 Thread Mattias Gaertner via fpc-pascal
On Wed, 13 May 2020 10:48:14 +0700 Ryan Joseph via fpc-pascal wrote: > When a file changes I get the full source text and update the version > in code tools by doing this: > > Code := CodeToolBoss.FindFile(Path); > Code.Source := text; > > This works but I'm having problems with include files n

Re: [fpc-pascal] Code tools search paths

2020-05-12 Thread Mattias Gaertner via fpc-pascal
On Wed, 13 May 2020 10:45:21 +0700 Ryan Joseph via fpc-pascal wrote: > > On May 11, 2020, at 8:02 PM, Ryan Joseph > > wrote: > > > > I wanted this to behave like the compiler normally does, that is > > you supply paths to the units with -Fu and includes with -Fi. What > > is the way to achieve

[fpc-pascal] Code tools and changing include file text

2020-05-12 Thread Ryan Joseph via fpc-pascal
When a file changes I get the full source text and update the version in code tools by doing this: Code := CodeToolBoss.FindFile(Path); Code.Source := text; This works but I'm having problems with include files now because I'm updating the code buffer for the include file but the main code does

Re: [fpc-pascal] Code tools search paths

2020-05-12 Thread Ryan Joseph via fpc-pascal
> On May 11, 2020, at 8:02 PM, Ryan Joseph wrote: > > I wanted this to behave like the compiler normally does, that is you supply > paths to the units with -Fu and includes with -Fi. What is the way to achieve > that here? > > For example in my test project I have the directory that contains

Re: [fpc-pascal] Return value of StrToHostAddr and StrToHostAddr6 in sockets unit

2020-05-12 Thread Noel Duffy via fpc-pascal
On 12/05/20 10:32 pm, Michael Van Canneyt wrote:> On Tue, 12 May 2020, Noel Duffy via fpc-pascal wrote: A simple solution is to add functions to the sockets unit which accep a var record into which the output will be written and which return a boolean to indicate success or failure. E.g, f

Re: [fpc-pascal] Return value of StrToHostAddr and StrToHostAddr6 in sockets unit

2020-05-12 Thread Noel Duffy via fpc-pascal
On 13/05/20 12:56 am, Marco van de Voort wrote: Op 2020-05-12 om 12:32 schreef Michael Van Canneyt: The names I use here are the libc names, which many other languages also use. Now, StrToHostAddr and StrToHostAddr6 can call the appropriate function, and programs that use those functions w

Re: [fpc-pascal] Return value of StrToHostAddr and StrToHostAddr6 in sockets unit

2020-05-12 Thread Marco van de Voort
Op 2020-05-12 om 12:32 schreef Michael Van Canneyt: The names I use here are the libc names, which many other languages also use. Now, StrToHostAddr and StrToHostAddr6 can call the appropriate function, and programs that use those functions won't notice any change. But new code will be abl

Re: [fpc-pascal] Return value of StrToHostAddr and StrToHostAddr6 in sockets unit

2020-05-12 Thread Michael Van Canneyt
On Tue, 12 May 2020, Noel Duffy via fpc-pascal wrote: While working with StrToHostAddr and StrToHostAddr6 over the past couple of weeks I've run into issues caused by the functions returning all zero addresses to indicate errors. All-zero addresses are technically valid according to the RFCs

[fpc-pascal] Return value of StrToHostAddr and StrToHostAddr6 in sockets unit

2020-05-12 Thread Noel Duffy via fpc-pascal
While working with StrToHostAddr and StrToHostAddr6 over the past couple of weeks I've run into issues caused by the functions returning all zero addresses to indicate errors. All-zero addresses are technically valid according to the RFCs, so an all-zero address shouldn't be used as an error se

Re: [fpc-pascal] Bugs in StrToHostAddr6 in sockets unit

2020-05-12 Thread Noel Duffy via fpc-pascal
I've submitted a test program and proposed patch to fix the IPv6 parsing issues with StrToHostAddr6. https://bugs.freepascal.org/view.php?id=37013 Because I only checked out the packages and rtl directories from Subversion, my patch's root directory is packages. I hope this isn't a problem, b

Re: [fpc-pascal] Different behaviour between FPC 2.6.4 and FPC 3.0.4

2020-05-12 Thread Sven Barth via fpc-pascal
Virgo Pärna via fpc-pascal schrieb am Di., 12. Mai 2020, 08:27: > On Tue, 05 May 2020 23:03:33 +0200, Rainer Stratmann < > rainerstratm...@t-online.de> wrote: > > > > But that worked a long time (2 years or so) with FPC 2.6.4 > > > > May FPC 2.6.4 was configured to default to delphi or tp