Peter N. Lewis and Gale Paeper have been working hard on the Mac OS X Pascal Interfaces for GNU Pascal. The results are impressive:
- added 59 new units, to a total of 268 units and 197731 lines of Pascal - added CFSTR support - added support for four char code constants - added compatible Interfaces for MetroWerks Pascal.
The software can be downloaded from http://www.microbizz.nl/gpc.html. Detailed release notes are included.
Regards,
The Mac OS X Pascal Interfaces team:
Peter N. Lewis peter@stairways.com.au Gale Paeper gpaeper@empirenet.com Adriaan van Os gpc@microbizz.nl
What is the 'GNU Pascal' translation of :
CONST kSimpleListViewID: ControlID = (signature: 'CASD', id: SInt32('HSLV'));
TIA
Yours
Alain
Alain wrote:
What is the 'GNU Pascal' translation of :
CONST kSimpleListViewID: ControlID = (signature: 'CASD', id: SInt32('HSLV'));
{$I GPCMacros.inc}
CONST kSimpleListViewID: ControlID = (signature: FOUR_CHAR_CODE( 'CASD'), id: SInt32( FOUR_CHAR_CODE( 'HSLV')));
Regards,
Adriaan van Os
Does GPC on other platforms predefine things like ?
__OS_DOS__ _WIN32 __sparc__ __CYGWIN32__ __CYGWIN__ __unix__ __EMX__
I am a bit puzzled. I had expected that gpc on powerpc-apple has the same predefines as gcc (see gcc/rs6000/config/darwin.h)
__APPLE__ __MACH__ __POWERPC__ __ppc__
But gpc doesn't, unless I missed something.
Regards,
Adriaan van Os
On 9 Sep 2004 at 17:27, Adriaan van Os wrote:
Does GPC on other platforms predefine things like ?
__OS_DOS__ _WIN32 __sparc__ __CYGWIN32__ __CYGWIN__ __unix__ __EMX__
On relevant platforms, yes.
I am a bit puzzled. I had expected that gpc on powerpc-apple has the same predefines as gcc (see gcc/rs6000/config/darwin.h)
__APPLE__ __MACH__ __POWERPC__ __ppc__
But gpc doesn't, unless I missed something.
What is in your "specs" file? (AFAIU, that is where the predefines are). And, is your gpc using the same specs file as your gcc? If they are using the same specs file, then you should get similar predefines (or is your gpc just using the built-in specs?).
Best regards, The Chief -------- Prof. Abimbola A. Olowofoyeku (The African Chief) web: http://www.greatchief.plus.com/
Prof A Olowofoyeku (The African Chief) wrote:
What is in your "specs" file? (AFAIU, that is where the predefines are).
*cpp_unique_options: __GNUC__ __GNUC_MINOR__ __GNUC_PATCHLEVEL__
And, is your gpc using the same specs file as your gcc?
For the same version of gcc it does.
If they are using the same specs file, then you should get similar predefines
They aren't in the specs file, but I found them in gcc/config/rs6000/darwin.h
#define TARGET_OS_CPP_BUILTINS() \ do \ { \ builtin_define ("__ppc__"); \ builtin_define ("__POWERPC__"); \ builtin_define ("__NATURAL_ALIGNMENT__"); \ builtin_define ("__MACH__"); \ builtin_define ("__APPLE__"); \ } \ while (0)
Regards,
Adriaan van Os
Adriaan van Os a écrit:
Does GPC on other platforms predefine things like ?
__OS_DOS__ _WIN32 __sparc__ __CYGWIN32__ __CYGWIN__ __unix__ __EMX__
I am a bit puzzled. I had expected that gpc on powerpc-apple has the same predefines as gcc (see gcc/rs6000/config/darwin.h)
__APPLE__ __MACH__ __POWERPC__ __ppc__
But gpc doesn't, unless I missed something.
There is a problem for gcc version > 3.2.3 There has been a change in programming strategy for CPP_PREDEFINES starting with gcc 3.3.x This change has not been mirrored yet into gpc, so that all these predefines no more exist in gpc. The best way up to now (for djgpp, mingw, cygwin ...) where this is important is to stick to gcc 3.2.3 as backend. AFAIK this has no drawback for pascal programs, even when calling gcc procedures. Many gcc changes have importance for C C++ programs and are only nuisances in pascal. The reason to follow gcc releases is only that new systems have no reason to provide old gcc versions.
Maurice
Maurice Lombardi wrote:
There is a problem for gcc version > 3.2.3 There has been a change in programming strategy for CPP_PREDEFINES starting with gcc 3.3.x This change has not been mirrored yet into gpc, so that all these predefines no more exist in gpc.
Ah, thanks for the reply.
The best way up to now (for djgpp, mingw, cygwin ...) where this is important is to stick to gcc 3.2.3 as backend. AFAIK this has no drawback for pascal programs, even when calling gcc procedures. Many gcc changes have importance for C C++ programs and are only nuisances in pascal. The reason to follow gcc releases is only that new systems have no reason to provide old gcc versions.
On Mac OS X there have been (and are) important changes going on in the gcc backend, so we have little choice there ....
Regards,
Adriaan van Os
Adriaan van Os wrote:
The best way up to now (for djgpp, mingw, cygwin ...) where this is important is to stick to gcc 3.2.3 as backend. AFAIK this has no drawback for pascal programs, even when calling gcc procedures. Many gcc changes have importance for C C++ programs and are only nuisances in pascal. The reason to follow gcc releases is only that new systems have no reason to provide old gcc versions.
On Mac OS X there have been (and are) important changes going on in the gcc backend, so we have little choice there ....
You might want to try the `--needed-options' kludge (you can search the archive). When using GP, e.g., this is done automatically.
Frank
Alain wrote:
What is the 'GNU Pascal' translation of :
CONST kSimpleListViewID: ControlID = (signature: 'CASD', id: SInt32('HSLV'));
Alain.
I see Adriaan answered your basic question. Since I did the Pascal translation of that Apple Mac OS X sample code, I'll note I'm nearly finished with a revised example whch has been upgraded to work with command line GPC, Adriaan's CodeWarrior IDE GPC plugin, and Metrowerks' CodeWarrior IDE Pascal compiler. The upgrade makes use of the recently released Mac OS X Pascal interfaces http://www.microbizz.nl/GPCInterfacesC2.tar.gz which greatly reduces the Mac OS X Pascal source code differences between GPC and Metrowerks Pascal.
If you want to save yourself some effort, I can send you the revised example in private e-mail. The only thing that is quite finished is the final example package "polishing" (e.g., Readme note, etc.).
Gale Paeper gpaeper@empirenet.com