[fpc-pascal] Re: LGPL rtl

2011-12-25 Thread noreply
I wrote
>
> If you statically link the lgpl code into your EXE, your exe is the module
> under lgpl now. Therefore all code must be released. Statically linked
> lgpl code in an exe is not a dll that can be shipped separately.

Nevermind, I see this has been discussed:

http://free-pascal-general.1045716.n5.nabble.com/Name-for-our-license-td2823357.html

Essentially, freepascal RTL is not LGPL, it's a new modified LGPL.



___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] LGPL rtl

2011-12-25 Thread Mark Morgan Lloyd

nore...@z505.com wrote:

I think all freepascal people have a misunderstanding of LGPL.

If you statically link the lgpl code into your EXE, your exe is the module
under lgpl now. Therefore all code must be released. Statically linked
lgpl code in an exe is not a dll that can be shipped separately.


On what do you base this understanding? Mine is that what you're saying 
applies to GPL, but not to LGPL.


--
Mark Morgan Lloyd
markMLl .AT. telemetry.co .DOT. uk

[Opinions above are the author's, not those of his employers or colleagues]
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] Re: LGPL rtl

2011-12-25 Thread ik
On Sun, Dec 25, 2011 at 10:09,  wrote:

> I wrote
> >
> > If you statically link the lgpl code into your EXE, your exe is the
> module
> > under lgpl now. Therefore all code must be released. Statically linked
> > lgpl code in an exe is not a dll that can be shipped separately.
>
> Nevermind, I see this has been discussed:
>
>
> http://free-pascal-general.1045716.n5.nabble.com/Name-for-our-license-td2823357.html
>
> Essentially, freepascal RTL is not LGPL, it's a new modified LGPL.
>

Even without the modified LGPL, you are wrong afaik. LGPL is about keeping
the original code open, while allow you to do commercial work without
releasing your own source. GPL is all about viral licensing. AFAIK the
modified LGPL, claims that there will be no request at all to release such
sources at any point


>
>
>
> ___
> fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
> http://lists.freepascal.org/mailman/listinfo/fpc-pascal
>
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Re: LGPL rtl

2011-12-25 Thread Martin Schreiber
On 12/25/2011 09:22 AM, ik wrote:
> 
> Even without the modified LGPL, you are wrong afaik. LGPL is about keeping
> the original code open, while allow you to do commercial work without
> releasing your own source. GPL is all about viral licensing. AFAIK the
> modified LGPL, claims that there will be no request at all to release such
> sources at any point
> 
AFAIK LGPL requires that your application can be linked with a newer or
modified version of the LGPL library by the end user so you must
distribute the object files of your application as Lars writes.

Martin
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


[fpc-pascal] iptables rules unit for FPC

2011-12-25 Thread ik
Hello,

Have anyone know of any open source iptables based rule generators written
in FPC or any other Pascal compiler ?

Thanks and marry Christmastime/Hanukkah ,
Ido
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal

[fpc-pascal] Re: iptables rules unit for FPC

2011-12-25 Thread ik
Here is my work on going work for it:
https://github.com/ik5/iptables.fpc

I'm trying to add both libiptc and libxtables as binding.
They allow to query and create rules in your source code, for IPTables
(netfilter) while you are in userspace.

I hope more people will find it useful

Ido


On Sun, Dec 25, 2011 at 13:48, ik  wrote:
> Hello,
>
> Have anyone know of any open source iptables based rule generators written
> in FPC or any other Pascal compiler ?
>
> Thanks and marry Christmastime/Hanukkah ,
> Ido
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal

[fpc-pascal] Map of values to array of records

2011-12-25 Thread Jiří Pavlovský

Hello,

how can I create two level map where value is array of  records? These  
records are constant - I don't need to compute them or anything.
I'm quite new to pascal and for gods sake cannot figure it out. I tried 
to use TFPGMap for that.


I mean somewhere in the code I get two values and based on these I need 
to get those records.


my dream would be something like
myArrayOfRecords := myMap[some_value][other_value];


I even tried to write a function that would return array of records 
based on its parameters, but that does not work either.

I cannot figure out how to assign the record.

This causes a compile error:
res[0] := (Field: 1; Empty: true; Check: false);


OTOH similar construct works in "const" section. So I'm quite puzzled.


Thank you
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] Map of values to array of records

2011-12-25 Thread ik
2011/12/25 Jiří Pavlovský 

> Hello,
>
> how can I create two level map where value is array of  records? These
>  records are constant - I don't need to compute them or anything.
> I'm quite new to pascal and for gods sake cannot figure it out. I tried to
> use TFPGMap for that.
>
> I mean somewhere in the code I get two values and based on these I need to
> get those records.
>
> my dream would be something like
> myArrayOfRecords := myMap[some_value][other_value]**;
>

type
   TMyRec = record
 Field   : integer;
 Empty,
Check : Boolean;
   end;

 TMyMap = array[0..Something] of TMyRec;


>
>
> I even tried to write a function that would return array of records based
> on its parameters, but that does not work either.
> I cannot figure out how to assign the record.
>
> This causes a compile error:
> res[0] := (Field: 1; Empty: true; Check: false);
>

 res[0].Field := 1;
 res[0].Empty := true;
 res[0].Check := false;

if you want to make it as a function:

function ToMyRec (AField : Integer; AEmpty, ACheck : Boolean) : TMyRec;
begin
   Result.Field := AFiled;
   Result.Empty :=  AEmpty;
   Result.Check := AChek;
end;

res[0] := ToMyRec(...);


>
>
> OTOH similar construct works in "const" section. So I'm quite puzzled.
>

What do you mean ?


>
>
> Thank you
> __**_
> fpc-pascal maillist  -  
> fpc-pascal@lists.freepascal.**org
> http://lists.freepascal.org/**mailman/listinfo/fpc-pascal
>
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Map of values to array of records

2011-12-25 Thread Jiří Pavlovský

On 25.12.2011 22:53, ik wrote:

2011/12/25 Jiří Pavlovský mailto:j...@getnet.cz>>

Hello,

how can I create two level map where value is array of  records?
These  records are constant - I don't need to compute them or
anything.
I'm quite new to pascal and for gods sake cannot figure it out. I
tried to use TFPGMap for that.

I mean somewhere in the code I get two values and based on these I
need to get those records.

my dream would be something like
myArrayOfRecords := myMap[some_value][other_value];


type
   TMyRec = record
 Field   : integer;
 Empty,
Check : Boolean;
   end;

 TMyMap = array[0..Something] of TMyRec;


Thanks, but that is not want I need.
I don't want array, but a two level map where keys are not necessarily 
integers.








OTOH similar construct works in "const" section. So I'm quite puzzled.


What do you mean ?
I mean the code below works ok, so I don't undestand why it doesn't 
compile when I use similar construct inside a function.

const ranges: array [1..2] of TMyRec =
 (
 (Start:0;Stop:3),
 (Start:4;Stop:7)
   );

___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal