Re: [fpc-pascal] CThreads for linked C library?

2012-10-01 Thread Bernd
2012/10/1 Johann Glaser : > Is it necessary to have the unit "CThreads" in my Uses clause? No, only if you use threads in your pascal code. ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pasc

Re: [fpc-pascal] Editing XMP data in images

2012-10-01 Thread luiz americo pereira camara
2012/10/1 Mattias Gaertner > Hi, > > I need to edit XMP data in images (at least tif, jpg). > > Maybe someone has already done it and can give me a hint? > This? https://delphihaven.wordpress.com/ccr-exif/ Luiz ___ fpc-pascal maillist - fpc-pascal@

Re: [fpc-pascal] Editing XMP data in images

2012-10-01 Thread Bernd
2012/10/1 Mattias Gaertner : > Hi, > > I need to edit XMP data in images (at least tif, jpg). If you need some quick and dirty solution then I have something here that will one day become part of an application to tag and organize jpeg images from digital cameras. It will start a separate exiftool

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

2012-10-01 Thread Johann Glaser
Hi! Am Sonntag, den 30.09.2012, 22:57 +0200 schrieb Christo: > On Tue, 2012-09-25 at 22:32 +0200, Johann Glaser wrote: > > > I only have access to Linux and don't know anything about Windows > > development. So, I ask you (and anybody else) on the best and cleanest > > way to make libusb.pas work

[fpc-pascal] CThreads for linked C library?

2012-10-01 Thread Johann Glaser
Hi! libusb(x) links to libpthread: $ ldd /lib/x86_64-linux-gnu/libusb-1.0.so.0 linux-vdso.so.1 => librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1 libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 /lib64/ld

Re: [fpc-pascal] Editing XMP data in images

2012-10-01 Thread Giuliano Colla
Il 01/10/2012 20:00, Mattias Gaertner ha scritto: I need to edit XMP data in images (at least tif, jpg). This can help? http://en.wikipedia.org/wiki/Extensible_Metadata_Platform#XMP_support_and_acceptance Giuliano ___ fpc-pascal maillist - fpc-pa

[fpc-pascal] Help translate .SAVENV x86-64 assembly directive

2012-10-01 Thread luiz americo pereira camara
Hi, I'm translating porting a Delphi component that uses x86-64 assembly. So far, most of the asm code compiles and works fine. The only thing that i could not translate is the .SAVENV directive. See http://blogs.embarcadero.com/abauer/2011/10/10/38940 and http://docwiki.embarcadero.com/RADStudi

[fpc-pascal] Editing XMP data in images

2012-10-01 Thread Mattias Gaertner
Hi, I need to edit XMP data in images (at least tif, jpg). Maybe someone has already done it and can give me a hint? Mattias ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal

[fpc-pascal] Re: using macros

2012-10-01 Thread leledumbo
If you want to port the code to clean Pascal, I suggest using related language feature, e.g. dynamic array. You can't really port that macro (even to a procedure / function), as the first parameter expected is a type name. If malloc returns Pointer, it doesn't need to be casted, the value is compat

[fpc-pascal] Re: using macros

2012-10-01 Thread Lukasz Sokol
On 01/10/2012 15:21, dhkblas...@zeelandnet.nl wrote: > I need to translate this: > #define mymalloc(x,y) (x*)malloc((y)* sizeof(x)) > > Is it possible using macro's in FPC or do I need to convert it to a > procedure? How would I cast the pointer in the latter case (without > having to change the

[fpc-pascal] using macros

2012-10-01 Thread dhkblaszyk
I need to translate this: #define mymalloc(x,y) (x*)malloc((y)* sizeof(x)) Is it possible using macro's in FPC or do I need to convert it to a procedure? How would I cast the pointer in the latter case (without having to change the sourcecode significantly)? Regards, Darius _

Re: [fpc-pascal] Re: Assigning pointer address

2012-10-01 Thread michael . vancanneyt
On Mon, 1 Oct 2012, Tomas Hajny wrote: IIUC, size PtrUint varies by architecture, which is more or less the point of PtrUint. Having this variation documented as Darius suggested above makes things much clearer, because the programmer may be working on one platform and programming for another

