/* Copyright (c) 1998, 1999, 2000 Thai Open Source Software Center Ltd
See the file COPYING for copying permission.
*/
#include <stddef.h>
#include <string.h> /* memset(), memcpy() */
#include <assert.h>
#include <limits.h> /* UINT_MAX */
#include <time.h> /* time() */
#define XML_BUILDING_EXPAT 1
#ifdef COMPILED_FROM_DSP
#include "winconfig.h"
#elif defined(MACOS_CLASSIC)
#include "macconfig.h"
#elif defined(__amigaos__)
#include "amigaconfig.h"
#elif defined(__WATCOMC__)
#include "watcomconfig.h"
#elif defined(HAVE_EXPAT_CONFIG_H)
#include <expat_config.h>
#endif /* ndef COMPILED_FROM_DSP */
#include "ascii.h"
#include "expat.h"
#ifdef XML_UNICODE
#define XML_ENCODE_MAX XML_UTF16_ENCODE_MAX
#define XmlConvert XmlUtf16Convert
#define XmlGetInternalEncoding XmlGetUtf16InternalEncoding
#define XmlGetInternalEncodingNS XmlGetUtf16InternalEncodingNS
#define XmlEncode XmlUtf16Encode
/* Using pointer subtraction to convert to integer type. */
#define MUST_CONVERT(enc, s) (!(enc)->isUtf16 || (((char *)(s) - (char *)NULL) & 1))
typedef unsigned short ICHAR;
#else
#define XML_ENCODE_MAX XML_UTF8_ENCODE_MAX
#define XmlConvert XmlUtf8Convert
#define XmlGetInternalEncoding XmlGetUtf8InternalEncoding
#define XmlGetInternalEncodingNS XmlGetUtf8InternalEncodingNS
#define XmlEncode XmlUtf8Encode
#define MUST_CONVERT(enc, s) (!(enc)->isUtf8)
typedef char ICHAR;
#endif
#ifndef XML_NS
#define XmlInitEncodingNS XmlInitEncoding
#define XmlInitUnknownEncodingNS XmlInitUnknownEncoding
#undef XmlGetInternalEncodingNS
#define XmlGetInternalEncodingNS XmlGetInternalEncoding
#define XmlParseXmlDeclNS XmlParseXmlDecl
#endif
#ifdef XML_UNICODE
#ifdef XML_UNICODE_WCHAR_T
#define XML_T(x) (const wchar_t)x
#define XML_L(x) L ## x
#else
#define XML_T(x) (const unsigned short)x
#define XML_L(x) x
#endif
#else
#define XML_T(x) x
#define XML_L(x) x
#endif
/* Round up n to be a multiple of sz, where sz is a power of 2. */
#define ROUND_UP(n, sz) (((n) + ((sz) - 1)) & ~((sz) - 1))
/* Handle the case where memmove() doesn't exist. */
#ifndef HAVE_MEMMOVE
#ifdef HAVE_BCOPY
#define memmove(d,s,l) bcopy((s),(d),(l))
#else
#error memmove does not exist on this platform, nor is a substitute available
#endif /* HAVE_BCOPY */
#endif /* HAVE_MEMMOVE */
#include "internal.h"
#include "xmltok.h"
#include "xmlrole.h"
typedef const XML_Char *KEY;
typedef struct {
KEY name;
} NAMED;
typedef struct {
NAMED **v;
unsigned char power;
size_t size;
size_t used;
const XML_Memory_Handling_Suite *mem;
} HASH_TABLE;
/* Basic character hash algorithm, taken from Python's string hash:
h = h * 1000003 ^ character, the constant being a prime number.
*/
#ifdef XML_UNICODE
#define CHAR_HASH(h, c) \
(((h) * 0xF4243) ^ (unsigned short)(c))
#else
#define CHAR_HASH(h, c) \
(((h) * 0xF4243) ^ (unsigned char)(c))
#endif
/* For probing (after a collision) we need a step size relative prime
to the hash table size, which is a power of 2. We use double-hashing,
since we can calculate a second hash value cheaply by taking those bits
of the first hash value that were discarded (masked out) when the table
index was calculated: index = hash & mask, where mask = table->size - 1.
We limit the maximum step size to table->size / 4 (mask >> 2) and make
it odd, since odd numbers are always relative prime to a power of 2.
*/
#define SECOND_HASH(hash, mask, power) \
((((hash) & ~(mask)) >> ((power) - 1)) & ((mask) >> 2))
#define PROBE_STEP(hash, mask, power) \
((unsigned char)((SECOND_HASH(hash, mask, power)) | 1))
typedef struct {
NAMED **p;
NAMED **end;
} HASH_TABLE_ITER;
#define INIT_TAG_BUF_SIZE 32 /* must be a multiple of sizeof(XML_Char) */
#define INIT_DATA_BUF_SIZE 1024
#define INIT_ATTS_SIZE 16
#define INIT_ATTS_VERSION 0xFFFFFFFF
#define INIT_BLOCK_SIZE 1024
#define INIT_BUFFER_SIZE 1024
#define EXPAND_SPARE 24
typedef struct binding {
struct prefix *prefix;
struct binding *nextTagBinding;
struct binding *prevPrefixBinding;
const struct attribute_id *attId;
XML_Char *uri;
int uriLen;
int uriAlloc;
} BINDING;
typedef struct prefix {
const XML_Char *name;
BINDING *binding;
} PREFIX;
typedef struct {
const XML_Char *str;
const XML_Char *localPart;
const XML_Char *prefix;
int strLen;
int uriLen;
int prefixLen;
} TAG_NAME;
/* TAG represents an open element.
The name of the element is stored in both the document and API
encodings. The memory buffer 'buf' is a separately-allocated
memory area which stores the name. During the XML_Parse()/
XMLParseBuffer() when the element is open, the memory for the 'raw'
version of the name (in the document encoding) is shared with the
document buffer. If the element is open across calls to
XML_Parse()/XML_ParseBuffer(), the buffer is re-allocated to
contain the 'raw' name as well.
A parser re-uses these structures, maintaining a list of allocated
TAG objects in a free list.
*/
typedef struct tag {
struct tag *parent; /* parent of this element */
const char *rawName; /* tagName in the original encoding */
int rawNameLength;
TAG_NAME name; /* tagName in the API encoding */
char *buf; /* buffer for name components */
char *bufEnd; /* end of the buffer */
BINDING *bindings;
} TAG;
typedef struct {
const XML_Char *name;
const XML_Char *textPtr;
int textLen; /* length in XML_Chars */
int processed; /* # of processed bytes - when suspended */
const XML_Char *systemId;
const XML_Char *base;
const XML_Char *publicId;
const XML_Char *notation;
XML_Bool open;
XML_Bool is_param;
XML_Bool is_internal; /* true if declared in internal subset outside PE */
} ENTITY;
typedef struct {
enum XML_Content_Type type;
enum XML_Content_Quant quant;
const XML_Char * name;
int firstchild;
int lastchild;
int childcnt;
int nextsib;
} CONTENT_SCAFFOLD;
#define INIT_SCAFFOLD_ELEMENTS 32
typedef struct block {
struct block *next;
int size;
XML_Char s[1];
} BLOCK;
typedef struct {
BLOCK *blocks;
BLOCK *freeBlocks;
const XML_Char *end;
XML_Char *ptr;
XML_Char *start;
const XML_Memory_Handling_Suite *mem;
} STRING_POOL;
/* The XML_Char before the name is used to determine whether
an attribute has been specified. */
typedef struct attribute_id {
XML_Char *name;
PREFIX *prefix;
XML_Bool maybeTokenized;
XML_Bool xmlns;
} ATTRIBUTE_ID;
typedef struct {
const ATTRIBUTE_ID *id;
XML_Bool isCdata;
const XML_Char *value;
} DEFAULT_ATTRIBUTE;
typedef struct {
unsigned long version;
unsigned long hash;
const XML_Char *uriName;
} NS_ATT;
typedef struct {
const XML_Char *name;
PREFIX *prefix;
const ATTRIBUTE_ID *idAtt;
int nDefaultAtts;
int allocDefaultAtts;
DEFAULT_ATTRIBUTE *defaultAtts;
} ELEMENT_TYPE;
typedef struct {
HASH_TABLE generalEntities;
HASH_TABLE elementTypes;
HASH_TABLE attributeIds;
HASH_TABLE prefixes;
STRING_POOL pool;
STRING_POOL entityValuePool;
/* false once a parameter entity reference has been skipped */
XML_Bool keepProcessing;
/* true once an internal or external PE reference has been encountered;
this includes the reference to an external subset */
XML_Bool hasParamEntityRefs;
XML_Bool standalone;
#ifdef XML_DTD
/* indicates if external PE has been read */
XML_Bool paramEntityRead;
HASH_TABLE paramEntities;
#endif /* XML_DTD */
PREFIX defaultPrefix;
/* === scaffolding for building content model === */
XML_Bool in_eldecl;
CONTENT_SCAFFOLD *scaffold;
unsigned contentStringLen;
unsigned scaffSize;
unsigned scaffCount;
int scaffLevel;
int *scaffIndex;
} DTD;
typedef struct open_internal_entity {
const char *internalEventPtr;
co
没有合适的资源?快使用搜索试试~ 我知道了~
qt5.8 msvc2015 +activemq
共1558个文件
h:849个
cpp:650个
c:19个
需积分: 11 2 下载量 40 浏览量
2022-08-05
19:12:30
上传
评论
收藏 42.21MB ZIP 举报
温馨提示
qt5.8 msvc2015 加载activemq 成功自发自首,编写了模块,可以自行下载,activemq里面的dll,也都存在, 调用方法 CSpiderPluginAMq::GetInstance()->InitNetwork(); CSpiderPluginAMq::GetInstance()->SetLocalTopic("spd"); CSpiderPluginAMq::GetInstance()->SetMqParam("192.168.110.149",61616,"admin","admin"); CSpiderPluginAMq::GetInstance()->SendMessage("123,hello","spd",0); 消息发送成功
资源详情
资源评论
资源推荐
收起资源包目录
qt5.8 msvc2015 +activemq (1558个子文件)
Makefile.am 60KB
xmlparse.c 193KB
deflate.c 66KB
inflate.c 51KB
trees.c 44KB
xmltok_impl.c 44KB
xmltok.c 40KB
xmlrole.c 32KB
infback.c 22KB
gzread.c 20KB
gzwrite.c 14KB
gzlib.c 14KB
inftrees.c 13KB
crc32.c 13KB
inffast.c 13KB
zutil.c 7KB
adler32.c 5KB
xmltok_ns.c 3KB
uncompr.c 2KB
gzclose.c 678B
ActiveMQConsumerKernel.cpp 86KB
ActiveMQConnection.cpp 73KB
AbstractQueuedSynchronizer.cpp 64KB
ThreadPoolExecutor.cpp 61KB
ActiveMQSessionKernel.cpp 54KB
Threading.cpp 54KB
FailoverTransport.cpp 49KB
String.cpp 47KB
AdvisorySupport.cpp 44KB
ReentrantReadWriteLock.cpp 41KB
ActiveMQConnectionFactory.cpp 35KB
ConnectionStateTracker.cpp 34KB
ActiveMQStreamMessage.cpp 32KB
Message.cpp 31KB
URI.cpp 31KB
AbstractStringBuilder.cpp 29KB
ByteArrayAdapter.cpp 25KB
TcpSocket.cpp 25KB
BaseDataStreamMarshaller.cpp 25KB
OpenSSLSocket.cpp 24KB
BitSet.cpp 24KB
ActiveMQTransactionContext.cpp 24KB
StompWireFormat.cpp 23KB
Socket.cpp 23KB
ByteArrayBuffer.cpp 22KB
CmsTemplate.cpp 22KB
ActiveMQBytesMessage.cpp 21KB
URIHelper.cpp 21KB
MessageMarshaller.cpp 20KB
ConsumerInfo.cpp 19KB
Properties.cpp 18KB
OpenWireFormat.cpp 18KB
MD5MessageDigestSpi.cpp 17KB
PrimitiveValueNode.cpp 16KB
System.cpp 16KB
Timer.cpp 16KB
InactivityMonitor.cpp 16KB
ActiveMQMapMessage.cpp 16KB
PlatformThread.cpp 16KB
PrimitiveTypesMarshaller.cpp 15KB
DataInputStream.cpp 15KB
MD4MessageDigestSpi.cpp 15KB
Deflater.cpp 15KB
URL.cpp 15KB
CharBuffer.cpp 14KB
PlatformThread.cpp 14KB
ActiveMQMessageTransformation.cpp 14KB
URISupport.cpp 14KB
Math.cpp 14KB
BackupTransportPool.cpp 14KB
MessageAck.cpp 14KB
StringBuffer.cpp 14KB
Long.cpp 14KB
UUID.cpp 13KB
StompHelper.cpp 13KB
Inflater.cpp 13KB
BrokerInfo.cpp 13KB
ConsumerInfoMarshaller.cpp 13KB
ConnectionInfo.cpp 13KB
SHA1MessageDigestSpi.cpp 13KB
WireFormatInfo.cpp 12KB
XATransactionId.cpp 12KB
TcpTransport.cpp 12KB
Integer.cpp 12KB
ActiveMQMessageAudit.cpp 12KB
ResponseCorrelator.cpp 12KB
ActiveMQProducerKernel.cpp 12KB
ActiveMQDestinationSource.cpp 12KB
ServerSocket.cpp 12KB
IOTransport.cpp 12KB
DataOutputStream.cpp 11KB
BufferedInputStream.cpp 11KB
ActiveMQDestination.cpp 11KB
StompFrame.cpp 11KB
ReentrantLock.cpp 11KB
CharArrayBuffer.cpp 11KB
OpenSSLContextSpi.cpp 11KB
Thread.cpp 11KB
HexStringParser.cpp 11KB
BrokerInfoMarshaller.cpp 11KB
共 1558 条
- 1
- 2
- 3
- 4
- 5
- 6
- 16
foxgod
- 粉丝: 61
- 资源: 14
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
- springboot-基于Springboot的本科实践教学管理系统
- RuoYi-Vue 全新 Pro 版本,优化重构所有功能 基于 Spring Boot + MyBatis Plus + Vue & Element 实现的后台管理系统 + 微信小程序
- ROS机器人开发实践源码
- 基于 Markdown 格式的多功能转换服务,支持将 PowerPoint、Word、Excel、图像、音频和 HTML 等文件转化为 Markdown 格式
- java的概要介绍与分析
- MoonBit 编译器.MoonBit - 文档 - 概览 - 标准库.MoonBit 是一个用户友好,构建快,产出质量高的编程语言
- 解决微电网调度中的两阶段鲁棒优化问题,考虑了风电出力和负荷功率的不确定性,通过迭代求解主问题和子问题,最终得到最优的调度方案,并绘制了风电出力、负荷功率、购售电功率、充放电功率和储能调度结果等相关图表
- wireshark免安装版本 WiresharkPortable64-4.4.2
- springboot-基于springboot的房屋租赁管理系统
- ssm员工工作日志管理系统-lw.zip
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功
评论0