idedll.h
来自「开放源码的编译器open watcom 1.6.0版的源代码」· C头文件 代码 · 共 389 行 · 第 1/2 页
H
389 行
/****************************************************************************
*
* Open Watcom Project
*
* Portions Copyright (c) 1983-2002 Sybase, Inc. All Rights Reserved.
*
* ========================================================================
*
* This file contains Original Code and/or Modifications of Original
* Code as defined in and that are subject to the Sybase Open Watcom
* Public License version 1.0 (the 'License'). You may not use this file
* except in compliance with the License. BY USING THIS FILE YOU AGREE TO
* ALL TERMS AND CONDITIONS OF THE LICENSE. A copy of the License is
* provided with the Original Code and Modifications, and is also
* available at www.sybase.com/developer/opensource.
*
* The Original Code and all software distributed under the License are
* distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
* EXPRESS OR IMPLIED, AND SYBASE AND ALL CONTRIBUTORS HEREBY DISCLAIM
* ALL SUCH WARRANTIES, INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR
* NON-INFRINGEMENT. Please see the License for the specific language
* governing rights and limitations under the License.
*
* ========================================================================
*
* Description: Interface for DLLs pluggable into the Watcom IDE (and wmake).
*
****************************************************************************/
#ifndef IDEDLL_H_INCLUDED
#define IDEDLL_H_INCLUDED
#ifdef __cplusplus
extern "C" {
#endif
#include <stdlib.h>
#include <sys/stat.h>
#pragma pack( 4 )
#ifdef IDE_PGM
#define IDEDLL_EXPORT
#else
#define IDEDLL_EXPORT __export __stdcall
#endif
#define IDE_CUR_DLL_VER 3
#define IDE_CUR_INFO_VER2 2 //VERSION 2 (see below)
#define IDE_CUR_INFO_VER3 3 //VERSION 3 (see below)
#define IDE_CUR_INFO_VER4 4 //VERSION 4 (see below)
#define IDE_CUR_INFO_VER5 5 //VERSION 5 (see below)
#define IDE_CUR_INFO_VER 6
typedef unsigned short IDEBool;
typedef void *IDEDllHdl;
typedef void *IDECBHdl;
struct IDEMsgInfo;
typedef void (*BatchFilter)( void *cookie, const char *msg );
typedef void (*BatchDllFilter)( void *cookie, struct IDEMsgInfo *errinfo );
/*******************************************
*
* Error Information
*
*******************************************/
#define __IdeMsgSeverity \
_IdeMsgSeverity( WARNING ) \
, _IdeMsgSeverity( ERROR ) \
, _IdeMsgSeverity( NOTE ) \
, _IdeMsgSeverity( BANNER ) \
, _IdeMsgSeverity( DEBUG ) \
, _IdeMsgSeverity( NOTE_MSG)
typedef unsigned IDEMsgSeverity;
enum {
# define _IdeMsgSeverity(a) IDEMSGSEV_ ## a
__IdeMsgSeverity
# undef _IdeMsgSeverity
};
#define IdeSeverityDiagnostic ( 0 \
| ( 1 << IDEMSGSEV_WARNING ) \
| ( 1 << IDEMSGSEV_ERROR ) \
| ( 1 << IDEMSGSEV_NOTE ) \
)
#define IdeSeverityNonDebugText ( 0 \
| ( 1 << IDEMSGSEV_BANNER ) \
| ( 1 << IDEMSGSEV_NOTE_MSG ) \
)
#define IdeSeverityIs( s, m ) ((( 1 << (s) ) & (m) ) != 0 )
#define IDE_INFO_READABLE 0x00000001
#define IDE_INFO_HAS_SRC_FILE 0x00000002
#define IDE_INFO_HAS_SRC_LINE 0x00000004
#define IDE_INFO_HAS_SRC_COL 0x00000008
#define IDE_INFO_HAS_HELP 0x00000010
#define IDE_INFO_HAS_MSG_NUM 0x00000020
#define IDE_INFO_HAS_LNK_FILE 0x00000040
#define IDE_INFO_HAS_LNK_SYMBOL 0x00000080
#define IDE_INFO_HAS_MSG_GRP 0x00000100
#define IDE_IS_READABLE( x ) ( ((x)->flags) & IDE_INFO_READABLE )
#define IDE_HAS_SRC_FILE( x ) ( ((x)->flags) & IDE_INFO_HAS_SRC_FILE )
#define IDE_HAS_SRC_LINE( x ) ( ((x)->flags) & IDE_INFO_HAS_SRC_LINE )
#define IDE_HAS_SRC_COL( x ) ( ((x)->flags) & IDE_INFO_HAS_SRC_COL )
#define IDE_HAS_HELP( x ) ( ((x)->flags) & IDE_INFO_HAS_HELP )
#define IDE_HAS_MSG_NUM( x ) ( ((x)->flags) & IDE_INFO_HAS_MSG_NUM )
#define IDE_HAS_LNK_FILE( x ) ( ((x)->flags) & IDE_INFO_HAS_LNK_FILE )
#define IDE_HAS_LNK_SYMBOL( x ) ( ((x)->flags) & IDE_INFO_HAS_LNK_SYMBOL )
#define IDE_HAS_MSG_GRP( x ) ( ((x)->flags) & IDE_INFO_HAS_MSG_GRP )
typedef struct IDEMsgInfo { // IDE MESSAGE INFORMATION
IDEMsgSeverity severity; // - severity code
// Message Information Present
unsigned long flags;
// Help Iinformation
char const *helpfile; // - name of help file
unsigned long helpid; // - help identifier
// Message Information
const char *msg; // - message
char const *src_symbol; // - symbol
char const *src_file; // - source/link-file name
unsigned long src_line; // - source-file line
unsigned long src_col; // - source-file column
unsigned long msg_no; // - message number
char msg_group[8]; // - message group
} IDEMsgInfo;
#define __IdeMsgClass \
_IdeMsgClass( LINE_COL ) \
, _IdeMsgClass( LINE ) \
, _IdeMsgClass( FILE ) \
, _IdeMsgClass( GENERIC ) \
, _IdeMsgClass( SYMBOL ) \
, _IdeMsgClass( SYMBOL_FILE )
typedef unsigned IDEMsgClass;
enum {
# define _IdeMsgClass(a) IDEMSGINFO_ ## a
__IdeMsgClass
# undef _IdeMsgClass
};
/*******************************************
* Output Information structure used by
* version 2 DLL's
*******************************************/
typedef struct {
unsigned line; // line where error occurred
unsigned column; // column where error occurred
const char *file; // source file where error occurred
} LineColErr;
typedef struct {
unsigned line; // line where error occurred
const char *file; // source file where error occurred
} LineErr;
typedef struct {
const char *file; // source file where error occurred
} FileErr;
// these structures are for use by the linker
typedef struct {
const char *symbol; // symbol that caused the error
const char *file; // file where the symbol was referenced
} SymbolFileErr;
typedef struct {
const char *symbol; // symbol that caused the error
} SymbolErr;
typedef struct IDEMsgInfo2 {
IDEMsgSeverity severity;
const char *msg;
const char *helpfile;
unsigned long helpid; /* only used if helpfile is non NULL */
IDEMsgClass type;
union {
LineColErr line_col;
LineErr line;
FileErr file;
SymbolFileErr sym_file;
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?