Synch recent 3.4.2 changes to main trunk
This is merely a synchronization of recent changes for the Macintosh Carbon port, which were committed to the 3.4.2 branch, to the main trunk.
This commit is contained in:
@@ -877,6 +877,7 @@ E int FDECL(macclose, (int));
|
||||
E int FDECL(macread, (int,void *,unsigned));
|
||||
E int FDECL(macwrite, (int,void *,unsigned));
|
||||
E long FDECL(macseek, (int,long,short));
|
||||
E int FDECL(macunlink, (const char *));
|
||||
|
||||
/* ### macsnd.c ### */
|
||||
|
||||
|
||||
@@ -25,8 +25,14 @@
|
||||
#ifndef __powerc
|
||||
# define MAC68K /* 68K mac (non-powerpc) */
|
||||
#endif
|
||||
#ifndef TARGET_API_MAC_CARBON
|
||||
# define TARGET_API_MAC_CARBON 0
|
||||
#endif
|
||||
|
||||
|
||||
#ifndef __MACH__
|
||||
#define RANDOM
|
||||
#endif
|
||||
#define NO_SIGNAL /* You wouldn't believe our signals ... */
|
||||
#define FILENAME 256
|
||||
#define NO_TERMS /* For tty port (see wintty.h) */
|
||||
@@ -46,7 +52,13 @@
|
||||
* Try and keep the number of files here to an ABSOLUTE minimum !
|
||||
* include the relevant files in the relevant .c files instead !
|
||||
*/
|
||||
#include <MacTypes.h>
|
||||
#if TARGET_API_MAC_CARBON
|
||||
/* Avoid including <CarbonCore/fp.h> -- it has a conflicting expl() */
|
||||
# define __FP__
|
||||
# include <Carbon/Carbon.h>
|
||||
#else
|
||||
# include <MacTypes.h>
|
||||
#endif
|
||||
|
||||
/*
|
||||
* We could use the PSN under sys 7 here ...
|
||||
@@ -72,7 +84,7 @@ extern void error(const char *,...);
|
||||
* MPW. With MPW, we make them into MPW tools, which use unix IO. SPEC_LEV
|
||||
* and DGN_COMP are defined when compiling for LevComp and DgnComp respectively.
|
||||
*/
|
||||
#if !((defined(__SC__) || defined(__MRC__)) && (defined(SPEC_LEV) || defined(DGN_COMP)))
|
||||
#if !((defined(__SC__) || defined(__MRC__) || defined(__MACH__)) && (defined(SPEC_LEV) || defined(DGN_COMP)))
|
||||
# define creat maccreat
|
||||
# define open macopen
|
||||
# define close macclose
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
|
||||
/* ### mmodal.c ### */
|
||||
|
||||
extern void FlashButton(WindowPtr, short);
|
||||
extern void FlashButton(DialogRef, short);
|
||||
extern char queued_resp(char *resp);
|
||||
extern char topl_yn_function(const char *query, const char *resp, char def);
|
||||
extern int get_line_from_key_queue(char *bufp);
|
||||
|
||||
@@ -44,7 +44,9 @@
|
||||
#undef red /* undef internal color const strings from decl */
|
||||
#undef green
|
||||
#undef blue
|
||||
#include <windows.h>
|
||||
#if !TARGET_API_MAC_CARBON
|
||||
# include <windows.h>
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Error code returned when it's probably our fault, or
|
||||
|
||||
@@ -7,8 +7,11 @@
|
||||
#undef red /* undef internal color const strings from decl */
|
||||
#undef green
|
||||
#undef blue
|
||||
|
||||
#ifndef __MACH__
|
||||
#include <windows.h>
|
||||
#include <dialogs.h>
|
||||
#endif
|
||||
|
||||
/* more headers */
|
||||
#ifdef THINK_C
|
||||
@@ -19,7 +22,7 @@
|
||||
#define PLAYER_NAME_RES_ID 1001
|
||||
|
||||
/* fake some things if we don't have universal headers.. */
|
||||
#ifndef NewUserItemProc
|
||||
#if 0 /*ndef NewUserItemProc*/
|
||||
typedef pascal void (*UserItemProcPtr)(WindowPtr theWindow, short itemNo);
|
||||
typedef UserItemProcPtr UserItemUPP;
|
||||
#define NewUserItemProc(p) (UserItemUPP)(p)
|
||||
|
||||
@@ -15,9 +15,11 @@
|
||||
#include "mactty.h"
|
||||
# endif
|
||||
|
||||
#include <QDOffscreen.h>
|
||||
#include <Gestalt.h>
|
||||
#include <Errors.h>
|
||||
#if !TARGET_API_MAC_CARBON
|
||||
# include <QDOffscreen.h>
|
||||
# include <Gestalt.h>
|
||||
# include <Errors.h>
|
||||
#endif
|
||||
|
||||
#define TA_TO_RGB(ta,rgb) (((rgb).red=(((ta)>>16)&0xff)*257),((rgb).green=(((ta)>>8)&0xff)*257),\
|
||||
((rgb).blue=((ta)&0xff)*257)),rgb
|
||||
|
||||
Reference in New Issue
Block a user