Re: [fpc-pascal] fpc in symlinked directory

2014-03-27 Thread Michael Van Canneyt
On Wed, 26 Mar 2014, Mattias Gaertner wrote: On Wed, 26 Mar 2014 18:47:06 +0100 (CET) Michael Van Canneyt mich...@freepascal.org wrote: [...] The compiler does not do anything special: it determines its current working directory using the RTL, meaning it gets the resolved current working

Re: [fpc-pascal] fpc in symlinked directory

2014-03-27 Thread Mattias Gaertner
On Thu, 27 Mar 2014 08:16:11 +0100 (CET) Michael Van Canneyt mich...@freepascal.org wrote: [...] I described the situation from a user's pov. Somewhere it should be documented. I will do so. Thanks. BTW, is there already a RTL function to resolve a file name? fpReadLink ? Or

Re: [fpc-pascal] fpc in symlinked directory

2014-03-27 Thread Tomas Hajny
On Wed, March 26, 2014 23:52, Mattias Gaertner wrote: On Wed, 26 Mar 2014 23:19:57 +0100 Tomas Hajny xhaj...@hajny.biz wrote: On 26 Mar 14, at 23:05, Mattias Gaertner wrote: On Wed, 26 Mar 2014 18:47:06 +0100 (CET) Michael Van Canneyt mich...@freepascal.org wrote: [...] The compiler

Re: [fpc-pascal] fpc in symlinked directory

2014-03-27 Thread Marc Weustink
Michael Van Canneyt wrote: On Wed, 26 Mar 2014, Mattias Gaertner wrote: On Wed, 26 Mar 2014 15:33:38 +0100 (CET) Michael Van Canneyt mich...@freepascal.org wrote: [...] So ? You just need to check the inode. Is there a function to list all files pointing to an inode? Actually, you

Re: [fpc-pascal] fpc in symlinked directory

2014-03-27 Thread Michael Van Canneyt
On Wed, 26 Mar 2014, Marc Weustink wrote: Michael Van Canneyt wrote: On Wed, 26 Mar 2014, Mattias Gaertner wrote: On Wed, 26 Mar 2014 15:33:38 +0100 (CET) Michael Van Canneyt mich...@freepascal.org wrote: [...] So ? You just need to check the inode. Is there a function to list all

Re: [fpc-pascal] Free pascal candidate for project of the month

2014-03-27 Thread Reinier Olislagers
On 26/03/2014 21:44, Marco van de Voort wrote: Free Pascal is candidate for SF project of the month april, up against strong candidates as subversion for windows (the server, not tortoise) and smplayer. Note that you need a SF login to vote: Thanks for the heads up - done ;)

Re: [fpc-pascal] Free pascal candidate for project of the month

2014-03-27 Thread Lukasz Sokol
On 26/03/14 20:44, Marco van de Voort wrote: FYI: Free Pascal is candidate for SF project of the month april, up against strong candidates as subversion for windows (the server, not tortoise) and smplayer. Note that you need a SF login to vote:

Re: [fpc-pascal] Free pascal candidate for project of the month

2014-03-27 Thread Mark Morgan Lloyd
Marco van de Voort wrote: FYI: Free Pascal is candidate for SF project of the month april, up against strong candidates as subversion for windows (the server, not tortoise) and smplayer. That's a pretty strong field, but with no clear winner. I guess we should take that as a compliment.

[fpc-pascal] Access fpc libraries with Java ?

2014-03-27 Thread fredvs
Hello. I try to access fpc libraries with Java. I can access those libraries with: = Python without problems, even callback functions... = fpc programs, of course... But with Java i get trouble... I try with JNA : https://github.com/twall/jna But without luck. Does somebody already had access

Re: [fpc-pascal] Access fpc libraries with Java ?

2014-03-27 Thread hinstance
JNI is the way to go http://en.wikipedia.org/wiki/Java_Native_Interface JNI is a part of Java, so no other libraries are required to use it 27.03.2014, 19:11, fredvs fi...@hotmail.com: Hello. I try to access fpc libraries with Java. I can access those libraries with: = Python without

Re: [fpc-pascal] Free pascal candidate for project of the month

2014-03-27 Thread Dennis Poon
Mark Morgan Lloyd wrote: Marco van de Voort wrote: FYI: Free Pascal is candidate for SF project of the month april, up against strong candidates as subversion for windows (the server, not tortoise) and smplayer. That's a pretty strong field, but with no clear winner. I guess we should

Re: [fpc-pascal] Access fpc libraries with Java ?

2014-03-27 Thread leledumbo
fpcside: // fpclib.pas library fpclib; procedure test(env,jcls: pointer; i: longint); cdecl; begin writeln(i); end; exports test name 'Java_TestFPC_test'; end. java side: // TestFPC.java public class TestFPC { public static native void test(int i); public static void main(String[]

Re: [fpc-pascal] Access fpc libraries with Java ?

2014-03-27 Thread fredvs
Yep, yep, yep, ... tetra * mega thanks. Hum, i have very poor knowledge with Java. Of course i can do a Hello World and some other things. But now, because of some fpc libraries, i explore the import native library part of java. And, what surprise me, in Java forum, was that lot of Java

Re: [fpc-pascal] Access fpc libraries with Java ?

2014-03-27 Thread fredvs
Yep Leledumbo, this time you kill me. Your code is working PERFECTLY and trust me, even at StackOverflow.com, they do not know your trick, there are lot of questions for that without any working answer. Your GENIUS trick is to export name = Java_MyLib_MyProcedure. I do not know if that could be

[fpc-pascal] reference counting of multi-dimensional array

2014-03-27 Thread Xiangrong Fang
If I have this: var a2: array of array of Integer; i, j: Integer; begin SetLength(a2, 3); for i := 0 to 2 do begin SetLength(a[i], 3); for j := 0 to 2 do a[i][j] := 1; end; a2 := nil; -- will this free all memory of a[0]...a[2]? end; Thanks! Xiangrong