Re: [fpc-pascal] Text scan in text files - (was: Full text scan - PDF files)

2010-11-02 Thread Graeme Geldenhuys
Hi, I don't know the PDF file format at all, but I would guess if you look at the many pdf-to-text conversion tools, you will see what they have done. In all likelihood, those conversion tools will be written in C, which you will have to translate to Object Pascal - but that is normally not a

Re: [fpc-pascal] MSEide+MSEgui rev.2.4

2010-11-02 Thread Graeme Geldenhuys
Op 2010-11-01 17:24, Brian Winfrey het geskryf: Which address should I be using? release_2_4_2 is simply the tagged release of the future FPC 2.4.2 release - currently in beta testing. The fixes_2_4 is already at version 2.4.3 and contains everything from 2.4.2 and more... As Martin said, you

[fpc-pascal] Endian issues when porting FPC programs from x86 to other platforms

2010-11-02 Thread Bo Berglund
I am writing a serial communications program, which will connect to a data acquisition instrument and download data. I am using FPC/Lazarus in order to make the program platform independent so it can be deployed also on an embedded Linux system even though it is developed on Windows or Ubuntu on

Re: [fpc-pascal] Endian issues when porting FPC programs from x86 to other platforms

2010-11-02 Thread Marco van de Voort
In our previous episode, Bo Berglund said: Now, however, the problem may be complicated because the program may well run on a CPU that is using the *same* endian structure as the original instrument in which case of course the swaps should not be done. Correct. So I need some detector or

Re: [fpc-pascal] Endian issues when porting FPC programs from x86 to other platforms

2010-11-02 Thread Thomas Schatzl
Hi, Or maybe this is a moot question if FPC is only so far running on platforms that have the same endian as x86 CPU:s? I have no information on this though... I can see at least these targets: - Windows and Linux on x86 CPU:s - Embedded Linux on ARM CPU:s Sparc, PowerPC are big endian,

Re: Re[2]: [fpc-pascal] Text scan in text files - (was: Full text scan - PDF files)

2010-11-02 Thread Tomas Hajny
On Mon, November 1, 2010 21:52, José Mejuto wrote: . . So if you are looking for ASCII words, use PDF2Text and use the POS function over the result: function HaveString(Filename: String; TheString: string): Boolean; var F: TFileStream; S: String; AtPos: integer; begin

Re: [fpc-pascal] Endian issues when porting FPC programs from x86 to other platforms

2010-11-02 Thread Mark Morgan Lloyd
Thomas Schatzl wrote: Hi, Or maybe this is a moot question if FPC is only so far running on platforms that have the same endian as x86 CPU:s? I have no information on this though... I can see at least these targets: - Windows and Linux on x86 CPU:s - Embedded Linux on ARM CPU:s Sparc,

[fpc-pascal] Re: Endian issues when porting FPC programs from x86 to other platforms

2010-11-02 Thread Bo Berglund
On Tue, 02 Nov 2010 09:09:05 +0100, Bo Berglund bo.bergl...@gmail.com wrote: OK, I see that there are functions to convert a known BE or LE integer value to the *native* order. This would in principle work across all platforms where FPC is implemented so that is good news! However now I have the

Re: [fpc-pascal] Re: Endian issues when porting FPC programs from x86 to other platforms

2010-11-02 Thread Jonas Maebe
On 02 Nov 2010, at 12:41, Bo Berglund wrote: The end to me is the last (the right-most) byte. And that is the LSB. So the end is LSB, the little part... Little endian means the little end comes first (with the little end referring to the least significant byte). See

Re[4]: [fpc-pascal] Text scan in text files - (was: Full text scan - PDF files)

2010-11-02 Thread José Mejuto
Hello FPC-Pascal, Tuesday, November 2, 2010, 11:02:18 AM, you wrote: TH If I understand it correctly, this assumes reading the whole file into TH memory at once. Depending on the size of that file and other conditions, TH this may or may not be advisable... Yes, and a pdf2text conversion will

Re: [fpc-pascal] MSEide+MSEgui rev.2.4

2010-11-02 Thread Brian Winfrey
The fixes_2_4 is already at version 2.4.3 and contains everything from 2.4.2 and more... Thank you. ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Re: Re[4]: [fpc-pascal] Text scan in text files - (was: Full text scan - PDF files)