Re: [fpc-pascal] Re: Assigning pointer address

2012-10-01 Thread Tomas Hajny
On Mon, October 1, 2012 14:14, michael.vancann...@wisa.be wrote: > On Mon, 1 Oct 2012, Reinier Olislagers wrote: >> On 1-10-2012 13:55, dhkblaszyk-47ckw973qwsgtviba+r...@public.gmane.org >> wrote: >>> On 1 okt '12, michael.vancanneyt-0is9kj9s...@public.gmane.org wrote: On Mon, 1 Oct 2012, dhkb

Re: [fpc-pascal] Re: Assigning pointer address

2012-10-01 Thread michael . vancanneyt
On Mon, 1 Oct 2012, dhkblas...@zeelandnet.nl wrote: fpc-pascal maillist - fpc-pascal@lists.freepascal.org [5] http://lists.freepascal.org/mailman/listinfo/fpc-pascal [6] Nah, I wasn't thinking about letting fpdoc predict anything. Instead though it would be nice to introduce something th

Re: [fpc-pascal] Re: Assigning pointer address

2012-10-01 Thread dhkblaszyk
On 1 okt '12, Reinier Olislagers wrote: > On 1-10-2012 13:55, dhkblaszyk-47ckw973qwsgtviba+r...@public.gmane.org [4]wrote: > >> On 1 okt '12, michael.vancanneyt-0is9kj9s...@public.gmane.org [3]wrote: >> >>> On Mon, 1 Oct 2012, dhkblas...@zeelandnet.nl [2]dhkblaszyk-47ckw973qwsgtviba+r...@p

Re: [fpc-pascal] Re: Assigning pointer address

2012-10-01 Thread michael . vancanneyt
On Mon, 1 Oct 2012, Reinier Olislagers wrote: On 1-10-2012 13:55, dhkblaszyk-47ckw973qwsgtviba+r...@public.gmane.org wrote: On 1 okt '12, michael.vancanneyt-0is9kj9s...@public.gmane.org wrote: On Mon, 1 Oct 2012, dhkblas...@zeelandnet.nl

[fpc-pascal] Re: Assigning pointer address

2012-10-01 Thread Reinier Olislagers
On 1-10-2012 13:55, dhkblaszyk-47ckw973qwsgtviba+r...@public.gmane.org wrote: > On 1 okt '12, michael.vancanneyt-0is9kj9s...@public.gmane.org wrote: > >> On Mon, 1 Oct 2012, dhkblas...@zeelandnet.nl >> wrote: >>> Hi Tomas, Thanks for clar

Re: [fpc-pascal] Assigning pointer address

2012-10-01 Thread dhkblaszyk
On 1 okt '12, michael.vancann...@wisa.be wrote: > On Mon, 1 Oct 2012, dhkblas...@zeelandnet.nl [2]wrote: > >> Hi Tomas, Thanks for clarifying. I will use PtrUInt to store the pointer address in. BTW: the documentation it says not to use PtrInt because it's signed and therefore smaller than a

Re: [fpc-pascal] Assigning pointer address

2012-10-01 Thread michael . vancanneyt
On Mon, 1 Oct 2012, dhkblas...@zeelandnet.nl wrote: Hi Tomas, Thanks for clarifying. I will use PtrUInt to store the pointer address in. BTW: the documentation it says not to use PtrInt because it's signed and therefore smaller than a pointer (as in max value). Also there seems to be an er

Re: [fpc-pascal] Assigning pointer address

2012-10-01 Thread dhkblaszyk
Hi Tomas, Thanks for clarifying. I will use PtrUInt to store the pointer address in. BTW: the documentation it says not to use PtrInt because it's signed and therefore smaller than a pointer (as in max value). Also there seems to be an error in the documentation. On http://www.freepascal.or

Re: [fpc-pascal] Assigning pointer address

2012-10-01 Thread Tomas Hajny
On Mon, October 1, 2012 10:43, dhkblas...@zeelandnet.nl wrote: Hi, > I want to ask if casting an integer to a pointer is valid > over all platforms. See below: > > p: PInteger; > v: longint; > > [...] > > v := > 4235423; > > p := PInteger(v); > > Of course, the value of the pointer > adress may