Re: [fpc-pascal] Dec2Numb with negative numbers

2013-06-16 Thread Roberto P.
Thanks! Is there an unsigned alternative? R. 2013/6/16 Michael Van Canneyt > > > On Fri, 14 Jun 2013, Roberto P. wrote: > > Hi List, >> I recently stumbled upon the fact that the Dec2Numb function does not >> work with negative numbers. Specifically, converting a negative longint >> returns

Re: [fpc-pascal] TStream.ReadBuffer doesn't try hard enough to read the requested bytes

2013-06-16 Thread Michalis Kamburelis
Michael Van Canneyt wrote: If an implementation of Read does not return the requested data when in fact it is available, then the implementation of Read is broken. I guess it depends how do you interpret TStream.Read documentation... http://www.freepascal.org/docs-html/rtl/classes/tstream.read

Re: [fpc-pascal] TStream.ReadBuffer doesn't try hard enough to read the requested bytes

2013-06-16 Thread Michael Van Canneyt
On Sun, 16 Jun 2013, Michalis Kamburelis wrote: Michael Van Canneyt wrote: The above implementation should not be changed, it is Delphi compatible: TStream.ReadBuffer works on the assumption that Read will always return the amount of bytes requested if they are available. So, if you want to

Re: [fpc-pascal] TStream.ReadBuffer doesn't try hard enough to read the requested bytes

2013-06-16 Thread Michalis Kamburelis
Michael Van Canneyt wrote: The above implementation should not be changed, it is Delphi compatible: TStream.ReadBuffer works on the assumption that Read will always return the amount of bytes requested if they are available. So, if you want to make changes, there is no reason why TStream.Read sh

[fpc-pascal] [ANN] Delphi sample with Amazon's S3 is allowed to be ported to Free Pascal

2013-06-16 Thread silvioprog
Hello, Here is the article with an example that I want to turn part of the Brook project: http://www.itwriting.com/s3.php Conforming an e-mail that I sent to the author, he allowed me to use your code to benefit the Free Pascal community. I did some tests and everything worked well. Here is the

Re: [fpc-pascal] Dec2Numb with negative numbers

2013-06-16 Thread Michael Van Canneyt
On Fri, 14 Jun 2013, Roberto P. wrote: Hi List, I recently stumbled upon the fact that the Dec2Numb function does not work with negative numbers. Specifically, converting a negative longint returns an empty string. Is that intended or is it a bug? Maybe a base conversion routine should be so

Re: [fpc-pascal] TStream.ReadBuffer doesn't try hard enough to read the requested bytes

2013-06-16 Thread Michalis Kamburelis
Ewald wrote: The question that arises here is whether all the `ReadByte`, `ReadWord`, `WriteByte`, `WriteWord`, `WriteBuffer`, ... should also `try harder`? Same issue there: no data is returned about the actual number of bytes read. Anyway, I leave that to someone who knows the internals of thes

[fpc-pascal] [ANN] AWS Lib: Pascal implementation of Amazon S3 REST API

2013-06-16 Thread Marcos Douglas
Hi list, I'm glad to announce the 0.0.1 release of AWS Lib. AWS Lib is a Pascal implementation of Amazon S3 REST API for Free Pascal. It is minimalistic, clean and simple. https://github.com/mdbs99/aws Comments are welcome. Thanks. Best regards, Marcos Douglas __

Re: [fpc-pascal] TStream.ReadBuffer doesn't try hard enough to read the requested bytes

2013-06-16 Thread Michael Van Canneyt
On Sun, 16 Jun 2013, Michalis Kamburelis wrote: Hi, I'm often reading fixed-size structures using TStream.ReadBuffer, working under the assumption that it will fail only if it's not possible to read the requested amount of bytes (that is, if the stream ended prematurely). This is actually

Re: [fpc-pascal] is there a ready to use FPC Cross compiler x86-Linux -> MIPS-linux?

2013-06-16 Thread Dennis Poon
Sven, I tried your suggestion and the result is exactly the same. So, I guess putting the path in BINUTILSPREFIX has the same effect as CROSSBINDIR. It will just concatenate both variable to get the full 'as' and 'ar' file paths. As per your second suggestion, my knowledge of assembler is too

Re: [fpc-pascal] is there a ready to use FPC Cross compiler x86-Linux -> MIPS-linux?

2013-06-16 Thread Mark Morgan Lloyd
Sven Barth wrote: On 15.06.2013 19:19, Dennis Poon wrote: I eventually found this page which talked about downloading a special toolchain from openwrt web site http://www.dd-wrt.com/phpBB2/viewtopic.php?t=61112 I followed its instruction and successfully compiled a helloworld c program and su

Re: [fpc-pascal] TStream.ReadBuffer doesn't try hard enough to read the requested bytes

2013-06-16 Thread Ewald
On 16 Jun 2013, at 03:18, Michalis Kamburelis wrote: > Ewald wrote: >> And what with non-blocking pipes pipes? Wait for a *some* period >> until you get all data? It is up to the programmer to do this INHO. > > If you want to get partial data (instead of waiting until all requested data > is av

Re: [fpc-pascal] is there a ready to use FPC Cross compiler x86-Linux -> MIPS-linux?

2013-06-16 Thread Sven Barth
On 15.06.2013 19:19, Dennis Poon wrote: I eventually found this page which talked about downloading a special toolchain from openwrt web site http://www.dd-wrt.com/phpBB2/viewtopic.php?t=61112 I followed its instruction and successfully compiled a helloworld c program and successfully RUN the

Re: [fpc-pascal] Application.onChangeComponentCount ?

2013-06-16 Thread Sven Barth
On 15.06.2013 18:58, Fred van Stappen wrote: > Date: Sat, 15 Jun 2013 13:34:52 +0200 > From: pascaldra...@googlemail.com > To: fpc-pascal@lists.freepascal.org > Subject: Re: [fpc-pascal] Application.onChangeComponentCount ? > > On 15.06.2013 12:11, Fred van Stappen wrote: > > > > > > Hel

Re: [fpc-pascal] is there a ready to use FPC Cross compiler x86-Linux -> MIPS-linux?

2013-06-16 Thread Michael Ring
Seems that the assembler is not understanding the $xx notation for the registers. Instead of trying to change the toolchain I would fire up gdb on your device and single step through the initialisation code of the helloworld.pas file. From my point of view it is more likely that you will find