diff options
| author | johnvg | 2003-10-21 11:17:12 +0000 | 
|---|---|---|
| committer | johnvg | 2003-10-21 11:17:12 +0000 | 
| commit | 476dbb46e6dabc2673a64a3d22d77d2d79a8e6c8 (patch) | |
| tree | 7821bacf6f3803780c276903c1f7cc2001f3f0e1 /main | |
| parent | use .o, .xo and .cxo files (diff) | |
port to MachO
git-svn-id: https://svn.cs.ru.nl/repos/clean-compiler/trunk@1408 1f8540f1-abd5-4d5b-9d24-4c5ce8603e2d
Diffstat (limited to 'main')
| -rw-r--r-- | main/Mac/cae.c | 26 | 
1 files changed, 19 insertions, 7 deletions
| diff --git a/main/Mac/cae.c b/main/Mac/cae.c index d902021..b754c1c 100644 --- a/main/Mac/cae.c +++ b/main/Mac/cae.c @@ -2,6 +2,13 @@  #include <AppleEvents.h>  #include <AERegistry.h>  #include <Files.h> +#include <Events.h> + +#if TARGET_API_MAC_CARBON +/* for gcc */ +#define NewAEEventHandlerProc(a) NewAEEventHandlerUPP(a) +/* */ +#endif  #undef DEBUG_FILE @@ -24,7 +31,9 @@ static int string_begins_with (char *s1,char *s2)  	return 1;  } -static pascal OSErr DoAEOpenApplication (const AppleEvent *theAppleEvent,AppleEvent *replyAppleEvent,unsigned long refCon) +#define RefConType /*unsigned*/ long + +static pascal OSErr DoAEOpenApplication (const AppleEvent *theAppleEvent,AppleEvent *replyAppleEvent,RefConType refCon)  {  	return noErr;  } @@ -43,7 +52,7 @@ static int has_required_parameters (const AppleEvent *theAppleEvent)  	return r;  } -static pascal OSErr DoAEOpenDocuments (const AppleEvent *theAppleEvent,AppleEvent *replyAppleEvent,unsigned long refCon) +static pascal OSErr DoAEOpenDocuments (const AppleEvent *theAppleEvent,AppleEvent *replyAppleEvent,RefConType refCon)  {  	OSErr r;  	AEDescList document_list; @@ -110,12 +119,12 @@ static pascal OSErr DoAEOpenDocuments (const AppleEvent *theAppleEvent,AppleEven  	return r;  } -static pascal OSErr DoAEPrintDocuments (const AppleEvent *theAppleEvent,AppleEvent *replyAppleEvent,unsigned long refCon) +static pascal OSErr DoAEPrintDocuments (const AppleEvent *theAppleEvent,AppleEvent *replyAppleEvent,RefConType refCon)  {  	return errAEEventNotHandled;  } -static pascal OSErr DoAEQuitApplication (const AppleEvent *theAppleEvent,AppleEvent *replyAppleEvent,unsigned long refCon) +static pascal OSErr DoAEQuitApplication (const AppleEvent *theAppleEvent,AppleEvent *replyAppleEvent,RefConType refCon)  {  	if (n_free_result_string_characters>=4){  		result_string[0]='Q'; @@ -128,7 +137,7 @@ static pascal OSErr DoAEQuitApplication (const AppleEvent *theAppleEvent,AppleEv  	return noErr;  } -extern pascal OSErr do_script_apple_event (const AppleEvent *apple_event,AppleEvent *replyAppleEvent,unsigned long refCon); +extern pascal OSErr do_script_apple_event (const AppleEvent *apple_event,AppleEvent *replyAppleEvent,RefConType refCon);  extern int clean2_compile (int); @@ -140,7 +149,7 @@ static int last_exit_code=0;  static short debug_file_ref_num=0;  #endif -static pascal OSErr DoAEScript (const AppleEvent *apple_event,AppleEvent *replyAppleEvent,unsigned long refCon) +static pascal OSErr DoAEScript (const AppleEvent *apple_event,AppleEvent *replyAppleEvent,RefConType refCon)  {  	DescType returned_type;  	long actual_size; @@ -185,7 +194,10 @@ static pascal OSErr DoAEScript (const AppleEvent *apple_event,AppleEvent *replyA  #if 1  	/* RWS ... : ugly, special case for Clean IDE / cg combo */ -	if (string_begins_with (result_string, "cg ")) +	if (string_begins_with (result_string, "cg ") +		|| string_begins_with (result_string, "cg_o ") +		|| string_begins_with (result_string, "cg_xo ") +		|| string_begins_with (result_string, "cg_cxo "))  	{  		exit_code=do_script_apple_event (apple_event, replyAppleEvent, refCon); | 
