Re: [fpc-pascal] header translation question: I need an int sized boolean

2012-04-22 Thread Marco van de Voort
In our previous episode, Bernd said: > Am 22. April 2012 17:39 schrieb Marco van de Voort : > > gboolean, > > like Pascal booleans, are only true =1. > > Just out of curiosity, how can they enforce this for the C compiler > with only some definitions in a header file? I don't know, I don't use GT

Re: [fpc-pascal] header translation question: I need an int sized boolean

2012-04-22 Thread Bernd
Am 22. April 2012 17:39 schrieb Marco van de Voort : > gboolean, > like Pascal booleans, are only true =1. Just out of curiosity, how can they enforce this for the C compiler with only some definitions in a header file? Isn't it just an alias for int? what if i just write gboolean something; som

Re: [fpc-pascal] header translation question: I need an int sized boolean

2012-04-22 Thread Bernd
Am 22. April 2012 17:39 schrieb Marco van de Voort : > FPC 2.6.0+ introduced boolean8/16/32/64 types for this. I just saw it in gtypes.inc and wondered what this is, this is the first time I have seen these new boolean types. Also Lazarus does not yet know about them in the code completion.

Re: [fpc-pascal] header translation question: I need an int sized boolean

2012-04-22 Thread Marco van de Voort
In our previous episode, Bernd said: > I have this from the GLIB heads: > > typedef intgint; > typedef gint gboolean; > > Now I need a few packed records with such gboolean types in them. On > my i386 I am now just using That's afaik a wrong translation. longbool are true <>0, while gboole

Re: [fpc-pascal] header translation question: I need an int sized boolean

2012-04-22 Thread Bernd
Am 22. April 2012 16:46 schrieb Mattias Gaertner : > Why not use gboolean from the glib unit? I didn't know it exists, so I didn't even try to search for it Thanks for the info :-) ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.

Re: [fpc-pascal] header translation question: I need an int sized boolean

2012-04-22 Thread Mattias Gaertner
On Sun, 22 Apr 2012 01:54:17 +0200 Bernd wrote: > Hi, > > I have this from the GLIB heads: > > typedef intgint; > typedef gint gboolean; Why not use gboolean from the glib unit? Mattias ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.o

Re: [fpc-pascal] header translation question: I need an int sized boolean

2012-04-22 Thread Bernd
2012/4/22 David W Noon : >  Without any "long" prefix > an integer remains 32-bit. > [...] > Leave it as you currently have it. Thanks, this sounds good. For the record: I was trying to port this: http://developer.pidgin.im/wiki/CHowTo/BasicPluginHowto to FPC and now I have posted the results o

Re: [fpc-pascal] header translation question: I need an int sized boolean

2012-04-22 Thread David W Noon
On Sun, 22 Apr 2012 01:54:17 +0200, Bernd wrote about [fpc-pascal] header translation question: I need an int sized boolean: >I have this from the GLIB heads: > >typedef intgint; >typedef gint gboolean; > >Now I need a few packed records with such gboolean types in them

[fpc-pascal] header translation question: I need an int sized boolean

2012-04-21 Thread Bernd
Hi, I have this from the GLIB heads: typedef intgint; typedef gint gboolean; Now I need a few packed records with such gboolean types in them. On my i386 I am now just using type GBoolean = LongBool; Just to get something¹ up and running before the day was over. Unfortunately I cannot