Re: [fpc-pascal] Basics of profiling -- some comments on fpprofiler bugs

2010-09-06 Thread leledumbo
Talking about profiler, I see that gprof support under Windows is still limited to cygwin's gprof (just take a look at those linklibs). I think I'll try adding support for MinGW's gprof just like I did with MinGW's GDB for FPIDE a couple of months ago (it's broken again with GDB 7.1). -- View thi

[fpc-pascal] Destroy vs Free: Memory Leak?

2010-09-06 Thread Brian Winfrey
I have a TestCase that has this issue.  If I call obj.Free, I am unable to step into the Destroy method and heaptrc indicates a memory leak.  If I call obj.Destroy everything works as expected.  Following the call to Free - ... if (obj <> nil) then obj.Destroy; it would seem that the object must be

Re: [fpc-pascal] SNAPI Driver and USB HID

2010-09-06 Thread Luca Olivetti
Al 06/09/10 22:28, En/na Johann Glaser ha escrit: Unfortunately, /dev/ttyUSB0 is not standardized but requires different drivers for every chip (e.g. cp2101, ft232, ...). For the MS4407 scanner I didn't yet find a serial driver. So, unfortunately, the RS232 emulation does not work too. :-( Tha

Re: [fpc-pascal] SNAPI Driver and USB HID

2010-09-06 Thread Johann Glaser
Hi Henry! Am Montag, den 06.09.2010, 22:44 +0100 schrieb Henry Vermaak: > On 6 September 2010 18:07, Johann Glaser wrote: > > Hi! > > > > I've bought a barcode scanner (Symbol MS4407) with an USB interface and > > want to use that with Linux. Unfortunately Motorola (who bought Symbol a > > few ye

Re: [fpc-pascal] SNAPI Driver and USB HID

2010-09-06 Thread Henry Vermaak
On 6 September 2010 18:07, Johann Glaser wrote: > Hi! > > I've bought a barcode scanner (Symbol MS4407) with an USB interface and > want to use that with Linux. Unfortunately Motorola (who bought Symbol a > few years ago) do not provide Linux drivers and also do not provide USB > protocol document

Re: [fpc-pascal] SNAPI Driver and USB HID

2010-09-06 Thread Johann Glaser
Hi Luca! > > As I'm not very confident that such a driver does exist, I've also > > evaluated the USB descriptors and such stuff. The scanner offers an USB > > HID class interface. > > From the manual I see that it also offers com port emulation. In that > case it should provide a serial interf

Re: [fpc-pascal] stdcall on win64?

2010-09-06 Thread Bihar Anwar
Thanks Florian. :-) - Original Message From: Florian Klämpfl To: FPC-Pascal users discussions Sent: Tue, September 7, 2010 2:01:31 AM Subject: Re: [fpc-pascal] stdcall on win64? Am 06.09.2010 18:27, schrieb Bihar Anwar: > stdcall calling convention is for Win32, right? E.g. > >

Re: [fpc-pascal] SNAPI Driver and USB HID

2010-09-06 Thread Luca Olivetti
Al 06/09/10 19:07, En/na Johann Glaser ha escrit: As I'm not very confident that such a driver does exist, I've also evaluated the USB descriptors and such stuff. The scanner offers an USB HID class interface. From the manual I see that it also offers com port emulation. In that case it shou

Re: [fpc-pascal] stdcall on win64?

2010-09-06 Thread Florian Klämpfl
Am 06.09.2010 18:27, schrieb Bihar Anwar: > stdcall calling convention is for Win32, right? E.g. > > function Test: HRESULT; {$IFDEF WIN32}stdcall;{$ENDIF} > > By using $IFDEF like that, will the code also work in Win64? Win64 ignores all calling conventions and uses only the calling convent

[fpc-pascal] SNAPI Driver and USB HID

2010-09-06 Thread Johann Glaser
Hi! I've bought a barcode scanner (Symbol MS4407) with an USB interface and want to use that with Linux. Unfortunately Motorola (who bought Symbol a few years ago) do not provide Linux drivers and also do not provide USB protocol documentation, even after some pushy support questions. For Windows

[fpc-pascal] stdcall on win64?

2010-09-06 Thread Bihar Anwar
stdcall calling convention is for Win32, right? E.g. function Test: HRESULT; {$IFDEF WIN32}stdcall;{$ENDIF} By using $IFDEF like that, will the code also work in Win64? Thanks in advance. ___ fpc-pascal maillist - fpc-pascal@lists.freep

Re: [fpc-pascal] Mac osx callback functions parameters: wrong values in 386 mode.

2010-09-06 Thread Jonas Maebe
On 06 Sep 2010, at 17:21, fpanas...@tiscali.it wrote: > Using control callback function with a control (a button) apparently > results in wrong > parameter values when compiling to 386 (values are correct compiling > to ppc). The default calling convention on non-i386 platforms is mostly the

[fpc-pascal] Mac osx callback functions parameters: wrong values in 386 mode.

2010-09-06 Thread fpanas...@tiscali.it
Using control callback function with a control (a button) apparently results in wrong parameter values when compiling to 386 (values are correct compiling to ppc). The attached case refers to a callback procedure myActionProc (lControlRef: ControlRef; PartCode: ControlPartCode) applied to a pu

[fpc-pascal] Mac OSX callback functions parameters: wrong values for 386 mode.

2010-09-06 Thread fpanas...@tiscali.it
Using control callback function with a control (a button) apparently results in wrong parameter values when compiling to 386 (values arecorrect compiling to ppc). The attached case refers to a callback procedure myActionProc (lControlRef: ControlRef; PartCode: ControlPartCode) applied to a pus