2010-11-02 Thread Marcos Douglas
On Tue, Nov 2, 2010 at 11:38 AM, José Mejuto joshy...@gmail.com wrote: Hello FPC-Pascal, Tuesday, November 2, 2010, 11:02:18 AM, you wrote: TH If I understand it correctly, this assumes reading the whole file into TH memory at once. Depending on the size of that file and other conditions,

[fpc-pascal] Re: Endian issues when porting FPC programs from x86 to other platforms

2010-11-02 Thread Bo Berglund
On Tue, 02 Nov 2010 09:32:36 +0100, Thomas Schatzl tom_at_w...@gmx.at wrote: Hi, Or maybe this is a moot question if FPC is only so far running on platforms that have the same endian as x86 CPU:s? I have no information on this though... I can see at least these targets: - Windows and

Re: [fpc-pascal] Re: Endian issues when porting FPC programs from x86 to other platforms

2010-11-02 Thread Felipe Monteiro de Carvalho
On Tue, Nov 2, 2010 at 7:04 PM, Bo Berglund bo.bergl...@gmail.com wrote: Thanks, that helps a lot! Are there also overloaded BEtoN functions for floating point values? I think that single and double have always the same binary layout. -- Felipe Monteiro de Carvalho

Re: [fpc-pascal] Re: Endian issues when porting FPC programs from x86 to other platforms

2010-11-02 Thread Vinzent Höfler
On Tue, 02 Nov 2010 21:39:31 +0100, Felipe Monteiro de Carvalho felipemonteiro.carva...@gmail.com wrote: On Tue, Nov 2, 2010 at 7:04 PM, Bo Berglund bo.bergl...@gmail.com wrote: Thanks, that helps a lot! Are there also overloaded BEtoN functions for floating point values? I think that

Re: [fpc-pascal] Re: Endian issues when porting FPC programs from x86 to other platforms

2010-11-02 Thread Jonas Maebe
On 02 Nov 2010, at 21:39, Felipe Monteiro de Carvalho wrote: On Tue, Nov 2, 2010 at 7:04 PM, Bo Berglund bo.bergl...@gmail.com wrote: Thanks, that helps a lot! Are there also overloaded BEtoN functions for floating point values? I think that single and double have always the same binary

Re: Re[4]: [fpc-pascal] Text scan in text files - (was: Full text scan - PDF files)

2010-11-02 Thread DaWorm
On Tue, Nov 2, 2010 at 11:45 AM, Marcos Douglas m...@delfire.net wrote: If I found a match, I need to know which page the token was found... That may prove most difficult, since I doubt your pdf to text will preserve that very well. Jeff. ___

[fpc-pascal] Re: Endian issues when porting FPC programs from x86 to other platforms

2010-11-02 Thread Bo Berglund
On Tue, 02 Nov 2010 22:53:21 +0100, Vinzent Höfler jellyfish.softw...@gmx.net wrote: On Tue, 02 Nov 2010 21:39:31 +0100, Felipe Monteiro de Carvalho felipemonteiro.carva...@gmail.com wrote: On Tue, Nov 2, 2010 at 7:04 PM, Bo Berglund bo.bergl...@gmail.com wrote: Thanks, that helps a lot!

[fpc-pascal] TReader.ReadProperty

2010-11-02 Thread Fred Flinestone
hi all, i am trying to replace the code from delphi to fpc where the code looks like: TYPE THackReader =class(TReader); ... FReaderStream.Position := 0; {$IFDEF FPC} try FReader.ReadListBegin; while not FReader.EndOfList do begin

[fpc-pascal] How I can associate a text file name in UTF8?

2010-11-02 Thread Luis Fernando Del Aguila Mejía
How I can associate a text file name in UTF8? Example: Assign (F, 'タスク 01.txt'); Assign (F, 'Задание 01.txt'); Assign (F, '♕ Queen.txt'); thanks ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org

Re: Re[4]: [fpc-pascal] Text scan in text files - (was: Full text scan - PDF files)

2010-11-02 Thread Marcos Douglas
On Tue, Nov 2, 2010 at 8:32 PM, DaWorm daw...@gmail.com wrote: On Tue, Nov 2, 2010 at 11:45 AM, Marcos Douglas m...@delfire.net wrote: If I found a match, I need to know which page the token was found... That may prove most difficult, since I doubt your pdf to text will preserve that