mirror of
https://github.com/evilneuro/eudora-mac.git
synced 2024-06-01 18:41:31 +00:00
1 line
33 KiB
C
1 line
33 KiB
C
|
/* Copyright (c) 2017, Computer History Museum
All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted (subject to
the limitations in the disclaimer below) provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following
disclaimer in the documentation and/or other materials provided with the distribution.
* Neither the name of Computer History Museum nor the names of its contributors may be used to endorse or promote products
derived from this software without specific prior written permission.
NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE
COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
DAMAGE. */
/* -*- Mode: C; tab-width: 4; -*- */
/*
* npupp.h $Revision: 1.37 $
* function call mecahnics needed by platform specific glue code.
*/
#ifndef _NPUPP_H_
#define _NPUPP_H_
#ifndef GENERATINGCFM
#define GENERATINGCFM 0
#endif
#ifndef _NPAPI_H_
#include "npapi.h"
#endif
#include "jri.h"
/******************************************************************************************
plug-in function table macros
for each function in and out of the plugin API we define
typedef NPP_FooUPP
#define NewNPP_FooProc
#define CallNPP_FooProc
for mac, define the UPP magic for PPC/68K calling
*******************************************************************************************/
/* NPP_Initialize */
#if GENERATINGCFM
typedef UniversalProcPtr NPP_InitializeUPP;
enum {
uppNPP_InitializeProcInfo = kThinkCStackBased
| STACK_ROUTINE_PARAMETER(1, SIZE_CODE(0))
| RESULT_SIZE(SIZE_CODE(0))
};
#define NewNPP_InitializeProc(FUNC) \
(NPP_InitializeUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPP_InitializeProcInfo, GetCurrentArchitecture())
#define CallNPP_InitializeProc(FUNC) \
(void)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPP_InitializeProcInfo)
#else
typedef void (*NPP_InitializeUPP)(void);
#define NewNPP_InitializeProc(FUNC) \
((NPP_InitializeUPP) (FUNC))
#define CallNPP_InitializeProc(FUNC) \
(*(FUNC))()
#endif
/* NPP_Shutdown */
#if GENERATINGCFM
typedef UniversalProcPtr NPP_ShutdownUPP;
enum {
uppNPP_ShutdownProcInfo = kThinkCStackBased
| STACK_ROUTINE_PARAMETER(1, SIZE_CODE(0))
| RESULT_SIZE(SIZE_CODE(0))
};
#define NewNPP_ShutdownProc(FUNC) \
(NPP_ShutdownUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPP_ShutdownProcInfo, GetCurrentArchitecture())
#define CallNPP_ShutdownProc(FUNC) \
(void)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPP_ShutdownProcInfo)
#else
typedef void (*NPP_ShutdownUPP)(void);
#define NewNPP_ShutdownProc(FUNC) \
((NPP_ShutdownUPP) (FUNC))
#define CallNPP_ShutdownProc(FUNC) \
(*(FUNC))()
#endif
/* NPP_New */
#if GENERATINGCFM
typedef UniversalProcPtr NPP_NewUPP;
enum {
uppNPP_NewProcInfo = kThinkCStackBased
| STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(NPMIMEType)))
| STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(NPP)))
| STACK_ROUTINE_PARAMETER(3, SIZE_CODE(sizeof(uint16)))
| STACK_ROUTINE_PARAMETER(4, SIZE_CODE(sizeof(int16)))
| STACK_ROUTINE_PA
|