Re: [fpc-pascal] Basics of profiling -- some comments on fpprofiler bugs

2010-09-06 Thread Žilvinas Ledas
On 2010-09-06 15:48, Darius Blaszyk wrote: On Mon, 2010-09-06 at 13:01 +0200, Graeme Geldenhuys wrote: Recently I took a look at Darius's old project 'fpprofiler. Links below. It was over 2 years since anybody worked on it, and riddled with bugs. I fixed all memory leaks, added some improvemen

Re: [fpc-pascal] Compile ANSI unit as UTF8

2010-09-06 Thread Felipe Monteiro de Carvalho
In the Virtual Magnifying Glass I used the following solution: 1> All my strings come from a translations manager 2> When they are updated (because the user selected a different language for example) then I also added the following code: {$ifndef fpc} <<-- here convert all utf-8 strings to ansi

Re: [fpc-pascal] Compile ANSI unit as UTF8

2010-09-06 Thread Jonas Maebe
On 06 Sep 2010, at 15:30, Zaher Dirkey wrote: On Mon, Sep 6, 2010 at 11:16 AM, Jonas Maebe >wrote: The compiler itself can only convert from utf-8 and several ISO code pages into utf-16 at compile time (i.e., change string constants into widestring constants). If you want to convert them t

Re: [fpc-pascal] Compile ANSI unit as UTF8

2010-09-06 Thread Zaher Dirkey
On Mon, Sep 6, 2010 at 8:50 AM, ik wrote: > You can use {$codepage utf8} I think, but if you are using ISO8859-6 > (Arabic right ?) then I'm not sure that it will convert it, but rater treat > it as a UTF-8 > > Ido > > Yes it is Arabic in Windows Win1256, but {$codepage utf8} not worked, it is g

Re: [fpc-pascal] Compile ANSI unit as UTF8

2010-09-06 Thread Zaher Dirkey
On Mon, Sep 6, 2010 at 11:16 AM, Jonas Maebe wrote: > > On 06 Sep 2010, at 01:28, Zaher Dirkey wrote: > > I have unit with Ansi strings but i want to compile it as UTF-8 how to ask >> the compiler to convert it to utf8 before compile it? >> > > The compiler itself can only convert from utf-8 and

Re: [fpc-pascal] Basics of profiling

2010-09-06 Thread Darius Blaszyk
On Mon, 2010-09-06 at 13:01 +0200, Graeme Geldenhuys wrote: > Recently I took a look at Darius's old project 'fpprofiler. Links > below. It was over 2 years since anybody worked on it, and riddled > with bugs. I fixed all memory leaks, added some improvements, and used > the new fcl-passrc code in

Re: [fpc-pascal] FPC and ANSI C

2010-09-06 Thread Valdas Jankūnas
On 2010.09.05 21:08, Jonas Maebe wrote: My problem is that I always must synchronise values in both sources. So, I want that C compiler will read constants from FPC source, or FPC compiler read from C source, or both compilers reads from some custom file. Is this possible? How implement this?

Re: [fpc-pascal] Basics of profiling

2010-09-06 Thread Graeme Geldenhuys
On 6 September 2010 13:10, Jonas Maebe wrote: > > http://wiki.freepascal.org/Profiling Thanks for the link. It seems I need to add information about 'fpprofiler' to that page too. -- Regards,   - Graeme - ___ fpGUI - a cross-platform Free Pascal GU

Re: [fpc-pascal] Basics of profiling

2010-09-06 Thread Jonas Maebe
On 06 Sep 2010, at 10:48, Felipe Monteiro de Carvalho wrote: Does anyone have a link or some info about basic info for doing profiling in fpc apps? http://wiki.freepascal.org/Profiling Jonas ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.

Re: [fpc-pascal] Basics of profiling

2010-09-06 Thread Graeme Geldenhuys
On 6 September 2010 10:48, Felipe Monteiro de Carvalho > > Does anyone have a link or some info about basic info for doing > profiling in fpc apps? You can try Valgrind. I don't know if it is available under Windows. The other problem is... good luck decyphering the results. Valgrind, Callgrind, M

Re: [fpc-pascal] Basics of profiling

2010-09-06 Thread Sven Barth
Am 06.09.2010 10:48, schrieb Felipe Monteiro de Carvalho: Hello, Does anyone have a link or some info about basic info for doing profiling in fpc apps? Basically I would like to know how many miliseconds does my app spend in a couple of drawing routines to calculate the effect of speed optimiza

Re: [fpc-pascal] Compile ANSI unit as UTF8

2010-09-06 Thread Jonas Maebe
On 06 Sep 2010, at 01:28, Zaher Dirkey wrote: I have unit with Ansi strings but i want to compile it as UTF-8 how to ask the compiler to convert it to utf8 before compile it? The compiler itself can only convert from utf-8 and several ISO code pages into utf-16 at compile time (i.e., chan

[fpc-pascal] Basics of profiling

2010-09-06 Thread Felipe Monteiro de Carvalho
Hello, Does anyone have a link or some info about basic info for doing profiling in fpc apps? Basically I would like to know how many miliseconds does my app spend in a couple of drawing routines to calculate the effect of speed optimizations. I know I could just check with a timer in my code, bu

Re: [fpc-pascal] Compile ANSI unit as UTF8

2010-09-06 Thread Felipe Monteiro de Carvalho
On Mon, Sep 6, 2010 at 1:28 AM, Zaher Dirkey wrote: > I have unit with Ansi strings but i want to compile it as UTF-8 how to ask > the compiler to convert it to utf8 before compile it? By saying that the unit has ansi strings do you mean that is has some types like: X: ansistring; Or that the t