text
stringlengths
121
672k
/* * This file is part of the bitcoin-classic project * Copyright (C) 2016 Tom Zander <tomz@freedommail.ch> * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. */ #include "NetworkManager.h" #include "NetworkManager_p.h" #include "NetworkEnums.h" #include <streaming/MessageBuilder.h> #include <streaming/MessageParser.h> #include <boost/lexical_cast.hpp> #include <boost/make_shared.hpp> #include <util.h> // #define DEBUG_CONNECTIONS static const int RECEIVE_STREAM_SIZE = 41000; static const int CHUNK_SIZE = 8000; static const int MAX_MESSAGE_SIZE = 9000; namespace { int reconnectTimeoutForStep(short step) { if (step < 6) return step*step*step; return 300; // 5 min } } NetworkManager::NetworkManager(boost::asio::io_service &service) : d(std::make_shared<NetworkManagerPrivate>(service)) { } NetworkManager::~NetworkManager() { boost::recursive_mutex::scoped_lock lock(d->mutex); d->isClosingDown = true; for (auto server : d->servers) { server->shutdown(); } for (auto it = d->connections.begin(); it != d->connections.end(); ++it) { it->second->shutdown(it->second); } d->connections.clear(); // invalidate NetworkConnection references } NetworkConnection NetworkManager::connection(const EndPoint &remote, ConnectionEnum connect) { const bool hasHostname = !remote.ipAddress.is_unspecified() && remote.announcePort > 0; if (hasHostname) { boost::recursive_mutex::scoped_lock lock(d->mutex); for (auto iter1 = d->connections.begin(); iter1 != d->connections.end(); ++iter1) { EndPoint endPoint = iter1->second->endPoint(); if (endPoint.ipAddress != remote.ipAddress) continue; if (!(endPoint.announcePort == 0 || endPoint.announcePort == remote.announcePort || remote.announcePort == 0)) continue; return NetworkConnection(this, iter1->first); } if (connect == AutoCreate) { EndPoint ep(remote); ep.peerPort = ep.announcePort; // outgoing connections always have those the same. ep.connectionId = ++d->lastConnectionId; d->connections.insert(std::make_pair(ep.connectionId, std::make_shared<NetworkManagerConnection>(d, ep))); return NetworkConnection(this, ep.connectionId); } } return NetworkConnection(); } EndPoint NetworkManager::endPoint(int remoteId) const { boost::recursive_mutex::scoped_lock lock(d->mutex); NetworkManagerConnection *con = d->connections.at(remoteId).get(); if (con) return con->endPoint(); return EndPoint(); } void NetworkManager::punishNode(int remoteId, int punishment) { d->punishNode(remoteId, punishment); } void NetworkManager::bind(tcp::endpoint endpoint, const std::function<void(NetworkConnection&)> &callback) { boost::recursive_mutex::scoped_lock lock(d->mutex); try { NetworkManagerServer *server = new NetworkManagerServer(d, endpoint, callback); d->servers.push_back(server); } catch (std::exception &ex) { logWarning(Log::NWM) << "Creating NetworkMangerServer failed with" << ex.what(); throw std::runtime_error("Failed to bind to endpoint"); } if (d->servers.size() == 1) // start cron d->cronHourly(boost::system::error_code()); } std::weak_ptr<NetworkManagerPrivate> NetworkManager::priv() { return d; } ///////////////////////////////////// NetworkManagerPrivate::NetworkManagerPrivate(boost::asio::io_service &service) : ioService(service), lastConnectionId(0), isClosingDown(false), m_cronHourly(service) { } NetworkManagerPrivate::~NetworkManagerPrivate() { } void NetworkManagerPrivate::punishNode(int connectionId, int punishScore) { boost::recursive_mutex::scoped_lock lock(mutex); auto con = connections.find(connectionId); if (con == connections.end()) return; con->second->m_punishment += punishScore; if (con->second->m_punishment >= 1000) { BannedNode bn; bn.endPoint = con->second->endPoint(); bn.banTimeout = boost::posix_time::second_clock::universal_time() + boost::posix_time::hours(24); logInfo(Log::NWM) << "Banned node for 24 hours due to excessive bad behavior" << bn.endPoint.hostname; banned.push_back(bn); connections.erase(connectionId); con->second->shutdown(con->second); } } void NetworkManagerPrivate::cronHourly(const boost::system::error_code &error) { if (error) return; logDebug(Log::NWM) << "cronHourly"; boost::recursive_mutex::scoped_lock lock(mutex); if (isClosingDown) return; const auto now = boost::posix_time::second_clock::universal_time(); std::list<BannedNode>::iterator bannedNode = banned.begin(); // clean out banned nodes while (bannedNode != banned.end()) { if (bannedNode->banTimeout < now) bannedNode = banned.erase(bannedNode); else ++bannedNode; } for (auto connection : connections) { connection.second->m_punishment = std::max(0, connection.second->m_punishment - 100); // logDebug(Log::NWM) << "peer ban scrore;" << connection.second->m_punishment; } m_cronHourly.expires_from_now(boost::posix_time::hours(1)); m_cronHourly.async_wait(std::bind(&NetworkManagerPrivate::cronHourly, this, std::placeholders::_1)); } ///////////////////////////////////// NetworkManagerConnection::NetworkManagerConnection(const std::shared_ptr<NetworkManagerPrivate> &parent, tcp::socket socket, int connectionId) : m_strand(parent->ioService), m_punishment(0), d(parent), m_socket(std::move(socket)), m_resolver(parent->ioService), m_messageBytesSend(0), m_messageBytesSent(0), m_receiveStream(RECEIVE_STREAM_SIZE), m_lastCallbackId(1), m_isClosingDown(false), m_firstPacket(true), m_isConnecting(false), m_sendingInProgress(false), m_acceptedConnection(false), m_reconnectStep(0), m_reconnectDelay(parent->ioService), m_pingTimer(parent->ioService), m_chunkedServiceId(-1), m_chunkedMessageId(-1) { m_remote.ipAddress = m_socket.remote_endpoint().address(); m_remote.announcePort = m_socket.remote_endpoint().port(); m_remote.peerPort = 0; m_remote.connectionId = connectionId; } NetworkManagerConnection::NetworkManagerConnection(const std::shared_ptr<NetworkManagerPrivate> &parent, const EndPoint &remote) : m_strand(parent->ioService), m_punishment(0), m_remote(std::move(remote)), d(parent), m_socket(parent->ioService), m_resolver(parent->ioService), m_messageBytesSend(0), m_messageBytesSent(0), m_receiveStream(RECEIVE_STREAM_SIZE), m_lastCallbackId(1), m_isClosingDown(false), m_firstPacket(true), m_isConnecting(false), m_sendingInProgress(false), m_acceptedConnection(false), m_reconnectStep(0), m_reconnectDelay(parent->ioService), m_pingTimer(parent->ioService), m_chunkedServiceId(-1), m_chunkedMessageId(-1) { if (m_remote.peerPort == 0) m_remote.peerPort = m_remote.announcePort; } void NetworkManagerConnection::connect() { if (m_strand.running_in_this_thread()) connect_priv(); else runOnStrand(std::bind(&NetworkManagerConnection::connect_priv, this)); } void NetworkManagerConnection::connect_priv() { assert(m_strand.running_in_this_thread()); if (m_isConnecting) return; if (m_isClosingDown) return; m_isConnecting = true; if (m_remote.ipAddress.is_unspecified()) { tcp::resolver::query query(m_remote.hostname, boost::lexical_cast<std::string>(m_remote.announcePort)); m_resolver.async_resolve(query, m_strand.wrap(std::bind(&NetworkManagerConnection::onAddressResolveComplete, this, std::placeholders::_1, std::placeholders::_2))); } else { m_isConnecting = false; if (m_remote.hostname.empty()) m_remote.hostname = m_remote.ipAddress.to_string(); boost::asio::ip::tcp::endpoint endpoint(m_remote.ipAddress, m_remote.announcePort); m_socket.async_connect(endpoint, m_strand.wrap( std::bind(&NetworkManagerConnection::onConnectComplete, this, std::placeholders::_1))); } } void NetworkManagerConnection::onAddressResolveComplete(const boost::system::error_code &error, tcp::resolver::iterator iterator) { assert(m_strand.running_in_this_thread()); m_isConnecting = false; if (m_isClosingDown) return; if (error) { logDebug(Log::NWM) << "connect;" << error.message(); m_reconnectDelay.expires_from_now(boost::posix_time::seconds(45)); m_reconnectDelay.async_wait(m_strand.wrap(std::bind(&NetworkManagerConnection::reconnectWithCheck, this, std::placeholders::_1))); return; } m_remote.ipAddress = (iterator++)->endpoint().address(); // Notice that we always only use the first reported DNS entry. Which is likely Ok. m_socket.async_connect(*iterator, m_strand.wrap( std::bind(&NetworkManagerConnection::onConnectComplete, this, std::placeholders::_1))); } void NetworkManagerConnection::onConnectComplete(const boost::system::error_code& error) { if (error.value() == boost::asio::error::operation_aborted) return; assert(m_strand.running_in_this_thread()); if (m_isClosingDown) return; if (error) { logDebug(Log::NWM) << "connect;" << error.message(); if (m_remote.peerPort != m_remote.announcePort) // incoming connection return; m_reconnectDelay.expires_from_now(boost::posix_time::seconds(reconnectTimeoutForStep(++m_reconnectStep))); m_reconnectDelay.async_wait(m_strand.wrap(std::bind(&NetworkManagerConnection::reconnectWithCheck, this, std::placeholders::_1))); return; } logInfo(Log::NWM) << "Successfully connected to" << m_remote.hostname << m_remote.announcePort; for (auto it = m_onConnectedCallbacks.begin(); it != m_onConnectedCallbacks.end(); ++it) { try { it->second(m_remote); } catch (const std::exception &ex) { logWarning(Log::NWM) << "onConnected threw exception, ignoring:" << ex.what(); } } // setup a callback for receiving. m_receiveStream.reserve(MAX_MESSAGE_SIZE); m_socket.async_receive(boost::asio::buffer(m_receiveStream.data(), m_receiveStream.capacity()), m_strand.wrap(std::bind(&NetworkManagerConnection::receivedSomeBytes, this, std::placeholders::_1, std::placeholders::_2))); if (m_remote.peerPort == m_remote.announcePort) { // for outgoing connections, ping. m_pingTimer.expires_from_now(boost::posix_time::seconds(90)); m_pingTimer.async_wait(m_strand.wrap(std::bind(&NetworkManagerConnection::sendPing, this, std::placeholders::_1))); } else { // for incoming connections, take action when no ping comes in. m_pingTimer.expires_from_now(boost::posix_time::seconds(120)); m_pingTimer.async_wait(m_strand.wrap(std::bind(&NetworkManagerConnection::pingTimeout, this, std::placeholders::_1))); } runMessageQueue(); } Streaming::ConstBuffer NetworkManagerConnection::createHeader(const Message &message) { m_sendHelperBuffer.reserve(20); Streaming::MessageBuilder builder(m_sendHelperBuffer, Streaming::HeaderOnly); assert(message.serviceId() >= 0); const auto map = message.headerData(); auto iter = map.begin(); while (iter != map.end()) { builder.add(iter->first, iter->second); ++iter; } builder.add(Network::HeaderEnd, true); builder.setMessageSize(m_sendHelperBuffer.size() + message.size()); logDebug(Log::NWM) << "createHeader of message of length;" << m_sendHelperBuffer.size() << '+' << message.size(); return builder.buffer(); } void NetworkManagerConnection::runMessageQueue() { assert(m_strand.running_in_this_thread()); if (m_sendingInProgress || m_isConnecting || m_isClosingDown || m_messageQueue.empty() || !isConnected()) return; assert(m_messageBytesSend <= m_messageQueue.front().rawData().size()); m_sendingInProgress = true; /* * This method will schedule sending of data. * The data to send is pushed async to the network stack and the callback will come in essentially * the moment the network stack has accepted the data. This is not at all any confirmation that * the other side accepted it! * But at the same time, the network stack has limited buffers and will only push to the network * an amount based on the TCP window size. So at minimum we know that the speed with which we * send stuff is indicative of the throughput. * * The idea here is to send a maximum amount of 250KB at a time. Which should be enough to avoid * delays. The speed limiter here mean we still allow messages that were pushed to the front of the * queue to be handled at a good speed. */ int bytesLeft = 250*1024; std::vector<Streaming::ConstBuffer> socketQueue; // the stuff we will send over the socket std::list<Message>::iterator iter = m_priorityMessageQueue.begin(); while (iter != m_priorityMessageQueue.end()) { const Message &message = *iter; if (!iter->hasHeader()) { // build a simple header const Streaming::ConstBuffer constBuf = createHeader(message); bytesLeft -= constBuf.size(); socketQueue.push_back(constBuf); m_sendQHeaders.push_back(constBuf); } socketQueue.push_back(message.rawData()); bytesLeft -= message.rawData().size(); m_sentPriorityMessages.push_back(message); iter = m_priorityMessageQueue.erase(iter); if (bytesLeft <= 0) break; } for (const Message &message : m_messageQueue) { if (bytesLeft <= 0) break; if (message.rawData().size() > CHUNK_SIZE) { assert(!message.hasHeader()); // should have been blocked from entering in queueMessage(); /* * The maximum size of a message is 9KB. This helps a lot with memory allocations and zero-copy ;) * A large message is then split into smaller ones and send with individual headers * to the other side where they can be re-connected. */ Streaming::ConstBuffer body(message.body()); const char *begin = body.begin() + m_messageBytesSend; const char *end = body.end(); Streaming::MessageBuilder headerBuilder(m_sendHelperBuffer, Streaming::HeaderOnly); Streaming::ConstBuffer chunkHeader;// the first and last are different, but all the ones in the middle are duplicates. bool first = m_messageBytesSend == 0; while (begin < end) { const char *p = begin + CHUNK_SIZE; if (p > end) p = end; m_messageBytesSend += p - begin; Streaming::ConstBuffer bodyChunk(body.internal_buffer(), begin, p); begin = p; Streaming::ConstBuffer header; if (first || begin == end || !chunkHeader.isValid()) { m_sendHelperBuffer.reserve(20); headerBuilder.add(Network::ServiceId, message.serviceId()); if (message.messageId() >= 0) headerBuilder.add(Network::MessageId, message.messageId()); if (first) headerBuilder.add(Network::SequenceStart, body.size()); headerBuilder.add(Network::LastInSequence, (begin == end)); headerBuilder.add(Network::HeaderEnd, true); headerBuilder.setMessageSize(m_sendHelperBuffer.size() + bodyChunk.size()); header = headerBuilder.buffer(); if (!first) chunkHeader = header; first = false; } else { header = chunkHeader; } bytesLeft -= header.size(); socketQueue.push_back(header); m_sendQHeaders.push_back(header); socketQueue.push_back(bodyChunk); bytesLeft -= bodyChunk.size(); if (bytesLeft <= 0) break; } if (begin >= end) // done with message. m_messageBytesSend = 0; } else { if (!message.hasHeader()) { // build a simple header const Streaming::ConstBuffer constBuf = createHeader(message); bytesLeft -= constBuf.size(); socketQueue.push_back(constBuf); m_sendQHeaders.push_back(constBuf); } socketQueue.push_back(message.rawData()); bytesLeft -= message.rawData().size(); } } assert(m_messageBytesSend >= 0); async_write(m_socket, socketQueue, m_strand.wrap(std::bind(&NetworkManagerConnection::sentSomeBytes, this, std::placeholders::_1, std::placeholders::_2))); } void NetworkManagerConnection::sentSomeBytes(const boost::system::error_code& error, std::size_t bytes_transferred) { if (error.value() == boost::asio::error::connection_aborted) // assume instance already deleted return; assert(m_strand.running_in_this_thread()); m_sendingInProgress = false; if (error) { logWarning(Log::NWM) << "sent error" << error.message(); m_messageBytesSend = 0; m_messageBytesSent = 0; runOnStrand(std::bind(&NetworkManagerConnection::connect, this)); return; } logDebug(Log::NWM) << "Managed to send" << bytes_transferred << "bytes"; m_reconnectStep = 0; // now we remove any message data from our lists so the underlying malloced data can be freed // This is needed since boost asio unfortunately doesn't keep our ref-counted pointers. m_messageBytesSent += bytes_transferred; int bytesLeft = m_messageBytesSent; // We can have data spread over 3 lists, we eat at them in proper order. while (!m_messageQueue.empty() || !m_sentPriorityMessages.empty()) { const Message &message = m_sentPriorityMessages.empty() ? m_messageQueue.front() : m_sentPriorityMessages.front(); const int bodySize = message.rawData().size(); if (bodySize > CHUNK_SIZE) { const unsigned int chunks = std::ceil(bodySize / (float) CHUNK_SIZE); if (m_sendQHeaders.size() < chunks) break; std::list<Streaming::ConstBuffer>::iterator iter = m_sendQHeaders.begin(); for (unsigned int i = 0; i < chunks; ++i) { bytesLeft -= iter->size(); ++iter; } if (bytesLeft < bodySize) break; // still here? Then we remove the message and all the headers for (unsigned int i = 0; i < chunks; ++i) { m_sendQHeaders.erase(m_sendQHeaders.begin()); } } else if (!message.hasHeader()) { assert(!m_sendQHeaders.empty()); const int headerSize = m_sendQHeaders.front().size(); if (headerSize > bytesLeft) break; if (bodySize > bytesLeft - headerSize) break; bytesLeft -= headerSize; // bodysize is subtraced below m_sendQHeaders.erase(m_sendQHeaders.begin()); } else { if (bodySize > bytesLeft) break; } assert(bodySize <= bytesLeft); bytesLeft -= bodySize; if (m_sentPriorityMessages.empty()) m_messageQueue.erase(m_messageQueue.begin()); else m_sentPriorityMessages.erase(m_sentPriorityMessages.begin()); if (bytesLeft <= 0) break; } m_messageBytesSent = bytesLeft; runMessageQueue(); } void NetworkManagerConnection::receivedSomeBytes(const boost::system::error_code& error, std::size_t bytes_transferred) { if (error.value() == boost::asio::error::connection_aborted) // assume instance already deleted return; if (m_isClosingDown) return; assert(m_strand.running_in_this_thread()); logDebug(Log::NWM) << ((void*) this) << "receivedSomeBytes" << bytes_transferred; if (error) { logDebug(Log::NWM) << "receivedSomeBytes errored:" << error.message(); // first copy to avoid problems if a callback removes its callback or closes the connection. std::vector<std::function<void(const EndPoint&)> > callbacks; callbacks.reserve(m_onDisConnectedCallbacks.size()); for (auto it = m_onDisConnectedCallbacks.begin(); it != m_onDisConnectedCallbacks.end(); ++it) { callbacks.push_back(it->second); } for (auto callback : callbacks) { try { callback(m_remote); } catch (const std::exception &ex) { logWarning(Log::NWM) << "onDisconnected caused exception, ignoring:" << ex; } } close(); m_firstPacket = true; return; } m_receiveStream.markUsed(bytes_transferred); // move write pointer while (true) { // get all packets out const size_t blockSize = m_receiveStream.size(); if (blockSize < 4) // need more data break; Streaming::ConstBuffer data = m_receiveStream.createBufferSlice(m_receiveStream.begin(), m_receiveStream.end()); if (m_firstPacket) { m_firstPacket = false; if (data.begin()[2] != 8) { // Positive integer (0) and Network::ServiceId (1 << 3) logWarning(Log::NWM) << "receive; Data error from server - this is NOT an NWM server. Disconnecting"; close(); return; } } const unsigned int rawHeader = *(reinterpret_cast<const unsigned int*>(data.begin())); const int packetLength = (rawHeader & 0xFFFF); logDebug(Log::DebugLevel) << "Processing incoming packet. Size" << packetLength; if (packetLength > MAX_MESSAGE_SIZE) { logWarning(Log::NWM) << "receive; Data error from server- stream is corrupt"; close(); return; } if (data.size() < packetLength) // do we have all data for this one? break; if (!processPacket(m_receiveStream.internal_buffer(), data.begin())) return; m_receiveStream.forget(packetLength); } m_receiveStream.reserve(MAX_MESSAGE_SIZE); m_socket.async_receive(boost::asio::buffer(m_receiveStream.data(), m_receiveStream.capacity()), m_strand.wrap(std::bind(&NetworkManagerConnection::receivedSomeBytes, this, std::placeholders::_1, std::placeholders::_2))); } bool NetworkManagerConnection::processPacket(const std::shared_ptr<char> &buffer, const char *data) { assert(m_strand.running_in_this_thread()); const unsigned int rawHeader = *(reinterpret_cast<const unsigned int*>(data)); const int packetLength = (rawHeader & 0xFFFF); logDebug(Log::NWM) << "Receive packet length" << packetLength; Streaming::MessageParser parser(const_cast<char*>(data + 2), packetLength - 2); Streaming::ParsedType type = parser.next(); int headerSize = 0; int messageId = -1; int serviceId = -1; int lastInSequence = -1; int sequenceSize = -1; bool isPing = false; // TODO have a variable on the NetworkManger that indicates the maximum allowed combined message-size. bool inHeader = true; while (inHeader && type == Streaming::FoundTag) { switch (parser.tag()) { case Network::HeaderEnd: headerSize = parser.consumed(); inHeader = false; break; case Network::MessageId: if (!parser.isInt()) { close(); return false; } messageId = parser.intData(); break; case Network::ServiceId: if (!parser.isInt()) { close(); return false; } serviceId = parser.intData(); break; case Network::LastInSequence: if (!parser.isBool()) { close(); return false; } lastInSequence = parser.boolData() ? 1 : 0; break; case Network::SequenceStart: if (!parser.isInt()) { close(); return false; } sequenceSize = parser.intData(); break; case Network::Ping: isPing = true; break; } type = parser.next(); } if (serviceId == -1) { // an obligatory field logWarning(Log::NWM) << "peer sent message without serviceId"; close(); return false; } if (serviceId == Network::SystemServiceId) { // Handle System level messages if (isPing) { if (m_pingMessage.rawData().size() == 0) { Streaming::MessageBuilder builder(Streaming::HeaderOnly, 10); builder.add(Network::ServiceId, Network::SystemServiceId); builder.add(Network::Pong, true); builder.add(Network::HeaderEnd, true); m_pingMessage = builder.message(); } m_messageQueue.push_back(m_pingMessage); m_pingTimer.cancel(); runMessageQueue(); m_pingTimer.expires_from_now(boost::posix_time::seconds(120)); m_pingTimer.async_wait(m_strand.wrap(std::bind(&NetworkManagerConnection::pingTimeout, this, std::placeholders::_1))); } return true; } Message message; // we assume they are in sequence (which is Ok with TCP sockets), but we don't assume that // each packet is part of the sequence. if (lastInSequence != -1) { if (sequenceSize != -1) { if (m_chunkedMessageId != -1 || m_chunkedServiceId != -1) { // Didn't finish another. Thats illegal. logWarning(Log::NWM) << "peer sent sequenced message with wrong combination of headers"; close(); return false; } m_chunkedMessageId = messageId; m_chunkedServiceId = serviceId; m_chunkedMessageBuffer = Streaming::BufferPool(sequenceSize); } else if (m_chunkedMessageId != messageId || m_chunkedServiceId != serviceId) { // Changed. Thats illegal. close(); logWarning(Log::NWM) << "peer sent sequenced message with inconsistent service/messageId"; return false; } const int bodyLength = packetLength - headerSize - 2; if (m_chunkedMessageBuffer.capacity() < bodyLength) { logWarning(Log::NWM) << "peer sent sequenced message with too much data"; return false; } logDebug(Log::NWM) << "Message received as part of sequence; last:" << lastInSequence << "total-size:" << sequenceSize; std::copy(data + headerSize + 2, data + packetLength, m_chunkedMessageBuffer.data()); m_chunkedMessageBuffer.markUsed(bodyLength); if (lastInSequence == 0) return true; message = Message(m_chunkedMessageBuffer.commit(), m_chunkedServiceId); m_chunkedMessageId = -1; m_chunkedServiceId = -1; m_chunkedMessageBuffer.clear(); } else { message = Message(buffer, data + 2, data + 2 + headerSize, data + packetLength); } message.setMessageId(messageId); message.setServiceId(serviceId); message.remote = m_remote.connectionId; // first copy to avoid problems if a callback removes its callback or closes the connection. std::vector<std::function<void(const Message&)> > callbacks; callbacks.reserve(m_onIncomingMessageCallbacks.size()); for (auto it = m_onIncomingMessageCallbacks.begin(); it != m_onIncomingMessageCallbacks.end(); ++it) { callbacks.push_back(it->second); } for (auto callback : callbacks) { try { callback(message); } catch (const std::exception &ex) { logWarning(Log::NWM) << "onIncomingMessage threw exception, ignoring:" << ex; } if (!m_socket.is_open()) break; } return m_socket.is_open(); // if the user called disconnect, then stop processing packages } void NetworkManagerConnection::addOnConnectedCallback(int id, const std::function<void(const EndPoint&)> &callback) { assert(m_strand.running_in_this_thread()); m_onConnectedCallbacks.insert(std::make_pair(id, callback)); } void NetworkManagerConnection::addOnDisconnectedCallback(int id, const std::function<void(const EndPoint&)> &callback) { assert(m_strand.running_in_this_thread()); m_onDisConnectedCallbacks.insert(std::make_pair(id, callback)); } void NetworkManagerConnection::addOnIncomingMessageCallback(int id, const std::function<void(const Message&)> &callback) { assert(m_strand.running_in_this_thread()); m_onIncomingMessageCallbacks.insert(std::make_pair(id, callback)); } void NetworkManagerConnection::queueMessage(const Message &message, NetworkConnection::MessagePriority priority) { if (!message.hasHeader() && message.serviceId() == -1) { logWarning(Log::NWM) << "queueMessage: Can't deliver a message with unset service ID"; #ifdef DEBUG_CONNECTIONS assert(false); #endif return; } if (message.hasHeader() && message.body().size() > CHUNK_SIZE) { logWarning(Log::NWM) << "queueMessage: Can't send large message and can't auto-chunk because it already has a header"; #ifdef DEBUG_CONNECTIONS assert(false); #endif return; } if (priority == NetworkConnection::HighPriority && message.rawData().size() > CHUNK_SIZE) { logWarning(Log::NWM) << "queueMessage: Can't send large message in the priority queue"; #ifdef DEBUG_CONNECTIONS assert(false); #endif return; } if (m_strand.running_in_this_thread()) { if (priority == NetworkConnection::NormalPriority) m_messageQueue.push_back(message); else m_priorityMessageQueue.push_back(message); if (isConnected()) runMessageQueue(); else connect_priv(); } else { runOnStrand(std::bind(&NetworkManagerConnection::queueMessage, this, message, priority)); } } void NetworkManagerConnection::close(bool reconnect) { assert(m_strand.running_in_this_thread()); if (!isOutgoing()) { boost::recursive_mutex::scoped_lock lock(d->mutex); shutdown(d->connections.at(m_remote.connectionId)); d->connections.erase(m_remote.connectionId); return; } m_receiveStream.clear(); m_sendHelperBuffer.clear(); m_chunkedMessageBuffer.clear(); m_messageBytesSend = 0; m_messageBytesSent = 0; m_priorityMessageQueue.clear(); m_sentPriorityMessages.clear(); m_messageQueue.clear(); m_sendQHeaders.clear(); m_socket.close(); m_pingTimer.cancel(); if (reconnect && !m_isClosingDown) { // auto reconnect. if (m_firstPacket) { // this means the network is there, someone is listening. They just don't speak our language. // slow down reconnect due to bad peer. m_reconnectDelay.expires_from_now(boost::posix_time::seconds(15)); m_reconnectDelay.async_wait(m_strand.wrap(std::bind(&NetworkManagerConnection::reconnectWithCheck, this, std::placeholders::_1))); } else { connect_priv(); } } } void NetworkManagerConnection::sendPing(const boost::system::error_code& error) { if (error) return; logDebug(Log::NWM) << "ping"; if (m_isClosingDown) return; assert(m_strand.running_in_this_thread()); if (!m_socket.is_open()) return; if (m_pingMessage.rawData().size() == 0) { Streaming::MessageBuilder builder(Streaming::HeaderOnly, 10); builder.add(Network::ServiceId, Network::SystemServiceId); builder.add(Network::Ping, true); builder.add(Network::HeaderEnd, true); m_pingMessage = builder.message(); } m_messageQueue.push_back(m_pingMessage); runMessageQueue(); m_pingTimer.expires_from_now(boost::posix_time::seconds(90)); m_pingTimer.async_wait(m_strand.wrap(std::bind(&NetworkManagerConnection::sendPing, this, std::placeholders::_1))); } void NetworkManagerConnection::pingTimeout(const boost::system::error_code &error) { if (!error) { logWarning(Log::NWM) << "Didn't receive a ping from peer for too long, disconnecting dead connection"; close(false); } } void NetworkManagerConnection::reconnectWithCheck(const boost::system::error_code& error) { if (!error) { m_socket.close(); connect_priv(); } } int NetworkManagerConnection::nextCallbackId() { return m_lastCallbackId.fetch_add(1); } void NetworkManagerConnection::removeAllCallbacksFor(int id) { assert(m_strand.running_in_this_thread()); m_onConnectedCallbacks.erase(id); m_onDisConnectedCallbacks.erase(id); m_onIncomingMessageCallbacks.erase(id); } void NetworkManagerConnection::shutdown(std::shared_ptr<NetworkManagerConnection> me) { m_isClosingDown = true; if (m_strand.running_in_this_thread()) { m_onConnectedCallbacks.clear(); m_onDisConnectedCallbacks.clear(); m_onIncomingMessageCallbacks.clear(); if (isConnected()) m_socket.close(); m_resolver.cancel(); m_reconnectDelay.cancel(); m_strand.post(std::bind(&NetworkManagerConnection::finalShutdown, this, me)); } else { m_strand.post(std::bind(&NetworkManagerConnection::shutdown, this, me)); } } void NetworkManagerConnection::accept() { if (m_acceptedConnection) return; m_acceptedConnection = true; // setup a callback for receiving. m_socket.async_receive(boost::asio::buffer(m_receiveStream.data(), m_receiveStream.capacity()), m_strand.wrap(std::bind(&NetworkManagerConnection::receivedSomeBytes, this, std::placeholders::_1, std::placeholders::_2))); } void NetworkManagerConnection::runOnStrand(const std::function<void()> &function) { if (m_isClosingDown) return; m_strand.post(function); } void NetworkManagerConnection::punish(int amount) { d->punishNode(m_remote.connectionId, amount); } void NetworkManagerConnection::finalShutdown(std::shared_ptr<NetworkManagerConnection>) { } NetworkManagerServer::NetworkManagerServer(const std::shared_ptr<NetworkManagerPrivate> &parent, tcp::endpoint endpoint, const std::function<void(NetworkConnection&)> &callback) : d(parent), m_acceptor(parent->ioService, endpoint), m_socket(parent->ioService), onIncomingConnection(callback) { setupCallback(); } void NetworkManagerServer::shutdown() { m_socket.close(); } void NetworkManagerServer::setupCallback() { m_acceptor.async_accept(m_socket, std::bind(&NetworkManagerServer::acceptConnection, this, std::placeholders::_1)); } void NetworkManagerServer::acceptConnection(boost::system::error_code error) { if (error.value() == boost::asio::error::operation_aborted) return; logDebug(Log::NWM) << "acceptTcpConnection" << error.message(); if (error) { setupCallback(); return; } std::shared_ptr<NetworkManagerPrivate> priv = d.lock(); if (!priv.get()) return; boost::recursive_mutex::scoped_lock lock(priv->mutex); if (priv->isClosingDown) return; const boost::asio::ip::address peerAddress = m_socket.remote_endpoint().address(); for (const BannedNode &bn : priv->banned) { if (bn.endPoint.ipAddress == peerAddress) { if (bn.banTimeout > boost::posix_time::second_clock::universal_time()) { // incoming connection is banned. logDebug(Log::NWM) << "acceptTcpConnection; closing incoming connection (banned)" << bn.endPoint.hostname; m_socket.close(); } setupCallback(); return; } } const int conId = ++priv->lastConnectionId; logDebug(Log::NWM) << "acceptTcpConnection; creating new connection object" << conId; std::shared_ptr<NetworkManagerConnection> connection = std::make_shared<NetworkManagerConnection>(priv, std::move(m_socket), conId); priv->connections.insert(std::make_pair(conId, connection)); logDebug(Log::NWM) << "Total connections now;" << priv->connections.size(); setupCallback(); // only after we std::move socket, to avoid an "Already open" error NetworkConnection con(connection, conId); onIncomingConnection(con); }
#include <cmath> #include <cstring> #include "chapters.h" #include "vmath.h" using namespace GLFramework; static GLchar * vertex_source = SHADER(450 core, layout (location = 0) in vec4 position; layout (location = 1) in vec4 color; out vec4 vs_color; void main (void) { gl_Position = position; vs_color = color; } ); static GLchar * fragment_source = SHADER(450 core, in vec4 vs_color; out vec4 color; void main (void) { color = vs_color; } ); static GLuint program; static GLuint vao; static GLuint buffer; struct vertex { float x; float y; float z; float r; float g; float b; }; static const float vertices[] = { 0.25, -0.25, 0.5, 1.0, 0.0, 0.0, -0.25, -0.25, 0.5, 0.0, 1.0, 0.0, 0.25, 0.25, 0.5, 0.0, 0.0, 1.0 }; void Chapter5_5::Init (void) { GLuint vertex_shader = CompileShader(GL_VERTEX_SHADER, vertex_source); GLuint fragment_shader = CompileShader(GL_FRAGMENT_SHADER, fragment_source); program = CreateProgram(2, vertex_shader, fragment_shader); glCreateVertexArrays(1, &vao); glBindVertexArray(vao); glCreateBuffers(1, &buffer); glNamedBufferStorage(buffer, sizeof(vertices), vertices, 0); glVertexArrayAttribBinding(vao, 0, 0); glVertexArrayAttribFormat(vao, 0, 3, GL_FLOAT, GL_FALSE, 0); glEnableVertexArrayAttrib(vao, 0); glVertexArrayAttribBinding(vao, 1, 0); glVertexArrayAttribFormat(vao, 1, 3, GL_FLOAT, GL_FALSE, sizeof(float) * 3); glEnableVertexArrayAttrib(vao, 1); glVertexArrayVertexBuffer(vao, 0, buffer, 0, sizeof(vertex)); } void Chapter5_5::Render (double currentTime) { static const GLfloat color[] = { 0.0f, 0.0f, 0.0f, 1.0f }; glClearBufferfv(GL_COLOR, 0, color); glUseProgram(program); glDrawArrays(GL_TRIANGLES, 0, 3); } void Chapter5_5::Shutdown (void) { glDisableVertexArrayAttrib(vao, 0); glDisableVertexArrayAttrib(vao, 1); glDeleteVertexArrays(1, &vao); glDeleteProgram(program); glDeleteVertexArrays(1, &vao); }
//@doc //@class AAFConstantValue | Implementation class for AAFConstantValue #ifndef __ImplAAFConstantValue_h__ #define __ImplAAFConstantValue_h__ //=---------------------------------------------------------------------= // // $Id$ $Name$ // // The contents of this file are subject to the AAF SDK Public Source // License Agreement Version 2.0 (the "License"); You may not use this // file except in compliance with the License. The License is available // in AAFSDKPSL.TXT, or you may obtain a copy of the License from the // Advanced Media Workflow Association, Inc., or its successor. // // Software distributed under the License is distributed on an "AS IS" // basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See // the License for the specific language governing rights and limitations // under the License. Refer to Section 3.3 of the License for proper use // of this Exhibit. // // WARNING: Please contact the Advanced Media Workflow Association, // Inc., for more information about any additional licenses to // intellectual property covering the AAF Standard that may be required // to create and distribute AAF compliant products. // (http://www.amwa.tv/policies). // // Copyright Notices: // The Original Code of this file is Copyright 1998-2009, licensor of the // Advanced Media Workflow Association. All rights reserved. // // The Initial Developer of the Original Code of this file and the // licensor of the Advanced Media Workflow Association is // Avid Technology. // All rights reserved. // //=---------------------------------------------------------------------= class ImplAAFDataDef; class ImplAAFParameter; #ifndef __ImplAAFParameter_h__ #include "ImplAAFParameter.h" #endif #include "OMVariableSizeProperty.h" class ImplAAFTypeDef; class ImplAAFConstantValue : public ImplAAFParameter { public: // // Constructor/destructor // //******** ImplAAFConstantValue (); //**************** // Initialize() // virtual AAFRESULT STDMETHODCALLTYPE Initialize (// @parm [in] // Parameter definition for this object (this determines the type of the constant value) ImplAAFParameterDef * pParameterDef, // @parm [in] Size of preallocated buffer aafUInt32 valueSize, // @parm [in, size_is(valueSize)] buffer containing value aafDataBuffer_t pValue); protected: virtual ~ImplAAFConstantValue (); public: /****/ //**************** // GetValue() // virtual AAFRESULT STDMETHODCALLTYPE GetValue (// @parm [in] Size of preallocated buffer aafUInt32 valueSize, // @parm [out, size_is(valueSize),length_is(*bytesRead)] Preallocated buffer to hold value aafDataBuffer_t pValue, // @parm [out] Number of actual bytes read aafUInt32* bytesRead); //**************** // GetValueBufLen() // virtual AAFRESULT STDMETHODCALLTYPE GetValueBufLen // @parm [out] Mob Name (aafUInt32 * pLen); /****/ //**************** // SetValue() // virtual AAFRESULT STDMETHODCALLTYPE SetValue (// @parm [in] Size of preallocated buffer aafUInt32 valueSize, // @parm [in, size_is(valueSize)] buffer containing value aafDataBuffer_t pValue); virtual AAFRESULT STDMETHODCALLTYPE GetTypeDefinition ( ImplAAFTypeDef **ppTypeDef); private: OMVariableSizeProperty<aafUInt8> _value; ImplAAFTypeDef * _cachedTypeDef; }; #endif // ! __ImplAAFConstantValue_h__
Mahant Kahan Singh Ji 'Seva Panthi' is the 13th spiritual descendant of Bhai Kanhaiya Ji. He was anointed as the Mahant of Tikana Bhai Jagta Ji on January 14, 2008 by Mahant Tirath Singh Ji himself. Mahant Sahib was the natural choice for this great honor, as he is considered a great soul by the entire Sikh Sant Samaj in India. He is most unassuming considering the position he has been anointed to. Mahant Sahib has been serving sangats in the villages of Punjab for over 50 years and is loved by everyone who has ever had the great fortune of meeting him. When visiting Tikana Sahib one finds Mahant Kahan Singh Ji still straightening white sheets in the Main Divan Hall or teaching children Gurbani in his room. He is considered one of the most eminent scholars of the Sikh Scriptures today. File:Mahant Sahib 13.jpg Early life Mahant Kahan Singh Ji was born on September 15, 1943 at Dullewala, in district Mianwali, now in Pakistan. His father, Bhai Deep Singh was a devout Amritdhari Sikh who had been been baptized by Khande Ki Pahul. He was a deeply spiritual man who recited Gurbani regularly. When India was partitioned, young Bhai Kahan Singh was barely four years old. His father brought him and the rest of their family to India and settled near Chheratha(near Amritsar). A few months later the family moved to Goniana Mandi, a renowned grain and cotton market in district Bathinda(Punjab). In 1948, by great good fortune, or as willed by Akal Purakh Vaheguru, young Bhai Kahan Singh has a chance to meet Mahant Gulab Singh Ji, following which he visited Tikana Sahib a few times. In 1950, his parents assigned him to serve at the Tikana Sahib permanently. Subsequently, Mahant Bhai Asa Singh Ji got him enrolled in a Primary School for a few years and then decided to shift his education back to the Tikana Sahib by arranging a private tutor, Bhai Pokhar Dass coached young Bhai Kahan Singh in Gurmukhi and Gurbani. Mahant Asa Singh Ji paid special attention to his progress. Under his watchful eye and keen guidance from his tutor, young Bhai Kahan Singh memorized several compositions of the Gurbani, namely, Sukhmani Sahib, Japji Sahib, Baawan Akhri, Anand Sahib, Kirtan Sohila and Rehras Sahib. Mahant Asa Singh Ji further encouraged him to receive etymological knowledge and learn annotation of Sikh Scriptures and under his supervision young Bhai Kahan Singh blossomed into a excellent scholar. He also learned to play the harmonium and the tabla and started to attend classes on exegesis of the scriptures like the Guru Granth Sahib, Suraj Prakash and Sant Rattan Mala etc. He became such an expert on exegesis that Mahant Sahib initiated a program to enlighten a very dedicated sangat, with the exegetical annotation of the Guru Granth Sahib from the very beginning to the end. This endeavor took several years each time. The third time Sant Bhai Kahan Singh Ji played a major role in the process that took '9 years'. The exegetical annotation is being performed for a fourth time now and Mahant Baba Kahan Singh Ji is the main helmsman in this extraordinary effort. He was baptised by the Khande Ki Pahul in 1958 and since then he has inspired thousands of Sikhs to do the same. Mahant Sahib was a praiseworthy disciple, totally devoted to fulfilling his Master's commands will love and alert in his service. He was always obedient and spent most of his spare time attending to Mahant Asa Singh Ji. For 23 years Mahant Sahib slept on the floor and never lay on the cot while serving Mahant Asa Singh Ji. Whenever there was a construction project at the Tikana Sahib, Sant Bhai Kahan Singh Ji, was a selfless laborer. He worked harder and longer hours than the paid laborers. He has been conducting divinity classes for young school children and college students students for almost 4 decades now and he is very diligent in holding annual competitions on the subject of divinty, encouraging students with generous prizes and scholarships. Mahant Sahib has over the years arranged many huge pilgrimage tours by chartering 'whole trains' for devotees, arranging to visit historical Sikh Gurdwaras and Takhats etc. Tikana Sahib Ad blocker interference detected!
Helping the Overweight Child Helping your child with social and emotional concerns It doesn't take long for children to figure out that our culture and their peers idealize thinness. Children who are overweight are especially at risk of being teased and feeling alone. This can cause low self-esteem and Reference depression Opens New Window. For information about helping a child who is being teased, see the topic Reference Bullying. To help your child have greater health, confidence, and self-esteem, you can: - Avoid talking in terms of your child's weight. How you talk about your child's body has a big impact on your child's self-image. Instead, talk in terms of your child's health, activity level, and other healthy lifestyle choices. - Be a good role model by having a healthy attitude about food and activity. Even if you struggle with how you feel about your own body, avoid talk in front of your child about "being fat" and "needing to diet." Instead, talk about and make the same healthy lifestyle choices you'd like for your child. - Encourage activities, such as sports and theater. Physical activity helps build physical and emotional confidence. Try different types of sports and activities until your child finds one that he or she likes. Theater can help a child project strength and confidence, even if he or she doesn't feel it at first. - Encourage social involvement in community, church, and school activities, which build social skills and confidence. - Help your child eat well by providing healthy food choices. Consider seeing a Reference registered dietitian Opens New Window for guidance and new food ideas. - Forbid any child (yours included) to tease another child about weight. Talk to your child's teachers and/or counselors, if necessary. |By:||Reference Healthwise Staff||Last Revised: Reference August 29, 2011| |Medical Review:||Reference John Pope, MD - Pediatrics Reference Rhonda O'Brien, MS, RD, CDE - Certified Diabetes Educator
Extended Project Qualification (Level 3) The Extended Project develops and extends one or more of the learner's study areas and/or from an area of personal interest or activity outside their main programme of study. It will be based on a topic chosen by the learner and agreed with the supervisor. Course Outline This is a one year course, taken in the A2 year of sixth form. Assessment is by a 5,000 word essay, presentation and portfolio. The essay, presentation and portfolio all count towards the overall mark awarded. Examining Board  Special Entry Requirements  C grade at GCSE in Mathematics and English. Career Opportunities More and more universities are welcoming the EPQ as an indicator of realised skills and potential ability in the fiercely competitive arena of entrant selection. Teaching Methods. Each fortnight you will be timetabled for two periods of 60 minutes each. These are used as skills and tutorial based sessions. During this qualification there is a need for and independent research and study. Guidance will be given on how to prepare for assignments and consolidate you own learning so that you can have the best chance of success. How is the course graded How to succeed in GCSE Art Skill Requirements How can you help? Extra-curricular Support
Challenging the libraries! The Demotek Three years ago the basic idea of the Demotek was plain and simple: to create opportunities for young people to realise and submit their own cultural products. Giving these products the necessary co- verage was not the easiest of tasks, but something happened when libraries were taken on as partners. Three years ago the basic idea of the Demotek was plain and simple: to create opportunities for young people to realise and submit their own cultural products. Giving these products the necessary co- verage was not the easiest of tasks, but something happened when libraries were taken on as partners. The reason for such a collaborative venture became clear when one of the project delegates showed concern about the cutbacks of media acquisitions facing libraries, so “why not let people submit their own work”? Since then they have not looked back. From modest beginnings as a minor project with five Demoteks, initiated by Reaktor Sydost, a resource centre for filmmaking and young communication in the Swedish counties of Kronoberg, Kalmar and Blekinge, there are today over sixty Demoteks across the country, from Ystad in the south to Luleå in the north. The Demotek framework is that of a delivery and lending station of personal creations. But most Demoteks arrange gigs, workshops, exhibitions and screenings. It is about libraries being brave enough to think in new ways and to show courage in receiving a new generation who might have discarded the library in favour of something else. The perfect library What characterises the libraries that are part of the Demotek project is their resourcefulness and interest in trying out new youth activities. Most members of the Demotek network want to participate in attracting people to use library resources in more fulfilling ways and making them visible. Unfortunately, this appears to be nothing but wishful thinking. The project is occasionally prone to problems despite there being so many extremely clever Demoteks who really try to realise the dream, but there are also libraries that are exceedingly sluggish. This might be due to numerous factors, such as lacking in resources (hardly a surprise to most of us), a sense of vulnerability when facing a ‘difficult group of young people’;management might not be hip enough to what is happening or they make unrealistic demands. It goes without saying that this will lessen a sense of willingness and motivational force. This is to be expected. However, those of us in the project keep insisting on what we have said so many times before: It is not about money. Willpower and motivational force are the crucial ingredients, the ability to break new ground. To us, this is the most important of issues facing future library leadership. Reduce the generation gap Another apparent problem facing the Demoteks is the generational gap – there is a lack of understanding about each other’s everyday reality and an inability to meet on common ground. Technical hindrances are also a common occurrence. The project has invited young people to the library offering them an opportunity to teach the library staff about their ‘digital everyday reality’. This has been much appreciated and not just on a technical level but as an attempt to reduce the gap between generations. A bonding process appears, mutual understanding and the ability to sit down together and enjoy each other’s company in laughter and learning. There are still adults who view young people’s computer habits as a waste of time. Headgear and skateboards in a library are unimaginable. No mobiles are allowed and silence shall reign supreme! Or, is it only young people who think that it must be quiet and that the wearing of headgear is off limits? What young people can do for libraries? Prejudice and ignorance are everywhere. To be active and elevate these issues whereby they are discussed is of great importance. Not only so that activities at the Demoteks can function smoothly but to reach a better understanding of each other and install a sense of faith. A positive attitude will open the library doors toward discovery for many. It is important to remember that it is not only about what libraries can do for young people, but what young people can do for libraries. Let the entrepreneurial spirit into the library! It is hardly a common-day occurrence when a group of youngsters suggest having fun at the library. This is where the Demotek has an important role to play. Once the local Demotek has arranged a gig or a workshop on, for instance, cover designs, it becomes more likely that they will come to think in such terms. Most of the time the younger generation has no idea whatsoever as to what a library can offer, both with regard to content and premises. This is where we all have a joint responsibility. Our opinion is that libraries have very little idea as to how they should market themselves. Especially as to how they should reach out to younger people. Occasionally we hear about an enterprising library arranging courses for its staff in marketing. Brilliant! More of the entrepreneurial spirit in the library! Coming to terms with young people Another important question in this context is how to create something based on coming to terms with young people. Is the Demotek something young people can relate to? Had it not been better with a website along the lines of U-tube or Myspace? Well, maybe, but there are so many of them. Sometimes things need to be done which have not been thought of before. To open doors that no one knew of. Would it not be cool if adults found it as natural as young people to connect to Lunarstorm or the above-mentioned music and video sites? We would be more than happy to encourage them. The internet is a part of the public space, but there are other factors involved. Personal meetings and conversations are still important to us even though they may take place in digital form. The Demotek is also a physical entity (though the online catalogue lends it a digital aspect as well) because it needs to be. And all those gigs, workshops, exhibitions and everything submitted by young people since the beginning speak volumes about the need of the physical aspect despite the digital age we live in. One can view it as the digital coming out of the closet and more are given an opportunity to discover it. Young people are fully aware of this, the need to be seen and heard in many different media in order to succeed. Even if far from everyone nurtures dreams of superstardom there is nevertheless a strong sense of wanting to be recognised. “See me, hear me, and listen to what I have to say”! And this I believe to be something everyone can identify with. It is about tales, stories, observations and reflections from everyday life. How else can we understand each other if we do not use these to communicate? Ida Qvarnström Demotek project leader ida AT Translation: Jonathan Pearman Demotek project leader
/* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). * Version 2.0.4 * * This file is not intended to be easily readable and contains a number of * coding conventions designed to improve portability and efficiency. Do not make * changes to this file unless you know what you are doing--modify the SWIG * interface file instead. * ----------------------------------------------------------------------------- */ #define SWIGPYTHON #define SWIG_PYTHON_DIRECTOR_NO_VTABLE #define SWIG_PYTHON_CLASSIC /* ----------------------------------------------------------------------------- * This section contains generic SWIG labels for method/variable * declarations/attributes, and other compiler dependent labels. * ----------------------------------------------------------------------------- */ /* template workaround for compilers that cannot correctly implement the C++ standard */ #ifndef SWIGTEMPLATEDISAMBIGUATOR # if defined(__SUNPRO_CC) && (__SUNPRO_CC <= 0x560) # define SWIGTEMPLATEDISAMBIGUATOR template # elif defined(__HP_aCC) /* Needed even with `aCC -AA' when `aCC -V' reports HP ANSI C++ B3910B A.03.55 */ /* If we find a maximum version that requires this, the test would be __HP_aCC <= 35500 for A.03.55 */ # define SWIGTEMPLATEDISAMBIGUATOR template # else # define SWIGTEMPLATEDISAMBIGUATOR # endif #endif /* inline attribute */ #ifndef SWIGINLINE # if defined(__cplusplus) || (defined(__GNUC__) && !defined(__STRICT_ANSI__)) # define SWIGINLINE inline # else # define SWIGINLINE # endif #endif /* attribute recognised by some compilers to avoid 'unused' warnings */ #ifndef SWIGUNUSED # if defined(__GNUC__) # if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)) # define SWIGUNUSED __attribute__ ((__unused__)) # else # define SWIGUNUSED # endif # elif defined(__ICC) # define SWIGUNUSED __attribute__ ((__unused__)) # else # define SWIGUNUSED # endif #endif #ifndef SWIG_MSC_UNSUPPRESS_4505 # if defined(_MSC_VER) # pragma warning(disable : 4505) /* unreferenced local function has been removed */ # endif #endif #ifndef SWIGUNUSEDPARM # ifdef __cplusplus # define SWIGUNUSEDPARM(p) # else # define SWIGUNUSEDPARM(p) p SWIGUNUSED # endif #endif /* internal SWIG method */ #ifndef SWIGINTERN # define SWIGINTERN static SWIGUNUSED #endif /* internal inline SWIG method */ #ifndef SWIGINTERNINLINE # define SWIGINTERNINLINE SWIGINTERN SWIGINLINE #endif /* exporting methods */ #if (__GNUC__ >= 4) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4) # ifndef GCC_HASCLASSVISIBILITY # define GCC_HASCLASSVISIBILITY # endif #endif #ifndef SWIGEXPORT # if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__) # if defined(STATIC_LINKED) # define SWIGEXPORT # else # define SWIGEXPORT __declspec(dllexport) # endif # else # if defined(__GNUC__) && defined(GCC_HASCLASSVISIBILITY) # define SWIGEXPORT __attribute__ ((visibility("default"))) # else # define SWIGEXPORT # endif # endif #endif /* calling conventions for Windows */ #ifndef SWIGSTDCALL # if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__) # define SWIGSTDCALL __stdcall # else # define SWIGSTDCALL # endif #endif /* Deal with Microsoft's attempt at deprecating C standard runtime functions */ #if !defined(SWIG_NO_CRT_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_CRT_SECURE_NO_DEPRECATE) # define _CRT_SECURE_NO_DEPRECATE #endif /* Deal with Microsoft's attempt at deprecating methods in the standard C++ library */ #if !defined(SWIG_NO_SCL_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_SCL_SECURE_NO_DEPRECATE) # define _SCL_SECURE_NO_DEPRECATE #endif /* Python.h has to appear first */ #include <Python.h> /* ----------------------------------------------------------------------------- * swigrun.swg * * This file contains generic C API SWIG runtime support for pointer * type checking. * ----------------------------------------------------------------------------- */ /* This should only be incremented when either the layout of swig_type_info changes, or for whatever reason, the runtime changes incompatibly */ #define SWIG_RUNTIME_VERSION "4" /* define SWIG_TYPE_TABLE_NAME as "SWIG_TYPE_TABLE" */ #ifdef SWIG_TYPE_TABLE # define SWIG_QUOTE_STRING(x) #x # define SWIG_EXPAND_AND_QUOTE_STRING(x) SWIG_QUOTE_STRING(x) # define SWIG_TYPE_TABLE_NAME SWIG_EXPAND_AND_QUOTE_STRING(SWIG_TYPE_TABLE) #else # define SWIG_TYPE_TABLE_NAME #endif /* You can use the SWIGRUNTIME and SWIGRUNTIMEINLINE macros for creating a static or dynamic library from the SWIG runtime code. In 99.9% of the cases, SWIG just needs to declare them as 'static'. But only do this if strictly necessary, ie, if you have problems with your compiler or suchlike. */ #ifndef SWIGRUNTIME # define SWIGRUNTIME SWIGINTERN #endif #ifndef SWIGRUNTIMEINLINE # define SWIGRUNTIMEINLINE SWIGRUNTIME SWIGINLINE #endif /* Generic buffer size */ #ifndef SWIG_BUFFER_SIZE # define SWIG_BUFFER_SIZE 1024 #endif /* Flags for pointer conversions */ #define SWIG_POINTER_DISOWN 0x1 #define SWIG_CAST_NEW_MEMORY 0x2 /* Flags for new pointer objects */ #define SWIG_POINTER_OWN 0x1 /* Flags/methods for returning states. The SWIG conversion methods, as ConvertPtr, return an integer that tells if the conversion was successful or not. And if not, an error code can be returned (see swigerrors.swg for the codes). Use the following macros/flags to set or process the returning states. In old versions of SWIG, code such as the following was usually written: if (SWIG_ConvertPtr(obj,vptr,ty.flags) != -1) { // success code } else { //fail code } Now you can be more explicit: int res = SWIG_ConvertPtr(obj,vptr,ty.flags); if (SWIG_IsOK(res)) { // success code } else { // fail code } which is the same really, but now you can also do Type *ptr; int res = SWIG_ConvertPtr(obj,(void **)(&ptr),ty.flags); if (SWIG_IsOK(res)) { // success code if (SWIG_IsNewObj(res) { ... delete *ptr; } else { ... } } else { // fail code } I.e., now SWIG_ConvertPtr can return new objects and you can identify the case and take care of the deallocation. Of course that also requires SWIG_ConvertPtr to return new result values, such as int SWIG_ConvertPtr(obj, ptr,...) { if (<obj is ok>) { if (<need new object>) { *ptr = <ptr to new allocated object>; return SWIG_NEWOBJ; } else { *ptr = <ptr to old object>; return SWIG_OLDOBJ; } } else { return SWIG_BADOBJ; } } Of course, returning the plain '0(success)/-1(fail)' still works, but you can be more explicit by returning SWIG_BADOBJ, SWIG_ERROR or any of the SWIG errors code. Finally, if the SWIG_CASTRANK_MODE is enabled, the result code allows to return the 'cast rank', for example, if you have this int food(double) int fooi(int); and you call food(1) // cast rank '1' (1 -> 1.0) fooi(1) // cast rank '0' just use the SWIG_AddCast()/SWIG_CheckState() */ #define SWIG_OK (0) #define SWIG_ERROR (-1) #define SWIG_IsOK(r) (r >= 0) #define SWIG_ArgError(r) ((r != SWIG_ERROR) ? r : SWIG_TypeError) /* The CastRankLimit says how many bits are used for the cast rank */ #define SWIG_CASTRANKLIMIT (1 << 8) /* The NewMask denotes the object was created (using new/malloc) */ #define SWIG_NEWOBJMASK (SWIG_CASTRANKLIMIT << 1) /* The TmpMask is for in/out typemaps that use temporal objects */ #define SWIG_TMPOBJMASK (SWIG_NEWOBJMASK << 1) /* Simple returning values */ #define SWIG_BADOBJ (SWIG_ERROR) #define SWIG_OLDOBJ (SWIG_OK) #define SWIG_NEWOBJ (SWIG_OK | SWIG_NEWOBJMASK) #define SWIG_TMPOBJ (SWIG_OK | SWIG_TMPOBJMASK) /* Check, add and del mask methods */ #define SWIG_AddNewMask(r) (SWIG_IsOK(r) ? (r | SWIG_NEWOBJMASK) : r) #define SWIG_DelNewMask(r) (SWIG_IsOK(r) ? (r & ~SWIG_NEWOBJMASK) : r) #define SWIG_IsNewObj(r) (SWIG_IsOK(r) && (r & SWIG_NEWOBJMASK)) #define SWIG_AddTmpMask(r) (SWIG_IsOK(r) ? (r | SWIG_TMPOBJMASK) : r) #define SWIG_DelTmpMask(r) (SWIG_IsOK(r) ? (r & ~SWIG_TMPOBJMASK) : r) #define SWIG_IsTmpObj(r) (SWIG_IsOK(r) && (r & SWIG_TMPOBJMASK)) /* Cast-Rank Mode */ #if defined(SWIG_CASTRANK_MODE) # ifndef SWIG_TypeRank # define SWIG_TypeRank unsigned long # endif # ifndef SWIG_MAXCASTRANK /* Default cast allowed */ # define SWIG_MAXCASTRANK (2) # endif # define SWIG_CASTRANKMASK ((SWIG_CASTRANKLIMIT) -1) # define SWIG_CastRank(r) (r & SWIG_CASTRANKMASK) SWIGINTERNINLINE int SWIG_AddCast(int r) { return SWIG_IsOK(r) ? ((SWIG_CastRank(r) < SWIG_MAXCASTRANK) ? (r + 1) : SWIG_ERROR) : r; } SWIGINTERNINLINE int SWIG_CheckState(int r) { return SWIG_IsOK(r) ? SWIG_CastRank(r) + 1 : 0; } #else /* no cast-rank mode */ # define SWIG_AddCast # define SWIG_CheckState(r) (SWIG_IsOK(r) ? 1 : 0) #endif #include <string.h> #ifdef __cplusplus extern "C" { #endif typedef void *(*swig_converter_func)(void *, int *); typedef struct swig_type_info *(*swig_dycast_func)(void **); /* Structure to store information on one type */ typedef struct swig_type_info { const char *name; /* mangled name of this type */ const char *str; /* human readable name of this type */ swig_dycast_func dcast; /* dynamic cast function down a hierarchy */ struct swig_cast_info *cast; /* linked list of types that can cast into this type */ void *clientdata; /* language specific type data */ int owndata; /* flag if the structure owns the clientdata */ } swig_type_info; /* Structure to store a type and conversion function used for casting */ typedef struct swig_cast_info { swig_type_info *type; /* pointer to type that is equivalent to this type */ swig_converter_func converter; /* function to cast the void pointers */ struct swig_cast_info *next; /* pointer to next cast in linked list */ struct swig_cast_info *prev; /* pointer to the previous cast */ } swig_cast_info; /* Structure used to store module information * Each module generates one structure like this, and the runtime collects * all of these structures and stores them in a circularly linked list.*/ typedef struct swig_module_info { swig_type_info **types; /* Array of pointers to swig_type_info structures that are in this module */ size_t size; /* Number of types in this module */ struct swig_module_info *next; /* Pointer to next element in circularly linked list */ swig_type_info **type_initial; /* Array of initially generated type structures */ swig_cast_info **cast_initial; /* Array of initially generated casting structures */ void *clientdata; /* Language specific module data */ } swig_module_info; /* Compare two type names skipping the space characters, therefore "char*" == "char *" and "Class<int>" == "Class<int >", etc. Return 0 when the two name types are equivalent, as in strncmp, but skipping ' '. */ SWIGRUNTIME int SWIG_TypeNameComp(const char *f1, const char *l1, const char *f2, const char *l2) { for (;(f1 != l1) && (f2 != l2); ++f1, ++f2) { while ((*f1 == ' ') && (f1 != l1)) ++f1; while ((*f2 == ' ') && (f2 != l2)) ++f2; if (*f1 != *f2) return (*f1 > *f2) ? 1 : -1; } return (int)((l1 - f1) - (l2 - f2)); } /* Check type equivalence in a name list like <name1>|<name2>|... Return 0 if not equal, 1 if equal */ SWIGRUNTIME int SWIG_TypeEquiv(const char *nb, const char *tb) { int equiv = 0; const char* te = tb + strlen(tb); const char* ne = nb; while (!equiv && *ne) { for (nb = ne; *ne; ++ne) { if (*ne == '|') break; } equiv = (SWIG_TypeNameComp(nb, ne, tb, te) == 0) ? 1 : 0; if (*ne) ++ne; } return equiv; } /* Check type equivalence in a name list like <name1>|<name2>|... Return 0 if equal, -1 if nb < tb, 1 if nb > tb */ SWIGRUNTIME int SWIG_TypeCompare(const char *nb, const char *tb) { int equiv = 0; const char* te = tb + strlen(tb); const char* ne = nb; while (!equiv && *ne) { for (nb = ne; *ne; ++ne) { if (*ne == '|') break; } equiv = (SWIG_TypeNameComp(nb, ne, tb, te) == 0) ? 1 : 0; if (*ne) ++ne; } return equiv; } /* Check the typename */ SWIGRUNTIME swig_cast_info * SWIG_TypeCheck(const char *c, swig_type_info *ty) { if (ty) { swig_cast_info *iter = ty->cast; while (iter) { if (strcmp(iter->type->name, c) == 0) { if (iter == ty->cast) return iter; /* Move iter to the top of the linked list */ iter->prev->next = iter->next; if (iter->next) iter->next->prev = iter->prev; iter->next = ty->cast; iter->prev = 0; if (ty->cast) ty->cast->prev = iter; ty->cast = iter; return iter; } iter = iter->next; } } return 0; } /* Identical to SWIG_TypeCheck, except strcmp is replaced with a pointer comparison */ SWIGRUNTIME swig_cast_info * SWIG_TypeCheckStruct(swig_type_info *from, swig_type_info *ty) { if (ty) { swig_cast_info *iter = ty->cast; while (iter) { if (iter->type == from) { if (iter == ty->cast) return iter; /* Move iter to the top of the linked list */ iter->prev->next = iter->next; if (iter->next) iter->next->prev = iter->prev; iter->next = ty->cast; iter->prev = 0; if (ty->cast) ty->cast->prev = iter; ty->cast = iter; return iter; } iter = iter->next; } } return 0; } /* Cast a pointer up an inheritance hierarchy */ SWIGRUNTIMEINLINE void * SWIG_TypeCast(swig_cast_info *ty, void *ptr, int *newmemory) { return ((!ty) || (!ty->converter)) ? ptr : (*ty->converter)(ptr, newmemory); } /* Dynamic pointer casting. Down an inheritance hierarchy */ SWIGRUNTIME swig_type_info * SWIG_TypeDynamicCast(swig_type_info *ty, void **ptr) { swig_type_info *lastty = ty; if (!ty || !ty->dcast) return ty; while (ty && (ty->dcast)) { ty = (*ty->dcast)(ptr); if (ty) lastty = ty; } return lastty; } /* Return the name associated with this type */ SWIGRUNTIMEINLINE const char * SWIG_TypeName(const swig_type_info *ty) { return ty->name; } /* Return the pretty name associated with this type, that is an unmangled type name in a form presentable to the user. */ SWIGRUNTIME const char * SWIG_TypePrettyName(const swig_type_info *type) { /* The "str" field contains the equivalent pretty names of the type, separated by vertical-bar characters. We choose to print the last name, as it is often (?) the most specific. */ if (!type) return NULL; if (type->str != NULL) { const char *last_name = type->str; const char *s; for (s = type->str; *s; s++) if (*s == '|') last_name = s+1; return last_name; } else return type->name; } /* Set the clientdata field for a type */ SWIGRUNTIME void SWIG_TypeClientData(swig_type_info *ti, void *clientdata) { swig_cast_info *cast = ti->cast; /* if (ti->clientdata == clientdata) return; */ ti->clientdata = clientdata; while (cast) { if (!cast->converter) { swig_type_info *tc = cast->type; if (!tc->clientdata) { SWIG_TypeClientData(tc, clientdata); } } cast = cast->next; } } SWIGRUNTIME void SWIG_TypeNewClientData(swig_type_info *ti, void *clientdata) { SWIG_TypeClientData(ti, clientdata); ti->owndata = 1; } /* Search for a swig_type_info structure only by mangled name Search is a O(log #types) We start searching at module start, and finish searching when start == end. Note: if start == end at the beginning of the function, we go all the way around the circular list. */ SWIGRUNTIME swig_type_info * SWIG_MangledTypeQueryModule(swig_module_info *start, swig_module_info *end, const char *name) { swig_module_info *iter = start; do { if (iter->size) { register size_t l = 0; register size_t r = iter->size - 1; do { /* since l+r >= 0, we can (>> 1) instead (/ 2) */ register size_t i = (l + r) >> 1; const char *iname = iter->types[i]->name; if (iname) { register int compare = strcmp(name, iname); if (compare == 0) { return iter->types[i]; } else if (compare < 0) { if (i) { r = i - 1; } else { break; } } else if (compare > 0) { l = i + 1; } } else { break; /* should never happen */ } } while (l <= r); } iter = iter->next; } while (iter != end); return 0; } /* Search for a swig_type_info structure for either a mangled name or a human readable name. It first searches the mangled names of the types, which is a O(log #types) If a type is not found it then searches the human readable names, which is O(#types). We start searching at module start, and finish searching when start == end. Note: if start == end at the beginning of the function, we go all the way around the circular list. */ SWIGRUNTIME swig_type_info * SWIG_TypeQueryModule(swig_module_info *start, swig_module_info *end, const char *name) { /* STEP 1: Search the name field using binary search */ swig_type_info *ret = SWIG_MangledTypeQueryModule(start, end, name); if (ret) { return ret; } else { /* STEP 2: If the type hasn't been found, do a complete search of the str field (the human readable name) */ swig_module_info *iter = start; do { register size_t i = 0; for (; i < iter->size; ++i) { if (iter->types[i]->str && (SWIG_TypeEquiv(iter->types[i]->str, name))) return iter->types[i]; } iter = iter->next; } while (iter != end); } /* neither found a match */ return 0; } /* Pack binary data into a string */ SWIGRUNTIME char * SWIG_PackData(char *c, void *ptr, size_t sz) { static const char hex[17] = "0123456789abcdef"; register const unsigned char *u = (unsigned char *) ptr; register const unsigned char *eu = u + sz; for (; u != eu; ++u) { register unsigned char uu = *u; *(c++) = hex[(uu & 0xf0) >> 4]; *(c++) = hex[uu & 0xf]; } return c; } /* Unpack binary data from a string */ SWIGRUNTIME const char * SWIG_UnpackData(const char *c, void *ptr, size_t sz) { register unsigned char *u = (unsigned char *) ptr; register const unsigned char *eu = u + sz; for (; u != eu; ++u) { register char d = *(c++); register unsigned char uu; if ((d >= '0') && (d <= '9')) uu = ((d - '0') << 4); else if ((d >= 'a') && (d <= 'f')) uu = ((d - ('a'-10)) << 4); else return (char *) 0; d = *(c++); if ((d >= '0') && (d <= '9')) uu |= (d - '0'); else if ((d >= 'a') && (d <= 'f')) uu |= (d - ('a'-10)); else return (char *) 0; *u = uu; } return c; } /* Pack 'void *' into a string buffer. */ SWIGRUNTIME char * SWIG_PackVoidPtr(char *buff, void *ptr, const char *name, size_t bsz) { char *r = buff; if ((2*sizeof(void *) + 2) > bsz) return 0; *(r++) = '_'; r = SWIG_PackData(r,&ptr,sizeof(void *)); if (strlen(name) + 1 > (bsz - (r - buff))) return 0; strcpy(r,name); return buff; } SWIGRUNTIME const char * SWIG_UnpackVoidPtr(const char *c, void **ptr, const char *name) { if (*c != '_') { if (strcmp(c,"NULL") == 0) { *ptr = (void *) 0; return name; } else { return 0; } } return SWIG_UnpackData(++c,ptr,sizeof(void *)); } SWIGRUNTIME char * SWIG_PackDataName(char *buff, void *ptr, size_t sz, const char *name, size_t bsz) { char *r = buff; size_t lname = (name ? strlen(name) : 0); if ((2*sz + 2 + lname) > bsz) return 0; *(r++) = '_'; r = SWIG_PackData(r,ptr,sz); if (lname) { strncpy(r,name,lname+1); } else { *r = 0; } return buff; } SWIGRUNTIME const char * SWIG_UnpackDataName(const char *c, void *ptr, size_t sz, const char *name) { if (*c != '_') { if (strcmp(c,"NULL") == 0) { memset(ptr,0,sz); return name; } else { return 0; } } return SWIG_UnpackData(++c,ptr,sz); } #ifdef __cplusplus } #endif /* Errors in SWIG */ #define SWIG_UnknownError -1 #define SWIG_IOError -2 #define SWIG_RuntimeError -3 #define SWIG_IndexError -4 #define SWIG_TypeError -5 #define SWIG_DivisionByZero -6 #define SWIG_OverflowError -7 #define SWIG_SyntaxError -8 #define SWIG_ValueError -9 #define SWIG_SystemError -10 #define SWIG_AttributeError -11 #define SWIG_MemoryError -12 #define SWIG_NullReferenceError -13 /* Compatibility macros for Python 3 */ #if PY_VERSION_HEX >= 0x03000000 #define PyClass_Check(obj) PyObject_IsInstance(obj, (PyObject *)&PyType_Type) #define PyInt_Check(x) PyLong_Check(x) #define PyInt_AsLong(x) PyLong_AsLong(x) #define PyInt_FromLong(x) PyLong_FromLong(x) #define PyString_Check(name) PyBytes_Check(name) #define PyString_FromString(x) PyUnicode_FromString(x) #define PyString_Format(fmt, args) PyUnicode_Format(fmt, args) #define PyString_AsString(str) PyBytes_AsString(str) #define PyString_Size(str) PyBytes_Size(str) #define PyString_InternFromString(key) PyUnicode_InternFromString(key) #define Py_TPFLAGS_HAVE_CLASS Py_TPFLAGS_BASETYPE #define PyString_AS_STRING(x) PyUnicode_AS_STRING(x) #define _PyLong_FromSsize_t(x) PyLong_FromSsize_t(x) #endif #ifndef Py_TYPE # define Py_TYPE(op) ((op)->ob_type) #endif /* SWIG APIs for compatibility of both Python 2 & 3 */ #if PY_VERSION_HEX >= 0x03000000 # define SWIG_Python_str_FromFormat PyUnicode_FromFormat #else # define SWIG_Python_str_FromFormat PyString_FromFormat #endif /* Warning: This function will allocate a new string in Python 3, * so please call SWIG_Python_str_DelForPy3(x) to free the space. */ SWIGINTERN char* SWIG_Python_str_AsChar(PyObject *str) { #if PY_VERSION_HEX >= 0x03000000 char *cstr; char *newstr; Py_ssize_t len; str = PyUnicode_AsUTF8String(str); PyBytes_AsStringAndSize(str, &cstr, &len); newstr = (char *) malloc(len+1); memcpy(newstr, cstr, len+1); Py_XDECREF(str); return newstr; #else return PyString_AsString(str); #endif } #if PY_VERSION_HEX >= 0x03000000 # define SWIG_Python_str_DelForPy3(x) free( (void*) (x) ) #else # define SWIG_Python_str_DelForPy3(x) #endif SWIGINTERN PyObject* SWIG_Python_str_FromChar(const char *c) { #if PY_VERSION_HEX >= 0x03000000 return PyUnicode_FromString(c); #else return PyString_FromString(c); #endif } /* Add PyOS_snprintf for old Pythons */ #if PY_VERSION_HEX < 0x02020000 # if defined(_MSC_VER) || defined(__BORLANDC__) || defined(_WATCOM) # define PyOS_snprintf _snprintf # else # define PyOS_snprintf snprintf # endif #endif /* A crude PyString_FromFormat implementation for old Pythons */ #if PY_VERSION_HEX < 0x02020000 #ifndef SWIG_PYBUFFER_SIZE # define SWIG_PYBUFFER_SIZE 1024 #endif static PyObject * PyString_FromFormat(const char *fmt, ...) { va_list ap; char buf[SWIG_PYBUFFER_SIZE * 2]; int res; va_start(ap, fmt); res = vsnprintf(buf, sizeof(buf), fmt, ap); va_end(ap); return (res < 0 || res >= (int)sizeof(buf)) ? 0 : PyString_FromString(buf); } #endif /* Add PyObject_Del for old Pythons */ #if PY_VERSION_HEX < 0x01060000 # define PyObject_Del(op) PyMem_DEL((op)) #endif #ifndef PyObject_DEL # define PyObject_DEL PyObject_Del #endif /* A crude PyExc_StopIteration exception for old Pythons */ #if PY_VERSION_HEX < 0x02020000 # ifndef PyExc_StopIteration # define PyExc_StopIteration PyExc_RuntimeError # endif # ifndef PyObject_GenericGetAttr # define PyObject_GenericGetAttr 0 # endif #endif /* Py_NotImplemented is defined in 2.1 and up. */ #if PY_VERSION_HEX < 0x02010000 # ifndef Py_NotImplemented # define Py_NotImplemented PyExc_RuntimeError # endif #endif /* A crude PyString_AsStringAndSize implementation for old Pythons */ #if PY_VERSION_HEX < 0x02010000 # ifndef PyString_AsStringAndSize # define PyString_AsStringAndSize(obj, s, len) {*s = PyString_AsString(obj); *len = *s ? strlen(*s) : 0;} # endif #endif /* PySequence_Size for old Pythons */ #if PY_VERSION_HEX < 0x02000000 # ifndef PySequence_Size # define PySequence_Size PySequence_Length # endif #endif /* PyBool_FromLong for old Pythons */ #if PY_VERSION_HEX < 0x02030000 static PyObject *PyBool_FromLong(long ok) { PyObject *result = ok ? Py_True : Py_False; Py_INCREF(result); return result; } #endif /* Py_ssize_t for old Pythons */ /* This code is as recommended by: */ /* http://www.python.org/dev/peps/pep-0353/#conversion-guidelines */ #if PY_VERSION_HEX < 0x02050000 && !defined(PY_SSIZE_T_MIN) typedef int Py_ssize_t; # define PY_SSIZE_T_MAX INT_MAX # define PY_SSIZE_T_MIN INT_MIN typedef inquiry lenfunc; typedef intargfunc ssizeargfunc; typedef intintargfunc ssizessizeargfunc; typedef intobjargproc ssizeobjargproc; typedef intintobjargproc ssizessizeobjargproc; typedef getreadbufferproc readbufferproc; typedef getwritebufferproc writebufferproc; typedef getsegcountproc segcountproc; typedef getcharbufferproc charbufferproc; static long PyNumber_AsSsize_t (PyObject *x, void *SWIGUNUSEDPARM(exc)) { long result = 0; PyObject *i = PyNumber_Int(x); if (i) { result = PyInt_AsLong(i); Py_DECREF(i); } return result; } #endif #if PY_VERSION_HEX < 0x02040000 #define Py_VISIT(op) \ do { \ if (op) { \ int vret = visit((op), arg); \ if (vret) \ return vret; \ } \ } while (0) #endif #if PY_VERSION_HEX < 0x02030000 typedef struct { PyTypeObject type; PyNumberMethods as_number; PyMappingMethods as_mapping; PySequenceMethods as_sequence; PyBufferProcs as_buffer; PyObject *name, *slots; } PyHeapTypeObject; #endif #if PY_VERSION_HEX < 0x02030000 typedef destructor freefunc; #endif #if ((PY_MAJOR_VERSION == 2 && PY_MINOR_VERSION > 6) || \ (PY_MAJOR_VERSION == 3 && PY_MINOR_VERSION > 0) || \ (PY_MAJOR_VERSION > 3)) # define SWIGPY_USE_CAPSULE # define SWIGPY_CAPSULE_NAME ((char*)"swig_runtime_data" SWIG_RUNTIME_VERSION ".type_pointer_capsule" SWIG_TYPE_TABLE_NAME) #endif #if PY_VERSION_HEX < 0x03020000 #define PyDescr_TYPE(x) (((PyDescrObject *)(x))->d_type) #define PyDescr_NAME(x) (((PyDescrObject *)(x))->d_name) #endif /* ----------------------------------------------------------------------------- * error manipulation * ----------------------------------------------------------------------------- */ SWIGRUNTIME PyObject* SWIG_Python_ErrorType(int code) { PyObject* type = 0; switch(code) { case SWIG_MemoryError: type = PyExc_MemoryError; break; case SWIG_IOError: type = PyExc_IOError; break; case SWIG_RuntimeError: type = PyExc_RuntimeError; break; case SWIG_IndexError: type = PyExc_IndexError; break; case SWIG_TypeError: type = PyExc_TypeError; break; case SWIG_DivisionByZero: type = PyExc_ZeroDivisionError; break; case SWIG_OverflowError: type = PyExc_OverflowError; break; case SWIG_SyntaxError: type = PyExc_SyntaxError; break; case SWIG_ValueError: type = PyExc_ValueError; break; case SWIG_SystemError: type = PyExc_SystemError; break; case SWIG_AttributeError: type = PyExc_AttributeError; break; default: type = PyExc_RuntimeError; } return type; } SWIGRUNTIME void SWIG_Python_AddErrorMsg(const char* mesg) { PyObject *type = 0; PyObject *value = 0; PyObject *traceback = 0; if (PyErr_Occurred()) PyErr_Fetch(&type, &value, &traceback); if (value) { char *tmp; PyObject *old_str = PyObject_Str(value); PyErr_Clear(); Py_XINCREF(type); PyErr_Format(type, "%s %s", tmp = SWIG_Python_str_AsChar(old_str), mesg); SWIG_Python_str_DelForPy3(tmp); Py_DECREF(old_str); Py_DECREF(value); } else { PyErr_SetString(PyExc_RuntimeError, mesg); } } #if defined(SWIG_PYTHON_NO_THREADS) # if defined(SWIG_PYTHON_THREADS) # undef SWIG_PYTHON_THREADS # endif #endif #if defined(SWIG_PYTHON_THREADS) /* Threading support is enabled */ # if !defined(SWIG_PYTHON_USE_GIL) && !defined(SWIG_PYTHON_NO_USE_GIL) # if (PY_VERSION_HEX >= 0x02030000) /* For 2.3 or later, use the PyGILState calls */ # define SWIG_PYTHON_USE_GIL # endif # endif # if defined(SWIG_PYTHON_USE_GIL) /* Use PyGILState threads calls */ # ifndef SWIG_PYTHON_INITIALIZE_THREADS # define SWIG_PYTHON_INITIALIZE_THREADS PyEval_InitThreads() # endif # ifdef __cplusplus /* C++ code */ class SWIG_Python_Thread_Block { bool status; PyGILState_STATE state; public: void end() { if (status) { PyGILState_Release(state); status = false;} } SWIG_Python_Thread_Block() : status(true), state(PyGILState_Ensure()) {} ~SWIG_Python_Thread_Block() { end(); } }; class SWIG_Python_Thread_Allow { bool status; PyThreadState *save; public: void end() { if (status) { PyEval_RestoreThread(save); status = false; }} SWIG_Python_Thread_Allow() : status(true), save(PyEval_SaveThread()) {} ~SWIG_Python_Thread_Allow() { end(); } }; # define SWIG_PYTHON_THREAD_BEGIN_BLOCK SWIG_Python_Thread_Block _swig_thread_block # define SWIG_PYTHON_THREAD_END_BLOCK _swig_thread_block.end() # define SWIG_PYTHON_THREAD_BEGIN_ALLOW SWIG_Python_Thread_Allow _swig_thread_allow # define SWIG_PYTHON_THREAD_END_ALLOW _swig_thread_allow.end() # else /* C code */ # define SWIG_PYTHON_THREAD_BEGIN_BLOCK PyGILState_STATE _swig_thread_block = PyGILState_Ensure() # define SWIG_PYTHON_THREAD_END_BLOCK PyGILState_Release(_swig_thread_block) # define SWIG_PYTHON_THREAD_BEGIN_ALLOW PyThreadState *_swig_thread_allow = PyEval_SaveThread() # define SWIG_PYTHON_THREAD_END_ALLOW PyEval_RestoreThread(_swig_thread_allow) # endif # else /* Old thread way, not implemented, user must provide it */ # if !defined(SWIG_PYTHON_INITIALIZE_THREADS) # define SWIG_PYTHON_INITIALIZE_THREADS # endif # if !defined(SWIG_PYTHON_THREAD_BEGIN_BLOCK) # define SWIG_PYTHON_THREAD_BEGIN_BLOCK # endif # if !defined(SWIG_PYTHON_THREAD_END_BLOCK) # define SWIG_PYTHON_THREAD_END_BLOCK # endif # if !defined(SWIG_PYTHON_THREAD_BEGIN_ALLOW) # define SWIG_PYTHON_THREAD_BEGIN_ALLOW # endif # if !defined(SWIG_PYTHON_THREAD_END_ALLOW) # define SWIG_PYTHON_THREAD_END_ALLOW # endif # endif #else /* No thread support */ # define SWIG_PYTHON_INITIALIZE_THREADS # define SWIG_PYTHON_THREAD_BEGIN_BLOCK # define SWIG_PYTHON_THREAD_END_BLOCK # define SWIG_PYTHON_THREAD_BEGIN_ALLOW # define SWIG_PYTHON_THREAD_END_ALLOW #endif /* ----------------------------------------------------------------------------- * Python API portion that goes into the runtime * ----------------------------------------------------------------------------- */ #ifdef __cplusplus extern "C" { #endif /* ----------------------------------------------------------------------------- * Constant declarations * ----------------------------------------------------------------------------- */ /* Constant Types */ #define SWIG_PY_POINTER 4 #define SWIG_PY_BINARY 5 /* Constant information structure */ typedef struct swig_const_info { int type; char *name; long lvalue; double dvalue; void *pvalue; swig_type_info **ptype; } swig_const_info; /* ----------------------------------------------------------------------------- * Wrapper of PyInstanceMethod_New() used in Python 3 * It is exported to the generated module, used for -fastproxy * ----------------------------------------------------------------------------- */ #if PY_VERSION_HEX >= 0x03000000 SWIGRUNTIME PyObject* SWIG_PyInstanceMethod_New(PyObject *SWIGUNUSEDPARM(self), PyObject *func) { return PyInstanceMethod_New(func); } #else SWIGRUNTIME PyObject* SWIG_PyInstanceMethod_New(PyObject *SWIGUNUSEDPARM(self), PyObject *SWIGUNUSEDPARM(func)) { return NULL; } #endif #ifdef __cplusplus } #endif /* ----------------------------------------------------------------------------- * pyrun.swg * * This file contains the runtime support for Python modules * and includes code for managing global variables and pointer * type checking. * * ----------------------------------------------------------------------------- */ /* Common SWIG API */ /* for raw pointers */ #define SWIG_Python_ConvertPtr(obj, pptr, type, flags) SWIG_Python_ConvertPtrAndOwn(obj, pptr, type, flags, 0) #define SWIG_ConvertPtr(obj, pptr, type, flags) SWIG_Python_ConvertPtr(obj, pptr, type, flags) #define SWIG_ConvertPtrAndOwn(obj,pptr,type,flags,own) SWIG_Python_ConvertPtrAndOwn(obj, pptr, type, flags, own) #ifdef SWIGPYTHON_BUILTIN #define SWIG_NewPointerObj(ptr, type, flags) SWIG_Python_NewPointerObj(self, ptr, type, flags) #else #define SWIG_NewPointerObj(ptr, type, flags) SWIG_Python_NewPointerObj(NULL, ptr, type, flags) #endif #define SWIG_InternalNewPointerObj(ptr, type, flags) SWIG_Python_NewPointerObj(NULL, ptr, type, flags) #define SWIG_CheckImplicit(ty) SWIG_Python_CheckImplicit(ty) #define SWIG_AcquirePtr(ptr, src) SWIG_Python_AcquirePtr(ptr, src) #define swig_owntype int /* for raw packed data */ #define SWIG_ConvertPacked(obj, ptr, sz, ty) SWIG_Python_ConvertPacked(obj, ptr, sz, ty) #define SWIG_NewPackedObj(ptr, sz, type) SWIG_Python_NewPackedObj(ptr, sz, type) /* for class or struct pointers */ #define SWIG_ConvertInstance(obj, pptr, type, flags) SWIG_ConvertPtr(obj, pptr, type, flags) #define SWIG_NewInstanceObj(ptr, type, flags) SWIG_NewPointerObj(ptr, type, flags) /* for C or C++ function pointers */ #define SWIG_ConvertFunctionPtr(obj, pptr, type) SWIG_Python_ConvertFunctionPtr(obj, pptr, type) #define SWIG_NewFunctionPtrObj(ptr, type) SWIG_Python_NewPointerObj(NULL, ptr, type, 0) /* for C++ member pointers, ie, member methods */ #define SWIG_ConvertMember(obj, ptr, sz, ty) SWIG_Python_ConvertPacked(obj, ptr, sz, ty) #define SWIG_NewMemberObj(ptr, sz, type) SWIG_Python_NewPackedObj(ptr, sz, type) /* Runtime API */ #define SWIG_GetModule(clientdata) SWIG_Python_GetModule() #define SWIG_SetModule(clientdata, pointer) SWIG_Python_SetModule(pointer) #define SWIG_NewClientData(obj) SwigPyClientData_New(obj) #define SWIG_SetErrorObj SWIG_Python_SetErrorObj #define SWIG_SetErrorMsg SWIG_Python_SetErrorMsg #define SWIG_ErrorType(code) SWIG_Python_ErrorType(code) #define SWIG_Error(code, msg) SWIG_Python_SetErrorMsg(SWIG_ErrorType(code), msg) #define SWIG_fail goto fail /* Runtime API implementation */ /* Error manipulation */ SWIGINTERN void SWIG_Python_SetErrorObj(PyObject *errtype, PyObject *obj) { SWIG_PYTHON_THREAD_BEGIN_BLOCK; PyErr_SetObject(errtype, obj); Py_DECREF(obj); SWIG_PYTHON_THREAD_END_BLOCK; } SWIGINTERN void SWIG_Python_SetErrorMsg(PyObject *errtype, const char *msg) { SWIG_PYTHON_THREAD_BEGIN_BLOCK; PyErr_SetString(errtype, (char *) msg); SWIG_PYTHON_THREAD_END_BLOCK; } #define SWIG_Python_Raise(obj, type, desc) SWIG_Python_SetErrorObj(SWIG_Python_ExceptionType(desc), obj) /* Set a constant value */ #if defined(SWIGPYTHON_BUILTIN) SWIGINTERN void SwigPyBuiltin_AddPublicSymbol(PyObject *seq, const char *key) { PyObject *s = PyString_InternFromString(key); PyList_Append(seq, s); Py_DECREF(s); } SWIGINTERN void SWIG_Python_SetConstant(PyObject *d, PyObject *public_interface, const char *name, PyObject *obj) { PyDict_SetItemString(d, (char *)name, obj); Py_DECREF(obj); if (public_interface) SwigPyBuiltin_AddPublicSymbol(public_interface, name); } #else SWIGINTERN void SWIG_Python_SetConstant(PyObject *d, const char *name, PyObject *obj) { PyDict_SetItemString(d, (char *)name, obj); Py_DECREF(obj); } #endif /* Append a value to the result obj */ SWIGINTERN PyObject* SWIG_Python_AppendOutput(PyObject* result, PyObject* obj) { #if !defined(SWIG_PYTHON_OUTPUT_TUPLE) if (!result) { result = obj; } else if (result == Py_None) { Py_DECREF(result); result = obj; } else { if (!PyList_Check(result)) { PyObject *o2 = result; result = PyList_New(1); PyList_SetItem(result, 0, o2); } PyList_Append(result,obj); Py_DECREF(obj); } return result; #else PyObject* o2; PyObject* o3; if (!result) { result = obj; } else if (result == Py_None) { Py_DECREF(result); result = obj; } else { if (!PyTuple_Check(result)) { o2 = result; result = PyTuple_New(1); PyTuple_SET_ITEM(result, 0, o2); } o3 = PyTuple_New(1); PyTuple_SET_ITEM(o3, 0, obj); o2 = result; result = PySequence_Concat(o2, o3); Py_DECREF(o2); Py_DECREF(o3); } return result; #endif } /* Unpack the argument tuple */ SWIGINTERN int SWIG_Python_UnpackTuple(PyObject *args, const char *name, Py_ssize_t min, Py_ssize_t max, PyObject **objs) { if (!args) { if (!min && !max) { return 1; } else { PyErr_Format(PyExc_TypeError, "%s expected %s%d arguments, got none", name, (min == max ? "" : "at least "), (int)min); return 0; } } if (!PyTuple_Check(args)) { if (min <= 1 && max >= 1) { register int i; objs[0] = args; for (i = 1; i < max; ++i) { objs[i] = 0; } return 2; } PyErr_SetString(PyExc_SystemError, "UnpackTuple() argument list is not a tuple"); return 0; } else { register Py_ssize_t l = PyTuple_GET_SIZE(args); if (l < min) { PyErr_Format(PyExc_TypeError, "%s expected %s%d arguments, got %d", name, (min == max ? "" : "at least "), (int)min, (int)l); return 0; } else if (l > max) { PyErr_Format(PyExc_TypeError, "%s expected %s%d arguments, got %d", name, (min == max ? "" : "at most "), (int)max, (int)l); return 0; } else { register int i; for (i = 0; i < l; ++i) { objs[i] = PyTuple_GET_ITEM(args, i); } for (; l < max; ++l) { objs[l] = 0; } return i + 1; } } } /* A functor is a function object with one single object argument */ #if PY_VERSION_HEX >= 0x02020000 #define SWIG_Python_CallFunctor(functor, obj) PyObject_CallFunctionObjArgs(functor, obj, NULL); #else #define SWIG_Python_CallFunctor(functor, obj) PyObject_CallFunction(functor, "O", obj); #endif /* Helper for static pointer initialization for both C and C++ code, for example static PyObject *SWIG_STATIC_POINTER(MyVar) = NewSomething(...); */ #ifdef __cplusplus #define SWIG_STATIC_POINTER(var) var #else #define SWIG_STATIC_POINTER(var) var = 0; if (!var) var #endif /* ----------------------------------------------------------------------------- * Pointer declarations * ----------------------------------------------------------------------------- */ /* Flags for new pointer objects */ #define SWIG_POINTER_NOSHADOW (SWIG_POINTER_OWN << 1) #define SWIG_POINTER_NEW (SWIG_POINTER_NOSHADOW | SWIG_POINTER_OWN) #define SWIG_POINTER_IMPLICIT_CONV (SWIG_POINTER_DISOWN << 1) #define SWIG_BUILTIN_TP_INIT (SWIG_POINTER_OWN << 2) #define SWIG_BUILTIN_INIT (SWIG_BUILTIN_TP_INIT | SWIG_POINTER_OWN) #ifdef __cplusplus extern "C" { #endif /* How to access Py_None */ #if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__) # ifndef SWIG_PYTHON_NO_BUILD_NONE # ifndef SWIG_PYTHON_BUILD_NONE # define SWIG_PYTHON_BUILD_NONE # endif # endif #endif #ifdef SWIG_PYTHON_BUILD_NONE # ifdef Py_None # undef Py_None # define Py_None SWIG_Py_None() # endif SWIGRUNTIMEINLINE PyObject * _SWIG_Py_None(void) { PyObject *none = Py_BuildValue((char*)""); Py_DECREF(none); return none; } SWIGRUNTIME PyObject * SWIG_Py_None(void) { static PyObject *SWIG_STATIC_POINTER(none) = _SWIG_Py_None(); return none; } #endif /* The python void return value */ SWIGRUNTIMEINLINE PyObject * SWIG_Py_Void(void) { PyObject *none = Py_None; Py_INCREF(none); return none; } /* SwigPyClientData */ typedef struct { PyObject *klass; PyObject *newraw; PyObject *newargs; PyObject *destroy; int delargs; int implicitconv; PyTypeObject *pytype; } SwigPyClientData; SWIGRUNTIMEINLINE int SWIG_Python_CheckImplicit(swig_type_info *ty) { SwigPyClientData *data = (SwigPyClientData *)ty->clientdata; return data ? data->implicitconv : 0; } SWIGRUNTIMEINLINE PyObject * SWIG_Python_ExceptionType(swig_type_info *desc) { SwigPyClientData *data = desc ? (SwigPyClientData *) desc->clientdata : 0; PyObject *klass = data ? data->klass : 0; return (klass ? klass : PyExc_RuntimeError); } SWIGRUNTIME SwigPyClientData * SwigPyClientData_New(PyObject* obj) { if (!obj) { return 0; } else { SwigPyClientData *data = (SwigPyClientData *)malloc(sizeof(SwigPyClientData)); /* the klass element */ data->klass = obj; Py_INCREF(data->klass); /* the newraw method and newargs arguments used to create a new raw instance */ if (PyClass_Check(obj)) { data->newraw = 0; data->newargs = obj; Py_INCREF(obj); } else { #if (PY_VERSION_HEX < 0x02020000) data->newraw = 0; #else data->newraw = PyObject_GetAttrString(data->klass, (char *)"__new__"); #endif if (data->newraw) { Py_INCREF(data->newraw); data->newargs = PyTuple_New(1); PyTuple_SetItem(data->newargs, 0, obj); } else { data->newargs = obj; } Py_INCREF(data->newargs); } /* the destroy method, aka as the C++ delete method */ data->destroy = PyObject_GetAttrString(data->klass, (char *)"__swig_destroy__"); if (PyErr_Occurred()) { PyErr_Clear(); data->destroy = 0; } if (data->destroy) { int flags; Py_INCREF(data->destroy); flags = PyCFunction_GET_FLAGS(data->destroy); #ifdef METH_O data->delargs = !(flags & (METH_O)); #else data->delargs = 0; #endif } else { data->delargs = 0; } data->implicitconv = 0; data->pytype = 0; return data; } } SWIGRUNTIME void SwigPyClientData_Del(SwigPyClientData *data) { Py_XDECREF(data->newraw); Py_XDECREF(data->newargs); Py_XDECREF(data->destroy); } /* =============== SwigPyObject =====================*/ typedef struct { PyObject_HEAD void *ptr; swig_type_info *ty; int own; PyObject *next; #ifdef SWIGPYTHON_BUILTIN PyObject *dict; #endif } SwigPyObject; SWIGRUNTIME PyObject * SwigPyObject_long(SwigPyObject *v) { return PyLong_FromVoidPtr(v->ptr); } SWIGRUNTIME PyObject * SwigPyObject_format(const char* fmt, SwigPyObject *v) { PyObject *res = NULL; PyObject *args = PyTuple_New(1); if (args) { if (PyTuple_SetItem(args, 0, SwigPyObject_long(v)) == 0) { PyObject *ofmt = SWIG_Python_str_FromChar(fmt); if (ofmt) { #if PY_VERSION_HEX >= 0x03000000 res = PyUnicode_Format(ofmt,args); #else res = PyString_Format(ofmt,args); #endif Py_DECREF(ofmt); } Py_DECREF(args); } } return res; } SWIGRUNTIME PyObject * SwigPyObject_oct(SwigPyObject *v) { return SwigPyObject_format("%o",v); } SWIGRUNTIME PyObject * SwigPyObject_hex(SwigPyObject *v) { return SwigPyObject_format("%x",v); } SWIGRUNTIME PyObject * #ifdef METH_NOARGS SwigPyObject_repr(SwigPyObject *v) #else SwigPyObject_repr(SwigPyObject *v, PyObject *args) #endif { const char *name = SWIG_TypePrettyName(v->ty); PyObject *repr = SWIG_Python_str_FromFormat("<Swig Object of type '%s' at %p>", name, (void *)v); if (v->next) { # ifdef METH_NOARGS PyObject *nrep = SwigPyObject_repr((SwigPyObject *)v->next); # else PyObject *nrep = SwigPyObject_repr((SwigPyObject *)v->next, args); # endif # if PY_VERSION_HEX >= 0x03000000 PyObject *joined = PyUnicode_Concat(repr, nrep); Py_DecRef(repr); Py_DecRef(nrep); repr = joined; # else PyString_ConcatAndDel(&repr,nrep); # endif } return repr; } SWIGRUNTIME int SwigPyObject_print(SwigPyObject *v, FILE *fp, int SWIGUNUSEDPARM(flags)) { char *str; #ifdef METH_NOARGS PyObject *repr = SwigPyObject_repr(v); #else PyObject *repr = SwigPyObject_repr(v, NULL); #endif if (repr) { str = SWIG_Python_str_AsChar(repr); fputs(str, fp); SWIG_Python_str_DelForPy3(str); Py_DECREF(repr); return 0; } else { return 1; } } SWIGRUNTIME PyObject * SwigPyObject_str(SwigPyObject *v) { char result[SWIG_BUFFER_SIZE]; return SWIG_PackVoidPtr(result, v->ptr, v->ty->name, sizeof(result)) ? SWIG_Python_str_FromChar(result) : 0; } SWIGRUNTIME int SwigPyObject_compare(SwigPyObject *v, SwigPyObject *w) { void *i = v->ptr; void *j = w->ptr; return (i < j) ? -1 : ((i > j) ? 1 : 0); } /* Added for Python 3.x, would it also be useful for Python 2.x? */ SWIGRUNTIME PyObject* SwigPyObject_richcompare(SwigPyObject *v, SwigPyObject *w, int op) { PyObject* res; if( op != Py_EQ && op != Py_NE ) { Py_INCREF(Py_NotImplemented); return Py_NotImplemented; } res = PyBool_FromLong( (SwigPyObject_compare(v, w)==0) == (op == Py_EQ) ? 1 : 0); return res; } SWIGRUNTIME PyTypeObject* SwigPyObject_TypeOnce(void); #ifdef SWIGPYTHON_BUILTIN static swig_type_info *SwigPyObject_stype = 0; SWIGRUNTIME PyTypeObject* SwigPyObject_type(void) { SwigPyClientData *cd; assert(SwigPyObject_stype); cd = (SwigPyClientData*) SwigPyObject_stype->clientdata; assert(cd); assert(cd->pytype); return cd->pytype; } #else SWIGRUNTIME PyTypeObject* SwigPyObject_type(void) { static PyTypeObject *SWIG_STATIC_POINTER(type) = SwigPyObject_TypeOnce(); return type; } #endif SWIGRUNTIMEINLINE int SwigPyObject_Check(PyObject *op) { #ifdef SWIGPYTHON_BUILTIN PyTypeObject *target_tp = SwigPyObject_type(); if (PyType_IsSubtype(op->ob_type, target_tp)) return 1; return (strcmp(op->ob_type->tp_name, "SwigPyObject") == 0); #else return (Py_TYPE(op) == SwigPyObject_type()) || (strcmp(Py_TYPE(op)->tp_name,"SwigPyObject") == 0); #endif } SWIGRUNTIME PyObject * SwigPyObject_New(void *ptr, swig_type_info *ty, int own); SWIGRUNTIME void SwigPyObject_dealloc(PyObject *v) { SwigPyObject *sobj = (SwigPyObject *) v; PyObject *next = sobj->next; if (sobj->own == SWIG_POINTER_OWN) { swig_type_info *ty = sobj->ty; SwigPyClientData *data = ty ? (SwigPyClientData *) ty->clientdata : 0; PyObject *destroy = data ? data->destroy : 0; if (destroy) { /* destroy is always a VARARGS method */ PyObject *res; if (data->delargs) { /* we need to create a temporary object to carry the destroy operation */ PyObject *tmp = SwigPyObject_New(sobj->ptr, ty, 0); res = SWIG_Python_CallFunctor(destroy, tmp); Py_DECREF(tmp); } else { PyCFunction meth = PyCFunction_GET_FUNCTION(destroy); PyObject *mself = PyCFunction_GET_SELF(destroy); res = ((*meth)(mself, v)); } Py_XDECREF(res); } #if !defined(SWIG_PYTHON_SILENT_MEMLEAK) else { const char *name = SWIG_TypePrettyName(ty); printf("swig/python detected a memory leak of type '%s', no destructor found.\n", (name ? name : "unknown")); } #endif } Py_XDECREF(next); PyObject_DEL(v); } SWIGRUNTIME PyObject* SwigPyObject_append(PyObject* v, PyObject* next) { SwigPyObject *sobj = (SwigPyObject *) v; #ifndef METH_O PyObject *tmp = 0; if (!PyArg_ParseTuple(next,(char *)"O:append", &tmp)) return NULL; next = tmp; #endif if (!SwigPyObject_Check(next)) { return NULL; } sobj->next = next; Py_INCREF(next); return SWIG_Py_Void(); } SWIGRUNTIME PyObject* #ifdef METH_NOARGS SwigPyObject_next(PyObject* v) #else SwigPyObject_next(PyObject* v, PyObject *SWIGUNUSEDPARM(args)) #endif { SwigPyObject *sobj = (SwigPyObject *) v; if (sobj->next) { Py_INCREF(sobj->next); return sobj->next; } else { return SWIG_Py_Void(); } } SWIGINTERN PyObject* #ifdef METH_NOARGS SwigPyObject_disown(PyObject *v) #else SwigPyObject_disown(PyObject* v, PyObject *SWIGUNUSEDPARM(args)) #endif { SwigPyObject *sobj = (SwigPyObject *)v; sobj->own = 0; return SWIG_Py_Void(); } SWIGINTERN PyObject* #ifdef METH_NOARGS SwigPyObject_acquire(PyObject *v) #else SwigPyObject_acquire(PyObject* v, PyObject *SWIGUNUSEDPARM(args)) #endif { SwigPyObject *sobj = (SwigPyObject *)v; sobj->own = SWIG_POINTER_OWN; return SWIG_Py_Void(); } SWIGINTERN PyObject* SwigPyObject_own(PyObject *v, PyObject *args) { PyObject *val = 0; #if (PY_VERSION_HEX < 0x02020000) if (!PyArg_ParseTuple(args,(char *)"|O:own",&val)) #else if (!PyArg_UnpackTuple(args, (char *)"own", 0, 1, &val)) #endif { return NULL; } else { SwigPyObject *sobj = (SwigPyObject *)v; PyObject *obj = PyBool_FromLong(sobj->own); if (val) { #ifdef METH_NOARGS if (PyObject_IsTrue(val)) { SwigPyObject_acquire(v); } else { SwigPyObject_disown(v); } #else if (PyObject_IsTrue(val)) { SwigPyObject_acquire(v,args); } else { SwigPyObject_disown(v,args); } #endif } return obj; } } #ifdef METH_O static PyMethodDef swigobject_methods[] = { {(char *)"disown", (PyCFunction)SwigPyObject_disown, METH_NOARGS, (char *)"releases ownership of the pointer"}, {(char *)"acquire", (PyCFunction)SwigPyObject_acquire, METH_NOARGS, (char *)"aquires ownership of the pointer"}, {(char *)"own", (PyCFunction)SwigPyObject_own, METH_VARARGS, (char *)"returns/sets ownership of the pointer"}, {(char *)"append", (PyCFunction)SwigPyObject_append, METH_O, (char *)"appends another 'this' object"}, {(char *)"next", (PyCFunction)SwigPyObject_next, METH_NOARGS, (char *)"returns the next 'this' object"}, {(char *)"__repr__",(PyCFunction)SwigPyObject_repr, METH_NOARGS, (char *)"returns object representation"}, {0, 0, 0, 0} }; #else static PyMethodDef swigobject_methods[] = { {(char *)"disown", (PyCFunction)SwigPyObject_disown, METH_VARARGS, (char *)"releases ownership of the pointer"}, {(char *)"acquire", (PyCFunction)SwigPyObject_acquire, METH_VARARGS, (char *)"aquires ownership of the pointer"}, {(char *)"own", (PyCFunction)SwigPyObject_own, METH_VARARGS, (char *)"returns/sets ownership of the pointer"}, {(char *)"append", (PyCFunction)SwigPyObject_append, METH_VARARGS, (char *)"appends another 'this' object"}, {(char *)"next", (PyCFunction)SwigPyObject_next, METH_VARARGS, (char *)"returns the next 'this' object"}, {(char *)"__repr__",(PyCFunction)SwigPyObject_repr, METH_VARARGS, (char *)"returns object representation"}, {0, 0, 0, 0} }; #endif #if PY_VERSION_HEX < 0x02020000 SWIGINTERN PyObject * SwigPyObject_getattr(SwigPyObject *sobj,char *name) { return Py_FindMethod(swigobject_methods, (PyObject *)sobj, name); } #endif SWIGRUNTIME PyTypeObject* SwigPyObject_TypeOnce(void) { static char swigobject_doc[] = "Swig object carries a C/C++ instance pointer"; static PyNumberMethods SwigPyObject_as_number = { (binaryfunc)0, /*nb_add*/ (binaryfunc)0, /*nb_subtract*/ (binaryfunc)0, /*nb_multiply*/ /* nb_divide removed in Python 3 */ #if PY_VERSION_HEX < 0x03000000 (binaryfunc)0, /*nb_divide*/ #endif (binaryfunc)0, /*nb_remainder*/ (binaryfunc)0, /*nb_divmod*/ (ternaryfunc)0,/*nb_power*/ (unaryfunc)0, /*nb_negative*/ (unaryfunc)0, /*nb_positive*/ (unaryfunc)0, /*nb_absolute*/ (inquiry)0, /*nb_nonzero*/ 0, /*nb_invert*/ 0, /*nb_lshift*/ 0, /*nb_rshift*/ 0, /*nb_and*/ 0, /*nb_xor*/ 0, /*nb_or*/ #if PY_VERSION_HEX < 0x03000000 0, /*nb_coerce*/ #endif (unaryfunc)SwigPyObject_long, /*nb_int*/ #if PY_VERSION_HEX < 0x03000000 (unaryfunc)SwigPyObject_long, /*nb_long*/ #else 0, /*nb_reserved*/ #endif (unaryfunc)0, /*nb_float*/ #if PY_VERSION_HEX < 0x03000000 (unaryfunc)SwigPyObject_oct, /*nb_oct*/ (unaryfunc)SwigPyObject_hex, /*nb_hex*/ #endif #if PY_VERSION_HEX >= 0x03000000 /* 3.0 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_index, nb_inplace_divide removed */ #elif PY_VERSION_HEX >= 0x02050000 /* 2.5.0 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_index */ #elif PY_VERSION_HEX >= 0x02020000 /* 2.2.0 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_inplace_true_divide */ #elif PY_VERSION_HEX >= 0x02000000 /* 2.0.0 */ 0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_inplace_or */ #endif }; static PyTypeObject swigpyobject_type; static int type_init = 0; if (!type_init) { const PyTypeObject tmp = { /* PyObject header changed in Python 3 */ #if PY_VERSION_HEX >= 0x03000000 PyVarObject_HEAD_INIT(NULL, 0) #else PyObject_HEAD_INIT(NULL) 0, /* ob_size */ #endif (char *)"SwigPyObject", /* tp_name */ sizeof(SwigPyObject), /* tp_basicsize */ 0, /* tp_itemsize */ (destructor)SwigPyObject_dealloc, /* tp_dealloc */ (printfunc)SwigPyObject_print, /* tp_print */ #if PY_VERSION_HEX < 0x02020000 (getattrfunc)SwigPyObject_getattr, /* tp_getattr */ #else (getattrfunc)0, /* tp_getattr */ #endif (setattrfunc)0, /* tp_setattr */ #if PY_VERSION_HEX >= 0x03000000 0, /* tp_reserved in 3.0.1, tp_compare in 3.0.0 but not used */ #else (cmpfunc)SwigPyObject_compare, /* tp_compare */ #endif (reprfunc)SwigPyObject_repr, /* tp_repr */ &SwigPyObject_as_number, /* tp_as_number */ 0, /* tp_as_sequence */ 0, /* tp_as_mapping */ (hashfunc)0, /* tp_hash */ (ternaryfunc)0, /* tp_call */ (reprfunc)SwigPyObject_str, /* tp_str */ PyObject_GenericGetAttr, /* tp_getattro */ 0, /* tp_setattro */ 0, /* tp_as_buffer */ Py_TPFLAGS_DEFAULT, /* tp_flags */ swigobject_doc, /* tp_doc */ 0, /* tp_traverse */ 0, /* tp_clear */ (richcmpfunc)SwigPyObject_richcompare,/* tp_richcompare */ 0, /* tp_weaklistoffset */ #if PY_VERSION_HEX >= 0x02020000 0, /* tp_iter */ 0, /* tp_iternext */ swigobject_methods, /* tp_methods */ 0, /* tp_members */ 0, /* tp_getset */ 0, /* tp_base */ 0, /* tp_dict */ 0, /* tp_descr_get */ 0, /* tp_descr_set */ 0, /* tp_dictoffset */ 0, /* tp_init */ 0, /* tp_alloc */ 0, /* tp_new */ 0, /* tp_free */ 0, /* tp_is_gc */ 0, /* tp_bases */ 0, /* tp_mro */ 0, /* tp_cache */ 0, /* tp_subclasses */ 0, /* tp_weaklist */ #endif #if PY_VERSION_HEX >= 0x02030000 0, /* tp_del */ #endif #if PY_VERSION_HEX >= 0x02060000 0, /* tp_version */ #endif #ifdef COUNT_ALLOCS 0,0,0,0 /* tp_alloc -> tp_next */ #endif }; swigpyobject_type = tmp; type_init = 1; #if PY_VERSION_HEX < 0x02020000 swigpyobject_type.ob_type = &PyType_Type; #else if (PyType_Ready(&swigpyobject_type) < 0) return NULL; #endif } return &swigpyobject_type; } SWIGRUNTIME PyObject * SwigPyObject_New(void *ptr, swig_type_info *ty, int own) { SwigPyObject *sobj = PyObject_NEW(SwigPyObject, SwigPyObject_type()); if (sobj) { sobj->ptr = ptr; sobj->ty = ty; sobj->own = own; sobj->next = 0; } return (PyObject *)sobj; } /* ----------------------------------------------------------------------------- * Implements a simple Swig Packed type, and use it instead of string * ----------------------------------------------------------------------------- */ typedef struct { PyObject_HEAD void *pack; swig_type_info *ty; size_t size; } SwigPyPacked; SWIGRUNTIME int SwigPyPacked_print(SwigPyPacked *v, FILE *fp, int SWIGUNUSEDPARM(flags)) { char result[SWIG_BUFFER_SIZE]; fputs("<Swig Packed ", fp); if (SWIG_PackDataName(result, v->pack, v->size, 0, sizeof(result))) { fputs("at ", fp); fputs(result, fp); } fputs(v->ty->name,fp); fputs(">", fp); return 0; } SWIGRUNTIME PyObject * SwigPyPacked_repr(SwigPyPacked *v) { char result[SWIG_BUFFER_SIZE]; if (SWIG_PackDataName(result, v->pack, v->size, 0, sizeof(result))) { return SWIG_Python_str_FromFormat("<Swig Packed at %s%s>", result, v->ty->name); } else { return SWIG_Python_str_FromFormat("<Swig Packed %s>", v->ty->name); } } SWIGRUNTIME PyObject * SwigPyPacked_str(SwigPyPacked *v) { char result[SWIG_BUFFER_SIZE]; if (SWIG_PackDataName(result, v->pack, v->size, 0, sizeof(result))){ return SWIG_Python_str_FromFormat("%s%s", result, v->ty->name); } else { return SWIG_Python_str_FromChar(v->ty->name); } } SWIGRUNTIME int SwigPyPacked_compare(SwigPyPacked *v, SwigPyPacked *w) { size_t i = v->size; size_t j = w->size; int s = (i < j) ? -1 : ((i > j) ? 1 : 0); return s ? s : strncmp((char *)v->pack, (char *)w->pack, 2*v->size); } SWIGRUNTIME PyTypeObject* SwigPyPacked_TypeOnce(void); SWIGRUNTIME PyTypeObject* SwigPyPacked_type(void) { static PyTypeObject *SWIG_STATIC_POINTER(type) = SwigPyPacked_TypeOnce(); return type; } SWIGRUNTIMEINLINE int SwigPyPacked_Check(PyObject *op) { return ((op)->ob_type == SwigPyPacked_TypeOnce()) || (strcmp((op)->ob_type->tp_name,"SwigPyPacked") == 0); } SWIGRUNTIME void SwigPyPacked_dealloc(PyObject *v) { if (SwigPyPacked_Check(v)) { SwigPyPacked *sobj = (SwigPyPacked *) v; free(sobj->pack); } PyObject_DEL(v); } SWIGRUNTIME PyTypeObject* SwigPyPacked_TypeOnce(void) { static char swigpacked_doc[] = "Swig object carries a C/C++ instance pointer"; static PyTypeObject swigpypacked_type; static int type_init = 0; if (!type_init) { const PyTypeObject tmp = { /* PyObject header changed in Python 3 */ #if PY_VERSION_HEX>=0x03000000 PyVarObject_HEAD_INIT(NULL, 0) #else PyObject_HEAD_INIT(NULL) 0, /* ob_size */ #endif (char *)"SwigPyPacked", /* tp_name */ sizeof(SwigPyPacked), /* tp_basicsize */ 0, /* tp_itemsize */ (destructor)SwigPyPacked_dealloc, /* tp_dealloc */ (printfunc)SwigPyPacked_print, /* tp_print */ (getattrfunc)0, /* tp_getattr */ (setattrfunc)0, /* tp_setattr */ #if PY_VERSION_HEX>=0x03000000 0, /* tp_reserved in 3.0.1 */ #else (cmpfunc)SwigPyPacked_compare, /* tp_compare */ #endif (reprfunc)SwigPyPacked_repr, /* tp_repr */ 0, /* tp_as_number */ 0, /* tp_as_sequence */ 0, /* tp_as_mapping */ (hashfunc)0, /* tp_hash */ (ternaryfunc)0, /* tp_call */ (reprfunc)SwigPyPacked_str, /* tp_str */ PyObject_GenericGetAttr, /* tp_getattro */ 0, /* tp_setattro */ 0, /* tp_as_buffer */ Py_TPFLAGS_DEFAULT, /* tp_flags */ swigpacked_doc, /* tp_doc */ 0, /* tp_traverse */ 0, /* tp_clear */ 0, /* tp_richcompare */ 0, /* tp_weaklistoffset */ #if PY_VERSION_HEX >= 0x02020000 0, /* tp_iter */ 0, /* tp_iternext */ 0, /* tp_methods */ 0, /* tp_members */ 0, /* tp_getset */ 0, /* tp_base */ 0, /* tp_dict */ 0, /* tp_descr_get */ 0, /* tp_descr_set */ 0, /* tp_dictoffset */ 0, /* tp_init */ 0, /* tp_alloc */ 0, /* tp_new */ 0, /* tp_free */ 0, /* tp_is_gc */ 0, /* tp_bases */ 0, /* tp_mro */ 0, /* tp_cache */ 0, /* tp_subclasses */ 0, /* tp_weaklist */ #endif #if PY_VERSION_HEX >= 0x02030000 0, /* tp_del */ #endif #if PY_VERSION_HEX >= 0x02060000 0, /* tp_version */ #endif #ifdef COUNT_ALLOCS 0,0,0,0 /* tp_alloc -> tp_next */ #endif }; swigpypacked_type = tmp; type_init = 1; #if PY_VERSION_HEX < 0x02020000 swigpypacked_type.ob_type = &PyType_Type; #else if (PyType_Ready(&swigpypacked_type) < 0) return NULL; #endif } return &swigpypacked_type; } SWIGRUNTIME PyObject * SwigPyPacked_New(void *ptr, size_t size, swig_type_info *ty) { SwigPyPacked *sobj = PyObject_NEW(SwigPyPacked, SwigPyPacked_type()); if (sobj) { void *pack = malloc(size); if (pack) { memcpy(pack, ptr, size); sobj->pack = pack; sobj->ty = ty; sobj->size = size; } else { PyObject_DEL((PyObject *) sobj); sobj = 0; } } return (PyObject *) sobj; } SWIGRUNTIME swig_type_info * SwigPyPacked_UnpackData(PyObject *obj, void *ptr, size_t size) { if (SwigPyPacked_Check(obj)) { SwigPyPacked *sobj = (SwigPyPacked *)obj; if (sobj->size != size) return 0; memcpy(ptr, sobj->pack, size); return sobj->ty; } else { return 0; } } /* ----------------------------------------------------------------------------- * pointers/data manipulation * ----------------------------------------------------------------------------- */ SWIGRUNTIMEINLINE PyObject * _SWIG_This(void) { return SWIG_Python_str_FromChar("this"); } static PyObject *swig_this = NULL; SWIGRUNTIME PyObject * SWIG_This(void) { if (swig_this == NULL) swig_this = _SWIG_This(); return swig_this; } /* #define SWIG_PYTHON_SLOW_GETSET_THIS */ /* TODO: I don't know how to implement the fast getset in Python 3 right now */ #if PY_VERSION_HEX>=0x03000000 #define SWIG_PYTHON_SLOW_GETSET_THIS #endif SWIGRUNTIME SwigPyObject * SWIG_Python_GetSwigThis(PyObject *pyobj) { PyObject *obj; if (SwigPyObject_Check(pyobj)) return (SwigPyObject *) pyobj; #ifdef SWIGPYTHON_BUILTIN (void)obj; # ifdef PyWeakref_CheckProxy if (PyWeakref_CheckProxy(pyobj)) { pyobj = PyWeakref_GET_OBJECT(pyobj); if (pyobj && SwigPyObject_Check(pyobj)) return (SwigPyObject*) pyobj; } # endif return NULL; #else obj = 0; #if (!defined(SWIG_PYTHON_SLOW_GETSET_THIS) && (PY_VERSION_HEX >= 0x02030000)) if (PyInstance_Check(pyobj)) { obj = _PyInstance_Lookup(pyobj, SWIG_This()); } else { PyObject **dictptr = _PyObject_GetDictPtr(pyobj); if (dictptr != NULL) { PyObject *dict = *dictptr; obj = dict ? PyDict_GetItem(dict, SWIG_This()) : 0; } else { #ifdef PyWeakref_CheckProxy if (PyWeakref_CheckProxy(pyobj)) { PyObject *wobj = PyWeakref_GET_OBJECT(pyobj); return wobj ? SWIG_Python_GetSwigThis(wobj) : 0; } #endif obj = PyObject_GetAttr(pyobj,SWIG_This()); if (obj) { Py_DECREF(obj); } else { if (PyErr_Occurred()) PyErr_Clear(); return 0; } } } #else obj = PyObject_GetAttr(pyobj,SWIG_This()); if (obj) { Py_DECREF(obj); } else { if (PyErr_Occurred()) PyErr_Clear(); return 0; } #endif if (obj && !SwigPyObject_Check(obj)) { /* a PyObject is called 'this', try to get the 'real this' SwigPyObject from it */ return SWIG_Python_GetSwigThis(obj); } return (SwigPyObject *)obj; #endif } /* Acquire a pointer value */ SWIGRUNTIME int SWIG_Python_AcquirePtr(PyObject *obj, int own) { if (own == SWIG_POINTER_OWN) { SwigPyObject *sobj = SWIG_Python_GetSwigThis(obj); if (sobj) { int oldown = sobj->own; sobj->own = own; return oldown; } } return 0; } /* Convert a pointer value */ SWIGRUNTIME int SWIG_Python_ConvertPtrAndOwn(PyObject *obj, void **ptr, swig_type_info *ty, int flags, int *own) { int res; SwigPyObject *sobj; if (!obj) return SWIG_ERROR; if (obj == Py_None) { if (ptr) *ptr = 0; return SWIG_OK; } res = SWIG_ERROR; sobj = SWIG_Python_GetSwigThis(obj); if (own) *own = 0; while (sobj) { void *vptr = sobj->ptr; if (ty) { swig_type_info *to = sobj->ty; if (to == ty) { /* no type cast needed */ if (ptr) *ptr = vptr; break; } else { swig_cast_info *tc = SWIG_TypeCheck(to->name,ty); if (!tc) { sobj = (SwigPyObject *)sobj->next; } else { if (ptr) { int newmemory = 0; *ptr = SWIG_TypeCast(tc,vptr,&newmemory); if (newmemory == SWIG_CAST_NEW_MEMORY) { assert(own); /* badly formed typemap which will lead to a memory leak - it must set and use own to delete *ptr */ if (own) *own = *own | SWIG_CAST_NEW_MEMORY; } } break; } } } else { if (ptr) *ptr = vptr; break; } } if (sobj) { if (own) *own = *own | sobj->own; if (flags & SWIG_POINTER_DISOWN) { sobj->own = 0; } res = SWIG_OK; } else { if (flags & SWIG_POINTER_IMPLICIT_CONV) { SwigPyClientData *data = ty ? (SwigPyClientData *) ty->clientdata : 0; if (data && !data->implicitconv) { PyObject *klass = data->klass; if (klass) { PyObject *impconv; data->implicitconv = 1; /* avoid recursion and call 'explicit' constructors*/ impconv = SWIG_Python_CallFunctor(klass, obj); data->implicitconv = 0; if (PyErr_Occurred()) { PyErr_Clear(); impconv = 0; } if (impconv) { SwigPyObject *iobj = SWIG_Python_GetSwigThis(impconv); if (iobj) { void *vptr; res = SWIG_Python_ConvertPtrAndOwn((PyObject*)iobj, &vptr, ty, 0, 0); if (SWIG_IsOK(res)) { if (ptr) { *ptr = vptr; /* transfer the ownership to 'ptr' */ iobj->own = 0; res = SWIG_AddCast(res); res = SWIG_AddNewMask(res); } else { res = SWIG_AddCast(res); } } } Py_DECREF(impconv); } } } } } return res; } /* Convert a function ptr value */ SWIGRUNTIME int SWIG_Python_ConvertFunctionPtr(PyObject *obj, void **ptr, swig_type_info *ty) { if (!PyCFunction_Check(obj)) { return SWIG_ConvertPtr(obj, ptr, ty, 0); } else { void *vptr = 0; /* here we get the method pointer for callbacks */ const char *doc = (((PyCFunctionObject *)obj) -> m_ml -> ml_doc); const char *desc = doc ? strstr(doc, "swig_ptr: ") : 0; if (desc) desc = ty ? SWIG_UnpackVoidPtr(desc + 10, &vptr, ty->name) : 0; if (!desc) return SWIG_ERROR; if (ty) { swig_cast_info *tc = SWIG_TypeCheck(desc,ty); if (tc) { int newmemory = 0; *ptr = SWIG_TypeCast(tc,vptr,&newmemory); assert(!newmemory); /* newmemory handling not yet implemented */ } else { return SWIG_ERROR; } } else { *ptr = vptr; } return SWIG_OK; } } /* Convert a packed value value */ SWIGRUNTIME int SWIG_Python_ConvertPacked(PyObject *obj, void *ptr, size_t sz, swig_type_info *ty) { swig_type_info *to = SwigPyPacked_UnpackData(obj, ptr, sz); if (!to) return SWIG_ERROR; if (ty) { if (to != ty) { /* check type cast? */ swig_cast_info *tc = SWIG_TypeCheck(to->name,ty); if (!tc) return SWIG_ERROR; } } return SWIG_OK; } /* ----------------------------------------------------------------------------- * Create a new pointer object * ----------------------------------------------------------------------------- */ /* Create a new instance object, without calling __init__, and set the 'this' attribute. */ SWIGRUNTIME PyObject* SWIG_Python_NewShadowInstance(SwigPyClientData *data, PyObject *swig_this) { #if (PY_VERSION_HEX >= 0x02020000) PyObject *inst = 0; PyObject *newraw = data->newraw; if (newraw) { inst = PyObject_Call(newraw, data->newargs, NULL); if (inst) { #if !defined(SWIG_PYTHON_SLOW_GETSET_THIS) PyObject **dictptr = _PyObject_GetDictPtr(inst); if (dictptr != NULL) { PyObject *dict = *dictptr; if (dict == NULL) { dict = PyDict_New(); *dictptr = dict; PyDict_SetItem(dict, SWIG_This(), swig_this); } } #else PyObject *key = SWIG_This(); PyObject_SetAttr(inst, key, swig_this); #endif } } else { #if PY_VERSION_HEX >= 0x03000000 inst = PyBaseObject_Type.tp_new((PyTypeObject*) data->newargs, Py_None, Py_None); PyObject_SetAttr(inst, SWIG_This(), swig_this); Py_TYPE(inst)->tp_flags &= ~Py_TPFLAGS_VALID_VERSION_TAG; #else PyObject *dict = PyDict_New(); PyDict_SetItem(dict, SWIG_This(), swig_this); inst = PyInstance_NewRaw(data->newargs, dict); Py_DECREF(dict); #endif } return inst; #else #if (PY_VERSION_HEX >= 0x02010000) PyObject *inst; PyObject *dict = PyDict_New(); PyDict_SetItem(dict, SWIG_This(), swig_this); inst = PyInstance_NewRaw(data->newargs, dict); Py_DECREF(dict); return (PyObject *) inst; #else PyInstanceObject *inst = PyObject_NEW(PyInstanceObject, &PyInstance_Type); if (inst == NULL) { return NULL; } inst->in_class = (PyClassObject *)data->newargs; Py_INCREF(inst->in_class); inst->in_dict = PyDict_New(); if (inst->in_dict == NULL) { Py_DECREF(inst); return NULL; } #ifdef Py_TPFLAGS_HAVE_WEAKREFS inst->in_weakreflist = NULL; #endif #ifdef Py_TPFLAGS_GC PyObject_GC_Init(inst); #endif PyDict_SetItem(inst->in_dict, SWIG_This(), swig_this); return (PyObject *) inst; #endif #endif } SWIGRUNTIME void SWIG_Python_SetSwigThis(PyObject *inst, PyObject *swig_this) { PyObject *dict; #if (PY_VERSION_HEX >= 0x02020000) && !defined(SWIG_PYTHON_SLOW_GETSET_THIS) PyObject **dictptr = _PyObject_GetDictPtr(inst); if (dictptr != NULL) { dict = *dictptr; if (dict == NULL) { dict = PyDict_New(); *dictptr = dict; } PyDict_SetItem(dict, SWIG_This(), swig_this); return; } #endif dict = PyObject_GetAttrString(inst, (char*)"__dict__"); PyDict_SetItem(dict, SWIG_This(), swig_this); Py_DECREF(dict); } SWIGINTERN PyObject * SWIG_Python_InitShadowInstance(PyObject *args) { PyObject *obj[2]; if (!SWIG_Python_UnpackTuple(args,(char*)"swiginit", 2, 2, obj)) { return NULL; } else { SwigPyObject *sthis = SWIG_Python_GetSwigThis(obj[0]); if (sthis) { SwigPyObject_append((PyObject*) sthis, obj[1]); } else { SWIG_Python_SetSwigThis(obj[0], obj[1]); } return SWIG_Py_Void(); } } /* Create a new pointer object */ SWIGRUNTIME PyObject * SWIG_Python_NewPointerObj(PyObject *self, void *ptr, swig_type_info *type, int flags) { SwigPyClientData *clientdata; PyObject * robj; int own; if (!ptr) return SWIG_Py_Void(); clientdata = type ? (SwigPyClientData *)(type->clientdata) : 0; own = (flags & SWIG_POINTER_OWN) ? SWIG_POINTER_OWN : 0; if (clientdata && clientdata->pytype) { SwigPyObject *newobj; if (flags & SWIG_BUILTIN_TP_INIT) { newobj = (SwigPyObject*) self; if (newobj->ptr) { PyObject *next_self = clientdata->pytype->tp_alloc(clientdata->pytype, 0); while (newobj->next) newobj = (SwigPyObject *) newobj->next; newobj->next = next_self; newobj = (SwigPyObject *)next_self; } } else { newobj = PyObject_New(SwigPyObject, clientdata->pytype); } if (newobj) { newobj->ptr = ptr; newobj->ty = type; newobj->own = own; newobj->next = 0; #ifdef SWIGPYTHON_BUILTIN newobj->dict = 0; #endif return (PyObject*) newobj; } return SWIG_Py_Void(); } assert(!(flags & SWIG_BUILTIN_TP_INIT)); robj = SwigPyObject_New(ptr, type, own); if (clientdata && !(flags & SWIG_POINTER_NOSHADOW)) { PyObject *inst = SWIG_Python_NewShadowInstance(clientdata, robj); if (inst) { Py_DECREF(robj); robj = inst; } } return robj; } /* Create a new packed object */ SWIGRUNTIMEINLINE PyObject * SWIG_Python_NewPackedObj(void *ptr, size_t sz, swig_type_info *type) { return ptr ? SwigPyPacked_New((void *) ptr, sz, type) : SWIG_Py_Void(); } /* -----------------------------------------------------------------------------* * Get type list * -----------------------------------------------------------------------------*/ #ifdef SWIG_LINK_RUNTIME void *SWIG_ReturnGlobalTypeList(void *); #endif SWIGRUNTIME swig_module_info * SWIG_Python_GetModule(void) { static void *type_pointer = (void *)0; /* first check if module already created */ if (!type_pointer) { #ifdef SWIG_LINK_RUNTIME type_pointer = SWIG_ReturnGlobalTypeList((void *)0); #else # ifdef SWIGPY_USE_CAPSULE type_pointer = PyCapsule_Import(SWIGPY_CAPSULE_NAME, 0); # else type_pointer = PyCObject_Import((char*)"swig_runtime_data" SWIG_RUNTIME_VERSION, (char*)"type_pointer" SWIG_TYPE_TABLE_NAME); # endif if (PyErr_Occurred()) { PyErr_Clear(); type_pointer = (void *)0; } #endif } return (swig_module_info *) type_pointer; } #if PY_MAJOR_VERSION < 2 /* PyModule_AddObject function was introduced in Python 2.0. The following function is copied out of Python/modsupport.c in python version 2.3.4 */ SWIGINTERN int PyModule_AddObject(PyObject *m, char *name, PyObject *o) { PyObject *dict; if (!PyModule_Check(m)) { PyErr_SetString(PyExc_TypeError, "PyModule_AddObject() needs module as first arg"); return SWIG_ERROR; } if (!o) { PyErr_SetString(PyExc_TypeError, "PyModule_AddObject() needs non-NULL value"); return SWIG_ERROR; } dict = PyModule_GetDict(m); if (dict == NULL) { /* Internal error -- modules must have a dict! */ PyErr_Format(PyExc_SystemError, "module '%s' has no __dict__", PyModule_GetName(m)); return SWIG_ERROR; } if (PyDict_SetItemString(dict, name, o)) return SWIG_ERROR; Py_DECREF(o); return SWIG_OK; } #endif SWIGRUNTIME void #ifdef SWIGPY_USE_CAPSULE SWIG_Python_DestroyModule(PyObject *obj) #else SWIG_Python_DestroyModule(void *vptr) #endif { #ifdef SWIGPY_USE_CAPSULE swig_module_info *swig_module = (swig_module_info *) PyCapsule_GetPointer(obj, SWIGPY_CAPSULE_NAME); #else swig_module_info *swig_module = (swig_module_info *) vptr; #endif swig_type_info **types = swig_module->types; size_t i; for (i =0; i < swig_module->size; ++i) { swig_type_info *ty = types[i]; if (ty->owndata) { SwigPyClientData *data = (SwigPyClientData *) ty->clientdata; if (data) SwigPyClientData_Del(data); } } Py_DECREF(SWIG_This()); swig_this = NULL; } SWIGRUNTIME void SWIG_Python_SetModule(swig_module_info *swig_module) { #if PY_VERSION_HEX >= 0x03000000 /* Add a dummy module object into sys.modules */ PyObject *module = PyImport_AddModule((char*)"swig_runtime_data" SWIG_RUNTIME_VERSION); #else static PyMethodDef swig_empty_runtime_method_table[] = { {NULL, NULL, 0, NULL} }; /* Sentinel */ PyObject *module = Py_InitModule((char*)"swig_runtime_data" SWIG_RUNTIME_VERSION, swig_empty_runtime_method_table); #endif #ifdef SWIGPY_USE_CAPSULE PyObject *pointer = PyCapsule_New((void *) swig_module, SWIGPY_CAPSULE_NAME, SWIG_Python_DestroyModule); if (pointer && module) { PyModule_AddObject(module, (char*)"type_pointer_capsule" SWIG_TYPE_TABLE_NAME, pointer); } else { Py_XDECREF(pointer); } #else PyObject *pointer = PyCObject_FromVoidPtr((void *) swig_module, SWIG_Python_DestroyModule); if (pointer && module) { PyModule_AddObject(module, (char*)"type_pointer" SWIG_TYPE_TABLE_NAME, pointer); } else { Py_XDECREF(pointer); } #endif } /* The python cached type query */ SWIGRUNTIME PyObject * SWIG_Python_TypeCache(void) { static PyObject *SWIG_STATIC_POINTER(cache) = PyDict_New(); return cache; } SWIGRUNTIME swig_type_info * SWIG_Python_TypeQuery(const char *type) { PyObject *cache = SWIG_Python_TypeCache(); PyObject *key = SWIG_Python_str_FromChar(type); PyObject *obj = PyDict_GetItem(cache, key); swig_type_info *descriptor; if (obj) { #ifdef SWIGPY_USE_CAPSULE descriptor = (swig_type_info *) PyCapsule_GetPointer(obj, NULL); #else descriptor = (swig_type_info *) PyCObject_AsVoidPtr(obj); #endif } else { swig_module_info *swig_module = SWIG_Python_GetModule(); descriptor = SWIG_TypeQueryModule(swig_module, swig_module, type); if (descriptor) { #ifdef SWIGPY_USE_CAPSULE obj = PyCapsule_New((void*) descriptor, NULL, NULL); #else obj = PyCObject_FromVoidPtr(descriptor, NULL); #endif PyDict_SetItem(cache, key, obj); Py_DECREF(obj); } } Py_DECREF(key); return descriptor; } /* For backward compatibility only */ #define SWIG_POINTER_EXCEPTION 0 #define SWIG_arg_fail(arg) SWIG_Python_ArgFail(arg) #define SWIG_MustGetPtr(p, type, argnum, flags) SWIG_Python_MustGetPtr(p, type, argnum, flags) SWIGRUNTIME int SWIG_Python_AddErrMesg(const char* mesg, int infront) { if (PyErr_Occurred()) { PyObject *type = 0; PyObject *value = 0; PyObject *traceback = 0; PyErr_Fetch(&type, &value, &traceback); if (value) { char *tmp; PyObject *old_str = PyObject_Str(value); Py_XINCREF(type); PyErr_Clear(); if (infront) { PyErr_Format(type, "%s %s", mesg, tmp = SWIG_Python_str_AsChar(old_str)); } else { PyErr_Format(type, "%s %s", tmp = SWIG_Python_str_AsChar(old_str), mesg); } SWIG_Python_str_DelForPy3(tmp); Py_DECREF(old_str); } return 1; } else { return 0; } } SWIGRUNTIME int SWIG_Python_ArgFail(int argnum) { if (PyErr_Occurred()) { /* add information about failing argument */ char mesg[256]; PyOS_snprintf(mesg, sizeof(mesg), "argument number %d:", argnum); return SWIG_Python_AddErrMesg(mesg, 1); } else { return 0; } } SWIGRUNTIMEINLINE const char * SwigPyObject_GetDesc(PyObject *self) { SwigPyObject *v = (SwigPyObject *)self; swig_type_info *ty = v ? v->ty : 0; return ty ? ty->str : (char*)""; } SWIGRUNTIME void SWIG_Python_TypeError(const char *type, PyObject *obj) { if (type) { #if defined(SWIG_COBJECT_TYPES) if (obj && SwigPyObject_Check(obj)) { const char *otype = (const char *) SwigPyObject_GetDesc(obj); if (otype) { PyErr_Format(PyExc_TypeError, "a '%s' is expected, 'SwigPyObject(%s)' is received", type, otype); return; } } else #endif { const char *otype = (obj ? obj->ob_type->tp_name : 0); if (otype) { PyObject *str = PyObject_Str(obj); const char *cstr = str ? SWIG_Python_str_AsChar(str) : 0; if (cstr) { PyErr_Format(PyExc_TypeError, "a '%s' is expected, '%s(%s)' is received", type, otype, cstr); SWIG_Python_str_DelForPy3(cstr); } else { PyErr_Format(PyExc_TypeError, "a '%s' is expected, '%s' is received", type, otype); } Py_XDECREF(str); return; } } PyErr_Format(PyExc_TypeError, "a '%s' is expected", type); } else { PyErr_Format(PyExc_TypeError, "unexpected type is received"); } } /* Convert a pointer value, signal an exception on a type mismatch */ SWIGRUNTIME void * SWIG_Python_MustGetPtr(PyObject *obj, swig_type_info *ty, int SWIGUNUSEDPARM(argnum), int flags) { void *result; if (SWIG_Python_ConvertPtr(obj, &result, ty, flags) == -1) { PyErr_Clear(); #if SWIG_POINTER_EXCEPTION if (flags) { SWIG_Python_TypeError(SWIG_TypePrettyName(ty), obj); SWIG_Python_ArgFail(argnum); } #endif } return result; } SWIGRUNTIME int SWIG_Python_NonDynamicSetAttr(PyObject *obj, PyObject *name, PyObject *value) { PyTypeObject *tp = obj->ob_type; PyObject *descr; PyObject *encoded_name; descrsetfunc f; int res; #ifdef Py_USING_UNICODE if (PyString_Check(name)) { name = PyUnicode_Decode(PyString_AsString(name), PyString_Size(name), NULL, NULL); if (!name) return -1; } else if (!PyUnicode_Check(name)) #else if (!PyString_Check(name)) #endif { PyErr_Format(PyExc_TypeError, "attribute name must be string, not '%.200s'", name->ob_type->tp_name); return -1; } else { Py_INCREF(name); } if (!tp->tp_dict) { if (PyType_Ready(tp) < 0) goto done; } res = -1; descr = _PyType_Lookup(tp, name); f = NULL; if (descr != NULL) f = descr->ob_type->tp_descr_set; if (!f) { if (PyString_Check(name)) { encoded_name = name; Py_INCREF(name); } else { encoded_name = PyUnicode_AsUTF8String(name); } PyErr_Format(PyExc_AttributeError, "'%.100s' object has no attribute '%.200s'", tp->tp_name, PyString_AsString(encoded_name)); Py_DECREF(encoded_name); } else { res = f(descr, obj, value); } done: Py_DECREF(name); return res; } #ifdef __cplusplus } #endif #define SWIG_exception_fail(code, msg) do { SWIG_Error(code, msg); SWIG_fail; } while(0) #define SWIG_contract_assert(expr, msg) if (!(expr)) { SWIG_Error(SWIG_RuntimeError, msg); SWIG_fail; } else #define SWIG_exception(code, msg) do { SWIG_Error(code, msg); SWIG_fail;; } while(0) /* -------- TYPES TABLE (BEGIN) -------- */ #define SWIGTYPE_p_apr_array_header_t swig_types[0] #define SWIGTYPE_p_apr_hash_t swig_types[1] #define SWIGTYPE_p_apr_int32_t swig_types[2] #define SWIGTYPE_p_apr_int64_t swig_types[3] #define SWIGTYPE_p_apr_pool_t swig_types[4] #define SWIGTYPE_p_char swig_types[5] #define SWIGTYPE_p_f_p_apr_getopt_t_p_void_p_apr_pool_t__p_svn_error_t swig_types[6] #define SWIGTYPE_p_f_p_p_svn_stream_t_p_void__p_svn_error_t swig_types[7] #define SWIGTYPE_p_f_p_p_void_p_apr_hash_t_p_void_p_apr_pool_t__p_svn_error_t swig_types[8] #define SWIGTYPE_p_f_p_q_const__char_p_void_p_apr_pool_t__p_svn_error_t swig_types[9] #define SWIGTYPE_p_f_p_q_const__svn_commit_info_t_p_void_p_apr_pool_t__p_svn_error_t swig_types[10] #define SWIGTYPE_p_f_p_svn_boolean_t_p_svn_fs_root_t_p_q_const__char_p_void_p_apr_pool_t__p_svn_error_t swig_types[11] #define SWIGTYPE_p_f_p_svn_location_segment_t_p_void_p_apr_pool_t__p_svn_error_t swig_types[12] #define SWIGTYPE_p_f_p_svn_txdelta_window_handler_t_p_p_void_p_void__p_svn_error_t swig_types[13] #define SWIGTYPE_p_f_p_void__p_svn_error_t swig_types[14] #define SWIGTYPE_p_f_p_void_apr_int64_t_svn_fs_pack_notify_action_t_p_apr_pool_t__p_svn_error_t swig_types[15] #define SWIGTYPE_p_f_p_void_p_apr_hash_t_svn_revnum_t_p_q_const__char_p_q_const__char_p_q_const__char_p_apr_pool_t__p_svn_error_t swig_types[16] #define SWIGTYPE_p_f_p_void_p_q_const__char__p_svn_error_t swig_types[17] #define SWIGTYPE_p_f_p_void_p_q_const__char_p_q_const__svn_string_t__p_svn_error_t swig_types[18] #define SWIGTYPE_p_f_p_void_p_q_const__char_svn_revnum_t_p_apr_hash_t_p_svn_txdelta_window_handler_t_p_p_void_p_apr_array_header_t_p_apr_pool_t__p_svn_error_t swig_types[19] #define SWIGTYPE_p_f_p_void_p_q_const__char_svn_revnum_t_p_apr_hash_t_svn_boolean_t_p_svn_txdelta_window_handler_t_p_p_void_p_apr_array_header_t_p_apr_pool_t__p_svn_error_t swig_types[20] #define SWIGTYPE_p_f_p_void_p_q_const__char_svn_revnum_t_p_apr_pool_t__p_svn_error_t swig_types[21] #define SWIGTYPE_p_f_p_void_p_q_const__struct_svn_repos_notify_t_p_apr_pool_t__void swig_types[22] #define SWIGTYPE_p_f_p_void_p_svn_log_entry_t_p_apr_pool_t__p_svn_error_t swig_types[23] #define SWIGTYPE_p_f_svn_repos_authz_access_t_p_svn_boolean_t_p_svn_fs_root_t_p_q_const__char_p_void_p_apr_pool_t__p_svn_error_t swig_types[24] #define SWIGTYPE_p_f_svn_revnum_t_p_q_const__char_p_q_const__char_p_void__p_svn_error_t swig_types[25] #define SWIGTYPE_p_int swig_types[26] #define SWIGTYPE_p_long swig_types[27] #define SWIGTYPE_p_p_apr_array_header_t swig_types[28] #define SWIGTYPE_p_p_apr_hash_t swig_types[29] #define SWIGTYPE_p_p_char swig_types[30] #define SWIGTYPE_p_p_f_p_svn_boolean_t_p_svn_fs_root_t_p_q_const__char_p_void_p_apr_pool_t__p_svn_error_t swig_types[31] #define SWIGTYPE_p_p_f_p_svn_txdelta_window_t_p_void__p_svn_error_t swig_types[32] #define SWIGTYPE_p_p_f_p_void__p_svn_error_t swig_types[33] #define SWIGTYPE_p_p_f_p_void_apr_int64_t_svn_fs_pack_notify_action_t_p_apr_pool_t__p_svn_error_t swig_types[34] #define SWIGTYPE_p_p_f_p_void_p_q_const__char_svn_revnum_t_p_apr_hash_t_p_svn_txdelta_window_handler_t_p_p_void_p_apr_array_header_t_p_apr_pool_t__p_svn_error_t swig_types[35] #define SWIGTYPE_p_p_f_p_void_p_q_const__char_svn_revnum_t_p_apr_hash_t_svn_boolean_t_p_svn_txdelta_window_handler_t_p_p_void_p_apr_array_header_t_p_apr_pool_t__p_svn_error_t swig_types[36] #define SWIGTYPE_p_p_f_p_void_p_q_const__char_svn_revnum_t_p_apr_pool_t__p_svn_error_t swig_types[37] #define SWIGTYPE_p_p_f_p_void_p_q_const__struct_svn_repos_notify_t_p_apr_pool_t__void swig_types[38] #define SWIGTYPE_p_p_f_svn_repos_authz_access_t_p_svn_boolean_t_p_svn_fs_root_t_p_q_const__char_p_void_p_apr_pool_t__p_svn_error_t swig_types[39] #define SWIGTYPE_p_p_svn_authz_t swig_types[40] #define SWIGTYPE_p_p_svn_delta_editor_t swig_types[41] #define SWIGTYPE_p_p_svn_dirent_t swig_types[42] #define SWIGTYPE_p_p_svn_fs_txn_t swig_types[43] #define SWIGTYPE_p_p_svn_lock_t swig_types[44] #define SWIGTYPE_p_p_svn_repos_parse_fns2_t swig_types[45] #define SWIGTYPE_p_p_svn_repos_parse_fns_t swig_types[46] #define SWIGTYPE_p_p_svn_repos_t swig_types[47] #define SWIGTYPE_p_p_svn_stream_t swig_types[48] #define SWIGTYPE_p_p_svn_string_t swig_types[49] #define SWIGTYPE_p_p_void swig_types[50] #define SWIGTYPE_p_svn_auth_baton_t swig_types[51] #define SWIGTYPE_p_svn_auth_cred_simple_t swig_types[52] #define SWIGTYPE_p_svn_auth_cred_ssl_client_cert_pw_t swig_types[53] #define SWIGTYPE_p_svn_auth_cred_ssl_client_cert_t swig_types[54] #define SWIGTYPE_p_svn_auth_cred_ssl_server_trust_t swig_types[55] #define SWIGTYPE_p_svn_auth_cred_username_t swig_types[56] #define SWIGTYPE_p_svn_auth_iterstate_t swig_types[57] #define SWIGTYPE_p_svn_auth_provider_object_t swig_types[58] #define SWIGTYPE_p_svn_auth_provider_t swig_types[59] #define SWIGTYPE_p_svn_auth_ssl_server_cert_info_t swig_types[60] #define SWIGTYPE_p_svn_authz_t swig_types[61] #define SWIGTYPE_p_svn_commit_info_t swig_types[62] #define SWIGTYPE_p_svn_config_t swig_types[63] #define SWIGTYPE_p_svn_delta_editor_t swig_types[64] #define SWIGTYPE_p_svn_depth_t swig_types[65] #define SWIGTYPE_p_svn_dirent_t swig_types[66] #define SWIGTYPE_p_svn_errno_t swig_types[67] #define SWIGTYPE_p_svn_error_t swig_types[68] #define SWIGTYPE_p_svn_fs_access_t swig_types[69] #define SWIGTYPE_p_svn_fs_dirent_t swig_types[70] #define SWIGTYPE_p_svn_fs_history_t swig_types[71] #define SWIGTYPE_p_svn_fs_id_t swig_types[72] #define SWIGTYPE_p_svn_fs_pack_notify_action_t swig_types[73] #define SWIGTYPE_p_svn_fs_path_change2_t swig_types[74] #define SWIGTYPE_p_svn_fs_path_change_kind_t swig_types[75] #define SWIGTYPE_p_svn_fs_path_change_t swig_types[76] #define SWIGTYPE_p_svn_fs_root_t swig_types[77] #define SWIGTYPE_p_svn_fs_t swig_types[78] #define SWIGTYPE_p_svn_fs_txn_t swig_types[79] #define SWIGTYPE_p_svn_io_dirent2_t swig_types[80] #define SWIGTYPE_p_svn_io_dirent_t swig_types[81] #define SWIGTYPE_p_svn_io_file_del_t swig_types[82] #define SWIGTYPE_p_svn_location_segment_t swig_types[83] #define SWIGTYPE_p_svn_lock_t swig_types[84] #define SWIGTYPE_p_svn_log_changed_path2_t swig_types[85] #define SWIGTYPE_p_svn_log_changed_path_t swig_types[86] #define SWIGTYPE_p_svn_log_entry_t swig_types[87] #define SWIGTYPE_p_svn_merge_range_t swig_types[88] #define SWIGTYPE_p_svn_mergeinfo_inheritance_t swig_types[89] #define SWIGTYPE_p_svn_node_kind_t swig_types[90] #define SWIGTYPE_p_svn_opt_revision_range_t swig_types[91] #define SWIGTYPE_p_svn_opt_revision_t swig_types[92] #define SWIGTYPE_p_svn_opt_revision_value_t swig_types[93] #define SWIGTYPE_p_svn_opt_subcommand_desc2_t swig_types[94] #define SWIGTYPE_p_svn_opt_subcommand_desc_t swig_types[95] #define SWIGTYPE_p_svn_prop_kind swig_types[96] #define SWIGTYPE_p_svn_repos_authz_access_t swig_types[97] #define SWIGTYPE_p_svn_repos_node_t swig_types[98] #define SWIGTYPE_p_svn_repos_notify_action_t swig_types[99] #define SWIGTYPE_p_svn_repos_notify_t swig_types[100] #define SWIGTYPE_p_svn_repos_notify_warning_t swig_types[101] #define SWIGTYPE_p_svn_repos_parse_fns2_t swig_types[102] #define SWIGTYPE_p_svn_repos_parse_fns_t swig_types[103] #define SWIGTYPE_p_svn_repos_revision_access_level_t swig_types[104] #define SWIGTYPE_p_svn_repos_t swig_types[105] #define SWIGTYPE_p_svn_stream_mark_t swig_types[106] #define SWIGTYPE_p_svn_stream_t swig_types[107] #define SWIGTYPE_p_svn_string_t swig_types[108] #define SWIGTYPE_p_svn_stringbuf_t swig_types[109] #define SWIGTYPE_p_svn_tristate_t swig_types[110] #define SWIGTYPE_p_svn_txdelta_op_t swig_types[111] #define SWIGTYPE_p_svn_txdelta_stream_t swig_types[112] #define SWIGTYPE_p_svn_txdelta_window_t swig_types[113] #define SWIGTYPE_p_svn_version_checklist_t swig_types[114] #define SWIGTYPE_p_svn_version_t swig_types[115] #define SWIGTYPE_p_unsigned_long swig_types[116] #define SWIGTYPE_p_void swig_types[117] static swig_type_info *swig_types[119]; static swig_module_info swig_module = {swig_types, 118, 0, 0, 0, 0}; #define SWIG_TypeQuery(name) SWIG_TypeQueryModule(&swig_module, &swig_module, name) #define SWIG_MangledTypeQuery(name) SWIG_MangledTypeQueryModule(&swig_module, &swig_module, name) /* -------- TYPES TABLE (END) -------- */ #if (PY_VERSION_HEX <= 0x02000000) # if !defined(SWIG_PYTHON_CLASSIC) # error "This python version requires swig to be run with the '-classic' option" # endif #endif /*----------------------------------------------- @(target):= _repos.so ------------------------------------------------*/ #if PY_VERSION_HEX >= 0x03000000 # define SWIG_init PyInit__repos #else # define SWIG_init init_repos #endif #define SWIG_name "_repos" #define SWIGVERSION 0x020004 #define SWIG_VERSION SWIGVERSION #define SWIG_as_voidptr(a) (void *)((const void *)(a)) #define SWIG_as_voidptrptr(a) ((void)SWIG_as_voidptr(*a),(void**)(a)) #include "svn_time.h" #include "svn_pools.h" #include "swigutil_py.h" static PyObject * _global_py_pool = NULL; #define svn_argnum_obj0 1 #define svn_argnum_obj1 2 #define svn_argnum_obj2 3 #define svn_argnum_obj3 4 #define svn_argnum_obj4 5 #define svn_argnum_obj5 6 #define svn_argnum_obj6 7 #define svn_argnum_obj7 8 #define svn_argnum_obj8 9 #define svn_argnum_obj9 10 #define svn_argnum_obj10 11 #define svn_argnum_obj11 12 #define svn_argnum_obj12 13 #define svn_argnum_obj13 14 #define svn_argnum_obj14 15 #define svn_argnum_obj15 16 #define svn_argnum_obj16 17 #define svn_argnum_obj17 18 #define svn_argnum_obj18 19 #define svn_argnum_obj19 20 #define svn_argnum_obj20 21 #define svn_argnum_obj21 22 #define svn_argnum_obj22 23 #define svn_argnum_obj23 24 #define svn_argnum_obj24 25 #define svn_argnum_obj25 26 #define svn_argnum_obj26 27 #define svn_argnum_obj27 28 #define svn_argnum_obj28 29 #define svn_argnum_obj29 30 #define svn_argnum_obj30 31 #define svn_argnum_obj31 32 #define svn_argnum_obj32 33 #define svn_argnum_obj33 34 #define svn_argnum_obj34 35 #define svn_argnum_obj35 36 #define svn_argnum_obj36 37 #define svn_argnum_obj37 38 #define svn_argnum_obj38 39 #define svn_argnum_obj39 40 #include "svn_repos.h" #define SWIG_From_long PyInt_FromLong SWIGINTERN int SWIG_AsVal_double (PyObject *obj, double *val) { int res = SWIG_TypeError; if (PyFloat_Check(obj)) { if (val) *val = PyFloat_AsDouble(obj); return SWIG_OK; } else if (PyInt_Check(obj)) { if (val) *val = PyInt_AsLong(obj); return SWIG_OK; } else if (PyLong_Check(obj)) { double v = PyLong_AsDouble(obj); if (!PyErr_Occurred()) { if (val) *val = v; return SWIG_OK; } else { PyErr_Clear(); } } #ifdef SWIG_PYTHON_CAST_MODE { int dispatch = 0; double d = PyFloat_AsDouble(obj); if (!PyErr_Occurred()) { if (val) *val = d; return SWIG_AddCast(SWIG_OK); } else { PyErr_Clear(); } if (!dispatch) { long v = PyLong_AsLong(obj); if (!PyErr_Occurred()) { if (val) *val = v; return SWIG_AddCast(SWIG_AddCast(SWIG_OK)); } else { PyErr_Clear(); } } } #endif return res; } #include <float.h> #include <math.h> SWIGINTERNINLINE int SWIG_CanCastAsInteger(double *d, double min, double max) { double x = *d; if ((min <= x && x <= max)) { double fx = floor(x); double cx = ceil(x); double rd = ((x - fx) < 0.5) ? fx : cx; /* simple rint */ if ((errno == EDOM) || (errno == ERANGE)) { errno = 0; } else { double summ, reps, diff; if (rd < x) { diff = x - rd; } else if (rd > x) { diff = rd - x; } else { return 1; } summ = rd + x; reps = diff/summ; if (reps < 8*DBL_EPSILON) { *d = rd; return 1; } } } return 0; } SWIGINTERN int SWIG_AsVal_long (PyObject *obj, long* val) { if (PyInt_Check(obj)) { if (val) *val = PyInt_AsLong(obj); return SWIG_OK; } else if (PyLong_Check(obj)) { long v = PyLong_AsLong(obj); if (!PyErr_Occurred()) { if (val) *val = v; return SWIG_OK; } else { PyErr_Clear(); } } #ifdef SWIG_PYTHON_CAST_MODE { int dispatch = 0; long v = PyInt_AsLong(obj); if (!PyErr_Occurred()) { if (val) *val = v; return SWIG_AddCast(SWIG_OK); } else { PyErr_Clear(); } if (!dispatch) { double d; int res = SWIG_AddCast(SWIG_AsVal_double (obj,&d)); if (SWIG_IsOK(res) && SWIG_CanCastAsInteger(&d, LONG_MIN, LONG_MAX)) { if (val) *val = (long)(d); return res; } } } #endif return SWIG_TypeError; } SWIGINTERNINLINE long SWIG_As_long (PyObject* obj) { long v; int res = SWIG_AsVal_long (obj, &v); if (!SWIG_IsOK(res)) { /* this is needed to make valgrind/purify happier. */ memset((void*)&v, 0, sizeof(long)); SWIG_Error(res, ""); } return v; } SWIGINTERN swig_type_info* SWIG_pchar_descriptor(void) { static int init = 0; static swig_type_info* info = 0; if (!init) { info = SWIG_TypeQuery("_p_char"); init = 1; } return info; } SWIGINTERN int SWIG_AsCharPtrAndSize(PyObject *obj, char** cptr, size_t* psize, int *alloc) { #if PY_VERSION_HEX>=0x03000000 if (PyUnicode_Check(obj)) #else if (PyString_Check(obj)) #endif { char *cstr; Py_ssize_t len; #if PY_VERSION_HEX>=0x03000000 if (!alloc && cptr) { /* We can't allow converting without allocation, since the internal representation of string in Python 3 is UCS-2/UCS-4 but we require a UTF-8 representation. TODO(bhy) More detailed explanation */ return SWIG_RuntimeError; } obj = PyUnicode_AsUTF8String(obj); PyBytes_AsStringAndSize(obj, &cstr, &len); if(alloc) *alloc = SWIG_NEWOBJ; #else PyString_AsStringAndSize(obj, &cstr, &len); #endif if (cptr) { if (alloc) { /* In python the user should not be able to modify the inner string representation. To warranty that, if you define SWIG_PYTHON_SAFE_CSTRINGS, a new/copy of the python string buffer is always returned. The default behavior is just to return the pointer value, so, be careful. */ #if defined(SWIG_PYTHON_SAFE_CSTRINGS) if (*alloc != SWIG_OLDOBJ) #else if (*alloc == SWIG_NEWOBJ) #endif { *cptr = (char *)memcpy((char *)malloc((len + 1)*sizeof(char)), cstr, sizeof(char)*(len + 1)); *alloc = SWIG_NEWOBJ; } else { *cptr = cstr; *alloc = SWIG_OLDOBJ; } } else { #if PY_VERSION_HEX>=0x03000000 assert(0); /* Should never reach here in Python 3 */ #endif *cptr = SWIG_Python_str_AsChar(obj); } } if (psize) *psize = len + 1; #if PY_VERSION_HEX>=0x03000000 Py_XDECREF(obj); #endif return SWIG_OK; } else { swig_type_info* pchar_descriptor = SWIG_pchar_descriptor(); if (pchar_descriptor) { void* vptr = 0; if (SWIG_ConvertPtr(obj, &vptr, pchar_descriptor, 0) == SWIG_OK) { if (cptr) *cptr = (char *) vptr; if (psize) *psize = vptr ? (strlen((char *)vptr) + 1) : 0; if (alloc) *alloc = SWIG_OLDOBJ; return SWIG_OK; } } } return SWIG_TypeError; } SWIGINTERNINLINE PyObject * SWIG_FromCharPtrAndSize(const char* carray, size_t size) { if (carray) { if (size > INT_MAX) { swig_type_info* pchar_descriptor = SWIG_pchar_descriptor(); return pchar_descriptor ? SWIG_InternalNewPointerObj((char *)(carray), pchar_descriptor, 0) : SWIG_Py_Void(); } else { #if PY_VERSION_HEX >= 0x03000000 return PyUnicode_FromStringAndSize(carray, (int)(size)); #else return PyString_FromStringAndSize(carray, (int)(size)); #endif } } else { return SWIG_Py_Void(); } } SWIGINTERNINLINE PyObject * SWIG_FromCharPtr(const char *cptr) { return SWIG_FromCharPtrAndSize(cptr, (cptr ? strlen(cptr) : 0)); } SWIGINTERNINLINE PyObject * SWIG_From_int (int value) { return SWIG_From_long (value); } SWIGINTERN int SWIG_AsCharArray(PyObject * obj, char *val, size_t size) { char* cptr = 0; size_t csize = 0; int alloc = SWIG_OLDOBJ; int res = SWIG_AsCharPtrAndSize(obj, &cptr, &csize, &alloc); if (SWIG_IsOK(res)) { if ((csize == size + 1) && cptr && !(cptr[csize-1])) --csize; if (csize <= size) { if (val) { if (csize) memcpy(val, cptr, csize*sizeof(char)); if (csize < size) memset(val + csize, 0, (size - csize)*sizeof(char)); } if (alloc == SWIG_NEWOBJ) { free((char*)cptr); res = SWIG_DelNewMask(res); } return res; } if (alloc == SWIG_NEWOBJ) free((char*)cptr); } return SWIG_TypeError; } #include <limits.h> #if !defined(SWIG_NO_LLONG_MAX) # if !defined(LLONG_MAX) && defined(__GNUC__) && defined (__LONG_LONG_MAX__) # define LLONG_MAX __LONG_LONG_MAX__ # define LLONG_MIN (-LLONG_MAX - 1LL) # define ULLONG_MAX (LLONG_MAX * 2ULL + 1ULL) # endif #endif SWIGINTERN int SWIG_AsVal_char (PyObject * obj, char *val) { int res = SWIG_AsCharArray(obj, val, 1); if (!SWIG_IsOK(res)) { long v; res = SWIG_AddCast(SWIG_AsVal_long (obj, &v)); if (SWIG_IsOK(res)) { if ((CHAR_MIN <= v) && (v <= CHAR_MAX)) { if (val) *val = (char)(v); } else { res = SWIG_OverflowError; } } } return res; } SWIGINTERNINLINE PyObject * SWIG_From_char (char c) { return SWIG_FromCharPtrAndSize(&c,1); } static svn_error_t * svn_repos_parse_fns2_invoke_new_revision_record( svn_repos_parse_fns2_t * _obj, void **revision_baton, apr_hash_t *headers, void *parse_baton, apr_pool_t *pool) { return (_obj->new_revision_record)(revision_baton, headers, parse_baton, pool); } static svn_error_t * svn_repos_parse_fns2_invoke_uuid_record( svn_repos_parse_fns2_t * _obj, const char *uuid, void *parse_baton, apr_pool_t *pool) { return (_obj->uuid_record)(uuid, parse_baton, pool); } static svn_error_t * svn_repos_parse_fns2_invoke_new_node_record( svn_repos_parse_fns2_t * _obj, void **node_baton, apr_hash_t *headers, void *revision_baton, apr_pool_t *pool) { return (_obj->new_node_record)(node_baton, headers, revision_baton, pool); } static svn_error_t * svn_repos_parse_fns2_invoke_set_revision_property( svn_repos_parse_fns2_t * _obj, void *revision_baton, const char *name, const svn_string_t *value) { return (_obj->set_revision_property)(revision_baton, name, value); } static svn_error_t * svn_repos_parse_fns2_invoke_set_node_property( svn_repos_parse_fns2_t * _obj, void *node_baton, const char *name, const svn_string_t *value) { return (_obj->set_node_property)(node_baton, name, value); } static svn_error_t * svn_repos_parse_fns2_invoke_delete_node_property( svn_repos_parse_fns2_t * _obj, void *node_baton, const char *name) { return (_obj->delete_node_property)(node_baton, name); } static svn_error_t * svn_repos_parse_fns2_invoke_remove_node_props( svn_repos_parse_fns2_t * _obj, void *node_baton) { return (_obj->remove_node_props)(node_baton); } static svn_error_t * svn_repos_parse_fns2_invoke_set_fulltext( svn_repos_parse_fns2_t * _obj, svn_stream_t **stream, void *node_baton) { return (_obj->set_fulltext)(stream, node_baton); } static svn_error_t * svn_repos_parse_fns2_invoke_apply_textdelta( svn_repos_parse_fns2_t * _obj, svn_txdelta_window_handler_t *handler, void **handler_baton, void *node_baton) { return (_obj->apply_textdelta)(handler, handler_baton, node_baton); } static svn_error_t * svn_repos_parse_fns2_invoke_close_node( svn_repos_parse_fns2_t * _obj, void *node_baton) { return (_obj->close_node)(node_baton); } static svn_error_t * svn_repos_parse_fns2_invoke_close_revision( svn_repos_parse_fns2_t * _obj, void *revision_baton) { return (_obj->close_revision)(revision_baton); } static svn_error_t * svn_repos_invoke_authz_func( svn_repos_authz_func_t _obj, svn_boolean_t *allowed, svn_fs_root_t *root, const char *path, void *baton, apr_pool_t *pool) { return _obj(allowed, root, path, baton, pool); } static svn_error_t * svn_repos_invoke_authz_callback( svn_repos_authz_callback_t _obj, svn_repos_authz_access_t required, svn_boolean_t *allowed, svn_fs_root_t *root, const char *path, void *baton, apr_pool_t *pool) { return _obj(required, allowed, root, path, baton, pool); } static svn_error_t * svn_repos_invoke_file_rev_handler( svn_repos_file_rev_handler_t _obj, void *baton, const char *path, svn_revnum_t rev, apr_hash_t *rev_props, svn_txdelta_window_handler_t *delta_handler, void **delta_baton, apr_array_header_t *prop_diffs, apr_pool_t *pool) { return _obj(baton, path, rev, rev_props, delta_handler, delta_baton, prop_diffs, pool); } static void svn_repos_invoke_notify_func( svn_repos_notify_func_t _obj, void *baton, const svn_repos_notify_t *notify, apr_pool_t *scratch_pool) { _obj(baton, notify, scratch_pool); } static svn_error_t * svn_repos_invoke_history_func( svn_repos_history_func_t _obj, void *baton, const char *path, svn_revnum_t revision, apr_pool_t *pool) { return _obj(baton, path, revision, pool); } #ifdef __cplusplus extern "C" { #endif SWIGINTERN PyObject *_wrap_svn_repos_version(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; svn_version_t *result = 0 ; if (!PyArg_ParseTuple(args,(char *)":svn_repos_version")) SWIG_fail; { svn_swig_py_release_py_lock(); result = (svn_version_t *)svn_repos_version(); svn_swig_py_acquire_py_lock(); } resultobj = svn_swig_NewPointerObj((void*)(result), SWIGTYPE_p_svn_version_t, _global_py_pool, args); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_svn_repos_notify_t_action_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; svn_repos_notify_t *arg1 = (svn_repos_notify_t *) 0 ; svn_repos_notify_action_t arg2 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:svn_repos_notify_t_action_set",&obj0,&obj1)) SWIG_fail; { arg1 = (svn_repos_notify_t *)svn_swig_MustGetPtr(obj0, SWIGTYPE_p_svn_repos_notify_t, svn_argnum_obj0); if (PyErr_Occurred()) { SWIG_fail; } } { arg2 = (svn_repos_notify_action_t)SWIG_As_long (obj1); if (SWIG_arg_fail(svn_argnum_obj1)) { SWIG_fail; } } if (arg1) (arg1)->action = arg2; resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_svn_repos_notify_t_action_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; svn_repos_notify_t *arg1 = (svn_repos_notify_t *) 0 ; PyObject * obj0 = 0 ; svn_repos_notify_action_t result; if (!PyArg_ParseTuple(args,(char *)"O:svn_repos_notify_t_action_get",&obj0)) SWIG_fail; { arg1 = (svn_repos_notify_t *)svn_swig_MustGetPtr(obj0, SWIGTYPE_p_svn_repos_notify_t, svn_argnum_obj0); if (PyErr_Occurred()) { SWIG_fail; } } result = (svn_repos_notify_action_t) ((arg1)->action); resultobj = SWIG_From_long((long)(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_svn_repos_notify_t_revision_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; svn_repos_notify_t *arg1 = (svn_repos_notify_t *) 0 ; svn_revnum_t arg2 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:svn_repos_notify_t_revision_set",&obj0,&obj1)) SWIG_fail; { arg1 = (svn_repos_notify_t *)svn_swig_MustGetPtr(obj0, SWIGTYPE_p_svn_repos_notify_t, svn_argnum_obj0); if (PyErr_Occurred()) { SWIG_fail; } } { arg2 = (svn_revnum_t)SWIG_As_long (obj1); if (SWIG_arg_fail(svn_argnum_obj1)) { SWIG_fail; } } if (arg1) (arg1)->revision = arg2; resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_svn_repos_notify_t_revision_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; svn_repos_notify_t *arg1 = (svn_repos_notify_t *) 0 ; PyObject * obj0 = 0 ; svn_revnum_t result; if (!PyArg_ParseTuple(args,(char *)"O:svn_repos_notify_t_revision_get",&obj0)) SWIG_fail; { arg1 = (svn_repos_notify_t *)svn_swig_MustGetPtr(obj0, SWIGTYPE_p_svn_repos_notify_t, svn_argnum_obj0); if (PyErr_Occurred()) { SWIG_fail; } } result = (svn_revnum_t) ((arg1)->revision); resultobj = SWIG_From_long((long)(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_svn_repos_notify_t_warning_str_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; svn_repos_notify_t *arg1 = (svn_repos_notify_t *) 0 ; char *arg2 = (char *) 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"Os:svn_repos_notify_t_warning_str_set",&obj0,&arg2)) SWIG_fail; { arg1 = (svn_repos_notify_t *)svn_swig_MustGetPtr(obj0, SWIGTYPE_p_svn_repos_notify_t, svn_argnum_obj0); if (PyErr_Occurred()) { SWIG_fail; } } { apr_size_t len = strlen(arg2) + 1; char *copied; if (arg1->warning_str) free((char *)arg1->warning_str); copied = malloc(len); memcpy(copied, arg2, len); arg1->warning_str = copied; } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_svn_repos_notify_t_warning_str_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; svn_repos_notify_t *arg1 = (svn_repos_notify_t *) 0 ; PyObject * obj0 = 0 ; char *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:svn_repos_notify_t_warning_str_get",&obj0)) SWIG_fail; { arg1 = (svn_repos_notify_t *)svn_swig_MustGetPtr(obj0, SWIGTYPE_p_svn_repos_notify_t, svn_argnum_obj0); if (PyErr_Occurred()) { SWIG_fail; } } result = (char *) ((arg1)->warning_str); resultobj = SWIG_FromCharPtr((const char *)result); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_svn_repos_notify_t_warning_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; svn_repos_notify_t *arg1 = (svn_repos_notify_t *) 0 ; svn_repos_notify_warning_t arg2 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:svn_repos_notify_t_warning_set",&obj0,&obj1)) SWIG_fail; { arg1 = (svn_repos_notify_t *)svn_swig_MustGetPtr(obj0, SWIGTYPE_p_svn_repos_notify_t, svn_argnum_obj0); if (PyErr_Occurred()) { SWIG_fail; } } { arg2 = (svn_repos_notify_warning_t)SWIG_As_long (obj1); if (SWIG_arg_fail(svn_argnum_obj1)) { SWIG_fail; } } if (arg1) (arg1)->warning = arg2; resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_svn_repos_notify_t_warning_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; svn_repos_notify_t *arg1 = (svn_repos_notify_t *) 0 ; PyObject * obj0 = 0 ; svn_repos_notify_warning_t result; if (!PyArg_ParseTuple(args,(char *)"O:svn_repos_notify_t_warning_get",&obj0)) SWIG_fail; { arg1 = (svn_repos_notify_t *)svn_swig_MustGetPtr(obj0, SWIGTYPE_p_svn_repos_notify_t, svn_argnum_obj0); if (PyErr_Occurred()) { SWIG_fail; } } result = (svn_repos_notify_warning_t) ((arg1)->warning); resultobj = SWIG_From_long((long)(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_svn_repos_notify_t_shard_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; svn_repos_notify_t *arg1 = (svn_repos_notify_t *) 0 ; apr_int64_t arg2 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:svn_repos_notify_t_shard_set",&obj0,&obj1)) SWIG_fail; { arg1 = (svn_repos_notify_t *)svn_swig_MustGetPtr(obj0, SWIGTYPE_p_svn_repos_notify_t, svn_argnum_obj0); if (PyErr_Occurred()) { SWIG_fail; } } arg2 = (apr_int64_t) PyLong_AsLongLong(obj1); if (arg1) (arg1)->shard = arg2; resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_svn_repos_notify_t_shard_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; svn_repos_notify_t *arg1 = (svn_repos_notify_t *) 0 ; PyObject * obj0 = 0 ; apr_int64_t result; if (!PyArg_ParseTuple(args,(char *)"O:svn_repos_notify_t_shard_get",&obj0)) SWIG_fail; { arg1 = (svn_repos_notify_t *)svn_swig_MustGetPtr(obj0, SWIGTYPE_p_svn_repos_notify_t, svn_argnum_obj0); if (PyErr_Occurred()) { SWIG_fail; } } result = ((arg1)->shard); resultobj = PyLong_FromLongLong((apr_int64_t)(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_svn_repos_notify_t_new_revision_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; svn_repos_notify_t *arg1 = (svn_repos_notify_t *) 0 ; svn_revnum_t arg2 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:svn_repos_notify_t_new_revision_set",&obj0,&obj1)) SWIG_fail; { arg1 = (svn_repos_notify_t *)svn_swig_MustGetPtr(obj0, SWIGTYPE_p_svn_repos_notify_t, svn_argnum_obj0); if (PyErr_Occurred()) { SWIG_fail; } } { arg2 = (svn_revnum_t)SWIG_As_long (obj1); if (SWIG_arg_fail(svn_argnum_obj1)) { SWIG_fail; } } if (arg1) (arg1)->new_revision = arg2; resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_svn_repos_notify_t_new_revision_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; svn_repos_notify_t *arg1 = (svn_repos_notify_t *) 0 ; PyObject * obj0 = 0 ; svn_revnum_t result; if (!PyArg_ParseTuple(args,(char *)"O:svn_repos_notify_t_new_revision_get",&obj0)) SWIG_fail; { arg1 = (svn_repos_notify_t *)svn_swig_MustGetPtr(obj0, SWIGTYPE_p_svn_repos_notify_t, svn_argnum_obj0); if (PyErr_Occurred()) { SWIG_fail; } } result = (svn_revnum_t) ((arg1)->new_revision); resultobj = SWIG_From_long((long)(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_svn_repos_notify_t_old_revision_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; svn_repos_notify_t *arg1 = (svn_repos_notify_t *) 0 ; svn_revnum_t arg2 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:svn_repos_notify_t_old_revision_set",&obj0,&obj1)) SWIG_fail; { arg1 = (svn_repos_notify_t *)svn_swig_MustGetPtr(obj0, SWIGTYPE_p_svn_repos_notify_t, svn_argnum_obj0); if (PyErr_Occurred()) { SWIG_fail; } } { arg2 = (svn_revnum_t)SWIG_As_long (obj1); if (SWIG_arg_fail(svn_argnum_obj1)) { SWIG_fail; } } if (arg1) (arg1)->old_revision = arg2; resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_svn_repos_notify_t_old_revision_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; svn_repos_notify_t *arg1 = (svn_repos_notify_t *) 0 ; PyObject * obj0 = 0 ; svn_revnum_t result; if (!PyArg_ParseTuple(args,(char *)"O:svn_repos_notify_t_old_revision_get",&obj0)) SWIG_fail; { arg1 = (svn_repos_notify_t *)svn_swig_MustGetPtr(obj0, SWIGTYPE_p_svn_repos_notify_t, svn_argnum_obj0); if (PyErr_Occurred()) { SWIG_fail; } } result = (svn_revnum_t) ((arg1)->old_revision); resultobj = SWIG_From_long((long)(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_svn_repos_notify_t_node_action_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; svn_repos_notify_t *arg1 = (svn_repos_notify_t *) 0 ; enum svn_node_action arg2 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:svn_repos_notify_t_node_action_set",&obj0,&obj1)) SWIG_fail; { arg1 = (svn_repos_notify_t *)svn_swig_MustGetPtr(obj0, SWIGTYPE_p_svn_repos_notify_t, svn_argnum_obj0); if (PyErr_Occurred()) { SWIG_fail; } } { arg2 = (enum svn_node_action)SWIG_As_long (obj1); if (SWIG_arg_fail(svn_argnum_obj1)) { SWIG_fail; } } if (arg1) (arg1)->node_action = arg2; resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_svn_repos_notify_t_node_action_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; svn_repos_notify_t *arg1 = (svn_repos_notify_t *) 0 ; PyObject * obj0 = 0 ; enum svn_node_action result; if (!PyArg_ParseTuple(args,(char *)"O:svn_repos_notify_t_node_action_get",&obj0)) SWIG_fail; { arg1 = (svn_repos_notify_t *)svn_swig_MustGetPtr(obj0, SWIGTYPE_p_svn_repos_notify_t, svn_argnum_obj0); if (PyErr_Occurred()) { SWIG_fail; } } result = (enum svn_node_action) ((arg1)->node_action); resultobj = SWIG_From_long((long)(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_svn_repos_notify_t_path_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; svn_repos_notify_t *arg1 = (svn_repos_notify_t *) 0 ; char *arg2 = (char *) 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"Os:svn_repos_notify_t_path_set",&obj0,&arg2)) SWIG_fail; { arg1 = (svn_repos_notify_t *)svn_swig_MustGetPtr(obj0, SWIGTYPE_p_svn_repos_notify_t, svn_argnum_obj0); if (PyErr_Occurred()) { SWIG_fail; } } { apr_size_t len = strlen(arg2) + 1; char *copied; if (arg1->path) free((char *)arg1->path); copied = malloc(len); memcpy(copied, arg2, len); arg1->path = copied; } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_svn_repos_notify_t_path_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; svn_repos_notify_t *arg1 = (svn_repos_notify_t *) 0 ; PyObject * obj0 = 0 ; char *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:svn_repos_notify_t_path_get",&obj0)) SWIG_fail; { arg1 = (svn_repos_notify_t *)svn_swig_MustGetPtr(obj0, SWIGTYPE_p_svn_repos_notify_t, svn_argnum_obj0); if (PyErr_Occurred()) { SWIG_fail; } } result = (char *) ((arg1)->path); resultobj = SWIG_FromCharPtr((const char *)result); return resultobj; fail: return NULL; } SWIGINTERN PyObject *svn_repos_notify_t_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_svn_repos_notify_t, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } SWIGINTERN PyObject *_wrap_svn_repos_notify_create(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; svn_repos_notify_action_t arg1 ; apr_pool_t *arg2 = (apr_pool_t *) 0 ; apr_pool_t *_global_pool = NULL ; PyObject *_global_py_pool = NULL ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; svn_repos_notify_t *result = 0 ; if (svn_swig_py_get_pool_arg(args, SWIGTYPE_p_apr_pool_t, &_global_py_pool, &_global_pool)) SWIG_fail; arg2 = _global_pool; if (!PyArg_ParseTuple(args,(char *)"O|O:svn_repos_notify_create",&obj0,&obj1)) SWIG_fail; { arg1 = (svn_repos_notify_action_t)SWIG_As_long (obj0); if (SWIG_arg_fail(svn_argnum_obj0)) { SWIG_fail; } } if (obj1) { /* Verify that the user supplied a valid pool */ if (obj1 != Py_None && obj1 != _global_py_pool) { SWIG_Python_TypeError(SWIG_TypePrettyName(SWIGTYPE_p_apr_pool_t), obj1); SWIG_arg_fail(svn_argnum_obj1); SWIG_fail; } } { svn_swig_py_release_py_lock(); result = (svn_repos_notify_t *)svn_repos_notify_create(arg1,arg2); svn_swig_py_acquire_py_lock(); } resultobj = svn_swig_NewPointerObj((void*)(result), SWIGTYPE_p_svn_repos_notify_t, _global_py_pool, args); { Py_XDECREF(_global_py_pool); } return resultobj; fail: { Py_XDECREF(_global_py_pool); } return NULL; } SWIGINTERN PyObject *_wrap_svn_repos_find_root_path(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; char *arg1 = (char *) 0 ; apr_pool_t *arg2 = (apr_pool_t *) 0 ; apr_pool_t *_global_pool = NULL ; PyObject *_global_py_pool = NULL ; PyObject * obj1 = 0 ; char *result = 0 ; if (svn_swig_py_get_pool_arg(args, SWIGTYPE_p_apr_pool_t, &_global_py_pool, &_global_pool)) SWIG_fail; arg2 = _global_pool; if (!PyArg_ParseTuple(args,(char *)"s|O:svn_repos_find_root_path",&arg1,&obj1)) SWIG_fail; if (obj1) { /* Verify that the user supplied a valid pool */ if (obj1 != Py_None && obj1 != _global_py_pool) { SWIG_Python_TypeError(SWIG_TypePrettyName(SWIGTYPE_p_apr_pool_t), obj1); SWIG_arg_fail(svn_argnum_obj1); SWIG_fail; } } { svn_swig_py_release_py_lock(); result = (char *)svn_repos_find_root_path((char const *)arg1,arg2); svn_swig_py_acquire_py_lock(); } resultobj = SWIG_FromCharPtr((const char *)result); { Py_XDECREF(_global_py_pool); } return resultobj; fail: { Py_XDECREF(_global_py_pool); } return NULL; } SWIGINTERN PyObject *_wrap_svn_repos_open2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; svn_repos_t **arg1 = (svn_repos_t **) 0 ; char *arg2 = (char *) 0 ; apr_hash_t *arg3 = (apr_hash_t *) 0 ; apr_pool_t *arg4 = (apr_pool_t *) 0 ; apr_pool_t *_global_pool = NULL ; PyObject *_global_py_pool = NULL ; svn_repos_t *temp1 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; svn_error_t *result = 0 ; if (svn_swig_py_get_pool_arg(args, SWIGTYPE_p_apr_pool_t, &_global_py_pool, &_global_pool)) SWIG_fail; arg4 = _global_pool; arg1 = &temp1; if (!PyArg_ParseTuple(args,(char *)"sO|O:svn_repos_open2",&arg2,&obj1,&obj2)) SWIG_fail; { /* PYTHON-FIXME: Handle None -> NULL. */ arg3 = svn_swig_py_stringhash_from_dict(obj1, _global_pool); } if (obj2) { /* Verify that the user supplied a valid pool */ if (obj2 != Py_None && obj2 != _global_py_pool) { SWIG_Python_TypeError(SWIG_TypePrettyName(SWIGTYPE_p_apr_pool_t), obj2); SWIG_arg_fail(svn_argnum_obj2); SWIG_fail; } } { svn_swig_py_release_py_lock(); result = (svn_error_t *)svn_repos_open2(arg1,(char const *)arg2,arg3,arg4); svn_swig_py_acquire_py_lock(); } { if (result != NULL) { if (result->apr_err != SVN_ERR_SWIG_PY_EXCEPTION_SET) svn_swig_py_svn_exception(result); else svn_error_clear(result); SWIG_fail; } Py_INCREF(Py_None); resultobj = Py_None; } { resultobj = SWIG_Python_AppendOutput(resultobj, svn_swig_NewPointerObj(*arg1, SWIGTYPE_p_svn_repos_t, _global_py_pool, args)) ; } { Py_XDECREF(_global_py_pool); } return resultobj; fail: { Py_XDECREF(_global_py_pool); } return NULL; } SWIGINTERN PyObject *_wrap_svn_repos_open(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; svn_repos_t **arg1 = (svn_repos_t **) 0 ; char *arg2 = (char *) 0 ; apr_pool_t *arg3 = (apr_pool_t *) 0 ; apr_pool_t *_global_pool = NULL ; PyObject *_global_py_pool = NULL ; svn_repos_t *temp1 ; PyObject * obj1 = 0 ; svn_error_t *result = 0 ; if (svn_swig_py_get_pool_arg(args, SWIGTYPE_p_apr_pool_t, &_global_py_pool, &_global_pool)) SWIG_fail; arg3 = _global_pool; arg1 = &temp1; if (!PyArg_ParseTuple(args,(char *)"s|O:svn_repos_open",&arg2,&obj1)) SWIG_fail; if (obj1) { /* Verify that the user supplied a valid pool */ if (obj1 != Py_None && obj1 != _global_py_pool) { SWIG_Python_TypeError(SWIG_TypePrettyName(SWIGTYPE_p_apr_pool_t), obj1); SWIG_arg_fail(svn_argnum_obj1); SWIG_fail; } } { svn_swig_py_release_py_lock(); result = (svn_error_t *)svn_repos_open(arg1,(char const *)arg2,arg3); svn_swig_py_acquire_py_lock(); } { if (result != NULL) { if (result->apr_err != SVN_ERR_SWIG_PY_EXCEPTION_SET) svn_swig_py_svn_exception(result); else svn_error_clear(result); SWIG_fail; } Py_INCREF(Py_None); resultobj = Py_None; } { resultobj = SWIG_Python_AppendOutput(resultobj, svn_swig_NewPointerObj(*arg1, SWIGTYPE_p_svn_repos_t, _global_py_pool, args)) ; } { Py_XDECREF(_global_py_pool); } return resultobj; fail: { Py_XDECREF(_global_py_pool); } return NULL; } SWIGINTERN PyObject *_wrap_svn_repos_create(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; svn_repos_t **arg1 = (svn_repos_t **) 0 ; char *arg2 = (char *) 0 ; char *arg3 = (char *) 0 ; char *arg4 = (char *) 0 ; apr_hash_t *arg5 = (apr_hash_t *) 0 ; apr_hash_t *arg6 = (apr_hash_t *) 0 ; apr_pool_t *arg7 = (apr_pool_t *) 0 ; apr_pool_t *_global_pool = NULL ; PyObject *_global_py_pool = NULL ; svn_repos_t *temp1 ; PyObject * obj3 = 0 ; PyObject * obj4 = 0 ; PyObject * obj5 = 0 ; svn_error_t *result = 0 ; if (svn_swig_py_get_pool_arg(args, SWIGTYPE_p_apr_pool_t, &_global_py_pool, &_global_pool)) SWIG_fail; arg7 = _global_pool; arg1 = &temp1; if (!PyArg_ParseTuple(args,(char *)"szzOO|O:svn_repos_create",&arg2,&arg3,&arg4,&obj3,&obj4,&obj5)) SWIG_fail; { if (_global_pool == NULL) { if (svn_swig_py_get_parent_pool(args, SWIGTYPE_p_apr_pool_t, &_global_py_pool, &_global_pool)) SWIG_fail; } arg5 = svn_swig_py_struct_ptr_hash_from_dict(obj3, SWIGTYPE_p_svn_config_t, _global_pool); if (PyErr_Occurred()) SWIG_fail; } { /* PYTHON-FIXME: Handle None -> NULL. */ arg6 = svn_swig_py_stringhash_from_dict(obj4, _global_pool); } if (obj5) { /* Verify that the user supplied a valid pool */ if (obj5 != Py_None && obj5 != _global_py_pool) { SWIG_Python_TypeError(SWIG_TypePrettyName(SWIGTYPE_p_apr_pool_t), obj5); SWIG_arg_fail(svn_argnum_obj5); SWIG_fail; } } { svn_swig_py_release_py_lock(); result = (svn_error_t *)svn_repos_create(arg1,(char const *)arg2,(char const *)arg3,(char const *)arg4,arg5,arg6,arg7); svn_swig_py_acquire_py_lock(); } { if (result != NULL) { if (result->apr_err != SVN_ERR_SWIG_PY_EXCEPTION_SET) svn_swig_py_svn_exception(result); else svn_error_clear(result); SWIG_fail; } Py_INCREF(Py_None); resultobj = Py_None; } { resultobj = SWIG_Python_AppendOutput(resultobj, svn_swig_NewPointerObj(*arg1, SWIGTYPE_p_svn_repos_t, _global_py_pool, args)) ; } { Py_XDECREF(_global_py_pool); } return resultobj; fail: { Py_XDECREF(_global_py_pool); } return NULL; } SWIGINTERN PyObject *_wrap_svn_repos_upgrade2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; char *arg1 = (char *) 0 ; svn_boolean_t arg2 ; svn_repos_notify_func_t arg3 = (svn_repos_notify_func_t) 0 ; void *arg4 = (void *) 0 ; apr_pool_t *arg5 = (apr_pool_t *) 0 ; apr_pool_t *_global_pool = NULL ; PyObject *_global_py_pool = NULL ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; PyObject * obj3 = 0 ; PyObject * obj4 = 0 ; svn_error_t *result = 0 ; if (svn_swig_py_get_pool_arg(args, SWIGTYPE_p_apr_pool_t, &_global_py_pool, &_global_pool)) SWIG_fail; arg5 = _global_pool; if (!PyArg_ParseTuple(args,(char *)"sOOO|O:svn_repos_upgrade2",&arg1,&obj1,&obj2,&obj3,&obj4)) SWIG_fail; { arg2 = (svn_boolean_t)SWIG_As_long (obj1); if (SWIG_arg_fail(svn_argnum_obj1)) { SWIG_fail; } } { svn_repos_notify_func_t * tmp = svn_swig_MustGetPtr(obj2, SWIGTYPE_p_p_f_p_void_p_q_const__struct_svn_repos_notify_t_p_apr_pool_t__void, svn_argnum_obj2); if (tmp == NULL || PyErr_Occurred()) { SWIG_fail; } arg3 = *tmp; } { if (obj3 == Py_None) { arg4 = NULL; } else if (SWIG_ConvertPtr(obj3, (void **) &arg4, 0, 0) == -1) { arg4 = (void *) obj3; PyErr_Clear(); } } if (obj4) { /* Verify that the user supplied a valid pool */ if (obj4 != Py_None && obj4 != _global_py_pool) { SWIG_Python_TypeError(SWIG_TypePrettyName(SWIGTYPE_p_apr_pool_t), obj4); SWIG_arg_fail(svn_argnum_obj4); SWIG_fail; } } { svn_swig_py_release_py_lock(); result = (svn_error_t *)svn_repos_upgrade2((char const *)arg1,arg2,arg3,arg4,arg5); svn_swig_py_acquire_py_lock(); } { if (result != NULL) { if (result->apr_err != SVN_ERR_SWIG_PY_EXCEPTION_SET) svn_swig_py_svn_exception(result); else svn_error_clear(result); SWIG_fail; } Py_INCREF(Py_None); resultobj = Py_None; } { Py_XDECREF(_global_py_pool); } return resultobj; fail: { Py_XDECREF(_global_py_pool); } return NULL; } SWIGINTERN PyObject *_wrap_svn_repos_upgrade(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; char *arg1 = (char *) 0 ; svn_boolean_t arg2 ; svn_error_t *(*arg3)(void *) = (svn_error_t *(*)(void *)) 0 ; void *arg4 = (void *) 0 ; apr_pool_t *arg5 = (apr_pool_t *) 0 ; apr_pool_t *_global_pool = NULL ; PyObject *_global_py_pool = NULL ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; PyObject * obj3 = 0 ; PyObject * obj4 = 0 ; svn_error_t *result = 0 ; if (svn_swig_py_get_pool_arg(args, SWIGTYPE_p_apr_pool_t, &_global_py_pool, &_global_pool)) SWIG_fail; arg5 = _global_pool; if (!PyArg_ParseTuple(args,(char *)"sOOO|O:svn_repos_upgrade",&arg1,&obj1,&obj2,&obj3,&obj4)) SWIG_fail; { arg2 = (svn_boolean_t)SWIG_As_long (obj1); if (SWIG_arg_fail(svn_argnum_obj1)) { SWIG_fail; } } { int res = SWIG_ConvertFunctionPtr(obj2, (void**)(&arg3), SWIGTYPE_p_f_p_void__p_svn_error_t); if (!SWIG_IsOK(res)) { SWIG_exception_fail(SWIG_ArgError(res), "in method '" "svn_repos_upgrade" "', argument " "3"" of type '" "svn_error_t *(*)(void *)""'"); } } { if (obj3 == Py_None) { arg4 = NULL; } else if (SWIG_ConvertPtr(obj3, (void **) &arg4, 0, 0) == -1) { arg4 = (void *) obj3; PyErr_Clear(); } } if (obj4) { /* Verify that the user supplied a valid pool */ if (obj4 != Py_None && obj4 != _global_py_pool) { SWIG_Python_TypeError(SWIG_TypePrettyName(SWIGTYPE_p_apr_pool_t), obj4); SWIG_arg_fail(svn_argnum_obj4); SWIG_fail; } } { svn_swig_py_release_py_lock(); result = (svn_error_t *)svn_repos_upgrade((char const *)arg1,arg2,arg3,arg4,arg5); svn_swig_py_acquire_py_lock(); } { if (result != NULL) { if (result->apr_err != SVN_ERR_SWIG_PY_EXCEPTION_SET) svn_swig_py_svn_exception(result); else svn_error_clear(result); SWIG_fail; } Py_INCREF(Py_None); resultobj = Py_None; } { Py_XDECREF(_global_py_pool); } return resultobj; fail: { Py_XDECREF(_global_py_pool); } return NULL; } SWIGINTERN PyObject *_wrap_svn_repos_delete(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; char *arg1 = (char *) 0 ; apr_pool_t *arg2 = (apr_pool_t *) 0 ; apr_pool_t *_global_pool = NULL ; PyObject *_global_py_pool = NULL ; PyObject * obj1 = 0 ; svn_error_t *result = 0 ; if (svn_swig_py_get_pool_arg(args, SWIGTYPE_p_apr_pool_t, &_global_py_pool, &_global_pool)) SWIG_fail; arg2 = _global_pool; if (!PyArg_ParseTuple(args,(char *)"s|O:svn_repos_delete",&arg1,&obj1)) SWIG_fail; if (obj1) { /* Verify that the user supplied a valid pool */ if (obj1 != Py_None && obj1 != _global_py_pool) { SWIG_Python_TypeError(SWIG_TypePrettyName(SWIGTYPE_p_apr_pool_t), obj1); SWIG_arg_fail(svn_argnum_obj1); SWIG_fail; } } { svn_swig_py_release_py_lock(); result = (svn_error_t *)svn_repos_delete((char const *)arg1,arg2); svn_swig_py_acquire_py_lock(); } { if (result != NULL) { if (result->apr_err != SVN_ERR_SWIG_PY_EXCEPTION_SET) svn_swig_py_svn_exception(result); else svn_error_clear(result); SWIG_fail; } Py_INCREF(Py_None); resultobj = Py_None; } { Py_XDECREF(_global_py_pool); } return resultobj; fail: { Py_XDECREF(_global_py_pool); } return NULL; } SWIGINTERN PyObject *_wrap_svn_repos_has_capability(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; svn_repos_t *arg1 = (svn_repos_t *) 0 ; svn_boolean_t *arg2 = (svn_boolean_t *) 0 ; char *arg3 = (char *) 0 ; apr_pool_t *arg4 = (apr_pool_t *) 0 ; apr_pool_t *_global_pool = NULL ; PyObject *_global_py_pool = NULL ; svn_boolean_t temp2 ; int res2 = SWIG_TMPOBJ ; PyObject * obj0 = 0 ; PyObject * obj2 = 0 ; svn_error_t *result = 0 ; if (svn_swig_py_get_pool_arg(args, SWIGTYPE_p_apr_pool_t, &_global_py_pool, &_global_pool)) SWIG_fail; arg4 = _global_pool; arg2 = &temp2; if (!PyArg_ParseTuple(args,(char *)"Os|O:svn_repos_has_capability",&obj0,&arg3,&obj2)) SWIG_fail; { arg1 = (svn_repos_t *)svn_swig_MustGetPtr(obj0, SWIGTYPE_p_svn_repos_t, svn_argnum_obj0); if (PyErr_Occurred()) { SWIG_fail; } } if (obj2) { /* Verify that the user supplied a valid pool */ if (obj2 != Py_None && obj2 != _global_py_pool) { SWIG_Python_TypeError(SWIG_TypePrettyName(SWIGTYPE_p_apr_pool_t), obj2); SWIG_arg_fail(svn_argnum_obj2); SWIG_fail; } } { svn_swig_py_release_py_lock(); result = (svn_error_t *)svn_repos_has_capability(arg1,arg2,(char const *)arg3,arg4); svn_swig_py_acquire_py_lock(); } { if (result != NULL) { if (result->apr_err != SVN_ERR_SWIG_PY_EXCEPTION_SET) svn_swig_py_svn_exception(result); else svn_error_clear(result); SWIG_fail; } Py_INCREF(Py_None); resultobj = Py_None; } if (SWIG_IsTmpObj(res2)) { resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg2))); } else { int new_flags = SWIG_IsNewObj(res2) ? (SWIG_POINTER_OWN | 0 ) : 0 ; resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg2), SWIGTYPE_p_int, new_flags)); } { Py_XDECREF(_global_py_pool); } return resultobj; fail: { Py_XDECREF(_global_py_pool); } return NULL; } SWIGINTERN PyObject *_wrap_svn_repos_fs(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; svn_repos_t *arg1 = (svn_repos_t *) 0 ; PyObject * obj0 = 0 ; svn_fs_t *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:svn_repos_fs",&obj0)) SWIG_fail; { arg1 = (svn_repos_t *)svn_swig_MustGetPtr(obj0, SWIGTYPE_p_svn_repos_t, svn_argnum_obj0); if (PyErr_Occurred()) { SWIG_fail; } } { svn_swig_py_release_py_lock(); result = (svn_fs_t *)svn_repos_fs(arg1); svn_swig_py_acquire_py_lock(); } resultobj = svn_swig_NewPointerObj((void*)(result), SWIGTYPE_p_svn_fs_t, _global_py_pool, args); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_svn_repos_hotcopy(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; char *arg1 = (char *) 0 ; char *arg2 = (char *) 0 ; svn_boolean_t arg3 ; apr_pool_t *arg4 = (apr_pool_t *) 0 ; apr_pool_t *_global_pool = NULL ; PyObject *_global_py_pool = NULL ; PyObject * obj2 = 0 ; PyObject * obj3 = 0 ; svn_error_t *result = 0 ; if (svn_swig_py_get_pool_arg(args, SWIGTYPE_p_apr_pool_t, &_global_py_pool, &_global_pool)) SWIG_fail; arg4 = _global_pool; if (!PyArg_ParseTuple(args,(char *)"ssO|O:svn_repos_hotcopy",&arg1,&arg2,&obj2,&obj3)) SWIG_fail; { arg3 = (svn_boolean_t)SWIG_As_long (obj2); if (SWIG_arg_fail(svn_argnum_obj2)) { SWIG_fail; } } if (obj3) { /* Verify that the user supplied a valid pool */ if (obj3 != Py_None && obj3 != _global_py_pool) { SWIG_Python_TypeError(SWIG_TypePrettyName(SWIGTYPE_p_apr_pool_t), obj3); SWIG_arg_fail(svn_argnum_obj3); SWIG_fail; } } { svn_swig_py_release_py_lock(); result = (svn_error_t *)svn_repos_hotcopy((char const *)arg1,(char const *)arg2,arg3,arg4); svn_swig_py_acquire_py_lock(); } { if (result != NULL) { if (result->apr_err != SVN_ERR_SWIG_PY_EXCEPTION_SET) svn_swig_py_svn_exception(result); else svn_error_clear(result); SWIG_fail; } Py_INCREF(Py_None); resultobj = Py_None; } { Py_XDECREF(_global_py_pool); } return resultobj; fail: { Py_XDECREF(_global_py_pool); } return NULL; } SWIGINTERN PyObject *_wrap_svn_repos_fs_pack2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; svn_repos_t *arg1 = (svn_repos_t *) 0 ; svn_repos_notify_func_t arg2 = (svn_repos_notify_func_t) 0 ; void *arg3 = (void *) 0 ; svn_cancel_func_t arg4 = (svn_cancel_func_t) 0 ; void *arg5 = (void *) 0 ; apr_pool_t *arg6 = (apr_pool_t *) 0 ; apr_pool_t *_global_pool = NULL ; PyObject *_global_py_pool = NULL ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; PyObject * obj3 = 0 ; PyObject * obj4 = 0 ; svn_error_t *result = 0 ; if (svn_swig_py_get_pool_arg(args, SWIGTYPE_p_apr_pool_t, &_global_py_pool, &_global_pool)) SWIG_fail; arg6 = _global_pool; if (!PyArg_ParseTuple(args,(char *)"OOOO|O:svn_repos_fs_pack2",&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail; { arg1 = (svn_repos_t *)svn_swig_MustGetPtr(obj0, SWIGTYPE_p_svn_repos_t, svn_argnum_obj0); if (PyErr_Occurred()) { SWIG_fail; } } { svn_repos_notify_func_t * tmp = svn_swig_MustGetPtr(obj1, SWIGTYPE_p_p_f_p_void_p_q_const__struct_svn_repos_notify_t_p_apr_pool_t__void, svn_argnum_obj1); if (tmp == NULL || PyErr_Occurred()) { SWIG_fail; } arg2 = *tmp; } { if (obj2 == Py_None) { arg3 = NULL; } else if (SWIG_ConvertPtr(obj2, (void **) &arg3, 0, 0) == -1) { arg3 = (void *) obj2; PyErr_Clear(); } } { arg4 = svn_swig_py_cancel_func; arg5 = obj3; /* our function is the baton. */ } if (obj4) { /* Verify that the user supplied a valid pool */ if (obj4 != Py_None && obj4 != _global_py_pool) { SWIG_Python_TypeError(SWIG_TypePrettyName(SWIGTYPE_p_apr_pool_t), obj4); SWIG_arg_fail(svn_argnum_obj4); SWIG_fail; } } { svn_swig_py_release_py_lock(); result = (svn_error_t *)svn_repos_fs_pack2(arg1,arg2,arg3,arg4,arg5,arg6); svn_swig_py_acquire_py_lock(); } { if (result != NULL) { if (result->apr_err != SVN_ERR_SWIG_PY_EXCEPTION_SET) svn_swig_py_svn_exception(result); else svn_error_clear(result); SWIG_fail; } Py_INCREF(Py_None); resultobj = Py_None; } { Py_XDECREF(_global_py_pool); } return resultobj; fail: { Py_XDECREF(_global_py_pool); } return NULL; } SWIGINTERN PyObject *_wrap_svn_repos_fs_pack(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; svn_repos_t *arg1 = (svn_repos_t *) 0 ; svn_fs_pack_notify_t arg2 = (svn_fs_pack_notify_t) 0 ; void *arg3 = (void *) 0 ; svn_cancel_func_t arg4 = (svn_cancel_func_t) 0 ; void *arg5 = (void *) 0 ; apr_pool_t *arg6 = (apr_pool_t *) 0 ; apr_pool_t *_global_pool = NULL ; PyObject *_global_py_pool = NULL ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; PyObject * obj3 = 0 ; PyObject * obj4 = 0 ; svn_error_t *result = 0 ; if (svn_swig_py_get_pool_arg(args, SWIGTYPE_p_apr_pool_t, &_global_py_pool, &_global_pool)) SWIG_fail; arg6 = _global_pool; if (!PyArg_ParseTuple(args,(char *)"OOOO|O:svn_repos_fs_pack",&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail; { arg1 = (svn_repos_t *)svn_swig_MustGetPtr(obj0, SWIGTYPE_p_svn_repos_t, svn_argnum_obj0); if (PyErr_Occurred()) { SWIG_fail; } } { svn_fs_pack_notify_t * tmp = svn_swig_MustGetPtr(obj1, SWIGTYPE_p_p_f_p_void_apr_int64_t_svn_fs_pack_notify_action_t_p_apr_pool_t__p_svn_error_t, svn_argnum_obj1); if (tmp == NULL || PyErr_Occurred()) { SWIG_fail; } arg2 = *tmp; } { if (obj2 == Py_None) { arg3 = NULL; } else if (SWIG_ConvertPtr(obj2, (void **) &arg3, 0, 0) == -1) { arg3 = (void *) obj2; PyErr_Clear(); } } { arg4 = svn_swig_py_cancel_func; arg5 = obj3; /* our function is the baton. */ } if (obj4) { /* Verify that the user supplied a valid pool */ if (obj4 != Py_None && obj4 != _global_py_pool) { SWIG_Python_TypeError(SWIG_TypePrettyName(SWIGTYPE_p_apr_pool_t), obj4); SWIG_arg_fail(svn_argnum_obj4); SWIG_fail; } } { svn_swig_py_release_py_lock(); result = (svn_error_t *)svn_repos_fs_pack(arg1,arg2,arg3,arg4,arg5,arg6); svn_swig_py_acquire_py_lock(); } { if (result != NULL) { if (result->apr_err != SVN_ERR_SWIG_PY_EXCEPTION_SET) svn_swig_py_svn_exception(result); else svn_error_clear(result); SWIG_fail; } Py_INCREF(Py_None); resultobj = Py_None; } { Py_XDECREF(_global_py_pool); } return resultobj; fail: { Py_XDECREF(_global_py_pool); } return NULL; } SWIGINTERN PyObject *_wrap_svn_repos_recover4(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; char *arg1 = (char *) 0 ; svn_boolean_t arg2 ; svn_repos_notify_func_t arg3 = (svn_repos_notify_func_t) 0 ; void *arg4 = (void *) 0 ; svn_cancel_func_t arg5 = (svn_cancel_func_t) 0 ; void *arg6 = (void *) 0 ; apr_pool_t *arg7 = (apr_pool_t *) 0 ; apr_pool_t *_global_pool = NULL ; PyObject *_global_py_pool = NULL ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; PyObject * obj3 = 0 ; PyObject * obj4 = 0 ; PyObject * obj5 = 0 ; svn_error_t *result = 0 ; if (svn_swig_py_get_pool_arg(args, SWIGTYPE_p_apr_pool_t, &_global_py_pool, &_global_pool)) SWIG_fail; arg7 = _global_pool; if (!PyArg_ParseTuple(args,(char *)"sOOOO|O:svn_repos_recover4",&arg1,&obj1,&obj2,&obj3,&obj4,&obj5)) SWIG_fail; { arg2 = (svn_boolean_t)SWIG_As_long (obj1); if (SWIG_arg_fail(svn_argnum_obj1)) { SWIG_fail; } } { svn_repos_notify_func_t * tmp = svn_swig_MustGetPtr(obj2, SWIGTYPE_p_p_f_p_void_p_q_const__struct_svn_repos_notify_t_p_apr_pool_t__void, svn_argnum_obj2); if (tmp == NULL || PyErr_Occurred()) { SWIG_fail; } arg3 = *tmp; } { if (obj3 == Py_None) { arg4 = NULL; } else if (SWIG_ConvertPtr(obj3, (void **) &arg4, 0, 0) == -1) { arg4 = (void *) obj3; PyErr_Clear(); } } { arg5 = svn_swig_py_cancel_func; arg6 = obj4; /* our function is the baton. */ } if (obj5) { /* Verify that the user supplied a valid pool */ if (obj5 != Py_None && obj5 != _global_py_pool) { SWIG_Python_TypeError(SWIG_TypePrettyName(SWIGTYPE_p_apr_pool_t), obj5); SWIG_arg_fail(svn_argnum_obj5); SWIG_fail; } } { svn_swig_py_release_py_lock(); result = (svn_error_t *)svn_repos_recover4((char const *)arg1,arg2,arg3,arg4,arg5,arg6,arg7); svn_swig_py_acquire_py_lock(); } { if (result != NULL) { if (result->apr_err != SVN_ERR_SWIG_PY_EXCEPTION_SET) svn_swig_py_svn_exception(result); else svn_error_clear(result); SWIG_fail; } Py_INCREF(Py_None); resultobj = Py_None; } { Py_XDECREF(_global_py_pool); } return resultobj; fail: { Py_XDECREF(_global_py_pool); } return NULL; } SWIGINTERN PyObject *_wrap_svn_repos_recover3(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; char *arg1 = (char *) 0 ; svn_boolean_t arg2 ; svn_error_t *(*arg3)(void *) = (svn_error_t *(*)(void *)) 0 ; void *arg4 = (void *) 0 ; svn_cancel_func_t arg5 = (svn_cancel_func_t) 0 ; void *arg6 = (void *) 0 ; apr_pool_t *arg7 = (apr_pool_t *) 0 ; apr_pool_t *_global_pool = NULL ; PyObject *_global_py_pool = NULL ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; PyObject * obj3 = 0 ; PyObject * obj4 = 0 ; PyObject * obj5 = 0 ; svn_error_t *result = 0 ; if (svn_swig_py_get_pool_arg(args, SWIGTYPE_p_apr_pool_t, &_global_py_pool, &_global_pool)) SWIG_fail; arg7 = _global_pool; if (!PyArg_ParseTuple(args,(char *)"sOOOO|O:svn_repos_recover3",&arg1,&obj1,&obj2,&obj3,&obj4,&obj5)) SWIG_fail; { arg2 = (svn_boolean_t)SWIG_As_long (obj1); if (SWIG_arg_fail(svn_argnum_obj1)) { SWIG_fail; } } { int res = SWIG_ConvertFunctionPtr(obj2, (void**)(&arg3), SWIGTYPE_p_f_p_void__p_svn_error_t); if (!SWIG_IsOK(res)) { SWIG_exception_fail(SWIG_ArgError(res), "in method '" "svn_repos_recover3" "', argument " "3"" of type '" "svn_error_t *(*)(void *)""'"); } } { if (obj3 == Py_None) { arg4 = NULL; } else if (SWIG_ConvertPtr(obj3, (void **) &arg4, 0, 0) == -1) { arg4 = (void *) obj3; PyErr_Clear(); } } { arg5 = svn_swig_py_cancel_func; arg6 = obj4; /* our function is the baton. */ } if (obj5) { /* Verify that the user supplied a valid pool */ if (obj5 != Py_None && obj5 != _global_py_pool) { SWIG_Python_TypeError(SWIG_TypePrettyName(SWIGTYPE_p_apr_pool_t), obj5); SWIG_arg_fail(svn_argnum_obj5); SWIG_fail; } } { svn_swig_py_release_py_lock(); result = (svn_error_t *)svn_repos_recover3((char const *)arg1,arg2,arg3,arg4,arg5,arg6,arg7); svn_swig_py_acquire_py_lock(); } { if (result != NULL) { if (result->apr_err != SVN_ERR_SWIG_PY_EXCEPTION_SET) svn_swig_py_svn_exception(result); else svn_error_clear(result); SWIG_fail; } Py_INCREF(Py_None); resultobj = Py_None; } { Py_XDECREF(_global_py_pool); } return resultobj; fail: { Py_XDECREF(_global_py_pool); } return NULL; } SWIGINTERN PyObject *_wrap_svn_repos_recover2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; char *arg1 = (char *) 0 ; svn_boolean_t arg2 ; svn_error_t *(*arg3)(void *) = (svn_error_t *(*)(void *)) 0 ; void *arg4 = (void *) 0 ; apr_pool_t *arg5 = (apr_pool_t *) 0 ; apr_pool_t *_global_pool = NULL ; PyObject *_global_py_pool = NULL ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; PyObject * obj3 = 0 ; PyObject * obj4 = 0 ; svn_error_t *result = 0 ; if (svn_swig_py_get_pool_arg(args, SWIGTYPE_p_apr_pool_t, &_global_py_pool, &_global_pool)) SWIG_fail; arg5 = _global_pool; if (!PyArg_ParseTuple(args,(char *)"sOOO|O:svn_repos_recover2",&arg1,&obj1,&obj2,&obj3,&obj4)) SWIG_fail; { arg2 = (svn_boolean_t)SWIG_As_long (obj1); if (SWIG_arg_fail(svn_argnum_obj1)) { SWIG_fail; } } { int res = SWIG_ConvertFunctionPtr(obj2, (void**)(&arg3), SWIGTYPE_p_f_p_void__p_svn_error_t); if (!SWIG_IsOK(res)) { SWIG_exception_fail(SWIG_ArgError(res), "in method '" "svn_repos_recover2" "', argument " "3"" of type '" "svn_error_t *(*)(void *)""'"); } } { if (obj3 == Py_None) { arg4 = NULL; } else if (SWIG_ConvertPtr(obj3, (void **) &arg4, 0, 0) == -1) { arg4 = (void *) obj3; PyErr_Clear(); } } if (obj4) { /* Verify that the user supplied a valid pool */ if (obj4 != Py_None && obj4 != _global_py_pool) { SWIG_Python_TypeError(SWIG_TypePrettyName(SWIGTYPE_p_apr_pool_t), obj4); SWIG_arg_fail(svn_argnum_obj4); SWIG_fail; } } { svn_swig_py_release_py_lock(); result = (svn_error_t *)svn_repos_recover2((char const *)arg1,arg2,arg3,arg4,arg5); svn_swig_py_acquire_py_lock(); } { if (result != NULL) { if (result->apr_err != SVN_ERR_SWIG_PY_EXCEPTION_SET) svn_swig_py_svn_exception(result); else svn_error_clear(result); SWIG_fail; } Py_INCREF(Py_None); resultobj = Py_None; } { Py_XDECREF(_global_py_pool); } return resultobj; fail: { Py_XDECREF(_global_py_pool); } return NULL; } SWIGINTERN PyObject *_wrap_svn_repos_recover(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; char *arg1 = (char *) 0 ; apr_pool_t *arg2 = (apr_pool_t *) 0 ; apr_pool_t *_global_pool = NULL ; PyObject *_global_py_pool = NULL ; PyObject * obj1 = 0 ; svn_error_t *result = 0 ; if (svn_swig_py_get_pool_arg(args, SWIGTYPE_p_apr_pool_t, &_global_py_pool, &_global_pool)) SWIG_fail; arg2 = _global_pool; if (!PyArg_ParseTuple(args,(char *)"s|O:svn_repos_recover",&arg1,&obj1)) SWIG_fail; if (obj1) { /* Verify that the user supplied a valid pool */ if (obj1 != Py_None && obj1 != _global_py_pool) { SWIG_Python_TypeError(SWIG_TypePrettyName(SWIGTYPE_p_apr_pool_t), obj1); SWIG_arg_fail(svn_argnum_obj1); SWIG_fail; } } { svn_swig_py_release_py_lock(); result = (svn_error_t *)svn_repos_recover((char const *)arg1,arg2); svn_swig_py_acquire_py_lock(); } { if (result != NULL) { if (result->apr_err != SVN_ERR_SWIG_PY_EXCEPTION_SET) svn_swig_py_svn_exception(result); else svn_error_clear(result); SWIG_fail; } Py_INCREF(Py_None); resultobj = Py_None; } { Py_XDECREF(_global_py_pool); } return resultobj; fail: { Py_XDECREF(_global_py_pool); } return NULL; } SWIGINTERN PyObject *_wrap_svn_repos_db_logfiles(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; apr_array_header_t **arg1 = (apr_array_header_t **) 0 ; char *arg2 = (char *) 0 ; svn_boolean_t arg3 ; apr_pool_t *arg4 = (apr_pool_t *) 0 ; apr_pool_t *_global_pool = NULL ; PyObject *_global_py_pool = NULL ; apr_array_header_t *temp1 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; svn_error_t *result = 0 ; if (svn_swig_py_get_pool_arg(args, SWIGTYPE_p_apr_pool_t, &_global_py_pool, &_global_pool)) SWIG_fail; arg4 = _global_pool; arg1 = &temp1; if (!PyArg_ParseTuple(args,(char *)"sO|O:svn_repos_db_logfiles",&arg2,&obj1,&obj2)) SWIG_fail; { arg3 = (svn_boolean_t)SWIG_As_long (obj1); if (SWIG_arg_fail(svn_argnum_obj1)) { SWIG_fail; } } if (obj2) { /* Verify that the user supplied a valid pool */ if (obj2 != Py_None && obj2 != _global_py_pool) { SWIG_Python_TypeError(SWIG_TypePrettyName(SWIGTYPE_p_apr_pool_t), obj2); SWIG_arg_fail(svn_argnum_obj2); SWIG_fail; } } { svn_swig_py_release_py_lock(); result = (svn_error_t *)svn_repos_db_logfiles(arg1,(char const *)arg2,arg3,arg4); svn_swig_py_acquire_py_lock(); } { if (result != NULL) { if (result->apr_err != SVN_ERR_SWIG_PY_EXCEPTION_SET) svn_swig_py_svn_exception(result); else svn_error_clear(result); SWIG_fail; } Py_INCREF(Py_None); resultobj = Py_None; } { resultobj = SWIG_Python_AppendOutput(resultobj, svn_swig_py_array_to_list(*arg1)); } { Py_XDECREF(_global_py_pool); } return resultobj; fail: { Py_XDECREF(_global_py_pool); } return NULL; } SWIGINTERN PyObject *_wrap_svn_repos_path(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; svn_repos_t *arg1 = (svn_repos_t *) 0 ; apr_pool_t *arg2 = (apr_pool_t *) 0 ; apr_pool_t *_global_pool = NULL ; PyObject *_global_py_pool = NULL ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; char *result = 0 ; if (svn_swig_py_get_pool_arg(args, SWIGTYPE_p_apr_pool_t, &_global_py_pool, &_global_pool)) SWIG_fail; arg2 = _global_pool; if (!PyArg_ParseTuple(args,(char *)"O|O:svn_repos_path",&obj0,&obj1)) SWIG_fail; { arg1 = (svn_repos_t *)svn_swig_MustGetPtr(obj0, SWIGTYPE_p_svn_repos_t, svn_argnum_obj0); if (PyErr_Occurred()) { SWIG_fail; } } if (obj1) { /* Verify that the user supplied a valid pool */ if (obj1 != Py_None && obj1 != _global_py_pool) { SWIG_Python_TypeError(SWIG_TypePrettyName(SWIGTYPE_p_apr_pool_t), obj1); SWIG_arg_fail(svn_argnum_obj1); SWIG_fail; } } { svn_swig_py_release_py_lock(); result = (char *)svn_repos_path(arg1,arg2); svn_swig_py_acquire_py_lock(); } resultobj = SWIG_FromCharPtr((const char *)result); { Py_XDECREF(_global_py_pool); } return resultobj; fail: { Py_XDECREF(_global_py_pool); } return NULL; } SWIGINTERN PyObject *_wrap_svn_repos_db_env(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; svn_repos_t *arg1 = (svn_repos_t *) 0 ; apr_pool_t *arg2 = (apr_pool_t *) 0 ; apr_pool_t *_global_pool = NULL ; PyObject *_global_py_pool = NULL ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; char *result = 0 ; if (svn_swig_py_get_pool_arg(args, SWIGTYPE_p_apr_pool_t, &_global_py_pool, &_global_pool)) SWIG_fail; arg2 = _global_pool; if (!PyArg_ParseTuple(args,(char *)"O|O:svn_repos_db_env",&obj0,&obj1)) SWIG_fail; { arg1 = (svn_repos_t *)svn_swig_MustGetPtr(obj0, SWIGTYPE_p_svn_repos_t, svn_argnum_obj0); if (PyErr_Occurred()) { SWIG_fail; } } if (obj1) { /* Verify that the user supplied a valid pool */ if (obj1 != Py_None && obj1 != _global_py_pool) { SWIG_Python_TypeError(SWIG_TypePrettyName(SWIGTYPE_p_apr_pool_t), obj1); SWIG_arg_fail(svn_argnum_obj1); SWIG_fail; } } { svn_swig_py_release_py_lock(); result = (char *)svn_repos_db_env(arg1,arg2); svn_swig_py_acquire_py_lock(); } resultobj = SWIG_FromCharPtr((const char *)result); { Py_XDECREF(_global_py_pool); } return resultobj; fail: { Py_XDECREF(_global_py_pool); } return NULL; } SWIGINTERN PyObject *_wrap_svn_repos_conf_dir(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; svn_repos_t *arg1 = (svn_repos_t *) 0 ; apr_pool_t *arg2 = (apr_pool_t *) 0 ; apr_pool_t *_global_pool = NULL ; PyObject *_global_py_pool = NULL ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; char *result = 0 ; if (svn_swig_py_get_pool_arg(args, SWIGTYPE_p_apr_pool_t, &_global_py_pool, &_global_pool)) SWIG_fail; arg2 = _global_pool; if (!PyArg_ParseTuple(args,(char *)"O|O:svn_repos_conf_dir",&obj0,&obj1)) SWIG_fail; { arg1 = (svn_repos_t *)svn_swig_MustGetPtr(obj0, SWIGTYPE_p_svn_repos_t, svn_argnum_obj0); if (PyErr_Occurred()) { SWIG_fail; } } if (obj1) { /* Verify that the user supplied a valid pool */ if (obj1 != Py_None && obj1 != _global_py_pool) { SWIG_Python_TypeError(SWIG_TypePrettyName(SWIGTYPE_p_apr_pool_t), obj1); SWIG_arg_fail(svn_argnum_obj1); SWIG_fail; } } { svn_swig_py_release_py_lock(); result = (char *)svn_repos_conf_dir(arg1,arg2); svn_swig_py_acquire_py_lock(); } resultobj = SWIG_FromCharPtr((const char *)result); { Py_XDECREF(_global_py_pool); } return resultobj; fail: { Py_XDECREF(_global_py_pool); } return NULL; } SWIGINTERN PyObject *_wrap_svn_repos_svnserve_conf(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; svn_repos_t *arg1 = (svn_repos_t *) 0 ; apr_pool_t *arg2 = (apr_pool_t *) 0 ; apr_pool_t *_global_pool = NULL ; PyObject *_global_py_pool = NULL ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; char *result = 0 ; if (svn_swig_py_get_pool_arg(args, SWIGTYPE_p_apr_pool_t, &_global_py_pool, &_global_pool)) SWIG_fail; arg2 = _global_pool; if (!PyArg_ParseTuple(args,(char *)"O|O:svn_repos_svnserve_conf",&obj0,&obj1)) SWIG_fail; { arg1 = (svn_repos_t *)svn_swig_MustGetPtr(obj0, SWIGTYPE_p_svn_repos_t, svn_argnum_obj0); if (PyErr_Occurred()) { SWIG_fail; } } if (obj1) { /* Verify that the user supplied a valid pool */ if (obj1 != Py_None && obj1 != _global_py_pool) { SWIG_Python_TypeError(SWIG_TypePrettyName(SWIGTYPE_p_apr_pool_t), obj1); SWIG_arg_fail(svn_argnum_obj1); SWIG_fail; } } { svn_swig_py_release_py_lock(); result = (char *)svn_repos_svnserve_conf(arg1,arg2); svn_swig_py_acquire_py_lock(); } resultobj = SWIG_FromCharPtr((const char *)result); { Py_XDECREF(_global_py_pool); } return resultobj; fail: { Py_XDECREF(_global_py_pool); } return NULL; } SWIGINTERN PyObject *_wrap_svn_repos_lock_dir(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; svn_repos_t *arg1 = (svn_repos_t *) 0 ; apr_pool_t *arg2 = (apr_pool_t *) 0 ; apr_pool_t *_global_pool = NULL ; PyObject *_global_py_pool = NULL ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; char *result = 0 ; if (svn_swig_py_get_pool_arg(args, SWIGTYPE_p_apr_pool_t, &_global_py_pool, &_global_pool)) SWIG_fail; arg2 = _global_pool; if (!PyArg_ParseTuple(args,(char *)"O|O:svn_repos_lock_dir",&obj0,&obj1)) SWIG_fail; { arg1 = (svn_repos_t *)svn_swig_MustGetPtr(obj0, SWIGTYPE_p_svn_repos_t, svn_argnum_obj0); if (PyErr_Occurred()) { SWIG_fail; } } if (obj1) { /* Verify that the user supplied a valid pool */ if (obj1 != Py_None && obj1 != _global_py_pool) { SWIG_Python_TypeError(SWIG_TypePrettyName(SWIGTYPE_p_apr_pool_t), obj1); SWIG_arg_fail(svn_argnum_obj1); SWIG_fail; } } { svn_swig_py_release_py_lock(); result = (char *)svn_repos_lock_dir(arg1,arg2); svn_swig_py_acquire_py_lock(); } resultobj = SWIG_FromCharPtr((const char *)result); { Py_XDECREF(_global_py_pool); } return resultobj; fail: { Py_XDECREF(_global_py_pool); } return NULL; } SWIGINTERN PyObject *_wrap_svn_repos_db_lockfile(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; svn_repos_t *arg1 = (svn_repos_t *) 0 ; apr_pool_t *arg2 = (apr_pool_t *) 0 ; apr_pool_t *_global_pool = NULL ; PyObject *_global_py_pool = NULL ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; char *result = 0 ; if (svn_swig_py_get_pool_arg(args, SWIGTYPE_p_apr_pool_t, &_global_py_pool, &_global_pool)) SWIG_fail; arg2 = _global_pool; if (!PyArg_ParseTuple(args,(char *)"O|O:svn_repos_db_lockfile",&obj0,&obj1)) SWIG_fail; { arg1 = (svn_repos_t *)svn_swig_MustGetPtr(obj0, SWIGTYPE_p_svn_repos_t, svn_argnum_obj0); if (PyErr_Occurred()) { SWIG_fail; } } if (obj1) { /* Verify that the user supplied a valid pool */ if (obj1 != Py_None && obj1 != _global_py_pool) { SWIG_Python_TypeError(SWIG_TypePrettyName(SWIGTYPE_p_apr_pool_t), obj1); SWIG_arg_fail(svn_argnum_obj1); SWIG_fail; } } { svn_swig_py_release_py_lock(); result = (char *)svn_repos_db_lockfile(arg1,arg2); svn_swig_py_acquire_py_lock(); } resultobj = SWIG_FromCharPtr((const char *)result); { Py_XDECREF(_global_py_pool); } return resultobj; fail: { Py_XDECREF(_global_py_pool); } return NULL; } SWIGINTERN PyObject *_wrap_svn_repos_db_logs_lockfile(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; svn_repos_t *arg1 = (svn_repos_t *) 0 ; apr_pool_t *arg2 = (apr_pool_t *) 0 ; apr_pool_t *_global_pool = NULL ; PyObject *_global_py_pool = NULL ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; char *result = 0 ; if (svn_swig_py_get_pool_arg(args, SWIGTYPE_p_apr_pool_t, &_global_py_pool, &_global_pool)) SWIG_fail; arg2 = _global_pool; if (!PyArg_ParseTuple(args,(char *)"O|O:svn_repos_db_logs_lockfile",&obj0,&obj1)) SWIG_fail; { arg1 = (svn_repos_t *)svn_swig_MustGetPtr(obj0, SWIGTYPE_p_svn_repos_t, svn_argnum_obj0); if (PyErr_Occurred()) { SWIG_fail; } } if (obj1) { /* Verify that the user supplied a valid pool */ if (obj1 != Py_None && obj1 != _global_py_pool) { SWIG_Python_TypeError(SWIG_TypePrettyName(SWIGTYPE_p_apr_pool_t), obj1); SWIG_arg_fail(svn_argnum_obj1); SWIG_fail; } } { svn_swig_py_release_py_lock(); result = (char *)svn_repos_db_logs_lockfile(arg1,arg2); svn_swig_py_acquire_py_lock(); } resultobj = SWIG_FromCharPtr((const char *)result); { Py_XDECREF(_global_py_pool); } return resultobj; fail: { Py_XDECREF(_global_py_pool); } return NULL; } SWIGINTERN PyObject *_wrap_svn_repos_hook_dir(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; svn_repos_t *arg1 = (svn_repos_t *) 0 ; apr_pool_t *arg2 = (apr_pool_t *) 0 ; apr_pool_t *_global_pool = NULL ; PyObject *_global_py_pool = NULL ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; char *result = 0 ; if (svn_swig_py_get_pool_arg(args, SWIGTYPE_p_apr_pool_t, &_global_py_pool, &_global_pool)) SWIG_fail; arg2 = _global_pool; if (!PyArg_ParseTuple(args,(char *)"O|O:svn_repos_hook_dir",&obj0,&obj1)) SWIG_fail; { arg1 = (svn_repos_t *)svn_swig_MustGetPtr(obj0, SWIGTYPE_p_svn_repos_t, svn_argnum_obj0); if (PyErr_Occurred()) { SWIG_fail; } } if (obj1) { /* Verify that the user supplied a valid pool */ if (obj1 != Py_None && obj1 != _global_py_pool) { SWIG_Python_TypeError(SWIG_TypePrettyName(SWIGTYPE_p_apr_pool_t), obj1); SWIG_arg_fail(svn_argnum_obj1); SWIG_fail; } } { svn_swig_py_release_py_lock(); result = (char *)svn_repos_hook_dir(arg1,arg2); svn_swig_py_acquire_py_lock(); } resultobj = SWIG_FromCharPtr((const char *)result); { Py_XDECREF(_global_py_pool); } return resultobj; fail: { Py_XDECREF(_global_py_pool); } return NULL; } SWIGINTERN PyObject *_wrap_svn_repos_start_commit_hook(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; svn_repos_t *arg1 = (svn_repos_t *) 0 ; apr_pool_t *arg2 = (apr_pool_t *) 0 ; apr_pool_t *_global_pool = NULL ; PyObject *_global_py_pool = NULL ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; char *result = 0 ; if (svn_swig_py_get_pool_arg(args, SWIGTYPE_p_apr_pool_t, &_global_py_pool, &_global_pool)) SWIG_fail; arg2 = _global_pool; if (!PyArg_ParseTuple(args,(char *)"O|O:svn_repos_start_commit_hook",&obj0,&obj1)) SWIG_fail; { arg1 = (svn_repos_t *)svn_swig_MustGetPtr(obj0, SWIGTYPE_p_svn_repos_t, svn_argnum_obj0); if (PyErr_Occurred()) { SWIG_fail; } } if (obj1) { /* Verify that the user supplied a valid pool */ if (obj1 != Py_None && obj1 != _global_py_pool) { SWIG_Python_TypeError(SWIG_TypePrettyName(SWIGTYPE_p_apr_pool_t), obj1); SWIG_arg_fail(svn_argnum_obj1); SWIG_fail; } } { svn_swig_py_release_py_lock(); result = (char *)svn_repos_start_commit_hook(arg1,arg2); svn_swig_py_acquire_py_lock(); } resultobj = SWIG_FromCharPtr((const char *)result); { Py_XDECREF(_global_py_pool); } return resultobj; fail: { Py_XDECREF(_global_py_pool); } return NULL; } SWIGINTERN PyObject *_wrap_svn_repos_pre_commit_hook(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; svn_repos_t *arg1 = (svn_repos_t *) 0 ; apr_pool_t *arg2 = (apr_pool_t *) 0 ; apr_pool_t *_global_pool = NULL ; PyObject *_global_py_pool = NULL ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; char *result = 0 ; if (svn_swig_py_get_pool_arg(args, SWIGTYPE_p_apr_pool_t, &_global_py_pool, &_global_pool)) SWIG_fail; arg2 = _global_pool; if (!PyArg_ParseTuple(args,(char *)"O|O:svn_repos_pre_commit_hook",&obj0,&obj1)) SWIG_fail; { arg1 = (svn_repos_t *)svn_swig_MustGetPtr(obj0, SWIGTYPE_p_svn_repos_t, svn_argnum_obj0); if (PyErr_Occurred()) { SWIG_fail; } } if (obj1) { /* Verify that the user supplied a valid pool */ if (obj1 != Py_None && obj1 != _global_py_pool) { SWIG_Python_TypeError(SWIG_TypePrettyName(SWIGTYPE_p_apr_pool_t), obj1); SWIG_arg_fail(svn_argnum_obj1); SWIG_fail; } } { svn_swig_py_release_py_lock(); result = (char *)svn_repos_pre_commit_hook(arg1,arg2); svn_swig_py_acquire_py_lock(); } resultobj = SWIG_FromCharPtr((const char *)result); { Py_XDECREF(_global_py_pool); } return resultobj; fail: { Py_XDECREF(_global_py_pool); } return NULL; } SWIGINTERN PyObject *_wrap_svn_repos_post_commit_hook(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; svn_repos_t *arg1 = (svn_repos_t *) 0 ; apr_pool_t *arg2 = (apr_pool_t *) 0 ; apr_pool_t *_global_pool = NULL ; PyObject *_global_py_pool = NULL ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; char *result = 0 ; if (svn_swig_py_get_pool_arg(args, SWIGTYPE_p_apr_pool_t, &_global_py_pool, &_global_pool)) SWIG_fail; arg2 = _global_pool; if (!PyArg_ParseTuple(args,(char *)"O|O:svn_repos_post_commit_hook",&obj0,&obj1)) SWIG_fail; { arg1 = (svn_repos_t *)svn_swig_MustGetPtr(obj0, SWIGTYPE_p_svn_repos_t, svn_argnum_obj0); if (PyErr_Occurred()) { SWIG_fail; } } if (obj1) { /* Verify that the user supplied a valid pool */ if (obj1 != Py_None && obj1 != _global_py_pool) { SWIG_Python_TypeError(SWIG_TypePrettyName(SWIGTYPE_p_apr_pool_t), obj1); SWIG_arg_fail(svn_argnum_obj1); SWIG_fail; } } { svn_swig_py_release_py_lock(); result = (char *)svn_repos_post_commit_hook(arg1,arg2); svn_swig_py_acquire_py_lock(); } resultobj = SWIG_FromCharPtr((const char *)result); { Py_XDECREF(_global_py_pool); } return resultobj; fail: { Py_XDECREF(_global_py_pool); } return NULL; } SWIGINTERN PyObject *_wrap_svn_repos_pre_revprop_change_hook(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; svn_repos_t *arg1 = (svn_repos_t *) 0 ; apr_pool_t *arg2 = (apr_pool_t *) 0 ; apr_pool_t *_global_pool = NULL ; PyObject *_global_py_pool = NULL ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; char *result = 0 ; if (svn_swig_py_get_pool_arg(args, SWIGTYPE_p_apr_pool_t, &_global_py_pool, &_global_pool)) SWIG_fail; arg2 = _global_pool; if (!PyArg_ParseTuple(args,(char *)"O|O:svn_repos_pre_revprop_change_hook",&obj0,&obj1)) SWIG_fail; { arg1 = (svn_repos_t *)svn_swig_MustGetPtr(obj0, SWIGTYPE_p_svn_repos_t, svn_argnum_obj0); if (PyErr_Occurred()) { SWIG_fail; } } if (obj1) { /* Verify that the user supplied a valid pool */ if (obj1 != Py_None && obj1 != _global_py_pool) { SWIG_Python_TypeError(SWIG_TypePrettyName(SWIGTYPE_p_apr_pool_t), obj1); SWIG_arg_fail(svn_argnum_obj1); SWIG_fail; } } { svn_swig_py_release_py_lock(); result = (char *)svn_repos_pre_revprop_change_hook(arg1,arg2); svn_swig_py_acquire_py_lock(); } resultobj = SWIG_FromCharPtr((const char *)result); { Py_XDECREF(_global_py_pool); } return resultobj; fail: { Py_XDECREF(_global_py_pool); } return NULL; } SWIGINTERN PyObject *_wrap_svn_repos_post_revprop_change_hook(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; svn_repos_t *arg1 = (svn_repos_t *) 0 ; apr_pool_t *arg2 = (apr_pool_t *) 0 ; apr_pool_t *_global_pool = NULL ; PyObject *_global_py_pool = NULL ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; char *result = 0 ; if (svn_swig_py_get_pool_arg(args, SWIGTYPE_p_apr_pool_t, &_global_py_pool, &_global_pool)) SWIG_fail; arg2 = _global_pool; if (!PyArg_ParseTuple(args,(char *)"O|O:svn_repos_post_revprop_change_hook",&obj0,&obj1)) SWIG_fail; { arg1 = (svn_repos_t *)svn_swig_MustGetPtr(obj0, SWIGTYPE_p_svn_repos_t, svn_argnum_obj0); if (PyErr_Occurred()) { SWIG_fail; } } if (obj1) { /* Verify that the user supplied a valid pool */ if (obj1 != Py_None && obj1 != _global_py_pool) { SWIG_Python_TypeError(SWIG_TypePrettyName(SWIGTYPE_p_apr_pool_t), obj1); SWIG_arg_fail(svn_argnum_obj1); SWIG_fail; } } { svn_swig_py_release_py_lock(); result = (char *)svn_repos_post_revprop_change_hook(arg1,arg2); svn_swig_py_acquire_py_lock(); } resultobj = SWIG_FromCharPtr((const char *)result); { Py_XDECREF(_global_py_pool); } return resultobj; fail: { Py_XDECREF(_global_py_pool); } return NULL; } SWIGINTERN PyObject *_wrap_svn_repos_pre_lock_hook(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; svn_repos_t *arg1 = (svn_repos_t *) 0 ; apr_pool_t *arg2 = (apr_pool_t *) 0 ; apr_pool_t *_global_pool = NULL ; PyObject *_global_py_pool = NULL ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; char *result = 0 ; if (svn_swig_py_get_pool_arg(args, SWIGTYPE_p_apr_pool_t, &_global_py_pool, &_global_pool)) SWIG_fail; arg2 = _global_pool; if (!PyArg_ParseTuple(args,(char *)"O|O:svn_repos_pre_lock_hook",&obj0,&obj1)) SWIG_fail; { arg1 = (svn_repos_t *)svn_swig_MustGetPtr(obj0, SWIGTYPE_p_svn_repos_t, svn_argnum_obj0); if (PyErr_Occurred()) { SWIG_fail; } } if (obj1) { /* Verify that the user supplied a valid pool */ if (obj1 != Py_None && obj1 != _global_py_pool) { SWIG_Python_TypeError(SWIG_TypePrettyName(SWIGTYPE_p_apr_pool_t), obj1); SWIG_arg_fail(svn_argnum_obj1); SWIG_fail; } } { svn_swig_py_release_py_lock(); result = (char *)svn_repos_pre_lock_hook(arg1,arg2); svn_swig_py_acquire_py_lock(); } resultobj = SWIG_FromCharPtr((const char *)result); { Py_XDECREF(_global_py_pool); } return resultobj; fail: { Py_XDECREF(_global_py_pool); } return NULL; } SWIGINTERN PyObject *_wrap_svn_repos_post_lock_hook(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; svn_repos_t *arg1 = (svn_repos_t *) 0 ; apr_pool_t *arg2 = (apr_pool_t *) 0 ; apr_pool_t *_global_pool = NULL ; PyObject *_global_py_pool = NULL ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; char *result = 0 ; if (svn_swig_py_get_pool_arg(args, SWIGTYPE_p_apr_pool_t, &_global_py_pool, &_global_pool)) SWIG_fail; arg2 = _global_pool; if (!PyArg_ParseTuple(args,(char *)"O|O:svn_repos_post_lock_hook",&obj0,&obj1)) SWIG_fail; { arg1 = (svn_repos_t *)svn_swig_MustGetPtr(obj0, SWIGTYPE_p_svn_repos_t, svn_argnum_obj0); if (PyErr_Occurred()) { SWIG_fail; } } if (obj1) { /* Verify that the user supplied a valid pool */ if (obj1 != Py_None && obj1 != _global_py_pool) { SWIG_Python_TypeError(SWIG_TypePrettyName(SWIGTYPE_p_apr_pool_t), obj1); SWIG_arg_fail(svn_argnum_obj1); SWIG_fail; } } { svn_swig_py_release_py_lock(); result = (char *)svn_repos_post_lock_hook(arg1,arg2); svn_swig_py_acquire_py_lock(); } resultobj = SWIG_FromCharPtr((const char *)result); { Py_XDECREF(_global_py_pool); } return resultobj; fail: { Py_XDECREF(_global_py_pool); } return NULL; } SWIGINTERN PyObject *_wrap_svn_repos_pre_unlock_hook(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; svn_repos_t *arg1 = (svn_repos_t *) 0 ; apr_pool_t *arg2 = (apr_pool_t *) 0 ; apr_pool_t *_global_pool = NULL ; PyObject *_global_py_pool = NULL ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; char *result = 0 ; if (svn_swig_py_get_pool_arg(args, SWIGTYPE_p_apr_pool_t, &_global_py_pool, &_global_pool)) SWIG_fail; arg2 = _global_pool; if (!PyArg_ParseTuple(args,(char *)"O|O:svn_repos_pre_unlock_hook",&obj0,&obj1)) SWIG_fail; { arg1 = (svn_repos_t *)svn_swig_MustGetPtr(obj0, SWIGTYPE_p_svn_repos_t, svn_argnum_obj0); if (PyErr_Occurred()) { SWIG_fail; } } if (obj1) { /* Verify that the user supplied a valid pool */ if (obj1 != Py_None && obj1 != _global_py_pool) { SWIG_Python_TypeError(SWIG_TypePrettyName(SWIGTYPE_p_apr_pool_t), obj1); SWIG_arg_fail(svn_argnum_obj1); SWIG_fail; } } { svn_swig_py_release_py_lock(); result = (char *)svn_repos_pre_unlock_hook(arg1,arg2); svn_swig_py_acquire_py_lock(); } resultobj = SWIG_FromCharPtr((const char *)result); { Py_XDECREF(_global_py_pool); } return resultobj; fail: { Py_XDECREF(_global_py_pool); } return NULL; } SWIGINTERN PyObject *_wrap_svn_repos_post_unlock_hook(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; svn_repos_t *arg1 = (svn_repos_t *) 0 ; apr_pool_t *arg2 = (apr_pool_t *) 0 ; apr_pool_t *_global_pool = NULL ; PyObject *_global_py_pool = NULL ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; char *result = 0 ; if (svn_swig_py_get_pool_arg(args, SWIGTYPE_p_apr_pool_t, &_global_py_pool, &_global_pool)) SWIG_fail; arg2 = _global_pool; if (!PyArg_ParseTuple(args,(char *)"O|O:svn_repos_post_unlock_hook",&obj0,&obj1)) SWIG_fail; { arg1 = (svn_repos_t *)svn_swig_MustGetPtr(obj0, SWIGTYPE_p_svn_repos_t, svn_argnum_obj0); if (PyErr_Occurred()) { SWIG_fail; } } if (obj1) { /* Verify that the user supplied a valid pool */ if (obj1 != Py_None && obj1 != _global_py_pool) { SWIG_Python_TypeError(SWIG_TypePrettyName(SWIGTYPE_p_apr_pool_t), obj1); SWIG_arg_fail(svn_argnum_obj1); SWIG_fail; } } { svn_swig_py_release_py_lock(); result = (char *)svn_repos_post_unlock_hook(arg1,arg2); svn_swig_py_acquire_py_lock(); } resultobj = SWIG_FromCharPtr((const char *)result); { Py_XDECREF(_global_py_pool); } return resultobj; fail: { Py_XDECREF(_global_py_pool); } return NULL; } SWIGINTERN PyObject *_wrap_svn_repos_begin_report2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; void **arg1 = (void **) 0 ; svn_revnum_t arg2 ; svn_repos_t *arg3 = (svn_repos_t *) 0 ; char *arg4 = (char *) 0 ; char *arg5 = (char *) 0 ; char *arg6 = (char *) 0 ; svn_boolean_t arg7 ; svn_depth_t arg8 ; svn_boolean_t arg9 ; svn_boolean_t arg10 ; svn_delta_editor_t *arg11 = (svn_delta_editor_t *) 0 ; void *arg12 = (void *) 0 ; svn_repos_authz_func_t arg13 = (svn_repos_authz_func_t) 0 ; void *arg14 = (void *) 0 ; apr_pool_t *arg15 = (apr_pool_t *) 0 ; apr_pool_t *_global_pool = NULL ; PyObject *_global_py_pool = NULL ; void *temp1 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj5 = 0 ; PyObject * obj6 = 0 ; PyObject * obj7 = 0 ; PyObject * obj8 = 0 ; PyObject * obj9 = 0 ; PyObject * obj10 = 0 ; PyObject * obj11 = 0 ; PyObject * obj12 = 0 ; svn_error_t *result = 0 ; if (svn_swig_py_get_pool_arg(args, SWIGTYPE_p_apr_pool_t, &_global_py_pool, &_global_pool)) SWIG_fail; arg15 = _global_pool; arg1 = &temp1; if (!PyArg_ParseTuple(args,(char *)"OOsszOOOOOOO|O:svn_repos_begin_report2",&obj0,&obj1,&arg4,&arg5,&arg6,&obj5,&obj6,&obj7,&obj8,&obj9,&obj10,&obj11,&obj12)) SWIG_fail; { arg2 = (svn_revnum_t)SWIG_As_long (obj0); if (SWIG_arg_fail(svn_argnum_obj0)) { SWIG_fail; } } { arg3 = (svn_repos_t *)svn_swig_MustGetPtr(obj1, SWIGTYPE_p_svn_repos_t, svn_argnum_obj1); if (PyErr_Occurred()) { SWIG_fail; } } { arg7 = (svn_boolean_t)SWIG_As_long (obj5); if (SWIG_arg_fail(svn_argnum_obj5)) { SWIG_fail; } } { arg8 = (svn_depth_t)SWIG_As_long (obj6); if (SWIG_arg_fail(svn_argnum_obj6)) { SWIG_fail; } } { arg9 = (svn_boolean_t)SWIG_As_long (obj7); if (SWIG_arg_fail(svn_argnum_obj7)) { SWIG_fail; } } { arg10 = (svn_boolean_t)SWIG_As_long (obj8); if (SWIG_arg_fail(svn_argnum_obj8)) { SWIG_fail; } } { arg11 = (svn_delta_editor_t *)svn_swig_MustGetPtr(obj9, SWIGTYPE_p_svn_delta_editor_t, svn_argnum_obj9); if (PyErr_Occurred()) { SWIG_fail; } } { if (obj10 == Py_None) { arg12 = NULL; } else if (SWIG_ConvertPtr(obj10, (void **) &arg12, 0, 0) == -1) { arg12 = (void *) obj10; PyErr_Clear(); } } { /* FIXME: Handle the NULL case. */ arg13 = svn_swig_py_repos_authz_func; arg14 = obj11; } if (obj12) { /* Verify that the user supplied a valid pool */ if (obj12 != Py_None && obj12 != _global_py_pool) { SWIG_Python_TypeError(SWIG_TypePrettyName(SWIGTYPE_p_apr_pool_t), obj12); SWIG_arg_fail(svn_argnum_obj12); SWIG_fail; } } { svn_swig_py_release_py_lock(); result = (svn_error_t *)svn_repos_begin_report2(arg1,arg2,arg3,(char const *)arg4,(char const *)arg5,(char const *)arg6,arg7,arg8,arg9,arg10,(struct svn_delta_editor_t const *)arg11,arg12,arg13,arg14,arg15); svn_swig_py_acquire_py_lock(); } { if (result != NULL) { if (result->apr_err != SVN_ERR_SWIG_PY_EXCEPTION_SET) svn_swig_py_svn_exception(result); else svn_error_clear(result); SWIG_fail; } Py_INCREF(Py_None); resultobj = Py_None; } { resultobj = SWIG_Python_AppendOutput(resultobj, svn_swig_NewPointerObj(*arg1, SWIGTYPE_p_void, _global_py_pool, args)) ; } { Py_XDECREF(_global_py_pool); } return resultobj; fail: { Py_XDECREF(_global_py_pool); } return NULL; } SWIGINTERN PyObject *_wrap_svn_repos_begin_report(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; void **arg1 = (void **) 0 ; svn_revnum_t arg2 ; char *arg3 = (char *) 0 ; svn_repos_t *arg4 = (svn_repos_t *) 0 ; char *arg5 = (char *) 0 ; char *arg6 = (char *) 0 ; char *arg7 = (char *) 0 ; svn_boolean_t arg8 ; svn_boolean_t arg9 ; svn_boolean_t arg10 ; svn_delta_editor_t *arg11 = (svn_delta_editor_t *) 0 ; void *arg12 = (void *) 0 ; svn_repos_authz_func_t arg13 = (svn_repos_authz_func_t) 0 ; void *arg14 = (void *) 0 ; apr_pool_t *arg15 = (apr_pool_t *) 0 ; apr_pool_t *_global_pool = NULL ; PyObject *_global_py_pool = NULL ; void *temp1 ; PyObject * obj0 = 0 ; PyObject * obj2 = 0 ; PyObject * obj6 = 0 ; PyObject * obj7 = 0 ; PyObject * obj8 = 0 ; PyObject * obj9 = 0 ; PyObject * obj10 = 0 ; PyObject * obj11 = 0 ; PyObject * obj12 = 0 ; svn_error_t *result = 0 ; if (svn_swig_py_get_pool_arg(args, SWIGTYPE_p_apr_pool_t, &_global_py_pool, &_global_pool)) SWIG_fail; arg15 = _global_pool; arg1 = &temp1; if (!PyArg_ParseTuple(args,(char *)"OsOsszOOOOOO|O:svn_repos_begin_report",&obj0,&arg3,&obj2,&arg5,&arg6,&arg7,&obj6,&obj7,&obj8,&obj9,&obj10,&obj11,&obj12)) SWIG_fail; { arg2 = (svn_revnum_t)SWIG_As_long (obj0); if (SWIG_arg_fail(svn_argnum_obj0)) { SWIG_fail; } } { arg4 = (svn_repos_t *)svn_swig_MustGetPtr(obj2, SWIGTYPE_p_svn_repos_t, svn_argnum_obj2); if (PyErr_Occurred()) { SWIG_fail; } } { arg8 = (svn_boolean_t)SWIG_As_long (obj6); if (SWIG_arg_fail(svn_argnum_obj6)) { SWIG_fail; } } { arg9 = (svn_boolean_t)SWIG_As_long (obj7); if (SWIG_arg_fail(svn_argnum_obj7)) { SWIG_fail; } } { arg10 = (svn_boolean_t)SWIG_As_long (obj8); if (SWIG_arg_fail(svn_argnum_obj8)) { SWIG_fail; } } { arg11 = (svn_delta_editor_t *)svn_swig_MustGetPtr(obj9, SWIGTYPE_p_svn_delta_editor_t, svn_argnum_obj9); if (PyErr_Occurred()) { SWIG_fail; } } { if (obj10 == Py_None) { arg12 = NULL; } else if (SWIG_ConvertPtr(obj10, (void **) &arg12, 0, 0) == -1) { arg12 = (void *) obj10; PyErr_Clear(); } } { /* FIXME: Handle the NULL case. */ arg13 = svn_swig_py_repos_authz_func; arg14 = obj11; } if (obj12) { /* Verify that the user supplied a valid pool */ if (obj12 != Py_None && obj12 != _global_py_pool) { SWIG_Python_TypeError(SWIG_TypePrettyName(SWIGTYPE_p_apr_pool_t), obj12); SWIG_arg_fail(svn_argnum_obj12); SWIG_fail; } } { svn_swig_py_release_py_lock(); result = (svn_error_t *)svn_repos_begin_report(arg1,arg2,(char const *)arg3,arg4,(char const *)arg5,(char const *)arg6,(char const *)arg7,arg8,arg9,arg10,(struct svn_delta_editor_t const *)arg11,arg12,arg13,arg14,arg15); svn_swig_py_acquire_py_lock(); } { if (result != NULL) { if (result->apr_err != SVN_ERR_SWIG_PY_EXCEPTION_SET) svn_swig_py_svn_exception(result); else svn_error_clear(result); SWIG_fail; } Py_INCREF(Py_None); resultobj = Py_None; } { resultobj = SWIG_Python_AppendOutput(resultobj, svn_swig_NewPointerObj(*arg1, SWIGTYPE_p_void, _global_py_pool, args)) ; } { Py_XDECREF(_global_py_pool); } return resultobj; fail: { Py_XDECREF(_global_py_pool); } return NULL; } SWIGINTERN PyObject *_wrap_svn_repos_set_path3(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; void *arg1 = (void *) 0 ; char *arg2 = (char *) 0 ; svn_revnum_t arg3 ; svn_depth_t arg4 ; svn_boolean_t arg5 ; char *arg6 = (char *) 0 ; apr_pool_t *arg7 = (apr_pool_t *) 0 ; apr_pool_t *_global_pool = NULL ; PyObject *_global_py_pool = NULL ; PyObject * obj0 = 0 ; PyObject * obj2 = 0 ; PyObject * obj3 = 0 ; PyObject * obj4 = 0 ; PyObject * obj6 = 0 ; svn_error_t *result = 0 ; if (svn_swig_py_get_pool_arg(args, SWIGTYPE_p_apr_pool_t, &_global_py_pool, &_global_pool)) SWIG_fail; arg7 = _global_pool; if (!PyArg_ParseTuple(args,(char *)"OsOOOz|O:svn_repos_set_path3",&obj0,&arg2,&obj2,&obj3,&obj4,&arg6,&obj6)) SWIG_fail; { if (obj0 == Py_None) { arg1 = NULL; } else if (SWIG_ConvertPtr(obj0, (void **) &arg1, 0, 0) == -1) { arg1 = (void *) obj0; PyErr_Clear(); } } { arg3 = (svn_revnum_t)SWIG_As_long (obj2); if (SWIG_arg_fail(svn_argnum_obj2)) { SWIG_fail; } } { arg4 = (svn_depth_t)SWIG_As_long (obj3); if (SWIG_arg_fail(svn_argnum_obj3)) { SWIG_fail; } } { arg5 = (svn_boolean_t)SWIG_As_long (obj4); if (SWIG_arg_fail(svn_argnum_obj4)) { SWIG_fail; } } if (obj6) { /* Verify that the user supplied a valid pool */ if (obj6 != Py_None && obj6 != _global_py_pool) { SWIG_Python_TypeError(SWIG_TypePrettyName(SWIGTYPE_p_apr_pool_t), obj6); SWIG_arg_fail(svn_argnum_obj6); SWIG_fail; } } { svn_swig_py_release_py_lock(); result = (svn_error_t *)svn_repos_set_path3(arg1,(char const *)arg2,arg3,arg4,arg5,(char const *)arg6,arg7); svn_swig_py_acquire_py_lock(); } { if (result != NULL) { if (result->apr_err != SVN_ERR_SWIG_PY_EXCEPTION_SET) svn_swig_py_svn_exception(result); else svn_error_clear(result); SWIG_fail; } Py_INCREF(Py_None); resultobj = Py_None; } { Py_XDECREF(_global_py_pool); } return resultobj; fail: { Py_XDECREF(_global_py_pool); } return NULL; } SWIGINTERN PyObject *_wrap_svn_repos_set_path2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; void *arg1 = (void *) 0 ; char *arg2 = (char *) 0 ; svn_revnum_t arg3 ; svn_boolean_t arg4 ; char *arg5 = (char *) 0 ; apr_pool_t *arg6 = (apr_pool_t *) 0 ; apr_pool_t *_global_pool = NULL ; PyObject *_global_py_pool = NULL ; PyObject * obj0 = 0 ; PyObject * obj2 = 0 ; PyObject * obj3 = 0 ; PyObject * obj5 = 0 ; svn_error_t *result = 0 ; if (svn_swig_py_get_pool_arg(args, SWIGTYPE_p_apr_pool_t, &_global_py_pool, &_global_pool)) SWIG_fail; arg6 = _global_pool; if (!PyArg_ParseTuple(args,(char *)"OsOOz|O:svn_repos_set_path2",&obj0,&arg2,&obj2,&obj3,&arg5,&obj5)) SWIG_fail; { if (obj0 == Py_None) { arg1 = NULL; } else if (SWIG_ConvertPtr(obj0, (void **) &arg1, 0, 0) == -1) { arg1 = (void *) obj0; PyErr_Clear(); } } { arg3 = (svn_revnum_t)SWIG_As_long (obj2); if (SWIG_arg_fail(svn_argnum_obj2)) { SWIG_fail; } } { arg4 = (svn_boolean_t)SWIG_As_long (obj3); if (SWIG_arg_fail(svn_argnum_obj3)) { SWIG_fail; } } if (obj5) { /* Verify that the user supplied a valid pool */ if (obj5 != Py_None && obj5 != _global_py_pool) { SWIG_Python_TypeError(SWIG_TypePrettyName(SWIGTYPE_p_apr_pool_t), obj5); SWIG_arg_fail(svn_argnum_obj5); SWIG_fail; } } { svn_swig_py_release_py_lock(); result = (svn_error_t *)svn_repos_set_path2(arg1,(char const *)arg2,arg3,arg4,(char const *)arg5,arg6); svn_swig_py_acquire_py_lock(); } { if (result != NULL) { if (result->apr_err != SVN_ERR_SWIG_PY_EXCEPTION_SET) svn_swig_py_svn_exception(result); else svn_error_clear(result); SWIG_fail; } Py_INCREF(Py_None); resultobj = Py_None; } { Py_XDECREF(_global_py_pool); } return resultobj; fail: { Py_XDECREF(_global_py_pool); } return NULL; } SWIGINTERN PyObject *_wrap_svn_repos_set_path(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; void *arg1 = (void *) 0 ; char *arg2 = (char *) 0 ; svn_revnum_t arg3 ; svn_boolean_t arg4 ; apr_pool_t *arg5 = (apr_pool_t *) 0 ; apr_pool_t *_global_pool = NULL ; PyObject *_global_py_pool = NULL ; PyObject * obj0 = 0 ; PyObject * obj2 = 0 ; PyObject * obj3 = 0 ; PyObject * obj4 = 0 ; svn_error_t *result = 0 ; if (svn_swig_py_get_pool_arg(args, SWIGTYPE_p_apr_pool_t, &_global_py_pool, &_global_pool)) SWIG_fail; arg5 = _global_pool; if (!PyArg_ParseTuple(args,(char *)"OsOO|O:svn_repos_set_path",&obj0,&arg2,&obj2,&obj3,&obj4)) SWIG_fail; { if (obj0 == Py_None) { arg1 = NULL; } else if (SWIG_ConvertPtr(obj0, (void **) &arg1, 0, 0) == -1) { arg1 = (void *) obj0; PyErr_Clear(); } } { arg3 = (svn_revnum_t)SWIG_As_long (obj2); if (SWIG_arg_fail(svn_argnum_obj2)) { SWIG_fail; } } { arg4 = (svn_boolean_t)SWIG_As_long (obj3); if (SWIG_arg_fail(svn_argnum_obj3)) { SWIG_fail; } } if (obj4) { /* Verify that the user supplied a valid pool */ if (obj4 != Py_None && obj4 != _global_py_pool) { SWIG_Python_TypeError(SWIG_TypePrettyName(SWIGTYPE_p_apr_pool_t), obj4); SWIG_arg_fail(svn_argnum_obj4); SWIG_fail; } } { svn_swig_py_release_py_lock(); result = (svn_error_t *)svn_repos_set_path(arg1,(char const *)arg2,arg3,arg4,arg5); svn_swig_py_acquire_py_lock(); } { if (result != NULL) { if (result->apr_err != SVN_ERR_SWIG_PY_EXCEPTION_SET) svn_swig_py_svn_exception(result); else svn_error_clear(result); SWIG_fail; } Py_INCREF(Py_None); resultobj = Py_None; } { Py_XDECREF(_global_py_pool); } return resultobj; fail: { Py_XDECREF(_global_py_pool); } return NULL; } SWIGINTERN PyObject *_wrap_svn_repos_link_path3(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; void *arg1 = (void *) 0 ; char *arg2 = (char *) 0 ; char *arg3 = (char *) 0 ; svn_revnum_t arg4 ; svn_depth_t arg5 ; svn_boolean_t arg6 ; char *arg7 = (char *) 0 ; apr_pool_t *arg8 = (apr_pool_t *) 0 ; apr_pool_t *_global_pool = NULL ; PyObject *_global_py_pool = NULL ; PyObject * obj0 = 0 ; PyObject * obj3 = 0 ; PyObject * obj4 = 0 ; PyObject * obj5 = 0 ; PyObject * obj7 = 0 ; svn_error_t *result = 0 ; if (svn_swig_py_get_pool_arg(args, SWIGTYPE_p_apr_pool_t, &_global_py_pool, &_global_pool)) SWIG_fail; arg8 = _global_pool; if (!PyArg_ParseTuple(args,(char *)"OssOOOz|O:svn_repos_link_path3",&obj0,&arg2,&arg3,&obj3,&obj4,&obj5,&arg7,&obj7)) SWIG_fail; { if (obj0 == Py_None) { arg1 = NULL; } else if (SWIG_ConvertPtr(obj0, (void **) &arg1, 0, 0) == -1) { arg1 = (void *) obj0; PyErr_Clear(); } } { arg4 = (svn_revnum_t)SWIG_As_long (obj3); if (SWIG_arg_fail(svn_argnum_obj3)) { SWIG_fail; } } { arg5 = (svn_depth_t)SWIG_As_long (obj4); if (SWIG_arg_fail(svn_argnum_obj4)) { SWIG_fail; } } { arg6 = (svn_boolean_t)SWIG_As_long (obj5); if (SWIG_arg_fail(svn_argnum_obj5)) { SWIG_fail; } } if (obj7) { /* Verify that the user supplied a valid pool */ if (obj7 != Py_None && obj7 != _global_py_pool) { SWIG_Python_TypeError(SWIG_TypePrettyName(SWIGTYPE_p_apr_pool_t), obj7); SWIG_arg_fail(svn_argnum_obj7); SWIG_fail; } } { svn_swig_py_release_py_lock(); result = (svn_error_t *)svn_repos_link_path3(arg1,(char const *)arg2,(char const *)arg3,arg4,arg5,arg6,(char const *)arg7,arg8); svn_swig_py_acquire_py_lock(); } { if (result != NULL) { if (result->apr_err != SVN_ERR_SWIG_PY_EXCEPTION_SET) svn_swig_py_svn_exception(result); else svn_error_clear(result); SWIG_fail; } Py_INCREF(Py_None); resultobj = Py_None; } { Py_XDECREF(_global_py_pool); } return resultobj; fail: { Py_XDECREF(_global_py_pool); } return NULL; } SWIGINTERN PyObject *_wrap_svn_repos_link_path2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; void *arg1 = (void *) 0 ; char *arg2 = (char *) 0 ; char *arg3 = (char *) 0 ; svn_revnum_t arg4 ; svn_boolean_t arg5 ; char *arg6 = (char *) 0 ; apr_pool_t *arg7 = (apr_pool_t *) 0 ; apr_pool_t *_global_pool = NULL ; PyObject *_global_py_pool = NULL ; PyObject * obj0 = 0 ; PyObject * obj3 = 0 ; PyObject * obj4 = 0 ; PyObject * obj6 = 0 ; svn_error_t *result = 0 ; if (svn_swig_py_get_pool_arg(args, SWIGTYPE_p_apr_pool_t, &_global_py_pool, &_global_pool)) SWIG_fail; arg7 = _global_pool; if (!PyArg_ParseTuple(args,(char *)"OssOOz|O:svn_repos_link_path2",&obj0,&arg2,&arg3,&obj3,&obj4,&arg6,&obj6)) SWIG_fail; { if (obj0 == Py_None) { arg1 = NULL; } else if (SWIG_ConvertPtr(obj0, (void **) &arg1, 0, 0) == -1) { arg1 = (void *) obj0; PyErr_Clear(); } } { arg4 = (svn_revnum_t)SWIG_As_long (obj3); if (SWIG_arg_fail(svn_argnum_obj3)) { SWIG_fail; } } { arg5 = (svn_boolean_t)SWIG_As_long (obj4); if (SWIG_arg_fail(svn_argnum_obj4)) { SWIG_fail; } } if (obj6) { /* Verify that the user supplied a valid pool */ if (obj6 != Py_None && obj6 != _global_py_pool) { SWIG_Python_TypeError(SWIG_TypePrettyName(SWIGTYPE_p_apr_pool_t), obj6); SWIG_arg_fail(svn_argnum_obj6); SWIG_fail; } } { svn_swig_py_release_py_lock(); result = (svn_error_t *)svn_repos_link_path2(arg1,(char const *)arg2,(char const *)arg3,arg4,arg5,(char const *)arg6,arg7); svn_swig_py_acquire_py_lock(); } { if (result != NULL) { if (result->apr_err != SVN_ERR_SWIG_PY_EXCEPTION_SET) svn_swig_py_svn_exception(result); else svn_error_clear(result); SWIG_fail; } Py_INCREF(Py_None); resultobj = Py_None; } { Py_XDECREF(_global_py_pool); } return resultobj; fail: { Py_XDECREF(_global_py_pool); } return NULL; } SWIGINTERN PyObject *_wrap_svn_repos_link_path(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; void *arg1 = (void *) 0 ; char *arg2 = (char *) 0 ; char *arg3 = (char *) 0 ; svn_revnum_t arg4 ; svn_boolean_t arg5 ; apr_pool_t *arg6 = (apr_pool_t *) 0 ; apr_pool_t *_global_pool = NULL ; PyObject *_global_py_pool = NULL ; PyObject * obj0 = 0 ; PyObject * obj3 = 0 ; PyObject * obj4 = 0 ; PyObject * obj5 = 0 ; svn_error_t *result = 0 ; if (svn_swig_py_get_pool_arg(args, SWIGTYPE_p_apr_pool_t, &_global_py_pool, &_global_pool)) SWIG_fail; arg6 = _global_pool; if (!PyArg_ParseTuple(args,(char *)"OssOO|O:svn_repos_link_path",&obj0,&arg2,&arg3,&obj3,&obj4,&obj5)) SWIG_fail; { if (obj0 == Py_None) { arg1 = NULL; } else if (SWIG_ConvertPtr(obj0, (void **) &arg1, 0, 0) == -1) { arg1 = (void *) obj0; PyErr_Clear(); } } { arg4 = (svn_revnum_t)SWIG_As_long (obj3); if (SWIG_arg_fail(svn_argnum_obj3)) { SWIG_fail; } } { arg5 = (svn_boolean_t)SWIG_As_long (obj4); if (SWIG_arg_fail(svn_argnum_obj4)) { SWIG_fail; } } if (obj5) { /* Verify that the user supplied a valid pool */ if (obj5 != Py_None && obj5 != _global_py_pool) { SWIG_Python_TypeError(SWIG_TypePrettyName(SWIGTYPE_p_apr_pool_t), obj5); SWIG_arg_fail(svn_argnum_obj5); SWIG_fail; } } { svn_swig_py_release_py_lock(); result = (svn_error_t *)svn_repos_link_path(arg1,(char const *)arg2,(char const *)arg3,arg4,arg5,arg6); svn_swig_py_acquire_py_lock(); } { if (result != NULL) { if (result->apr_err != SVN_ERR_SWIG_PY_EXCEPTION_SET) svn_swig_py_svn_exception(result); else svn_error_clear(result); SWIG_fail; } Py_INCREF(Py_None); resultobj = Py_None; } { Py_XDECREF(_global_py_pool); } return resultobj; fail: { Py_XDECREF(_global_py_pool); } return NULL; } SWIGINTERN PyObject *_wrap_svn_repos_delete_path(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; void *arg1 = (void *) 0 ; char *arg2 = (char *) 0 ; apr_pool_t *arg3 = (apr_pool_t *) 0 ; apr_pool_t *_global_pool = NULL ; PyObject *_global_py_pool = NULL ; PyObject * obj0 = 0 ; PyObject * obj2 = 0 ; svn_error_t *result = 0 ; if (svn_swig_py_get_pool_arg(args, SWIGTYPE_p_apr_pool_t, &_global_py_pool, &_global_pool)) SWIG_fail; arg3 = _global_pool; if (!PyArg_ParseTuple(args,(char *)"Os|O:svn_repos_delete_path",&obj0,&arg2,&obj2)) SWIG_fail; { if (obj0 == Py_None) { arg1 = NULL; } else if (SWIG_ConvertPtr(obj0, (void **) &arg1, 0, 0) == -1) { arg1 = (void *) obj0; PyErr_Clear(); } } if (obj2) { /* Verify that the user supplied a valid pool */ if (obj2 != Py_None && obj2 != _global_py_pool) { SWIG_Python_TypeError(SWIG_TypePrettyName(SWIGTYPE_p_apr_pool_t), obj2); SWIG_arg_fail(svn_argnum_obj2); SWIG_fail; } } { svn_swig_py_release_py_lock(); result = (svn_error_t *)svn_repos_delete_path(arg1,(char const *)arg2,arg3); svn_swig_py_acquire_py_lock(); } { if (result != NULL) { if (result->apr_err != SVN_ERR_SWIG_PY_EXCEPTION_SET) svn_swig_py_svn_exception(result); else svn_error_clear(result); SWIG_fail; } Py_INCREF(Py_None); resultobj = Py_None; } { Py_XDECREF(_global_py_pool); } return resultobj; fail: { Py_XDECREF(_global_py_pool); } return NULL; } SWIGINTERN PyObject *_wrap_svn_repos_finish_report(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; void *arg1 = (void *) 0 ; apr_pool_t *arg2 = (apr_pool_t *) 0 ; apr_pool_t *_global_pool = NULL ; PyObject *_global_py_pool = NULL ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; svn_error_t *result = 0 ; if (svn_swig_py_get_pool_arg(args, SWIGTYPE_p_apr_pool_t, &_global_py_pool, &_global_pool)) SWIG_fail; arg2 = _global_pool; if (!PyArg_ParseTuple(args,(char *)"O|O:svn_repos_finish_report",&obj0,&obj1)) SWIG_fail; { if (obj0 == Py_None) { arg1 = NULL; } else if (SWIG_ConvertPtr(obj0, (void **) &arg1, 0, 0) == -1) { arg1 = (void *) obj0; PyErr_Clear(); } } if (obj1) { /* Verify that the user supplied a valid pool */ if (obj1 != Py_None && obj1 != _global_py_pool) { SWIG_Python_TypeError(SWIG_TypePrettyName(SWIGTYPE_p_apr_pool_t), obj1); SWIG_arg_fail(svn_argnum_obj1); SWIG_fail; } } { svn_swig_py_release_py_lock(); result = (svn_error_t *)svn_repos_finish_report(arg1,arg2); svn_swig_py_acquire_py_lock(); } { if (result != NULL) { if (result->apr_err != SVN_ERR_SWIG_PY_EXCEPTION_SET) svn_swig_py_svn_exception(result); else svn_error_clear(result); SWIG_fail; } Py_INCREF(Py_None); resultobj = Py_None; } { Py_XDECREF(_global_py_pool); } return resultobj; fail: { Py_XDECREF(_global_py_pool); } return NULL; } SWIGINTERN PyObject *_wrap_svn_repos_abort_report(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; void *arg1 = (void *) 0 ; apr_pool_t *arg2 = (apr_pool_t *) 0 ; apr_pool_t *_global_pool = NULL ; PyObject *_global_py_pool = NULL ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; svn_error_t *result = 0 ; if (svn_swig_py_get_pool_arg(args, SWIGTYPE_p_apr_pool_t, &_global_py_pool, &_global_pool)) SWIG_fail; arg2 = _global_pool; if (!PyArg_ParseTuple(args,(char *)"O|O:svn_repos_abort_report",&obj0,&obj1)) SWIG_fail; { if (obj0 == Py_None) { arg1 = NULL; } else if (SWIG_ConvertPtr(obj0, (void **) &arg1, 0, 0) == -1) { arg1 = (void *) obj0; PyErr_Clear(); } } if (obj1) { /* Verify that the user supplied a valid pool */ if (obj1 != Py_None && obj1 != _global_py_pool) { SWIG_Python_TypeError(SWIG_TypePrettyName(SWIGTYPE_p_apr_pool_t), obj1); SWIG_arg_fail(svn_argnum_obj1); SWIG_fail; } } { svn_swig_py_release_py_lock(); result = (svn_error_t *)svn_repos_abort_report(arg1,arg2); svn_swig_py_acquire_py_lock(); } { if (result != NULL) { if (result->apr_err != SVN_ERR_SWIG_PY_EXCEPTION_SET) svn_swig_py_svn_exception(result); else svn_error_clear(result); SWIG_fail; } Py_INCREF(Py_None); resultobj = Py_None; } { Py_XDECREF(_global_py_pool); } return resultobj; fail: { Py_XDECREF(_global_py_pool); } return NULL; } SWIGINTERN PyObject *_wrap_svn_repos_dir_delta2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; svn_fs_root_t *arg1 = (svn_fs_root_t *) 0 ; char *arg2 = (char *) 0 ; char *arg3 = (char *) 0 ; svn_fs_root_t *arg4 = (svn_fs_root_t *) 0 ; char *arg5 = (char *) 0 ; svn_delta_editor_t *arg6 = (svn_delta_editor_t *) 0 ; void *arg7 = (void *) 0 ; svn_repos_authz_func_t arg8 = (svn_repos_authz_func_t) 0 ; void *arg9 = (void *) 0 ; svn_boolean_t arg10 ; svn_depth_t arg11 ; svn_boolean_t arg12 ; svn_boolean_t arg13 ; apr_pool_t *arg14 = (apr_pool_t *) 0 ; apr_pool_t *_global_pool = NULL ; PyObject *_global_py_pool = NULL ; PyObject * obj0 = 0 ; PyObject * obj3 = 0 ; PyObject * obj5 = 0 ; PyObject * obj6 = 0 ; PyObject * obj7 = 0 ; PyObject * obj8 = 0 ; PyObject * obj9 = 0 ; PyObject * obj10 = 0 ; PyObject * obj11 = 0 ; PyObject * obj12 = 0 ; svn_error_t *result = 0 ; if (svn_swig_py_get_pool_arg(args, SWIGTYPE_p_apr_pool_t, &_global_py_pool, &_global_pool)) SWIG_fail; arg14 = _global_pool; if (!PyArg_ParseTuple(args,(char *)"OszOzOOOOOOO|O:svn_repos_dir_delta2",&obj0,&arg2,&arg3,&obj3,&arg5,&obj5,&obj6,&obj7,&obj8,&obj9,&obj10,&obj11,&obj12)) SWIG_fail; { arg1 = (svn_fs_root_t *)svn_swig_MustGetPtr(obj0, SWIGTYPE_p_svn_fs_root_t, svn_argnum_obj0); if (PyErr_Occurred()) { SWIG_fail; } } { arg4 = (svn_fs_root_t *)svn_swig_MustGetPtr(obj3, SWIGTYPE_p_svn_fs_root_t, svn_argnum_obj3); if (PyErr_Occurred()) { SWIG_fail; } } { arg6 = (svn_delta_editor_t *)svn_swig_MustGetPtr(obj5, SWIGTYPE_p_svn_delta_editor_t, svn_argnum_obj5); if (PyErr_Occurred()) { SWIG_fail; } } { if (obj6 == Py_None) { arg7 = NULL; } else if (SWIG_ConvertPtr(obj6, (void **) &arg7, 0, 0) == -1) { arg7 = (void *) obj6; PyErr_Clear(); } } { /* FIXME: Handle the NULL case. */ arg8 = svn_swig_py_repos_authz_func; arg9 = obj7; } { arg10 = (svn_boolean_t)SWIG_As_long (obj8); if (SWIG_arg_fail(svn_argnum_obj8)) { SWIG_fail; } } { arg11 = (svn_depth_t)SWIG_As_long (obj9); if (SWIG_arg_fail(svn_argnum_obj9)) { SWIG_fail; } } { arg12 = (svn_boolean_t)SWIG_As_long (obj10); if (SWIG_arg_fail(svn_argnum_obj10)) { SWIG_fail; } } { arg13 = (svn_boolean_t)SWIG_As_long (obj11); if (SWIG_arg_fail(svn_argnum_obj11)) { SWIG_fail; } } if (obj12) { /* Verify that the user supplied a valid pool */ if (obj12 != Py_None && obj12 != _global_py_pool) { SWIG_Python_TypeError(SWIG_TypePrettyName(SWIGTYPE_p_apr_pool_t), obj12); SWIG_arg_fail(svn_argnum_obj12); SWIG_fail; } } { svn_swig_py_release_py_lock(); result = (svn_error_t *)svn_repos_dir_delta2(arg1,(char const *)arg2,(char const *)arg3,arg4,(char const *)arg5,(struct svn_delta_editor_t const *)arg6,arg7,arg8,arg9,arg10,arg11,arg12,arg13,arg14); svn_swig_py_acquire_py_lock(); } { if (result != NULL) { if (result->apr_err != SVN_ERR_SWIG_PY_EXCEPTION_SET) svn_swig_py_svn_exception(result); else svn_error_clear(result); SWIG_fail; } Py_INCREF(Py_None); resultobj = Py_None; } { Py_XDECREF(_global_py_pool); } return resultobj; fail: { Py_XDECREF(_global_py_pool); } return NULL; } SWIGINTERN PyObject *_wrap_svn_repos_dir_delta(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; svn_fs_root_t *arg1 = (svn_fs_root_t *) 0 ; char *arg2 = (char *) 0 ; char *arg3 = (char *) 0 ; svn_fs_root_t *arg4 = (svn_fs_root_t *) 0 ; char *arg5 = (char *) 0 ; svn_delta_editor_t *arg6 = (svn_delta_editor_t *) 0 ; void *arg7 = (void *) 0 ; svn_repos_authz_func_t arg8 = (svn_repos_authz_func_t) 0 ; void *arg9 = (void *) 0 ; svn_boolean_t arg10 ; svn_boolean_t arg11 ; svn_boolean_t arg12 ; svn_boolean_t arg13 ; apr_pool_t *arg14 = (apr_pool_t *) 0 ; apr_pool_t *_global_pool = NULL ; PyObject *_global_py_pool = NULL ; PyObject * obj0 = 0 ; PyObject * obj3 = 0 ; PyObject * obj5 = 0 ; PyObject * obj6 = 0 ; PyObject * obj7 = 0 ; PyObject * obj8 = 0 ; PyObject * obj9 = 0 ; PyObject * obj10 = 0 ; PyObject * obj11 = 0 ; PyObject * obj12 = 0 ; svn_error_t *result = 0 ; if (svn_swig_py_get_pool_arg(args, SWIGTYPE_p_apr_pool_t, &_global_py_pool, &_global_pool)) SWIG_fail; arg14 = _global_pool; if (!PyArg_ParseTuple(args,(char *)"OszOzOOOOOOO|O:svn_repos_dir_delta",&obj0,&arg2,&arg3,&obj3,&arg5,&obj5,&obj6,&obj7,&obj8,&obj9,&obj10,&obj11,&obj12)) SWIG_fail; { arg1 = (svn_fs_root_t *)svn_swig_MustGetPtr(obj0, SWIGTYPE_p_svn_fs_root_t, svn_argnum_obj0); if (PyErr_Occurred()) { SWIG_fail; } } { arg4 = (svn_fs_root_t *)svn_swig_MustGetPtr(obj3, SWIGTYPE_p_svn_fs_root_t, svn_argnum_obj3); if (PyErr_Occurred()) { SWIG_fail; } } { arg6 = (svn_delta_editor_t *)svn_swig_MustGetPtr(obj5, SWIGTYPE_p_svn_delta_editor_t, svn_argnum_obj5); if (PyErr_Occurred()) { SWIG_fail; } } { if (obj6 == Py_None) { arg7 = NULL; } else if (SWIG_ConvertPtr(obj6, (void **) &arg7, 0, 0) == -1) { arg7 = (void *) obj6; PyErr_Clear(); } } { /* FIXME: Handle the NULL case. */ arg8 = svn_swig_py_repos_authz_func; arg9 = obj7; } { arg10 = (svn_boolean_t)SWIG_As_long (obj8); if (SWIG_arg_fail(svn_argnum_obj8)) { SWIG_fail; } } { arg11 = (svn_boolean_t)SWIG_As_long (obj9); if (SWIG_arg_fail(svn_argnum_obj9)) { SWIG_fail; } } { arg12 = (svn_boolean_t)SWIG_As_long (obj10); if (SWIG_arg_fail(svn_argnum_obj10)) { SWIG_fail; } } { arg13 = (svn_boolean_t)SWIG_As_long (obj11); if (SWIG_arg_fail(svn_argnum_obj11)) { SWIG_fail; } } if (obj12) { /* Verify that the user supplied a valid pool */ if (obj12 != Py_None && obj12 != _global_py_pool) { SWIG_Python_TypeError(SWIG_TypePrettyName(SWIGTYPE_p_apr_pool_t), obj12); SWIG_arg_fail(svn_argnum_obj12); SWIG_fail; } } { svn_swig_py_release_py_lock(); result = (svn_error_t *)svn_repos_dir_delta(arg1,(char const *)arg2,(char const *)arg3,arg4,(char const *)arg5,(struct svn_delta_editor_t const *)arg6,arg7,arg8,arg9,arg10,arg11,arg12,arg13,arg14); svn_swig_py_acquire_py_lock(); } { if (result != NULL) { if (result->apr_err != SVN_ERR_SWIG_PY_EXCEPTION_SET) svn_swig_py_svn_exception(result); else svn_error_clear(result); SWIG_fail; } Py_INCREF(Py_None); resultobj = Py_None; } { Py_XDECREF(_global_py_pool); } return resultobj; fail: { Py_XDECREF(_global_py_pool); } return NULL; } SWIGINTERN PyObject *_wrap_svn_repos_replay2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; svn_fs_root_t *arg1 = (svn_fs_root_t *) 0 ; char *arg2 = (char *) 0 ; svn_revnum_t arg3 ; svn_boolean_t arg4 ; svn_delta_editor_t *arg5 = (svn_delta_editor_t *) 0 ; void *arg6 = (void *) 0 ; svn_repos_authz_func_t arg7 = (svn_repos_authz_func_t) 0 ; void *arg8 = (void *) 0 ; apr_pool_t *arg9 = (apr_pool_t *) 0 ; apr_pool_t *_global_pool = NULL ; PyObject *_global_py_pool = NULL ; PyObject * obj0 = 0 ; PyObject * obj2 = 0 ; PyObject * obj3 = 0 ; PyObject * obj4 = 0 ; PyObject * obj5 = 0 ; PyObject * obj6 = 0 ; PyObject * obj7 = 0 ; svn_error_t *result = 0 ; if (svn_swig_py_get_pool_arg(args, SWIGTYPE_p_apr_pool_t, &_global_py_pool, &_global_pool)) SWIG_fail; arg9 = _global_pool; if (!PyArg_ParseTuple(args,(char *)"OsOOOOO|O:svn_repos_replay2",&obj0,&arg2,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7)) SWIG_fail; { arg1 = (svn_fs_root_t *)svn_swig_MustGetPtr(obj0, SWIGTYPE_p_svn_fs_root_t, svn_argnum_obj0); if (PyErr_Occurred()) { SWIG_fail; } } { arg3 = (svn_revnum_t)SWIG_As_long (obj2); if (SWIG_arg_fail(svn_argnum_obj2)) { SWIG_fail; } } { arg4 = (svn_boolean_t)SWIG_As_long (obj3); if (SWIG_arg_fail(svn_argnum_obj3)) { SWIG_fail; } } { arg5 = (svn_delta_editor_t *)svn_swig_MustGetPtr(obj4, SWIGTYPE_p_svn_delta_editor_t, svn_argnum_obj4); if (PyErr_Occurred()) { SWIG_fail; } } { if (obj5 == Py_None) { arg6 = NULL; } else if (SWIG_ConvertPtr(obj5, (void **) &arg6, 0, 0) == -1) { arg6 = (void *) obj5; PyErr_Clear(); } } { /* FIXME: Handle the NULL case. */ arg7 = svn_swig_py_repos_authz_func; arg8 = obj6; } if (obj7) { /* Verify that the user supplied a valid pool */ if (obj7 != Py_None && obj7 != _global_py_pool) { SWIG_Python_TypeError(SWIG_TypePrettyName(SWIGTYPE_p_apr_pool_t), obj7); SWIG_arg_fail(svn_argnum_obj7); SWIG_fail; } } { svn_swig_py_release_py_lock(); result = (svn_error_t *)svn_repos_replay2(arg1,(char const *)arg2,arg3,arg4,(struct svn_delta_editor_t const *)arg5,arg6,arg7,arg8,arg9); svn_swig_py_acquire_py_lock(); } { if (result != NULL) { if (result->apr_err != SVN_ERR_SWIG_PY_EXCEPTION_SET) svn_swig_py_svn_exception(result); else svn_error_clear(result); SWIG_fail; } Py_INCREF(Py_None); resultobj = Py_None; } { Py_XDECREF(_global_py_pool); } return resultobj; fail: { Py_XDECREF(_global_py_pool); } return NULL; } SWIGINTERN PyObject *_wrap_svn_repos_replay(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; svn_fs_root_t *arg1 = (svn_fs_root_t *) 0 ; svn_delta_editor_t *arg2 = (svn_delta_editor_t *) 0 ; void *arg3 = (void *) 0 ; apr_pool_t *arg4 = (apr_pool_t *) 0 ; apr_pool_t *_global_pool = NULL ; PyObject *_global_py_pool = NULL ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; PyObject * obj3 = 0 ; svn_error_t *result = 0 ; if (svn_swig_py_get_pool_arg(args, SWIGTYPE_p_apr_pool_t, &_global_py_pool, &_global_pool)) SWIG_fail; arg4 = _global_pool; if (!PyArg_ParseTuple(args,(char *)"OOO|O:svn_repos_replay",&obj0,&obj1,&obj2,&obj3)) SWIG_fail; { arg1 = (svn_fs_root_t *)svn_swig_MustGetPtr(obj0, SWIGTYPE_p_svn_fs_root_t, svn_argnum_obj0); if (PyErr_Occurred()) { SWIG_fail; } } { arg2 = (svn_delta_editor_t *)svn_swig_MustGetPtr(obj1, SWIGTYPE_p_svn_delta_editor_t, svn_argnum_obj1); if (PyErr_Occurred()) { SWIG_fail; } } { if (obj2 == Py_None) { arg3 = NULL; } else if (SWIG_ConvertPtr(obj2, (void **) &arg3, 0, 0) == -1) { arg3 = (void *) obj2; PyErr_Clear(); } } if (obj3) { /* Verify that the user supplied a valid pool */ if (obj3 != Py_None && obj3 != _global_py_pool) { SWIG_Python_TypeError(SWIG_TypePrettyName(SWIGTYPE_p_apr_pool_t), obj3); SWIG_arg_fail(svn_argnum_obj3); SWIG_fail; } } { svn_swig_py_release_py_lock(); result = (svn_error_t *)svn_repos_replay(arg1,(struct svn_delta_editor_t const *)arg2,arg3,arg4); svn_swig_py_acquire_py_lock(); } { if (result != NULL) { if (result->apr_err != SVN_ERR_SWIG_PY_EXCEPTION_SET) svn_swig_py_svn_exception(result); else svn_error_clear(result); SWIG_fail; } Py_INCREF(Py_None); resultobj = Py_None; } { Py_XDECREF(_global_py_pool); } return resultobj; fail: { Py_XDECREF(_global_py_pool); } return NULL; } SWIGINTERN PyObject *_wrap_svn_repos_get_commit_editor5(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; svn_delta_editor_t **arg1 = (svn_delta_editor_t **) 0 ; void **arg2 = (void **) 0 ; svn_repos_t *arg3 = (svn_repos_t *) 0 ; svn_fs_txn_t *arg4 = (svn_fs_txn_t *) 0 ; char *arg5 = (char *) 0 ; char *arg6 = (char *) 0 ; apr_hash_t *arg7 = (apr_hash_t *) 0 ; svn_commit_callback2_t arg8 = (svn_commit_callback2_t) 0 ; void *arg9 = (void *) 0 ; svn_repos_authz_callback_t arg10 = (svn_repos_authz_callback_t) 0 ; void *arg11 = (void *) 0 ; apr_pool_t *arg12 = (apr_pool_t *) 0 ; apr_pool_t *_global_pool = NULL ; PyObject *_global_py_pool = NULL ; svn_delta_editor_t *temp1 ; void *temp2 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj4 = 0 ; PyObject * obj5 = 0 ; PyObject * obj6 = 0 ; PyObject * obj7 = 0 ; PyObject * obj8 = 0 ; svn_error_t *result = 0 ; if (svn_swig_py_get_pool_arg(args, SWIGTYPE_p_apr_pool_t, &_global_py_pool, &_global_pool)) SWIG_fail; arg12 = _global_pool; arg1 = &temp1; arg2 = &temp2; if (!PyArg_ParseTuple(args,(char *)"OOssOOOO|O:svn_repos_get_commit_editor5",&obj0,&obj1,&arg5,&arg6,&obj4,&obj5,&obj6,&obj7,&obj8)) SWIG_fail; { arg3 = (svn_repos_t *)svn_swig_MustGetPtr(obj0, SWIGTYPE_p_svn_repos_t, svn_argnum_obj0); if (PyErr_Occurred()) { SWIG_fail; } } { arg4 = (svn_fs_txn_t *)svn_swig_MustGetPtr(obj1, SWIGTYPE_p_svn_fs_txn_t, svn_argnum_obj1); if (PyErr_Occurred()) { SWIG_fail; } } { if (_global_pool == NULL) { if (svn_swig_py_get_parent_pool(args, SWIGTYPE_p_apr_pool_t, &_global_py_pool, &_global_pool)) SWIG_fail; } arg7 = svn_swig_py_prophash_from_dict(obj4, _global_pool); if (PyErr_Occurred()) { SWIG_fail; } } { arg8 = svn_swig_py_commit_callback2; arg9 = (void *)obj5; } { svn_repos_authz_callback_t * tmp = svn_swig_MustGetPtr(obj6, SWIGTYPE_p_p_f_svn_repos_authz_access_t_p_svn_boolean_t_p_svn_fs_root_t_p_q_const__char_p_void_p_apr_pool_t__p_svn_error_t, svn_argnum_obj6); if (tmp == NULL || PyErr_Occurred()) { SWIG_fail; } arg10 = *tmp; } { if (obj7 == Py_None) { arg11 = NULL; } else if (SWIG_ConvertPtr(obj7, (void **) &arg11, 0, 0) == -1) { arg11 = (void *) obj7; PyErr_Clear(); } } if (obj8) { /* Verify that the user supplied a valid pool */ if (obj8 != Py_None && obj8 != _global_py_pool) { SWIG_Python_TypeError(SWIG_TypePrettyName(SWIGTYPE_p_apr_pool_t), obj8); SWIG_arg_fail(svn_argnum_obj8); SWIG_fail; } } { svn_swig_py_release_py_lock(); result = (svn_error_t *)svn_repos_get_commit_editor5((struct svn_delta_editor_t const **)arg1,arg2,arg3,arg4,(char const *)arg5,(char const *)arg6,arg7,arg8,arg9,arg10,arg11,arg12); svn_swig_py_acquire_py_lock(); } { if (result != NULL) { if (result->apr_err != SVN_ERR_SWIG_PY_EXCEPTION_SET) svn_swig_py_svn_exception(result); else svn_error_clear(result); SWIG_fail; } Py_INCREF(Py_None); resultobj = Py_None; } { resultobj = SWIG_Python_AppendOutput(resultobj, svn_swig_NewPointerObj(*arg1, SWIGTYPE_p_svn_delta_editor_t, _global_py_pool, args)) ; } { resultobj = SWIG_Python_AppendOutput(resultobj, svn_swig_NewPointerObj(*arg2, SWIGTYPE_p_void, _global_py_pool, args)) ; } { Py_XDECREF(_global_py_pool); } return resultobj; fail: { Py_XDECREF(_global_py_pool); } return NULL; } SWIGINTERN PyObject *_wrap_svn_repos_get_commit_editor4(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; svn_delta_editor_t **arg1 = (svn_delta_editor_t **) 0 ; void **arg2 = (void **) 0 ; svn_repos_t *arg3 = (svn_repos_t *) 0 ; svn_fs_txn_t *arg4 = (svn_fs_txn_t *) 0 ; char *arg5 = (char *) 0 ; char *arg6 = (char *) 0 ; char *arg7 = (char *) 0 ; char *arg8 = (char *) 0 ; svn_commit_callback2_t arg9 = (svn_commit_callback2_t) 0 ; void *arg10 = (void *) 0 ; svn_repos_authz_callback_t arg11 = (svn_repos_authz_callback_t) 0 ; void *arg12 = (void *) 0 ; apr_pool_t *arg13 = (apr_pool_t *) 0 ; apr_pool_t *_global_pool = NULL ; PyObject *_global_py_pool = NULL ; svn_delta_editor_t *temp1 ; void *temp2 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj6 = 0 ; PyObject * obj7 = 0 ; PyObject * obj8 = 0 ; PyObject * obj9 = 0 ; svn_error_t *result = 0 ; if (svn_swig_py_get_pool_arg(args, SWIGTYPE_p_apr_pool_t, &_global_py_pool, &_global_pool)) SWIG_fail; arg13 = _global_pool; arg1 = &temp1; arg2 = &temp2; if (!PyArg_ParseTuple(args,(char *)"OOsszzOOO|O:svn_repos_get_commit_editor4",&obj0,&obj1,&arg5,&arg6,&arg7,&arg8,&obj6,&obj7,&obj8,&obj9)) SWIG_fail; { arg3 = (svn_repos_t *)svn_swig_MustGetPtr(obj0, SWIGTYPE_p_svn_repos_t, svn_argnum_obj0); if (PyErr_Occurred()) { SWIG_fail; } } { arg4 = (svn_fs_txn_t *)svn_swig_MustGetPtr(obj1, SWIGTYPE_p_svn_fs_txn_t, svn_argnum_obj1); if (PyErr_Occurred()) { SWIG_fail; } } { arg9 = svn_swig_py_commit_callback2; arg10 = (void *)obj6; } { svn_repos_authz_callback_t * tmp = svn_swig_MustGetPtr(obj7, SWIGTYPE_p_p_f_svn_repos_authz_access_t_p_svn_boolean_t_p_svn_fs_root_t_p_q_const__char_p_void_p_apr_pool_t__p_svn_error_t, svn_argnum_obj7); if (tmp == NULL || PyErr_Occurred()) { SWIG_fail; } arg11 = *tmp; } { if (obj8 == Py_None) { arg12 = NULL; } else if (SWIG_ConvertPtr(obj8, (void **) &arg12, 0, 0) == -1) { arg12 = (void *) obj8; PyErr_Clear(); } } if (obj9) { /* Verify that the user supplied a valid pool */ if (obj9 != Py_None && obj9 != _global_py_pool) { SWIG_Python_TypeError(SWIG_TypePrettyName(SWIGTYPE_p_apr_pool_t), obj9); SWIG_arg_fail(svn_argnum_obj9); SWIG_fail; } } { svn_swig_py_release_py_lock(); result = (svn_error_t *)svn_repos_get_commit_editor4((struct svn_delta_editor_t const **)arg1,arg2,arg3,arg4,(char const *)arg5,(char const *)arg6,(char const *)arg7,(char const *)arg8,arg9,arg10,arg11,arg12,arg13); svn_swig_py_acquire_py_lock(); } { if (result != NULL) { if (result->apr_err != SVN_ERR_SWIG_PY_EXCEPTION_SET) svn_swig_py_svn_exception(result); else svn_error_clear(result); SWIG_fail; } Py_INCREF(Py_None); resultobj = Py_None; } { resultobj = SWIG_Python_AppendOutput(resultobj, svn_swig_NewPointerObj(*arg1, SWIGTYPE_p_svn_delta_editor_t, _global_py_pool, args)) ; } { resultobj = SWIG_Python_AppendOutput(resultobj, svn_swig_NewPointerObj(*arg2, SWIGTYPE_p_void, _global_py_pool, args)) ; } { Py_XDECREF(_global_py_pool); } return resultobj; fail: { Py_XDECREF(_global_py_pool); } return NULL; } SWIGINTERN PyObject *_wrap_svn_repos_get_commit_editor3(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; svn_delta_editor_t **arg1 = (svn_delta_editor_t **) 0 ; void **arg2 = (void **) 0 ; svn_repos_t *arg3 = (svn_repos_t *) 0 ; svn_fs_txn_t *arg4 = (svn_fs_txn_t *) 0 ; char *arg5 = (char *) 0 ; char *arg6 = (char *) 0 ; char *arg7 = (char *) 0 ; char *arg8 = (char *) 0 ; svn_commit_callback_t arg9 = (svn_commit_callback_t) 0 ; void *arg10 = (void *) 0 ; svn_repos_authz_callback_t arg11 = (svn_repos_authz_callback_t) 0 ; void *arg12 = (void *) 0 ; apr_pool_t *arg13 = (apr_pool_t *) 0 ; apr_pool_t *_global_pool = NULL ; PyObject *_global_py_pool = NULL ; svn_delta_editor_t *temp1 ; void *temp2 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj6 = 0 ; PyObject * obj7 = 0 ; PyObject * obj8 = 0 ; PyObject * obj9 = 0 ; svn_error_t *result = 0 ; if (svn_swig_py_get_pool_arg(args, SWIGTYPE_p_apr_pool_t, &_global_py_pool, &_global_pool)) SWIG_fail; arg13 = _global_pool; arg1 = &temp1; arg2 = &temp2; if (!PyArg_ParseTuple(args,(char *)"OOsszzOOO|O:svn_repos_get_commit_editor3",&obj0,&obj1,&arg5,&arg6,&arg7,&arg8,&obj6,&obj7,&obj8,&obj9)) SWIG_fail; { arg3 = (svn_repos_t *)svn_swig_MustGetPtr(obj0, SWIGTYPE_p_svn_repos_t, svn_argnum_obj0); if (PyErr_Occurred()) { SWIG_fail; } } { arg4 = (svn_fs_txn_t *)svn_swig_MustGetPtr(obj1, SWIGTYPE_p_svn_fs_txn_t, svn_argnum_obj1); if (PyErr_Occurred()) { SWIG_fail; } } { arg9 = svn_swig_py_commit_callback; arg10 = (void *)obj6; } { svn_repos_authz_callback_t * tmp = svn_swig_MustGetPtr(obj7, SWIGTYPE_p_p_f_svn_repos_authz_access_t_p_svn_boolean_t_p_svn_fs_root_t_p_q_const__char_p_void_p_apr_pool_t__p_svn_error_t, svn_argnum_obj7); if (tmp == NULL || PyErr_Occurred()) { SWIG_fail; } arg11 = *tmp; } { if (obj8 == Py_None) { arg12 = NULL; } else if (SWIG_ConvertPtr(obj8, (void **) &arg12, 0, 0) == -1) { arg12 = (void *) obj8; PyErr_Clear(); } } if (obj9) { /* Verify that the user supplied a valid pool */ if (obj9 != Py_None && obj9 != _global_py_pool) { SWIG_Python_TypeError(SWIG_TypePrettyName(SWIGTYPE_p_apr_pool_t), obj9); SWIG_arg_fail(svn_argnum_obj9); SWIG_fail; } } { svn_swig_py_release_py_lock(); result = (svn_error_t *)svn_repos_get_commit_editor3((struct svn_delta_editor_t const **)arg1,arg2,arg3,arg4,(char const *)arg5,(char const *)arg6,(char const *)arg7,(char const *)arg8,arg9,arg10,arg11,arg12,arg13); svn_swig_py_acquire_py_lock(); } { if (result != NULL) { if (result->apr_err != SVN_ERR_SWIG_PY_EXCEPTION_SET) svn_swig_py_svn_exception(result); else svn_error_clear(result); SWIG_fail; } Py_INCREF(Py_None); resultobj = Py_None; } { resultobj = SWIG_Python_AppendOutput(resultobj, svn_swig_NewPointerObj(*arg1, SWIGTYPE_p_svn_delta_editor_t, _global_py_pool, args)) ; } { resultobj = SWIG_Python_AppendOutput(resultobj, svn_swig_NewPointerObj(*arg2, SWIGTYPE_p_void, _global_py_pool, args)) ; } { Py_XDECREF(_global_py_pool); } return resultobj; fail: { Py_XDECREF(_global_py_pool); } return NULL; } SWIGINTERN PyObject *_wrap_svn_repos_get_commit_editor2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; svn_delta_editor_t **arg1 = (svn_delta_editor_t **) 0 ; void **arg2 = (void **) 0 ; svn_repos_t *arg3 = (svn_repos_t *) 0 ; svn_fs_txn_t *arg4 = (svn_fs_txn_t *) 0 ; char *arg5 = (char *) 0 ; char *arg6 = (char *) 0 ; char *arg7 = (char *) 0 ; char *arg8 = (char *) 0 ; svn_commit_callback_t arg9 = (svn_commit_callback_t) 0 ; void *arg10 = (void *) 0 ; apr_pool_t *arg11 = (apr_pool_t *) 0 ; apr_pool_t *_global_pool = NULL ; PyObject *_global_py_pool = NULL ; svn_delta_editor_t *temp1 ; void *temp2 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj6 = 0 ; PyObject * obj7 = 0 ; svn_error_t *result = 0 ; if (svn_swig_py_get_pool_arg(args, SWIGTYPE_p_apr_pool_t, &_global_py_pool, &_global_pool)) SWIG_fail; arg11 = _global_pool; arg1 = &temp1; arg2 = &temp2; if (!PyArg_ParseTuple(args,(char *)"OOsszzO|O:svn_repos_get_commit_editor2",&obj0,&obj1,&arg5,&arg6,&arg7,&arg8,&obj6,&obj7)) SWIG_fail; { arg3 = (svn_repos_t *)svn_swig_MustGetPtr(obj0, SWIGTYPE_p_svn_repos_t, svn_argnum_obj0); if (PyErr_Occurred()) { SWIG_fail; } } { arg4 = (svn_fs_txn_t *)svn_swig_MustGetPtr(obj1, SWIGTYPE_p_svn_fs_txn_t, svn_argnum_obj1); if (PyErr_Occurred()) { SWIG_fail; } } { arg9 = svn_swig_py_commit_callback; arg10 = (void *)obj6; } if (obj7) { /* Verify that the user supplied a valid pool */ if (obj7 != Py_None && obj7 != _global_py_pool) { SWIG_Python_TypeError(SWIG_TypePrettyName(SWIGTYPE_p_apr_pool_t), obj7); SWIG_arg_fail(svn_argnum_obj7); SWIG_fail; } } { svn_swig_py_release_py_lock(); result = (svn_error_t *)svn_repos_get_commit_editor2((struct svn_delta_editor_t const **)arg1,arg2,arg3,arg4,(char const *)arg5,(char const *)arg6,(char const *)arg7,(char const *)arg8,arg9,arg10,arg11); svn_swig_py_acquire_py_lock(); } { if (result != NULL) { if (result->apr_err != SVN_ERR_SWIG_PY_EXCEPTION_SET) svn_swig_py_svn_exception(result); else svn_error_clear(result); SWIG_fail; } Py_INCREF(Py_None); resultobj = Py_None; } { resultobj = SWIG_Python_AppendOutput(resultobj, svn_swig_NewPointerObj(*arg1, SWIGTYPE_p_svn_delta_editor_t, _global_py_pool, args)) ; } { resultobj = SWIG_Python_AppendOutput(resultobj, svn_swig_NewPointerObj(*arg2, SWIGTYPE_p_void, _global_py_pool, args)) ; } { Py_XDECREF(_global_py_pool); } return resultobj; fail: { Py_XDECREF(_global_py_pool); } return NULL; } SWIGINTERN PyObject *_wrap_svn_repos_get_commit_editor(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; svn_delta_editor_t **arg1 = (svn_delta_editor_t **) 0 ; void **arg2 = (void **) 0 ; svn_repos_t *arg3 = (svn_repos_t *) 0 ; char *arg4 = (char *) 0 ; char *arg5 = (char *) 0 ; char *arg6 = (char *) 0 ; char *arg7 = (char *) 0 ; svn_commit_callback_t arg8 = (svn_commit_callback_t) 0 ; void *arg9 = (void *) 0 ; apr_pool_t *arg10 = (apr_pool_t *) 0 ; apr_pool_t *_global_pool = NULL ; PyObject *_global_py_pool = NULL ; svn_delta_editor_t *temp1 ; void *temp2 ; PyObject * obj0 = 0 ; PyObject * obj5 = 0 ; PyObject * obj6 = 0 ; svn_error_t *result = 0 ; if (svn_swig_py_get_pool_arg(args, SWIGTYPE_p_apr_pool_t, &_global_py_pool, &_global_pool)) SWIG_fail; arg10 = _global_pool; arg1 = &temp1; arg2 = &temp2; if (!PyArg_ParseTuple(args,(char *)"OsszzO|O:svn_repos_get_commit_editor",&obj0,&arg4,&arg5,&arg6,&arg7,&obj5,&obj6)) SWIG_fail; { arg3 = (svn_repos_t *)svn_swig_MustGetPtr(obj0, SWIGTYPE_p_svn_repos_t, svn_argnum_obj0); if (PyErr_Occurred()) { SWIG_fail; } } { arg8 = svn_swig_py_commit_callback; arg9 = (void *)obj5; } if (obj6) { /* Verify that the user supplied a valid pool */ if (obj6 != Py_None && obj6 != _global_py_pool) { SWIG_Python_TypeError(SWIG_TypePrettyName(SWIGTYPE_p_apr_pool_t), obj6); SWIG_arg_fail(svn_argnum_obj6); SWIG_fail; } } { svn_swig_py_release_py_lock(); result = (svn_error_t *)svn_repos_get_commit_editor((struct svn_delta_editor_t const **)arg1,arg2,arg3,(char const *)arg4,(char const *)arg5,(char const *)arg6,(char const *)arg7,arg8,arg9,arg10); svn_swig_py_acquire_py_lock(); } { if (result != NULL) { if (result->apr_err != SVN_ERR_SWIG_PY_EXCEPTION_SET) svn_swig_py_svn_exception(result); else svn_error_clear(result); SWIG_fail; } Py_INCREF(Py_None); resultobj = Py_None; } { resultobj = SWIG_Python_AppendOutput(resultobj, svn_swig_NewPointerObj(*arg1, SWIGTYPE_p_svn_delta_editor_t, _global_py_pool, args)) ; } { resultobj = SWIG_Python_AppendOutput(resultobj, svn_swig_NewPointerObj(*arg2, SWIGTYPE_p_void, _global_py_pool, args)) ; } { Py_XDECREF(_global_py_pool); } return resultobj; fail: { Py_XDECREF(_global_py_pool); } return NULL; } SWIGINTERN PyObject *_wrap_svn_repos_dated_revision(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; svn_revnum_t *arg1 = (svn_revnum_t *) 0 ; svn_repos_t *arg2 = (svn_repos_t *) 0 ; apr_time_t arg3 ; apr_pool_t *arg4 = (apr_pool_t *) 0 ; apr_pool_t *_global_pool = NULL ; PyObject *_global_py_pool = NULL ; svn_revnum_t temp1 ; int res1 = SWIG_TMPOBJ ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; svn_error_t *result = 0 ; if (svn_swig_py_get_pool_arg(args, SWIGTYPE_p_apr_pool_t, &_global_py_pool, &_global_pool)) SWIG_fail; arg4 = _global_pool; arg1 = &temp1; if (!PyArg_ParseTuple(args,(char *)"OO|O:svn_repos_dated_revision",&obj0,&obj1,&obj2)) SWIG_fail; { arg2 = (svn_repos_t *)svn_swig_MustGetPtr(obj0, SWIGTYPE_p_svn_repos_t, svn_argnum_obj0); if (PyErr_Occurred()) { SWIG_fail; } } arg3 = (apr_time_t) PyLong_AsLongLong(obj1); if (obj2) { /* Verify that the user supplied a valid pool */ if (obj2 != Py_None && obj2 != _global_py_pool) { SWIG_Python_TypeError(SWIG_TypePrettyName(SWIGTYPE_p_apr_pool_t), obj2); SWIG_arg_fail(svn_argnum_obj2); SWIG_fail; } } { svn_swig_py_release_py_lock(); result = (svn_error_t *)svn_repos_dated_revision(arg1,arg2,arg3,arg4); svn_swig_py_acquire_py_lock(); } { if (result != NULL) { if (result->apr_err != SVN_ERR_SWIG_PY_EXCEPTION_SET) svn_swig_py_svn_exception(result); else svn_error_clear(result); SWIG_fail; } Py_INCREF(Py_None); resultobj = Py_None; } if (SWIG_IsTmpObj(res1)) { resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_long((*arg1))); } else { int new_flags = SWIG_IsNewObj(res1) ? (SWIG_POINTER_OWN | 0 ) : 0 ; resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg1), SWIGTYPE_p_long, new_flags)); } { Py_XDECREF(_global_py_pool); } return resultobj; fail: { Py_XDECREF(_global_py_pool); } return NULL; } SWIGINTERN PyObject *_wrap_svn_repos_get_committed_info(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; svn_revnum_t *arg1 = (svn_revnum_t *) 0 ; char **arg2 = (char **) 0 ; char **arg3 = (char **) 0 ; svn_fs_root_t *arg4 = (svn_fs_root_t *) 0 ; char *arg5 = (char *) 0 ; apr_pool_t *arg6 = (apr_pool_t *) 0 ; apr_pool_t *_global_pool = NULL ; PyObject *_global_py_pool = NULL ; svn_revnum_t temp1 ; int res1 = SWIG_TMPOBJ ; char *temp2 ; char *temp3 ; PyObject * obj0 = 0 ; PyObject * obj2 = 0 ; svn_error_t *result = 0 ; if (svn_swig_py_get_pool_arg(args, SWIGTYPE_p_apr_pool_t, &_global_py_pool, &_global_pool)) SWIG_fail; arg6 = _global_pool; arg1 = &temp1; arg2 = &temp2; arg3 = &temp3; if (!PyArg_ParseTuple(args,(char *)"Os|O:svn_repos_get_committed_info",&obj0,&arg5,&obj2)) SWIG_fail; { arg4 = (svn_fs_root_t *)svn_swig_MustGetPtr(obj0, SWIGTYPE_p_svn_fs_root_t, svn_argnum_obj0); if (PyErr_Occurred()) { SWIG_fail; } } if (obj2) { /* Verify that the user supplied a valid pool */ if (obj2 != Py_None && obj2 != _global_py_pool) { SWIG_Python_TypeError(SWIG_TypePrettyName(SWIGTYPE_p_apr_pool_t), obj2); SWIG_arg_fail(svn_argnum_obj2); SWIG_fail; } } { svn_swig_py_release_py_lock(); result = (svn_error_t *)svn_repos_get_committed_info(arg1,(char const **)arg2,(char const **)arg3,arg4,(char const *)arg5,arg6); svn_swig_py_acquire_py_lock(); } { if (result != NULL) { if (result->apr_err != SVN_ERR_SWIG_PY_EXCEPTION_SET) svn_swig_py_svn_exception(result); else svn_error_clear(result); SWIG_fail; } Py_INCREF(Py_None); resultobj = Py_None; } if (SWIG_IsTmpObj(res1)) { resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_long((*arg1))); } else { int new_flags = SWIG_IsNewObj(res1) ? (SWIG_POINTER_OWN | 0 ) : 0 ; resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg1), SWIGTYPE_p_long, new_flags)); } { PyObject *s; if (*arg2 == NULL) { Py_INCREF(Py_None); s = Py_None; } else { s = PyString_FromString(*arg2); if (s == NULL) SWIG_fail; } resultobj = SWIG_Python_AppendOutput(resultobj, s); } { PyObject *s; if (*arg3 == NULL) { Py_INCREF(Py_None); s = Py_None; } else { s = PyString_FromString(*arg3); if (s == NULL) SWIG_fail; } resultobj = SWIG_Python_AppendOutput(resultobj, s); } { Py_XDECREF(_global_py_pool); } return resultobj; fail: { Py_XDECREF(_global_py_pool); } return NULL; } SWIGINTERN PyObject *_wrap_svn_repos_stat(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; svn_dirent_t **arg1 = (svn_dirent_t **) 0 ; svn_fs_root_t *arg2 = (svn_fs_root_t *) 0 ; char *arg3 = (char *) 0 ; apr_pool_t *arg4 = (apr_pool_t *) 0 ; apr_pool_t *_global_pool = NULL ; PyObject *_global_py_pool = NULL ; svn_dirent_t *temp1 ; PyObject * obj0 = 0 ; PyObject * obj2 = 0 ; svn_error_t *result = 0 ; if (svn_swig_py_get_pool_arg(args, SWIGTYPE_p_apr_pool_t, &_global_py_pool, &_global_pool)) SWIG_fail; arg4 = _global_pool; arg1 = &temp1; if (!PyArg_ParseTuple(args,(char *)"Os|O:svn_repos_stat",&obj0,&arg3,&obj2)) SWIG_fail; { arg2 = (svn_fs_root_t *)svn_swig_MustGetPtr(obj0, SWIGTYPE_p_svn_fs_root_t, svn_argnum_obj0); if (PyErr_Occurred()) { SWIG_fail; } } if (obj2) { /* Verify that the user supplied a valid pool */ if (obj2 != Py_None && obj2 != _global_py_pool) { SWIG_Python_TypeError(SWIG_TypePrettyName(SWIGTYPE_p_apr_pool_t), obj2); SWIG_arg_fail(svn_argnum_obj2); SWIG_fail; } } { svn_swig_py_release_py_lock(); result = (svn_error_t *)svn_repos_stat(arg1,arg2,(char const *)arg3,arg4); svn_swig_py_acquire_py_lock(); } { if (result != NULL) { if (result->apr_err != SVN_ERR_SWIG_PY_EXCEPTION_SET) svn_swig_py_svn_exception(result); else svn_error_clear(result); SWIG_fail; } Py_INCREF(Py_None); resultobj = Py_None; } { resultobj = SWIG_Python_AppendOutput(resultobj, svn_swig_NewPointerObj(*arg1, SWIGTYPE_p_svn_dirent_t, _global_py_pool, args)) ; } { Py_XDECREF(_global_py_pool); } return resultobj; fail: { Py_XDECREF(_global_py_pool); } return NULL; } SWIGINTERN PyObject *_wrap_svn_repos_deleted_rev(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; svn_fs_t *arg1 = (svn_fs_t *) 0 ; char *arg2 = (char *) 0 ; svn_revnum_t arg3 ; svn_revnum_t arg4 ; svn_revnum_t *arg5 = (svn_revnum_t *) 0 ; apr_pool_t *arg6 = (apr_pool_t *) 0 ; apr_pool_t *_global_pool = NULL ; PyObject *_global_py_pool = NULL ; svn_revnum_t temp5 ; int res5 = SWIG_TMPOBJ ; PyObject * obj0 = 0 ; PyObject * obj2 = 0 ; PyObject * obj3 = 0 ; PyObject * obj4 = 0 ; svn_error_t *result = 0 ; if (svn_swig_py_get_pool_arg(args, SWIGTYPE_p_apr_pool_t, &_global_py_pool, &_global_pool)) SWIG_fail; arg6 = _global_pool; arg5 = &temp5; if (!PyArg_ParseTuple(args,(char *)"OsOO|O:svn_repos_deleted_rev",&obj0,&arg2,&obj2,&obj3,&obj4)) SWIG_fail; { arg1 = (svn_fs_t *)svn_swig_MustGetPtr(obj0, SWIGTYPE_p_svn_fs_t, svn_argnum_obj0); if (PyErr_Occurred()) { SWIG_fail; } } { arg3 = (svn_revnum_t)SWIG_As_long (obj2); if (SWIG_arg_fail(svn_argnum_obj2)) { SWIG_fail; } } { arg4 = (svn_revnum_t)SWIG_As_long (obj3); if (SWIG_arg_fail(svn_argnum_obj3)) { SWIG_fail; } } if (obj4) { /* Verify that the user supplied a valid pool */ if (obj4 != Py_None && obj4 != _global_py_pool) { SWIG_Python_TypeError(SWIG_TypePrettyName(SWIGTYPE_p_apr_pool_t), obj4); SWIG_arg_fail(svn_argnum_obj4); SWIG_fail; } } { svn_swig_py_release_py_lock(); result = (svn_error_t *)svn_repos_deleted_rev(arg1,(char const *)arg2,arg3,arg4,arg5,arg6); svn_swig_py_acquire_py_lock(); } { if (result != NULL) { if (result->apr_err != SVN_ERR_SWIG_PY_EXCEPTION_SET) svn_swig_py_svn_exception(result); else svn_error_clear(result); SWIG_fail; } Py_INCREF(Py_None); resultobj = Py_None; } if (SWIG_IsTmpObj(res5)) { resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_long((*arg5))); } else { int new_flags = SWIG_IsNewObj(res5) ? (SWIG_POINTER_OWN | 0 ) : 0 ; resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg5), SWIGTYPE_p_long, new_flags)); } { Py_XDECREF(_global_py_pool); } return resultobj; fail: { Py_XDECREF(_global_py_pool); } return NULL; } SWIGINTERN PyObject *_wrap_svn_repos_history2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; svn_fs_t *arg1 = (svn_fs_t *) 0 ; char *arg2 = (char *) 0 ; svn_repos_history_func_t arg3 = (svn_repos_history_func_t) 0 ; void *arg4 = (void *) 0 ; svn_repos_authz_func_t arg5 = (svn_repos_authz_func_t) 0 ; void *arg6 = (void *) 0 ; svn_revnum_t arg7 ; svn_revnum_t arg8 ; svn_boolean_t arg9 ; apr_pool_t *arg10 = (apr_pool_t *) 0 ; apr_pool_t *_global_pool = NULL ; PyObject *_global_py_pool = NULL ; PyObject * obj0 = 0 ; PyObject * obj2 = 0 ; PyObject * obj3 = 0 ; PyObject * obj4 = 0 ; PyObject * obj5 = 0 ; PyObject * obj6 = 0 ; PyObject * obj7 = 0 ; svn_error_t *result = 0 ; if (svn_swig_py_get_pool_arg(args, SWIGTYPE_p_apr_pool_t, &_global_py_pool, &_global_pool)) SWIG_fail; arg10 = _global_pool; if (!PyArg_ParseTuple(args,(char *)"OsOOOOO|O:svn_repos_history2",&obj0,&arg2,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7)) SWIG_fail; { arg1 = (svn_fs_t *)svn_swig_MustGetPtr(obj0, SWIGTYPE_p_svn_fs_t, svn_argnum_obj0); if (PyErr_Occurred()) { SWIG_fail; } } { arg3 = svn_swig_py_repos_history_func; arg4 = obj2; } { /* FIXME: Handle the NULL case. */ arg5 = svn_swig_py_repos_authz_func; arg6 = obj3; } { arg7 = (svn_revnum_t)SWIG_As_long (obj4); if (SWIG_arg_fail(svn_argnum_obj4)) { SWIG_fail; } } { arg8 = (svn_revnum_t)SWIG_As_long (obj5); if (SWIG_arg_fail(svn_argnum_obj5)) { SWIG_fail; } } { arg9 = (svn_boolean_t)SWIG_As_long (obj6); if (SWIG_arg_fail(svn_argnum_obj6)) { SWIG_fail; } } if (obj7) { /* Verify that the user supplied a valid pool */ if (obj7 != Py_None && obj7 != _global_py_pool) { SWIG_Python_TypeError(SWIG_TypePrettyName(SWIGTYPE_p_apr_pool_t), obj7); SWIG_arg_fail(svn_argnum_obj7); SWIG_fail; } } { svn_swig_py_release_py_lock(); result = (svn_error_t *)svn_repos_history2(arg1,(char const *)arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10); svn_swig_py_acquire_py_lock(); } { if (result != NULL) { if (result->apr_err != SVN_ERR_SWIG_PY_EXCEPTION_SET) svn_swig_py_svn_exception(result); else svn_error_clear(result); SWIG_fail; } Py_INCREF(Py_None); resultobj = Py_None; } { Py_XDECREF(_global_py_pool); } return resultobj; fail: { Py_XDECREF(_global_py_pool); } return NULL; } SWIGINTERN PyObject *_wrap_svn_repos_history(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; svn_fs_t *arg1 = (svn_fs_t *) 0 ; char *arg2 = (char *) 0 ; svn_repos_history_func_t arg3 = (svn_repos_history_func_t) 0 ; void *arg4 = (void *) 0 ; svn_revnum_t arg5 ; svn_revnum_t arg6 ; svn_boolean_t arg7 ; apr_pool_t *arg8 = (apr_pool_t *) 0 ; apr_pool_t *_global_pool = NULL ; PyObject *_global_py_pool = NULL ; PyObject * obj0 = 0 ; PyObject * obj2 = 0 ; PyObject * obj3 = 0 ; PyObject * obj4 = 0 ; PyObject * obj5 = 0 ; PyObject * obj6 = 0 ; svn_error_t *result = 0 ; if (svn_swig_py_get_pool_arg(args, SWIGTYPE_p_apr_pool_t, &_global_py_pool, &_global_pool)) SWIG_fail; arg8 = _global_pool; if (!PyArg_ParseTuple(args,(char *)"OsOOOO|O:svn_repos_history",&obj0,&arg2,&obj2,&obj3,&obj4,&obj5,&obj6)) SWIG_fail; { arg1 = (svn_fs_t *)svn_swig_MustGetPtr(obj0, SWIGTYPE_p_svn_fs_t, svn_argnum_obj0); if (PyErr_Occurred()) { SWIG_fail; } } { arg3 = svn_swig_py_repos_history_func; arg4 = obj2; } { arg5 = (svn_revnum_t)SWIG_As_long (obj3); if (SWIG_arg_fail(svn_argnum_obj3)) { SWIG_fail; } } { arg6 = (svn_revnum_t)SWIG_As_long (obj4); if (SWIG_arg_fail(svn_argnum_obj4)) { SWIG_fail; } } { arg7 = (svn_boolean_t)SWIG_As_long (obj5); if (SWIG_arg_fail(svn_argnum_obj5)) { SWIG_fail; } } if (obj6) { /* Verify that the user supplied a valid pool */ if (obj6 != Py_None && obj6 != _global_py_pool) { SWIG_Python_TypeError(SWIG_TypePrettyName(SWIGTYPE_p_apr_pool_t), obj6); SWIG_arg_fail(svn_argnum_obj6); SWIG_fail; } } { svn_swig_py_release_py_lock(); result = (svn_error_t *)svn_repos_history(arg1,(char const *)arg2,arg3,arg4,arg5,arg6,arg7,arg8); svn_swig_py_acquire_py_lock(); } { if (result != NULL) { if (result->apr_err != SVN_ERR_SWIG_PY_EXCEPTION_SET) svn_swig_py_svn_exception(result); else svn_error_clear(result); SWIG_fail; } Py_INCREF(Py_None); resultobj = Py_None; } { Py_XDECREF(_global_py_pool); } return resultobj; fail: { Py_XDECREF(_global_py_pool); } return NULL; } SWIGINTERN PyObject *_wrap_svn_repos_trace_node_locations(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; svn_fs_t *arg1 = (svn_fs_t *) 0 ; apr_hash_t **arg2 = (apr_hash_t **) 0 ; char *arg3 = (char *) 0 ; svn_revnum_t arg4 ; apr_array_header_t *arg5 = (apr_array_header_t *) 0 ; svn_repos_authz_func_t arg6 = (svn_repos_authz_func_t) 0 ; void *arg7 = (void *) 0 ; apr_pool_t *arg8 = (apr_pool_t *) 0 ; apr_pool_t *_global_pool = NULL ; PyObject *_global_py_pool = NULL ; apr_hash_t *temp2 ; PyObject * obj0 = 0 ; PyObject * obj2 = 0 ; PyObject * obj3 = 0 ; PyObject * obj4 = 0 ; PyObject * obj5 = 0 ; svn_error_t *result = 0 ; if (svn_swig_py_get_pool_arg(args, SWIGTYPE_p_apr_pool_t, &_global_py_pool, &_global_pool)) SWIG_fail; arg8 = _global_pool; arg2 = &temp2; if (!PyArg_ParseTuple(args,(char *)"OsOOO|O:svn_repos_trace_node_locations",&obj0,&arg3,&obj2,&obj3,&obj4,&obj5)) SWIG_fail; { arg1 = (svn_fs_t *)svn_swig_MustGetPtr(obj0, SWIGTYPE_p_svn_fs_t, svn_argnum_obj0); if (PyErr_Occurred()) { SWIG_fail; } } { arg4 = (svn_revnum_t)SWIG_As_long (obj2); if (SWIG_arg_fail(svn_argnum_obj2)) { SWIG_fail; } } { arg5 = (apr_array_header_t *) svn_swig_py_seq_to_array(obj3, sizeof(svn_revnum_t), svn_swig_py_unwrap_revnum, NULL, _global_pool); if (PyErr_Occurred()) SWIG_fail; } { /* FIXME: Handle the NULL case. */ arg6 = svn_swig_py_repos_authz_func; arg7 = obj4; } if (obj5) { /* Verify that the user supplied a valid pool */ if (obj5 != Py_None && obj5 != _global_py_pool) { SWIG_Python_TypeError(SWIG_TypePrettyName(SWIGTYPE_p_apr_pool_t), obj5); SWIG_arg_fail(svn_argnum_obj5); SWIG_fail; } } { svn_swig_py_release_py_lock(); result = (svn_error_t *)svn_repos_trace_node_locations(arg1,arg2,(char const *)arg3,arg4,(apr_array_header_t const *)arg5,arg6,arg7,arg8); svn_swig_py_acquire_py_lock(); } { if (result != NULL) { if (result->apr_err != SVN_ERR_SWIG_PY_EXCEPTION_SET) svn_swig_py_svn_exception(result); else svn_error_clear(result); SWIG_fail; } Py_INCREF(Py_None); resultobj = Py_None; } { resultobj = SWIG_Python_AppendOutput(resultobj, svn_swig_py_locationhash_to_dict(*arg2)); } { Py_XDECREF(_global_py_pool); } return resultobj; fail: { Py_XDECREF(_global_py_pool); } return NULL; } SWIGINTERN PyObject *_wrap_svn_repos_node_location_segments(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; svn_repos_t *arg1 = (svn_repos_t *) 0 ; char *arg2 = (char *) 0 ; svn_revnum_t arg3 ; svn_revnum_t arg4 ; svn_revnum_t arg5 ; svn_location_segment_receiver_t arg6 = (svn_location_segment_receiver_t) 0 ; void *arg7 = (void *) 0 ; svn_repos_authz_func_t arg8 = (svn_repos_authz_func_t) 0 ; void *arg9 = (void *) 0 ; apr_pool_t *arg10 = (apr_pool_t *) 0 ; apr_pool_t *_global_pool = NULL ; PyObject *_global_py_pool = NULL ; PyObject * obj0 = 0 ; PyObject * obj2 = 0 ; PyObject * obj3 = 0 ; PyObject * obj4 = 0 ; PyObject * obj5 = 0 ; PyObject * obj6 = 0 ; PyObject * obj7 = 0 ; svn_error_t *result = 0 ; if (svn_swig_py_get_pool_arg(args, SWIGTYPE_p_apr_pool_t, &_global_py_pool, &_global_pool)) SWIG_fail; arg10 = _global_pool; if (!PyArg_ParseTuple(args,(char *)"OsOOOOO|O:svn_repos_node_location_segments",&obj0,&arg2,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7)) SWIG_fail; { arg1 = (svn_repos_t *)svn_swig_MustGetPtr(obj0, SWIGTYPE_p_svn_repos_t, svn_argnum_obj0); if (PyErr_Occurred()) { SWIG_fail; } } { arg3 = (svn_revnum_t)SWIG_As_long (obj2); if (SWIG_arg_fail(svn_argnum_obj2)) { SWIG_fail; } } { arg4 = (svn_revnum_t)SWIG_As_long (obj3); if (SWIG_arg_fail(svn_argnum_obj3)) { SWIG_fail; } } { arg5 = (svn_revnum_t)SWIG_As_long (obj4); if (SWIG_arg_fail(svn_argnum_obj4)) { SWIG_fail; } } { arg6 = svn_swig_py_location_segment_receiver_func; arg7 = obj5; } { /* FIXME: Handle the NULL case. */ arg8 = svn_swig_py_repos_authz_func; arg9 = obj6; } if (obj7) { /* Verify that the user supplied a valid pool */ if (obj7 != Py_None && obj7 != _global_py_pool) { SWIG_Python_TypeError(SWIG_TypePrettyName(SWIGTYPE_p_apr_pool_t), obj7); SWIG_arg_fail(svn_argnum_obj7); SWIG_fail; } } { svn_swig_py_release_py_lock(); result = (svn_error_t *)svn_repos_node_location_segments(arg1,(char const *)arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10); svn_swig_py_acquire_py_lock(); } { if (result != NULL) { if (result->apr_err != SVN_ERR_SWIG_PY_EXCEPTION_SET) svn_swig_py_svn_exception(result); else svn_error_clear(result); SWIG_fail; } Py_INCREF(Py_None); resultobj = Py_None; } { Py_XDECREF(_global_py_pool); } return resultobj; fail: { Py_XDECREF(_global_py_pool); } return NULL; } SWIGINTERN PyObject *_wrap_svn_repos_get_logs4(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; svn_repos_t *arg1 = (svn_repos_t *) 0 ; apr_array_header_t *arg2 = (apr_array_header_t *) 0 ; svn_revnum_t arg3 ; svn_revnum_t arg4 ; int arg5 ; svn_boolean_t arg6 ; svn_boolean_t arg7 ; svn_boolean_t arg8 ; apr_array_header_t *arg9 = (apr_array_header_t *) 0 ; svn_repos_authz_func_t arg10 = (svn_repos_authz_func_t) 0 ; void *arg11 = (void *) 0 ; svn_log_entry_receiver_t arg12 = (svn_log_entry_receiver_t) 0 ; void *arg13 = (void *) 0 ; apr_pool_t *arg14 = (apr_pool_t *) 0 ; apr_pool_t *_global_pool = NULL ; PyObject *_global_py_pool = NULL ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; PyObject * obj3 = 0 ; PyObject * obj4 = 0 ; PyObject * obj5 = 0 ; PyObject * obj6 = 0 ; PyObject * obj7 = 0 ; PyObject * obj8 = 0 ; PyObject * obj9 = 0 ; PyObject * obj10 = 0 ; PyObject * obj11 = 0 ; svn_error_t *result = 0 ; if (svn_swig_py_get_pool_arg(args, SWIGTYPE_p_apr_pool_t, &_global_py_pool, &_global_pool)) SWIG_fail; arg14 = _global_pool; if (!PyArg_ParseTuple(args,(char *)"OOOOOOOOOOO|O:svn_repos_get_logs4",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7,&obj8,&obj9,&obj10,&obj11)) SWIG_fail; { arg1 = (svn_repos_t *)svn_swig_MustGetPtr(obj0, SWIGTYPE_p_svn_repos_t, svn_argnum_obj0); if (PyErr_Occurred()) { SWIG_fail; } } { arg2 = (apr_array_header_t *) svn_swig_py_seq_to_array(obj1, sizeof(const char *), svn_swig_py_unwrap_string, NULL, _global_pool); if (PyErr_Occurred()) SWIG_fail; } { arg3 = (svn_revnum_t)SWIG_As_long (obj2); if (SWIG_arg_fail(svn_argnum_obj2)) { SWIG_fail; } } { arg4 = (svn_revnum_t)SWIG_As_long (obj3); if (SWIG_arg_fail(svn_argnum_obj3)) { SWIG_fail; } } { arg5 = (int)SWIG_As_long (obj4); if (SWIG_arg_fail(svn_argnum_obj4)) { SWIG_fail; } } { arg6 = (svn_boolean_t)SWIG_As_long (obj5); if (SWIG_arg_fail(svn_argnum_obj5)) { SWIG_fail; } } { arg7 = (svn_boolean_t)SWIG_As_long (obj6); if (SWIG_arg_fail(svn_argnum_obj6)) { SWIG_fail; } } { arg8 = (svn_boolean_t)SWIG_As_long (obj7); if (SWIG_arg_fail(svn_argnum_obj7)) { SWIG_fail; } } { arg9 = (apr_array_header_t *) svn_swig_py_seq_to_array(obj8, sizeof(const char *), svn_swig_py_unwrap_string, NULL, _global_pool); if (PyErr_Occurred()) SWIG_fail; } { /* FIXME: Handle the NULL case. */ arg10 = svn_swig_py_repos_authz_func; arg11 = obj9; } { arg12 = svn_swig_py_log_entry_receiver; arg13 = (void *)obj10; } if (obj11) { /* Verify that the user supplied a valid pool */ if (obj11 != Py_None && obj11 != _global_py_pool) { SWIG_Python_TypeError(SWIG_TypePrettyName(SWIGTYPE_p_apr_pool_t), obj11); SWIG_arg_fail(svn_argnum_obj11); SWIG_fail; } } { svn_swig_py_release_py_lock(); result = (svn_error_t *)svn_repos_get_logs4(arg1,(apr_array_header_t const *)arg2,arg3,arg4,arg5,arg6,arg7,arg8,(apr_array_header_t const *)arg9,arg10,arg11,arg12,arg13,arg14); svn_swig_py_acquire_py_lock(); } { if (result != NULL) { if (result->apr_err != SVN_ERR_SWIG_PY_EXCEPTION_SET) svn_swig_py_svn_exception(result); else svn_error_clear(result); SWIG_fail; } Py_INCREF(Py_None); resultobj = Py_None; } { Py_XDECREF(_global_py_pool); } return resultobj; fail: { Py_XDECREF(_global_py_pool); } return NULL; } SWIGINTERN PyObject *_wrap_svn_repos_get_logs3(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; svn_repos_t *arg1 = (svn_repos_t *) 0 ; apr_array_header_t *arg2 = (apr_array_header_t *) 0 ; svn_revnum_t arg3 ; svn_revnum_t arg4 ; int arg5 ; svn_boolean_t arg6 ; svn_boolean_t arg7 ; svn_repos_authz_func_t arg8 = (svn_repos_authz_func_t) 0 ; void *arg9 = (void *) 0 ; svn_log_message_receiver_t arg10 = (svn_log_message_receiver_t) 0 ; void *arg11 = (void *) 0 ; apr_pool_t *arg12 = (apr_pool_t *) 0 ; apr_pool_t *_global_pool = NULL ; PyObject *_global_py_pool = NULL ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; PyObject * obj3 = 0 ; PyObject * obj4 = 0 ; PyObject * obj5 = 0 ; PyObject * obj6 = 0 ; PyObject * obj7 = 0 ; PyObject * obj8 = 0 ; PyObject * obj9 = 0 ; svn_error_t *result = 0 ; if (svn_swig_py_get_pool_arg(args, SWIGTYPE_p_apr_pool_t, &_global_py_pool, &_global_pool)) SWIG_fail; arg12 = _global_pool; if (!PyArg_ParseTuple(args,(char *)"OOOOOOOOO|O:svn_repos_get_logs3",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7,&obj8,&obj9)) SWIG_fail; { arg1 = (svn_repos_t *)svn_swig_MustGetPtr(obj0, SWIGTYPE_p_svn_repos_t, svn_argnum_obj0); if (PyErr_Occurred()) { SWIG_fail; } } { arg2 = (apr_array_header_t *) svn_swig_py_seq_to_array(obj1, sizeof(const char *), svn_swig_py_unwrap_string, NULL, _global_pool); if (PyErr_Occurred()) SWIG_fail; } { arg3 = (svn_revnum_t)SWIG_As_long (obj2); if (SWIG_arg_fail(svn_argnum_obj2)) { SWIG_fail; } } { arg4 = (svn_revnum_t)SWIG_As_long (obj3); if (SWIG_arg_fail(svn_argnum_obj3)) { SWIG_fail; } } { arg5 = (int)SWIG_As_long (obj4); if (SWIG_arg_fail(svn_argnum_obj4)) { SWIG_fail; } } { arg6 = (svn_boolean_t)SWIG_As_long (obj5); if (SWIG_arg_fail(svn_argnum_obj5)) { SWIG_fail; } } { arg7 = (svn_boolean_t)SWIG_As_long (obj6); if (SWIG_arg_fail(svn_argnum_obj6)) { SWIG_fail; } } { /* FIXME: Handle the NULL case. */ arg8 = svn_swig_py_repos_authz_func; arg9 = obj7; } { arg10 = svn_swig_py_log_receiver; arg11 = (void *)obj8; } if (obj9) { /* Verify that the user supplied a valid pool */ if (obj9 != Py_None && obj9 != _global_py_pool) { SWIG_Python_TypeError(SWIG_TypePrettyName(SWIGTYPE_p_apr_pool_t), obj9); SWIG_arg_fail(svn_argnum_obj9); SWIG_fail; } } { svn_swig_py_release_py_lock(); result = (svn_error_t *)svn_repos_get_logs3(arg1,(apr_array_header_t const *)arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11,arg12); svn_swig_py_acquire_py_lock(); } { if (result != NULL) { if (result->apr_err != SVN_ERR_SWIG_PY_EXCEPTION_SET) svn_swig_py_svn_exception(result); else svn_error_clear(result); SWIG_fail; } Py_INCREF(Py_None); resultobj = Py_None; } { Py_XDECREF(_global_py_pool); } return resultobj; fail: { Py_XDECREF(_global_py_pool); } return NULL; } SWIGINTERN PyObject *_wrap_svn_repos_get_logs2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; svn_repos_t *arg1 = (svn_repos_t *) 0 ; apr_array_header_t *arg2 = (apr_array_header_t *) 0 ; svn_revnum_t arg3 ; svn_revnum_t arg4 ; svn_boolean_t arg5 ; svn_boolean_t arg6 ; svn_repos_authz_func_t arg7 = (svn_repos_authz_func_t) 0 ; void *arg8 = (void *) 0 ; svn_log_message_receiver_t arg9 = (svn_log_message_receiver_t) 0 ; void *arg10 = (void *) 0 ; apr_pool_t *arg11 = (apr_pool_t *) 0 ; apr_pool_t *_global_pool = NULL ; PyObject *_global_py_pool = NULL ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; PyObject * obj3 = 0 ; PyObject * obj4 = 0 ; PyObject * obj5 = 0 ; PyObject * obj6 = 0 ; PyObject * obj7 = 0 ; PyObject * obj8 = 0 ; svn_error_t *result = 0 ; if (svn_swig_py_get_pool_arg(args, SWIGTYPE_p_apr_pool_t, &_global_py_pool, &_global_pool)) SWIG_fail; arg11 = _global_pool; if (!PyArg_ParseTuple(args,(char *)"OOOOOOOO|O:svn_repos_get_logs2",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7,&obj8)) SWIG_fail; { arg1 = (svn_repos_t *)svn_swig_MustGetPtr(obj0, SWIGTYPE_p_svn_repos_t, svn_argnum_obj0); if (PyErr_Occurred()) { SWIG_fail; } } { arg2 = (apr_array_header_t *) svn_swig_py_seq_to_array(obj1, sizeof(const char *), svn_swig_py_unwrap_string, NULL, _global_pool); if (PyErr_Occurred()) SWIG_fail; } { arg3 = (svn_revnum_t)SWIG_As_long (obj2); if (SWIG_arg_fail(svn_argnum_obj2)) { SWIG_fail; } } { arg4 = (svn_revnum_t)SWIG_As_long (obj3); if (SWIG_arg_fail(svn_argnum_obj3)) { SWIG_fail; } } { arg5 = (svn_boolean_t)SWIG_As_long (obj4); if (SWIG_arg_fail(svn_argnum_obj4)) { SWIG_fail; } } { arg6 = (svn_boolean_t)SWIG_As_long (obj5); if (SWIG_arg_fail(svn_argnum_obj5)) { SWIG_fail; } } { /* FIXME: Handle the NULL case. */ arg7 = svn_swig_py_repos_authz_func; arg8 = obj6; } { arg9 = svn_swig_py_log_receiver; arg10 = (void *)obj7; } if (obj8) { /* Verify that the user supplied a valid pool */ if (obj8 != Py_None && obj8 != _global_py_pool) { SWIG_Python_TypeError(SWIG_TypePrettyName(SWIGTYPE_p_apr_pool_t), obj8); SWIG_arg_fail(svn_argnum_obj8); SWIG_fail; } } { svn_swig_py_release_py_lock(); result = (svn_error_t *)svn_repos_get_logs2(arg1,(apr_array_header_t const *)arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11); svn_swig_py_acquire_py_lock(); } { if (result != NULL) { if (result->apr_err != SVN_ERR_SWIG_PY_EXCEPTION_SET) svn_swig_py_svn_exception(result); else svn_error_clear(result); SWIG_fail; } Py_INCREF(Py_None); resultobj = Py_None; } { Py_XDECREF(_global_py_pool); } return resultobj; fail: { Py_XDECREF(_global_py_pool); } return NULL; } SWIGINTERN PyObject *_wrap_svn_repos_get_logs(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; svn_repos_t *arg1 = (svn_repos_t *) 0 ; apr_array_header_t *arg2 = (apr_array_header_t *) 0 ; svn_revnum_t arg3 ; svn_revnum_t arg4 ; svn_boolean_t arg5 ; svn_boolean_t arg6 ; svn_log_message_receiver_t arg7 = (svn_log_message_receiver_t) 0 ; void *arg8 = (void *) 0 ; apr_pool_t *arg9 = (apr_pool_t *) 0 ; apr_pool_t *_global_pool = NULL ; PyObject *_global_py_pool = NULL ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; PyObject * obj3 = 0 ; PyObject * obj4 = 0 ; PyObject * obj5 = 0 ; PyObject * obj6 = 0 ; PyObject * obj7 = 0 ; svn_error_t *result = 0 ; if (svn_swig_py_get_pool_arg(args, SWIGTYPE_p_apr_pool_t, &_global_py_pool, &_global_pool)) SWIG_fail; arg9 = _global_pool; if (!PyArg_ParseTuple(args,(char *)"OOOOOOO|O:svn_repos_get_logs",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7)) SWIG_fail; { arg1 = (svn_repos_t *)svn_swig_MustGetPtr(obj0, SWIGTYPE_p_svn_repos_t, svn_argnum_obj0); if (PyErr_Occurred()) { SWIG_fail; } } { arg2 = (apr_array_header_t *) svn_swig_py_seq_to_array(obj1, sizeof(const char *), svn_swig_py_unwrap_string, NULL, _global_pool); if (PyErr_Occurred()) SWIG_fail; } { arg3 = (svn_revnum_t)SWIG_As_long (obj2); if (SWIG_arg_fail(svn_argnum_obj2)) { SWIG_fail; } } { arg4 = (svn_revnum_t)SWIG_As_long (obj3); if (SWIG_arg_fail(svn_argnum_obj3)) { SWIG_fail; } } { arg5 = (svn_boolean_t)SWIG_As_long (obj4); if (SWIG_arg_fail(svn_argnum_obj4)) { SWIG_fail; } } { arg6 = (svn_boolean_t)SWIG_As_long (obj5); if (SWIG_arg_fail(svn_argnum_obj5)) { SWIG_fail; } } { arg7 = svn_swig_py_log_receiver; arg8 = (void *)obj6; } if (obj7) { /* Verify that the user supplied a valid pool */ if (obj7 != Py_None && obj7 != _global_py_pool) { SWIG_Python_TypeError(SWIG_TypePrettyName(SWIGTYPE_p_apr_pool_t), obj7); SWIG_arg_fail(svn_argnum_obj7); SWIG_fail; } } { svn_swig_py_release_py_lock(); result = (svn_error_t *)svn_repos_get_logs(arg1,(apr_array_header_t const *)arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9); svn_swig_py_acquire_py_lock(); } { if (result != NULL) { if (result->apr_err != SVN_ERR_SWIG_PY_EXCEPTION_SET) svn_swig_py_svn_exception(result); else svn_error_clear(result); SWIG_fail; } Py_INCREF(Py_None); resultobj = Py_None; } { Py_XDECREF(_global_py_pool); } return resultobj; fail: { Py_XDECREF(_global_py_pool); } return NULL; } SWIGINTERN PyObject *_wrap_svn_repos_fs_get_mergeinfo(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; svn_mergeinfo_catalog_t *arg1 = (svn_mergeinfo_catalog_t *) 0 ; svn_repos_t *arg2 = (svn_repos_t *) 0 ; apr_array_header_t *arg3 = (apr_array_header_t *) 0 ; svn_revnum_t arg4 ; svn_mergeinfo_inheritance_t arg5 ; svn_boolean_t arg6 ; svn_repos_authz_func_t arg7 = (svn_repos_authz_func_t) 0 ; void *arg8 = (void *) 0 ; apr_pool_t *arg9 = (apr_pool_t *) 0 ; apr_pool_t *_global_pool = NULL ; PyObject *_global_py_pool = NULL ; svn_mergeinfo_catalog_t temp1 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; PyObject * obj3 = 0 ; PyObject * obj4 = 0 ; PyObject * obj5 = 0 ; PyObject * obj6 = 0 ; svn_error_t *result = 0 ; if (svn_swig_py_get_pool_arg(args, SWIGTYPE_p_apr_pool_t, &_global_py_pool, &_global_pool)) SWIG_fail; arg9 = _global_pool; arg1 = &temp1; if (!PyArg_ParseTuple(args,(char *)"OOOOOO|O:svn_repos_fs_get_mergeinfo",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6)) SWIG_fail; { arg2 = (svn_repos_t *)svn_swig_MustGetPtr(obj0, SWIGTYPE_p_svn_repos_t, svn_argnum_obj0); if (PyErr_Occurred()) { SWIG_fail; } } { arg3 = (apr_array_header_t *) svn_swig_py_seq_to_array(obj1, sizeof(const char *), svn_swig_py_unwrap_string, NULL, _global_pool); if (PyErr_Occurred()) SWIG_fail; } { arg4 = (svn_revnum_t)SWIG_As_long (obj2); if (SWIG_arg_fail(svn_argnum_obj2)) { SWIG_fail; } } { arg5 = (svn_mergeinfo_inheritance_t)SWIG_As_long (obj3); if (SWIG_arg_fail(svn_argnum_obj3)) { SWIG_fail; } } { arg6 = (svn_boolean_t)SWIG_As_long (obj4); if (SWIG_arg_fail(svn_argnum_obj4)) { SWIG_fail; } } { /* FIXME: Handle the NULL case. */ arg7 = svn_swig_py_repos_authz_func; arg8 = obj5; } if (obj6) { /* Verify that the user supplied a valid pool */ if (obj6 != Py_None && obj6 != _global_py_pool) { SWIG_Python_TypeError(SWIG_TypePrettyName(SWIGTYPE_p_apr_pool_t), obj6); SWIG_arg_fail(svn_argnum_obj6); SWIG_fail; } } { svn_swig_py_release_py_lock(); result = (svn_error_t *)svn_repos_fs_get_mergeinfo(arg1,arg2,(apr_array_header_t const *)arg3,arg4,arg5,arg6,arg7,arg8,arg9); svn_swig_py_acquire_py_lock(); } { if (result != NULL) { if (result->apr_err != SVN_ERR_SWIG_PY_EXCEPTION_SET) svn_swig_py_svn_exception(result); else svn_error_clear(result); SWIG_fail; } Py_INCREF(Py_None); resultobj = Py_None; } { resultobj = SWIG_Python_AppendOutput(resultobj, svn_swig_py_mergeinfo_catalog_to_dict(*arg1, SWIGTYPE_p_svn_merge_range_t, _global_py_pool)) ; if (PyErr_Occurred()) { SWIG_fail; } } { Py_XDECREF(_global_py_pool); } return resultobj; fail: { Py_XDECREF(_global_py_pool); } return NULL; } SWIGINTERN PyObject *_wrap_svn_repos_get_file_revs2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; svn_repos_t *arg1 = (svn_repos_t *) 0 ; char *arg2 = (char *) 0 ; svn_revnum_t arg3 ; svn_revnum_t arg4 ; svn_boolean_t arg5 ; svn_repos_authz_func_t arg6 = (svn_repos_authz_func_t) 0 ; void *arg7 = (void *) 0 ; svn_file_rev_handler_t arg8 = (svn_file_rev_handler_t) 0 ; void *arg9 = (void *) 0 ; apr_pool_t *arg10 = (apr_pool_t *) 0 ; apr_pool_t *_global_pool = NULL ; PyObject *_global_py_pool = NULL ; PyObject * obj0 = 0 ; PyObject * obj2 = 0 ; PyObject * obj3 = 0 ; PyObject * obj4 = 0 ; PyObject * obj5 = 0 ; PyObject * obj6 = 0 ; PyObject * obj7 = 0 ; PyObject * obj8 = 0 ; svn_error_t *result = 0 ; if (svn_swig_py_get_pool_arg(args, SWIGTYPE_p_apr_pool_t, &_global_py_pool, &_global_pool)) SWIG_fail; arg10 = _global_pool; if (!PyArg_ParseTuple(args,(char *)"OsOOOOOO|O:svn_repos_get_file_revs2",&obj0,&arg2,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7,&obj8)) SWIG_fail; { arg1 = (svn_repos_t *)svn_swig_MustGetPtr(obj0, SWIGTYPE_p_svn_repos_t, svn_argnum_obj0); if (PyErr_Occurred()) { SWIG_fail; } } { arg3 = (svn_revnum_t)SWIG_As_long (obj2); if (SWIG_arg_fail(svn_argnum_obj2)) { SWIG_fail; } } { arg4 = (svn_revnum_t)SWIG_As_long (obj3); if (SWIG_arg_fail(svn_argnum_obj3)) { SWIG_fail; } } { arg5 = (svn_boolean_t)SWIG_As_long (obj4); if (SWIG_arg_fail(svn_argnum_obj4)) { SWIG_fail; } } { /* FIXME: Handle the NULL case. */ arg6 = svn_swig_py_repos_authz_func; arg7 = obj5; } { svn_file_rev_handler_t * tmp = svn_swig_MustGetPtr(obj6, SWIGTYPE_p_p_f_p_void_p_q_const__char_svn_revnum_t_p_apr_hash_t_svn_boolean_t_p_svn_txdelta_window_handler_t_p_p_void_p_apr_array_header_t_p_apr_pool_t__p_svn_error_t, svn_argnum_obj6); if (tmp == NULL || PyErr_Occurred()) { SWIG_fail; } arg8 = *tmp; } { if (obj7 == Py_None) { arg9 = NULL; } else if (SWIG_ConvertPtr(obj7, (void **) &arg9, 0, 0) == -1) { arg9 = (void *) obj7; PyErr_Clear(); } } if (obj8) { /* Verify that the user supplied a valid pool */ if (obj8 != Py_None && obj8 != _global_py_pool) { SWIG_Python_TypeError(SWIG_TypePrettyName(SWIGTYPE_p_apr_pool_t), obj8); SWIG_arg_fail(svn_argnum_obj8); SWIG_fail; } } { svn_swig_py_release_py_lock(); result = (svn_error_t *)svn_repos_get_file_revs2(arg1,(char const *)arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10); svn_swig_py_acquire_py_lock(); } { if (result != NULL) { if (result->apr_err != SVN_ERR_SWIG_PY_EXCEPTION_SET) svn_swig_py_svn_exception(result); else svn_error_clear(result); SWIG_fail; } Py_INCREF(Py_None); resultobj = Py_None; } { Py_XDECREF(_global_py_pool); } return resultobj; fail: { Py_XDECREF(_global_py_pool); } return NULL; } SWIGINTERN PyObject *_wrap_svn_repos_get_file_revs(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; svn_repos_t *arg1 = (svn_repos_t *) 0 ; char *arg2 = (char *) 0 ; svn_revnum_t arg3 ; svn_revnum_t arg4 ; svn_repos_authz_func_t arg5 = (svn_repos_authz_func_t) 0 ; void *arg6 = (void *) 0 ; svn_repos_file_rev_handler_t arg7 = (svn_repos_file_rev_handler_t) 0 ; void *arg8 = (void *) 0 ; apr_pool_t *arg9 = (apr_pool_t *) 0 ; apr_pool_t *_global_pool = NULL ; PyObject *_global_py_pool = NULL ; PyObject * obj0 = 0 ; PyObject * obj2 = 0 ; PyObject * obj3 = 0 ; PyObject * obj4 = 0 ; PyObject * obj5 = 0 ; PyObject * obj6 = 0 ; PyObject * obj7 = 0 ; svn_error_t *result = 0 ; if (svn_swig_py_get_pool_arg(args, SWIGTYPE_p_apr_pool_t, &_global_py_pool, &_global_pool)) SWIG_fail; arg9 = _global_pool; if (!PyArg_ParseTuple(args,(char *)"OsOOOOO|O:svn_repos_get_file_revs",&obj0,&arg2,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7)) SWIG_fail; { arg1 = (svn_repos_t *)svn_swig_MustGetPtr(obj0, SWIGTYPE_p_svn_repos_t, svn_argnum_obj0); if (PyErr_Occurred()) { SWIG_fail; } } { arg3 = (svn_revnum_t)SWIG_As_long (obj2); if (SWIG_arg_fail(svn_argnum_obj2)) { SWIG_fail; } } { arg4 = (svn_revnum_t)SWIG_As_long (obj3); if (SWIG_arg_fail(svn_argnum_obj3)) { SWIG_fail; } } { /* FIXME: Handle the NULL case. */ arg5 = svn_swig_py_repos_authz_func; arg6 = obj4; } { svn_repos_file_rev_handler_t * tmp = svn_swig_MustGetPtr(obj5, SWIGTYPE_p_p_f_p_void_p_q_const__char_svn_revnum_t_p_apr_hash_t_p_svn_txdelta_window_handler_t_p_p_void_p_apr_array_header_t_p_apr_pool_t__p_svn_error_t, svn_argnum_obj5); if (tmp == NULL || PyErr_Occurred()) { SWIG_fail; } arg7 = *tmp; } { if (obj6 == Py_None) { arg8 = NULL; } else if (SWIG_ConvertPtr(obj6, (void **) &arg8, 0, 0) == -1) { arg8 = (void *) obj6; PyErr_Clear(); } } if (obj7) { /* Verify that the user supplied a valid pool */ if (obj7 != Py_None && obj7 != _global_py_pool) { SWIG_Python_TypeError(SWIG_TypePrettyName(SWIGTYPE_p_apr_pool_t), obj7); SWIG_arg_fail(svn_argnum_obj7); SWIG_fail; } } { svn_swig_py_release_py_lock(); result = (svn_error_t *)svn_repos_get_file_revs(arg1,(char const *)arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9); svn_swig_py_acquire_py_lock(); } { if (result != NULL) { if (result->apr_err != SVN_ERR_SWIG_PY_EXCEPTION_SET) svn_swig_py_svn_exception(result); else svn_error_clear(result); SWIG_fail; } Py_INCREF(Py_None); resultobj = Py_None; } { Py_XDECREF(_global_py_pool); } return resultobj; fail: { Py_XDECREF(_global_py_pool); } return NULL; } SWIGINTERN PyObject *_wrap_svn_repos_fs_commit_txn(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; char **arg1 = (char **) 0 ; svn_repos_t *arg2 = (svn_repos_t *) 0 ; svn_revnum_t *arg3 = (svn_revnum_t *) 0 ; svn_fs_txn_t *arg4 = (svn_fs_txn_t *) 0 ; apr_pool_t *arg5 = (apr_pool_t *) 0 ; apr_pool_t *_global_pool = NULL ; PyObject *_global_py_pool = NULL ; char *temp1 ; svn_revnum_t temp3 ; int res3 = SWIG_TMPOBJ ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; svn_error_t *result = 0 ; if (svn_swig_py_get_pool_arg(args, SWIGTYPE_p_apr_pool_t, &_global_py_pool, &_global_pool)) SWIG_fail; arg5 = _global_pool; arg1 = &temp1; arg3 = &temp3; if (!PyArg_ParseTuple(args,(char *)"OO|O:svn_repos_fs_commit_txn",&obj0,&obj1,&obj2)) SWIG_fail; { arg2 = (svn_repos_t *)svn_swig_MustGetPtr(obj0, SWIGTYPE_p_svn_repos_t, svn_argnum_obj0); if (PyErr_Occurred()) { SWIG_fail; } } { arg4 = (svn_fs_txn_t *)svn_swig_MustGetPtr(obj1, SWIGTYPE_p_svn_fs_txn_t, svn_argnum_obj1); if (PyErr_Occurred()) { SWIG_fail; } } if (obj2) { /* Verify that the user supplied a valid pool */ if (obj2 != Py_None && obj2 != _global_py_pool) { SWIG_Python_TypeError(SWIG_TypePrettyName(SWIGTYPE_p_apr_pool_t), obj2); SWIG_arg_fail(svn_argnum_obj2); SWIG_fail; } } { svn_swig_py_release_py_lock(); result = (svn_error_t *)svn_repos_fs_commit_txn((char const **)arg1,arg2,arg3,arg4,arg5); svn_swig_py_acquire_py_lock(); } { if (result != NULL) { if (result->apr_err != SVN_ERR_SWIG_PY_EXCEPTION_SET) svn_swig_py_svn_exception(result); else svn_error_clear(result); SWIG_fail; } Py_INCREF(Py_None); resultobj = Py_None; } { PyObject *s; if (*arg1 == NULL) { Py_INCREF(Py_None); s = Py_None; } else { s = PyString_FromString(*arg1); if (s == NULL) SWIG_fail; } resultobj = SWIG_Python_AppendOutput(resultobj, s); } if (SWIG_IsTmpObj(res3)) { resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_long((*arg3))); } else { int new_flags = SWIG_IsNewObj(res3) ? (SWIG_POINTER_OWN | 0 ) : 0 ; resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg3), SWIGTYPE_p_long, new_flags)); } { Py_XDECREF(_global_py_pool); } return resultobj; fail: { Py_XDECREF(_global_py_pool); } return NULL; } SWIGINTERN PyObject *_wrap_svn_repos_fs_begin_txn_for_commit2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; svn_fs_txn_t **arg1 = (svn_fs_txn_t **) 0 ; svn_repos_t *arg2 = (svn_repos_t *) 0 ; svn_revnum_t arg3 ; apr_hash_t *arg4 = (apr_hash_t *) 0 ; apr_pool_t *arg5 = (apr_pool_t *) 0 ; apr_pool_t *_global_pool = NULL ; PyObject *_global_py_pool = NULL ; svn_fs_txn_t *temp1 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; PyObject * obj3 = 0 ; svn_error_t *result = 0 ; if (svn_swig_py_get_pool_arg(args, SWIGTYPE_p_apr_pool_t, &_global_py_pool, &_global_pool)) SWIG_fail; arg5 = _global_pool; arg1 = &temp1; if (!PyArg_ParseTuple(args,(char *)"OOO|O:svn_repos_fs_begin_txn_for_commit2",&obj0,&obj1,&obj2,&obj3)) SWIG_fail; { arg2 = (svn_repos_t *)svn_swig_MustGetPtr(obj0, SWIGTYPE_p_svn_repos_t, svn_argnum_obj0); if (PyErr_Occurred()) { SWIG_fail; } } { arg3 = (svn_revnum_t)SWIG_As_long (obj1); if (SWIG_arg_fail(svn_argnum_obj1)) { SWIG_fail; } } { if (_global_pool == NULL) { if (svn_swig_py_get_parent_pool(args, SWIGTYPE_p_apr_pool_t, &_global_py_pool, &_global_pool)) SWIG_fail; } arg4 = svn_swig_py_prophash_from_dict(obj2, _global_pool); if (PyErr_Occurred()) { SWIG_fail; } } if (obj3) { /* Verify that the user supplied a valid pool */ if (obj3 != Py_None && obj3 != _global_py_pool) { SWIG_Python_TypeError(SWIG_TypePrettyName(SWIGTYPE_p_apr_pool_t), obj3); SWIG_arg_fail(svn_argnum_obj3); SWIG_fail; } } { svn_swig_py_release_py_lock(); result = (svn_error_t *)svn_repos_fs_begin_txn_for_commit2(arg1,arg2,arg3,arg4,arg5); svn_swig_py_acquire_py_lock(); } { if (result != NULL) { if (result->apr_err != SVN_ERR_SWIG_PY_EXCEPTION_SET) svn_swig_py_svn_exception(result); else svn_error_clear(result); SWIG_fail; } Py_INCREF(Py_None); resultobj = Py_None; } { resultobj = SWIG_Python_AppendOutput(resultobj, svn_swig_NewPointerObj(*arg1, SWIGTYPE_p_svn_fs_txn_t, _global_py_pool, args)) ; } { Py_XDECREF(_global_py_pool); } return resultobj; fail: { Py_XDECREF(_global_py_pool); } return NULL; } SWIGINTERN PyObject *_wrap_svn_repos_fs_begin_txn_for_commit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; svn_fs_txn_t **arg1 = (svn_fs_txn_t **) 0 ; svn_repos_t *arg2 = (svn_repos_t *) 0 ; svn_revnum_t arg3 ; char *arg4 = (char *) 0 ; char *arg5 = (char *) 0 ; apr_pool_t *arg6 = (apr_pool_t *) 0 ; apr_pool_t *_global_pool = NULL ; PyObject *_global_py_pool = NULL ; svn_fs_txn_t *temp1 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj4 = 0 ; svn_error_t *result = 0 ; if (svn_swig_py_get_pool_arg(args, SWIGTYPE_p_apr_pool_t, &_global_py_pool, &_global_pool)) SWIG_fail; arg6 = _global_pool; arg1 = &temp1; if (!PyArg_ParseTuple(args,(char *)"OOsz|O:svn_repos_fs_begin_txn_for_commit",&obj0,&obj1,&arg4,&arg5,&obj4)) SWIG_fail; { arg2 = (svn_repos_t *)svn_swig_MustGetPtr(obj0, SWIGTYPE_p_svn_repos_t, svn_argnum_obj0); if (PyErr_Occurred()) { SWIG_fail; } } { arg3 = (svn_revnum_t)SWIG_As_long (obj1); if (SWIG_arg_fail(svn_argnum_obj1)) { SWIG_fail; } } if (obj4) { /* Verify that the user supplied a valid pool */ if (obj4 != Py_None && obj4 != _global_py_pool) { SWIG_Python_TypeError(SWIG_TypePrettyName(SWIGTYPE_p_apr_pool_t), obj4); SWIG_arg_fail(svn_argnum_obj4); SWIG_fail; } } { svn_swig_py_release_py_lock(); result = (svn_error_t *)svn_repos_fs_begin_txn_for_commit(arg1,arg2,arg3,(char const *)arg4,(char const *)arg5,arg6); svn_swig_py_acquire_py_lock(); } { if (result != NULL) { if (result->apr_err != SVN_ERR_SWIG_PY_EXCEPTION_SET) svn_swig_py_svn_exception(result); else svn_error_clear(result); SWIG_fail; } Py_INCREF(Py_None); resultobj = Py_None; } { resultobj = SWIG_Python_AppendOutput(resultobj, svn_swig_NewPointerObj(*arg1, SWIGTYPE_p_svn_fs_txn_t, _global_py_pool, args)) ; } { Py_XDECREF(_global_py_pool); } return resultobj; fail: { Py_XDECREF(_global_py_pool); } return NULL; } SWIGINTERN PyObject *_wrap_svn_repos_fs_begin_txn_for_update(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; svn_fs_txn_t **arg1 = (svn_fs_txn_t **) 0 ; svn_repos_t *arg2 = (svn_repos_t *) 0 ; svn_revnum_t arg3 ; char *arg4 = (char *) 0 ; apr_pool_t *arg5 = (apr_pool_t *) 0 ; apr_pool_t *_global_pool = NULL ; PyObject *_global_py_pool = NULL ; svn_fs_txn_t *temp1 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj3 = 0 ; svn_error_t *result = 0 ; if (svn_swig_py_get_pool_arg(args, SWIGTYPE_p_apr_pool_t, &_global_py_pool, &_global_pool)) SWIG_fail; arg5 = _global_pool; arg1 = &temp1; if (!PyArg_ParseTuple(args,(char *)"OOs|O:svn_repos_fs_begin_txn_for_update",&obj0,&obj1,&arg4,&obj3)) SWIG_fail; { arg2 = (svn_repos_t *)svn_swig_MustGetPtr(obj0, SWIGTYPE_p_svn_repos_t, svn_argnum_obj0); if (PyErr_Occurred()) { SWIG_fail; } } { arg3 = (svn_revnum_t)SWIG_As_long (obj1); if (SWIG_arg_fail(svn_argnum_obj1)) { SWIG_fail; } } if (obj3) { /* Verify that the user supplied a valid pool */ if (obj3 != Py_None && obj3 != _global_py_pool) { SWIG_Python_TypeError(SWIG_TypePrettyName(SWIGTYPE_p_apr_pool_t), obj3); SWIG_arg_fail(svn_argnum_obj3); SWIG_fail; } } { svn_swig_py_release_py_lock(); result = (svn_error_t *)svn_repos_fs_begin_txn_for_update(arg1,arg2,arg3,(char const *)arg4,arg5); svn_swig_py_acquire_py_lock(); } { if (result != NULL) { if (result->apr_err != SVN_ERR_SWIG_PY_EXCEPTION_SET) svn_swig_py_svn_exception(result); else svn_error_clear(result); SWIG_fail; } Py_INCREF(Py_None); resultobj = Py_None; } { resultobj = SWIG_Python_AppendOutput(resultobj, svn_swig_NewPointerObj(*arg1, SWIGTYPE_p_svn_fs_txn_t, _global_py_pool, args)) ; } { Py_XDECREF(_global_py_pool); } return resultobj; fail: { Py_XDECREF(_global_py_pool); } return NULL; } SWIGINTERN PyObject *_wrap_svn_repos_fs_lock(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; svn_lock_t **arg1 = (svn_lock_t **) 0 ; svn_repos_t *arg2 = (svn_repos_t *) 0 ; char *arg3 = (char *) 0 ; char *arg4 = (char *) 0 ; char *arg5 = (char *) 0 ; svn_boolean_t arg6 ; apr_time_t arg7 ; svn_revnum_t arg8 ; svn_boolean_t arg9 ; apr_pool_t *arg10 = (apr_pool_t *) 0 ; apr_pool_t *_global_pool = NULL ; PyObject *_global_py_pool = NULL ; svn_lock_t *temp1 ; PyObject * obj0 = 0 ; PyObject * obj4 = 0 ; PyObject * obj5 = 0 ; PyObject * obj6 = 0 ; PyObject * obj7 = 0 ; PyObject * obj8 = 0 ; svn_error_t *result = 0 ; if (svn_swig_py_get_pool_arg(args, SWIGTYPE_p_apr_pool_t, &_global_py_pool, &_global_pool)) SWIG_fail; arg10 = _global_pool; arg1 = &temp1; if (!PyArg_ParseTuple(args,(char *)"OszzOOOO|O:svn_repos_fs_lock",&obj0,&arg3,&arg4,&arg5,&obj4,&obj5,&obj6,&obj7,&obj8)) SWIG_fail; { arg2 = (svn_repos_t *)svn_swig_MustGetPtr(obj0, SWIGTYPE_p_svn_repos_t, svn_argnum_obj0); if (PyErr_Occurred()) { SWIG_fail; } } { arg6 = (svn_boolean_t)SWIG_As_long (obj4); if (SWIG_arg_fail(svn_argnum_obj4)) { SWIG_fail; } } arg7 = (apr_time_t) PyLong_AsLongLong(obj5); { arg8 = (svn_revnum_t)SWIG_As_long (obj6); if (SWIG_arg_fail(svn_argnum_obj6)) { SWIG_fail; } } { arg9 = (svn_boolean_t)SWIG_As_long (obj7); if (SWIG_arg_fail(svn_argnum_obj7)) { SWIG_fail; } } if (obj8) { /* Verify that the user supplied a valid pool */ if (obj8 != Py_None && obj8 != _global_py_pool) { SWIG_Python_TypeError(SWIG_TypePrettyName(SWIGTYPE_p_apr_pool_t), obj8); SWIG_arg_fail(svn_argnum_obj8); SWIG_fail; } } { svn_swig_py_release_py_lock(); result = (svn_error_t *)svn_repos_fs_lock(arg1,arg2,(char const *)arg3,(char const *)arg4,(char const *)arg5,arg6,arg7,arg8,arg9,arg10); svn_swig_py_acquire_py_lock(); } { if (result != NULL) { if (result->apr_err != SVN_ERR_SWIG_PY_EXCEPTION_SET) svn_swig_py_svn_exception(result); else svn_error_clear(result); SWIG_fail; } Py_INCREF(Py_None); resultobj = Py_None; } { resultobj = SWIG_Python_AppendOutput(resultobj, svn_swig_NewPointerObj(*arg1, SWIGTYPE_p_svn_lock_t, _global_py_pool, args)) ; } { Py_XDECREF(_global_py_pool); } return resultobj; fail: { Py_XDECREF(_global_py_pool); } return NULL; } SWIGINTERN PyObject *_wrap_svn_repos_fs_unlock(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; svn_repos_t *arg1 = (svn_repos_t *) 0 ; char *arg2 = (char *) 0 ; char *arg3 = (char *) 0 ; svn_boolean_t arg4 ; apr_pool_t *arg5 = (apr_pool_t *) 0 ; apr_pool_t *_global_pool = NULL ; PyObject *_global_py_pool = NULL ; PyObject * obj0 = 0 ; PyObject * obj3 = 0 ; PyObject * obj4 = 0 ; svn_error_t *result = 0 ; if (svn_swig_py_get_pool_arg(args, SWIGTYPE_p_apr_pool_t, &_global_py_pool, &_global_pool)) SWIG_fail; arg5 = _global_pool; if (!PyArg_ParseTuple(args,(char *)"OszO|O:svn_repos_fs_unlock",&obj0,&arg2,&arg3,&obj3,&obj4)) SWIG_fail; { arg1 = (svn_repos_t *)svn_swig_MustGetPtr(obj0, SWIGTYPE_p_svn_repos_t, svn_argnum_obj0); if (PyErr_Occurred()) { SWIG_fail; } } { arg4 = (svn_boolean_t)SWIG_As_long (obj3); if (SWIG_arg_fail(svn_argnum_obj3)) { SWIG_fail; } } if (obj4) { /* Verify that the user supplied a valid pool */ if (obj4 != Py_None && obj4 != _global_py_pool) { SWIG_Python_TypeError(SWIG_TypePrettyName(SWIGTYPE_p_apr_pool_t), obj4); SWIG_arg_fail(svn_argnum_obj4); SWIG_fail; } } { svn_swig_py_release_py_lock(); result = (svn_error_t *)svn_repos_fs_unlock(arg1,(char const *)arg2,(char const *)arg3,arg4,arg5); svn_swig_py_acquire_py_lock(); } { if (result != NULL) { if (result->apr_err != SVN_ERR_SWIG_PY_EXCEPTION_SET) svn_swig_py_svn_exception(result); else svn_error_clear(result); SWIG_fail; } Py_INCREF(Py_None); resultobj = Py_None; } { Py_XDECREF(_global_py_pool); } return resultobj; fail: { Py_XDECREF(_global_py_pool); } return NULL; } SWIGINTERN PyObject *_wrap_svn_repos_fs_get_locks2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; apr_hash_t **arg1 = (apr_hash_t **) 0 ; svn_repos_t *arg2 = (svn_repos_t *) 0 ; char *arg3 = (char *) 0 ; svn_depth_t arg4 ; svn_repos_authz_func_t arg5 = (svn_repos_authz_func_t) 0 ; void *arg6 = (void *) 0 ; apr_pool_t *arg7 = (apr_pool_t *) 0 ; apr_pool_t *_global_pool = NULL ; PyObject *_global_py_pool = NULL ; apr_hash_t *temp1 ; PyObject * obj0 = 0 ; PyObject * obj2 = 0 ; PyObject * obj3 = 0 ; PyObject * obj4 = 0 ; svn_error_t *result = 0 ; if (svn_swig_py_get_pool_arg(args, SWIGTYPE_p_apr_pool_t, &_global_py_pool, &_global_pool)) SWIG_fail; arg7 = _global_pool; arg1 = &temp1; if (!PyArg_ParseTuple(args,(char *)"OsOO|O:svn_repos_fs_get_locks2",&obj0,&arg3,&obj2,&obj3,&obj4)) SWIG_fail; { arg2 = (svn_repos_t *)svn_swig_MustGetPtr(obj0, SWIGTYPE_p_svn_repos_t, svn_argnum_obj0); if (PyErr_Occurred()) { SWIG_fail; } } { arg4 = (svn_depth_t)SWIG_As_long (obj2); if (SWIG_arg_fail(svn_argnum_obj2)) { SWIG_fail; } } { /* FIXME: Handle the NULL case. */ arg5 = svn_swig_py_repos_authz_func; arg6 = obj3; } if (obj4) { /* Verify that the user supplied a valid pool */ if (obj4 != Py_None && obj4 != _global_py_pool) { SWIG_Python_TypeError(SWIG_TypePrettyName(SWIGTYPE_p_apr_pool_t), obj4); SWIG_arg_fail(svn_argnum_obj4); SWIG_fail; } } { svn_swig_py_release_py_lock(); result = (svn_error_t *)svn_repos_fs_get_locks2(arg1,arg2,(char const *)arg3,arg4,arg5,arg6,arg7); svn_swig_py_acquire_py_lock(); } { if (result != NULL) { if (result->apr_err != SVN_ERR_SWIG_PY_EXCEPTION_SET) svn_swig_py_svn_exception(result); else svn_error_clear(result); SWIG_fail; } Py_INCREF(Py_None); resultobj = Py_None; } { resultobj = SWIG_Python_AppendOutput(resultobj, svn_swig_py_convert_hash(*arg1, SWIGTYPE_p_svn_lock_t, _global_py_pool)) ; } { Py_XDECREF(_global_py_pool); } return resultobj; fail: { Py_XDECREF(_global_py_pool); } return NULL; } SWIGINTERN PyObject *_wrap_svn_repos_fs_get_locks(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; apr_hash_t **arg1 = (apr_hash_t **) 0 ; svn_repos_t *arg2 = (svn_repos_t *) 0 ; char *arg3 = (char *) 0 ; svn_repos_authz_func_t arg4 = (svn_repos_authz_func_t) 0 ; void *arg5 = (void *) 0 ; apr_pool_t *arg6 = (apr_pool_t *) 0 ; apr_pool_t *_global_pool = NULL ; PyObject *_global_py_pool = NULL ; apr_hash_t *temp1 ; PyObject * obj0 = 0 ; PyObject * obj2 = 0 ; PyObject * obj3 = 0 ; svn_error_t *result = 0 ; if (svn_swig_py_get_pool_arg(args, SWIGTYPE_p_apr_pool_t, &_global_py_pool, &_global_pool)) SWIG_fail; arg6 = _global_pool; arg1 = &temp1; if (!PyArg_ParseTuple(args,(char *)"OsO|O:svn_repos_fs_get_locks",&obj0,&arg3,&obj2,&obj3)) SWIG_fail; { arg2 = (svn_repos_t *)svn_swig_MustGetPtr(obj0, SWIGTYPE_p_svn_repos_t, svn_argnum_obj0); if (PyErr_Occurred()) { SWIG_fail; } } { /* FIXME: Handle the NULL case. */ arg4 = svn_swig_py_repos_authz_func; arg5 = obj2; } if (obj3) { /* Verify that the user supplied a valid pool */ if (obj3 != Py_None && obj3 != _global_py_pool) { SWIG_Python_TypeError(SWIG_TypePrettyName(SWIGTYPE_p_apr_pool_t), obj3); SWIG_arg_fail(svn_argnum_obj3); SWIG_fail; } } { svn_swig_py_release_py_lock(); result = (svn_error_t *)svn_repos_fs_get_locks(arg1,arg2,(char const *)arg3,arg4,arg5,arg6); svn_swig_py_acquire_py_lock(); } { if (result != NULL) { if (result->apr_err != SVN_ERR_SWIG_PY_EXCEPTION_SET) svn_swig_py_svn_exception(result); else svn_error_clear(result); SWIG_fail; } Py_INCREF(Py_None); resultobj = Py_None; } { resultobj = SWIG_Python_AppendOutput(resultobj, svn_swig_py_convert_hash(*arg1, SWIGTYPE_p_svn_lock_t, _global_py_pool)) ; } { Py_XDECREF(_global_py_pool); } return resultobj; fail: { Py_XDECREF(_global_py_pool); } return NULL; } SWIGINTERN PyObject *_wrap_svn_repos_fs_change_rev_prop4(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; svn_repos_t *arg1 = (svn_repos_t *) 0 ; svn_revnum_t arg2 ; char *arg3 = (char *) 0 ; char *arg4 = (char *) 0 ; svn_string_t **arg5 = (svn_string_t **) 0 ; svn_string_t *arg6 = (svn_string_t *) 0 ; svn_boolean_t arg7 ; svn_boolean_t arg8 ; svn_repos_authz_func_t arg9 = (svn_repos_authz_func_t) 0 ; void *arg10 = (void *) 0 ; apr_pool_t *arg11 = (apr_pool_t *) 0 ; apr_pool_t *_global_pool = NULL ; PyObject *_global_py_pool = NULL ; svn_string_t value6 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj4 = 0 ; PyObject * obj5 = 0 ; PyObject * obj6 = 0 ; PyObject * obj7 = 0 ; PyObject * obj8 = 0 ; PyObject * obj9 = 0 ; svn_error_t *result = 0 ; if (svn_swig_py_get_pool_arg(args, SWIGTYPE_p_apr_pool_t, &_global_py_pool, &_global_pool)) SWIG_fail; arg11 = _global_pool; if (!PyArg_ParseTuple(args,(char *)"OOssOOOOO|O:svn_repos_fs_change_rev_prop4",&obj0,&obj1,&arg3,&arg4,&obj4,&obj5,&obj6,&obj7,&obj8,&obj9)) SWIG_fail; { arg1 = (svn_repos_t *)svn_swig_MustGetPtr(obj0, SWIGTYPE_p_svn_repos_t, svn_argnum_obj0); if (PyErr_Occurred()) { SWIG_fail; } } { arg2 = (svn_revnum_t)SWIG_As_long (obj1); if (SWIG_arg_fail(svn_argnum_obj1)) { SWIG_fail; } } { arg5 = (svn_string_t **)svn_swig_MustGetPtr(obj4, SWIGTYPE_p_p_svn_string_t, svn_argnum_obj4); if (PyErr_Occurred()) { SWIG_fail; } } { if (obj5 == Py_None) arg6 = NULL; else { if (!PyString_Check(obj5)) { PyErr_SetString(PyExc_TypeError, "not a string"); SWIG_fail; } value6.data = PyString_AS_STRING(obj5); value6.len = PyString_GET_SIZE(obj5); arg6 = &value6; } } { arg7 = (svn_boolean_t)SWIG_As_long (obj6); if (SWIG_arg_fail(svn_argnum_obj6)) { SWIG_fail; } } { arg8 = (svn_boolean_t)SWIG_As_long (obj7); if (SWIG_arg_fail(svn_argnum_obj7)) { SWIG_fail; } } { /* FIXME: Handle the NULL case. */ arg9 = svn_swig_py_repos_authz_func; arg10 = obj8; } if (obj9) { /* Verify that the user supplied a valid pool */ if (obj9 != Py_None && obj9 != _global_py_pool) { SWIG_Python_TypeError(SWIG_TypePrettyName(SWIGTYPE_p_apr_pool_t), obj9); SWIG_arg_fail(svn_argnum_obj9); SWIG_fail; } } { svn_swig_py_release_py_lock(); result = (svn_error_t *)svn_repos_fs_change_rev_prop4(arg1,arg2,(char const *)arg3,(char const *)arg4,(struct svn_string_t const *const *)arg5,(struct svn_string_t const *)arg6,arg7,arg8,arg9,arg10,arg11); svn_swig_py_acquire_py_lock(); } { if (result != NULL) { if (result->apr_err != SVN_ERR_SWIG_PY_EXCEPTION_SET) svn_swig_py_svn_exception(result); else svn_error_clear(result); SWIG_fail; } Py_INCREF(Py_None); resultobj = Py_None; } { PyObject *s; if (*arg5 == NULL) { Py_INCREF(Py_None); s = Py_None; } else { s = PyString_FromStringAndSize((*arg5)->data, (*arg5)->len); if (s == NULL) SWIG_fail; } resultobj = SWIG_Python_AppendOutput(resultobj, s); } { Py_XDECREF(_global_py_pool); } return resultobj; fail: { Py_XDECREF(_global_py_pool); } return NULL; } SWIGINTERN PyObject *_wrap_svn_repos_fs_change_rev_prop3(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; svn_repos_t *arg1 = (svn_repos_t *) 0 ; svn_revnum_t arg2 ; char *arg3 = (char *) 0 ; char *arg4 = (char *) 0 ; svn_string_t *arg5 = (svn_string_t *) 0 ; svn_boolean_t arg6 ; svn_boolean_t arg7 ; svn_repos_authz_func_t arg8 = (svn_repos_authz_func_t) 0 ; void *arg9 = (void *) 0 ; apr_pool_t *arg10 = (apr_pool_t *) 0 ; apr_pool_t *_global_pool = NULL ; PyObject *_global_py_pool = NULL ; svn_string_t value5 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj4 = 0 ; PyObject * obj5 = 0 ; PyObject * obj6 = 0 ; PyObject * obj7 = 0 ; PyObject * obj8 = 0 ; svn_error_t *result = 0 ; if (svn_swig_py_get_pool_arg(args, SWIGTYPE_p_apr_pool_t, &_global_py_pool, &_global_pool)) SWIG_fail; arg10 = _global_pool; if (!PyArg_ParseTuple(args,(char *)"OOssOOOO|O:svn_repos_fs_change_rev_prop3",&obj0,&obj1,&arg3,&arg4,&obj4,&obj5,&obj6,&obj7,&obj8)) SWIG_fail; { arg1 = (svn_repos_t *)svn_swig_MustGetPtr(obj0, SWIGTYPE_p_svn_repos_t, svn_argnum_obj0); if (PyErr_Occurred()) { SWIG_fail; } } { arg2 = (svn_revnum_t)SWIG_As_long (obj1); if (SWIG_arg_fail(svn_argnum_obj1)) { SWIG_fail; } } { if (obj4 == Py_None) arg5 = NULL; else { if (!PyString_Check(obj4)) { PyErr_SetString(PyExc_TypeError, "not a string"); SWIG_fail; } value5.data = PyString_AS_STRING(obj4); value5.len = PyString_GET_SIZE(obj4); arg5 = &value5; } } { arg6 = (svn_boolean_t)SWIG_As_long (obj5); if (SWIG_arg_fail(svn_argnum_obj5)) { SWIG_fail; } } { arg7 = (svn_boolean_t)SWIG_As_long (obj6); if (SWIG_arg_fail(svn_argnum_obj6)) { SWIG_fail; } } { /* FIXME: Handle the NULL case. */ arg8 = svn_swig_py_repos_authz_func; arg9 = obj7; } if (obj8) { /* Verify that the user supplied a valid pool */ if (obj8 != Py_None && obj8 != _global_py_pool) { SWIG_Python_TypeError(SWIG_TypePrettyName(SWIGTYPE_p_apr_pool_t), obj8); SWIG_arg_fail(svn_argnum_obj8); SWIG_fail; } } { svn_swig_py_release_py_lock(); result = (svn_error_t *)svn_repos_fs_change_rev_prop3(arg1,arg2,(char const *)arg3,(char const *)arg4,(struct svn_string_t const *)arg5,arg6,arg7,arg8,arg9,arg10); svn_swig_py_acquire_py_lock(); } { if (result != NULL) { if (result->apr_err != SVN_ERR_SWIG_PY_EXCEPTION_SET) svn_swig_py_svn_exception(result); else svn_error_clear(result); SWIG_fail; } Py_INCREF(Py_None); resultobj = Py_None; } { Py_XDECREF(_global_py_pool); } return resultobj; fail: { Py_XDECREF(_global_py_pool); } return NULL; } SWIGINTERN PyObject *_wrap_svn_repos_fs_change_rev_prop2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; svn_repos_t *arg1 = (svn_repos_t *) 0 ; svn_revnum_t arg2 ; char *arg3 = (char *) 0 ; char *arg4 = (char *) 0 ; svn_string_t *arg5 = (svn_string_t *) 0 ; svn_repos_authz_func_t arg6 = (svn_repos_authz_func_t) 0 ; void *arg7 = (void *) 0 ; apr_pool_t *arg8 = (apr_pool_t *) 0 ; apr_pool_t *_global_pool = NULL ; PyObject *_global_py_pool = NULL ; svn_string_t value5 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj4 = 0 ; PyObject * obj5 = 0 ; PyObject * obj6 = 0 ; svn_error_t *result = 0 ; if (svn_swig_py_get_pool_arg(args, SWIGTYPE_p_apr_pool_t, &_global_py_pool, &_global_pool)) SWIG_fail; arg8 = _global_pool; if (!PyArg_ParseTuple(args,(char *)"OOssOO|O:svn_repos_fs_change_rev_prop2",&obj0,&obj1,&arg3,&arg4,&obj4,&obj5,&obj6)) SWIG_fail; { arg1 = (svn_repos_t *)svn_swig_MustGetPtr(obj0, SWIGTYPE_p_svn_repos_t, svn_argnum_obj0); if (PyErr_Occurred()) { SWIG_fail; } } { arg2 = (svn_revnum_t)SWIG_As_long (obj1); if (SWIG_arg_fail(svn_argnum_obj1)) { SWIG_fail; } } { if (obj4 == Py_None) arg5 = NULL; else { if (!PyString_Check(obj4)) { PyErr_SetString(PyExc_TypeError, "not a string"); SWIG_fail; } value5.data = PyString_AS_STRING(obj4); value5.len = PyString_GET_SIZE(obj4); arg5 = &value5; } } { /* FIXME: Handle the NULL case. */ arg6 = svn_swig_py_repos_authz_func; arg7 = obj5; } if (obj6) { /* Verify that the user supplied a valid pool */ if (obj6 != Py_None && obj6 != _global_py_pool) { SWIG_Python_TypeError(SWIG_TypePrettyName(SWIGTYPE_p_apr_pool_t), obj6); SWIG_arg_fail(svn_argnum_obj6); SWIG_fail; } } { svn_swig_py_release_py_lock(); result = (svn_error_t *)svn_repos_fs_change_rev_prop2(arg1,arg2,(char const *)arg3,(char const *)arg4,(struct svn_string_t const *)arg5,arg6,arg7,arg8); svn_swig_py_acquire_py_lock(); } { if (result != NULL) { if (result->apr_err != SVN_ERR_SWIG_PY_EXCEPTION_SET) svn_swig_py_svn_exception(result); else svn_error_clear(result); SWIG_fail; } Py_INCREF(Py_None); resultobj = Py_None; } { Py_XDECREF(_global_py_pool); } return resultobj; fail: { Py_XDECREF(_global_py_pool); } return NULL; } SWIGINTERN PyObject *_wrap_svn_repos_fs_change_rev_prop(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; svn_repos_t *arg1 = (svn_repos_t *) 0 ; svn_revnum_t arg2 ; char *arg3 = (char *) 0 ; char *arg4 = (char *) 0 ; svn_string_t *arg5 = (svn_string_t *) 0 ; apr_pool_t *arg6 = (apr_pool_t *) 0 ; apr_pool_t *_global_pool = NULL ; PyObject *_global_py_pool = NULL ; svn_string_t value5 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj4 = 0 ; PyObject * obj5 = 0 ; svn_error_t *result = 0 ; if (svn_swig_py_get_pool_arg(args, SWIGTYPE_p_apr_pool_t, &_global_py_pool, &_global_pool)) SWIG_fail; arg6 = _global_pool; if (!PyArg_ParseTuple(args,(char *)"OOssO|O:svn_repos_fs_change_rev_prop",&obj0,&obj1,&arg3,&arg4,&obj4,&obj5)) SWIG_fail; { arg1 = (svn_repos_t *)svn_swig_MustGetPtr(obj0, SWIGTYPE_p_svn_repos_t, svn_argnum_obj0); if (PyErr_Occurred()) { SWIG_fail; } } { arg2 = (svn_revnum_t)SWIG_As_long (obj1); if (SWIG_arg_fail(svn_argnum_obj1)) { SWIG_fail; } } { if (obj4 == Py_None) arg5 = NULL; else { if (!PyString_Check(obj4)) { PyErr_SetString(PyExc_TypeError, "not a string"); SWIG_fail; } value5.data = PyString_AS_STRING(obj4); value5.len = PyString_GET_SIZE(obj4); arg5 = &value5; } } if (obj5) { /* Verify that the user supplied a valid pool */ if (obj5 != Py_None && obj5 != _global_py_pool) { SWIG_Python_TypeError(SWIG_TypePrettyName(SWIGTYPE_p_apr_pool_t), obj5); SWIG_arg_fail(svn_argnum_obj5); SWIG_fail; } } { svn_swig_py_release_py_lock(); result = (svn_error_t *)svn_repos_fs_change_rev_prop(arg1,arg2,(char const *)arg3,(char const *)arg4,(struct svn_string_t const *)arg5,arg6); svn_swig_py_acquire_py_lock(); } { if (result != NULL) { if (result->apr_err != SVN_ERR_SWIG_PY_EXCEPTION_SET) svn_swig_py_svn_exception(result); else svn_error_clear(result); SWIG_fail; } Py_INCREF(Py_None); resultobj = Py_None; } { Py_XDECREF(_global_py_pool); } return resultobj; fail: { Py_XDECREF(_global_py_pool); } return NULL; } SWIGINTERN PyObject *_wrap_svn_repos_fs_revision_prop(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; svn_string_t **arg1 = (svn_string_t **) 0 ; svn_repos_t *arg2 = (svn_repos_t *) 0 ; svn_revnum_t arg3 ; char *arg4 = (char *) 0 ; svn_repos_authz_func_t arg5 = (svn_repos_authz_func_t) 0 ; void *arg6 = (void *) 0 ; apr_pool_t *arg7 = (apr_pool_t *) 0 ; apr_pool_t *_global_pool = NULL ; PyObject *_global_py_pool = NULL ; svn_string_t *temp1 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj3 = 0 ; PyObject * obj4 = 0 ; svn_error_t *result = 0 ; if (svn_swig_py_get_pool_arg(args, SWIGTYPE_p_apr_pool_t, &_global_py_pool, &_global_pool)) SWIG_fail; arg7 = _global_pool; arg1 = &temp1; if (!PyArg_ParseTuple(args,(char *)"OOsO|O:svn_repos_fs_revision_prop",&obj0,&obj1,&arg4,&obj3,&obj4)) SWIG_fail; { arg2 = (svn_repos_t *)svn_swig_MustGetPtr(obj0, SWIGTYPE_p_svn_repos_t, svn_argnum_obj0); if (PyErr_Occurred()) { SWIG_fail; } } { arg3 = (svn_revnum_t)SWIG_As_long (obj1); if (SWIG_arg_fail(svn_argnum_obj1)) { SWIG_fail; } } { /* FIXME: Handle the NULL case. */ arg5 = svn_swig_py_repos_authz_func; arg6 = obj3; } if (obj4) { /* Verify that the user supplied a valid pool */ if (obj4 != Py_None && obj4 != _global_py_pool) { SWIG_Python_TypeError(SWIG_TypePrettyName(SWIGTYPE_p_apr_pool_t), obj4); SWIG_arg_fail(svn_argnum_obj4); SWIG_fail; } } { svn_swig_py_release_py_lock(); result = (svn_error_t *)svn_repos_fs_revision_prop(arg1,arg2,arg3,(char const *)arg4,arg5,arg6,arg7); svn_swig_py_acquire_py_lock(); } { if (result != NULL) { if (result->apr_err != SVN_ERR_SWIG_PY_EXCEPTION_SET) svn_swig_py_svn_exception(result); else svn_error_clear(result); SWIG_fail; } Py_INCREF(Py_None); resultobj = Py_None; } { PyObject *s; if (*arg1 == NULL) { Py_INCREF(Py_None); s = Py_None; } else { s = PyString_FromStringAndSize((*arg1)->data, (*arg1)->len); if (s == NULL) SWIG_fail; } resultobj = SWIG_Python_AppendOutput(resultobj, s); } { Py_XDECREF(_global_py_pool); } return resultobj; fail: { Py_XDECREF(_global_py_pool); } return NULL; } SWIGINTERN PyObject *_wrap_svn_repos_fs_revision_proplist(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; apr_hash_t **arg1 = (apr_hash_t **) 0 ; svn_repos_t *arg2 = (svn_repos_t *) 0 ; svn_revnum_t arg3 ; svn_repos_authz_func_t arg4 = (svn_repos_authz_func_t) 0 ; void *arg5 = (void *) 0 ; apr_pool_t *arg6 = (apr_pool_t *) 0 ; apr_pool_t *_global_pool = NULL ; PyObject *_global_py_pool = NULL ; apr_hash_t *temp1 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; PyObject * obj3 = 0 ; svn_error_t *result = 0 ; if (svn_swig_py_get_pool_arg(args, SWIGTYPE_p_apr_pool_t, &_global_py_pool, &_global_pool)) SWIG_fail; arg6 = _global_pool; arg1 = &temp1; if (!PyArg_ParseTuple(args,(char *)"OOO|O:svn_repos_fs_revision_proplist",&obj0,&obj1,&obj2,&obj3)) SWIG_fail; { arg2 = (svn_repos_t *)svn_swig_MustGetPtr(obj0, SWIGTYPE_p_svn_repos_t, svn_argnum_obj0); if (PyErr_Occurred()) { SWIG_fail; } } { arg3 = (svn_revnum_t)SWIG_As_long (obj1); if (SWIG_arg_fail(svn_argnum_obj1)) { SWIG_fail; } } { /* FIXME: Handle the NULL case. */ arg4 = svn_swig_py_repos_authz_func; arg5 = obj2; } if (obj3) { /* Verify that the user supplied a valid pool */ if (obj3 != Py_None && obj3 != _global_py_pool) { SWIG_Python_TypeError(SWIG_TypePrettyName(SWIGTYPE_p_apr_pool_t), obj3); SWIG_arg_fail(svn_argnum_obj3); SWIG_fail; } } { svn_swig_py_release_py_lock(); result = (svn_error_t *)svn_repos_fs_revision_proplist(arg1,arg2,arg3,arg4,arg5,arg6); svn_swig_py_acquire_py_lock(); } { if (result != NULL) { if (result->apr_err != SVN_ERR_SWIG_PY_EXCEPTION_SET) svn_swig_py_svn_exception(result); else svn_error_clear(result); SWIG_fail; } Py_INCREF(Py_None); resultobj = Py_None; } { resultobj = SWIG_Python_AppendOutput(resultobj, svn_swig_py_prophash_to_dict(*arg1)); } { Py_XDECREF(_global_py_pool); } return resultobj; fail: { Py_XDECREF(_global_py_pool); } return NULL; } SWIGINTERN PyObject *_wrap_svn_repos_fs_change_node_prop(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; svn_fs_root_t *arg1 = (svn_fs_root_t *) 0 ; char *arg2 = (char *) 0 ; char *arg3 = (char *) 0 ; svn_string_t *arg4 = (svn_string_t *) 0 ; apr_pool_t *arg5 = (apr_pool_t *) 0 ; apr_pool_t *_global_pool = NULL ; PyObject *_global_py_pool = NULL ; svn_string_t value4 ; PyObject * obj0 = 0 ; PyObject * obj3 = 0 ; PyObject * obj4 = 0 ; svn_error_t *result = 0 ; if (svn_swig_py_get_pool_arg(args, SWIGTYPE_p_apr_pool_t, &_global_py_pool, &_global_pool)) SWIG_fail; arg5 = _global_pool; if (!PyArg_ParseTuple(args,(char *)"OssO|O:svn_repos_fs_change_node_prop",&obj0,&arg2,&arg3,&obj3,&obj4)) SWIG_fail; { arg1 = (svn_fs_root_t *)svn_swig_MustGetPtr(obj0, SWIGTYPE_p_svn_fs_root_t, svn_argnum_obj0); if (PyErr_Occurred()) { SWIG_fail; } } { if (obj3 == Py_None) arg4 = NULL; else { if (!PyString_Check(obj3)) { PyErr_SetString(PyExc_TypeError, "not a string"); SWIG_fail; } value4.data = PyString_AS_STRING(obj3); value4.len = PyString_GET_SIZE(obj3); arg4 = &value4; } } if (obj4) { /* Verify that the user supplied a valid pool */ if (obj4 != Py_None && obj4 != _global_py_pool) { SWIG_Python_TypeError(SWIG_TypePrettyName(SWIGTYPE_p_apr_pool_t), obj4); SWIG_arg_fail(svn_argnum_obj4); SWIG_fail; } } { svn_swig_py_release_py_lock(); result = (svn_error_t *)svn_repos_fs_change_node_prop(arg1,(char const *)arg2,(char const *)arg3,(struct svn_string_t const *)arg4,arg5); svn_swig_py_acquire_py_lock(); } { if (result != NULL) { if (result->apr_err != SVN_ERR_SWIG_PY_EXCEPTION_SET) svn_swig_py_svn_exception(result); else svn_error_clear(result); SWIG_fail; } Py_INCREF(Py_None); resultobj = Py_None; } { Py_XDECREF(_global_py_pool); } return resultobj; fail: { Py_XDECREF(_global_py_pool); } return NULL; } SWIGINTERN PyObject *_wrap_svn_repos_fs_change_txn_prop(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; svn_fs_txn_t *arg1 = (svn_fs_txn_t *) 0 ; char *arg2 = (char *) 0 ; svn_string_t *arg3 = (svn_string_t *) 0 ; apr_pool_t *arg4 = (apr_pool_t *) 0 ; apr_pool_t *_global_pool = NULL ; PyObject *_global_py_pool = NULL ; svn_string_t value3 ; PyObject * obj0 = 0 ; PyObject * obj2 = 0 ; PyObject * obj3 = 0 ; svn_error_t *result = 0 ; if (svn_swig_py_get_pool_arg(args, SWIGTYPE_p_apr_pool_t, &_global_py_pool, &_global_pool)) SWIG_fail; arg4 = _global_pool; if (!PyArg_ParseTuple(args,(char *)"OsO|O:svn_repos_fs_change_txn_prop",&obj0,&arg2,&obj2,&obj3)) SWIG_fail; { arg1 = (svn_fs_txn_t *)svn_swig_MustGetPtr(obj0, SWIGTYPE_p_svn_fs_txn_t, svn_argnum_obj0); if (PyErr_Occurred()) { SWIG_fail; } } { if (obj2 == Py_None) arg3 = NULL; else { if (!PyString_Check(obj2)) { PyErr_SetString(PyExc_TypeError, "not a string"); SWIG_fail; } value3.data = PyString_AS_STRING(obj2); value3.len = PyString_GET_SIZE(obj2); arg3 = &value3; } } if (obj3) { /* Verify that the user supplied a valid pool */ if (obj3 != Py_None && obj3 != _global_py_pool) { SWIG_Python_TypeError(SWIG_TypePrettyName(SWIGTYPE_p_apr_pool_t), obj3); SWIG_arg_fail(svn_argnum_obj3); SWIG_fail; } } { svn_swig_py_release_py_lock(); result = (svn_error_t *)svn_repos_fs_change_txn_prop(arg1,(char const *)arg2,(struct svn_string_t const *)arg3,arg4); svn_swig_py_acquire_py_lock(); } { if (result != NULL) { if (result->apr_err != SVN_ERR_SWIG_PY_EXCEPTION_SET) svn_swig_py_svn_exception(result); else svn_error_clear(result); SWIG_fail; } Py_INCREF(Py_None); resultobj = Py_None; } { Py_XDECREF(_global_py_pool); } return resultobj; fail: { Py_XDECREF(_global_py_pool); } return NULL; } SWIGINTERN PyObject *_wrap_svn_repos_fs_change_txn_props(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; svn_fs_txn_t *arg1 = (svn_fs_txn_t *) 0 ; apr_array_header_t *arg2 = (apr_array_header_t *) 0 ; apr_pool_t *arg3 = (apr_pool_t *) 0 ; apr_pool_t *_global_pool = NULL ; PyObject *_global_py_pool = NULL ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; svn_error_t *result = 0 ; if (svn_swig_py_get_pool_arg(args, SWIGTYPE_p_apr_pool_t, &_global_py_pool, &_global_pool)) SWIG_fail; arg3 = _global_pool; if (!PyArg_ParseTuple(args,(char *)"OO|O:svn_repos_fs_change_txn_props",&obj0,&obj1,&obj2)) SWIG_fail; { arg1 = (svn_fs_txn_t *)svn_swig_MustGetPtr(obj0, SWIGTYPE_p_svn_fs_txn_t, svn_argnum_obj0); if (PyErr_Occurred()) { SWIG_fail; } } { arg2 = (apr_array_header_t *)svn_swig_MustGetPtr(obj1, SWIGTYPE_p_apr_array_header_t, svn_argnum_obj1); if (PyErr_Occurred()) { SWIG_fail; } } if (obj2) { /* Verify that the user supplied a valid pool */ if (obj2 != Py_None && obj2 != _global_py_pool) { SWIG_Python_TypeError(SWIG_TypePrettyName(SWIGTYPE_p_apr_pool_t), obj2); SWIG_arg_fail(svn_argnum_obj2); SWIG_fail; } } { svn_swig_py_release_py_lock(); result = (svn_error_t *)svn_repos_fs_change_txn_props(arg1,(apr_array_header_t const *)arg2,arg3); svn_swig_py_acquire_py_lock(); } { if (result != NULL) { if (result->apr_err != SVN_ERR_SWIG_PY_EXCEPTION_SET) svn_swig_py_svn_exception(result); else svn_error_clear(result); SWIG_fail; } Py_INCREF(Py_None); resultobj = Py_None; } { Py_XDECREF(_global_py_pool); } return resultobj; fail: { Py_XDECREF(_global_py_pool); } return NULL; } SWIGINTERN PyObject *_wrap_svn_repos_node_t_kind_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; svn_repos_node_t *arg1 = (svn_repos_node_t *) 0 ; svn_node_kind_t arg2 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:svn_repos_node_t_kind_set",&obj0,&obj1)) SWIG_fail; { arg1 = (svn_repos_node_t *)svn_swig_MustGetPtr(obj0, SWIGTYPE_p_svn_repos_node_t, svn_argnum_obj0); if (PyErr_Occurred()) { SWIG_fail; } } { arg2 = (svn_node_kind_t)SWIG_As_long (obj1); if (SWIG_arg_fail(svn_argnum_obj1)) { SWIG_fail; } } if (arg1) (arg1)->kind = arg2; resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_svn_repos_node_t_kind_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; svn_repos_node_t *arg1 = (svn_repos_node_t *) 0 ; PyObject * obj0 = 0 ; svn_node_kind_t result; if (!PyArg_ParseTuple(args,(char *)"O:svn_repos_node_t_kind_get",&obj0)) SWIG_fail; { arg1 = (svn_repos_node_t *)svn_swig_MustGetPtr(obj0, SWIGTYPE_p_svn_repos_node_t, svn_argnum_obj0); if (PyErr_Occurred()) { SWIG_fail; } } result = (svn_node_kind_t) ((arg1)->kind); resultobj = SWIG_From_long((long)(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_svn_repos_node_t_action_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; svn_repos_node_t *arg1 = (svn_repos_node_t *) 0 ; char arg2 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"Oc:svn_repos_node_t_action_set",&obj0,&arg2)) SWIG_fail; { arg1 = (svn_repos_node_t *)svn_swig_MustGetPtr(obj0, SWIGTYPE_p_svn_repos_node_t, svn_argnum_obj0); if (PyErr_Occurred()) { SWIG_fail; } } if (arg1) (arg1)->action = arg2; resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_svn_repos_node_t_action_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; svn_repos_node_t *arg1 = (svn_repos_node_t *) 0 ; PyObject * obj0 = 0 ; char result; if (!PyArg_ParseTuple(args,(char *)"O:svn_repos_node_t_action_get",&obj0)) SWIG_fail; { arg1 = (svn_repos_node_t *)svn_swig_MustGetPtr(obj0, SWIGTYPE_p_svn_repos_node_t, svn_argnum_obj0); if (PyErr_Occurred()) { SWIG_fail; } } result = (char) ((arg1)->action); resultobj = SWIG_From_char((char)(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_svn_repos_node_t_text_mod_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; svn_repos_node_t *arg1 = (svn_repos_node_t *) 0 ; svn_boolean_t arg2 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:svn_repos_node_t_text_mod_set",&obj0,&obj1)) SWIG_fail; { arg1 = (svn_repos_node_t *)svn_swig_MustGetPtr(obj0, SWIGTYPE_p_svn_repos_node_t, svn_argnum_obj0); if (PyErr_Occurred()) { SWIG_fail; } } { arg2 = (svn_boolean_t)SWIG_As_long (obj1); if (SWIG_arg_fail(svn_argnum_obj1)) { SWIG_fail; } } if (arg1) (arg1)->text_mod = arg2; resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_svn_repos_node_t_text_mod_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; svn_repos_node_t *arg1 = (svn_repos_node_t *) 0 ; PyObject * obj0 = 0 ; svn_boolean_t result; if (!PyArg_ParseTuple(args,(char *)"O:svn_repos_node_t_text_mod_get",&obj0)) SWIG_fail; { arg1 = (svn_repos_node_t *)svn_swig_MustGetPtr(obj0, SWIGTYPE_p_svn_repos_node_t, svn_argnum_obj0); if (PyErr_Occurred()) { SWIG_fail; } } result = (svn_boolean_t) ((arg1)->text_mod); resultobj = SWIG_From_long((long)(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_svn_repos_node_t_prop_mod_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; svn_repos_node_t *arg1 = (svn_repos_node_t *) 0 ; svn_boolean_t arg2 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:svn_repos_node_t_prop_mod_set",&obj0,&obj1)) SWIG_fail; { arg1 = (svn_repos_node_t *)svn_swig_MustGetPtr(obj0, SWIGTYPE_p_svn_repos_node_t, svn_argnum_obj0); if (PyErr_Occurred()) { SWIG_fail; } } { arg2 = (svn_boolean_t)SWIG_As_long (obj1); if (SWIG_arg_fail(svn_argnum_obj1)) { SWIG_fail; } } if (arg1) (arg1)->prop_mod = arg2; resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_svn_repos_node_t_prop_mod_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; svn_repos_node_t *arg1 = (svn_repos_node_t *) 0 ; PyObject * obj0 = 0 ; svn_boolean_t result; if (!PyArg_ParseTuple(args,(char *)"O:svn_repos_node_t_prop_mod_get",&obj0)) SWIG_fail; { arg1 = (svn_repos_node_t *)svn_swig_MustGetPtr(obj0, SWIGTYPE_p_svn_repos_node_t, svn_argnum_obj0); if (PyErr_Occurred()) { SWIG_fail; } } result = (svn_boolean_t) ((arg1)->prop_mod); resultobj = SWIG_From_long((long)(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_svn_repos_node_t_name_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; svn_repos_node_t *arg1 = (svn_repos_node_t *) 0 ; char *arg2 = (char *) 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"Os:svn_repos_node_t_name_set",&obj0,&arg2)) SWIG_fail; { arg1 = (svn_repos_node_t *)svn_swig_MustGetPtr(obj0, SWIGTYPE_p_svn_repos_node_t, svn_argnum_obj0); if (PyErr_Occurred()) { SWIG_fail; } } { apr_size_t len = strlen(arg2) + 1; char *copied; if (arg1->name) free((char *)arg1->name); copied = malloc(len); memcpy(copied, arg2, len); arg1->name = copied; } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_svn_repos_node_t_name_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; svn_repos_node_t *arg1 = (svn_repos_node_t *) 0 ; PyObject * obj0 = 0 ; char *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:svn_repos_node_t_name_get",&obj0)) SWIG_fail; { arg1 = (svn_repos_node_t *)svn_swig_MustGetPtr(obj0, SWIGTYPE_p_svn_repos_node_t, svn_argnum_obj0); if (PyErr_Occurred()) { SWIG_fail; } } result = (char *) ((arg1)->name); resultobj = SWIG_FromCharPtr((const char *)result); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_svn_repos_node_t_copyfrom_rev_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; svn_repos_node_t *arg1 = (svn_repos_node_t *) 0 ; svn_revnum_t arg2 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:svn_repos_node_t_copyfrom_rev_set",&obj0,&obj1)) SWIG_fail; { arg1 = (svn_repos_node_t *)svn_swig_MustGetPtr(obj0, SWIGTYPE_p_svn_repos_node_t, svn_argnum_obj0); if (PyErr_Occurred()) { SWIG_fail; } } { arg2 = (svn_revnum_t)SWIG_As_long (obj1); if (SWIG_arg_fail(svn_argnum_obj1)) { SWIG_fail; } } if (arg1) (arg1)->copyfrom_rev = arg2; resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_svn_repos_node_t_copyfrom_rev_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; svn_repos_node_t *arg1 = (svn_repos_node_t *) 0 ; PyObject * obj0 = 0 ; svn_revnum_t result; if (!PyArg_ParseTuple(args,(char *)"O:svn_repos_node_t_copyfrom_rev_get",&obj0)) SWIG_fail; { arg1 = (svn_repos_node_t *)svn_swig_MustGetPtr(obj0, SWIGTYPE_p_svn_repos_node_t, svn_argnum_obj0); if (PyErr_Occurred()) { SWIG_fail; } } result = (svn_revnum_t) ((arg1)->copyfrom_rev); resultobj = SWIG_From_long((long)(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_svn_repos_node_t_copyfrom_path_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; svn_repos_node_t *arg1 = (svn_repos_node_t *) 0 ; char *arg2 = (char *) 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"Oz:svn_repos_node_t_copyfrom_path_set",&obj0,&arg2)) SWIG_fail; { arg1 = (svn_repos_node_t *)svn_swig_MustGetPtr(obj0, SWIGTYPE_p_svn_repos_node_t, svn_argnum_obj0); if (PyErr_Occurred()) { SWIG_fail; } } { apr_size_t len = strlen(arg2) + 1; char *copied; if (arg1->copyfrom_path) free((char *)arg1->copyfrom_path); copied = malloc(len); memcpy(copied, arg2, len); arg1->copyfrom_path = copied; } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_svn_repos_node_t_copyfrom_path_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; svn_repos_node_t *arg1 = (svn_repos_node_t *) 0 ; PyObject * obj0 = 0 ; char *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:svn_repos_node_t_copyfrom_path_get",&obj0)) SWIG_fail; { arg1 = (svn_repos_node_t *)svn_swig_MustGetPtr(obj0, SWIGTYPE_p_svn_repos_node_t, svn_argnum_obj0); if (PyErr_Occurred()) { SWIG_fail; } } result = (char *) ((arg1)->copyfrom_path); resultobj = SWIG_FromCharPtr((const char *)result); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_svn_repos_node_t_sibling_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; svn_repos_node_t *arg1 = (svn_repos_node_t *) 0 ; struct svn_repos_node_t *arg2 = (struct svn_repos_node_t *) 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:svn_repos_node_t_sibling_set",&obj0,&obj1)) SWIG_fail; { arg1 = (svn_repos_node_t *)svn_swig_MustGetPtr(obj0, SWIGTYPE_p_svn_repos_node_t, svn_argnum_obj0); if (PyErr_Occurred()) { SWIG_fail; } } { arg2 = (struct svn_repos_node_t *)svn_swig_MustGetPtr(obj1, SWIGTYPE_p_svn_repos_node_t, svn_argnum_obj1); if (PyErr_Occurred()) { SWIG_fail; } } if (arg1) (arg1)->sibling = arg2; resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_svn_repos_node_t_sibling_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; svn_repos_node_t *arg1 = (svn_repos_node_t *) 0 ; PyObject * obj0 = 0 ; struct svn_repos_node_t *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:svn_repos_node_t_sibling_get",&obj0)) SWIG_fail; { arg1 = (svn_repos_node_t *)svn_swig_MustGetPtr(obj0, SWIGTYPE_p_svn_repos_node_t, svn_argnum_obj0); if (PyErr_Occurred()) { SWIG_fail; } } result = (struct svn_repos_node_t *) ((arg1)->sibling); resultobj = svn_swig_NewPointerObj((void*)(result), SWIGTYPE_p_svn_repos_node_t, _global_py_pool, args); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_svn_repos_node_t_child_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; svn_repos_node_t *arg1 = (svn_repos_node_t *) 0 ; struct svn_repos_node_t *arg2 = (struct svn_repos_node_t *) 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:svn_repos_node_t_child_set",&obj0,&obj1)) SWIG_fail; { arg1 = (svn_repos_node_t *)svn_swig_MustGetPtr(obj0, SWIGTYPE_p_svn_repos_node_t, svn_argnum_obj0); if (PyErr_Occurred()) { SWIG_fail; } } { arg2 = (struct svn_repos_node_t *)svn_swig_MustGetPtr(obj1, SWIGTYPE_p_svn_repos_node_t, svn_argnum_obj1); if (PyErr_Occurred()) { SWIG_fail; } } if (arg1) (arg1)->child = arg2; resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_svn_repos_node_t_child_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; svn_repos_node_t *arg1 = (svn_repos_node_t *) 0 ; PyObject * obj0 = 0 ; struct svn_repos_node_t *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:svn_repos_node_t_child_get",&obj0)) SWIG_fail; { arg1 = (svn_repos_node_t *)svn_swig_MustGetPtr(obj0, SWIGTYPE_p_svn_repos_node_t, svn_argnum_obj0); if (PyErr_Occurred()) { SWIG_fail; } } result = (struct svn_repos_node_t *) ((arg1)->child); resultobj = svn_swig_NewPointerObj((void*)(result), SWIGTYPE_p_svn_repos_node_t, _global_py_pool, args); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_svn_repos_node_t_parent_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; svn_repos_node_t *arg1 = (svn_repos_node_t *) 0 ; struct svn_repos_node_t *arg2 = (struct svn_repos_node_t *) 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:svn_repos_node_t_parent_set",&obj0,&obj1)) SWIG_fail; { arg1 = (svn_repos_node_t *)svn_swig_MustGetPtr(obj0, SWIGTYPE_p_svn_repos_node_t, svn_argnum_obj0); if (PyErr_Occurred()) { SWIG_fail; } } { arg2 = (struct svn_repos_node_t *)svn_swig_MustGetPtr(obj1, SWIGTYPE_p_svn_repos_node_t, svn_argnum_obj1); if (PyErr_Occurred()) { SWIG_fail; } } if (arg1) (arg1)->parent = arg2; resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_svn_repos_node_t_parent_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; svn_repos_node_t *arg1 = (svn_repos_node_t *) 0 ; PyObject * obj0 = 0 ; struct svn_repos_node_t *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:svn_repos_node_t_parent_get",&obj0)) SWIG_fail; { arg1 = (svn_repos_node_t *)svn_swig_MustGetPtr(obj0, SWIGTYPE_p_svn_repos_node_t, svn_argnum_obj0); if (PyErr_Occurred()) { SWIG_fail; } } result = (struct svn_repos_node_t *) ((arg1)->parent); resultobj = svn_swig_NewPointerObj((void*)(result), SWIGTYPE_p_svn_repos_node_t, _global_py_pool, args); return resultobj; fail: return NULL; } SWIGINTERN PyObject *svn_repos_node_t_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_svn_repos_node_t, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } SWIGINTERN PyObject *_wrap_svn_repos_node_editor(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; svn_delta_editor_t **arg1 = (svn_delta_editor_t **) 0 ; void **arg2 = (void **) 0 ; svn_repos_t *arg3 = (svn_repos_t *) 0 ; svn_fs_root_t *arg4 = (svn_fs_root_t *) 0 ; svn_fs_root_t *arg5 = (svn_fs_root_t *) 0 ; apr_pool_t *arg6 = (apr_pool_t *) 0 ; apr_pool_t *arg7 = (apr_pool_t *) 0 ; apr_pool_t *_global_pool = NULL ; PyObject *_global_py_pool = NULL ; svn_delta_editor_t *temp1 ; void *temp2 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; PyObject * obj3 = 0 ; PyObject * obj4 = 0 ; svn_error_t *result = 0 ; if (svn_swig_py_get_pool_arg(args, SWIGTYPE_p_apr_pool_t, &_global_py_pool, &_global_pool)) SWIG_fail; arg6 = _global_pool; if (svn_swig_py_get_pool_arg(args, SWIGTYPE_p_apr_pool_t, &_global_py_pool, &_global_pool)) SWIG_fail; arg7 = _global_pool; arg1 = &temp1; arg2 = &temp2; if (!PyArg_ParseTuple(args,(char *)"OOO|OO:svn_repos_node_editor",&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail; { arg3 = (svn_repos_t *)svn_swig_MustGetPtr(obj0, SWIGTYPE_p_svn_repos_t, svn_argnum_obj0); if (PyErr_Occurred()) { SWIG_fail; } } { arg4 = (svn_fs_root_t *)svn_swig_MustGetPtr(obj1, SWIGTYPE_p_svn_fs_root_t, svn_argnum_obj1); if (PyErr_Occurred()) { SWIG_fail; } } { arg5 = (svn_fs_root_t *)svn_swig_MustGetPtr(obj2, SWIGTYPE_p_svn_fs_root_t, svn_argnum_obj2); if (PyErr_Occurred()) { SWIG_fail; } } if (obj3) { /* Verify that the user supplied a valid pool */ if (obj3 != Py_None && obj3 != _global_py_pool) { SWIG_Python_TypeError(SWIG_TypePrettyName(SWIGTYPE_p_apr_pool_t), obj3); SWIG_arg_fail(svn_argnum_obj3); SWIG_fail; } } if (obj4) { /* Verify that the user supplied a valid pool */ if (obj4 != Py_None && obj4 != _global_py_pool) { SWIG_Python_TypeError(SWIG_TypePrettyName(SWIGTYPE_p_apr_pool_t), obj4); SWIG_arg_fail(svn_argnum_obj4); SWIG_fail; } } { svn_swig_py_release_py_lock(); result = (svn_error_t *)svn_repos_node_editor((struct svn_delta_editor_t const **)arg1,arg2,arg3,arg4,arg5,arg6,arg7); svn_swig_py_acquire_py_lock(); } { if (result != NULL) { if (result->apr_err != SVN_ERR_SWIG_PY_EXCEPTION_SET) svn_swig_py_svn_exception(result); else svn_error_clear(result); SWIG_fail; } Py_INCREF(Py_None); resultobj = Py_None; } { resultobj = SWIG_Python_AppendOutput(resultobj, svn_swig_NewPointerObj(*arg1, SWIGTYPE_p_svn_delta_editor_t, _global_py_pool, args)) ; } { resultobj = SWIG_Python_AppendOutput(resultobj, svn_swig_NewPointerObj(*arg2, SWIGTYPE_p_void, _global_py_pool, args)) ; } { Py_XDECREF(_global_py_pool); } { Py_XDECREF(_global_py_pool); } return resultobj; fail: { Py_XDECREF(_global_py_pool); } { Py_XDECREF(_global_py_pool); } return NULL; } SWIGINTERN PyObject *_wrap_svn_repos_node_from_baton(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; void *arg1 = (void *) 0 ; PyObject * obj0 = 0 ; svn_repos_node_t *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:svn_repos_node_from_baton",&obj0)) SWIG_fail; { if (obj0 == Py_None) { arg1 = NULL; } else if (SWIG_ConvertPtr(obj0, (void **) &arg1, 0, 0) == -1) { arg1 = (void *) obj0; PyErr_Clear(); } } { svn_swig_py_release_py_lock(); result = (svn_repos_node_t *)svn_repos_node_from_baton(arg1); svn_swig_py_acquire_py_lock(); } resultobj = svn_swig_NewPointerObj((void*)(result), SWIGTYPE_p_svn_repos_node_t, _global_py_pool, args); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_svn_repos_verify_fs2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; svn_repos_t *arg1 = (svn_repos_t *) 0 ; svn_revnum_t arg2 ; svn_revnum_t arg3 ; svn_repos_notify_func_t arg4 = (svn_repos_notify_func_t) 0 ; void *arg5 = (void *) 0 ; svn_cancel_func_t arg6 = (svn_cancel_func_t) 0 ; void *arg7 = (void *) 0 ; apr_pool_t *arg8 = (apr_pool_t *) 0 ; apr_pool_t *_global_pool = NULL ; PyObject *_global_py_pool = NULL ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; PyObject * obj3 = 0 ; PyObject * obj4 = 0 ; PyObject * obj5 = 0 ; PyObject * obj6 = 0 ; PyObject * obj7 = 0 ; svn_error_t *result = 0 ; if (svn_swig_py_get_pool_arg(args, SWIGTYPE_p_apr_pool_t, &_global_py_pool, &_global_pool)) SWIG_fail; arg8 = _global_pool; if (!PyArg_ParseTuple(args,(char *)"OOOOOOO|O:svn_repos_verify_fs2",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7)) SWIG_fail; { arg1 = (svn_repos_t *)svn_swig_MustGetPtr(obj0, SWIGTYPE_p_svn_repos_t, svn_argnum_obj0); if (PyErr_Occurred()) { SWIG_fail; } } { arg2 = (svn_revnum_t)SWIG_As_long (obj1); if (SWIG_arg_fail(svn_argnum_obj1)) { SWIG_fail; } } { arg3 = (svn_revnum_t)SWIG_As_long (obj2); if (SWIG_arg_fail(svn_argnum_obj2)) { SWIG_fail; } } { svn_repos_notify_func_t * tmp = svn_swig_MustGetPtr(obj3, SWIGTYPE_p_p_f_p_void_p_q_const__struct_svn_repos_notify_t_p_apr_pool_t__void, svn_argnum_obj3); if (tmp == NULL || PyErr_Occurred()) { SWIG_fail; } arg4 = *tmp; } { if (obj4 == Py_None) { arg5 = NULL; } else if (SWIG_ConvertPtr(obj4, (void **) &arg5, 0, 0) == -1) { arg5 = (void *) obj4; PyErr_Clear(); } } { svn_cancel_func_t * tmp = svn_swig_MustGetPtr(obj5, SWIGTYPE_p_p_f_p_void__p_svn_error_t, svn_argnum_obj5); if (tmp == NULL || PyErr_Occurred()) { SWIG_fail; } arg6 = *tmp; } { if (obj6 == Py_None) { arg7 = NULL; } else if (SWIG_ConvertPtr(obj6, (void **) &arg7, 0, 0) == -1) { arg7 = (void *) obj6; PyErr_Clear(); } } if (obj7) { /* Verify that the user supplied a valid pool */ if (obj7 != Py_None && obj7 != _global_py_pool) { SWIG_Python_TypeError(SWIG_TypePrettyName(SWIGTYPE_p_apr_pool_t), obj7); SWIG_arg_fail(svn_argnum_obj7); SWIG_fail; } } { svn_swig_py_release_py_lock(); result = (svn_error_t *)svn_repos_verify_fs2(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8); svn_swig_py_acquire_py_lock(); } { if (result != NULL) { if (result->apr_err != SVN_ERR_SWIG_PY_EXCEPTION_SET) svn_swig_py_svn_exception(result); else svn_error_clear(result); SWIG_fail; } Py_INCREF(Py_None); resultobj = Py_None; } { Py_XDECREF(_global_py_pool); } return resultobj; fail: { Py_XDECREF(_global_py_pool); } return NULL; } SWIGINTERN PyObject *_wrap_svn_repos_verify_fs(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; svn_repos_t *arg1 = (svn_repos_t *) 0 ; svn_stream_t *arg2 = (svn_stream_t *) 0 ; svn_revnum_t arg3 ; svn_revnum_t arg4 ; svn_cancel_func_t arg5 = (svn_cancel_func_t) 0 ; void *arg6 = (void *) 0 ; apr_pool_t *arg7 = (apr_pool_t *) 0 ; apr_pool_t *_global_pool = NULL ; PyObject *_global_py_pool = NULL ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; PyObject * obj3 = 0 ; PyObject * obj4 = 0 ; PyObject * obj5 = 0 ; svn_error_t *result = 0 ; if (svn_swig_py_get_pool_arg(args, SWIGTYPE_p_apr_pool_t, &_global_py_pool, &_global_pool)) SWIG_fail; arg7 = _global_pool; if (!PyArg_ParseTuple(args,(char *)"OOOOO|O:svn_repos_verify_fs",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5)) SWIG_fail; { arg1 = (svn_repos_t *)svn_swig_MustGetPtr(obj0, SWIGTYPE_p_svn_repos_t, svn_argnum_obj0); if (PyErr_Occurred()) { SWIG_fail; } } { arg2 = svn_swig_py_make_stream (obj1, _global_pool); } { arg3 = (svn_revnum_t)SWIG_As_long (obj2); if (SWIG_arg_fail(svn_argnum_obj2)) { SWIG_fail; } } { arg4 = (svn_revnum_t)SWIG_As_long (obj3); if (SWIG_arg_fail(svn_argnum_obj3)) { SWIG_fail; } } { arg5 = svn_swig_py_cancel_func; arg6 = obj4; /* our function is the baton. */ } if (obj5) { /* Verify that the user supplied a valid pool */ if (obj5 != Py_None && obj5 != _global_py_pool) { SWIG_Python_TypeError(SWIG_TypePrettyName(SWIGTYPE_p_apr_pool_t), obj5); SWIG_arg_fail(svn_argnum_obj5); SWIG_fail; } } { svn_swig_py_release_py_lock(); result = (svn_error_t *)svn_repos_verify_fs(arg1,arg2,arg3,arg4,arg5,arg6,arg7); svn_swig_py_acquire_py_lock(); } { if (result != NULL) { if (result->apr_err != SVN_ERR_SWIG_PY_EXCEPTION_SET) svn_swig_py_svn_exception(result); else svn_error_clear(result); SWIG_fail; } Py_INCREF(Py_None); resultobj = Py_None; } { Py_XDECREF(_global_py_pool); } return resultobj; fail: { Py_XDECREF(_global_py_pool); } return NULL; } SWIGINTERN PyObject *_wrap_svn_repos_dump_fs3(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; svn_repos_t *arg1 = (svn_repos_t *) 0 ; svn_stream_t *arg2 = (svn_stream_t *) 0 ; svn_revnum_t arg3 ; svn_revnum_t arg4 ; svn_boolean_t arg5 ; svn_boolean_t arg6 ; svn_repos_notify_func_t arg7 = (svn_repos_notify_func_t) 0 ; void *arg8 = (void *) 0 ; svn_cancel_func_t arg9 = (svn_cancel_func_t) 0 ; void *arg10 = (void *) 0 ; apr_pool_t *arg11 = (apr_pool_t *) 0 ; apr_pool_t *_global_pool = NULL ; PyObject *_global_py_pool = NULL ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; PyObject * obj3 = 0 ; PyObject * obj4 = 0 ; PyObject * obj5 = 0 ; PyObject * obj6 = 0 ; PyObject * obj7 = 0 ; PyObject * obj8 = 0 ; PyObject * obj9 = 0 ; svn_error_t *result = 0 ; if (svn_swig_py_get_pool_arg(args, SWIGTYPE_p_apr_pool_t, &_global_py_pool, &_global_pool)) SWIG_fail; arg11 = _global_pool; if (!PyArg_ParseTuple(args,(char *)"OOOOOOOOO|O:svn_repos_dump_fs3",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7,&obj8,&obj9)) SWIG_fail; { arg1 = (svn_repos_t *)svn_swig_MustGetPtr(obj0, SWIGTYPE_p_svn_repos_t, svn_argnum_obj0); if (PyErr_Occurred()) { SWIG_fail; } } { arg2 = svn_swig_py_make_stream (obj1, _global_pool); } { arg3 = (svn_revnum_t)SWIG_As_long (obj2); if (SWIG_arg_fail(svn_argnum_obj2)) { SWIG_fail; } } { arg4 = (svn_revnum_t)SWIG_As_long (obj3); if (SWIG_arg_fail(svn_argnum_obj3)) { SWIG_fail; } } { arg5 = (svn_boolean_t)SWIG_As_long (obj4); if (SWIG_arg_fail(svn_argnum_obj4)) { SWIG_fail; } } { arg6 = (svn_boolean_t)SWIG_As_long (obj5); if (SWIG_arg_fail(svn_argnum_obj5)) { SWIG_fail; } } { svn_repos_notify_func_t * tmp = svn_swig_MustGetPtr(obj6, SWIGTYPE_p_p_f_p_void_p_q_const__struct_svn_repos_notify_t_p_apr_pool_t__void, svn_argnum_obj6); if (tmp == NULL || PyErr_Occurred()) { SWIG_fail; } arg7 = *tmp; } { if (obj7 == Py_None) { arg8 = NULL; } else if (SWIG_ConvertPtr(obj7, (void **) &arg8, 0, 0) == -1) { arg8 = (void *) obj7; PyErr_Clear(); } } { arg9 = svn_swig_py_cancel_func; arg10 = obj8; /* our function is the baton. */ } if (obj9) { /* Verify that the user supplied a valid pool */ if (obj9 != Py_None && obj9 != _global_py_pool) { SWIG_Python_TypeError(SWIG_TypePrettyName(SWIGTYPE_p_apr_pool_t), obj9); SWIG_arg_fail(svn_argnum_obj9); SWIG_fail; } } { svn_swig_py_release_py_lock(); result = (svn_error_t *)svn_repos_dump_fs3(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11); svn_swig_py_acquire_py_lock(); } { if (result != NULL) { if (result->apr_err != SVN_ERR_SWIG_PY_EXCEPTION_SET) svn_swig_py_svn_exception(result); else svn_error_clear(result); SWIG_fail; } Py_INCREF(Py_None); resultobj = Py_None; } { Py_XDECREF(_global_py_pool); } return resultobj; fail: { Py_XDECREF(_global_py_pool); } return NULL; } SWIGINTERN PyObject *_wrap_svn_repos_dump_fs2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; svn_repos_t *arg1 = (svn_repos_t *) 0 ; svn_stream_t *arg2 = (svn_stream_t *) 0 ; svn_stream_t *arg3 = (svn_stream_t *) 0 ; svn_revnum_t arg4 ; svn_revnum_t arg5 ; svn_boolean_t arg6 ; svn_boolean_t arg7 ; svn_cancel_func_t arg8 = (svn_cancel_func_t) 0 ; void *arg9 = (void *) 0 ; apr_pool_t *arg10 = (apr_pool_t *) 0 ; apr_pool_t *_global_pool = NULL ; PyObject *_global_py_pool = NULL ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; PyObject * obj3 = 0 ; PyObject * obj4 = 0 ; PyObject * obj5 = 0 ; PyObject * obj6 = 0 ; PyObject * obj7 = 0 ; PyObject * obj8 = 0 ; svn_error_t *result = 0 ; if (svn_swig_py_get_pool_arg(args, SWIGTYPE_p_apr_pool_t, &_global_py_pool, &_global_pool)) SWIG_fail; arg10 = _global_pool; if (!PyArg_ParseTuple(args,(char *)"OOOOOOOO|O:svn_repos_dump_fs2",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7,&obj8)) SWIG_fail; { arg1 = (svn_repos_t *)svn_swig_MustGetPtr(obj0, SWIGTYPE_p_svn_repos_t, svn_argnum_obj0); if (PyErr_Occurred()) { SWIG_fail; } } { arg2 = svn_swig_py_make_stream (obj1, _global_pool); } { arg3 = svn_swig_py_make_stream (obj2, _global_pool); } { arg4 = (svn_revnum_t)SWIG_As_long (obj3); if (SWIG_arg_fail(svn_argnum_obj3)) { SWIG_fail; } } { arg5 = (svn_revnum_t)SWIG_As_long (obj4); if (SWIG_arg_fail(svn_argnum_obj4)) { SWIG_fail; } } { arg6 = (svn_boolean_t)SWIG_As_long (obj5); if (SWIG_arg_fail(svn_argnum_obj5)) { SWIG_fail; } } { arg7 = (svn_boolean_t)SWIG_As_long (obj6); if (SWIG_arg_fail(svn_argnum_obj6)) { SWIG_fail; } } { arg8 = svn_swig_py_cancel_func; arg9 = obj7; /* our function is the baton. */ } if (obj8) { /* Verify that the user supplied a valid pool */ if (obj8 != Py_None && obj8 != _global_py_pool) { SWIG_Python_TypeError(SWIG_TypePrettyName(SWIGTYPE_p_apr_pool_t), obj8); SWIG_arg_fail(svn_argnum_obj8); SWIG_fail; } } { svn_swig_py_release_py_lock(); result = (svn_error_t *)svn_repos_dump_fs2(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10); svn_swig_py_acquire_py_lock(); } { if (result != NULL) { if (result->apr_err != SVN_ERR_SWIG_PY_EXCEPTION_SET) svn_swig_py_svn_exception(result); else svn_error_clear(result); SWIG_fail; } Py_INCREF(Py_None); resultobj = Py_None; } { Py_XDECREF(_global_py_pool); } return resultobj; fail: { Py_XDECREF(_global_py_pool); } return NULL; } SWIGINTERN PyObject *_wrap_svn_repos_dump_fs(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; svn_repos_t *arg1 = (svn_repos_t *) 0 ; svn_stream_t *arg2 = (svn_stream_t *) 0 ; svn_stream_t *arg3 = (svn_stream_t *) 0 ; svn_revnum_t arg4 ; svn_revnum_t arg5 ; svn_boolean_t arg6 ; svn_cancel_func_t arg7 = (svn_cancel_func_t) 0 ; void *arg8 = (void *) 0 ; apr_pool_t *arg9 = (apr_pool_t *) 0 ; apr_pool_t *_global_pool = NULL ; PyObject *_global_py_pool = NULL ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; PyObject * obj3 = 0 ; PyObject * obj4 = 0 ; PyObject * obj5 = 0 ; PyObject * obj6 = 0 ; PyObject * obj7 = 0 ; svn_error_t *result = 0 ; if (svn_swig_py_get_pool_arg(args, SWIGTYPE_p_apr_pool_t, &_global_py_pool, &_global_pool)) SWIG_fail; arg9 = _global_pool; if (!PyArg_ParseTuple(args,(char *)"OOOOOOO|O:svn_repos_dump_fs",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7)) SWIG_fail; { arg1 = (svn_repos_t *)svn_swig_MustGetPtr(obj0, SWIGTYPE_p_svn_repos_t, svn_argnum_obj0); if (PyErr_Occurred()) { SWIG_fail; } } { arg2 = svn_swig_py_make_stream (obj1, _global_pool); } { arg3 = svn_swig_py_make_stream (obj2, _global_pool); } { arg4 = (svn_revnum_t)SWIG_As_long (obj3); if (SWIG_arg_fail(svn_argnum_obj3)) { SWIG_fail; } } { arg5 = (svn_revnum_t)SWIG_As_long (obj4); if (SWIG_arg_fail(svn_argnum_obj4)) { SWIG_fail; } } { arg6 = (svn_boolean_t)SWIG_As_long (obj5); if (SWIG_arg_fail(svn_argnum_obj5)) { SWIG_fail; } } { arg7 = svn_swig_py_cancel_func; arg8 = obj6; /* our function is the baton. */ } if (obj7) { /* Verify that the user supplied a valid pool */ if (obj7 != Py_None && obj7 != _global_py_pool) { SWIG_Python_TypeError(SWIG_TypePrettyName(SWIGTYPE_p_apr_pool_t), obj7); SWIG_arg_fail(svn_argnum_obj7); SWIG_fail; } } { svn_swig_py_release_py_lock(); result = (svn_error_t *)svn_repos_dump_fs(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9); svn_swig_py_acquire_py_lock(); } { if (result != NULL) { if (result->apr_err != SVN_ERR_SWIG_PY_EXCEPTION_SET) svn_swig_py_svn_exception(result); else svn_error_clear(result); SWIG_fail; } Py_INCREF(Py_None); resultobj = Py_None; } { Py_XDECREF(_global_py_pool); } return resultobj; fail: { Py_XDECREF(_global_py_pool); } return NULL; } SWIGINTERN PyObject *_wrap_svn_repos_load_fs3(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; svn_repos_t *arg1 = (svn_repos_t *) 0 ; svn_stream_t *arg2 = (svn_stream_t *) 0 ; enum svn_repos_load_uuid arg3 ; char *arg4 = (char *) 0 ; svn_boolean_t arg5 ; svn_boolean_t arg6 ; svn_boolean_t arg7 ; svn_repos_notify_func_t arg8 = (svn_repos_notify_func_t) 0 ; void *arg9 = (void *) 0 ; svn_cancel_func_t arg10 = (svn_cancel_func_t) 0 ; void *arg11 = (void *) 0 ; apr_pool_t *arg12 = (apr_pool_t *) 0 ; apr_pool_t *_global_pool = NULL ; PyObject *_global_py_pool = NULL ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; PyObject * obj4 = 0 ; PyObject * obj5 = 0 ; PyObject * obj6 = 0 ; PyObject * obj7 = 0 ; PyObject * obj8 = 0 ; PyObject * obj9 = 0 ; PyObject * obj10 = 0 ; svn_error_t *result = 0 ; if (svn_swig_py_get_pool_arg(args, SWIGTYPE_p_apr_pool_t, &_global_py_pool, &_global_pool)) SWIG_fail; arg12 = _global_pool; if (!PyArg_ParseTuple(args,(char *)"OOOzOOOOOO|O:svn_repos_load_fs3",&obj0,&obj1,&obj2,&arg4,&obj4,&obj5,&obj6,&obj7,&obj8,&obj9,&obj10)) SWIG_fail; { arg1 = (svn_repos_t *)svn_swig_MustGetPtr(obj0, SWIGTYPE_p_svn_repos_t, svn_argnum_obj0); if (PyErr_Occurred()) { SWIG_fail; } } { arg2 = svn_swig_py_make_stream (obj1, _global_pool); } { arg3 = (enum svn_repos_load_uuid)SWIG_As_long (obj2); if (SWIG_arg_fail(svn_argnum_obj2)) { SWIG_fail; } } { arg5 = (svn_boolean_t)SWIG_As_long (obj4); if (SWIG_arg_fail(svn_argnum_obj4)) { SWIG_fail; } } { arg6 = (svn_boolean_t)SWIG_As_long (obj5); if (SWIG_arg_fail(svn_argnum_obj5)) { SWIG_fail; } } { arg7 = (svn_boolean_t)SWIG_As_long (obj6); if (SWIG_arg_fail(svn_argnum_obj6)) { SWIG_fail; } } { svn_repos_notify_func_t * tmp = svn_swig_MustGetPtr(obj7, SWIGTYPE_p_p_f_p_void_p_q_const__struct_svn_repos_notify_t_p_apr_pool_t__void, svn_argnum_obj7); if (tmp == NULL || PyErr_Occurred()) { SWIG_fail; } arg8 = *tmp; } { if (obj8 == Py_None) { arg9 = NULL; } else if (SWIG_ConvertPtr(obj8, (void **) &arg9, 0, 0) == -1) { arg9 = (void *) obj8; PyErr_Clear(); } } { arg10 = svn_swig_py_cancel_func; arg11 = obj9; /* our function is the baton. */ } if (obj10) { /* Verify that the user supplied a valid pool */ if (obj10 != Py_None && obj10 != _global_py_pool) { SWIG_Python_TypeError(SWIG_TypePrettyName(SWIGTYPE_p_apr_pool_t), obj10); SWIG_arg_fail(svn_argnum_obj10); SWIG_fail; } } { svn_swig_py_release_py_lock(); result = (svn_error_t *)svn_repos_load_fs3(arg1,arg2,arg3,(char const *)arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11,arg12); svn_swig_py_acquire_py_lock(); } { if (result != NULL) { if (result->apr_err != SVN_ERR_SWIG_PY_EXCEPTION_SET) svn_swig_py_svn_exception(result); else svn_error_clear(result); SWIG_fail; } Py_INCREF(Py_None); resultobj = Py_None; } { Py_XDECREF(_global_py_pool); } return resultobj; fail: { Py_XDECREF(_global_py_pool); } return NULL; } SWIGINTERN PyObject *_wrap_svn_repos_load_fs2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; svn_repos_t *arg1 = (svn_repos_t *) 0 ; svn_stream_t *arg2 = (svn_stream_t *) 0 ; svn_stream_t *arg3 = (svn_stream_t *) 0 ; enum svn_repos_load_uuid arg4 ; char *arg5 = (char *) 0 ; svn_boolean_t arg6 ; svn_boolean_t arg7 ; svn_cancel_func_t arg8 = (svn_cancel_func_t) 0 ; void *arg9 = (void *) 0 ; apr_pool_t *arg10 = (apr_pool_t *) 0 ; apr_pool_t *_global_pool = NULL ; PyObject *_global_py_pool = NULL ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; PyObject * obj3 = 0 ; PyObject * obj5 = 0 ; PyObject * obj6 = 0 ; PyObject * obj7 = 0 ; PyObject * obj8 = 0 ; svn_error_t *result = 0 ; if (svn_swig_py_get_pool_arg(args, SWIGTYPE_p_apr_pool_t, &_global_py_pool, &_global_pool)) SWIG_fail; arg10 = _global_pool; if (!PyArg_ParseTuple(args,(char *)"OOOOzOOO|O:svn_repos_load_fs2",&obj0,&obj1,&obj2,&obj3,&arg5,&obj5,&obj6,&obj7,&obj8)) SWIG_fail; { arg1 = (svn_repos_t *)svn_swig_MustGetPtr(obj0, SWIGTYPE_p_svn_repos_t, svn_argnum_obj0); if (PyErr_Occurred()) { SWIG_fail; } } { arg2 = svn_swig_py_make_stream (obj1, _global_pool); } { arg3 = svn_swig_py_make_stream (obj2, _global_pool); } { arg4 = (enum svn_repos_load_uuid)SWIG_As_long (obj3); if (SWIG_arg_fail(svn_argnum_obj3)) { SWIG_fail; } } { arg6 = (svn_boolean_t)SWIG_As_long (obj5); if (SWIG_arg_fail(svn_argnum_obj5)) { SWIG_fail; } } { arg7 = (svn_boolean_t)SWIG_As_long (obj6); if (SWIG_arg_fail(svn_argnum_obj6)) { SWIG_fail; } } { arg8 = svn_swig_py_cancel_func; arg9 = obj7; /* our function is the baton. */ } if (obj8) { /* Verify that the user supplied a valid pool */ if (obj8 != Py_None && obj8 != _global_py_pool) { SWIG_Python_TypeError(SWIG_TypePrettyName(SWIGTYPE_p_apr_pool_t), obj8); SWIG_arg_fail(svn_argnum_obj8); SWIG_fail; } } { svn_swig_py_release_py_lock(); result = (svn_error_t *)svn_repos_load_fs2(arg1,arg2,arg3,arg4,(char const *)arg5,arg6,arg7,arg8,arg9,arg10); svn_swig_py_acquire_py_lock(); } { if (result != NULL) { if (result->apr_err != SVN_ERR_SWIG_PY_EXCEPTION_SET) svn_swig_py_svn_exception(result); else svn_error_clear(result); SWIG_fail; } Py_INCREF(Py_None); resultobj = Py_None; } { Py_XDECREF(_global_py_pool); } return resultobj; fail: { Py_XDECREF(_global_py_pool); } return NULL; } SWIGINTERN PyObject *_wrap_svn_repos_load_fs(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; svn_repos_t *arg1 = (svn_repos_t *) 0 ; svn_stream_t *arg2 = (svn_stream_t *) 0 ; svn_stream_t *arg3 = (svn_stream_t *) 0 ; enum svn_repos_load_uuid arg4 ; char *arg5 = (char *) 0 ; svn_cancel_func_t arg6 = (svn_cancel_func_t) 0 ; void *arg7 = (void *) 0 ; apr_pool_t *arg8 = (apr_pool_t *) 0 ; apr_pool_t *_global_pool = NULL ; PyObject *_global_py_pool = NULL ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; PyObject * obj3 = 0 ; PyObject * obj5 = 0 ; PyObject * obj6 = 0 ; svn_error_t *result = 0 ; if (svn_swig_py_get_pool_arg(args, SWIGTYPE_p_apr_pool_t, &_global_py_pool, &_global_pool)) SWIG_fail; arg8 = _global_pool; if (!PyArg_ParseTuple(args,(char *)"OOOOzO|O:svn_repos_load_fs",&obj0,&obj1,&obj2,&obj3,&arg5,&obj5,&obj6)) SWIG_fail; { arg1 = (svn_repos_t *)svn_swig_MustGetPtr(obj0, SWIGTYPE_p_svn_repos_t, svn_argnum_obj0); if (PyErr_Occurred()) { SWIG_fail; } } { arg2 = svn_swig_py_make_stream (obj1, _global_pool); } { arg3 = svn_swig_py_make_stream (obj2, _global_pool); } { arg4 = (enum svn_repos_load_uuid)SWIG_As_long (obj3); if (SWIG_arg_fail(svn_argnum_obj3)) { SWIG_fail; } } { arg6 = svn_swig_py_cancel_func; arg7 = obj5; /* our function is the baton. */ } if (obj6) { /* Verify that the user supplied a valid pool */ if (obj6 != Py_None && obj6 != _global_py_pool) { SWIG_Python_TypeError(SWIG_TypePrettyName(SWIGTYPE_p_apr_pool_t), obj6); SWIG_arg_fail(svn_argnum_obj6); SWIG_fail; } } { svn_swig_py_release_py_lock(); result = (svn_error_t *)svn_repos_load_fs(arg1,arg2,arg3,arg4,(char const *)arg5,arg6,arg7,arg8); svn_swig_py_acquire_py_lock(); } { if (result != NULL) { if (result->apr_err != SVN_ERR_SWIG_PY_EXCEPTION_SET) svn_swig_py_svn_exception(result); else svn_error_clear(result); SWIG_fail; } Py_INCREF(Py_None); resultobj = Py_None; } { Py_XDECREF(_global_py_pool); } return resultobj; fail: { Py_XDECREF(_global_py_pool); } return NULL; } SWIGINTERN PyObject *_wrap_svn_repos_parse_fns2_t_new_revision_record_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; svn_repos_parse_fns2_t *arg1 = (svn_repos_parse_fns2_t *) 0 ; svn_error_t *(*arg2)(void **,apr_hash_t *,void *,apr_pool_t *) = (svn_error_t *(*)(void **,apr_hash_t *,void *,apr_pool_t *)) 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:svn_repos_parse_fns2_t_new_revision_record_set",&obj0,&obj1)) SWIG_fail; { arg1 = (svn_repos_parse_fns2_t *)svn_swig_MustGetPtr(obj0, SWIGTYPE_p_svn_repos_parse_fns2_t, svn_argnum_obj0); if (PyErr_Occurred()) { SWIG_fail; } } { int res = SWIG_ConvertFunctionPtr(obj1, (void**)(&arg2), SWIGTYPE_p_f_p_p_void_p_apr_hash_t_p_void_p_apr_pool_t__p_svn_error_t); if (!SWIG_IsOK(res)) { SWIG_exception_fail(SWIG_ArgError(res), "in method '" "svn_repos_parse_fns2_t_new_revision_record_set" "', argument " "2"" of type '" "svn_error_t *(*)(void **,apr_hash_t *,void *,apr_pool_t *)""'"); } } if (arg1) (arg1)->new_revision_record = arg2; resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_svn_repos_parse_fns2_t_new_revision_record_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; svn_repos_parse_fns2_t *arg1 = (svn_repos_parse_fns2_t *) 0 ; PyObject * obj0 = 0 ; svn_error_t *(*result)(void **,apr_hash_t *,void *,apr_pool_t *) = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:svn_repos_parse_fns2_t_new_revision_record_get",&obj0)) SWIG_fail; { arg1 = (svn_repos_parse_fns2_t *)svn_swig_MustGetPtr(obj0, SWIGTYPE_p_svn_repos_parse_fns2_t, svn_argnum_obj0); if (PyErr_Occurred()) { SWIG_fail; } } result = (svn_error_t *(*)(void **,apr_hash_t *,void *,apr_pool_t *)) ((arg1)->new_revision_record); resultobj = SWIG_NewFunctionPtrObj((void *)(result), SWIGTYPE_p_f_p_p_void_p_apr_hash_t_p_void_p_apr_pool_t__p_svn_error_t); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_svn_repos_parse_fns2_t_uuid_record_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; svn_repos_parse_fns2_t *arg1 = (svn_repos_parse_fns2_t *) 0 ; svn_error_t *(*arg2)(char const *,void *,apr_pool_t *) = (svn_error_t *(*)(char const *,void *,apr_pool_t *)) 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:svn_repos_parse_fns2_t_uuid_record_set",&obj0,&obj1)) SWIG_fail; { arg1 = (svn_repos_parse_fns2_t *)svn_swig_MustGetPtr(obj0, SWIGTYPE_p_svn_repos_parse_fns2_t, svn_argnum_obj0); if (PyErr_Occurred()) { SWIG_fail; } } { int res = SWIG_ConvertFunctionPtr(obj1, (void**)(&arg2), SWIGTYPE_p_f_p_q_const__char_p_void_p_apr_pool_t__p_svn_error_t); if (!SWIG_IsOK(res)) { SWIG_exception_fail(SWIG_ArgError(res), "in method '" "svn_repos_parse_fns2_t_uuid_record_set" "', argument " "2"" of type '" "svn_error_t *(*)(char const *,void *,apr_pool_t *)""'"); } } if (arg1) (arg1)->uuid_record = arg2; resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_svn_repos_parse_fns2_t_uuid_record_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; svn_repos_parse_fns2_t *arg1 = (svn_repos_parse_fns2_t *) 0 ; PyObject * obj0 = 0 ; svn_error_t *(*result)(char const *,void *,apr_pool_t *) = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:svn_repos_parse_fns2_t_uuid_record_get",&obj0)) SWIG_fail; { arg1 = (svn_repos_parse_fns2_t *)svn_swig_MustGetPtr(obj0, SWIGTYPE_p_svn_repos_parse_fns2_t, svn_argnum_obj0); if (PyErr_Occurred()) { SWIG_fail; } } result = (svn_error_t *(*)(char const *,void *,apr_pool_t *)) ((arg1)->uuid_record); resultobj = SWIG_NewFunctionPtrObj((void *)(result), SWIGTYPE_p_f_p_q_const__char_p_void_p_apr_pool_t__p_svn_error_t); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_svn_repos_parse_fns2_t_new_node_record_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; svn_repos_parse_fns2_t *arg1 = (svn_repos_parse_fns2_t *) 0 ; svn_error_t *(*arg2)(void **,apr_hash_t *,void *,apr_pool_t *) = (svn_error_t *(*)(void **,apr_hash_t *,void *,apr_pool_t *)) 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:svn_repos_parse_fns2_t_new_node_record_set",&obj0,&obj1)) SWIG_fail; { arg1 = (svn_repos_parse_fns2_t *)svn_swig_MustGetPtr(obj0, SWIGTYPE_p_svn_repos_parse_fns2_t, svn_argnum_obj0); if (PyErr_Occurred()) { SWIG_fail; } } { int res = SWIG_ConvertFunctionPtr(obj1, (void**)(&arg2), SWIGTYPE_p_f_p_p_void_p_apr_hash_t_p_void_p_apr_pool_t__p_svn_error_t); if (!SWIG_IsOK(res)) { SWIG_exception_fail(SWIG_ArgError(res), "in method '" "svn_repos_parse_fns2_t_new_node_record_set" "', argument " "2"" of type '" "svn_error_t *(*)(void **,apr_hash_t *,void *,apr_pool_t *)""'"); } } if (arg1) (arg1)->new_node_record = arg2; resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_svn_repos_parse_fns2_t_new_node_record_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; svn_repos_parse_fns2_t *arg1 = (svn_repos_parse_fns2_t *) 0 ; PyObject * obj0 = 0 ; svn_error_t *(*result)(void **,apr_hash_t *,void *,apr_pool_t *) = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:svn_repos_parse_fns2_t_new_node_record_get",&obj0)) SWIG_fail; { arg1 = (svn_repos_parse_fns2_t *)svn_swig_MustGetPtr(obj0, SWIGTYPE_p_svn_repos_parse_fns2_t, svn_argnum_obj0); if (PyErr_Occurred()) { SWIG_fail; } } result = (svn_error_t *(*)(void **,apr_hash_t *,void *,apr_pool_t *)) ((arg1)->new_node_record); resultobj = SWIG_NewFunctionPtrObj((void *)(result), SWIGTYPE_p_f_p_p_void_p_apr_hash_t_p_void_p_apr_pool_t__p_svn_error_t); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_svn_repos_parse_fns2_t_set_revision_property_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; svn_repos_parse_fns2_t *arg1 = (svn_repos_parse_fns2_t *) 0 ; svn_error_t *(*arg2)(void *,char const *,svn_string_t const *) = (svn_error_t *(*)(void *,char const *,svn_string_t const *)) 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:svn_repos_parse_fns2_t_set_revision_property_set",&obj0,&obj1)) SWIG_fail; { arg1 = (svn_repos_parse_fns2_t *)svn_swig_MustGetPtr(obj0, SWIGTYPE_p_svn_repos_parse_fns2_t, svn_argnum_obj0); if (PyErr_Occurred()) { SWIG_fail; } } { int res = SWIG_ConvertFunctionPtr(obj1, (void**)(&arg2), SWIGTYPE_p_f_p_void_p_q_const__char_p_q_const__svn_string_t__p_svn_error_t); if (!SWIG_IsOK(res)) { SWIG_exception_fail(SWIG_ArgError(res), "in method '" "svn_repos_parse_fns2_t_set_revision_property_set" "', argument " "2"" of type '" "svn_error_t *(*)(void *,char const *,svn_string_t const *)""'"); } } if (arg1) (arg1)->set_revision_property = arg2; resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_svn_repos_parse_fns2_t_set_revision_property_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; svn_repos_parse_fns2_t *arg1 = (svn_repos_parse_fns2_t *) 0 ; PyObject * obj0 = 0 ; svn_error_t *(*result)(void *,char const *,svn_string_t const *) = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:svn_repos_parse_fns2_t_set_revision_property_get",&obj0)) SWIG_fail; { arg1 = (svn_repos_parse_fns2_t *)svn_swig_MustGetPtr(obj0, SWIGTYPE_p_svn_repos_parse_fns2_t, svn_argnum_obj0); if (PyErr_Occurred()) { SWIG_fail; } } result = (svn_error_t *(*)(void *,char const *,svn_string_t const *)) ((arg1)->set_revision_property); resultobj = SWIG_NewFunctionPtrObj((void *)(result), SWIGTYPE_p_f_p_void_p_q_const__char_p_q_const__svn_string_t__p_svn_error_t); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_svn_repos_parse_fns2_t_set_node_property_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; svn_repos_parse_fns2_t *arg1 = (svn_repos_parse_fns2_t *) 0 ; svn_error_t *(*arg2)(void *,char const *,svn_string_t const *) = (svn_error_t *(*)(void *,char const *,svn_string_t const *)) 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:svn_repos_parse_fns2_t_set_node_property_set",&obj0,&obj1)) SWIG_fail; { arg1 = (svn_repos_parse_fns2_t *)svn_swig_MustGetPtr(obj0, SWIGTYPE_p_svn_repos_parse_fns2_t, svn_argnum_obj0); if (PyErr_Occurred()) { SWIG_fail; } } { int res = SWIG_ConvertFunctionPtr(obj1, (void**)(&arg2), SWIGTYPE_p_f_p_void_p_q_const__char_p_q_const__svn_string_t__p_svn_error_t); if (!SWIG_IsOK(res)) { SWIG_exception_fail(SWIG_ArgError(res), "in method '" "svn_repos_parse_fns2_t_set_node_property_set" "', argument " "2"" of type '" "svn_error_t *(*)(void *,char const *,svn_string_t const *)""'"); } } if (arg1) (arg1)->set_node_property = arg2; resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_svn_repos_parse_fns2_t_set_node_property_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; svn_repos_parse_fns2_t *arg1 = (svn_repos_parse_fns2_t *) 0 ; PyObject * obj0 = 0 ; svn_error_t *(*result)(void *,char const *,svn_string_t const *) = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:svn_repos_parse_fns2_t_set_node_property_get",&obj0)) SWIG_fail; { arg1 = (svn_repos_parse_fns2_t *)svn_swig_MustGetPtr(obj0, SWIGTYPE_p_svn_repos_parse_fns2_t, svn_argnum_obj0); if (PyErr_Occurred()) { SWIG_fail; } } result = (svn_error_t *(*)(void *,char const *,svn_string_t const *)) ((arg1)->set_node_property); resultobj = SWIG_NewFunctionPtrObj((void *)(result), SWIGTYPE_p_f_p_void_p_q_const__char_p_q_const__svn_string_t__p_svn_error_t); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_svn_repos_parse_fns2_t_delete_node_property_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; svn_repos_parse_fns2_t *arg1 = (svn_repos_parse_fns2_t *) 0 ; svn_error_t *(*arg2)(void *,char const *) = (svn_error_t *(*)(void *,char const *)) 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:svn_repos_parse_fns2_t_delete_node_property_set",&obj0,&obj1)) SWIG_fail; { arg1 = (svn_repos_parse_fns2_t *)svn_swig_MustGetPtr(obj0, SWIGTYPE_p_svn_repos_parse_fns2_t, svn_argnum_obj0); if (PyErr_Occurred()) { SWIG_fail; } } { int res = SWIG_ConvertFunctionPtr(obj1, (void**)(&arg2), SWIGTYPE_p_f_p_void_p_q_const__char__p_svn_error_t); if (!SWIG_IsOK(res)) { SWIG_exception_fail(SWIG_ArgError(res), "in method '" "svn_repos_parse_fns2_t_delete_node_property_set" "', argument " "2"" of type '" "svn_error_t *(*)(void *,char const *)""'"); } } if (arg1) (arg1)->delete_node_property = arg2; resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_svn_repos_parse_fns2_t_delete_node_property_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; svn_repos_parse_fns2_t *arg1 = (svn_repos_parse_fns2_t *) 0 ; PyObject * obj0 = 0 ; svn_error_t *(*result)(void *,char const *) = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:svn_repos_parse_fns2_t_delete_node_property_get",&obj0)) SWIG_fail; { arg1 = (svn_repos_parse_fns2_t *)svn_swig_MustGetPtr(obj0, SWIGTYPE_p_svn_repos_parse_fns2_t, svn_argnum_obj0); if (PyErr_Occurred()) { SWIG_fail; } } result = (svn_error_t *(*)(void *,char const *)) ((arg1)->delete_node_property); resultobj = SWIG_NewFunctionPtrObj((void *)(result), SWIGTYPE_p_f_p_void_p_q_const__char__p_svn_error_t); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_svn_repos_parse_fns2_t_remove_node_props_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; svn_repos_parse_fns2_t *arg1 = (svn_repos_parse_fns2_t *) 0 ; svn_error_t *(*arg2)(void *) = (svn_error_t *(*)(void *)) 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:svn_repos_parse_fns2_t_remove_node_props_set",&obj0,&obj1)) SWIG_fail; { arg1 = (svn_repos_parse_fns2_t *)svn_swig_MustGetPtr(obj0, SWIGTYPE_p_svn_repos_parse_fns2_t, svn_argnum_obj0); if (PyErr_Occurred()) { SWIG_fail; } } { int res = SWIG_ConvertFunctionPtr(obj1, (void**)(&arg2), SWIGTYPE_p_f_p_void__p_svn_error_t); if (!SWIG_IsOK(res)) { SWIG_exception_fail(SWIG_ArgError(res), "in method '" "svn_repos_parse_fns2_t_remove_node_props_set" "', argument " "2"" of type '" "svn_error_t *(*)(void *)""'"); } } if (arg1) (arg1)->remove_node_props = arg2; resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_svn_repos_parse_fns2_t_remove_node_props_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; svn_repos_parse_fns2_t *arg1 = (svn_repos_parse_fns2_t *) 0 ; PyObject * obj0 = 0 ; svn_error_t *(*result)(void *) = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:svn_repos_parse_fns2_t_remove_node_props_get",&obj0)) SWIG_fail; { arg1 = (svn_repos_parse_fns2_t *)svn_swig_MustGetPtr(obj0, SWIGTYPE_p_svn_repos_parse_fns2_t, svn_argnum_obj0); if (PyErr_Occurred()) { SWIG_fail; } } result = (svn_error_t *(*)(void *)) ((arg1)->remove_node_props); resultobj = SWIG_NewFunctionPtrObj((void *)(result), SWIGTYPE_p_f_p_void__p_svn_error_t); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_svn_repos_parse_fns2_t_set_fulltext_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; svn_repos_parse_fns2_t *arg1 = (svn_repos_parse_fns2_t *) 0 ; svn_error_t *(*arg2)(svn_stream_t **,void *) = (svn_error_t *(*)(svn_stream_t **,void *)) 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:svn_repos_parse_fns2_t_set_fulltext_set",&obj0,&obj1)) SWIG_fail; { arg1 = (svn_repos_parse_fns2_t *)svn_swig_MustGetPtr(obj0, SWIGTYPE_p_svn_repos_parse_fns2_t, svn_argnum_obj0); if (PyErr_Occurred()) { SWIG_fail; } } { int res = SWIG_ConvertFunctionPtr(obj1, (void**)(&arg2), SWIGTYPE_p_f_p_p_svn_stream_t_p_void__p_svn_error_t); if (!SWIG_IsOK(res)) { SWIG_exception_fail(SWIG_ArgError(res), "in method '" "svn_repos_parse_fns2_t_set_fulltext_set" "', argument " "2"" of type '" "svn_error_t *(*)(svn_stream_t **,void *)""'"); } } if (arg1) (arg1)->set_fulltext = arg2; resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_svn_repos_parse_fns2_t_set_fulltext_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; svn_repos_parse_fns2_t *arg1 = (svn_repos_parse_fns2_t *) 0 ; PyObject * obj0 = 0 ; svn_error_t *(*result)(svn_stream_t **,void *) = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:svn_repos_parse_fns2_t_set_fulltext_get",&obj0)) SWIG_fail; { arg1 = (svn_repos_parse_fns2_t *)svn_swig_MustGetPtr(obj0, SWIGTYPE_p_svn_repos_parse_fns2_t, svn_argnum_obj0); if (PyErr_Occurred()) { SWIG_fail; } } result = (svn_error_t *(*)(svn_stream_t **,void *)) ((arg1)->set_fulltext); resultobj = SWIG_NewFunctionPtrObj((void *)(result), SWIGTYPE_p_f_p_p_svn_stream_t_p_void__p_svn_error_t); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_svn_repos_parse_fns2_t_apply_textdelta_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; svn_repos_parse_fns2_t *arg1 = (svn_repos_parse_fns2_t *) 0 ; svn_error_t *(*arg2)(svn_txdelta_window_handler_t *,void **,void *) = (svn_error_t *(*)(svn_txdelta_window_handler_t *,void **,void *)) 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:svn_repos_parse_fns2_t_apply_textdelta_set",&obj0,&obj1)) SWIG_fail; { arg1 = (svn_repos_parse_fns2_t *)svn_swig_MustGetPtr(obj0, SWIGTYPE_p_svn_repos_parse_fns2_t, svn_argnum_obj0); if (PyErr_Occurred()) { SWIG_fail; } } { int res = SWIG_ConvertFunctionPtr(obj1, (void**)(&arg2), SWIGTYPE_p_f_p_svn_txdelta_window_handler_t_p_p_void_p_void__p_svn_error_t); if (!SWIG_IsOK(res)) { SWIG_exception_fail(SWIG_ArgError(res), "in method '" "svn_repos_parse_fns2_t_apply_textdelta_set" "', argument " "2"" of type '" "svn_error_t *(*)(svn_txdelta_window_handler_t *,void **,void *)""'"); } } if (arg1) (arg1)->apply_textdelta = arg2; resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_svn_repos_parse_fns2_t_apply_textdelta_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; svn_repos_parse_fns2_t *arg1 = (svn_repos_parse_fns2_t *) 0 ; PyObject * obj0 = 0 ; svn_error_t *(*result)(svn_txdelta_window_handler_t *,void **,void *) = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:svn_repos_parse_fns2_t_apply_textdelta_get",&obj0)) SWIG_fail; { arg1 = (svn_repos_parse_fns2_t *)svn_swig_MustGetPtr(obj0, SWIGTYPE_p_svn_repos_parse_fns2_t, svn_argnum_obj0); if (PyErr_Occurred()) { SWIG_fail; } } result = (svn_error_t *(*)(svn_txdelta_window_handler_t *,void **,void *)) ((arg1)->apply_textdelta); resultobj = SWIG_NewFunctionPtrObj((void *)(result), SWIGTYPE_p_f_p_svn_txdelta_window_handler_t_p_p_void_p_void__p_svn_error_t); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_svn_repos_parse_fns2_t_close_node_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; svn_repos_parse_fns2_t *arg1 = (svn_repos_parse_fns2_t *) 0 ; svn_error_t *(*arg2)(void *) = (svn_error_t *(*)(void *)) 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:svn_repos_parse_fns2_t_close_node_set",&obj0,&obj1)) SWIG_fail; { arg1 = (svn_repos_parse_fns2_t *)svn_swig_MustGetPtr(obj0, SWIGTYPE_p_svn_repos_parse_fns2_t, svn_argnum_obj0); if (PyErr_Occurred()) { SWIG_fail; } } { int res = SWIG_ConvertFunctionPtr(obj1, (void**)(&arg2), SWIGTYPE_p_f_p_void__p_svn_error_t); if (!SWIG_IsOK(res)) { SWIG_exception_fail(SWIG_ArgError(res), "in method '" "svn_repos_parse_fns2_t_close_node_set" "', argument " "2"" of type '" "svn_error_t *(*)(void *)""'"); } } if (arg1) (arg1)->close_node = arg2; resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_svn_repos_parse_fns2_t_close_node_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; svn_repos_parse_fns2_t *arg1 = (svn_repos_parse_fns2_t *) 0 ; PyObject * obj0 = 0 ; svn_error_t *(*result)(void *) = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:svn_repos_parse_fns2_t_close_node_get",&obj0)) SWIG_fail; { arg1 = (svn_repos_parse_fns2_t *)svn_swig_MustGetPtr(obj0, SWIGTYPE_p_svn_repos_parse_fns2_t, svn_argnum_obj0); if (PyErr_Occurred()) { SWIG_fail; } } result = (svn_error_t *(*)(void *)) ((arg1)->close_node); resultobj = SWIG_NewFunctionPtrObj((void *)(result), SWIGTYPE_p_f_p_void__p_svn_error_t); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_svn_repos_parse_fns2_t_close_revision_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; svn_repos_parse_fns2_t *arg1 = (svn_repos_parse_fns2_t *) 0 ; svn_error_t *(*arg2)(void *) = (svn_error_t *(*)(void *)) 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:svn_repos_parse_fns2_t_close_revision_set",&obj0,&obj1)) SWIG_fail; { arg1 = (svn_repos_parse_fns2_t *)svn_swig_MustGetPtr(obj0, SWIGTYPE_p_svn_repos_parse_fns2_t, svn_argnum_obj0); if (PyErr_Occurred()) { SWIG_fail; } } { int res = SWIG_ConvertFunctionPtr(obj1, (void**)(&arg2), SWIGTYPE_p_f_p_void__p_svn_error_t); if (!SWIG_IsOK(res)) { SWIG_exception_fail(SWIG_ArgError(res), "in method '" "svn_repos_parse_fns2_t_close_revision_set" "', argument " "2"" of type '" "svn_error_t *(*)(void *)""'"); } } if (arg1) (arg1)->close_revision = arg2; resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_svn_repos_parse_fns2_t_close_revision_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; svn_repos_parse_fns2_t *arg1 = (svn_repos_parse_fns2_t *) 0 ; PyObject * obj0 = 0 ; svn_error_t *(*result)(void *) = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:svn_repos_parse_fns2_t_close_revision_get",&obj0)) SWIG_fail; { arg1 = (svn_repos_parse_fns2_t *)svn_swig_MustGetPtr(obj0, SWIGTYPE_p_svn_repos_parse_fns2_t, svn_argnum_obj0); if (PyErr_Occurred()) { SWIG_fail; } } result = (svn_error_t *(*)(void *)) ((arg1)->close_revision); resultobj = SWIG_NewFunctionPtrObj((void *)(result), SWIGTYPE_p_f_p_void__p_svn_error_t); return resultobj; fail: return NULL; } SWIGINTERN PyObject *svn_repos_parse_fns2_t_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_svn_repos_parse_fns2_t, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } SWIGINTERN PyObject *_wrap_svn_repos_parse_dumpstream2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; svn_stream_t *arg1 = (svn_stream_t *) 0 ; svn_repos_parse_fns2_t *arg2 = (svn_repos_parse_fns2_t *) 0 ; void *arg3 = (void *) 0 ; svn_cancel_func_t arg4 = (svn_cancel_func_t) 0 ; void *arg5 = (void *) 0 ; apr_pool_t *arg6 = (apr_pool_t *) 0 ; apr_pool_t *_global_pool = NULL ; PyObject *_global_py_pool = NULL ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; PyObject * obj3 = 0 ; PyObject * obj4 = 0 ; svn_error_t *result = 0 ; if (svn_swig_py_get_pool_arg(args, SWIGTYPE_p_apr_pool_t, &_global_py_pool, &_global_pool)) SWIG_fail; arg6 = _global_pool; if (!PyArg_ParseTuple(args,(char *)"OOOO|O:svn_repos_parse_dumpstream2",&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail; { arg1 = svn_swig_py_make_stream (obj0, _global_pool); } { arg2 = (svn_repos_parse_fns2_t *)svn_swig_MustGetPtr(obj1, SWIGTYPE_p_svn_repos_parse_fns2_t, svn_argnum_obj1); if (PyErr_Occurred()) { SWIG_fail; } } { if (obj2 == Py_None) { arg3 = NULL; } else if (SWIG_ConvertPtr(obj2, (void **) &arg3, 0, 0) == -1) { arg3 = (void *) obj2; PyErr_Clear(); } } { arg4 = svn_swig_py_cancel_func; arg5 = obj3; /* our function is the baton. */ } if (obj4) { /* Verify that the user supplied a valid pool */ if (obj4 != Py_None && obj4 != _global_py_pool) { SWIG_Python_TypeError(SWIG_TypePrettyName(SWIGTYPE_p_apr_pool_t), obj4); SWIG_arg_fail(svn_argnum_obj4); SWIG_fail; } } { svn_swig_py_release_py_lock(); result = (svn_error_t *)svn_repos_parse_dumpstream2(arg1,(struct svn_repos_parse_fns2_t const *)arg2,arg3,arg4,arg5,arg6); svn_swig_py_acquire_py_lock(); } { if (result != NULL) { if (result->apr_err != SVN_ERR_SWIG_PY_EXCEPTION_SET) svn_swig_py_svn_exception(result); else svn_error_clear(result); SWIG_fail; } Py_INCREF(Py_None); resultobj = Py_None; } { Py_XDECREF(_global_py_pool); } return resultobj; fail: { Py_XDECREF(_global_py_pool); } return NULL; } SWIGINTERN PyObject *_wrap_svn_repos_get_fs_build_parser3(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; svn_repos_parse_fns2_t **arg1 = (svn_repos_parse_fns2_t **) 0 ; void **arg2 = (void **) 0 ; svn_repos_t *arg3 = (svn_repos_t *) 0 ; svn_boolean_t arg4 ; svn_boolean_t arg5 ; enum svn_repos_load_uuid arg6 ; char *arg7 = (char *) 0 ; svn_repos_notify_func_t arg8 = (svn_repos_notify_func_t) 0 ; void *arg9 = (void *) 0 ; apr_pool_t *arg10 = (apr_pool_t *) 0 ; apr_pool_t *_global_pool = NULL ; PyObject *_global_py_pool = NULL ; svn_repos_parse_fns2_t *temp1 ; void *temp2 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; PyObject * obj3 = 0 ; PyObject * obj5 = 0 ; PyObject * obj6 = 0 ; PyObject * obj7 = 0 ; svn_error_t *result = 0 ; if (svn_swig_py_get_pool_arg(args, SWIGTYPE_p_apr_pool_t, &_global_py_pool, &_global_pool)) SWIG_fail; arg10 = _global_pool; arg1 = &temp1; arg2 = &temp2; if (!PyArg_ParseTuple(args,(char *)"OOOOzOO|O:svn_repos_get_fs_build_parser3",&obj0,&obj1,&obj2,&obj3,&arg7,&obj5,&obj6,&obj7)) SWIG_fail; { arg3 = (svn_repos_t *)svn_swig_MustGetPtr(obj0, SWIGTYPE_p_svn_repos_t, svn_argnum_obj0); if (PyErr_Occurred()) { SWIG_fail; } } { arg4 = (svn_boolean_t)SWIG_As_long (obj1); if (SWIG_arg_fail(svn_argnum_obj1)) { SWIG_fail; } } { arg5 = (svn_boolean_t)SWIG_As_long (obj2); if (SWIG_arg_fail(svn_argnum_obj2)) { SWIG_fail; } } { arg6 = (enum svn_repos_load_uuid)SWIG_As_long (obj3); if (SWIG_arg_fail(svn_argnum_obj3)) { SWIG_fail; } } { svn_repos_notify_func_t * tmp = svn_swig_MustGetPtr(obj5, SWIGTYPE_p_p_f_p_void_p_q_const__struct_svn_repos_notify_t_p_apr_pool_t__void, svn_argnum_obj5); if (tmp == NULL || PyErr_Occurred()) { SWIG_fail; } arg8 = *tmp; } { if (obj6 == Py_None) { arg9 = NULL; } else if (SWIG_ConvertPtr(obj6, (void **) &arg9, 0, 0) == -1) { arg9 = (void *) obj6; PyErr_Clear(); } } if (obj7) { /* Verify that the user supplied a valid pool */ if (obj7 != Py_None && obj7 != _global_py_pool) { SWIG_Python_TypeError(SWIG_TypePrettyName(SWIGTYPE_p_apr_pool_t), obj7); SWIG_arg_fail(svn_argnum_obj7); SWIG_fail; } } { svn_swig_py_release_py_lock(); result = (svn_error_t *)svn_repos_get_fs_build_parser3((struct svn_repos_parse_fns2_t const **)arg1,arg2,arg3,arg4,arg5,arg6,(char const *)arg7,arg8,arg9,arg10); svn_swig_py_acquire_py_lock(); } { if (result != NULL) { if (result->apr_err != SVN_ERR_SWIG_PY_EXCEPTION_SET) svn_swig_py_svn_exception(result); else svn_error_clear(result); SWIG_fail; } Py_INCREF(Py_None); resultobj = Py_None; } { resultobj = SWIG_Python_AppendOutput(resultobj, svn_swig_NewPointerObj(*arg1, SWIGTYPE_p_svn_repos_parse_fns2_t, _global_py_pool, args)) ; } { resultobj = SWIG_Python_AppendOutput(resultobj, svn_swig_NewPointerObj(*arg2, SWIGTYPE_p_void, _global_py_pool, args)) ; } { Py_XDECREF(_global_py_pool); } return resultobj; fail: { Py_XDECREF(_global_py_pool); } return NULL; } SWIGINTERN PyObject *_wrap_svn_repos_get_fs_build_parser2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; svn_repos_parse_fns2_t **arg1 = (svn_repos_parse_fns2_t **) 0 ; void **arg2 = (void **) 0 ; svn_repos_t *arg3 = (svn_repos_t *) 0 ; svn_boolean_t arg4 ; enum svn_repos_load_uuid arg5 ; svn_stream_t *arg6 = (svn_stream_t *) 0 ; char *arg7 = (char *) 0 ; apr_pool_t *arg8 = (apr_pool_t *) 0 ; apr_pool_t *_global_pool = NULL ; PyObject *_global_py_pool = NULL ; svn_repos_parse_fns2_t *temp1 ; void *temp2 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; PyObject * obj3 = 0 ; PyObject * obj5 = 0 ; svn_error_t *result = 0 ; if (svn_swig_py_get_pool_arg(args, SWIGTYPE_p_apr_pool_t, &_global_py_pool, &_global_pool)) SWIG_fail; arg8 = _global_pool; arg1 = &temp1; arg2 = &temp2; if (!PyArg_ParseTuple(args,(char *)"OOOOz|O:svn_repos_get_fs_build_parser2",&obj0,&obj1,&obj2,&obj3,&arg7,&obj5)) SWIG_fail; { arg3 = (svn_repos_t *)svn_swig_MustGetPtr(obj0, SWIGTYPE_p_svn_repos_t, svn_argnum_obj0); if (PyErr_Occurred()) { SWIG_fail; } } { arg4 = (svn_boolean_t)SWIG_As_long (obj1); if (SWIG_arg_fail(svn_argnum_obj1)) { SWIG_fail; } } { arg5 = (enum svn_repos_load_uuid)SWIG_As_long (obj2); if (SWIG_arg_fail(svn_argnum_obj2)) { SWIG_fail; } } { arg6 = svn_swig_py_make_stream (obj3, _global_pool); } if (obj5) { /* Verify that the user supplied a valid pool */ if (obj5 != Py_None && obj5 != _global_py_pool) { SWIG_Python_TypeError(SWIG_TypePrettyName(SWIGTYPE_p_apr_pool_t), obj5); SWIG_arg_fail(svn_argnum_obj5); SWIG_fail; } } { svn_swig_py_release_py_lock(); result = (svn_error_t *)svn_repos_get_fs_build_parser2((struct svn_repos_parse_fns2_t const **)arg1,arg2,arg3,arg4,arg5,arg6,(char const *)arg7,arg8); svn_swig_py_acquire_py_lock(); } { if (result != NULL) { if (result->apr_err != SVN_ERR_SWIG_PY_EXCEPTION_SET) svn_swig_py_svn_exception(result); else svn_error_clear(result); SWIG_fail; } Py_INCREF(Py_None); resultobj = Py_None; } { resultobj = SWIG_Python_AppendOutput(resultobj, svn_swig_NewPointerObj(*arg1, SWIGTYPE_p_svn_repos_parse_fns2_t, _global_py_pool, args)) ; } { resultobj = SWIG_Python_AppendOutput(resultobj, svn_swig_NewPointerObj(*arg2, SWIGTYPE_p_void, _global_py_pool, args)) ; } { Py_XDECREF(_global_py_pool); } return resultobj; fail: { Py_XDECREF(_global_py_pool); } return NULL; } SWIGINTERN PyObject *_wrap_svn_repos_parser_fns_t_new_revision_record_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; svn_repos_parser_fns_t *arg1 = (svn_repos_parser_fns_t *) 0 ; svn_error_t *(*arg2)(void **,apr_hash_t *,void *,apr_pool_t *) = (svn_error_t *(*)(void **,apr_hash_t *,void *,apr_pool_t *)) 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:svn_repos_parser_fns_t_new_revision_record_set",&obj0,&obj1)) SWIG_fail; { arg1 = (svn_repos_parser_fns_t *)svn_swig_MustGetPtr(obj0, SWIGTYPE_p_svn_repos_parse_fns_t, svn_argnum_obj0); if (PyErr_Occurred()) { SWIG_fail; } } { int res = SWIG_ConvertFunctionPtr(obj1, (void**)(&arg2), SWIGTYPE_p_f_p_p_void_p_apr_hash_t_p_void_p_apr_pool_t__p_svn_error_t); if (!SWIG_IsOK(res)) { SWIG_exception_fail(SWIG_ArgError(res), "in method '" "svn_repos_parser_fns_t_new_revision_record_set" "', argument " "2"" of type '" "svn_error_t *(*)(void **,apr_hash_t *,void *,apr_pool_t *)""'"); } } if (arg1) (arg1)->new_revision_record = arg2; resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_svn_repos_parser_fns_t_new_revision_record_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; svn_repos_parser_fns_t *arg1 = (svn_repos_parser_fns_t *) 0 ; PyObject * obj0 = 0 ; svn_error_t *(*result)(void **,apr_hash_t *,void *,apr_pool_t *) = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:svn_repos_parser_fns_t_new_revision_record_get",&obj0)) SWIG_fail; { arg1 = (svn_repos_parser_fns_t *)svn_swig_MustGetPtr(obj0, SWIGTYPE_p_svn_repos_parse_fns_t, svn_argnum_obj0); if (PyErr_Occurred()) { SWIG_fail; } } result = (svn_error_t *(*)(void **,apr_hash_t *,void *,apr_pool_t *)) ((arg1)->new_revision_record); resultobj = SWIG_NewFunctionPtrObj((void *)(result), SWIGTYPE_p_f_p_p_void_p_apr_hash_t_p_void_p_apr_pool_t__p_svn_error_t); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_svn_repos_parser_fns_t_uuid_record_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; svn_repos_parser_fns_t *arg1 = (svn_repos_parser_fns_t *) 0 ; svn_error_t *(*arg2)(char const *,void *,apr_pool_t *) = (svn_error_t *(*)(char const *,void *,apr_pool_t *)) 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:svn_repos_parser_fns_t_uuid_record_set",&obj0,&obj1)) SWIG_fail; { arg1 = (svn_repos_parser_fns_t *)svn_swig_MustGetPtr(obj0, SWIGTYPE_p_svn_repos_parse_fns_t, svn_argnum_obj0); if (PyErr_Occurred()) { SWIG_fail; } } { int res = SWIG_ConvertFunctionPtr(obj1, (void**)(&arg2), SWIGTYPE_p_f_p_q_const__char_p_void_p_apr_pool_t__p_svn_error_t); if (!SWIG_IsOK(res)) { SWIG_exception_fail(SWIG_ArgError(res), "in method '" "svn_repos_parser_fns_t_uuid_record_set" "', argument " "2"" of type '" "svn_error_t *(*)(char const *,void *,apr_pool_t *)""'"); } } if (arg1) (arg1)->uuid_record = arg2; resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_svn_repos_parser_fns_t_uuid_record_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; svn_repos_parser_fns_t *arg1 = (svn_repos_parser_fns_t *) 0 ; PyObject * obj0 = 0 ; svn_error_t *(*result)(char const *,void *,apr_pool_t *) = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:svn_repos_parser_fns_t_uuid_record_get",&obj0)) SWIG_fail; { arg1 = (svn_repos_parser_fns_t *)svn_swig_MustGetPtr(obj0, SWIGTYPE_p_svn_repos_parse_fns_t, svn_argnum_obj0); if (PyErr_Occurred()) { SWIG_fail; } } result = (svn_error_t *(*)(char const *,void *,apr_pool_t *)) ((arg1)->uuid_record); resultobj = SWIG_NewFunctionPtrObj((void *)(result), SWIGTYPE_p_f_p_q_const__char_p_void_p_apr_pool_t__p_svn_error_t); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_svn_repos_parser_fns_t_new_node_record_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; svn_repos_parser_fns_t *arg1 = (svn_repos_parser_fns_t *) 0 ; svn_error_t *(*arg2)(void **,apr_hash_t *,void *,apr_pool_t *) = (svn_error_t *(*)(void **,apr_hash_t *,void *,apr_pool_t *)) 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:svn_repos_parser_fns_t_new_node_record_set",&obj0,&obj1)) SWIG_fail; { arg1 = (svn_repos_parser_fns_t *)svn_swig_MustGetPtr(obj0, SWIGTYPE_p_svn_repos_parse_fns_t, svn_argnum_obj0); if (PyErr_Occurred()) { SWIG_fail; } } { int res = SWIG_ConvertFunctionPtr(obj1, (void**)(&arg2), SWIGTYPE_p_f_p_p_void_p_apr_hash_t_p_void_p_apr_pool_t__p_svn_error_t); if (!SWIG_IsOK(res)) { SWIG_exception_fail(SWIG_ArgError(res), "in method '" "svn_repos_parser_fns_t_new_node_record_set" "', argument " "2"" of type '" "svn_error_t *(*)(void **,apr_hash_t *,void *,apr_pool_t *)""'"); } } if (arg1) (arg1)->new_node_record = arg2; resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_svn_repos_parser_fns_t_new_node_record_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; svn_repos_parser_fns_t *arg1 = (svn_repos_parser_fns_t *) 0 ; PyObject * obj0 = 0 ; svn_error_t *(*result)(void **,apr_hash_t *,void *,apr_pool_t *) = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:svn_repos_parser_fns_t_new_node_record_get",&obj0)) SWIG_fail; { arg1 = (svn_repos_parser_fns_t *)svn_swig_MustGetPtr(obj0, SWIGTYPE_p_svn_repos_parse_fns_t, svn_argnum_obj0); if (PyErr_Occurred()) { SWIG_fail; } } result = (svn_error_t *(*)(void **,apr_hash_t *,void *,apr_pool_t *)) ((arg1)->new_node_record); resultobj = SWIG_NewFunctionPtrObj((void *)(result), SWIGTYPE_p_f_p_p_void_p_apr_hash_t_p_void_p_apr_pool_t__p_svn_error_t); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_svn_repos_parser_fns_t_set_revision_property_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; svn_repos_parser_fns_t *arg1 = (svn_repos_parser_fns_t *) 0 ; svn_error_t *(*arg2)(void *,char const *,svn_string_t const *) = (svn_error_t *(*)(void *,char const *,svn_string_t const *)) 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:svn_repos_parser_fns_t_set_revision_property_set",&obj0,&obj1)) SWIG_fail; { arg1 = (svn_repos_parser_fns_t *)svn_swig_MustGetPtr(obj0, SWIGTYPE_p_svn_repos_parse_fns_t, svn_argnum_obj0); if (PyErr_Occurred()) { SWIG_fail; } } { int res = SWIG_ConvertFunctionPtr(obj1, (void**)(&arg2), SWIGTYPE_p_f_p_void_p_q_const__char_p_q_const__svn_string_t__p_svn_error_t); if (!SWIG_IsOK(res)) { SWIG_exception_fail(SWIG_ArgError(res), "in method '" "svn_repos_parser_fns_t_set_revision_property_set" "', argument " "2"" of type '" "svn_error_t *(*)(void *,char const *,svn_string_t const *)""'"); } } if (arg1) (arg1)->set_revision_property = arg2; resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_svn_repos_parser_fns_t_set_revision_property_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; svn_repos_parser_fns_t *arg1 = (svn_repos_parser_fns_t *) 0 ; PyObject * obj0 = 0 ; svn_error_t *(*result)(void *,char const *,svn_string_t const *) = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:svn_repos_parser_fns_t_set_revision_property_get",&obj0)) SWIG_fail; { arg1 = (svn_repos_parser_fns_t *)svn_swig_MustGetPtr(obj0, SWIGTYPE_p_svn_repos_parse_fns_t, svn_argnum_obj0); if (PyErr_Occurred()) { SWIG_fail; } } result = (svn_error_t *(*)(void *,char const *,svn_string_t const *)) ((arg1)->set_revision_property); resultobj = SWIG_NewFunctionPtrObj((void *)(result), SWIGTYPE_p_f_p_void_p_q_const__char_p_q_const__svn_string_t__p_svn_error_t); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_svn_repos_parser_fns_t_set_node_property_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; svn_repos_parser_fns_t *arg1 = (svn_repos_parser_fns_t *) 0 ; svn_error_t *(*arg2)(void *,char const *,svn_string_t const *) = (svn_error_t *(*)(void *,char const *,svn_string_t const *)) 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:svn_repos_parser_fns_t_set_node_property_set",&obj0,&obj1)) SWIG_fail; { arg1 = (svn_repos_parser_fns_t *)svn_swig_MustGetPtr(obj0, SWIGTYPE_p_svn_repos_parse_fns_t, svn_argnum_obj0); if (PyErr_Occurred()) { SWIG_fail; } } { int res = SWIG_ConvertFunctionPtr(obj1, (void**)(&arg2), SWIGTYPE_p_f_p_void_p_q_const__char_p_q_const__svn_string_t__p_svn_error_t); if (!SWIG_IsOK(res)) { SWIG_exception_fail(SWIG_ArgError(res), "in method '" "svn_repos_parser_fns_t_set_node_property_set" "', argument " "2"" of type '" "svn_error_t *(*)(void *,char const *,svn_string_t const *)""'"); } } if (arg1) (arg1)->set_node_property = arg2; resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_svn_repos_parser_fns_t_set_node_property_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; svn_repos_parser_fns_t *arg1 = (svn_repos_parser_fns_t *) 0 ; PyObject * obj0 = 0 ; svn_error_t *(*result)(void *,char const *,svn_string_t const *) = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:svn_repos_parser_fns_t_set_node_property_get",&obj0)) SWIG_fail; { arg1 = (svn_repos_parser_fns_t *)svn_swig_MustGetPtr(obj0, SWIGTYPE_p_svn_repos_parse_fns_t, svn_argnum_obj0); if (PyErr_Occurred()) { SWIG_fail; } } result = (svn_error_t *(*)(void *,char const *,svn_string_t const *)) ((arg1)->set_node_property); resultobj = SWIG_NewFunctionPtrObj((void *)(result), SWIGTYPE_p_f_p_void_p_q_const__char_p_q_const__svn_string_t__p_svn_error_t); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_svn_repos_parser_fns_t_remove_node_props_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; svn_repos_parser_fns_t *arg1 = (svn_repos_parser_fns_t *) 0 ; svn_error_t *(*arg2)(void *) = (svn_error_t *(*)(void *)) 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:svn_repos_parser_fns_t_remove_node_props_set",&obj0,&obj1)) SWIG_fail; { arg1 = (svn_repos_parser_fns_t *)svn_swig_MustGetPtr(obj0, SWIGTYPE_p_svn_repos_parse_fns_t, svn_argnum_obj0); if (PyErr_Occurred()) { SWIG_fail; } } { int res = SWIG_ConvertFunctionPtr(obj1, (void**)(&arg2), SWIGTYPE_p_f_p_void__p_svn_error_t); if (!SWIG_IsOK(res)) { SWIG_exception_fail(SWIG_ArgError(res), "in method '" "svn_repos_parser_fns_t_remove_node_props_set" "', argument " "2"" of type '" "svn_error_t *(*)(void *)""'"); } } if (arg1) (arg1)->remove_node_props = arg2; resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_svn_repos_parser_fns_t_remove_node_props_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; svn_repos_parser_fns_t *arg1 = (svn_repos_parser_fns_t *) 0 ; PyObject * obj0 = 0 ; svn_error_t *(*result)(void *) = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:svn_repos_parser_fns_t_remove_node_props_get",&obj0)) SWIG_fail; { arg1 = (svn_repos_parser_fns_t *)svn_swig_MustGetPtr(obj0, SWIGTYPE_p_svn_repos_parse_fns_t, svn_argnum_obj0); if (PyErr_Occurred()) { SWIG_fail; } } result = (svn_error_t *(*)(void *)) ((arg1)->remove_node_props); resultobj = SWIG_NewFunctionPtrObj((void *)(result), SWIGTYPE_p_f_p_void__p_svn_error_t); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_svn_repos_parser_fns_t_set_fulltext_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; svn_repos_parser_fns_t *arg1 = (svn_repos_parser_fns_t *) 0 ; svn_error_t *(*arg2)(svn_stream_t **,void *) = (svn_error_t *(*)(svn_stream_t **,void *)) 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:svn_repos_parser_fns_t_set_fulltext_set",&obj0,&obj1)) SWIG_fail; { arg1 = (svn_repos_parser_fns_t *)svn_swig_MustGetPtr(obj0, SWIGTYPE_p_svn_repos_parse_fns_t, svn_argnum_obj0); if (PyErr_Occurred()) { SWIG_fail; } } { int res = SWIG_ConvertFunctionPtr(obj1, (void**)(&arg2), SWIGTYPE_p_f_p_p_svn_stream_t_p_void__p_svn_error_t); if (!SWIG_IsOK(res)) { SWIG_exception_fail(SWIG_ArgError(res), "in method '" "svn_repos_parser_fns_t_set_fulltext_set" "', argument " "2"" of type '" "svn_error_t *(*)(svn_stream_t **,void *)""'"); } } if (arg1) (arg1)->set_fulltext = arg2; resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_svn_repos_parser_fns_t_set_fulltext_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; svn_repos_parser_fns_t *arg1 = (svn_repos_parser_fns_t *) 0 ; PyObject * obj0 = 0 ; svn_error_t *(*result)(svn_stream_t **,void *) = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:svn_repos_parser_fns_t_set_fulltext_get",&obj0)) SWIG_fail; { arg1 = (svn_repos_parser_fns_t *)svn_swig_MustGetPtr(obj0, SWIGTYPE_p_svn_repos_parse_fns_t, svn_argnum_obj0); if (PyErr_Occurred()) { SWIG_fail; } } result = (svn_error_t *(*)(svn_stream_t **,void *)) ((arg1)->set_fulltext); resultobj = SWIG_NewFunctionPtrObj((void *)(result), SWIGTYPE_p_f_p_p_svn_stream_t_p_void__p_svn_error_t); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_svn_repos_parser_fns_t_close_node_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; svn_repos_parser_fns_t *arg1 = (svn_repos_parser_fns_t *) 0 ; svn_error_t *(*arg2)(void *) = (svn_error_t *(*)(void *)) 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:svn_repos_parser_fns_t_close_node_set",&obj0,&obj1)) SWIG_fail; { arg1 = (svn_repos_parser_fns_t *)svn_swig_MustGetPtr(obj0, SWIGTYPE_p_svn_repos_parse_fns_t, svn_argnum_obj0); if (PyErr_Occurred()) { SWIG_fail; } } { int res = SWIG_ConvertFunctionPtr(obj1, (void**)(&arg2), SWIGTYPE_p_f_p_void__p_svn_error_t); if (!SWIG_IsOK(res)) { SWIG_exception_fail(SWIG_ArgError(res), "in method '" "svn_repos_parser_fns_t_close_node_set" "', argument " "2"" of type '" "svn_error_t *(*)(void *)""'"); } } if (arg1) (arg1)->close_node = arg2; resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_svn_repos_parser_fns_t_close_node_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; svn_repos_parser_fns_t *arg1 = (svn_repos_parser_fns_t *) 0 ; PyObject * obj0 = 0 ; svn_error_t *(*result)(void *) = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:svn_repos_parser_fns_t_close_node_get",&obj0)) SWIG_fail; { arg1 = (svn_repos_parser_fns_t *)svn_swig_MustGetPtr(obj0, SWIGTYPE_p_svn_repos_parse_fns_t, svn_argnum_obj0); if (PyErr_Occurred()) { SWIG_fail; } } result = (svn_error_t *(*)(void *)) ((arg1)->close_node); resultobj = SWIG_NewFunctionPtrObj((void *)(result), SWIGTYPE_p_f_p_void__p_svn_error_t); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_svn_repos_parser_fns_t_close_revision_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; svn_repos_parser_fns_t *arg1 = (svn_repos_parser_fns_t *) 0 ; svn_error_t *(*arg2)(void *) = (svn_error_t *(*)(void *)) 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:svn_repos_parser_fns_t_close_revision_set",&obj0,&obj1)) SWIG_fail; { arg1 = (svn_repos_parser_fns_t *)svn_swig_MustGetPtr(obj0, SWIGTYPE_p_svn_repos_parse_fns_t, svn_argnum_obj0); if (PyErr_Occurred()) { SWIG_fail; } } { int res = SWIG_ConvertFunctionPtr(obj1, (void**)(&arg2), SWIGTYPE_p_f_p_void__p_svn_error_t); if (!SWIG_IsOK(res)) { SWIG_exception_fail(SWIG_ArgError(res), "in method '" "svn_repos_parser_fns_t_close_revision_set" "', argument " "2"" of type '" "svn_error_t *(*)(void *)""'"); } } if (arg1) (arg1)->close_revision = arg2; resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_svn_repos_parser_fns_t_close_revision_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; svn_repos_parser_fns_t *arg1 = (svn_repos_parser_fns_t *) 0 ; PyObject * obj0 = 0 ; svn_error_t *(*result)(void *) = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:svn_repos_parser_fns_t_close_revision_get",&obj0)) SWIG_fail; { arg1 = (svn_repos_parser_fns_t *)svn_swig_MustGetPtr(obj0, SWIGTYPE_p_svn_repos_parse_fns_t, svn_argnum_obj0); if (PyErr_Occurred()) { SWIG_fail; } } result = (svn_error_t *(*)(void *)) ((arg1)->close_revision); resultobj = SWIG_NewFunctionPtrObj((void *)(result), SWIGTYPE_p_f_p_void__p_svn_error_t); return resultobj; fail: return NULL; } SWIGINTERN PyObject *svn_repos_parser_fns_t_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_svn_repos_parse_fns_t, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } SWIGINTERN PyObject *_wrap_svn_repos_parse_dumpstream(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; svn_stream_t *arg1 = (svn_stream_t *) 0 ; svn_repos_parser_fns_t *arg2 = (svn_repos_parser_fns_t *) 0 ; void *arg3 = (void *) 0 ; svn_cancel_func_t arg4 = (svn_cancel_func_t) 0 ; void *arg5 = (void *) 0 ; apr_pool_t *arg6 = (apr_pool_t *) 0 ; apr_pool_t *_global_pool = NULL ; PyObject *_global_py_pool = NULL ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; PyObject * obj3 = 0 ; PyObject * obj4 = 0 ; svn_error_t *result = 0 ; if (svn_swig_py_get_pool_arg(args, SWIGTYPE_p_apr_pool_t, &_global_py_pool, &_global_pool)) SWIG_fail; arg6 = _global_pool; if (!PyArg_ParseTuple(args,(char *)"OOOO|O:svn_repos_parse_dumpstream",&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail; { arg1 = svn_swig_py_make_stream (obj0, _global_pool); } { arg2 = (svn_repos_parser_fns_t *)svn_swig_MustGetPtr(obj1, SWIGTYPE_p_svn_repos_parse_fns_t, svn_argnum_obj1); if (PyErr_Occurred()) { SWIG_fail; } } { if (obj2 == Py_None) { arg3 = NULL; } else if (SWIG_ConvertPtr(obj2, (void **) &arg3, 0, 0) == -1) { arg3 = (void *) obj2; PyErr_Clear(); } } { arg4 = svn_swig_py_cancel_func; arg5 = obj3; /* our function is the baton. */ } if (obj4) { /* Verify that the user supplied a valid pool */ if (obj4 != Py_None && obj4 != _global_py_pool) { SWIG_Python_TypeError(SWIG_TypePrettyName(SWIGTYPE_p_apr_pool_t), obj4); SWIG_arg_fail(svn_argnum_obj4); SWIG_fail; } } { svn_swig_py_release_py_lock(); result = (svn_error_t *)svn_repos_parse_dumpstream(arg1,(struct svn_repos_parse_fns_t const *)arg2,arg3,arg4,arg5,arg6); svn_swig_py_acquire_py_lock(); } { if (result != NULL) { if (result->apr_err != SVN_ERR_SWIG_PY_EXCEPTION_SET) svn_swig_py_svn_exception(result); else svn_error_clear(result); SWIG_fail; } Py_INCREF(Py_None); resultobj = Py_None; } { Py_XDECREF(_global_py_pool); } return resultobj; fail: { Py_XDECREF(_global_py_pool); } return NULL; } SWIGINTERN PyObject *_wrap_svn_repos_get_fs_build_parser(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; svn_repos_parser_fns_t **arg1 = (svn_repos_parser_fns_t **) 0 ; void **arg2 = (void **) 0 ; svn_repos_t *arg3 = (svn_repos_t *) 0 ; svn_boolean_t arg4 ; enum svn_repos_load_uuid arg5 ; svn_stream_t *arg6 = (svn_stream_t *) 0 ; char *arg7 = (char *) 0 ; apr_pool_t *arg8 = (apr_pool_t *) 0 ; apr_pool_t *_global_pool = NULL ; PyObject *_global_py_pool = NULL ; svn_repos_parser_fns_t *temp1 ; void *temp2 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; PyObject * obj3 = 0 ; PyObject * obj5 = 0 ; svn_error_t *result = 0 ; if (svn_swig_py_get_pool_arg(args, SWIGTYPE_p_apr_pool_t, &_global_py_pool, &_global_pool)) SWIG_fail; arg8 = _global_pool; arg1 = &temp1; arg2 = &temp2; if (!PyArg_ParseTuple(args,(char *)"OOOOz|O:svn_repos_get_fs_build_parser",&obj0,&obj1,&obj2,&obj3,&arg7,&obj5)) SWIG_fail; { arg3 = (svn_repos_t *)svn_swig_MustGetPtr(obj0, SWIGTYPE_p_svn_repos_t, svn_argnum_obj0); if (PyErr_Occurred()) { SWIG_fail; } } { arg4 = (svn_boolean_t)SWIG_As_long (obj1); if (SWIG_arg_fail(svn_argnum_obj1)) { SWIG_fail; } } { arg5 = (enum svn_repos_load_uuid)SWIG_As_long (obj2); if (SWIG_arg_fail(svn_argnum_obj2)) { SWIG_fail; } } { arg6 = svn_swig_py_make_stream (obj3, _global_pool); } if (obj5) { /* Verify that the user supplied a valid pool */ if (obj5 != Py_None && obj5 != _global_py_pool) { SWIG_Python_TypeError(SWIG_TypePrettyName(SWIGTYPE_p_apr_pool_t), obj5); SWIG_arg_fail(svn_argnum_obj5); SWIG_fail; } } { svn_swig_py_release_py_lock(); result = (svn_error_t *)svn_repos_get_fs_build_parser((struct svn_repos_parse_fns_t const **)arg1,arg2,arg3,arg4,arg5,arg6,(char const *)arg7,arg8); svn_swig_py_acquire_py_lock(); } { if (result != NULL) { if (result->apr_err != SVN_ERR_SWIG_PY_EXCEPTION_SET) svn_swig_py_svn_exception(result); else svn_error_clear(result); SWIG_fail; } Py_INCREF(Py_None); resultobj = Py_None; } { resultobj = SWIG_Python_AppendOutput(resultobj, svn_swig_NewPointerObj(*arg1, SWIGTYPE_p_svn_repos_parse_fns_t, _global_py_pool, args)) ; } { resultobj = SWIG_Python_AppendOutput(resultobj, svn_swig_NewPointerObj(*arg2, SWIGTYPE_p_void, _global_py_pool, args)) ; } { Py_XDECREF(_global_py_pool); } return resultobj; fail: { Py_XDECREF(_global_py_pool); } return NULL; } SWIGINTERN PyObject *_wrap_svn_repos_authz_read(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; svn_authz_t **arg1 = (svn_authz_t **) 0 ; char *arg2 = (char *) 0 ; svn_boolean_t arg3 ; apr_pool_t *arg4 = (apr_pool_t *) 0 ; apr_pool_t *_global_pool = NULL ; PyObject *_global_py_pool = NULL ; svn_authz_t *temp1 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; svn_error_t *result = 0 ; if (svn_swig_py_get_pool_arg(args, SWIGTYPE_p_apr_pool_t, &_global_py_pool, &_global_pool)) SWIG_fail; arg4 = _global_pool; arg1 = &temp1; if (!PyArg_ParseTuple(args,(char *)"sO|O:svn_repos_authz_read",&arg2,&obj1,&obj2)) SWIG_fail; { arg3 = (svn_boolean_t)SWIG_As_long (obj1); if (SWIG_arg_fail(svn_argnum_obj1)) { SWIG_fail; } } if (obj2) { /* Verify that the user supplied a valid pool */ if (obj2 != Py_None && obj2 != _global_py_pool) { SWIG_Python_TypeError(SWIG_TypePrettyName(SWIGTYPE_p_apr_pool_t), obj2); SWIG_arg_fail(svn_argnum_obj2); SWIG_fail; } } { svn_swig_py_release_py_lock(); result = (svn_error_t *)svn_repos_authz_read(arg1,(char const *)arg2,arg3,arg4); svn_swig_py_acquire_py_lock(); } { if (result != NULL) { if (result->apr_err != SVN_ERR_SWIG_PY_EXCEPTION_SET) svn_swig_py_svn_exception(result); else svn_error_clear(result); SWIG_fail; } Py_INCREF(Py_None); resultobj = Py_None; } { resultobj = SWIG_Python_AppendOutput(resultobj, svn_swig_NewPointerObj(*arg1, SWIGTYPE_p_svn_authz_t, _global_py_pool, args)) ; } { Py_XDECREF(_global_py_pool); } return resultobj; fail: { Py_XDECREF(_global_py_pool); } return NULL; } SWIGINTERN PyObject *_wrap_svn_repos_authz_check_access(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; svn_authz_t *arg1 = (svn_authz_t *) 0 ; char *arg2 = (char *) 0 ; char *arg3 = (char *) 0 ; char *arg4 = (char *) 0 ; svn_repos_authz_access_t arg5 ; svn_boolean_t *arg6 = (svn_boolean_t *) 0 ; apr_pool_t *arg7 = (apr_pool_t *) 0 ; apr_pool_t *_global_pool = NULL ; PyObject *_global_py_pool = NULL ; svn_boolean_t temp6 ; int res6 = SWIG_TMPOBJ ; PyObject * obj0 = 0 ; PyObject * obj4 = 0 ; PyObject * obj5 = 0 ; svn_error_t *result = 0 ; if (svn_swig_py_get_pool_arg(args, SWIGTYPE_p_apr_pool_t, &_global_py_pool, &_global_pool)) SWIG_fail; arg7 = _global_pool; arg6 = &temp6; if (!PyArg_ParseTuple(args,(char *)"OsszO|O:svn_repos_authz_check_access",&obj0,&arg2,&arg3,&arg4,&obj4,&obj5)) SWIG_fail; { arg1 = (svn_authz_t *)svn_swig_MustGetPtr(obj0, SWIGTYPE_p_svn_authz_t, svn_argnum_obj0); if (PyErr_Occurred()) { SWIG_fail; } } { arg5 = (svn_repos_authz_access_t)SWIG_As_long (obj4); if (SWIG_arg_fail(svn_argnum_obj4)) { SWIG_fail; } } if (obj5) { /* Verify that the user supplied a valid pool */ if (obj5 != Py_None && obj5 != _global_py_pool) { SWIG_Python_TypeError(SWIG_TypePrettyName(SWIGTYPE_p_apr_pool_t), obj5); SWIG_arg_fail(svn_argnum_obj5); SWIG_fail; } } { svn_swig_py_release_py_lock(); result = (svn_error_t *)svn_repos_authz_check_access(arg1,(char const *)arg2,(char const *)arg3,(char const *)arg4,arg5,arg6,arg7); svn_swig_py_acquire_py_lock(); } { if (result != NULL) { if (result->apr_err != SVN_ERR_SWIG_PY_EXCEPTION_SET) svn_swig_py_svn_exception(result); else svn_error_clear(result); SWIG_fail; } Py_INCREF(Py_None); resultobj = Py_None; } if (SWIG_IsTmpObj(res6)) { resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg6))); } else { int new_flags = SWIG_IsNewObj(res6) ? (SWIG_POINTER_OWN | 0 ) : 0 ; resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg6), SWIGTYPE_p_int, new_flags)); } { Py_XDECREF(_global_py_pool); } return resultobj; fail: { Py_XDECREF(_global_py_pool); } return NULL; } SWIGINTERN PyObject *_wrap_svn_repos_check_revision_access(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; svn_repos_revision_access_level_t *arg1 = (svn_repos_revision_access_level_t *) 0 ; svn_repos_t *arg2 = (svn_repos_t *) 0 ; svn_revnum_t arg3 ; svn_repos_authz_func_t arg4 = (svn_repos_authz_func_t) 0 ; void *arg5 = (void *) 0 ; apr_pool_t *arg6 = (apr_pool_t *) 0 ; apr_pool_t *_global_pool = NULL ; PyObject *_global_py_pool = NULL ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; PyObject * obj3 = 0 ; PyObject * obj4 = 0 ; svn_error_t *result = 0 ; if (svn_swig_py_get_pool_arg(args, SWIGTYPE_p_apr_pool_t, &_global_py_pool, &_global_pool)) SWIG_fail; arg6 = _global_pool; if (!PyArg_ParseTuple(args,(char *)"OOOO|O:svn_repos_check_revision_access",&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail; { arg1 = (svn_repos_revision_access_level_t *)svn_swig_MustGetPtr(obj0, SWIGTYPE_p_svn_repos_revision_access_level_t, svn_argnum_obj0); if (PyErr_Occurred()) { SWIG_fail; } } { arg2 = (svn_repos_t *)svn_swig_MustGetPtr(obj1, SWIGTYPE_p_svn_repos_t, svn_argnum_obj1); if (PyErr_Occurred()) { SWIG_fail; } } { arg3 = (svn_revnum_t)SWIG_As_long (obj2); if (SWIG_arg_fail(svn_argnum_obj2)) { SWIG_fail; } } { /* FIXME: Handle the NULL case. */ arg4 = svn_swig_py_repos_authz_func; arg5 = obj3; } if (obj4) { /* Verify that the user supplied a valid pool */ if (obj4 != Py_None && obj4 != _global_py_pool) { SWIG_Python_TypeError(SWIG_TypePrettyName(SWIGTYPE_p_apr_pool_t), obj4); SWIG_arg_fail(svn_argnum_obj4); SWIG_fail; } } { svn_swig_py_release_py_lock(); result = (svn_error_t *)svn_repos_check_revision_access(arg1,arg2,arg3,arg4,arg5,arg6); svn_swig_py_acquire_py_lock(); } { if (result != NULL) { if (result->apr_err != SVN_ERR_SWIG_PY_EXCEPTION_SET) svn_swig_py_svn_exception(result); else svn_error_clear(result); SWIG_fail; } Py_INCREF(Py_None); resultobj = Py_None; } { Py_XDECREF(_global_py_pool); } return resultobj; fail: { Py_XDECREF(_global_py_pool); } return NULL; } SWIGINTERN PyObject *_wrap_svn_repos_remember_client_capabilities(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; svn_repos_t *arg1 = (svn_repos_t *) 0 ; apr_array_header_t *arg2 = (apr_array_header_t *) 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; svn_error_t *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:svn_repos_remember_client_capabilities",&obj0,&obj1)) SWIG_fail; { arg1 = (svn_repos_t *)svn_swig_MustGetPtr(obj0, SWIGTYPE_p_svn_repos_t, svn_argnum_obj0); if (PyErr_Occurred()) { SWIG_fail; } } { arg2 = (apr_array_header_t *)svn_swig_MustGetPtr(obj1, SWIGTYPE_p_apr_array_header_t, svn_argnum_obj1); if (PyErr_Occurred()) { SWIG_fail; } } { svn_swig_py_release_py_lock(); result = (svn_error_t *)svn_repos_remember_client_capabilities(arg1,(apr_array_header_t const *)arg2); svn_swig_py_acquire_py_lock(); } { if (result != NULL) { if (result->apr_err != SVN_ERR_SWIG_PY_EXCEPTION_SET) svn_swig_py_svn_exception(result); else svn_error_clear(result); SWIG_fail; } Py_INCREF(Py_None); resultobj = Py_None; } return resultobj; fail: return NULL; } SWIGINTERN PyObject *svn_repos_t_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_svn_repos_t, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } SWIGINTERN PyObject *svn_authz_t_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_svn_authz_t, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } SWIGINTERN PyObject *_wrap_svn_repos_parse_fns2_invoke_new_revision_record(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; svn_repos_parse_fns2_t *arg1 = (svn_repos_parse_fns2_t *) 0 ; void **arg2 = (void **) 0 ; apr_hash_t *arg3 = (apr_hash_t *) 0 ; void *arg4 = (void *) 0 ; apr_pool_t *arg5 = (apr_pool_t *) 0 ; apr_pool_t *_global_pool = NULL ; PyObject *_global_py_pool = NULL ; void *temp2 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; PyObject * obj3 = 0 ; svn_error_t *result = 0 ; if (svn_swig_py_get_pool_arg(args, SWIGTYPE_p_apr_pool_t, &_global_py_pool, &_global_pool)) SWIG_fail; arg5 = _global_pool; arg2 = &temp2; if (!PyArg_ParseTuple(args,(char *)"OOO|O:svn_repos_parse_fns2_invoke_new_revision_record",&obj0,&obj1,&obj2,&obj3)) SWIG_fail; { arg1 = (svn_repos_parse_fns2_t *)svn_swig_MustGetPtr(obj0, SWIGTYPE_p_svn_repos_parse_fns2_t, svn_argnum_obj0); if (PyErr_Occurred()) { SWIG_fail; } } { arg3 = (apr_hash_t *)svn_swig_MustGetPtr(obj1, SWIGTYPE_p_apr_hash_t, svn_argnum_obj1); if (PyErr_Occurred()) { SWIG_fail; } } { if (obj2 == Py_None) { arg4 = NULL; } else if (SWIG_ConvertPtr(obj2, (void **) &arg4, 0, 0) == -1) { arg4 = (void *) obj2; PyErr_Clear(); } } if (obj3) { /* Verify that the user supplied a valid pool */ if (obj3 != Py_None && obj3 != _global_py_pool) { SWIG_Python_TypeError(SWIG_TypePrettyName(SWIGTYPE_p_apr_pool_t), obj3); SWIG_arg_fail(svn_argnum_obj3); SWIG_fail; } } { svn_swig_py_release_py_lock(); result = (svn_error_t *)svn_repos_parse_fns2_invoke_new_revision_record(arg1,arg2,arg3,arg4,arg5); svn_swig_py_acquire_py_lock(); } { if (result != NULL) { if (result->apr_err != SVN_ERR_SWIG_PY_EXCEPTION_SET) svn_swig_py_svn_exception(result); else svn_error_clear(result); SWIG_fail; } Py_INCREF(Py_None); resultobj = Py_None; } { resultobj = SWIG_Python_AppendOutput(resultobj, svn_swig_NewPointerObj(*arg2, SWIGTYPE_p_void, _global_py_pool, args)) ; } { Py_XDECREF(_global_py_pool); } return resultobj; fail: { Py_XDECREF(_global_py_pool); } return NULL; } SWIGINTERN PyObject *_wrap_svn_repos_parse_fns2_invoke_uuid_record(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; svn_repos_parse_fns2_t *arg1 = (svn_repos_parse_fns2_t *) 0 ; char *arg2 = (char *) 0 ; void *arg3 = (void *) 0 ; apr_pool_t *arg4 = (apr_pool_t *) 0 ; apr_pool_t *_global_pool = NULL ; PyObject *_global_py_pool = NULL ; PyObject * obj0 = 0 ; PyObject * obj2 = 0 ; PyObject * obj3 = 0 ; svn_error_t *result = 0 ; if (svn_swig_py_get_pool_arg(args, SWIGTYPE_p_apr_pool_t, &_global_py_pool, &_global_pool)) SWIG_fail; arg4 = _global_pool; if (!PyArg_ParseTuple(args,(char *)"OzO|O:svn_repos_parse_fns2_invoke_uuid_record",&obj0,&arg2,&obj2,&obj3)) SWIG_fail; { arg1 = (svn_repos_parse_fns2_t *)svn_swig_MustGetPtr(obj0, SWIGTYPE_p_svn_repos_parse_fns2_t, svn_argnum_obj0); if (PyErr_Occurred()) { SWIG_fail; } } { if (obj2 == Py_None) { arg3 = NULL; } else if (SWIG_ConvertPtr(obj2, (void **) &arg3, 0, 0) == -1) { arg3 = (void *) obj2; PyErr_Clear(); } } if (obj3) { /* Verify that the user supplied a valid pool */ if (obj3 != Py_None && obj3 != _global_py_pool) { SWIG_Python_TypeError(SWIG_TypePrettyName(SWIGTYPE_p_apr_pool_t), obj3); SWIG_arg_fail(svn_argnum_obj3); SWIG_fail; } } { svn_swig_py_release_py_lock(); result = (svn_error_t *)svn_repos_parse_fns2_invoke_uuid_record(arg1,(char const *)arg2,arg3,arg4); svn_swig_py_acquire_py_lock(); } { if (result != NULL) { if (result->apr_err != SVN_ERR_SWIG_PY_EXCEPTION_SET) svn_swig_py_svn_exception(result); else svn_error_clear(result); SWIG_fail; } Py_INCREF(Py_None); resultobj = Py_None; } { Py_XDECREF(_global_py_pool); } return resultobj; fail: { Py_XDECREF(_global_py_pool); } return NULL; } SWIGINTERN PyObject *_wrap_svn_repos_parse_fns2_invoke_new_node_record(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; svn_repos_parse_fns2_t *arg1 = (svn_repos_parse_fns2_t *) 0 ; void **arg2 = (void **) 0 ; apr_hash_t *arg3 = (apr_hash_t *) 0 ; void *arg4 = (void *) 0 ; apr_pool_t *arg5 = (apr_pool_t *) 0 ; apr_pool_t *_global_pool = NULL ; PyObject *_global_py_pool = NULL ; void *temp2 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; PyObject * obj3 = 0 ; svn_error_t *result = 0 ; if (svn_swig_py_get_pool_arg(args, SWIGTYPE_p_apr_pool_t, &_global_py_pool, &_global_pool)) SWIG_fail; arg5 = _global_pool; arg2 = &temp2; if (!PyArg_ParseTuple(args,(char *)"OOO|O:svn_repos_parse_fns2_invoke_new_node_record",&obj0,&obj1,&obj2,&obj3)) SWIG_fail; { arg1 = (svn_repos_parse_fns2_t *)svn_swig_MustGetPtr(obj0, SWIGTYPE_p_svn_repos_parse_fns2_t, svn_argnum_obj0); if (PyErr_Occurred()) { SWIG_fail; } } { arg3 = (apr_hash_t *)svn_swig_MustGetPtr(obj1, SWIGTYPE_p_apr_hash_t, svn_argnum_obj1); if (PyErr_Occurred()) { SWIG_fail; } } { if (obj2 == Py_None) { arg4 = NULL; } else if (SWIG_ConvertPtr(obj2, (void **) &arg4, 0, 0) == -1) { arg4 = (void *) obj2; PyErr_Clear(); } } if (obj3) { /* Verify that the user supplied a valid pool */ if (obj3 != Py_None && obj3 != _global_py_pool) { SWIG_Python_TypeError(SWIG_TypePrettyName(SWIGTYPE_p_apr_pool_t), obj3); SWIG_arg_fail(svn_argnum_obj3); SWIG_fail; } } { svn_swig_py_release_py_lock(); result = (svn_error_t *)svn_repos_parse_fns2_invoke_new_node_record(arg1,arg2,arg3,arg4,arg5); svn_swig_py_acquire_py_lock(); } { if (result != NULL) { if (result->apr_err != SVN_ERR_SWIG_PY_EXCEPTION_SET) svn_swig_py_svn_exception(result); else svn_error_clear(result); SWIG_fail; } Py_INCREF(Py_None); resultobj = Py_None; } { resultobj = SWIG_Python_AppendOutput(resultobj, svn_swig_NewPointerObj(*arg2, SWIGTYPE_p_void, _global_py_pool, args)) ; } { Py_XDECREF(_global_py_pool); } return resultobj; fail: { Py_XDECREF(_global_py_pool); } return NULL; } SWIGINTERN PyObject *_wrap_svn_repos_parse_fns2_invoke_set_revision_property(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; svn_repos_parse_fns2_t *arg1 = (svn_repos_parse_fns2_t *) 0 ; void *arg2 = (void *) 0 ; char *arg3 = (char *) 0 ; svn_string_t *arg4 = (svn_string_t *) 0 ; svn_string_t value4 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj3 = 0 ; svn_error_t *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"OOsO:svn_repos_parse_fns2_invoke_set_revision_property",&obj0,&obj1,&arg3,&obj3)) SWIG_fail; { arg1 = (svn_repos_parse_fns2_t *)svn_swig_MustGetPtr(obj0, SWIGTYPE_p_svn_repos_parse_fns2_t, svn_argnum_obj0); if (PyErr_Occurred()) { SWIG_fail; } } { if (obj1 == Py_None) { arg2 = NULL; } else if (SWIG_ConvertPtr(obj1, (void **) &arg2, 0, 0) == -1) { arg2 = (void *) obj1; PyErr_Clear(); } } { if (obj3 == Py_None) arg4 = NULL; else { if (!PyString_Check(obj3)) { PyErr_SetString(PyExc_TypeError, "not a string"); SWIG_fail; } value4.data = PyString_AS_STRING(obj3); value4.len = PyString_GET_SIZE(obj3); arg4 = &value4; } } { svn_swig_py_release_py_lock(); result = (svn_error_t *)svn_repos_parse_fns2_invoke_set_revision_property(arg1,arg2,(char const *)arg3,(struct svn_string_t const *)arg4); svn_swig_py_acquire_py_lock(); } { if (result != NULL) { if (result->apr_err != SVN_ERR_SWIG_PY_EXCEPTION_SET) svn_swig_py_svn_exception(result); else svn_error_clear(result); SWIG_fail; } Py_INCREF(Py_None); resultobj = Py_None; } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_svn_repos_parse_fns2_invoke_set_node_property(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; svn_repos_parse_fns2_t *arg1 = (svn_repos_parse_fns2_t *) 0 ; void *arg2 = (void *) 0 ; char *arg3 = (char *) 0 ; svn_string_t *arg4 = (svn_string_t *) 0 ; svn_string_t value4 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj3 = 0 ; svn_error_t *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"OOsO:svn_repos_parse_fns2_invoke_set_node_property",&obj0,&obj1,&arg3,&obj3)) SWIG_fail; { arg1 = (svn_repos_parse_fns2_t *)svn_swig_MustGetPtr(obj0, SWIGTYPE_p_svn_repos_parse_fns2_t, svn_argnum_obj0); if (PyErr_Occurred()) { SWIG_fail; } } { if (obj1 == Py_None) { arg2 = NULL; } else if (SWIG_ConvertPtr(obj1, (void **) &arg2, 0, 0) == -1) { arg2 = (void *) obj1; PyErr_Clear(); } } { if (obj3 == Py_None) arg4 = NULL; else { if (!PyString_Check(obj3)) { PyErr_SetString(PyExc_TypeError, "not a string"); SWIG_fail; } value4.data = PyString_AS_STRING(obj3); value4.len = PyString_GET_SIZE(obj3); arg4 = &value4; } } { svn_swig_py_release_py_lock(); result = (svn_error_t *)svn_repos_parse_fns2_invoke_set_node_property(arg1,arg2,(char const *)arg3,(struct svn_string_t const *)arg4); svn_swig_py_acquire_py_lock(); } { if (result != NULL) { if (result->apr_err != SVN_ERR_SWIG_PY_EXCEPTION_SET) svn_swig_py_svn_exception(result); else svn_error_clear(result); SWIG_fail; } Py_INCREF(Py_None); resultobj = Py_None; } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_svn_repos_parse_fns2_invoke_delete_node_property(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; svn_repos_parse_fns2_t *arg1 = (svn_repos_parse_fns2_t *) 0 ; void *arg2 = (void *) 0 ; char *arg3 = (char *) 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; svn_error_t *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"OOs:svn_repos_parse_fns2_invoke_delete_node_property",&obj0,&obj1,&arg3)) SWIG_fail; { arg1 = (svn_repos_parse_fns2_t *)svn_swig_MustGetPtr(obj0, SWIGTYPE_p_svn_repos_parse_fns2_t, svn_argnum_obj0); if (PyErr_Occurred()) { SWIG_fail; } } { if (obj1 == Py_None) { arg2 = NULL; } else if (SWIG_ConvertPtr(obj1, (void **) &arg2, 0, 0) == -1) { arg2 = (void *) obj1; PyErr_Clear(); } } { svn_swig_py_release_py_lock(); result = (svn_error_t *)svn_repos_parse_fns2_invoke_delete_node_property(arg1,arg2,(char const *)arg3); svn_swig_py_acquire_py_lock(); } { if (result != NULL) { if (result->apr_err != SVN_ERR_SWIG_PY_EXCEPTION_SET) svn_swig_py_svn_exception(result); else svn_error_clear(result); SWIG_fail; } Py_INCREF(Py_None); resultobj = Py_None; } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_svn_repos_parse_fns2_invoke_remove_node_props(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; svn_repos_parse_fns2_t *arg1 = (svn_repos_parse_fns2_t *) 0 ; void *arg2 = (void *) 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; svn_error_t *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:svn_repos_parse_fns2_invoke_remove_node_props",&obj0,&obj1)) SWIG_fail; { arg1 = (svn_repos_parse_fns2_t *)svn_swig_MustGetPtr(obj0, SWIGTYPE_p_svn_repos_parse_fns2_t, svn_argnum_obj0); if (PyErr_Occurred()) { SWIG_fail; } } { if (obj1 == Py_None) { arg2 = NULL; } else if (SWIG_ConvertPtr(obj1, (void **) &arg2, 0, 0) == -1) { arg2 = (void *) obj1; PyErr_Clear(); } } { svn_swig_py_release_py_lock(); result = (svn_error_t *)svn_repos_parse_fns2_invoke_remove_node_props(arg1,arg2); svn_swig_py_acquire_py_lock(); } { if (result != NULL) { if (result->apr_err != SVN_ERR_SWIG_PY_EXCEPTION_SET) svn_swig_py_svn_exception(result); else svn_error_clear(result); SWIG_fail; } Py_INCREF(Py_None); resultobj = Py_None; } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_svn_repos_parse_fns2_invoke_set_fulltext(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; svn_repos_parse_fns2_t *arg1 = (svn_repos_parse_fns2_t *) 0 ; svn_stream_t **arg2 = (svn_stream_t **) 0 ; void *arg3 = (void *) 0 ; svn_stream_t *temp2 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; svn_error_t *result = 0 ; arg2 = &temp2; if (!PyArg_ParseTuple(args,(char *)"OO:svn_repos_parse_fns2_invoke_set_fulltext",&obj0,&obj1)) SWIG_fail; { arg1 = (svn_repos_parse_fns2_t *)svn_swig_MustGetPtr(obj0, SWIGTYPE_p_svn_repos_parse_fns2_t, svn_argnum_obj0); if (PyErr_Occurred()) { SWIG_fail; } } { if (obj1 == Py_None) { arg3 = NULL; } else if (SWIG_ConvertPtr(obj1, (void **) &arg3, 0, 0) == -1) { arg3 = (void *) obj1; PyErr_Clear(); } } { svn_swig_py_release_py_lock(); result = (svn_error_t *)svn_repos_parse_fns2_invoke_set_fulltext(arg1,arg2,arg3); svn_swig_py_acquire_py_lock(); } { if (result != NULL) { if (result->apr_err != SVN_ERR_SWIG_PY_EXCEPTION_SET) svn_swig_py_svn_exception(result); else svn_error_clear(result); SWIG_fail; } Py_INCREF(Py_None); resultobj = Py_None; } { resultobj = SWIG_Python_AppendOutput(resultobj, svn_swig_NewPointerObj(*arg2, SWIGTYPE_p_svn_stream_t, _global_py_pool, args)) ; } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_svn_repos_parse_fns2_invoke_apply_textdelta(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; svn_repos_parse_fns2_t *arg1 = (svn_repos_parse_fns2_t *) 0 ; svn_txdelta_window_handler_t *arg2 = (svn_txdelta_window_handler_t *) 0 ; void **arg3 = (void **) 0 ; void *arg4 = (void *) 0 ; apr_pool_t *_global_pool = NULL ; PyObject *_global_py_pool = NULL ; void *temp3 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; svn_error_t *result = 0 ; { if (_global_pool == NULL) { if (svn_swig_py_get_parent_pool(args, SWIGTYPE_p_apr_pool_t, &_global_py_pool, &_global_pool)) SWIG_fail; } arg2 = (svn_txdelta_window_handler_t *) apr_pcalloc(_global_pool, sizeof(svn_txdelta_window_handler_t)); if (arg2 == NULL) SWIG_fail; } arg3 = &temp3; if (!PyArg_ParseTuple(args,(char *)"OO:svn_repos_parse_fns2_invoke_apply_textdelta",&obj0,&obj1)) SWIG_fail; { arg1 = (svn_repos_parse_fns2_t *)svn_swig_MustGetPtr(obj0, SWIGTYPE_p_svn_repos_parse_fns2_t, svn_argnum_obj0); if (PyErr_Occurred()) { SWIG_fail; } } { if (obj1 == Py_None) { arg4 = NULL; } else if (SWIG_ConvertPtr(obj1, (void **) &arg4, 0, 0) == -1) { arg4 = (void *) obj1; PyErr_Clear(); } } { svn_swig_py_release_py_lock(); result = (svn_error_t *)svn_repos_parse_fns2_invoke_apply_textdelta(arg1,arg2,arg3,arg4); svn_swig_py_acquire_py_lock(); } { if (result != NULL) { if (result->apr_err != SVN_ERR_SWIG_PY_EXCEPTION_SET) svn_swig_py_svn_exception(result); else svn_error_clear(result); SWIG_fail; } Py_INCREF(Py_None); resultobj = Py_None; } { resultobj = SWIG_Python_AppendOutput(resultobj, svn_swig_NewPointerObj(arg2, SWIGTYPE_p_p_f_p_svn_txdelta_window_t_p_void__p_svn_error_t, _global_py_pool, args)) ; } { resultobj = SWIG_Python_AppendOutput(resultobj, svn_swig_NewPointerObj(*arg3, SWIGTYPE_p_void, _global_py_pool, args)) ; } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_svn_repos_parse_fns2_invoke_close_node(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; svn_repos_parse_fns2_t *arg1 = (svn_repos_parse_fns2_t *) 0 ; void *arg2 = (void *) 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; svn_error_t *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:svn_repos_parse_fns2_invoke_close_node",&obj0,&obj1)) SWIG_fail; { arg1 = (svn_repos_parse_fns2_t *)svn_swig_MustGetPtr(obj0, SWIGTYPE_p_svn_repos_parse_fns2_t, svn_argnum_obj0); if (PyErr_Occurred()) { SWIG_fail; } } { if (obj1 == Py_None) { arg2 = NULL; } else if (SWIG_ConvertPtr(obj1, (void **) &arg2, 0, 0) == -1) { arg2 = (void *) obj1; PyErr_Clear(); } } { svn_swig_py_release_py_lock(); result = (svn_error_t *)svn_repos_parse_fns2_invoke_close_node(arg1,arg2); svn_swig_py_acquire_py_lock(); } { if (result != NULL) { if (result->apr_err != SVN_ERR_SWIG_PY_EXCEPTION_SET) svn_swig_py_svn_exception(result); else svn_error_clear(result); SWIG_fail; } Py_INCREF(Py_None); resultobj = Py_None; } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_svn_repos_parse_fns2_invoke_close_revision(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; svn_repos_parse_fns2_t *arg1 = (svn_repos_parse_fns2_t *) 0 ; void *arg2 = (void *) 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; svn_error_t *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:svn_repos_parse_fns2_invoke_close_revision",&obj0,&obj1)) SWIG_fail; { arg1 = (svn_repos_parse_fns2_t *)svn_swig_MustGetPtr(obj0, SWIGTYPE_p_svn_repos_parse_fns2_t, svn_argnum_obj0); if (PyErr_Occurred()) { SWIG_fail; } } { if (obj1 == Py_None) { arg2 = NULL; } else if (SWIG_ConvertPtr(obj1, (void **) &arg2, 0, 0) == -1) { arg2 = (void *) obj1; PyErr_Clear(); } } { svn_swig_py_release_py_lock(); result = (svn_error_t *)svn_repos_parse_fns2_invoke_close_revision(arg1,arg2); svn_swig_py_acquire_py_lock(); } { if (result != NULL) { if (result->apr_err != SVN_ERR_SWIG_PY_EXCEPTION_SET) svn_swig_py_svn_exception(result); else svn_error_clear(result); SWIG_fail; } Py_INCREF(Py_None); resultobj = Py_None; } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_svn_repos_invoke_authz_func(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; svn_repos_authz_func_t arg1 = (svn_repos_authz_func_t) 0 ; svn_boolean_t *arg2 = (svn_boolean_t *) 0 ; svn_fs_root_t *arg3 = (svn_fs_root_t *) 0 ; char *arg4 = (char *) 0 ; void *arg5 = (void *) 0 ; apr_pool_t *arg6 = (apr_pool_t *) 0 ; apr_pool_t *_global_pool = NULL ; PyObject *_global_py_pool = NULL ; svn_boolean_t temp2 ; int res2 = SWIG_TMPOBJ ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj3 = 0 ; PyObject * obj4 = 0 ; svn_error_t *result = 0 ; if (svn_swig_py_get_pool_arg(args, SWIGTYPE_p_apr_pool_t, &_global_py_pool, &_global_pool)) SWIG_fail; arg6 = _global_pool; arg2 = &temp2; if (!PyArg_ParseTuple(args,(char *)"OOsO|O:svn_repos_invoke_authz_func",&obj0,&obj1,&arg4,&obj3,&obj4)) SWIG_fail; { svn_repos_authz_func_t * tmp = svn_swig_MustGetPtr(obj0, SWIGTYPE_p_p_f_p_svn_boolean_t_p_svn_fs_root_t_p_q_const__char_p_void_p_apr_pool_t__p_svn_error_t, svn_argnum_obj0); if (tmp == NULL || PyErr_Occurred()) { SWIG_fail; } arg1 = *tmp; } { arg3 = (svn_fs_root_t *)svn_swig_MustGetPtr(obj1, SWIGTYPE_p_svn_fs_root_t, svn_argnum_obj1); if (PyErr_Occurred()) { SWIG_fail; } } { if (obj3 == Py_None) { arg5 = NULL; } else if (SWIG_ConvertPtr(obj3, (void **) &arg5, 0, 0) == -1) { arg5 = (void *) obj3; PyErr_Clear(); } } if (obj4) { /* Verify that the user supplied a valid pool */ if (obj4 != Py_None && obj4 != _global_py_pool) { SWIG_Python_TypeError(SWIG_TypePrettyName(SWIGTYPE_p_apr_pool_t), obj4); SWIG_arg_fail(svn_argnum_obj4); SWIG_fail; } } { svn_swig_py_release_py_lock(); result = (svn_error_t *)svn_repos_invoke_authz_func(arg1,arg2,arg3,(char const *)arg4,arg5,arg6); svn_swig_py_acquire_py_lock(); } { if (result != NULL) { if (result->apr_err != SVN_ERR_SWIG_PY_EXCEPTION_SET) svn_swig_py_svn_exception(result); else svn_error_clear(result); SWIG_fail; } Py_INCREF(Py_None); resultobj = Py_None; } if (SWIG_IsTmpObj(res2)) { resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg2))); } else { int new_flags = SWIG_IsNewObj(res2) ? (SWIG_POINTER_OWN | 0 ) : 0 ; resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg2), SWIGTYPE_p_int, new_flags)); } { Py_XDECREF(_global_py_pool); } return resultobj; fail: { Py_XDECREF(_global_py_pool); } return NULL; } SWIGINTERN PyObject *_wrap_svn_repos_invoke_authz_callback(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; svn_repos_authz_callback_t arg1 = (svn_repos_authz_callback_t) 0 ; svn_repos_authz_access_t arg2 ; svn_boolean_t *arg3 = (svn_boolean_t *) 0 ; svn_fs_root_t *arg4 = (svn_fs_root_t *) 0 ; char *arg5 = (char *) 0 ; void *arg6 = (void *) 0 ; apr_pool_t *arg7 = (apr_pool_t *) 0 ; apr_pool_t *_global_pool = NULL ; PyObject *_global_py_pool = NULL ; svn_boolean_t temp3 ; int res3 = SWIG_TMPOBJ ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; PyObject * obj4 = 0 ; PyObject * obj5 = 0 ; svn_error_t *result = 0 ; if (svn_swig_py_get_pool_arg(args, SWIGTYPE_p_apr_pool_t, &_global_py_pool, &_global_pool)) SWIG_fail; arg7 = _global_pool; arg3 = &temp3; if (!PyArg_ParseTuple(args,(char *)"OOOsO|O:svn_repos_invoke_authz_callback",&obj0,&obj1,&obj2,&arg5,&obj4,&obj5)) SWIG_fail; { svn_repos_authz_callback_t * tmp = svn_swig_MustGetPtr(obj0, SWIGTYPE_p_p_f_svn_repos_authz_access_t_p_svn_boolean_t_p_svn_fs_root_t_p_q_const__char_p_void_p_apr_pool_t__p_svn_error_t, svn_argnum_obj0); if (tmp == NULL || PyErr_Occurred()) { SWIG_fail; } arg1 = *tmp; } { arg2 = (svn_repos_authz_access_t)SWIG_As_long (obj1); if (SWIG_arg_fail(svn_argnum_obj1)) { SWIG_fail; } } { arg4 = (svn_fs_root_t *)svn_swig_MustGetPtr(obj2, SWIGTYPE_p_svn_fs_root_t, svn_argnum_obj2); if (PyErr_Occurred()) { SWIG_fail; } } { if (obj4 == Py_None) { arg6 = NULL; } else if (SWIG_ConvertPtr(obj4, (void **) &arg6, 0, 0) == -1) { arg6 = (void *) obj4; PyErr_Clear(); } } if (obj5) { /* Verify that the user supplied a valid pool */ if (obj5 != Py_None && obj5 != _global_py_pool) { SWIG_Python_TypeError(SWIG_TypePrettyName(SWIGTYPE_p_apr_pool_t), obj5); SWIG_arg_fail(svn_argnum_obj5); SWIG_fail; } } { svn_swig_py_release_py_lock(); result = (svn_error_t *)svn_repos_invoke_authz_callback(arg1,arg2,arg3,arg4,(char const *)arg5,arg6,arg7); svn_swig_py_acquire_py_lock(); } { if (result != NULL) { if (result->apr_err != SVN_ERR_SWIG_PY_EXCEPTION_SET) svn_swig_py_svn_exception(result); else svn_error_clear(result); SWIG_fail; } Py_INCREF(Py_None); resultobj = Py_None; } if (SWIG_IsTmpObj(res3)) { resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg3))); } else { int new_flags = SWIG_IsNewObj(res3) ? (SWIG_POINTER_OWN | 0 ) : 0 ; resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg3), SWIGTYPE_p_int, new_flags)); } { Py_XDECREF(_global_py_pool); } return resultobj; fail: { Py_XDECREF(_global_py_pool); } return NULL; } SWIGINTERN PyObject *_wrap_svn_repos_invoke_file_rev_handler(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; svn_repos_file_rev_handler_t arg1 = (svn_repos_file_rev_handler_t) 0 ; void *arg2 = (void *) 0 ; char *arg3 = (char *) 0 ; svn_revnum_t arg4 ; apr_hash_t *arg5 = (apr_hash_t *) 0 ; svn_txdelta_window_handler_t *arg6 = (svn_txdelta_window_handler_t *) 0 ; void **arg7 = (void **) 0 ; apr_array_header_t *arg8 = (apr_array_header_t *) 0 ; apr_pool_t *arg9 = (apr_pool_t *) 0 ; apr_pool_t *_global_pool = NULL ; PyObject *_global_py_pool = NULL ; void *temp7 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj3 = 0 ; PyObject * obj4 = 0 ; PyObject * obj5 = 0 ; PyObject * obj6 = 0 ; svn_error_t *result = 0 ; if (svn_swig_py_get_pool_arg(args, SWIGTYPE_p_apr_pool_t, &_global_py_pool, &_global_pool)) SWIG_fail; arg9 = _global_pool; { if (_global_pool == NULL) { if (svn_swig_py_get_parent_pool(args, SWIGTYPE_p_apr_pool_t, &_global_py_pool, &_global_pool)) SWIG_fail; } arg6 = (svn_txdelta_window_handler_t *) apr_pcalloc(_global_pool, sizeof(svn_txdelta_window_handler_t)); if (arg6 == NULL) SWIG_fail; } arg7 = &temp7; if (!PyArg_ParseTuple(args,(char *)"OOsOOO|O:svn_repos_invoke_file_rev_handler",&obj0,&obj1,&arg3,&obj3,&obj4,&obj5,&obj6)) SWIG_fail; { svn_repos_file_rev_handler_t * tmp = svn_swig_MustGetPtr(obj0, SWIGTYPE_p_p_f_p_void_p_q_const__char_svn_revnum_t_p_apr_hash_t_p_svn_txdelta_window_handler_t_p_p_void_p_apr_array_header_t_p_apr_pool_t__p_svn_error_t, svn_argnum_obj0); if (tmp == NULL || PyErr_Occurred()) { SWIG_fail; } arg1 = *tmp; } { if (obj1 == Py_None) { arg2 = NULL; } else if (SWIG_ConvertPtr(obj1, (void **) &arg2, 0, 0) == -1) { arg2 = (void *) obj1; PyErr_Clear(); } } { arg4 = (svn_revnum_t)SWIG_As_long (obj3); if (SWIG_arg_fail(svn_argnum_obj3)) { SWIG_fail; } } { arg5 = (apr_hash_t *)svn_swig_MustGetPtr(obj4, SWIGTYPE_p_apr_hash_t, svn_argnum_obj4); if (PyErr_Occurred()) { SWIG_fail; } } { arg8 = (apr_array_header_t *)svn_swig_MustGetPtr(obj5, SWIGTYPE_p_apr_array_header_t, svn_argnum_obj5); if (PyErr_Occurred()) { SWIG_fail; } } if (obj6) { /* Verify that the user supplied a valid pool */ if (obj6 != Py_None && obj6 != _global_py_pool) { SWIG_Python_TypeError(SWIG_TypePrettyName(SWIGTYPE_p_apr_pool_t), obj6); SWIG_arg_fail(svn_argnum_obj6); SWIG_fail; } } { svn_swig_py_release_py_lock(); result = (svn_error_t *)svn_repos_invoke_file_rev_handler(arg1,arg2,(char const *)arg3,arg4,arg5,arg6,arg7,arg8,arg9); svn_swig_py_acquire_py_lock(); } { if (result != NULL) { if (result->apr_err != SVN_ERR_SWIG_PY_EXCEPTION_SET) svn_swig_py_svn_exception(result); else svn_error_clear(result); SWIG_fail; } Py_INCREF(Py_None); resultobj = Py_None; } { resultobj = SWIG_Python_AppendOutput(resultobj, svn_swig_NewPointerObj(arg6, SWIGTYPE_p_p_f_p_svn_txdelta_window_t_p_void__p_svn_error_t, _global_py_pool, args)) ; } { resultobj = SWIG_Python_AppendOutput(resultobj, svn_swig_NewPointerObj(*arg7, SWIGTYPE_p_void, _global_py_pool, args)) ; } { Py_XDECREF(_global_py_pool); } return resultobj; fail: { Py_XDECREF(_global_py_pool); } return NULL; } SWIGINTERN PyObject *_wrap_svn_repos_invoke_notify_func(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; svn_repos_notify_func_t arg1 = (svn_repos_notify_func_t) 0 ; void *arg2 = (void *) 0 ; svn_repos_notify_t *arg3 = (svn_repos_notify_t *) 0 ; apr_pool_t *arg4 = (apr_pool_t *) 0 ; apr_pool_t *_global_pool = NULL ; PyObject *_global_py_pool = NULL ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; PyObject * obj3 = 0 ; if (svn_swig_py_get_pool_arg(args, SWIGTYPE_p_apr_pool_t, &_global_py_pool, &_global_pool)) SWIG_fail; arg4 = _global_pool; if (!PyArg_ParseTuple(args,(char *)"OOO|O:svn_repos_invoke_notify_func",&obj0,&obj1,&obj2,&obj3)) SWIG_fail; { svn_repos_notify_func_t * tmp = svn_swig_MustGetPtr(obj0, SWIGTYPE_p_p_f_p_void_p_q_const__struct_svn_repos_notify_t_p_apr_pool_t__void, svn_argnum_obj0); if (tmp == NULL || PyErr_Occurred()) { SWIG_fail; } arg1 = *tmp; } { if (obj1 == Py_None) { arg2 = NULL; } else if (SWIG_ConvertPtr(obj1, (void **) &arg2, 0, 0) == -1) { arg2 = (void *) obj1; PyErr_Clear(); } } { arg3 = (svn_repos_notify_t *)svn_swig_MustGetPtr(obj2, SWIGTYPE_p_svn_repos_notify_t, svn_argnum_obj2); if (PyErr_Occurred()) { SWIG_fail; } } if (obj3) { /* Verify that the user supplied a valid pool */ if (obj3 != Py_None && obj3 != _global_py_pool) { SWIG_Python_TypeError(SWIG_TypePrettyName(SWIGTYPE_p_apr_pool_t), obj3); SWIG_arg_fail(svn_argnum_obj3); SWIG_fail; } } { svn_swig_py_release_py_lock(); svn_repos_invoke_notify_func(arg1,arg2,(struct svn_repos_notify_t const *)arg3,arg4); svn_swig_py_acquire_py_lock(); } resultobj = SWIG_Py_Void(); { Py_XDECREF(_global_py_pool); } return resultobj; fail: { Py_XDECREF(_global_py_pool); } return NULL; } SWIGINTERN PyObject *_wrap_svn_repos_invoke_history_func(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; svn_repos_history_func_t arg1 = (svn_repos_history_func_t) 0 ; void *arg2 = (void *) 0 ; char *arg3 = (char *) 0 ; svn_revnum_t arg4 ; apr_pool_t *arg5 = (apr_pool_t *) 0 ; apr_pool_t *_global_pool = NULL ; PyObject *_global_py_pool = NULL ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj3 = 0 ; PyObject * obj4 = 0 ; svn_error_t *result = 0 ; if (svn_swig_py_get_pool_arg(args, SWIGTYPE_p_apr_pool_t, &_global_py_pool, &_global_pool)) SWIG_fail; arg5 = _global_pool; if (!PyArg_ParseTuple(args,(char *)"OOsO|O:svn_repos_invoke_history_func",&obj0,&obj1,&arg3,&obj3,&obj4)) SWIG_fail; { svn_repos_history_func_t * tmp = svn_swig_MustGetPtr(obj0, SWIGTYPE_p_p_f_p_void_p_q_const__char_svn_revnum_t_p_apr_pool_t__p_svn_error_t, svn_argnum_obj0); if (tmp == NULL || PyErr_Occurred()) { SWIG_fail; } arg1 = *tmp; } { if (obj1 == Py_None) { arg2 = NULL; } else if (SWIG_ConvertPtr(obj1, (void **) &arg2, 0, 0) == -1) { arg2 = (void *) obj1; PyErr_Clear(); } } { arg4 = (svn_revnum_t)SWIG_As_long (obj3); if (SWIG_arg_fail(svn_argnum_obj3)) { SWIG_fail; } } if (obj4) { /* Verify that the user supplied a valid pool */ if (obj4 != Py_None && obj4 != _global_py_pool) { SWIG_Python_TypeError(SWIG_TypePrettyName(SWIGTYPE_p_apr_pool_t), obj4); SWIG_arg_fail(svn_argnum_obj4); SWIG_fail; } } { svn_swig_py_release_py_lock(); result = (svn_error_t *)svn_repos_invoke_history_func(arg1,arg2,(char const *)arg3,arg4,arg5); svn_swig_py_acquire_py_lock(); } { if (result != NULL) { if (result->apr_err != SVN_ERR_SWIG_PY_EXCEPTION_SET) svn_swig_py_svn_exception(result); else svn_error_clear(result); SWIG_fail; } Py_INCREF(Py_None); resultobj = Py_None; } { Py_XDECREF(_global_py_pool); } return resultobj; fail: { Py_XDECREF(_global_py_pool); } return NULL; } SWIGINTERN PyObject *svn_repos_authz_func_t_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_p_f_p_svn_boolean_t_p_svn_fs_root_t_p_q_const__char_p_void_p_apr_pool_t__p_svn_error_t, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } SWIGINTERN PyObject *svn_repos_authz_callback_t_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_p_f_svn_repos_authz_access_t_p_svn_boolean_t_p_svn_fs_root_t_p_q_const__char_p_void_p_apr_pool_t__p_svn_error_t, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } SWIGINTERN PyObject *svn_repos_file_rev_handler_t_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_p_f_p_void_p_q_const__char_svn_revnum_t_p_apr_hash_t_p_svn_txdelta_window_handler_t_p_p_void_p_apr_array_header_t_p_apr_pool_t__p_svn_error_t, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } SWIGINTERN PyObject *svn_repos_notify_func_t_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_p_f_p_void_p_q_const__struct_svn_repos_notify_t_p_apr_pool_t__void, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } SWIGINTERN PyObject *svn_repos_history_func_t_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_p_f_p_void_p_q_const__char_svn_revnum_t_p_apr_pool_t__p_svn_error_t, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } static PyMethodDef SwigMethods[] = { { (char *)"SWIG_PyInstanceMethod_New", (PyCFunction)SWIG_PyInstanceMethod_New, METH_O, NULL}, { (char *)"svn_repos_version", _wrap_svn_repos_version, METH_VARARGS, (char *)"svn_repos_version() -> svn_version_t"}, { (char *)"svn_repos_notify_t_action_set", _wrap_svn_repos_notify_t_action_set, METH_VARARGS, (char *)"svn_repos_notify_t_action_set(svn_repos_notify_t self, svn_repos_notify_action_t action)"}, { (char *)"svn_repos_notify_t_action_get", _wrap_svn_repos_notify_t_action_get, METH_VARARGS, (char *)"svn_repos_notify_t_action_get(svn_repos_notify_t self) -> svn_repos_notify_action_t"}, { (char *)"svn_repos_notify_t_revision_set", _wrap_svn_repos_notify_t_revision_set, METH_VARARGS, (char *)"svn_repos_notify_t_revision_set(svn_repos_notify_t self, svn_revnum_t revision)"}, { (char *)"svn_repos_notify_t_revision_get", _wrap_svn_repos_notify_t_revision_get, METH_VARARGS, (char *)"svn_repos_notify_t_revision_get(svn_repos_notify_t self) -> svn_revnum_t"}, { (char *)"svn_repos_notify_t_warning_str_set", _wrap_svn_repos_notify_t_warning_str_set, METH_VARARGS, (char *)"svn_repos_notify_t_warning_str_set(svn_repos_notify_t self, char warning_str)"}, { (char *)"svn_repos_notify_t_warning_str_get", _wrap_svn_repos_notify_t_warning_str_get, METH_VARARGS, (char *)"svn_repos_notify_t_warning_str_get(svn_repos_notify_t self) -> char"}, { (char *)"svn_repos_notify_t_warning_set", _wrap_svn_repos_notify_t_warning_set, METH_VARARGS, (char *)"svn_repos_notify_t_warning_set(svn_repos_notify_t self, svn_repos_notify_warning_t warning)"}, { (char *)"svn_repos_notify_t_warning_get", _wrap_svn_repos_notify_t_warning_get, METH_VARARGS, (char *)"svn_repos_notify_t_warning_get(svn_repos_notify_t self) -> svn_repos_notify_warning_t"}, { (char *)"svn_repos_notify_t_shard_set", _wrap_svn_repos_notify_t_shard_set, METH_VARARGS, (char *)"svn_repos_notify_t_shard_set(svn_repos_notify_t self, apr_int64_t shard)"}, { (char *)"svn_repos_notify_t_shard_get", _wrap_svn_repos_notify_t_shard_get, METH_VARARGS, (char *)"svn_repos_notify_t_shard_get(svn_repos_notify_t self) -> apr_int64_t"}, { (char *)"svn_repos_notify_t_new_revision_set", _wrap_svn_repos_notify_t_new_revision_set, METH_VARARGS, (char *)"svn_repos_notify_t_new_revision_set(svn_repos_notify_t self, svn_revnum_t new_revision)"}, { (char *)"svn_repos_notify_t_new_revision_get", _wrap_svn_repos_notify_t_new_revision_get, METH_VARARGS, (char *)"svn_repos_notify_t_new_revision_get(svn_repos_notify_t self) -> svn_revnum_t"}, { (char *)"svn_repos_notify_t_old_revision_set", _wrap_svn_repos_notify_t_old_revision_set, METH_VARARGS, (char *)"svn_repos_notify_t_old_revision_set(svn_repos_notify_t self, svn_revnum_t old_revision)"}, { (char *)"svn_repos_notify_t_old_revision_get", _wrap_svn_repos_notify_t_old_revision_get, METH_VARARGS, (char *)"svn_repos_notify_t_old_revision_get(svn_repos_notify_t self) -> svn_revnum_t"}, { (char *)"svn_repos_notify_t_node_action_set", _wrap_svn_repos_notify_t_node_action_set, METH_VARARGS, (char *)"svn_repos_notify_t_node_action_set(svn_repos_notify_t self, enum svn_node_action node_action)"}, { (char *)"svn_repos_notify_t_node_action_get", _wrap_svn_repos_notify_t_node_action_get, METH_VARARGS, (char *)"svn_repos_notify_t_node_action_get(svn_repos_notify_t self) -> enum svn_node_action"}, { (char *)"svn_repos_notify_t_path_set", _wrap_svn_repos_notify_t_path_set, METH_VARARGS, (char *)"svn_repos_notify_t_path_set(svn_repos_notify_t self, char path)"}, { (char *)"svn_repos_notify_t_path_get", _wrap_svn_repos_notify_t_path_get, METH_VARARGS, (char *)"svn_repos_notify_t_path_get(svn_repos_notify_t self) -> char"}, { (char *)"svn_repos_notify_t_swigregister", svn_repos_notify_t_swigregister, METH_VARARGS, NULL}, { (char *)"svn_repos_notify_create", _wrap_svn_repos_notify_create, METH_VARARGS, (char *)"svn_repos_notify_create(svn_repos_notify_action_t action, apr_pool_t result_pool) -> svn_repos_notify_t"}, { (char *)"svn_repos_find_root_path", _wrap_svn_repos_find_root_path, METH_VARARGS, (char *)"svn_repos_find_root_path(char path, apr_pool_t pool) -> char"}, { (char *)"svn_repos_open2", _wrap_svn_repos_open2, METH_VARARGS, (char *)"svn_repos_open2(char path, apr_hash_t fs_config, apr_pool_t pool) -> svn_error_t"}, { (char *)"svn_repos_open", _wrap_svn_repos_open, METH_VARARGS, (char *)"svn_repos_open(char path, apr_pool_t pool) -> svn_error_t"}, { (char *)"svn_repos_create", _wrap_svn_repos_create, METH_VARARGS, (char *)"\n" "svn_repos_create(char path, char unused_1, char unused_2, apr_hash_t config, \n" " apr_hash_t fs_config, apr_pool_t pool) -> svn_error_t\n" ""}, { (char *)"svn_repos_upgrade2", _wrap_svn_repos_upgrade2, METH_VARARGS, (char *)"\n" "svn_repos_upgrade2(char path, svn_boolean_t nonblocking, svn_repos_notify_func_t notify_func, \n" " void notify_baton, apr_pool_t pool) -> svn_error_t\n" ""}, { (char *)"svn_repos_upgrade", _wrap_svn_repos_upgrade, METH_VARARGS, (char *)"\n" "svn_repos_upgrade(char path, svn_boolean_t nonblocking, svn_error_t start_callback, \n" " void start_callback_baton, apr_pool_t pool) -> svn_error_t\n" ""}, { (char *)"svn_repos_delete", _wrap_svn_repos_delete, METH_VARARGS, (char *)"svn_repos_delete(char path, apr_pool_t pool) -> svn_error_t"}, { (char *)"svn_repos_has_capability", _wrap_svn_repos_has_capability, METH_VARARGS, (char *)"svn_repos_has_capability(svn_repos_t repos, char capability, apr_pool_t pool) -> svn_error_t"}, { (char *)"svn_repos_fs", _wrap_svn_repos_fs, METH_VARARGS, (char *)"svn_repos_fs(svn_repos_t repos) -> svn_fs_t"}, { (char *)"svn_repos_hotcopy", _wrap_svn_repos_hotcopy, METH_VARARGS, (char *)"\n" "svn_repos_hotcopy(char src_path, char dst_path, svn_boolean_t clean_logs, \n" " apr_pool_t pool) -> svn_error_t\n" ""}, { (char *)"svn_repos_fs_pack2", _wrap_svn_repos_fs_pack2, METH_VARARGS, (char *)"\n" "svn_repos_fs_pack2(svn_repos_t repos, svn_repos_notify_func_t notify_func, \n" " void notify_baton, svn_cancel_func_t cancel_func, \n" " apr_pool_t pool) -> svn_error_t\n" ""}, { (char *)"svn_repos_fs_pack", _wrap_svn_repos_fs_pack, METH_VARARGS, (char *)"\n" "svn_repos_fs_pack(svn_repos_t repos, svn_fs_pack_notify_t notify_func, \n" " void notify_baton, svn_cancel_func_t cancel_func, \n" " apr_pool_t pool) -> svn_error_t\n" ""}, { (char *)"svn_repos_recover4", _wrap_svn_repos_recover4, METH_VARARGS, (char *)"\n" "svn_repos_recover4(char path, svn_boolean_t nonblocking, svn_repos_notify_func_t notify_func, \n" " void notify_baton, svn_cancel_func_t cancel_func, \n" " apr_pool_t pool) -> svn_error_t\n" ""}, { (char *)"svn_repos_recover3", _wrap_svn_repos_recover3, METH_VARARGS, (char *)"\n" "svn_repos_recover3(char path, svn_boolean_t nonblocking, svn_error_t start_callback, \n" " void start_callback_baton, svn_cancel_func_t cancel_func, \n" " apr_pool_t pool) -> svn_error_t\n" ""}, { (char *)"svn_repos_recover2", _wrap_svn_repos_recover2, METH_VARARGS, (char *)"\n" "svn_repos_recover2(char path, svn_boolean_t nonblocking, svn_error_t start_callback, \n" " void start_callback_baton, apr_pool_t pool) -> svn_error_t\n" ""}, { (char *)"svn_repos_recover", _wrap_svn_repos_recover, METH_VARARGS, (char *)"svn_repos_recover(char path, apr_pool_t pool) -> svn_error_t"}, { (char *)"svn_repos_db_logfiles", _wrap_svn_repos_db_logfiles, METH_VARARGS, (char *)"svn_repos_db_logfiles(char path, svn_boolean_t only_unused, apr_pool_t pool) -> svn_error_t"}, { (char *)"svn_repos_path", _wrap_svn_repos_path, METH_VARARGS, (char *)"svn_repos_path(svn_repos_t repos, apr_pool_t pool) -> char"}, { (char *)"svn_repos_db_env", _wrap_svn_repos_db_env, METH_VARARGS, (char *)"svn_repos_db_env(svn_repos_t repos, apr_pool_t pool) -> char"}, { (char *)"svn_repos_conf_dir", _wrap_svn_repos_conf_dir, METH_VARARGS, (char *)"svn_repos_conf_dir(svn_repos_t repos, apr_pool_t pool) -> char"}, { (char *)"svn_repos_svnserve_conf", _wrap_svn_repos_svnserve_conf, METH_VARARGS, (char *)"svn_repos_svnserve_conf(svn_repos_t repos, apr_pool_t pool) -> char"}, { (char *)"svn_repos_lock_dir", _wrap_svn_repos_lock_dir, METH_VARARGS, (char *)"svn_repos_lock_dir(svn_repos_t repos, apr_pool_t pool) -> char"}, { (char *)"svn_repos_db_lockfile", _wrap_svn_repos_db_lockfile, METH_VARARGS, (char *)"svn_repos_db_lockfile(svn_repos_t repos, apr_pool_t pool) -> char"}, { (char *)"svn_repos_db_logs_lockfile", _wrap_svn_repos_db_logs_lockfile, METH_VARARGS, (char *)"svn_repos_db_logs_lockfile(svn_repos_t repos, apr_pool_t pool) -> char"}, { (char *)"svn_repos_hook_dir", _wrap_svn_repos_hook_dir, METH_VARARGS, (char *)"svn_repos_hook_dir(svn_repos_t repos, apr_pool_t pool) -> char"}, { (char *)"svn_repos_start_commit_hook", _wrap_svn_repos_start_commit_hook, METH_VARARGS, (char *)"svn_repos_start_commit_hook(svn_repos_t repos, apr_pool_t pool) -> char"}, { (char *)"svn_repos_pre_commit_hook", _wrap_svn_repos_pre_commit_hook, METH_VARARGS, (char *)"svn_repos_pre_commit_hook(svn_repos_t repos, apr_pool_t pool) -> char"}, { (char *)"svn_repos_post_commit_hook", _wrap_svn_repos_post_commit_hook, METH_VARARGS, (char *)"svn_repos_post_commit_hook(svn_repos_t repos, apr_pool_t pool) -> char"}, { (char *)"svn_repos_pre_revprop_change_hook", _wrap_svn_repos_pre_revprop_change_hook, METH_VARARGS, (char *)"svn_repos_pre_revprop_change_hook(svn_repos_t repos, apr_pool_t pool) -> char"}, { (char *)"svn_repos_post_revprop_change_hook", _wrap_svn_repos_post_revprop_change_hook, METH_VARARGS, (char *)"svn_repos_post_revprop_change_hook(svn_repos_t repos, apr_pool_t pool) -> char"}, { (char *)"svn_repos_pre_lock_hook", _wrap_svn_repos_pre_lock_hook, METH_VARARGS, (char *)"svn_repos_pre_lock_hook(svn_repos_t repos, apr_pool_t pool) -> char"}, { (char *)"svn_repos_post_lock_hook", _wrap_svn_repos_post_lock_hook, METH_VARARGS, (char *)"svn_repos_post_lock_hook(svn_repos_t repos, apr_pool_t pool) -> char"}, { (char *)"svn_repos_pre_unlock_hook", _wrap_svn_repos_pre_unlock_hook, METH_VARARGS, (char *)"svn_repos_pre_unlock_hook(svn_repos_t repos, apr_pool_t pool) -> char"}, { (char *)"svn_repos_post_unlock_hook", _wrap_svn_repos_post_unlock_hook, METH_VARARGS, (char *)"svn_repos_post_unlock_hook(svn_repos_t repos, apr_pool_t pool) -> char"}, { (char *)"svn_repos_begin_report2", _wrap_svn_repos_begin_report2, METH_VARARGS, (char *)"\n" "svn_repos_begin_report2(svn_revnum_t revnum, svn_repos_t repos, char fs_base, \n" " char target, char tgt_path, svn_boolean_t text_deltas, \n" " svn_depth_t depth, svn_boolean_t ignore_ancestry, \n" " svn_boolean_t send_copyfrom_args, \n" " svn_delta_editor_t editor, void edit_baton, \n" " svn_repos_authz_func_t authz_read_func, \n" " apr_pool_t pool) -> svn_error_t\n" ""}, { (char *)"svn_repos_begin_report", _wrap_svn_repos_begin_report, METH_VARARGS, (char *)"\n" "svn_repos_begin_report(svn_revnum_t revnum, char username, svn_repos_t repos, \n" " char fs_base, char target, char tgt_path, \n" " svn_boolean_t text_deltas, svn_boolean_t recurse, \n" " svn_boolean_t ignore_ancestry, svn_delta_editor_t editor, \n" " void edit_baton, svn_repos_authz_func_t authz_read_func, \n" " apr_pool_t pool) -> svn_error_t\n" ""}, { (char *)"svn_repos_set_path3", _wrap_svn_repos_set_path3, METH_VARARGS, (char *)"\n" "svn_repos_set_path3(void report_baton, char path, svn_revnum_t revision, \n" " svn_depth_t depth, svn_boolean_t start_empty, \n" " char lock_token, apr_pool_t pool) -> svn_error_t\n" ""}, { (char *)"svn_repos_set_path2", _wrap_svn_repos_set_path2, METH_VARARGS, (char *)"\n" "svn_repos_set_path2(void report_baton, char path, svn_revnum_t revision, \n" " svn_boolean_t start_empty, char lock_token, \n" " apr_pool_t pool) -> svn_error_t\n" ""}, { (char *)"svn_repos_set_path", _wrap_svn_repos_set_path, METH_VARARGS, (char *)"\n" "svn_repos_set_path(void report_baton, char path, svn_revnum_t revision, \n" " svn_boolean_t start_empty, apr_pool_t pool) -> svn_error_t\n" ""}, { (char *)"svn_repos_link_path3", _wrap_svn_repos_link_path3, METH_VARARGS, (char *)"\n" "svn_repos_link_path3(void report_baton, char path, char link_path, svn_revnum_t revision, \n" " svn_depth_t depth, svn_boolean_t start_empty, \n" " char lock_token, apr_pool_t pool) -> svn_error_t\n" ""}, { (char *)"svn_repos_link_path2", _wrap_svn_repos_link_path2, METH_VARARGS, (char *)"\n" "svn_repos_link_path2(void report_baton, char path, char link_path, svn_revnum_t revision, \n" " svn_boolean_t start_empty, \n" " char lock_token, apr_pool_t pool) -> svn_error_t\n" ""}, { (char *)"svn_repos_link_path", _wrap_svn_repos_link_path, METH_VARARGS, (char *)"\n" "svn_repos_link_path(void report_baton, char path, char link_path, svn_revnum_t revision, \n" " svn_boolean_t start_empty, \n" " apr_pool_t pool) -> svn_error_t\n" ""}, { (char *)"svn_repos_delete_path", _wrap_svn_repos_delete_path, METH_VARARGS, (char *)"svn_repos_delete_path(void report_baton, char path, apr_pool_t pool) -> svn_error_t"}, { (char *)"svn_repos_finish_report", _wrap_svn_repos_finish_report, METH_VARARGS, (char *)"svn_repos_finish_report(void report_baton, apr_pool_t pool) -> svn_error_t"}, { (char *)"svn_repos_abort_report", _wrap_svn_repos_abort_report, METH_VARARGS, (char *)"svn_repos_abort_report(void report_baton, apr_pool_t pool) -> svn_error_t"}, { (char *)"svn_repos_dir_delta2", _wrap_svn_repos_dir_delta2, METH_VARARGS, (char *)"\n" "svn_repos_dir_delta2(svn_fs_root_t src_root, char src_parent_dir, char src_entry, \n" " svn_fs_root_t tgt_root, char tgt_path, \n" " svn_delta_editor_t editor, void edit_baton, \n" " svn_repos_authz_func_t authz_read_func, svn_boolean_t text_deltas, \n" " svn_depth_t depth, svn_boolean_t entry_props, \n" " svn_boolean_t ignore_ancestry, \n" " apr_pool_t pool) -> svn_error_t\n" ""}, { (char *)"svn_repos_dir_delta", _wrap_svn_repos_dir_delta, METH_VARARGS, (char *)"\n" "svn_repos_dir_delta(svn_fs_root_t src_root, char src_parent_dir, char src_entry, \n" " svn_fs_root_t tgt_root, char tgt_path, \n" " svn_delta_editor_t editor, void edit_baton, \n" " svn_repos_authz_func_t authz_read_func, svn_boolean_t text_deltas, \n" " svn_boolean_t recurse, \n" " svn_boolean_t entry_props, svn_boolean_t ignore_ancestry, \n" " apr_pool_t pool) -> svn_error_t\n" ""}, { (char *)"svn_repos_replay2", _wrap_svn_repos_replay2, METH_VARARGS, (char *)"\n" "svn_repos_replay2(svn_fs_root_t root, char base_dir, svn_revnum_t low_water_mark, \n" " svn_boolean_t send_deltas, svn_delta_editor_t editor, \n" " void edit_baton, svn_repos_authz_func_t authz_read_func, \n" " apr_pool_t pool) -> svn_error_t\n" ""}, { (char *)"svn_repos_replay", _wrap_svn_repos_replay, METH_VARARGS, (char *)"\n" "svn_repos_replay(svn_fs_root_t root, svn_delta_editor_t editor, void edit_baton, \n" " apr_pool_t pool) -> svn_error_t\n" ""}, { (char *)"svn_repos_get_commit_editor5", _wrap_svn_repos_get_commit_editor5, METH_VARARGS, (char *)"\n" "svn_repos_get_commit_editor5(svn_repos_t repos, svn_fs_txn_t txn, char repos_url, \n" " char base_path, apr_hash_t revprop_table, svn_commit_callback2_t callback, \n" " svn_repos_authz_callback_t authz_callback, \n" " void authz_baton, \n" " apr_pool_t pool) -> svn_error_t\n" ""}, { (char *)"svn_repos_get_commit_editor4", _wrap_svn_repos_get_commit_editor4, METH_VARARGS, (char *)"\n" "svn_repos_get_commit_editor4(svn_repos_t repos, svn_fs_txn_t txn, char repos_url, \n" " char base_path, char user, char log_msg, svn_commit_callback2_t callback, \n" " svn_repos_authz_callback_t authz_callback, \n" " void authz_baton, \n" " apr_pool_t pool) -> svn_error_t\n" ""}, { (char *)"svn_repos_get_commit_editor3", _wrap_svn_repos_get_commit_editor3, METH_VARARGS, (char *)"\n" "svn_repos_get_commit_editor3(svn_repos_t repos, svn_fs_txn_t txn, char repos_url, \n" " char base_path, char user, char log_msg, svn_commit_callback_t callback, \n" " svn_repos_authz_callback_t authz_callback, \n" " void authz_baton, \n" " apr_pool_t pool) -> svn_error_t\n" ""}, { (char *)"svn_repos_get_commit_editor2", _wrap_svn_repos_get_commit_editor2, METH_VARARGS, (char *)"\n" "svn_repos_get_commit_editor2(svn_repos_t repos, svn_fs_txn_t txn, char repos_url, \n" " char base_path, char user, char log_msg, svn_commit_callback_t callback, \n" " apr_pool_t pool) -> svn_error_t\n" ""}, { (char *)"svn_repos_get_commit_editor", _wrap_svn_repos_get_commit_editor, METH_VARARGS, (char *)"\n" "svn_repos_get_commit_editor(svn_repos_t repos, char repos_url, char base_path, \n" " char user, char log_msg, svn_commit_callback_t callback, \n" " apr_pool_t pool) -> svn_error_t\n" ""}, { (char *)"svn_repos_dated_revision", _wrap_svn_repos_dated_revision, METH_VARARGS, (char *)"svn_repos_dated_revision(svn_repos_t repos, apr_time_t tm, apr_pool_t pool) -> svn_error_t"}, { (char *)"svn_repos_get_committed_info", _wrap_svn_repos_get_committed_info, METH_VARARGS, (char *)"svn_repos_get_committed_info(svn_fs_root_t root, char path, apr_pool_t pool) -> svn_error_t"}, { (char *)"svn_repos_stat", _wrap_svn_repos_stat, METH_VARARGS, (char *)"svn_repos_stat(svn_fs_root_t root, char path, apr_pool_t pool) -> svn_error_t"}, { (char *)"svn_repos_deleted_rev", _wrap_svn_repos_deleted_rev, METH_VARARGS, (char *)"\n" "svn_repos_deleted_rev(svn_fs_t fs, char path, svn_revnum_t start, svn_revnum_t end, \n" " apr_pool_t pool) -> svn_error_t\n" ""}, { (char *)"svn_repos_history2", _wrap_svn_repos_history2, METH_VARARGS, (char *)"\n" "svn_repos_history2(svn_fs_t fs, char path, svn_repos_history_func_t history_func, \n" " svn_repos_authz_func_t authz_read_func, \n" " svn_revnum_t start, svn_revnum_t end, \n" " svn_boolean_t cross_copies, apr_pool_t pool) -> svn_error_t\n" ""}, { (char *)"svn_repos_history", _wrap_svn_repos_history, METH_VARARGS, (char *)"\n" "svn_repos_history(svn_fs_t fs, char path, svn_repos_history_func_t history_func, \n" " svn_revnum_t start, svn_revnum_t end, \n" " svn_boolean_t cross_copies, apr_pool_t pool) -> svn_error_t\n" ""}, { (char *)"svn_repos_trace_node_locations", _wrap_svn_repos_trace_node_locations, METH_VARARGS, (char *)"\n" "svn_repos_trace_node_locations(svn_fs_t fs, char fs_path, svn_revnum_t peg_revision, \n" " apr_array_header_t location_revisions, svn_repos_authz_func_t authz_read_func, \n" " apr_pool_t pool) -> svn_error_t\n" ""}, { (char *)"svn_repos_node_location_segments", _wrap_svn_repos_node_location_segments, METH_VARARGS, (char *)"\n" "svn_repos_node_location_segments(svn_repos_t repos, char path, svn_revnum_t peg_revision, \n" " svn_revnum_t start_rev, svn_revnum_t end_rev, \n" " svn_location_segment_receiver_t receiver, \n" " svn_repos_authz_func_t authz_read_func, apr_pool_t pool) -> svn_error_t\n" ""}, { (char *)"svn_repos_get_logs4", _wrap_svn_repos_get_logs4, METH_VARARGS, (char *)"\n" "svn_repos_get_logs4(svn_repos_t repos, apr_array_header_t paths, svn_revnum_t start, \n" " svn_revnum_t end, int limit, svn_boolean_t discover_changed_paths, \n" " svn_boolean_t strict_node_history, \n" " svn_boolean_t include_merged_revisions, \n" " apr_array_header_t revprops, \n" " svn_repos_authz_func_t authz_read_func, \n" " svn_log_entry_receiver_t receiver, apr_pool_t pool) -> svn_error_t\n" ""}, { (char *)"svn_repos_get_logs3", _wrap_svn_repos_get_logs3, METH_VARARGS, (char *)"\n" "svn_repos_get_logs3(svn_repos_t repos, apr_array_header_t paths, svn_revnum_t start, \n" " svn_revnum_t end, int limit, svn_boolean_t discover_changed_paths, \n" " svn_boolean_t strict_node_history, \n" " svn_repos_authz_func_t authz_read_func, \n" " svn_log_message_receiver_t receiver, \n" " apr_pool_t pool) -> svn_error_t\n" ""}, { (char *)"svn_repos_get_logs2", _wrap_svn_repos_get_logs2, METH_VARARGS, (char *)"\n" "svn_repos_get_logs2(svn_repos_t repos, apr_array_header_t paths, svn_revnum_t start, \n" " svn_revnum_t end, svn_boolean_t discover_changed_paths, \n" " svn_boolean_t strict_node_history, \n" " svn_repos_authz_func_t authz_read_func, \n" " svn_log_message_receiver_t receiver, \n" " apr_pool_t pool) -> svn_error_t\n" ""}, { (char *)"svn_repos_get_logs", _wrap_svn_repos_get_logs, METH_VARARGS, (char *)"\n" "svn_repos_get_logs(svn_repos_t repos, apr_array_header_t paths, svn_revnum_t start, \n" " svn_revnum_t end, svn_boolean_t discover_changed_paths, \n" " svn_boolean_t strict_node_history, \n" " svn_log_message_receiver_t receiver, \n" " apr_pool_t pool) -> svn_error_t\n" ""}, { (char *)"svn_repos_fs_get_mergeinfo", _wrap_svn_repos_fs_get_mergeinfo, METH_VARARGS, (char *)"\n" "svn_repos_fs_get_mergeinfo(svn_repos_t repos, apr_array_header_t paths, svn_revnum_t revision, \n" " svn_mergeinfo_inheritance_t inherit, \n" " svn_boolean_t include_descendants, svn_repos_authz_func_t authz_read_func, \n" " apr_pool_t pool) -> svn_error_t\n" ""}, { (char *)"svn_repos_get_file_revs2", _wrap_svn_repos_get_file_revs2, METH_VARARGS, (char *)"\n" "svn_repos_get_file_revs2(svn_repos_t repos, char path, svn_revnum_t start, svn_revnum_t end, \n" " svn_boolean_t include_merged_revisions, \n" " svn_repos_authz_func_t authz_read_func, \n" " svn_file_rev_handler_t handler, void handler_baton, \n" " apr_pool_t pool) -> svn_error_t\n" ""}, { (char *)"svn_repos_get_file_revs", _wrap_svn_repos_get_file_revs, METH_VARARGS, (char *)"\n" "svn_repos_get_file_revs(svn_repos_t repos, char path, svn_revnum_t start, svn_revnum_t end, \n" " svn_repos_authz_func_t authz_read_func, \n" " svn_repos_file_rev_handler_t handler, \n" " void handler_baton, apr_pool_t pool) -> svn_error_t\n" ""}, { (char *)"svn_repos_fs_commit_txn", _wrap_svn_repos_fs_commit_txn, METH_VARARGS, (char *)"svn_repos_fs_commit_txn(svn_repos_t repos, svn_fs_txn_t txn, apr_pool_t pool) -> svn_error_t"}, { (char *)"svn_repos_fs_begin_txn_for_commit2", _wrap_svn_repos_fs_begin_txn_for_commit2, METH_VARARGS, (char *)"\n" "svn_repos_fs_begin_txn_for_commit2(svn_repos_t repos, svn_revnum_t rev, apr_hash_t revprop_table, \n" " apr_pool_t pool) -> svn_error_t\n" ""}, { (char *)"svn_repos_fs_begin_txn_for_commit", _wrap_svn_repos_fs_begin_txn_for_commit, METH_VARARGS, (char *)"\n" "svn_repos_fs_begin_txn_for_commit(svn_repos_t repos, svn_revnum_t rev, char author, char log_msg, \n" " apr_pool_t pool) -> svn_error_t\n" ""}, { (char *)"svn_repos_fs_begin_txn_for_update", _wrap_svn_repos_fs_begin_txn_for_update, METH_VARARGS, (char *)"svn_repos_fs_begin_txn_for_update(svn_repos_t repos, svn_revnum_t rev, char author, apr_pool_t pool) -> svn_error_t"}, { (char *)"svn_repos_fs_lock", _wrap_svn_repos_fs_lock, METH_VARARGS, (char *)"\n" "svn_repos_fs_lock(svn_repos_t repos, char path, char token, char comment, \n" " svn_boolean_t is_dav_comment, apr_time_t expiration_date, \n" " svn_revnum_t current_rev, svn_boolean_t steal_lock, \n" " apr_pool_t pool) -> svn_error_t\n" ""}, { (char *)"svn_repos_fs_unlock", _wrap_svn_repos_fs_unlock, METH_VARARGS, (char *)"\n" "svn_repos_fs_unlock(svn_repos_t repos, char path, char token, svn_boolean_t break_lock, \n" " apr_pool_t pool) -> svn_error_t\n" ""}, { (char *)"svn_repos_fs_get_locks2", _wrap_svn_repos_fs_get_locks2, METH_VARARGS, (char *)"\n" "svn_repos_fs_get_locks2(svn_repos_t repos, char path, svn_depth_t depth, svn_repos_authz_func_t authz_read_func, \n" " apr_pool_t pool) -> svn_error_t\n" ""}, { (char *)"svn_repos_fs_get_locks", _wrap_svn_repos_fs_get_locks, METH_VARARGS, (char *)"\n" "svn_repos_fs_get_locks(svn_repos_t repos, char path, svn_repos_authz_func_t authz_read_func, \n" " apr_pool_t pool) -> svn_error_t\n" ""}, { (char *)"svn_repos_fs_change_rev_prop4", _wrap_svn_repos_fs_change_rev_prop4, METH_VARARGS, (char *)"\n" "svn_repos_fs_change_rev_prop4(svn_repos_t repos, svn_revnum_t rev, char author, char name, \n" " svn_string_t old_value_p, svn_string_t new_value, \n" " svn_boolean_t use_pre_revprop_change_hook, \n" " svn_boolean_t use_post_revprop_change_hook, \n" " svn_repos_authz_func_t authz_read_func, \n" " apr_pool_t pool) -> svn_error_t\n" ""}, { (char *)"svn_repos_fs_change_rev_prop3", _wrap_svn_repos_fs_change_rev_prop3, METH_VARARGS, (char *)"\n" "svn_repos_fs_change_rev_prop3(svn_repos_t repos, svn_revnum_t rev, char author, char name, \n" " svn_string_t new_value, svn_boolean_t use_pre_revprop_change_hook, \n" " svn_boolean_t use_post_revprop_change_hook, \n" " svn_repos_authz_func_t authz_read_func, \n" " apr_pool_t pool) -> svn_error_t\n" ""}, { (char *)"svn_repos_fs_change_rev_prop2", _wrap_svn_repos_fs_change_rev_prop2, METH_VARARGS, (char *)"\n" "svn_repos_fs_change_rev_prop2(svn_repos_t repos, svn_revnum_t rev, char author, char name, \n" " svn_string_t new_value, svn_repos_authz_func_t authz_read_func, \n" " apr_pool_t pool) -> svn_error_t\n" ""}, { (char *)"svn_repos_fs_change_rev_prop", _wrap_svn_repos_fs_change_rev_prop, METH_VARARGS, (char *)"\n" "svn_repos_fs_change_rev_prop(svn_repos_t repos, svn_revnum_t rev, char author, char name, \n" " svn_string_t new_value, apr_pool_t pool) -> svn_error_t\n" ""}, { (char *)"svn_repos_fs_revision_prop", _wrap_svn_repos_fs_revision_prop, METH_VARARGS, (char *)"\n" "svn_repos_fs_revision_prop(svn_repos_t repos, svn_revnum_t rev, char propname, \n" " svn_repos_authz_func_t authz_read_func, apr_pool_t pool) -> svn_error_t\n" ""}, { (char *)"svn_repos_fs_revision_proplist", _wrap_svn_repos_fs_revision_proplist, METH_VARARGS, (char *)"\n" "svn_repos_fs_revision_proplist(svn_repos_t repos, svn_revnum_t rev, svn_repos_authz_func_t authz_read_func, \n" " apr_pool_t pool) -> svn_error_t\n" ""}, { (char *)"svn_repos_fs_change_node_prop", _wrap_svn_repos_fs_change_node_prop, METH_VARARGS, (char *)"\n" "svn_repos_fs_change_node_prop(svn_fs_root_t root, char path, char name, svn_string_t value, \n" " apr_pool_t pool) -> svn_error_t\n" ""}, { (char *)"svn_repos_fs_change_txn_prop", _wrap_svn_repos_fs_change_txn_prop, METH_VARARGS, (char *)"svn_repos_fs_change_txn_prop(svn_fs_txn_t txn, char name, svn_string_t value, apr_pool_t pool) -> svn_error_t"}, { (char *)"svn_repos_fs_change_txn_props", _wrap_svn_repos_fs_change_txn_props, METH_VARARGS, (char *)"svn_repos_fs_change_txn_props(svn_fs_txn_t txn, apr_array_header_t props, apr_pool_t pool) -> svn_error_t"}, { (char *)"svn_repos_node_t_kind_set", _wrap_svn_repos_node_t_kind_set, METH_VARARGS, (char *)"svn_repos_node_t_kind_set(svn_repos_node_t self, svn_node_kind_t kind)"}, { (char *)"svn_repos_node_t_kind_get", _wrap_svn_repos_node_t_kind_get, METH_VARARGS, (char *)"svn_repos_node_t_kind_get(svn_repos_node_t self) -> svn_node_kind_t"}, { (char *)"svn_repos_node_t_action_set", _wrap_svn_repos_node_t_action_set, METH_VARARGS, (char *)"svn_repos_node_t_action_set(svn_repos_node_t self, char action)"}, { (char *)"svn_repos_node_t_action_get", _wrap_svn_repos_node_t_action_get, METH_VARARGS, (char *)"svn_repos_node_t_action_get(svn_repos_node_t self) -> char"}, { (char *)"svn_repos_node_t_text_mod_set", _wrap_svn_repos_node_t_text_mod_set, METH_VARARGS, (char *)"svn_repos_node_t_text_mod_set(svn_repos_node_t self, svn_boolean_t text_mod)"}, { (char *)"svn_repos_node_t_text_mod_get", _wrap_svn_repos_node_t_text_mod_get, METH_VARARGS, (char *)"svn_repos_node_t_text_mod_get(svn_repos_node_t self) -> svn_boolean_t"}, { (char *)"svn_repos_node_t_prop_mod_set", _wrap_svn_repos_node_t_prop_mod_set, METH_VARARGS, (char *)"svn_repos_node_t_prop_mod_set(svn_repos_node_t self, svn_boolean_t prop_mod)"}, { (char *)"svn_repos_node_t_prop_mod_get", _wrap_svn_repos_node_t_prop_mod_get, METH_VARARGS, (char *)"svn_repos_node_t_prop_mod_get(svn_repos_node_t self) -> svn_boolean_t"}, { (char *)"svn_repos_node_t_name_set", _wrap_svn_repos_node_t_name_set, METH_VARARGS, (char *)"svn_repos_node_t_name_set(svn_repos_node_t self, char name)"}, { (char *)"svn_repos_node_t_name_get", _wrap_svn_repos_node_t_name_get, METH_VARARGS, (char *)"svn_repos_node_t_name_get(svn_repos_node_t self) -> char"}, { (char *)"svn_repos_node_t_copyfrom_rev_set", _wrap_svn_repos_node_t_copyfrom_rev_set, METH_VARARGS, (char *)"svn_repos_node_t_copyfrom_rev_set(svn_repos_node_t self, svn_revnum_t copyfrom_rev)"}, { (char *)"svn_repos_node_t_copyfrom_rev_get", _wrap_svn_repos_node_t_copyfrom_rev_get, METH_VARARGS, (char *)"svn_repos_node_t_copyfrom_rev_get(svn_repos_node_t self) -> svn_revnum_t"}, { (char *)"svn_repos_node_t_copyfrom_path_set", _wrap_svn_repos_node_t_copyfrom_path_set, METH_VARARGS, (char *)"svn_repos_node_t_copyfrom_path_set(svn_repos_node_t self, char copyfrom_path)"}, { (char *)"svn_repos_node_t_copyfrom_path_get", _wrap_svn_repos_node_t_copyfrom_path_get, METH_VARARGS, (char *)"svn_repos_node_t_copyfrom_path_get(svn_repos_node_t self) -> char"}, { (char *)"svn_repos_node_t_sibling_set", _wrap_svn_repos_node_t_sibling_set, METH_VARARGS, (char *)"svn_repos_node_t_sibling_set(svn_repos_node_t self, struct svn_repos_node_t sibling)"}, { (char *)"svn_repos_node_t_sibling_get", _wrap_svn_repos_node_t_sibling_get, METH_VARARGS, (char *)"svn_repos_node_t_sibling_get(svn_repos_node_t self) -> struct svn_repos_node_t"}, { (char *)"svn_repos_node_t_child_set", _wrap_svn_repos_node_t_child_set, METH_VARARGS, (char *)"svn_repos_node_t_child_set(svn_repos_node_t self, struct svn_repos_node_t child)"}, { (char *)"svn_repos_node_t_child_get", _wrap_svn_repos_node_t_child_get, METH_VARARGS, (char *)"svn_repos_node_t_child_get(svn_repos_node_t self) -> struct svn_repos_node_t"}, { (char *)"svn_repos_node_t_parent_set", _wrap_svn_repos_node_t_parent_set, METH_VARARGS, (char *)"svn_repos_node_t_parent_set(svn_repos_node_t self, struct svn_repos_node_t parent)"}, { (char *)"svn_repos_node_t_parent_get", _wrap_svn_repos_node_t_parent_get, METH_VARARGS, (char *)"svn_repos_node_t_parent_get(svn_repos_node_t self) -> struct svn_repos_node_t"}, { (char *)"svn_repos_node_t_swigregister", svn_repos_node_t_swigregister, METH_VARARGS, NULL}, { (char *)"svn_repos_node_editor", _wrap_svn_repos_node_editor, METH_VARARGS, (char *)"\n" "svn_repos_node_editor(svn_repos_t repos, svn_fs_root_t base_root, svn_fs_root_t root, \n" " apr_pool_t node_pool, apr_pool_t pool) -> svn_error_t\n" ""}, { (char *)"svn_repos_node_from_baton", _wrap_svn_repos_node_from_baton, METH_VARARGS, (char *)"svn_repos_node_from_baton(void edit_baton) -> svn_repos_node_t"}, { (char *)"svn_repos_verify_fs2", _wrap_svn_repos_verify_fs2, METH_VARARGS, (char *)"\n" "svn_repos_verify_fs2(svn_repos_t repos, svn_revnum_t start_rev, svn_revnum_t end_rev, \n" " svn_repos_notify_func_t notify_func, \n" " void notify_baton, svn_cancel_func_t cancel, \n" " void cancel_baton, apr_pool_t scratch_pool) -> svn_error_t\n" ""}, { (char *)"svn_repos_verify_fs", _wrap_svn_repos_verify_fs, METH_VARARGS, (char *)"\n" "svn_repos_verify_fs(svn_repos_t repos, svn_stream_t feedback_stream, svn_revnum_t start_rev, \n" " svn_revnum_t end_rev, svn_cancel_func_t cancel_func, \n" " apr_pool_t pool) -> svn_error_t\n" ""}, { (char *)"svn_repos_dump_fs3", _wrap_svn_repos_dump_fs3, METH_VARARGS, (char *)"\n" "svn_repos_dump_fs3(svn_repos_t repos, svn_stream_t dumpstream, svn_revnum_t start_rev, \n" " svn_revnum_t end_rev, svn_boolean_t incremental, \n" " svn_boolean_t use_deltas, \n" " svn_repos_notify_func_t notify_func, void notify_baton, \n" " svn_cancel_func_t cancel_func, apr_pool_t scratch_pool) -> svn_error_t\n" ""}, { (char *)"svn_repos_dump_fs2", _wrap_svn_repos_dump_fs2, METH_VARARGS, (char *)"\n" "svn_repos_dump_fs2(svn_repos_t repos, svn_stream_t dumpstream, svn_stream_t feedback_stream, \n" " svn_revnum_t start_rev, \n" " svn_revnum_t end_rev, svn_boolean_t incremental, \n" " svn_boolean_t use_deltas, svn_cancel_func_t cancel_func, \n" " apr_pool_t pool) -> svn_error_t\n" ""}, { (char *)"svn_repos_dump_fs", _wrap_svn_repos_dump_fs, METH_VARARGS, (char *)"\n" "svn_repos_dump_fs(svn_repos_t repos, svn_stream_t dumpstream, svn_stream_t feedback_stream, \n" " svn_revnum_t start_rev, \n" " svn_revnum_t end_rev, svn_boolean_t incremental, \n" " svn_cancel_func_t cancel_func, apr_pool_t pool) -> svn_error_t\n" ""}, { (char *)"svn_repos_load_fs3", _wrap_svn_repos_load_fs3, METH_VARARGS, (char *)"\n" "svn_repos_load_fs3(svn_repos_t repos, svn_stream_t dumpstream, enum svn_repos_load_uuid uuid_action, \n" " char parent_dir, \n" " svn_boolean_t use_pre_commit_hook, svn_boolean_t use_post_commit_hook, \n" " svn_boolean_t validate_props, \n" " svn_repos_notify_func_t notify_func, \n" " void notify_baton, svn_cancel_func_t cancel_func, \n" " apr_pool_t pool) -> svn_error_t\n" ""}, { (char *)"svn_repos_load_fs2", _wrap_svn_repos_load_fs2, METH_VARARGS, (char *)"\n" "svn_repos_load_fs2(svn_repos_t repos, svn_stream_t dumpstream, svn_stream_t feedback_stream, \n" " enum svn_repos_load_uuid uuid_action, \n" " char parent_dir, svn_boolean_t use_pre_commit_hook, \n" " svn_boolean_t use_post_commit_hook, \n" " svn_cancel_func_t cancel_func, \n" " apr_pool_t pool) -> svn_error_t\n" ""}, { (char *)"svn_repos_load_fs", _wrap_svn_repos_load_fs, METH_VARARGS, (char *)"\n" "svn_repos_load_fs(svn_repos_t repos, svn_stream_t dumpstream, svn_stream_t feedback_stream, \n" " enum svn_repos_load_uuid uuid_action, \n" " char parent_dir, svn_cancel_func_t cancel_func, \n" " apr_pool_t pool) -> svn_error_t\n" ""}, { (char *)"svn_repos_parse_fns2_t_new_revision_record_set", _wrap_svn_repos_parse_fns2_t_new_revision_record_set, METH_VARARGS, (char *)"svn_repos_parse_fns2_t_new_revision_record_set(svn_repos_parse_fns2_t self, svn_error_t new_revision_record)"}, { (char *)"svn_repos_parse_fns2_t_new_revision_record_get", _wrap_svn_repos_parse_fns2_t_new_revision_record_get, METH_VARARGS, (char *)"svn_repos_parse_fns2_t_new_revision_record_get(svn_repos_parse_fns2_t self) -> svn_error_t"}, { (char *)"svn_repos_parse_fns2_t_uuid_record_set", _wrap_svn_repos_parse_fns2_t_uuid_record_set, METH_VARARGS, (char *)"svn_repos_parse_fns2_t_uuid_record_set(svn_repos_parse_fns2_t self, svn_error_t uuid_record)"}, { (char *)"svn_repos_parse_fns2_t_uuid_record_get", _wrap_svn_repos_parse_fns2_t_uuid_record_get, METH_VARARGS, (char *)"svn_repos_parse_fns2_t_uuid_record_get(svn_repos_parse_fns2_t self) -> svn_error_t"}, { (char *)"svn_repos_parse_fns2_t_new_node_record_set", _wrap_svn_repos_parse_fns2_t_new_node_record_set, METH_VARARGS, (char *)"svn_repos_parse_fns2_t_new_node_record_set(svn_repos_parse_fns2_t self, svn_error_t new_node_record)"}, { (char *)"svn_repos_parse_fns2_t_new_node_record_get", _wrap_svn_repos_parse_fns2_t_new_node_record_get, METH_VARARGS, (char *)"svn_repos_parse_fns2_t_new_node_record_get(svn_repos_parse_fns2_t self) -> svn_error_t"}, { (char *)"svn_repos_parse_fns2_t_set_revision_property_set", _wrap_svn_repos_parse_fns2_t_set_revision_property_set, METH_VARARGS, (char *)"svn_repos_parse_fns2_t_set_revision_property_set(svn_repos_parse_fns2_t self, svn_error_t set_revision_property)"}, { (char *)"svn_repos_parse_fns2_t_set_revision_property_get", _wrap_svn_repos_parse_fns2_t_set_revision_property_get, METH_VARARGS, (char *)"svn_repos_parse_fns2_t_set_revision_property_get(svn_repos_parse_fns2_t self) -> svn_error_t"}, { (char *)"svn_repos_parse_fns2_t_set_node_property_set", _wrap_svn_repos_parse_fns2_t_set_node_property_set, METH_VARARGS, (char *)"svn_repos_parse_fns2_t_set_node_property_set(svn_repos_parse_fns2_t self, svn_error_t set_node_property)"}, { (char *)"svn_repos_parse_fns2_t_set_node_property_get", _wrap_svn_repos_parse_fns2_t_set_node_property_get, METH_VARARGS, (char *)"svn_repos_parse_fns2_t_set_node_property_get(svn_repos_parse_fns2_t self) -> svn_error_t"}, { (char *)"svn_repos_parse_fns2_t_delete_node_property_set", _wrap_svn_repos_parse_fns2_t_delete_node_property_set, METH_VARARGS, (char *)"svn_repos_parse_fns2_t_delete_node_property_set(svn_repos_parse_fns2_t self, svn_error_t delete_node_property)"}, { (char *)"svn_repos_parse_fns2_t_delete_node_property_get", _wrap_svn_repos_parse_fns2_t_delete_node_property_get, METH_VARARGS, (char *)"svn_repos_parse_fns2_t_delete_node_property_get(svn_repos_parse_fns2_t self) -> svn_error_t"}, { (char *)"svn_repos_parse_fns2_t_remove_node_props_set", _wrap_svn_repos_parse_fns2_t_remove_node_props_set, METH_VARARGS, (char *)"svn_repos_parse_fns2_t_remove_node_props_set(svn_repos_parse_fns2_t self, svn_error_t remove_node_props)"}, { (char *)"svn_repos_parse_fns2_t_remove_node_props_get", _wrap_svn_repos_parse_fns2_t_remove_node_props_get, METH_VARARGS, (char *)"svn_repos_parse_fns2_t_remove_node_props_get(svn_repos_parse_fns2_t self) -> svn_error_t"}, { (char *)"svn_repos_parse_fns2_t_set_fulltext_set", _wrap_svn_repos_parse_fns2_t_set_fulltext_set, METH_VARARGS, (char *)"svn_repos_parse_fns2_t_set_fulltext_set(svn_repos_parse_fns2_t self, svn_error_t set_fulltext)"}, { (char *)"svn_repos_parse_fns2_t_set_fulltext_get", _wrap_svn_repos_parse_fns2_t_set_fulltext_get, METH_VARARGS, (char *)"svn_repos_parse_fns2_t_set_fulltext_get(svn_repos_parse_fns2_t self) -> svn_error_t"}, { (char *)"svn_repos_parse_fns2_t_apply_textdelta_set", _wrap_svn_repos_parse_fns2_t_apply_textdelta_set, METH_VARARGS, (char *)"svn_repos_parse_fns2_t_apply_textdelta_set(svn_repos_parse_fns2_t self, svn_error_t apply_textdelta)"}, { (char *)"svn_repos_parse_fns2_t_apply_textdelta_get", _wrap_svn_repos_parse_fns2_t_apply_textdelta_get, METH_VARARGS, (char *)"svn_repos_parse_fns2_t_apply_textdelta_get(svn_repos_parse_fns2_t self) -> svn_error_t"}, { (char *)"svn_repos_parse_fns2_t_close_node_set", _wrap_svn_repos_parse_fns2_t_close_node_set, METH_VARARGS, (char *)"svn_repos_parse_fns2_t_close_node_set(svn_repos_parse_fns2_t self, svn_error_t close_node)"}, { (char *)"svn_repos_parse_fns2_t_close_node_get", _wrap_svn_repos_parse_fns2_t_close_node_get, METH_VARARGS, (char *)"svn_repos_parse_fns2_t_close_node_get(svn_repos_parse_fns2_t self) -> svn_error_t"}, { (char *)"svn_repos_parse_fns2_t_close_revision_set", _wrap_svn_repos_parse_fns2_t_close_revision_set, METH_VARARGS, (char *)"svn_repos_parse_fns2_t_close_revision_set(svn_repos_parse_fns2_t self, svn_error_t close_revision)"}, { (char *)"svn_repos_parse_fns2_t_close_revision_get", _wrap_svn_repos_parse_fns2_t_close_revision_get, METH_VARARGS, (char *)"svn_repos_parse_fns2_t_close_revision_get(svn_repos_parse_fns2_t self) -> svn_error_t"}, { (char *)"svn_repos_parse_fns2_t_swigregister", svn_repos_parse_fns2_t_swigregister, METH_VARARGS, NULL}, { (char *)"svn_repos_parse_dumpstream2", _wrap_svn_repos_parse_dumpstream2, METH_VARARGS, (char *)"\n" "svn_repos_parse_dumpstream2(svn_stream_t stream, svn_repos_parse_fns2_t parse_fns, \n" " void parse_baton, svn_cancel_func_t cancel_func, \n" " apr_pool_t pool) -> svn_error_t\n" ""}, { (char *)"svn_repos_get_fs_build_parser3", _wrap_svn_repos_get_fs_build_parser3, METH_VARARGS, (char *)"\n" "svn_repos_get_fs_build_parser3(svn_repos_t repos, svn_boolean_t use_history, svn_boolean_t validate_props, \n" " enum svn_repos_load_uuid uuid_action, \n" " char parent_dir, svn_repos_notify_func_t notify_func, \n" " void notify_baton, \n" " apr_pool_t pool) -> svn_error_t\n" ""}, { (char *)"svn_repos_get_fs_build_parser2", _wrap_svn_repos_get_fs_build_parser2, METH_VARARGS, (char *)"\n" "svn_repos_get_fs_build_parser2(svn_repos_t repos, svn_boolean_t use_history, enum svn_repos_load_uuid uuid_action, \n" " svn_stream_t outstream, \n" " char parent_dir, apr_pool_t pool) -> svn_error_t\n" ""}, { (char *)"svn_repos_parser_fns_t_new_revision_record_set", _wrap_svn_repos_parser_fns_t_new_revision_record_set, METH_VARARGS, (char *)"svn_repos_parser_fns_t_new_revision_record_set( self, svn_error_t new_revision_record)"}, { (char *)"svn_repos_parser_fns_t_new_revision_record_get", _wrap_svn_repos_parser_fns_t_new_revision_record_get, METH_VARARGS, (char *)"svn_repos_parser_fns_t_new_revision_record_get( self) -> svn_error_t"}, { (char *)"svn_repos_parser_fns_t_uuid_record_set", _wrap_svn_repos_parser_fns_t_uuid_record_set, METH_VARARGS, (char *)"svn_repos_parser_fns_t_uuid_record_set( self, svn_error_t uuid_record)"}, { (char *)"svn_repos_parser_fns_t_uuid_record_get", _wrap_svn_repos_parser_fns_t_uuid_record_get, METH_VARARGS, (char *)"svn_repos_parser_fns_t_uuid_record_get( self) -> svn_error_t"}, { (char *)"svn_repos_parser_fns_t_new_node_record_set", _wrap_svn_repos_parser_fns_t_new_node_record_set, METH_VARARGS, (char *)"svn_repos_parser_fns_t_new_node_record_set( self, svn_error_t new_node_record)"}, { (char *)"svn_repos_parser_fns_t_new_node_record_get", _wrap_svn_repos_parser_fns_t_new_node_record_get, METH_VARARGS, (char *)"svn_repos_parser_fns_t_new_node_record_get( self) -> svn_error_t"}, { (char *)"svn_repos_parser_fns_t_set_revision_property_set", _wrap_svn_repos_parser_fns_t_set_revision_property_set, METH_VARARGS, (char *)"svn_repos_parser_fns_t_set_revision_property_set( self, svn_error_t set_revision_property)"}, { (char *)"svn_repos_parser_fns_t_set_revision_property_get", _wrap_svn_repos_parser_fns_t_set_revision_property_get, METH_VARARGS, (char *)"svn_repos_parser_fns_t_set_revision_property_get( self) -> svn_error_t"}, { (char *)"svn_repos_parser_fns_t_set_node_property_set", _wrap_svn_repos_parser_fns_t_set_node_property_set, METH_VARARGS, (char *)"svn_repos_parser_fns_t_set_node_property_set( self, svn_error_t set_node_property)"}, { (char *)"svn_repos_parser_fns_t_set_node_property_get", _wrap_svn_repos_parser_fns_t_set_node_property_get, METH_VARARGS, (char *)"svn_repos_parser_fns_t_set_node_property_get( self) -> svn_error_t"}, { (char *)"svn_repos_parser_fns_t_remove_node_props_set", _wrap_svn_repos_parser_fns_t_remove_node_props_set, METH_VARARGS, (char *)"svn_repos_parser_fns_t_remove_node_props_set( self, svn_error_t remove_node_props)"}, { (char *)"svn_repos_parser_fns_t_remove_node_props_get", _wrap_svn_repos_parser_fns_t_remove_node_props_get, METH_VARARGS, (char *)"svn_repos_parser_fns_t_remove_node_props_get( self) -> svn_error_t"}, { (char *)"svn_repos_parser_fns_t_set_fulltext_set", _wrap_svn_repos_parser_fns_t_set_fulltext_set, METH_VARARGS, (char *)"svn_repos_parser_fns_t_set_fulltext_set( self, svn_error_t set_fulltext)"}, { (char *)"svn_repos_parser_fns_t_set_fulltext_get", _wrap_svn_repos_parser_fns_t_set_fulltext_get, METH_VARARGS, (char *)"svn_repos_parser_fns_t_set_fulltext_get( self) -> svn_error_t"}, { (char *)"svn_repos_parser_fns_t_close_node_set", _wrap_svn_repos_parser_fns_t_close_node_set, METH_VARARGS, (char *)"svn_repos_parser_fns_t_close_node_set( self, svn_error_t close_node)"}, { (char *)"svn_repos_parser_fns_t_close_node_get", _wrap_svn_repos_parser_fns_t_close_node_get, METH_VARARGS, (char *)"svn_repos_parser_fns_t_close_node_get( self) -> svn_error_t"}, { (char *)"svn_repos_parser_fns_t_close_revision_set", _wrap_svn_repos_parser_fns_t_close_revision_set, METH_VARARGS, (char *)"svn_repos_parser_fns_t_close_revision_set( self, svn_error_t close_revision)"}, { (char *)"svn_repos_parser_fns_t_close_revision_get", _wrap_svn_repos_parser_fns_t_close_revision_get, METH_VARARGS, (char *)"svn_repos_parser_fns_t_close_revision_get( self) -> svn_error_t"}, { (char *)"svn_repos_parser_fns_t_swigregister", svn_repos_parser_fns_t_swigregister, METH_VARARGS, NULL}, { (char *)"svn_repos_parse_dumpstream", _wrap_svn_repos_parse_dumpstream, METH_VARARGS, (char *)"\n" "svn_repos_parse_dumpstream(svn_stream_t stream, parse_fns, void parse_baton, \n" " svn_cancel_func_t cancel_func, apr_pool_t pool) -> svn_error_t\n" ""}, { (char *)"svn_repos_get_fs_build_parser", _wrap_svn_repos_get_fs_build_parser, METH_VARARGS, (char *)"\n" "svn_repos_get_fs_build_parser(svn_repos_t repos, svn_boolean_t use_history, enum svn_repos_load_uuid uuid_action, \n" " svn_stream_t outstream, \n" " char parent_dir, apr_pool_t pool) -> svn_error_t\n" ""}, { (char *)"svn_repos_authz_read", _wrap_svn_repos_authz_read, METH_VARARGS, (char *)"svn_repos_authz_read(char file, svn_boolean_t must_exist, apr_pool_t pool) -> svn_error_t"}, { (char *)"svn_repos_authz_check_access", _wrap_svn_repos_authz_check_access, METH_VARARGS, (char *)"\n" "svn_repos_authz_check_access(svn_authz_t authz, char repos_name, char path, char user, \n" " svn_repos_authz_access_t required_access, \n" " apr_pool_t pool) -> svn_error_t\n" ""}, { (char *)"svn_repos_check_revision_access", _wrap_svn_repos_check_revision_access, METH_VARARGS, (char *)"\n" "svn_repos_check_revision_access(svn_repos_revision_access_level_t access_level, svn_repos_t repos, \n" " svn_revnum_t revision, svn_repos_authz_func_t authz_read_func, \n" " apr_pool_t pool) -> svn_error_t\n" ""}, { (char *)"svn_repos_remember_client_capabilities", _wrap_svn_repos_remember_client_capabilities, METH_VARARGS, (char *)"svn_repos_remember_client_capabilities(svn_repos_t repos, apr_array_header_t capabilities) -> svn_error_t"}, { (char *)"svn_repos_t_swigregister", svn_repos_t_swigregister, METH_VARARGS, NULL}, { (char *)"svn_authz_t_swigregister", svn_authz_t_swigregister, METH_VARARGS, NULL}, { (char *)"svn_repos_parse_fns2_invoke_new_revision_record", _wrap_svn_repos_parse_fns2_invoke_new_revision_record, METH_VARARGS, (char *)"\n" "svn_repos_parse_fns2_invoke_new_revision_record(svn_repos_parse_fns2_t _obj, apr_hash_t headers, void parse_baton, \n" " apr_pool_t pool) -> svn_error_t\n" ""}, { (char *)"svn_repos_parse_fns2_invoke_uuid_record", _wrap_svn_repos_parse_fns2_invoke_uuid_record, METH_VARARGS, (char *)"\n" "svn_repos_parse_fns2_invoke_uuid_record(svn_repos_parse_fns2_t _obj, char uuid, void parse_baton, \n" " apr_pool_t pool) -> svn_error_t\n" ""}, { (char *)"svn_repos_parse_fns2_invoke_new_node_record", _wrap_svn_repos_parse_fns2_invoke_new_node_record, METH_VARARGS, (char *)"\n" "svn_repos_parse_fns2_invoke_new_node_record(svn_repos_parse_fns2_t _obj, apr_hash_t headers, void revision_baton, \n" " apr_pool_t pool) -> svn_error_t\n" ""}, { (char *)"svn_repos_parse_fns2_invoke_set_revision_property", _wrap_svn_repos_parse_fns2_invoke_set_revision_property, METH_VARARGS, (char *)"\n" "svn_repos_parse_fns2_invoke_set_revision_property(svn_repos_parse_fns2_t _obj, void revision_baton, char name, \n" " svn_string_t value) -> svn_error_t\n" ""}, { (char *)"svn_repos_parse_fns2_invoke_set_node_property", _wrap_svn_repos_parse_fns2_invoke_set_node_property, METH_VARARGS, (char *)"\n" "svn_repos_parse_fns2_invoke_set_node_property(svn_repos_parse_fns2_t _obj, void node_baton, char name, \n" " svn_string_t value) -> svn_error_t\n" ""}, { (char *)"svn_repos_parse_fns2_invoke_delete_node_property", _wrap_svn_repos_parse_fns2_invoke_delete_node_property, METH_VARARGS, (char *)"svn_repos_parse_fns2_invoke_delete_node_property(svn_repos_parse_fns2_t _obj, void node_baton, char name) -> svn_error_t"}, { (char *)"svn_repos_parse_fns2_invoke_remove_node_props", _wrap_svn_repos_parse_fns2_invoke_remove_node_props, METH_VARARGS, (char *)"svn_repos_parse_fns2_invoke_remove_node_props(svn_repos_parse_fns2_t _obj, void node_baton) -> svn_error_t"}, { (char *)"svn_repos_parse_fns2_invoke_set_fulltext", _wrap_svn_repos_parse_fns2_invoke_set_fulltext, METH_VARARGS, (char *)"svn_repos_parse_fns2_invoke_set_fulltext(svn_repos_parse_fns2_t _obj, void node_baton) -> svn_error_t"}, { (char *)"svn_repos_parse_fns2_invoke_apply_textdelta", _wrap_svn_repos_parse_fns2_invoke_apply_textdelta, METH_VARARGS, (char *)"svn_repos_parse_fns2_invoke_apply_textdelta(svn_repos_parse_fns2_t _obj, void node_baton) -> svn_error_t"}, { (char *)"svn_repos_parse_fns2_invoke_close_node", _wrap_svn_repos_parse_fns2_invoke_close_node, METH_VARARGS, (char *)"svn_repos_parse_fns2_invoke_close_node(svn_repos_parse_fns2_t _obj, void node_baton) -> svn_error_t"}, { (char *)"svn_repos_parse_fns2_invoke_close_revision", _wrap_svn_repos_parse_fns2_invoke_close_revision, METH_VARARGS, (char *)"svn_repos_parse_fns2_invoke_close_revision(svn_repos_parse_fns2_t _obj, void revision_baton) -> svn_error_t"}, { (char *)"svn_repos_invoke_authz_func", _wrap_svn_repos_invoke_authz_func, METH_VARARGS, (char *)"\n" "svn_repos_invoke_authz_func(svn_repos_authz_func_t _obj, svn_fs_root_t root, char path, \n" " void baton, apr_pool_t pool) -> svn_error_t\n" ""}, { (char *)"svn_repos_invoke_authz_callback", _wrap_svn_repos_invoke_authz_callback, METH_VARARGS, (char *)"\n" "svn_repos_invoke_authz_callback(svn_repos_authz_callback_t _obj, svn_repos_authz_access_t required, \n" " svn_fs_root_t root, char path, \n" " void baton, apr_pool_t pool) -> svn_error_t\n" ""}, { (char *)"svn_repos_invoke_file_rev_handler", _wrap_svn_repos_invoke_file_rev_handler, METH_VARARGS, (char *)"\n" "svn_repos_invoke_file_rev_handler(svn_repos_file_rev_handler_t _obj, void baton, char path, \n" " svn_revnum_t rev, apr_hash_t rev_props, \n" " apr_array_header_t prop_diffs, apr_pool_t pool) -> svn_error_t\n" ""}, { (char *)"svn_repos_invoke_notify_func", _wrap_svn_repos_invoke_notify_func, METH_VARARGS, (char *)"\n" "svn_repos_invoke_notify_func(svn_repos_notify_func_t _obj, void baton, svn_repos_notify_t notify, \n" " apr_pool_t scratch_pool)\n" ""}, { (char *)"svn_repos_invoke_history_func", _wrap_svn_repos_invoke_history_func, METH_VARARGS, (char *)"\n" "svn_repos_invoke_history_func(svn_repos_history_func_t _obj, void baton, char path, \n" " svn_revnum_t revision, apr_pool_t pool) -> svn_error_t\n" ""}, { (char *)"svn_repos_authz_func_t_swigregister", svn_repos_authz_func_t_swigregister, METH_VARARGS, NULL}, { (char *)"svn_repos_authz_callback_t_swigregister", svn_repos_authz_callback_t_swigregister, METH_VARARGS, NULL}, { (char *)"svn_repos_file_rev_handler_t_swigregister", svn_repos_file_rev_handler_t_swigregister, METH_VARARGS, NULL}, { (char *)"svn_repos_notify_func_t_swigregister", svn_repos_notify_func_t_swigregister, METH_VARARGS, NULL}, { (char *)"svn_repos_history_func_t_swigregister", svn_repos_history_func_t_swigregister, METH_VARARGS, NULL}, { NULL, NULL, 0, NULL } }; /* -------- TYPE CONVERSION AND EQUIVALENCE RULES (BEGIN) -------- */ static swig_type_info _swigt__p_apr_array_header_t = {"_p_apr_array_header_t", "apr_array_header_t *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_apr_hash_t = {"_p_apr_hash_t", "apr_hash_t *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_apr_int32_t = {"_p_apr_int32_t", "apr_int32_t *|time_t *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_apr_int64_t = {"_p_apr_int64_t", "apr_int64_t *|svn_filesize_t *|apr_time_t *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_apr_pool_t = {"_p_apr_pool_t", "apr_pool_t *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_char = {"_p_char", "char *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_f_p_apr_getopt_t_p_void_p_apr_pool_t__p_svn_error_t = {"_p_f_p_apr_getopt_t_p_void_p_apr_pool_t__p_svn_error_t", "svn_opt_subcommand_t *|struct svn_error_t *(*)(apr_getopt_t *,void *,apr_pool_t *)", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_f_p_p_svn_stream_t_p_void__p_svn_error_t = {"_p_f_p_p_svn_stream_t_p_void__p_svn_error_t", "struct svn_error_t *(*)(svn_stream_t **,void *)|svn_error_t *(*)(svn_stream_t **,void *)", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_f_p_p_void_p_apr_hash_t_p_void_p_apr_pool_t__p_svn_error_t = {"_p_f_p_p_void_p_apr_hash_t_p_void_p_apr_pool_t__p_svn_error_t", "struct svn_error_t *(*)(void **,apr_hash_t *,void *,apr_pool_t *)|svn_error_t *(*)(void **,apr_hash_t *,void *,apr_pool_t *)", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_f_p_q_const__char_p_void_p_apr_pool_t__p_svn_error_t = {"_p_f_p_q_const__char_p_void_p_apr_pool_t__p_svn_error_t", "svn_error_t *(*)(char const *,void *,apr_pool_t *)|struct svn_error_t *(*)(char const *,void *,apr_pool_t *)", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_f_p_q_const__svn_commit_info_t_p_void_p_apr_pool_t__p_svn_error_t = {"_p_f_p_q_const__svn_commit_info_t_p_void_p_apr_pool_t__p_svn_error_t", "svn_commit_callback2_t|struct svn_error_t *(*)(svn_commit_info_t const *,void *,apr_pool_t *)", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_f_p_svn_boolean_t_p_svn_fs_root_t_p_q_const__char_p_void_p_apr_pool_t__p_svn_error_t = {"_p_f_p_svn_boolean_t_p_svn_fs_root_t_p_q_const__char_p_void_p_apr_pool_t__p_svn_error_t", "svn_repos_authz_func_t|struct svn_error_t *(*)(svn_boolean_t *,svn_fs_root_t *,char const *,void *,apr_pool_t *)", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_f_p_svn_location_segment_t_p_void_p_apr_pool_t__p_svn_error_t = {"_p_f_p_svn_location_segment_t_p_void_p_apr_pool_t__p_svn_error_t", "struct svn_error_t *(*)(svn_location_segment_t *,void *,apr_pool_t *)|svn_location_segment_receiver_t", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_f_p_svn_txdelta_window_handler_t_p_p_void_p_void__p_svn_error_t = {"_p_f_p_svn_txdelta_window_handler_t_p_p_void_p_void__p_svn_error_t", "struct svn_error_t *(*)(svn_txdelta_window_handler_t *,void **,void *)|svn_error_t *(*)(svn_txdelta_window_handler_t *,void **,void *)", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_f_p_void__p_svn_error_t = {"_p_f_p_void__p_svn_error_t", "svn_cancel_func_t|struct svn_error_t *(*)(void *)|svn_error_t *(*)(void *)", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_f_p_void_apr_int64_t_svn_fs_pack_notify_action_t_p_apr_pool_t__p_svn_error_t = {"_p_f_p_void_apr_int64_t_svn_fs_pack_notify_action_t_p_apr_pool_t__p_svn_error_t", "struct svn_error_t *(*)(void *,apr_int64_t,svn_fs_pack_notify_action_t,apr_pool_t *)|svn_fs_pack_notify_t", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_f_p_void_p_apr_hash_t_svn_revnum_t_p_q_const__char_p_q_const__char_p_q_const__char_p_apr_pool_t__p_svn_error_t = {"_p_f_p_void_p_apr_hash_t_svn_revnum_t_p_q_const__char_p_q_const__char_p_q_const__char_p_apr_pool_t__p_svn_error_t", "struct svn_error_t *(*)(void *,apr_hash_t *,svn_revnum_t,char const *,char const *,char const *,apr_pool_t *)|svn_log_message_receiver_t", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_f_p_void_p_q_const__char__p_svn_error_t = {"_p_f_p_void_p_q_const__char__p_svn_error_t", "struct svn_error_t *(*)(void *,char const *)|svn_error_t *(*)(void *,char const *)", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_f_p_void_p_q_const__char_p_q_const__svn_string_t__p_svn_error_t = {"_p_f_p_void_p_q_const__char_p_q_const__svn_string_t__p_svn_error_t", "struct svn_error_t *(*)(void *,char const *,svn_string_t const *)|svn_error_t *(*)(void *,char const *,svn_string_t const *)", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_f_p_void_p_q_const__char_svn_revnum_t_p_apr_hash_t_p_svn_txdelta_window_handler_t_p_p_void_p_apr_array_header_t_p_apr_pool_t__p_svn_error_t = {"_p_f_p_void_p_q_const__char_svn_revnum_t_p_apr_hash_t_p_svn_txdelta_window_handler_t_p_p_void_p_apr_array_header_t_p_apr_pool_t__p_svn_error_t", "struct svn_error_t *(*)(void *,char const *,svn_revnum_t,apr_hash_t *,svn_txdelta_window_handler_t *,void **,apr_array_header_t *,apr_pool_t *)|svn_repos_file_rev_handler_t", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_f_p_void_p_q_const__char_svn_revnum_t_p_apr_hash_t_svn_boolean_t_p_svn_txdelta_window_handler_t_p_p_void_p_apr_array_header_t_p_apr_pool_t__p_svn_error_t = {"_p_f_p_void_p_q_const__char_svn_revnum_t_p_apr_hash_t_svn_boolean_t_p_svn_txdelta_window_handler_t_p_p_void_p_apr_array_header_t_p_apr_pool_t__p_svn_error_t", "struct svn_error_t *(*)(void *,char const *,svn_revnum_t,apr_hash_t *,svn_boolean_t,svn_txdelta_window_handler_t *,void **,apr_array_header_t *,apr_pool_t *)|svn_file_rev_handler_t", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_f_p_void_p_q_const__char_svn_revnum_t_p_apr_pool_t__p_svn_error_t = {"_p_f_p_void_p_q_const__char_svn_revnum_t_p_apr_pool_t__p_svn_error_t", "struct svn_error_t *(*)(void *,char const *,svn_revnum_t,apr_pool_t *)|svn_repos_history_func_t", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_f_p_void_p_q_const__struct_svn_repos_notify_t_p_apr_pool_t__void = {"_p_f_p_void_p_q_const__struct_svn_repos_notify_t_p_apr_pool_t__void", "svn_repos_notify_func_t|void (*)(void *,struct svn_repos_notify_t const *,apr_pool_t *)", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_f_p_void_p_svn_log_entry_t_p_apr_pool_t__p_svn_error_t = {"_p_f_p_void_p_svn_log_entry_t_p_apr_pool_t__p_svn_error_t", "struct svn_error_t *(*)(void *,svn_log_entry_t *,apr_pool_t *)|svn_log_entry_receiver_t", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_f_svn_repos_authz_access_t_p_svn_boolean_t_p_svn_fs_root_t_p_q_const__char_p_void_p_apr_pool_t__p_svn_error_t = {"_p_f_svn_repos_authz_access_t_p_svn_boolean_t_p_svn_fs_root_t_p_q_const__char_p_void_p_apr_pool_t__p_svn_error_t", "struct svn_error_t *(*)(svn_repos_authz_access_t,svn_boolean_t *,svn_fs_root_t *,char const *,void *,apr_pool_t *)|svn_repos_authz_callback_t", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_f_svn_revnum_t_p_q_const__char_p_q_const__char_p_void__p_svn_error_t = {"_p_f_svn_revnum_t_p_q_const__char_p_q_const__char_p_void__p_svn_error_t", "struct svn_error_t *(*)(svn_revnum_t,char const *,char const *,void *)|svn_commit_callback_t", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_int = {"_p_int", "int *|svn_boolean_t *|apr_status_t *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_long = {"_p_long", "long *|svn_revnum_t *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_p_apr_array_header_t = {"_p_p_apr_array_header_t", "apr_array_header_t **", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_p_apr_hash_t = {"_p_p_apr_hash_t", "apr_hash_t **|svn_mergeinfo_catalog_t *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_p_char = {"_p_p_char", "char **", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_p_f_p_svn_boolean_t_p_svn_fs_root_t_p_q_const__char_p_void_p_apr_pool_t__p_svn_error_t = {"_p_p_f_p_svn_boolean_t_p_svn_fs_root_t_p_q_const__char_p_void_p_apr_pool_t__p_svn_error_t", "svn_repos_authz_func_t *|struct svn_error_t *(**)(svn_boolean_t *,svn_fs_root_t *,char const *,void *,apr_pool_t *)", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_p_f_p_svn_txdelta_window_t_p_void__p_svn_error_t = {"_p_p_f_p_svn_txdelta_window_t_p_void__p_svn_error_t", "svn_txdelta_window_handler_t *|struct svn_error_t *(**)(svn_txdelta_window_t *,void *)", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_p_f_p_void__p_svn_error_t = {"_p_p_f_p_void__p_svn_error_t", "svn_cancel_func_t *|struct svn_error_t *(**)(void *)", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_p_f_p_void_apr_int64_t_svn_fs_pack_notify_action_t_p_apr_pool_t__p_svn_error_t = {"_p_p_f_p_void_apr_int64_t_svn_fs_pack_notify_action_t_p_apr_pool_t__p_svn_error_t", "struct svn_error_t *(**)(void *,apr_int64_t,svn_fs_pack_notify_action_t,apr_pool_t *)|svn_fs_pack_notify_t *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_p_f_p_void_p_q_const__char_svn_revnum_t_p_apr_hash_t_p_svn_txdelta_window_handler_t_p_p_void_p_apr_array_header_t_p_apr_pool_t__p_svn_error_t = {"_p_p_f_p_void_p_q_const__char_svn_revnum_t_p_apr_hash_t_p_svn_txdelta_window_handler_t_p_p_void_p_apr_array_header_t_p_apr_pool_t__p_svn_error_t", "struct svn_error_t *(**)(void *,char const *,svn_revnum_t,apr_hash_t *,svn_txdelta_window_handler_t *,void **,apr_array_header_t *,apr_pool_t *)|svn_repos_file_rev_handler_t *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_p_f_p_void_p_q_const__char_svn_revnum_t_p_apr_hash_t_svn_boolean_t_p_svn_txdelta_window_handler_t_p_p_void_p_apr_array_header_t_p_apr_pool_t__p_svn_error_t = {"_p_p_f_p_void_p_q_const__char_svn_revnum_t_p_apr_hash_t_svn_boolean_t_p_svn_txdelta_window_handler_t_p_p_void_p_apr_array_header_t_p_apr_pool_t__p_svn_error_t", "struct svn_error_t *(**)(void *,char const *,svn_revnum_t,apr_hash_t *,svn_boolean_t,svn_txdelta_window_handler_t *,void **,apr_array_header_t *,apr_pool_t *)|svn_file_rev_handler_t *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_p_f_p_void_p_q_const__char_svn_revnum_t_p_apr_pool_t__p_svn_error_t = {"_p_p_f_p_void_p_q_const__char_svn_revnum_t_p_apr_pool_t__p_svn_error_t", "struct svn_error_t *(**)(void *,char const *,svn_revnum_t,apr_pool_t *)|svn_repos_history_func_t *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_p_f_p_void_p_q_const__struct_svn_repos_notify_t_p_apr_pool_t__void = {"_p_p_f_p_void_p_q_const__struct_svn_repos_notify_t_p_apr_pool_t__void", "void (**)(void *,struct svn_repos_notify_t const *,apr_pool_t *)|svn_repos_notify_func_t *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_p_f_svn_repos_authz_access_t_p_svn_boolean_t_p_svn_fs_root_t_p_q_const__char_p_void_p_apr_pool_t__p_svn_error_t = {"_p_p_f_svn_repos_authz_access_t_p_svn_boolean_t_p_svn_fs_root_t_p_q_const__char_p_void_p_apr_pool_t__p_svn_error_t", "svn_repos_authz_callback_t *|struct svn_error_t *(**)(svn_repos_authz_access_t,svn_boolean_t *,svn_fs_root_t *,char const *,void *,apr_pool_t *)", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_p_svn_authz_t = {"_p_p_svn_authz_t", "struct svn_authz_t **|svn_authz_t **", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_p_svn_delta_editor_t = {"_p_p_svn_delta_editor_t", "struct svn_delta_editor_t **|svn_delta_editor_t **", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_p_svn_dirent_t = {"_p_p_svn_dirent_t", "struct svn_dirent_t **|svn_dirent_t **", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_p_svn_fs_txn_t = {"_p_p_svn_fs_txn_t", "struct svn_fs_txn_t **|svn_fs_txn_t **", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_p_svn_lock_t = {"_p_p_svn_lock_t", "struct svn_lock_t **|svn_lock_t **", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_p_svn_repos_parse_fns2_t = {"_p_p_svn_repos_parse_fns2_t", "struct svn_repos_parse_fns2_t **|svn_repos_parse_fns2_t **", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_p_svn_repos_parse_fns_t = {"_p_p_svn_repos_parse_fns_t", "struct svn_repos_parse_fns_t **|svn_repos_parser_fns_t **", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_p_svn_repos_t = {"_p_p_svn_repos_t", "struct svn_repos_t **|svn_repos_t **", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_p_svn_stream_t = {"_p_p_svn_stream_t", "struct svn_stream_t **|svn_stream_t **", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_p_svn_string_t = {"_p_p_svn_string_t", "struct svn_string_t **|svn_string_t **", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_p_void = {"_p_p_void", "void **", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_svn_auth_baton_t = {"_p_svn_auth_baton_t", "struct svn_auth_baton_t *|svn_auth_baton_t *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_svn_auth_cred_simple_t = {"_p_svn_auth_cred_simple_t", "struct svn_auth_cred_simple_t *|svn_auth_cred_simple_t *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_svn_auth_cred_ssl_client_cert_pw_t = {"_p_svn_auth_cred_ssl_client_cert_pw_t", "struct svn_auth_cred_ssl_client_cert_pw_t *|svn_auth_cred_ssl_client_cert_pw_t *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_svn_auth_cred_ssl_client_cert_t = {"_p_svn_auth_cred_ssl_client_cert_t", "struct svn_auth_cred_ssl_client_cert_t *|svn_auth_cred_ssl_client_cert_t *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_svn_auth_cred_ssl_server_trust_t = {"_p_svn_auth_cred_ssl_server_trust_t", "struct svn_auth_cred_ssl_server_trust_t *|svn_auth_cred_ssl_server_trust_t *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_svn_auth_cred_username_t = {"_p_svn_auth_cred_username_t", "struct svn_auth_cred_username_t *|svn_auth_cred_username_t *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_svn_auth_iterstate_t = {"_p_svn_auth_iterstate_t", "struct svn_auth_iterstate_t *|svn_auth_iterstate_t *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_svn_auth_provider_object_t = {"_p_svn_auth_provider_object_t", "struct svn_auth_provider_object_t *|svn_auth_provider_object_t *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_svn_auth_provider_t = {"_p_svn_auth_provider_t", "struct svn_auth_provider_t *|svn_auth_provider_t *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_svn_auth_ssl_server_cert_info_t = {"_p_svn_auth_ssl_server_cert_info_t", "struct svn_auth_ssl_server_cert_info_t *|svn_auth_ssl_server_cert_info_t *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_svn_authz_t = {"_p_svn_authz_t", "struct svn_authz_t *|svn_authz_t *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_svn_commit_info_t = {"_p_svn_commit_info_t", "struct svn_commit_info_t *|svn_commit_info_t *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_svn_config_t = {"_p_svn_config_t", "struct svn_config_t *|svn_config_t *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_svn_delta_editor_t = {"_p_svn_delta_editor_t", "struct svn_delta_editor_t *|svn_delta_editor_t *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_svn_depth_t = {"_p_svn_depth_t", "enum svn_depth_t *|svn_depth_t *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_svn_dirent_t = {"_p_svn_dirent_t", "struct svn_dirent_t *|svn_dirent_t *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_svn_errno_t = {"_p_svn_errno_t", "enum svn_errno_t *|svn_errno_t *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_svn_error_t = {"_p_svn_error_t", "struct svn_error_t *|svn_error_t *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_svn_fs_access_t = {"_p_svn_fs_access_t", "struct svn_fs_access_t *|svn_fs_access_t *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_svn_fs_dirent_t = {"_p_svn_fs_dirent_t", "struct svn_fs_dirent_t *|svn_fs_dirent_t *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_svn_fs_history_t = {"_p_svn_fs_history_t", "struct svn_fs_history_t *|svn_fs_history_t *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_svn_fs_id_t = {"_p_svn_fs_id_t", "struct svn_fs_id_t *|svn_fs_id_t *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_svn_fs_pack_notify_action_t = {"_p_svn_fs_pack_notify_action_t", "enum svn_fs_pack_notify_action_t *|svn_fs_pack_notify_action_t *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_svn_fs_path_change2_t = {"_p_svn_fs_path_change2_t", "struct svn_fs_path_change2_t *|svn_fs_path_change2_t *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_svn_fs_path_change_kind_t = {"_p_svn_fs_path_change_kind_t", "enum svn_fs_path_change_kind_t *|svn_fs_path_change_kind_t *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_svn_fs_path_change_t = {"_p_svn_fs_path_change_t", "struct svn_fs_path_change_t *|svn_fs_path_change_t *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_svn_fs_root_t = {"_p_svn_fs_root_t", "struct svn_fs_root_t *|svn_fs_root_t *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_svn_fs_t = {"_p_svn_fs_t", "struct svn_fs_t *|svn_fs_t *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_svn_fs_txn_t = {"_p_svn_fs_txn_t", "struct svn_fs_txn_t *|svn_fs_txn_t *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_svn_io_dirent2_t = {"_p_svn_io_dirent2_t", "struct svn_io_dirent2_t *|svn_io_dirent2_t *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_svn_io_dirent_t = {"_p_svn_io_dirent_t", "struct svn_io_dirent_t *|svn_io_dirent_t *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_svn_io_file_del_t = {"_p_svn_io_file_del_t", "enum svn_io_file_del_t *|svn_io_file_del_t *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_svn_location_segment_t = {"_p_svn_location_segment_t", "struct svn_location_segment_t *|svn_location_segment_t *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_svn_lock_t = {"_p_svn_lock_t", "struct svn_lock_t *|svn_lock_t *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_svn_log_changed_path2_t = {"_p_svn_log_changed_path2_t", "struct svn_log_changed_path2_t *|svn_log_changed_path2_t *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_svn_log_changed_path_t = {"_p_svn_log_changed_path_t", "struct svn_log_changed_path_t *|svn_log_changed_path_t *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_svn_log_entry_t = {"_p_svn_log_entry_t", "struct svn_log_entry_t *|svn_log_entry_t *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_svn_merge_range_t = {"_p_svn_merge_range_t", "struct svn_merge_range_t *|svn_merge_range_t *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_svn_mergeinfo_inheritance_t = {"_p_svn_mergeinfo_inheritance_t", "enum svn_mergeinfo_inheritance_t *|svn_mergeinfo_inheritance_t *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_svn_node_kind_t = {"_p_svn_node_kind_t", "enum svn_node_kind_t *|svn_node_kind_t *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_svn_opt_revision_range_t = {"_p_svn_opt_revision_range_t", "struct svn_opt_revision_range_t *|svn_opt_revision_range_t *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_svn_opt_revision_t = {"_p_svn_opt_revision_t", "struct svn_opt_revision_t *|svn_opt_revision_t *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_svn_opt_revision_value_t = {"_p_svn_opt_revision_value_t", "union svn_opt_revision_value_t *|svn_opt_revision_value_t *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_svn_opt_subcommand_desc2_t = {"_p_svn_opt_subcommand_desc2_t", "struct svn_opt_subcommand_desc2_t *|svn_opt_subcommand_desc2_t *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_svn_opt_subcommand_desc_t = {"_p_svn_opt_subcommand_desc_t", "struct svn_opt_subcommand_desc_t *|svn_opt_subcommand_desc_t *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_svn_prop_kind = {"_p_svn_prop_kind", "svn_prop_kind_t *|enum svn_prop_kind *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_svn_repos_authz_access_t = {"_p_svn_repos_authz_access_t", "enum svn_repos_authz_access_t *|svn_repos_authz_access_t *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_svn_repos_node_t = {"_p_svn_repos_node_t", "struct svn_repos_node_t *|svn_repos_node_t *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_svn_repos_notify_action_t = {"_p_svn_repos_notify_action_t", "enum svn_repos_notify_action_t *|svn_repos_notify_action_t *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_svn_repos_notify_t = {"_p_svn_repos_notify_t", "struct svn_repos_notify_t *|svn_repos_notify_t *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_svn_repos_notify_warning_t = {"_p_svn_repos_notify_warning_t", "enum svn_repos_notify_warning_t *|svn_repos_notify_warning_t *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_svn_repos_parse_fns2_t = {"_p_svn_repos_parse_fns2_t", "struct svn_repos_parse_fns2_t *|svn_repos_parse_fns2_t *|svn_repos_parser_fns2_t *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_svn_repos_parse_fns_t = {"_p_svn_repos_parse_fns_t", "struct svn_repos_parse_fns_t *|svn_repos_parser_fns_t *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_svn_repos_revision_access_level_t = {"_p_svn_repos_revision_access_level_t", "enum svn_repos_revision_access_level_t *|svn_repos_revision_access_level_t *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_svn_repos_t = {"_p_svn_repos_t", "struct svn_repos_t *|svn_repos_t *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_svn_stream_mark_t = {"_p_svn_stream_mark_t", "struct svn_stream_mark_t *|svn_stream_mark_t *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_svn_stream_t = {"_p_svn_stream_t", "struct svn_stream_t *|svn_stream_t *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_svn_string_t = {"_p_svn_string_t", "struct svn_string_t *|svn_string_t *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_svn_stringbuf_t = {"_p_svn_stringbuf_t", "struct svn_stringbuf_t *|svn_stringbuf_t *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_svn_tristate_t = {"_p_svn_tristate_t", "enum svn_tristate_t *|svn_tristate_t *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_svn_txdelta_op_t = {"_p_svn_txdelta_op_t", "struct svn_txdelta_op_t *|svn_txdelta_op_t *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_svn_txdelta_stream_t = {"_p_svn_txdelta_stream_t", "struct svn_txdelta_stream_t *|svn_txdelta_stream_t *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_svn_txdelta_window_t = {"_p_svn_txdelta_window_t", "struct svn_txdelta_window_t *|svn_txdelta_window_t *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_svn_version_checklist_t = {"_p_svn_version_checklist_t", "struct svn_version_checklist_t *|svn_version_checklist_t *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_svn_version_t = {"_p_svn_version_t", "struct svn_version_t *|svn_version_t *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_unsigned_long = {"_p_unsigned_long", "unsigned long *|svn_linenum_t *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_void = {"_p_void", "void *", 0, 0, (void*)0, 0}; static swig_type_info *swig_type_initial[] = { &_swigt__p_apr_array_header_t, &_swigt__p_apr_hash_t, &_swigt__p_apr_int32_t, &_swigt__p_apr_int64_t, &_swigt__p_apr_pool_t, &_swigt__p_char, &_swigt__p_f_p_apr_getopt_t_p_void_p_apr_pool_t__p_svn_error_t, &_swigt__p_f_p_p_svn_stream_t_p_void__p_svn_error_t, &_swigt__p_f_p_p_void_p_apr_hash_t_p_void_p_apr_pool_t__p_svn_error_t, &_swigt__p_f_p_q_const__char_p_void_p_apr_pool_t__p_svn_error_t, &_swigt__p_f_p_q_const__svn_commit_info_t_p_void_p_apr_pool_t__p_svn_error_t, &_swigt__p_f_p_svn_boolean_t_p_svn_fs_root_t_p_q_const__char_p_void_p_apr_pool_t__p_svn_error_t, &_swigt__p_f_p_svn_location_segment_t_p_void_p_apr_pool_t__p_svn_error_t, &_swigt__p_f_p_svn_txdelta_window_handler_t_p_p_void_p_void__p_svn_error_t, &_swigt__p_f_p_void__p_svn_error_t, &_swigt__p_f_p_void_apr_int64_t_svn_fs_pack_notify_action_t_p_apr_pool_t__p_svn_error_t, &_swigt__p_f_p_void_p_apr_hash_t_svn_revnum_t_p_q_const__char_p_q_const__char_p_q_const__char_p_apr_pool_t__p_svn_error_t, &_swigt__p_f_p_void_p_q_const__char__p_svn_error_t, &_swigt__p_f_p_void_p_q_const__char_p_q_const__svn_string_t__p_svn_error_t, &_swigt__p_f_p_void_p_q_const__char_svn_revnum_t_p_apr_hash_t_p_svn_txdelta_window_handler_t_p_p_void_p_apr_array_header_t_p_apr_pool_t__p_svn_error_t, &_swigt__p_f_p_void_p_q_const__char_svn_revnum_t_p_apr_hash_t_svn_boolean_t_p_svn_txdelta_window_handler_t_p_p_void_p_apr_array_header_t_p_apr_pool_t__p_svn_error_t, &_swigt__p_f_p_void_p_q_const__char_svn_revnum_t_p_apr_pool_t__p_svn_error_t, &_swigt__p_f_p_void_p_q_const__struct_svn_repos_notify_t_p_apr_pool_t__void, &_swigt__p_f_p_void_p_svn_log_entry_t_p_apr_pool_t__p_svn_error_t, &_swigt__p_f_svn_repos_authz_access_t_p_svn_boolean_t_p_svn_fs_root_t_p_q_const__char_p_void_p_apr_pool_t__p_svn_error_t, &_swigt__p_f_svn_revnum_t_p_q_const__char_p_q_const__char_p_void__p_svn_error_t, &_swigt__p_int, &_swigt__p_long, &_swigt__p_p_apr_array_header_t, &_swigt__p_p_apr_hash_t, &_swigt__p_p_char, &_swigt__p_p_f_p_svn_boolean_t_p_svn_fs_root_t_p_q_const__char_p_void_p_apr_pool_t__p_svn_error_t, &_swigt__p_p_f_p_svn_txdelta_window_t_p_void__p_svn_error_t, &_swigt__p_p_f_p_void__p_svn_error_t, &_swigt__p_p_f_p_void_apr_int64_t_svn_fs_pack_notify_action_t_p_apr_pool_t__p_svn_error_t, &_swigt__p_p_f_p_void_p_q_const__char_svn_revnum_t_p_apr_hash_t_p_svn_txdelta_window_handler_t_p_p_void_p_apr_array_header_t_p_apr_pool_t__p_svn_error_t, &_swigt__p_p_f_p_void_p_q_const__char_svn_revnum_t_p_apr_hash_t_svn_boolean_t_p_svn_txdelta_window_handler_t_p_p_void_p_apr_array_header_t_p_apr_pool_t__p_svn_error_t, &_swigt__p_p_f_p_void_p_q_const__char_svn_revnum_t_p_apr_pool_t__p_svn_error_t, &_swigt__p_p_f_p_void_p_q_const__struct_svn_repos_notify_t_p_apr_pool_t__void, &_swigt__p_p_f_svn_repos_authz_access_t_p_svn_boolean_t_p_svn_fs_root_t_p_q_const__char_p_void_p_apr_pool_t__p_svn_error_t, &_swigt__p_p_svn_authz_t, &_swigt__p_p_svn_delta_editor_t, &_swigt__p_p_svn_dirent_t, &_swigt__p_p_svn_fs_txn_t, &_swigt__p_p_svn_lock_t, &_swigt__p_p_svn_repos_parse_fns2_t, &_swigt__p_p_svn_repos_parse_fns_t, &_swigt__p_p_svn_repos_t, &_swigt__p_p_svn_stream_t, &_swigt__p_p_svn_string_t, &_swigt__p_p_void, &_swigt__p_svn_auth_baton_t, &_swigt__p_svn_auth_cred_simple_t, &_swigt__p_svn_auth_cred_ssl_client_cert_pw_t, &_swigt__p_svn_auth_cred_ssl_client_cert_t, &_swigt__p_svn_auth_cred_ssl_server_trust_t, &_swigt__p_svn_auth_cred_username_t, &_swigt__p_svn_auth_iterstate_t, &_swigt__p_svn_auth_provider_object_t, &_swigt__p_svn_auth_provider_t, &_swigt__p_svn_auth_ssl_server_cert_info_t, &_swigt__p_svn_authz_t, &_swigt__p_svn_commit_info_t, &_swigt__p_svn_config_t, &_swigt__p_svn_delta_editor_t, &_swigt__p_svn_depth_t, &_swigt__p_svn_dirent_t, &_swigt__p_svn_errno_t, &_swigt__p_svn_error_t, &_swigt__p_svn_fs_access_t, &_swigt__p_svn_fs_dirent_t, &_swigt__p_svn_fs_history_t, &_swigt__p_svn_fs_id_t, &_swigt__p_svn_fs_pack_notify_action_t, &_swigt__p_svn_fs_path_change2_t, &_swigt__p_svn_fs_path_change_kind_t, &_swigt__p_svn_fs_path_change_t, &_swigt__p_svn_fs_root_t, &_swigt__p_svn_fs_t, &_swigt__p_svn_fs_txn_t, &_swigt__p_svn_io_dirent2_t, &_swigt__p_svn_io_dirent_t, &_swigt__p_svn_io_file_del_t, &_swigt__p_svn_location_segment_t, &_swigt__p_svn_lock_t, &_swigt__p_svn_log_changed_path2_t, &_swigt__p_svn_log_changed_path_t, &_swigt__p_svn_log_entry_t, &_swigt__p_svn_merge_range_t, &_swigt__p_svn_mergeinfo_inheritance_t, &_swigt__p_svn_node_kind_t, &_swigt__p_svn_opt_revision_range_t, &_swigt__p_svn_opt_revision_t, &_swigt__p_svn_opt_revision_value_t, &_swigt__p_svn_opt_subcommand_desc2_t, &_swigt__p_svn_opt_subcommand_desc_t, &_swigt__p_svn_prop_kind, &_swigt__p_svn_repos_authz_access_t, &_swigt__p_svn_repos_node_t, &_swigt__p_svn_repos_notify_action_t, &_swigt__p_svn_repos_notify_t, &_swigt__p_svn_repos_notify_warning_t, &_swigt__p_svn_repos_parse_fns2_t, &_swigt__p_svn_repos_parse_fns_t, &_swigt__p_svn_repos_revision_access_level_t, &_swigt__p_svn_repos_t, &_swigt__p_svn_stream_mark_t, &_swigt__p_svn_stream_t, &_swigt__p_svn_string_t, &_swigt__p_svn_stringbuf_t, &_swigt__p_svn_tristate_t, &_swigt__p_svn_txdelta_op_t, &_swigt__p_svn_txdelta_stream_t, &_swigt__p_svn_txdelta_window_t, &_swigt__p_svn_version_checklist_t, &_swigt__p_svn_version_t, &_swigt__p_unsigned_long, &_swigt__p_void, }; static swig_cast_info _swigc__p_apr_array_header_t[] = { {&_swigt__p_apr_array_header_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_apr_hash_t[] = { {&_swigt__p_apr_hash_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_apr_int32_t[] = { {&_swigt__p_apr_int32_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_apr_int64_t[] = { {&_swigt__p_apr_int64_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_apr_pool_t[] = { {&_swigt__p_apr_pool_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_char[] = { {&_swigt__p_char, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_f_p_apr_getopt_t_p_void_p_apr_pool_t__p_svn_error_t[] = { {&_swigt__p_f_p_apr_getopt_t_p_void_p_apr_pool_t__p_svn_error_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_f_p_p_svn_stream_t_p_void__p_svn_error_t[] = { {&_swigt__p_f_p_p_svn_stream_t_p_void__p_svn_error_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_f_p_p_void_p_apr_hash_t_p_void_p_apr_pool_t__p_svn_error_t[] = { {&_swigt__p_f_p_p_void_p_apr_hash_t_p_void_p_apr_pool_t__p_svn_error_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_f_p_q_const__char_p_void_p_apr_pool_t__p_svn_error_t[] = { {&_swigt__p_f_p_q_const__char_p_void_p_apr_pool_t__p_svn_error_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_f_p_q_const__svn_commit_info_t_p_void_p_apr_pool_t__p_svn_error_t[] = { {&_swigt__p_f_p_q_const__svn_commit_info_t_p_void_p_apr_pool_t__p_svn_error_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_f_p_svn_boolean_t_p_svn_fs_root_t_p_q_const__char_p_void_p_apr_pool_t__p_svn_error_t[] = { {&_swigt__p_f_p_svn_boolean_t_p_svn_fs_root_t_p_q_const__char_p_void_p_apr_pool_t__p_svn_error_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_f_p_svn_location_segment_t_p_void_p_apr_pool_t__p_svn_error_t[] = { {&_swigt__p_f_p_svn_location_segment_t_p_void_p_apr_pool_t__p_svn_error_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_f_p_svn_txdelta_window_handler_t_p_p_void_p_void__p_svn_error_t[] = { {&_swigt__p_f_p_svn_txdelta_window_handler_t_p_p_void_p_void__p_svn_error_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_f_p_void__p_svn_error_t[] = { {&_swigt__p_f_p_void__p_svn_error_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_f_p_void_apr_int64_t_svn_fs_pack_notify_action_t_p_apr_pool_t__p_svn_error_t[] = { {&_swigt__p_f_p_void_apr_int64_t_svn_fs_pack_notify_action_t_p_apr_pool_t__p_svn_error_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_f_p_void_p_apr_hash_t_svn_revnum_t_p_q_const__char_p_q_const__char_p_q_const__char_p_apr_pool_t__p_svn_error_t[] = { {&_swigt__p_f_p_void_p_apr_hash_t_svn_revnum_t_p_q_const__char_p_q_const__char_p_q_const__char_p_apr_pool_t__p_svn_error_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_f_p_void_p_q_const__char__p_svn_error_t[] = { {&_swigt__p_f_p_void_p_q_const__char__p_svn_error_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_f_p_void_p_q_const__char_p_q_const__svn_string_t__p_svn_error_t[] = { {&_swigt__p_f_p_void_p_q_const__char_p_q_const__svn_string_t__p_svn_error_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_f_p_void_p_q_const__char_svn_revnum_t_p_apr_hash_t_p_svn_txdelta_window_handler_t_p_p_void_p_apr_array_header_t_p_apr_pool_t__p_svn_error_t[] = { {&_swigt__p_f_p_void_p_q_const__char_svn_revnum_t_p_apr_hash_t_p_svn_txdelta_window_handler_t_p_p_void_p_apr_array_header_t_p_apr_pool_t__p_svn_error_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_f_p_void_p_q_const__char_svn_revnum_t_p_apr_hash_t_svn_boolean_t_p_svn_txdelta_window_handler_t_p_p_void_p_apr_array_header_t_p_apr_pool_t__p_svn_error_t[] = { {&_swigt__p_f_p_void_p_q_const__char_svn_revnum_t_p_apr_hash_t_svn_boolean_t_p_svn_txdelta_window_handler_t_p_p_void_p_apr_array_header_t_p_apr_pool_t__p_svn_error_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_f_p_void_p_q_const__char_svn_revnum_t_p_apr_pool_t__p_svn_error_t[] = { {&_swigt__p_f_p_void_p_q_const__char_svn_revnum_t_p_apr_pool_t__p_svn_error_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_f_p_void_p_q_const__struct_svn_repos_notify_t_p_apr_pool_t__void[] = { {&_swigt__p_f_p_void_p_q_const__struct_svn_repos_notify_t_p_apr_pool_t__void, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_f_p_void_p_svn_log_entry_t_p_apr_pool_t__p_svn_error_t[] = { {&_swigt__p_f_p_void_p_svn_log_entry_t_p_apr_pool_t__p_svn_error_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_f_svn_repos_authz_access_t_p_svn_boolean_t_p_svn_fs_root_t_p_q_const__char_p_void_p_apr_pool_t__p_svn_error_t[] = { {&_swigt__p_f_svn_repos_authz_access_t_p_svn_boolean_t_p_svn_fs_root_t_p_q_const__char_p_void_p_apr_pool_t__p_svn_error_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_f_svn_revnum_t_p_q_const__char_p_q_const__char_p_void__p_svn_error_t[] = { {&_swigt__p_f_svn_revnum_t_p_q_const__char_p_q_const__char_p_void__p_svn_error_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_int[] = { {&_swigt__p_int, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_long[] = { {&_swigt__p_long, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_p_apr_array_header_t[] = { {&_swigt__p_p_apr_array_header_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_p_apr_hash_t[] = { {&_swigt__p_p_apr_hash_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_p_char[] = { {&_swigt__p_p_char, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_p_f_p_svn_boolean_t_p_svn_fs_root_t_p_q_const__char_p_void_p_apr_pool_t__p_svn_error_t[] = { {&_swigt__p_p_f_p_svn_boolean_t_p_svn_fs_root_t_p_q_const__char_p_void_p_apr_pool_t__p_svn_error_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_p_f_p_svn_txdelta_window_t_p_void__p_svn_error_t[] = { {&_swigt__p_p_f_p_svn_txdelta_window_t_p_void__p_svn_error_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_p_f_p_void__p_svn_error_t[] = { {&_swigt__p_p_f_p_void__p_svn_error_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_p_f_p_void_apr_int64_t_svn_fs_pack_notify_action_t_p_apr_pool_t__p_svn_error_t[] = { {&_swigt__p_p_f_p_void_apr_int64_t_svn_fs_pack_notify_action_t_p_apr_pool_t__p_svn_error_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_p_f_p_void_p_q_const__char_svn_revnum_t_p_apr_hash_t_p_svn_txdelta_window_handler_t_p_p_void_p_apr_array_header_t_p_apr_pool_t__p_svn_error_t[] = { {&_swigt__p_p_f_p_void_p_q_const__char_svn_revnum_t_p_apr_hash_t_p_svn_txdelta_window_handler_t_p_p_void_p_apr_array_header_t_p_apr_pool_t__p_svn_error_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_p_f_p_void_p_q_const__char_svn_revnum_t_p_apr_hash_t_svn_boolean_t_p_svn_txdelta_window_handler_t_p_p_void_p_apr_array_header_t_p_apr_pool_t__p_svn_error_t[] = { {&_swigt__p_p_f_p_void_p_q_const__char_svn_revnum_t_p_apr_hash_t_svn_boolean_t_p_svn_txdelta_window_handler_t_p_p_void_p_apr_array_header_t_p_apr_pool_t__p_svn_error_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_p_f_p_void_p_q_const__char_svn_revnum_t_p_apr_pool_t__p_svn_error_t[] = { {&_swigt__p_p_f_p_void_p_q_const__char_svn_revnum_t_p_apr_pool_t__p_svn_error_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_p_f_p_void_p_q_const__struct_svn_repos_notify_t_p_apr_pool_t__void[] = { {&_swigt__p_p_f_p_void_p_q_const__struct_svn_repos_notify_t_p_apr_pool_t__void, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_p_f_svn_repos_authz_access_t_p_svn_boolean_t_p_svn_fs_root_t_p_q_const__char_p_void_p_apr_pool_t__p_svn_error_t[] = { {&_swigt__p_p_f_svn_repos_authz_access_t_p_svn_boolean_t_p_svn_fs_root_t_p_q_const__char_p_void_p_apr_pool_t__p_svn_error_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_p_svn_authz_t[] = { {&_swigt__p_p_svn_authz_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_p_svn_delta_editor_t[] = { {&_swigt__p_p_svn_delta_editor_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_p_svn_dirent_t[] = { {&_swigt__p_p_svn_dirent_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_p_svn_fs_txn_t[] = { {&_swigt__p_p_svn_fs_txn_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_p_svn_lock_t[] = { {&_swigt__p_p_svn_lock_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_p_svn_repos_parse_fns2_t[] = { {&_swigt__p_p_svn_repos_parse_fns2_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_p_svn_repos_parse_fns_t[] = { {&_swigt__p_p_svn_repos_parse_fns_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_p_svn_repos_t[] = { {&_swigt__p_p_svn_repos_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_p_svn_stream_t[] = { {&_swigt__p_p_svn_stream_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_p_svn_string_t[] = { {&_swigt__p_p_svn_string_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_p_void[] = { {&_swigt__p_p_void, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_svn_auth_baton_t[] = { {&_swigt__p_svn_auth_baton_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_svn_auth_cred_simple_t[] = { {&_swigt__p_svn_auth_cred_simple_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_svn_auth_cred_ssl_client_cert_pw_t[] = { {&_swigt__p_svn_auth_cred_ssl_client_cert_pw_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_svn_auth_cred_ssl_client_cert_t[] = { {&_swigt__p_svn_auth_cred_ssl_client_cert_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_svn_auth_cred_ssl_server_trust_t[] = { {&_swigt__p_svn_auth_cred_ssl_server_trust_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_svn_auth_cred_username_t[] = { {&_swigt__p_svn_auth_cred_username_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_svn_auth_iterstate_t[] = { {&_swigt__p_svn_auth_iterstate_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_svn_auth_provider_object_t[] = { {&_swigt__p_svn_auth_provider_object_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_svn_auth_provider_t[] = { {&_swigt__p_svn_auth_provider_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_svn_auth_ssl_server_cert_info_t[] = { {&_swigt__p_svn_auth_ssl_server_cert_info_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_svn_authz_t[] = { {&_swigt__p_svn_authz_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_svn_commit_info_t[] = { {&_swigt__p_svn_commit_info_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_svn_config_t[] = { {&_swigt__p_svn_config_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_svn_delta_editor_t[] = { {&_swigt__p_svn_delta_editor_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_svn_depth_t[] = { {&_swigt__p_svn_depth_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_svn_dirent_t[] = { {&_swigt__p_svn_dirent_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_svn_errno_t[] = { {&_swigt__p_svn_errno_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_svn_error_t[] = { {&_swigt__p_svn_error_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_svn_fs_access_t[] = { {&_swigt__p_svn_fs_access_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_svn_fs_dirent_t[] = { {&_swigt__p_svn_fs_dirent_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_svn_fs_history_t[] = { {&_swigt__p_svn_fs_history_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_svn_fs_id_t[] = { {&_swigt__p_svn_fs_id_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_svn_fs_pack_notify_action_t[] = { {&_swigt__p_svn_fs_pack_notify_action_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_svn_fs_path_change2_t[] = { {&_swigt__p_svn_fs_path_change2_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_svn_fs_path_change_kind_t[] = { {&_swigt__p_svn_fs_path_change_kind_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_svn_fs_path_change_t[] = { {&_swigt__p_svn_fs_path_change_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_svn_fs_root_t[] = { {&_swigt__p_svn_fs_root_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_svn_fs_t[] = { {&_swigt__p_svn_fs_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_svn_fs_txn_t[] = { {&_swigt__p_svn_fs_txn_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_svn_io_dirent2_t[] = { {&_swigt__p_svn_io_dirent2_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_svn_io_dirent_t[] = { {&_swigt__p_svn_io_dirent_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_svn_io_file_del_t[] = { {&_swigt__p_svn_io_file_del_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_svn_location_segment_t[] = { {&_swigt__p_svn_location_segment_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_svn_lock_t[] = { {&_swigt__p_svn_lock_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_svn_log_changed_path2_t[] = { {&_swigt__p_svn_log_changed_path2_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_svn_log_changed_path_t[] = { {&_swigt__p_svn_log_changed_path_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_svn_log_entry_t[] = { {&_swigt__p_svn_log_entry_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_svn_merge_range_t[] = { {&_swigt__p_svn_merge_range_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_svn_mergeinfo_inheritance_t[] = { {&_swigt__p_svn_mergeinfo_inheritance_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_svn_node_kind_t[] = { {&_swigt__p_svn_node_kind_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_svn_opt_revision_range_t[] = { {&_swigt__p_svn_opt_revision_range_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_svn_opt_revision_t[] = { {&_swigt__p_svn_opt_revision_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_svn_opt_revision_value_t[] = { {&_swigt__p_svn_opt_revision_value_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_svn_opt_subcommand_desc2_t[] = { {&_swigt__p_svn_opt_subcommand_desc2_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_svn_opt_subcommand_desc_t[] = { {&_swigt__p_svn_opt_subcommand_desc_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_svn_prop_kind[] = { {&_swigt__p_svn_prop_kind, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_svn_repos_authz_access_t[] = { {&_swigt__p_svn_repos_authz_access_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_svn_repos_node_t[] = { {&_swigt__p_svn_repos_node_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_svn_repos_notify_action_t[] = { {&_swigt__p_svn_repos_notify_action_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_svn_repos_notify_t[] = { {&_swigt__p_svn_repos_notify_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_svn_repos_notify_warning_t[] = { {&_swigt__p_svn_repos_notify_warning_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_svn_repos_parse_fns2_t[] = { {&_swigt__p_svn_repos_parse_fns2_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_svn_repos_parse_fns_t[] = { {&_swigt__p_svn_repos_parse_fns_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_svn_repos_revision_access_level_t[] = { {&_swigt__p_svn_repos_revision_access_level_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_svn_repos_t[] = { {&_swigt__p_svn_repos_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_svn_stream_mark_t[] = { {&_swigt__p_svn_stream_mark_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_svn_stream_t[] = { {&_swigt__p_svn_stream_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_svn_string_t[] = { {&_swigt__p_svn_string_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_svn_stringbuf_t[] = { {&_swigt__p_svn_stringbuf_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_svn_tristate_t[] = { {&_swigt__p_svn_tristate_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_svn_txdelta_op_t[] = { {&_swigt__p_svn_txdelta_op_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_svn_txdelta_stream_t[] = { {&_swigt__p_svn_txdelta_stream_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_svn_txdelta_window_t[] = { {&_swigt__p_svn_txdelta_window_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_svn_version_checklist_t[] = { {&_swigt__p_svn_version_checklist_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_svn_version_t[] = { {&_swigt__p_svn_version_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_unsigned_long[] = { {&_swigt__p_unsigned_long, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_void[] = { {&_swigt__p_void, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info *swig_cast_initial[] = { _swigc__p_apr_array_header_t, _swigc__p_apr_hash_t, _swigc__p_apr_int32_t, _swigc__p_apr_int64_t, _swigc__p_apr_pool_t, _swigc__p_char, _swigc__p_f_p_apr_getopt_t_p_void_p_apr_pool_t__p_svn_error_t, _swigc__p_f_p_p_svn_stream_t_p_void__p_svn_error_t, _swigc__p_f_p_p_void_p_apr_hash_t_p_void_p_apr_pool_t__p_svn_error_t, _swigc__p_f_p_q_const__char_p_void_p_apr_pool_t__p_svn_error_t, _swigc__p_f_p_q_const__svn_commit_info_t_p_void_p_apr_pool_t__p_svn_error_t, _swigc__p_f_p_svn_boolean_t_p_svn_fs_root_t_p_q_const__char_p_void_p_apr_pool_t__p_svn_error_t, _swigc__p_f_p_svn_location_segment_t_p_void_p_apr_pool_t__p_svn_error_t, _swigc__p_f_p_svn_txdelta_window_handler_t_p_p_void_p_void__p_svn_error_t, _swigc__p_f_p_void__p_svn_error_t, _swigc__p_f_p_void_apr_int64_t_svn_fs_pack_notify_action_t_p_apr_pool_t__p_svn_error_t, _swigc__p_f_p_void_p_apr_hash_t_svn_revnum_t_p_q_const__char_p_q_const__char_p_q_const__char_p_apr_pool_t__p_svn_error_t, _swigc__p_f_p_void_p_q_const__char__p_svn_error_t, _swigc__p_f_p_void_p_q_const__char_p_q_const__svn_string_t__p_svn_error_t, _swigc__p_f_p_void_p_q_const__char_svn_revnum_t_p_apr_hash_t_p_svn_txdelta_window_handler_t_p_p_void_p_apr_array_header_t_p_apr_pool_t__p_svn_error_t, _swigc__p_f_p_void_p_q_const__char_svn_revnum_t_p_apr_hash_t_svn_boolean_t_p_svn_txdelta_window_handler_t_p_p_void_p_apr_array_header_t_p_apr_pool_t__p_svn_error_t, _swigc__p_f_p_void_p_q_const__char_svn_revnum_t_p_apr_pool_t__p_svn_error_t, _swigc__p_f_p_void_p_q_const__struct_svn_repos_notify_t_p_apr_pool_t__void, _swigc__p_f_p_void_p_svn_log_entry_t_p_apr_pool_t__p_svn_error_t, _swigc__p_f_svn_repos_authz_access_t_p_svn_boolean_t_p_svn_fs_root_t_p_q_const__char_p_void_p_apr_pool_t__p_svn_error_t, _swigc__p_f_svn_revnum_t_p_q_const__char_p_q_const__char_p_void__p_svn_error_t, _swigc__p_int, _swigc__p_long, _swigc__p_p_apr_array_header_t, _swigc__p_p_apr_hash_t, _swigc__p_p_char, _swigc__p_p_f_p_svn_boolean_t_p_svn_fs_root_t_p_q_const__char_p_void_p_apr_pool_t__p_svn_error_t, _swigc__p_p_f_p_svn_txdelta_window_t_p_void__p_svn_error_t, _swigc__p_p_f_p_void__p_svn_error_t, _swigc__p_p_f_p_void_apr_int64_t_svn_fs_pack_notify_action_t_p_apr_pool_t__p_svn_error_t, _swigc__p_p_f_p_void_p_q_const__char_svn_revnum_t_p_apr_hash_t_p_svn_txdelta_window_handler_t_p_p_void_p_apr_array_header_t_p_apr_pool_t__p_svn_error_t, _swigc__p_p_f_p_void_p_q_const__char_svn_revnum_t_p_apr_hash_t_svn_boolean_t_p_svn_txdelta_window_handler_t_p_p_void_p_apr_array_header_t_p_apr_pool_t__p_svn_error_t, _swigc__p_p_f_p_void_p_q_const__char_svn_revnum_t_p_apr_pool_t__p_svn_error_t, _swigc__p_p_f_p_void_p_q_const__struct_svn_repos_notify_t_p_apr_pool_t__void, _swigc__p_p_f_svn_repos_authz_access_t_p_svn_boolean_t_p_svn_fs_root_t_p_q_const__char_p_void_p_apr_pool_t__p_svn_error_t, _swigc__p_p_svn_authz_t, _swigc__p_p_svn_delta_editor_t, _swigc__p_p_svn_dirent_t, _swigc__p_p_svn_fs_txn_t, _swigc__p_p_svn_lock_t, _swigc__p_p_svn_repos_parse_fns2_t, _swigc__p_p_svn_repos_parse_fns_t, _swigc__p_p_svn_repos_t, _swigc__p_p_svn_stream_t, _swigc__p_p_svn_string_t, _swigc__p_p_void, _swigc__p_svn_auth_baton_t, _swigc__p_svn_auth_cred_simple_t, _swigc__p_svn_auth_cred_ssl_client_cert_pw_t, _swigc__p_svn_auth_cred_ssl_client_cert_t, _swigc__p_svn_auth_cred_ssl_server_trust_t, _swigc__p_svn_auth_cred_username_t, _swigc__p_svn_auth_iterstate_t, _swigc__p_svn_auth_provider_object_t, _swigc__p_svn_auth_provider_t, _swigc__p_svn_auth_ssl_server_cert_info_t, _swigc__p_svn_authz_t, _swigc__p_svn_commit_info_t, _swigc__p_svn_config_t, _swigc__p_svn_delta_editor_t, _swigc__p_svn_depth_t, _swigc__p_svn_dirent_t, _swigc__p_svn_errno_t, _swigc__p_svn_error_t, _swigc__p_svn_fs_access_t, _swigc__p_svn_fs_dirent_t, _swigc__p_svn_fs_history_t, _swigc__p_svn_fs_id_t, _swigc__p_svn_fs_pack_notify_action_t, _swigc__p_svn_fs_path_change2_t, _swigc__p_svn_fs_path_change_kind_t, _swigc__p_svn_fs_path_change_t, _swigc__p_svn_fs_root_t, _swigc__p_svn_fs_t, _swigc__p_svn_fs_txn_t, _swigc__p_svn_io_dirent2_t, _swigc__p_svn_io_dirent_t, _swigc__p_svn_io_file_del_t, _swigc__p_svn_location_segment_t, _swigc__p_svn_lock_t, _swigc__p_svn_log_changed_path2_t, _swigc__p_svn_log_changed_path_t, _swigc__p_svn_log_entry_t, _swigc__p_svn_merge_range_t, _swigc__p_svn_mergeinfo_inheritance_t, _swigc__p_svn_node_kind_t, _swigc__p_svn_opt_revision_range_t, _swigc__p_svn_opt_revision_t, _swigc__p_svn_opt_revision_value_t, _swigc__p_svn_opt_subcommand_desc2_t, _swigc__p_svn_opt_subcommand_desc_t, _swigc__p_svn_prop_kind, _swigc__p_svn_repos_authz_access_t, _swigc__p_svn_repos_node_t, _swigc__p_svn_repos_notify_action_t, _swigc__p_svn_repos_notify_t, _swigc__p_svn_repos_notify_warning_t, _swigc__p_svn_repos_parse_fns2_t, _swigc__p_svn_repos_parse_fns_t, _swigc__p_svn_repos_revision_access_level_t, _swigc__p_svn_repos_t, _swigc__p_svn_stream_mark_t, _swigc__p_svn_stream_t, _swigc__p_svn_string_t, _swigc__p_svn_stringbuf_t, _swigc__p_svn_tristate_t, _swigc__p_svn_txdelta_op_t, _swigc__p_svn_txdelta_stream_t, _swigc__p_svn_txdelta_window_t, _swigc__p_svn_version_checklist_t, _swigc__p_svn_version_t, _swigc__p_unsigned_long, _swigc__p_void, }; /* -------- TYPE CONVERSION AND EQUIVALENCE RULES (END) -------- */ static swig_const_info swig_const_table[] = { {0, 0, 0, 0.0, 0, 0}}; #ifdef __cplusplus } #endif /* ----------------------------------------------------------------------------- * Type initialization: * This problem is tough by the requirement that no dynamic * memory is used. Also, since swig_type_info structures store pointers to * swig_cast_info structures and swig_cast_info structures store pointers back * to swig_type_info structures, we need some lookup code at initialization. * The idea is that swig generates all the structures that are needed. * The runtime then collects these partially filled structures. * The SWIG_InitializeModule function takes these initial arrays out of * swig_module, and does all the lookup, filling in the swig_module.types * array with the correct data and linking the correct swig_cast_info * structures together. * * The generated swig_type_info structures are assigned staticly to an initial * array. We just loop through that array, and handle each type individually. * First we lookup if this type has been already loaded, and if so, use the * loaded structure instead of the generated one. Then we have to fill in the * cast linked list. The cast data is initially stored in something like a * two-dimensional array. Each row corresponds to a type (there are the same * number of rows as there are in the swig_type_initial array). Each entry in * a column is one of the swig_cast_info structures for that type. * The cast_initial array is actually an array of arrays, because each row has * a variable number of columns. So to actually build the cast linked list, * we find the array of casts associated with the type, and loop through it * adding the casts to the list. The one last trick we need to do is making * sure the type pointer in the swig_cast_info struct is correct. * * First off, we lookup the cast->type name to see if it is already loaded. * There are three cases to handle: * 1) If the cast->type has already been loaded AND the type we are adding * casting info to has not been loaded (it is in this module), THEN we * replace the cast->type pointer with the type pointer that has already * been loaded. * 2) If BOTH types (the one we are adding casting info to, and the * cast->type) are loaded, THEN the cast info has already been loaded by * the previous module so we just ignore it. * 3) Finally, if cast->type has not already been loaded, then we add that * swig_cast_info to the linked list (because the cast->type) pointer will * be correct. * ----------------------------------------------------------------------------- */ #ifdef __cplusplus extern "C" { #if 0 } /* c-mode */ #endif #endif #if 0 #define SWIGRUNTIME_DEBUG #endif SWIGRUNTIME void SWIG_InitializeModule(void *clientdata) { size_t i; swig_module_info *module_head, *iter; int found, init; clientdata = clientdata; /* check to see if the circular list has been setup, if not, set it up */ if (swig_module.next==0) { /* Initialize the swig_module */ swig_module.type_initial = swig_type_initial; swig_module.cast_initial = swig_cast_initial; swig_module.next = &swig_module; init = 1; } else { init = 0; } /* Try and load any already created modules */ module_head = SWIG_GetModule(clientdata); if (!module_head) { /* This is the first module loaded for this interpreter */ /* so set the swig module into the interpreter */ SWIG_SetModule(clientdata, &swig_module); module_head = &swig_module; } else { /* the interpreter has loaded a SWIG module, but has it loaded this one? */ found=0; iter=module_head; do { if (iter==&swig_module) { found=1; break; } iter=iter->next; } while (iter!= module_head); /* if the is found in the list, then all is done and we may leave */ if (found) return; /* otherwise we must add out module into the list */ swig_module.next = module_head->next; module_head->next = &swig_module; } /* When multiple interpeters are used, a module could have already been initialized in a different interpreter, but not yet have a pointer in this interpreter. In this case, we do not want to continue adding types... everything should be set up already */ if (init == 0) return; /* Now work on filling in swig_module.types */ #ifdef SWIGRUNTIME_DEBUG printf("SWIG_InitializeModule: size %d\n", swig_module.size); #endif for (i = 0; i < swig_module.size; ++i) { swig_type_info *type = 0; swig_type_info *ret; swig_cast_info *cast; #ifdef SWIGRUNTIME_DEBUG printf("SWIG_InitializeModule: type %d %s\n", i, swig_module.type_initial[i]->name); #endif /* if there is another module already loaded */ if (swig_module.next != &swig_module) { type = SWIG_MangledTypeQueryModule(swig_module.next, &swig_module, swig_module.type_initial[i]->name); } if (type) { /* Overwrite clientdata field */ #ifdef SWIGRUNTIME_DEBUG printf("SWIG_InitializeModule: found type %s\n", type->name); #endif if (swig_module.type_initial[i]->clientdata) { type->clientdata = swig_module.type_initial[i]->clientdata; #ifdef SWIGRUNTIME_DEBUG printf("SWIG_InitializeModule: found and overwrite type %s \n", type->name); #endif } } else { type = swig_module.type_initial[i]; } /* Insert casting types */ cast = swig_module.cast_initial[i]; while (cast->type) { /* Don't need to add information already in the list */ ret = 0; #ifdef SWIGRUNTIME_DEBUG printf("SWIG_InitializeModule: look cast %s\n", cast->type->name); #endif if (swig_module.next != &swig_module) { ret = SWIG_MangledTypeQueryModule(swig_module.next, &swig_module, cast->type->name); #ifdef SWIGRUNTIME_DEBUG if (ret) printf("SWIG_InitializeModule: found cast %s\n", ret->name); #endif } if (ret) { if (type == swig_module.type_initial[i]) { #ifdef SWIGRUNTIME_DEBUG printf("SWIG_InitializeModule: skip old type %s\n", ret->name); #endif cast->type = ret; ret = 0; } else { /* Check for casting already in the list */ swig_cast_info *ocast = SWIG_TypeCheck(ret->name, type); #ifdef SWIGRUNTIME_DEBUG if (ocast) printf("SWIG_InitializeModule: skip old cast %s\n", ret->name); #endif if (!ocast) ret = 0; } } if (!ret) { #ifdef SWIGRUNTIME_DEBUG printf("SWIG_InitializeModule: adding cast %s\n", cast->type->name); #endif if (type->cast) { type->cast->prev = cast; cast->next = type->cast; } type->cast = cast; } cast++; } /* Set entry in modules->types array equal to the type */ swig_module.types[i] = type; } swig_module.types[i] = 0; #ifdef SWIGRUNTIME_DEBUG printf("**** SWIG_InitializeModule: Cast List ******\n"); for (i = 0; i < swig_module.size; ++i) { int j = 0; swig_cast_info *cast = swig_module.cast_initial[i]; printf("SWIG_InitializeModule: type %d %s\n", i, swig_module.type_initial[i]->name); while (cast->type) { printf("SWIG_InitializeModule: cast type %s\n", cast->type->name); cast++; ++j; } printf("---- Total casts: %d\n",j); } printf("**** SWIG_InitializeModule: Cast List ******\n"); #endif } /* This function will propagate the clientdata field of type to * any new swig_type_info structures that have been added into the list * of equivalent types. It is like calling * SWIG_TypeClientData(type, clientdata) a second time. */ SWIGRUNTIME void SWIG_PropagateClientData(void) { size_t i; swig_cast_info *equiv; static int init_run = 0; if (init_run) return; init_run = 1; for (i = 0; i < swig_module.size; i++) { if (swig_module.types[i]->clientdata) { equiv = swig_module.types[i]->cast; while (equiv) { if (!equiv->converter) { if (equiv->type && !equiv->type->clientdata) SWIG_TypeClientData(equiv->type, swig_module.types[i]->clientdata); } equiv = equiv->next; } } } } #ifdef __cplusplus #if 0 { /* c-mode */ #endif } #endif #ifdef __cplusplus extern "C" { #endif /* Python-specific SWIG API */ #define SWIG_newvarlink() SWIG_Python_newvarlink() #define SWIG_addvarlink(p, name, get_attr, set_attr) SWIG_Python_addvarlink(p, name, get_attr, set_attr) #define SWIG_InstallConstants(d, constants) SWIG_Python_InstallConstants(d, constants) /* ----------------------------------------------------------------------------- * global variable support code. * ----------------------------------------------------------------------------- */ typedef struct swig_globalvar { char *name; /* Name of global variable */ PyObject *(*get_attr)(void); /* Return the current value */ int (*set_attr)(PyObject *); /* Set the value */ struct swig_globalvar *next; } swig_globalvar; typedef struct swig_varlinkobject { PyObject_HEAD swig_globalvar *vars; } swig_varlinkobject; SWIGINTERN PyObject * swig_varlink_repr(swig_varlinkobject *SWIGUNUSEDPARM(v)) { #if PY_VERSION_HEX >= 0x03000000 return PyUnicode_InternFromString("<Swig global variables>"); #else return PyString_FromString("<Swig global variables>"); #endif } SWIGINTERN PyObject * swig_varlink_str(swig_varlinkobject *v) { #if PY_VERSION_HEX >= 0x03000000 PyObject *str = PyUnicode_InternFromString("("); PyObject *tail; PyObject *joined; swig_globalvar *var; for (var = v->vars; var; var=var->next) { tail = PyUnicode_FromString(var->name); joined = PyUnicode_Concat(str, tail); Py_DecRef(str); Py_DecRef(tail); str = joined; if (var->next) { tail = PyUnicode_InternFromString(", "); joined = PyUnicode_Concat(str, tail); Py_DecRef(str); Py_DecRef(tail); str = joined; } } tail = PyUnicode_InternFromString(")"); joined = PyUnicode_Concat(str, tail); Py_DecRef(str); Py_DecRef(tail); str = joined; #else PyObject *str = PyString_FromString("("); swig_globalvar *var; for (var = v->vars; var; var=var->next) { PyString_ConcatAndDel(&str,PyString_FromString(var->name)); if (var->next) PyString_ConcatAndDel(&str,PyString_FromString(", ")); } PyString_ConcatAndDel(&str,PyString_FromString(")")); #endif return str; } SWIGINTERN int swig_varlink_print(swig_varlinkobject *v, FILE *fp, int SWIGUNUSEDPARM(flags)) { char *tmp; PyObject *str = swig_varlink_str(v); fprintf(fp,"Swig global variables "); fprintf(fp,"%s\n", tmp = SWIG_Python_str_AsChar(str)); SWIG_Python_str_DelForPy3(tmp); Py_DECREF(str); return 0; } SWIGINTERN void swig_varlink_dealloc(swig_varlinkobject *v) { swig_globalvar *var = v->vars; while (var) { swig_globalvar *n = var->next; free(var->name); free(var); var = n; } } SWIGINTERN PyObject * swig_varlink_getattr(swig_varlinkobject *v, char *n) { PyObject *res = NULL; swig_globalvar *var = v->vars; while (var) { if (strcmp(var->name,n) == 0) { res = (*var->get_attr)(); break; } var = var->next; } if (res == NULL && !PyErr_Occurred()) { PyErr_SetString(PyExc_NameError,"Unknown C global variable"); } return res; } SWIGINTERN int swig_varlink_setattr(swig_varlinkobject *v, char *n, PyObject *p) { int res = 1; swig_globalvar *var = v->vars; while (var) { if (strcmp(var->name,n) == 0) { res = (*var->set_attr)(p); break; } var = var->next; } if (res == 1 && !PyErr_Occurred()) { PyErr_SetString(PyExc_NameError,"Unknown C global variable"); } return res; } SWIGINTERN PyTypeObject* swig_varlink_type(void) { static char varlink__doc__[] = "Swig var link object"; static PyTypeObject varlink_type; static int type_init = 0; if (!type_init) { const PyTypeObject tmp = { /* PyObject header changed in Python 3 */ #if PY_VERSION_HEX >= 0x03000000 PyVarObject_HEAD_INIT(NULL, 0) #else PyObject_HEAD_INIT(NULL) 0, /* ob_size */ #endif (char *)"swigvarlink", /* tp_name */ sizeof(swig_varlinkobject), /* tp_basicsize */ 0, /* tp_itemsize */ (destructor) swig_varlink_dealloc, /* tp_dealloc */ (printfunc) swig_varlink_print, /* tp_print */ (getattrfunc) swig_varlink_getattr, /* tp_getattr */ (setattrfunc) swig_varlink_setattr, /* tp_setattr */ 0, /* tp_compare */ (reprfunc) swig_varlink_repr, /* tp_repr */ 0, /* tp_as_number */ 0, /* tp_as_sequence */ 0, /* tp_as_mapping */ 0, /* tp_hash */ 0, /* tp_call */ (reprfunc) swig_varlink_str, /* tp_str */ 0, /* tp_getattro */ 0, /* tp_setattro */ 0, /* tp_as_buffer */ 0, /* tp_flags */ varlink__doc__, /* tp_doc */ 0, /* tp_traverse */ 0, /* tp_clear */ 0, /* tp_richcompare */ 0, /* tp_weaklistoffset */ #if PY_VERSION_HEX >= 0x02020000 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* tp_iter -> tp_weaklist */ #endif #if PY_VERSION_HEX >= 0x02030000 0, /* tp_del */ #endif #if PY_VERSION_HEX >= 0x02060000 0, /* tp_version */ #endif #ifdef COUNT_ALLOCS 0,0,0,0 /* tp_alloc -> tp_next */ #endif }; varlink_type = tmp; type_init = 1; #if PY_VERSION_HEX < 0x02020000 varlink_type.ob_type = &PyType_Type; #else if (PyType_Ready(&varlink_type) < 0) return NULL; #endif } return &varlink_type; } /* Create a variable linking object for use later */ SWIGINTERN PyObject * SWIG_Python_newvarlink(void) { swig_varlinkobject *result = PyObject_NEW(swig_varlinkobject, swig_varlink_type()); if (result) { result->vars = 0; } return ((PyObject*) result); } SWIGINTERN void SWIG_Python_addvarlink(PyObject *p, char *name, PyObject *(*get_attr)(void), int (*set_attr)(PyObject *p)) { swig_varlinkobject *v = (swig_varlinkobject *) p; swig_globalvar *gv = (swig_globalvar *) malloc(sizeof(swig_globalvar)); if (gv) { size_t size = strlen(name)+1; gv->name = (char *)malloc(size); if (gv->name) { strncpy(gv->name,name,size); gv->get_attr = get_attr; gv->set_attr = set_attr; gv->next = v->vars; } } v->vars = gv; } SWIGINTERN PyObject * SWIG_globals(void) { static PyObject *_SWIG_globals = 0; if (!_SWIG_globals) _SWIG_globals = SWIG_newvarlink(); return _SWIG_globals; } /* ----------------------------------------------------------------------------- * constants/methods manipulation * ----------------------------------------------------------------------------- */ /* Install Constants */ SWIGINTERN void SWIG_Python_InstallConstants(PyObject *d, swig_const_info constants[]) { PyObject *obj = 0; size_t i; for (i = 0; constants[i].type; ++i) { switch(constants[i].type) { case SWIG_PY_POINTER: obj = SWIG_InternalNewPointerObj(constants[i].pvalue, *(constants[i]).ptype,0); break; case SWIG_PY_BINARY: obj = SWIG_NewPackedObj(constants[i].pvalue, constants[i].lvalue, *(constants[i].ptype)); break; default: obj = 0; break; } if (obj) { PyDict_SetItemString(d, constants[i].name, obj); Py_DECREF(obj); } } } /* -----------------------------------------------------------------------------*/ /* Fix SwigMethods to carry the callback ptrs when needed */ /* -----------------------------------------------------------------------------*/ SWIGINTERN void SWIG_Python_FixMethods(PyMethodDef *methods, swig_const_info *const_table, swig_type_info **types, swig_type_info **types_initial) { size_t i; for (i = 0; methods[i].ml_name; ++i) { const char *c = methods[i].ml_doc; if (c && (c = strstr(c, "swig_ptr: "))) { int j; swig_const_info *ci = 0; const char *name = c + 10; for (j = 0; const_table[j].type; ++j) { if (strncmp(const_table[j].name, name, strlen(const_table[j].name)) == 0) { ci = &(const_table[j]); break; } } if (ci) { void *ptr = (ci->type == SWIG_PY_POINTER) ? ci->pvalue : 0; if (ptr) { size_t shift = (ci->ptype) - types; swig_type_info *ty = types_initial[shift]; size_t ldoc = (c - methods[i].ml_doc); size_t lptr = strlen(ty->name)+2*sizeof(void*)+2; char *ndoc = (char*)malloc(ldoc + lptr + 10); if (ndoc) { char *buff = ndoc; strncpy(buff, methods[i].ml_doc, ldoc); buff += ldoc; strncpy(buff, "swig_ptr: ", 10); buff += 10; SWIG_PackVoidPtr(buff, ptr, ty->name, lptr); methods[i].ml_doc = ndoc; } } } } } } #ifdef __cplusplus } #endif /* -----------------------------------------------------------------------------* * Partial Init method * -----------------------------------------------------------------------------*/ #ifdef __cplusplus extern "C" #endif SWIGEXPORT #if PY_VERSION_HEX >= 0x03000000 PyObject* #else void #endif SWIG_init(void) { PyObject *m, *d, *md; #if PY_VERSION_HEX >= 0x03000000 static struct PyModuleDef SWIG_module = { # if PY_VERSION_HEX >= 0x03020000 PyModuleDef_HEAD_INIT, # else { PyObject_HEAD_INIT(NULL) NULL, /* m_init */ 0, /* m_index */ NULL, /* m_copy */ }, # endif (char *) SWIG_name, NULL, -1, SwigMethods, NULL, NULL, NULL, NULL }; #endif #if defined(SWIGPYTHON_BUILTIN) static SwigPyClientData SwigPyObject_clientdata = { 0, 0, 0, 0, 0, 0, 0 }; static PyGetSetDef this_getset_def = { (char *)"this", &SwigPyBuiltin_ThisClosure, NULL, NULL, NULL }; static SwigPyGetSet thisown_getset_closure = { (PyCFunction) SwigPyObject_own, (PyCFunction) SwigPyObject_own }; static PyGetSetDef thisown_getset_def = { (char *)"thisown", SwigPyBuiltin_GetterClosure, SwigPyBuiltin_SetterClosure, NULL, &thisown_getset_closure }; PyObject *metatype_args; PyTypeObject *builtin_pytype; int builtin_base_count; swig_type_info *builtin_basetype; PyObject *tuple; PyGetSetDescrObject *static_getset; PyTypeObject *metatype; SwigPyClientData *cd; PyObject *public_interface, *public_symbol; PyObject *this_descr; PyObject *thisown_descr; int i; (void)builtin_pytype; (void)builtin_base_count; (void)builtin_basetype; (void)tuple; (void)static_getset; /* metatype is used to implement static member variables. */ metatype_args = Py_BuildValue("(s(O){})", "SwigPyObjectType", &PyType_Type); assert(metatype_args); metatype = (PyTypeObject *) PyType_Type.tp_call((PyObject *) &PyType_Type, metatype_args, NULL); assert(metatype); Py_DECREF(metatype_args); metatype->tp_setattro = (setattrofunc) &SwigPyObjectType_setattro; assert(PyType_Ready(metatype) >= 0); #endif /* Fix SwigMethods to carry the callback ptrs when needed */ SWIG_Python_FixMethods(SwigMethods, swig_const_table, swig_types, swig_type_initial); #if PY_VERSION_HEX >= 0x03000000 m = PyModule_Create(&SWIG_module); #else m = Py_InitModule((char *) SWIG_name, SwigMethods); #endif md = d = PyModule_GetDict(m); SWIG_InitializeModule(0); #ifdef SWIGPYTHON_BUILTIN SwigPyObject_stype = SWIG_MangledTypeQuery("_p_SwigPyObject"); assert(SwigPyObject_stype); cd = (SwigPyClientData*) SwigPyObject_stype->clientdata; if (!cd) { SwigPyObject_stype->clientdata = &SwigPyObject_clientdata; SwigPyObject_clientdata.pytype = SwigPyObject_TypeOnce(); } else if (SwigPyObject_TypeOnce()->tp_basicsize != cd->pytype->tp_basicsize) { PyErr_SetString(PyExc_RuntimeError, "Import error: attempted to load two incompatible swig-generated modules."); # if PY_VERSION_HEX >= 0x03000000 return NULL; # else return; # endif } /* All objects have a 'this' attribute */ this_descr = PyDescr_NewGetSet(SwigPyObject_type(), &this_getset_def); (void)this_descr; /* All objects have a 'thisown' attribute */ thisown_descr = PyDescr_NewGetSet(SwigPyObject_type(), &thisown_getset_def); (void)thisown_descr; public_interface = PyList_New(0); public_symbol = 0; (void)public_symbol; PyDict_SetItemString(md, "__all__", public_interface); Py_DECREF(public_interface); for (i = 0; SwigMethods[i].ml_name != NULL; ++i) SwigPyBuiltin_AddPublicSymbol(public_interface, SwigMethods[i].ml_name); for (i = 0; swig_const_table[i].name != 0; ++i) SwigPyBuiltin_AddPublicSymbol(public_interface, swig_const_table[i].name); #endif SWIG_InstallConstants(d,swig_const_table); SWIG_Python_SetConstant(d, "svn_node_action_change",SWIG_From_long((long)(svn_node_action_change))); SWIG_Python_SetConstant(d, "svn_node_action_add",SWIG_From_long((long)(svn_node_action_add))); SWIG_Python_SetConstant(d, "svn_node_action_delete",SWIG_From_long((long)(svn_node_action_delete))); SWIG_Python_SetConstant(d, "svn_node_action_replace",SWIG_From_long((long)(svn_node_action_replace))); SWIG_Python_SetConstant(d, "svn_repos_load_uuid_default",SWIG_From_long((long)(svn_repos_load_uuid_default))); SWIG_Python_SetConstant(d, "svn_repos_load_uuid_ignore",SWIG_From_long((long)(svn_repos_load_uuid_ignore))); SWIG_Python_SetConstant(d, "svn_repos_load_uuid_force",SWIG_From_long((long)(svn_repos_load_uuid_force))); SWIG_Python_SetConstant(d, "svn_authz_none",SWIG_From_long((long)(svn_authz_none))); SWIG_Python_SetConstant(d, "svn_authz_read",SWIG_From_long((long)(svn_authz_read))); SWIG_Python_SetConstant(d, "svn_authz_write",SWIG_From_long((long)(svn_authz_write))); SWIG_Python_SetConstant(d, "svn_authz_recursive",SWIG_From_long((long)(svn_authz_recursive))); SWIG_Python_SetConstant(d, "svn_repos_notify_warning",SWIG_From_long((long)(svn_repos_notify_warning))); SWIG_Python_SetConstant(d, "svn_repos_notify_dump_rev_end",SWIG_From_long((long)(svn_repos_notify_dump_rev_end))); SWIG_Python_SetConstant(d, "svn_repos_notify_verify_rev_end",SWIG_From_long((long)(svn_repos_notify_verify_rev_end))); SWIG_Python_SetConstant(d, "svn_repos_notify_dump_end",SWIG_From_long((long)(svn_repos_notify_dump_end))); SWIG_Python_SetConstant(d, "svn_repos_notify_verify_end",SWIG_From_long((long)(svn_repos_notify_verify_end))); SWIG_Python_SetConstant(d, "svn_repos_notify_pack_shard_start",SWIG_From_long((long)(svn_repos_notify_pack_shard_start))); SWIG_Python_SetConstant(d, "svn_repos_notify_pack_shard_end",SWIG_From_long((long)(svn_repos_notify_pack_shard_end))); SWIG_Python_SetConstant(d, "svn_repos_notify_pack_shard_start_revprop",SWIG_From_long((long)(svn_repos_notify_pack_shard_start_revprop))); SWIG_Python_SetConstant(d, "svn_repos_notify_pack_shard_end_revprop",SWIG_From_long((long)(svn_repos_notify_pack_shard_end_revprop))); SWIG_Python_SetConstant(d, "svn_repos_notify_load_txn_start",SWIG_From_long((long)(svn_repos_notify_load_txn_start))); SWIG_Python_SetConstant(d, "svn_repos_notify_load_txn_committed",SWIG_From_long((long)(svn_repos_notify_load_txn_committed))); SWIG_Python_SetConstant(d, "svn_repos_notify_load_node_start",SWIG_From_long((long)(svn_repos_notify_load_node_start))); SWIG_Python_SetConstant(d, "svn_repos_notify_load_node_done",SWIG_From_long((long)(svn_repos_notify_load_node_done))); SWIG_Python_SetConstant(d, "svn_repos_notify_load_copied_node",SWIG_From_long((long)(svn_repos_notify_load_copied_node))); SWIG_Python_SetConstant(d, "svn_repos_notify_load_normalized_mergeinfo",SWIG_From_long((long)(svn_repos_notify_load_normalized_mergeinfo))); SWIG_Python_SetConstant(d, "svn_repos_notify_mutex_acquired",SWIG_From_long((long)(svn_repos_notify_mutex_acquired))); SWIG_Python_SetConstant(d, "svn_repos_notify_recover_start",SWIG_From_long((long)(svn_repos_notify_recover_start))); SWIG_Python_SetConstant(d, "svn_repos_notify_upgrade_start",SWIG_From_long((long)(svn_repos_notify_upgrade_start))); SWIG_Python_SetConstant(d, "svn_repos_notify_warning_found_old_reference",SWIG_From_long((long)(svn_repos_notify_warning_found_old_reference))); SWIG_Python_SetConstant(d, "svn_repos_notify_warning_found_old_mergeinfo",SWIG_From_long((long)(svn_repos_notify_warning_found_old_mergeinfo))); SWIG_Python_SetConstant(d, "svn_repos_notify_warning_invalid_fspath",SWIG_From_long((long)(svn_repos_notify_warning_invalid_fspath))); SWIG_Python_SetConstant(d, "SVN_REPOS_CAPABILITY_MERGEINFO",SWIG_FromCharPtr("mergeinfo")); SWIG_Python_SetConstant(d, "SVN_REPOS_DUMPFILE_MAGIC_HEADER",SWIG_FromCharPtr("SVN-fs-dump-format-version")); SWIG_Python_SetConstant(d, "SVN_REPOS_DUMPFILE_FORMAT_VERSION",SWIG_From_long((long)(3))); SWIG_Python_SetConstant(d, "SVN_REPOS_DUMPFILE_UUID",SWIG_FromCharPtr("UUID")); SWIG_Python_SetConstant(d, "SVN_REPOS_DUMPFILE_CONTENT_LENGTH",SWIG_FromCharPtr("Content-length")); SWIG_Python_SetConstant(d, "SVN_REPOS_DUMPFILE_REVISION_NUMBER",SWIG_FromCharPtr("Revision-number")); SWIG_Python_SetConstant(d, "SVN_REPOS_DUMPFILE_NODE_PATH",SWIG_FromCharPtr("Node-path")); SWIG_Python_SetConstant(d, "SVN_REPOS_DUMPFILE_NODE_KIND",SWIG_FromCharPtr("Node-kind")); SWIG_Python_SetConstant(d, "SVN_REPOS_DUMPFILE_NODE_ACTION",SWIG_FromCharPtr("Node-action")); SWIG_Python_SetConstant(d, "SVN_REPOS_DUMPFILE_NODE_COPYFROM_PATH",SWIG_FromCharPtr("Node-copyfrom-path")); SWIG_Python_SetConstant(d, "SVN_REPOS_DUMPFILE_NODE_COPYFROM_REV",SWIG_FromCharPtr("Node-copyfrom-rev")); SWIG_Python_SetConstant(d, "SVN_REPOS_DUMPFILE_TEXT_COPY_SOURCE_MD5",SWIG_FromCharPtr("Text-copy-source-md5")); SWIG_Python_SetConstant(d, "SVN_REPOS_DUMPFILE_TEXT_COPY_SOURCE_SHA1",SWIG_FromCharPtr("Text-copy-source-sha1")); SWIG_Python_SetConstant(d, "SVN_REPOS_DUMPFILE_TEXT_COPY_SOURCE_CHECKSUM",SWIG_FromCharPtr("Text-copy-source-md5")); SWIG_Python_SetConstant(d, "SVN_REPOS_DUMPFILE_TEXT_CONTENT_MD5",SWIG_FromCharPtr("Text-content-md5")); SWIG_Python_SetConstant(d, "SVN_REPOS_DUMPFILE_TEXT_CONTENT_SHA1",SWIG_FromCharPtr("Text-content-sha1")); SWIG_Python_SetConstant(d, "SVN_REPOS_DUMPFILE_TEXT_CONTENT_CHECKSUM",SWIG_FromCharPtr("Text-content-md5")); SWIG_Python_SetConstant(d, "SVN_REPOS_DUMPFILE_PROP_CONTENT_LENGTH",SWIG_FromCharPtr("Prop-content-length")); SWIG_Python_SetConstant(d, "SVN_REPOS_DUMPFILE_TEXT_CONTENT_LENGTH",SWIG_FromCharPtr("Text-content-length")); SWIG_Python_SetConstant(d, "SVN_REPOS_DUMPFILE_PROP_DELTA",SWIG_FromCharPtr("Prop-delta")); SWIG_Python_SetConstant(d, "SVN_REPOS_DUMPFILE_TEXT_DELTA",SWIG_FromCharPtr("Text-delta")); SWIG_Python_SetConstant(d, "SVN_REPOS_DUMPFILE_TEXT_DELTA_BASE_MD5",SWIG_FromCharPtr("Text-delta-base-md5")); SWIG_Python_SetConstant(d, "SVN_REPOS_DUMPFILE_TEXT_DELTA_BASE_SHA1",SWIG_FromCharPtr("Text-delta-base-sha1")); SWIG_Python_SetConstant(d, "SVN_REPOS_DUMPFILE_TEXT_DELTA_BASE_CHECKSUM",SWIG_FromCharPtr("Text-delta-base-md5")); SWIG_Python_SetConstant(d, "svn_repos_revision_access_none",SWIG_From_long((long)(svn_repos_revision_access_none))); SWIG_Python_SetConstant(d, "svn_repos_revision_access_partial",SWIG_From_long((long)(svn_repos_revision_access_partial))); SWIG_Python_SetConstant(d, "svn_repos_revision_access_full",SWIG_From_long((long)(svn_repos_revision_access_full))); #if PY_VERSION_HEX >= 0x03000000 return m; #else return; #endif }
// Copyright 2013 The Flutter Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "flutter/runtime/isolate_configuration.h" #include "flutter/fml/make_copyable.h" #include "flutter/runtime/dart_vm.h" namespace flutter { IsolateConfiguration::IsolateConfiguration() = default; IsolateConfiguration::~IsolateConfiguration() = default; bool IsolateConfiguration::PrepareIsolate(DartIsolate& isolate) { if (isolate.GetPhase() != DartIsolate::Phase::LibrariesSetup) { FML_DLOG(ERROR) << "Isolate was in incorrect phase to be prepared for running."; return false; } return DoPrepareIsolate(isolate); } class AppSnapshotIsolateConfiguration final : public IsolateConfiguration { public: AppSnapshotIsolateConfiguration() = default; // |IsolateConfiguration| bool DoPrepareIsolate(DartIsolate& isolate) override { return isolate.PrepareForRunningFromPrecompiledCode(); } // |IsolateConfiguration| bool IsNullSafetyEnabled(const DartSnapshot& snapshot) override { return snapshot.IsNullSafetyEnabled(nullptr); } private: FML_DISALLOW_COPY_AND_ASSIGN(AppSnapshotIsolateConfiguration); }; class KernelIsolateConfiguration : public IsolateConfiguration { public: KernelIsolateConfiguration(std::unique_ptr<const fml::Mapping> kernel) : kernel_(std::move(kernel)) {} // |IsolateConfiguration| bool DoPrepareIsolate(DartIsolate& isolate) override { if (DartVM::IsRunningPrecompiledCode()) { return false; } return isolate.PrepareForRunningFromKernel(std::move(kernel_)); } // |IsolateConfiguration| bool IsNullSafetyEnabled(const DartSnapshot& snapshot) override { return snapshot.IsNullSafetyEnabled(kernel_.get()); } private: std::unique_ptr<const fml::Mapping> kernel_; FML_DISALLOW_COPY_AND_ASSIGN(KernelIsolateConfiguration); }; class KernelListIsolateConfiguration final : public IsolateConfiguration { public: KernelListIsolateConfiguration( std::vector<std::future<std::unique_ptr<const fml::Mapping>>> kernel_pieces) : kernel_piece_futures_(std::move(kernel_pieces)) { if (kernel_piece_futures_.empty()) { FML_LOG(ERROR) << "Attempted to create kernel list configuration without " "any kernel blobs."; } } // |IsolateConfiguration| bool DoPrepareIsolate(DartIsolate& isolate) override { if (DartVM::IsRunningPrecompiledCode()) { return false; } ResolveKernelPiecesIfNecessary(); if (resolved_kernel_pieces_.empty()) { FML_DLOG(ERROR) << "No kernel pieces provided to prepare this isolate."; return false; } for (size_t i = 0; i < resolved_kernel_pieces_.size(); i++) { if (!resolved_kernel_pieces_[i]) { FML_DLOG(ERROR) << "This kernel list isolate configuration was already " "used to prepare an isolate."; return false; } const bool last_piece = i + 1 == resolved_kernel_pieces_.size(); if (!isolate.PrepareForRunningFromKernel( std::move(resolved_kernel_pieces_[i]), last_piece)) { return false; } } return true; } // |IsolateConfiguration| bool IsNullSafetyEnabled(const DartSnapshot& snapshot) override { ResolveKernelPiecesIfNecessary(); const auto kernel = resolved_kernel_pieces_.empty() ? nullptr : resolved_kernel_pieces_.front().get(); return snapshot.IsNullSafetyEnabled(kernel); } // This must be call as late as possible before accessing any of the kernel // pieces. This will delay blocking on the futures for as long as possible. So // far, only Fuchsia depends on this optimization and only on the non-AOT // configs. void ResolveKernelPiecesIfNecessary() { if (resolved_kernel_pieces_.size() == kernel_piece_futures_.size()) { return; } resolved_kernel_pieces_.clear(); for (auto& piece : kernel_piece_futures_) { // The get() call will xfer the unique pointer out and leave an empty // future in the original vector. resolved_kernel_pieces_.emplace_back(piece.get()); } } private: std::vector<std::future<std::unique_ptr<const fml::Mapping>>> kernel_piece_futures_; std::vector<std::unique_ptr<const fml::Mapping>> resolved_kernel_pieces_; FML_DISALLOW_COPY_AND_ASSIGN(KernelListIsolateConfiguration); }; static std::vector<std::string> ParseKernelListPaths( std::unique_ptr<fml::Mapping> kernel_list) { FML_DCHECK(kernel_list); std::vector<std::string> kernel_pieces_paths; const char* kernel_list_str = reinterpret_cast<const char*>(kernel_list->GetMapping()); size_t kernel_list_size = kernel_list->GetSize(); size_t piece_path_start = 0; while (piece_path_start < kernel_list_size) { size_t piece_path_end = piece_path_start; while ((piece_path_end < kernel_list_size) && (kernel_list_str[piece_path_end] != '\n')) { piece_path_end++; } std::string piece_path(&kernel_list_str[piece_path_start], piece_path_end - piece_path_start); kernel_pieces_paths.emplace_back(std::move(piece_path)); piece_path_start = piece_path_end + 1; } return kernel_pieces_paths; } static std::vector<std::future<std::unique_ptr<const fml::Mapping>>> PrepareKernelMappings(std::vector<std::string> kernel_pieces_paths, std::shared_ptr<AssetManager> asset_manager, fml::RefPtr<fml::TaskRunner> io_worker) { FML_DCHECK(asset_manager); std::vector<std::future<std::unique_ptr<const fml::Mapping>>> fetch_futures; for (const auto& kernel_pieces_path : kernel_pieces_paths) { std::promise<std::unique_ptr<const fml::Mapping>> fetch_promise; fetch_futures.push_back(fetch_promise.get_future()); auto fetch_task = fml::MakeCopyable([asset_manager, kernel_pieces_path, fetch_promise = std::move(fetch_promise)]() mutable { fetch_promise.set_value( asset_manager->GetAsMapping(kernel_pieces_path)); }); // Fulfill the promise on the worker if one is available or the current // thread if one is not. if (io_worker) { io_worker->PostTask(fetch_task); } else { fetch_task(); } } return fetch_futures; } std::unique_ptr<IsolateConfiguration> IsolateConfiguration::InferFromSettings( const Settings& settings, std::shared_ptr<AssetManager> asset_manager, fml::RefPtr<fml::TaskRunner> io_worker) { // Running in AOT mode. if (DartVM::IsRunningPrecompiledCode()) { return CreateForAppSnapshot(); } if (settings.application_kernels) { return CreateForKernelList(settings.application_kernels()); } if (settings.application_kernel_asset.empty() && settings.application_kernel_list_asset.empty()) { FML_DLOG(ERROR) << "application_kernel_asset or " "application_kernel_list_asset must be set"; return nullptr; } if (!asset_manager) { FML_DLOG(ERROR) << "No asset manager specified when attempting to create " "isolate configuration."; return nullptr; } // Running from kernel snapshot. Requires asset manager. { std::unique_ptr<fml::Mapping> kernel = asset_manager->GetAsMapping(settings.application_kernel_asset); if (kernel) { return CreateForKernel(std::move(kernel)); } } // Running from kernel divided into several pieces (for sharing). Requires // asset manager and io worker. if (!io_worker) { FML_DLOG(ERROR) << "No IO worker specified to load kernel pieces."; return nullptr; } { std::unique_ptr<fml::Mapping> kernel_list = asset_manager->GetAsMapping(settings.application_kernel_list_asset); if (!kernel_list) { FML_LOG(ERROR) << "Failed to load: " << settings.application_kernel_list_asset; return nullptr; } auto kernel_pieces_paths = ParseKernelListPaths(std::move(kernel_list)); auto kernel_mappings = PrepareKernelMappings(std::move(kernel_pieces_paths), asset_manager, io_worker); return CreateForKernelList(std::move(kernel_mappings)); } return nullptr; } std::unique_ptr<IsolateConfiguration> IsolateConfiguration::CreateForAppSnapshot() { return std::make_unique<AppSnapshotIsolateConfiguration>(); } std::unique_ptr<IsolateConfiguration> IsolateConfiguration::CreateForKernel( std::unique_ptr<const fml::Mapping> kernel) { return std::make_unique<KernelIsolateConfiguration>(std::move(kernel)); } std::unique_ptr<IsolateConfiguration> IsolateConfiguration::CreateForKernelList( std::vector<std::unique_ptr<const fml::Mapping>> kernel_pieces) { std::vector<std::future<std::unique_ptr<const fml::Mapping>>> pieces; for (auto& piece : kernel_pieces) { if (!piece) { FML_DLOG(ERROR) << "Invalid kernel piece."; continue; } std::promise<std::unique_ptr<const fml::Mapping>> promise; pieces.push_back(promise.get_future()); promise.set_value(std::move(piece)); } return CreateForKernelList(std::move(pieces)); } std::unique_ptr<IsolateConfiguration> IsolateConfiguration::CreateForKernelList( std::vector<std::future<std::unique_ptr<const fml::Mapping>>> kernel_pieces) { return std::make_unique<KernelListIsolateConfiguration>( std::move(kernel_pieces)); } } // namespace flutter
#include "strings.h" #include <stdio.h> int FindChar(const char* str, char c) { const char* cursor = str; while (*cursor) { if (*cursor == c) { return (int)(cursor - str); } cursor++; } return -1; } void String::SetSize(int size){ Release(); if (size > 0) { void* alloc = malloc(8 + size + 1); string = ((char*)alloc) + 8; string[0] = '\0'; int* ref = (int*)alloc; int* length = (int*)(string - 4); *ref = 1; *length = size; } else { string = nullptr; } } // FML. // cppcheck-suppress unmatchedSuppression // cppcheck-suppress uninitMemberVar // cppcheck-suppress uninitVar String::String(const SubString& substr) : String(substr.start, substr.length) { } int String::GetRef() const{ if(string == nullptr){ return 0; } return *(int*)(string - 8); } int String::GetLength() const{ if(string == nullptr){ return 0; } return *(int*)(string - 4); } SubString String::GetSubString(int index, int length) const{ ASSERT(string != nullptr); ASSERT(GetLength() >= index + length); SubString substr; substr.start = &string[index]; substr.ref = (int*)(string - 8); substr.length = length; substr.Retain(); return substr; } void String::Retain(){ (*(int*)(string - 8))++; } void String::Release(){ if (string != nullptr){ int* ref = (int*)(string - 8); ASSERT(*ref > 0); (*ref)--; if(*ref == 0){ free(ref); string = nullptr; } } } void SubString::Retain(){ (*ref)++; } void SubString::Release(){ if (ref){ ASSERT(start != nullptr); ASSERT(*ref > 0); (*ref)--; if(*ref == 0){ free(ref); ref = nullptr; start = nullptr; length = 0; } } } int StrLen(const char* str){ int len = 0; while(str != nullptr && *str != '\0'){ str++; len++; } return len; } char* StrDup(const char* str){ int strLen = StrLen(str); char* newStr = (char*)malloc(strLen + 1); MemCpy(newStr, str, strLen); newStr[strLen] = '\0'; return newStr; } bool StrEqual(const char* s1, const char* s2){ if(s1 == s2){ return true; } if(s1 == nullptr || s2 == nullptr){ return false; } while(*s1 == *s2 && *s1 != '\0' && *s2 != '\0'){ s1++; s2++; } return (*s1 == '\0') && (*s2 == '\0'); } bool StrEqualN(const char* s1, const char* s2, unsigned int len){ if(s1 == s2 || len == 0){ return true; } if(s1 == nullptr || s2 == nullptr){ return false; } unsigned int counter = 0; while(counter < len && *s1 == *s2 && *s1 != '\0' && *s2 != '\0'){ s1++; s2++; counter++; } return counter == len || *s1 == *s2; } void MemCpy(void* dest, const void* src, int bytes){ char* bDest = (char*)dest; char* bSrc = (char*)src; for(int i = 0; i < bytes; i++){ bDest[i] = bSrc[i]; } } void MemSet(void* dst, int val, int bytes){ unsigned char* bDst = (unsigned char*)dst; for (int i = 0; i < bytes; i++){ bDst[i] = (unsigned char)val; } } int Atoi(const char* str){ ASSERT(str != nullptr); int val = 0; int sign = 1; if (*str == '-') { sign = -1; str++; } while(*str >= '0' && *str <= '9'){ val = (val * 10) + (*str - '0'); str++; } return val*sign; } unsigned int HexAtoi(const char* str) { ASSERT(str != nullptr); if (str[0] == '0' && (str[1] == 'x' || str[1] == 'X')) { str += 2; } unsigned int val = 0; while (true) { unsigned int digit = 0; if (*str >= '0' && *str <= '9') { digit = *str - '0'; } else if (*str >= 'a' && *str <= 'f') { digit = 10 + (*str - 'a'); } else if (*str >= 'A' && *str <= 'F') { digit = 10 + (*str - 'A'); } else { break; } val = (val * 16) + digit; str++; } return val; } float Atof(const char* str) { ASSERT(str != nullptr); float val = 0; float sign = 1; if (*str == '-') { sign = -1; str++; } while (*str >= '0' && *str <= '9') { val = (val * 10) + (*str - '0'); str++; } if (*str != '.') { return val*sign; } else { str++; } float decVal = 0.0f; float mult = 0.1f; while (*str >= '0' && *str <= '9') { decVal = decVal + (*str - '0') * mult; mult /= 10.0f; str++; } int exponent = 0; if (*str == 'e') { exponent = Atoi(str + 1); } if (exponent == 0) { return sign * (val + decVal); } else { float total = sign * (val + decVal); for (int i = 0; i < BNS_ABS(exponent); i++) { total = (exponent < 0 ? total / 10 : total * 10); } return total; } } int StrFind(const char* haystack, const char* needle) { if (!needle || !haystack) { return -1; } const char* originalHaystack = haystack; while (*haystack) { const char* hCursor = haystack; const char* nCursor = needle; while (*nCursor && *hCursor && *nCursor == *hCursor) { nCursor++; hCursor++; } if (!*nCursor) { return (int)(haystack - originalHaystack); } haystack++; } return -1; } inline bool CompareString(const String& a, const String& b){ int length = a.GetLength(); return (b.GetLength() == length) && StrEqualN(a.string, b.string, length); } inline bool CompareString(const String& a, const SubString& b){ int length = a.GetLength(); return (b.length == length) && StrEqualN(a.string, b.start, length); } inline bool CompareString(const SubString& a, const SubString& b){ return (a.length == b.length) && StrEqualN(a.start, b.start, a.length); } SubString& SubString::operator=(const SubString& other){ if (other.ref != ref){ Release(); start = other.start; length = other.length; ref = other.ref; Retain(); } else if (other.start != start || other.length != length){ start = other.start; length = other.length; } return *this; } bool SubString::operator==(const SubString& other) const{ return CompareString(*this, other); } bool SubString::operator!=(const SubString& other) const{ return !CompareString(*this, other); } String& String::operator=(const String& other){ if (string != other.string) { Release(); string = other.string; if (string != nullptr) { Retain(); } } return *this; } bool String::operator==(const String& other) const{ return CompareString(*this, other); } bool String::operator!=(const String& other) const{ return !CompareString(*this, other); } bool String::operator==(const SubString& other) const{ return CompareString(*this, other); } bool String::operator!=(const SubString& other) const{ return !CompareString(*this, other); } bool String::operator==(const char* other) const{ if (string == nullptr && (other == nullptr || *other == '\0')) { return true; } int length = GetLength(); return StrEqualN(string, other, length) && StrLen(other) == length; } bool String::operator!=(const char* other) const{ if (string == nullptr && (other == nullptr || *other == '\0')) { return false; } int length = GetLength(); return !StrEqualN(string, other, length) || StrLen(other) != length; } String String::Insert(const char* str, int index) const { int len = GetLength(); ASSERT(index >= 0 && index <= len); int strLen = StrLen(str); String ret; ret.SetSize(len + strLen); MemCpy(ret.string, string, index); MemCpy(ret.string + index, str, strLen); MemCpy(ret.string + index + strLen, string + index, len - index); ret.string[len + strLen] = '\0'; return ret; } String String::Insert(char c, int index) const { char fakeStr[2] = { c, '\0' }; return Insert(fakeStr, index); } String String::Remove(int index) const { String ret; int len = GetLength(); ASSERT(index >= 0 && index < len); ret.SetSize(len - 1); MemCpy(ret.string, string, index); MemCpy(ret.string + index, string + index + 1, len - index - 1); if (len > 1) { ret.string[len - 1] = '\0'; } return ret; } String ReadStringFromFile(const char* fileName) { String str; FILE* fIn = fopen(fileName, "rb"); if (fIn != NULL) { fseek(fIn, 0, SEEK_END); int fileLength = ftell(fIn); fseek(fIn, 0, SEEK_SET); str.SetSize(fileLength); int bytesRead = (int)fread(str.string, 1, fileLength, fIn); ASSERT(bytesRead == fileLength); str.string[fileLength] = '\0'; fclose(fIn); } else { // TODO: Warn } return str; } void WriteStringToFile(const String& str, const char* fileName) { FILE* fOut = fopen(fileName, "wb"); if (fOut != NULL) { if (str != "") { fwrite(str.string, 1, str.GetLength(), fOut); } fclose(fOut); } else { // TODO: Warn } } bool SubString::operator==(const String& other) const{ return CompareString(other, *this); } bool SubString::operator!=(const String& other) const{ return !CompareString(other, *this); } bool SubString::operator==(const char* other) const{ return StrEqualN(start, other, length) && other[length] == '\0'; } bool SubString::operator!=(const char* other) const{ return !(*this == other); } void SplitStringIntoParts(const String& str, const char* sep, Vector<SubString>* parts, bool removeEmpties /*= false*/) { int sepLen = StrLen(sep); // TODO: We could overload this to mean explode, but for now let's just avoid it. ASSERT(sepLen > 0); int strLen = str.GetLength(); if (strLen == 0) { return; } const char* cursor = str.string; while (true) { int len = StrFind(cursor, sep); if (len == -1) { if (!removeEmpties || *cursor) { parts->PushBack(str.GetSubString((int)(cursor - str.string), strLen - (int)(cursor - str.string))); } break; } else { if (len > 0 || !removeEmpties) { parts->PushBack(str.GetSubString((int)(cursor - str.string), len)); } cursor = cursor + len + sepLen; } } } #if defined(STRINGS_TEST_MAIN) CREATE_TEST_CASE("Strings basic") { ASSERT(StrLen("") == 0); ASSERT(StrLen("abc") == 3); ASSERT(StrLen("abc GGG") == 8); ASSERT(StrEqual("", "")); ASSERT(StrEqualN("A", "F", 0)); ASSERT(StrEqualN(nullptr, nullptr, 4)); ASSERT(StrEqual(nullptr, nullptr)); ASSERT(StrEqual("abccc", "abccc")); ASSERT(!StrEqual("abccc", "abccca")); ASSERT(StrEqualN("abccc", "abccca", 5)); ASSERT(StrEqualN("abcccA", "abccca", 5)); ASSERT(!StrEqualN("abccc", "abccca", 6)); ASSERT(!StrEqual("abc", "ABC")); ASSERT(StrFind("abs", "abs") == 0); ASSERT(StrFind("ababababababs", "abs") == 10); ASSERT(StrFind("abSSS", "abs") == -1); ASSERT(StrFind("abbb", "abbyyyaaabbnbbbbn") == -1); ASSERT(StrFind("J121241381835", "818") == 8); ASSERT(StrFind("J121241381835", nullptr) == -1); ASSERT(StrFind(nullptr, "J121241381835") == -1); ASSERT(StrFind(nullptr, nullptr) == -1); ASSERT(StrFind("ABCDABCD", "ABC") == 0); ASSERT(StrFind("ABHHHHHHHABABABAHBAHBAHAB", "ABB") == -1); #define CHECK_NUM(num) ASSERT(Atoi(#num) == num) CHECK_NUM(00); CHECK_NUM(10); CHECK_NUM(1); CHECK_NUM(12); CHECK_NUM(1442); CHECK_NUM(1662); CHECK_NUM(1812); CHECK_NUM(0); CHECK_NUM(7); CHECK_NUM(343247); CHECK_NUM(99999); CHECK_NUM(900000); CHECK_NUM(100); CHECK_NUM(1003200); #undef CHECK_NUM #define CHECK_HEX_NUM(num) ASSERT(HexAtoi(#num) == num) CHECK_HEX_NUM(0x0); CHECK_HEX_NUM(0); CHECK_HEX_NUM(0x11); CHECK_HEX_NUM(0x01); CHECK_HEX_NUM(0x21); CHECK_HEX_NUM(0x21); CHECK_HEX_NUM(0x81); CHECK_HEX_NUM(0xA1); CHECK_HEX_NUM(0xFFF1); CHECK_HEX_NUM(0x0F00); CHECK_HEX_NUM(0x0F001); CHECK_HEX_NUM(0X0F001); CHECK_HEX_NUM(0X0f001); CHECK_HEX_NUM(0X0fbdeE01); #undef CHECK_HEX_NUM ASSERT(Atoi("0123") == 123); ASSERT(Atoi("0123000") == 123000); ASSERT(Atof("1.0") == 1.0f); ASSERT(Atof("1.4") == 1.4f); ASSERT(Atof("12.4") == 12.4f); ASSERT(Atof("0.4") == 0.4f); ASSERT(Atof(".4") == 0.4f); ASSERT(Atof("43.4") == 43.4f); ASSERT(Atof("43.4556") == 43.4556f); ASSERT(Atof("43.0056") == 43.0056f); ASSERT(Atof("4.5e2") == 450); ASSERT(Atof("5.0e-1") == 0.5f); char stkConst1[] = "!@#$%^"; char stkConst2[] = "!@#$%^"; ASSERT(StrEqual(stkConst1, stkConst2)); { StringStackBuffer<256> buf("%s", "ABCEDRF"); ASSERT(StrEqual(buf.buffer, "ABCEDRF")); } { StringStackBuffer<256> buf("%s++%d", "ABCEDRF", 13); ASSERT(StrEqual(buf.buffer, "ABCEDRF++13")); } { StringStackBuffer<256> buf1("%s__123", "ABC"); StringStackBuffer<256> buf2("ABC__%d", 123); StringStackBuffer<256> buf3("ABC__%d", 321); StringStackBuffer<64> buf4("ABC__%d", 123); ASSERT(buf1 == buf1); ASSERT(buf2 == buf2); ASSERT(buf3 == buf3); ASSERT(buf4 == buf4); ASSERT(!(buf1 != buf1)); ASSERT(!(buf2 != buf2)); ASSERT(!(buf3 != buf3)); ASSERT(!(buf4 != buf4)); ASSERT(buf1 == buf2); ASSERT(!(buf1 != buf2)); ASSERT(buf2 != buf3); ASSERT(buf1 == buf4); ASSERT(buf2 == buf4); } { StringStackBuffer<256> buf1("%s__123", "ABC"); StringStackBuffer<256> buf2("%s", "ABC"); StringStackBuffer<256> buf3("%s", "ABC"); buf2.Append("__123"); buf3.AppendFormat("__%d", 123); ASSERT(buf1 == buf2); ASSERT(buf1 == buf3); ASSERT(buf2 == buf3); } { char str1B[] = "ABCDEFGHIJ"; String str1 = str1B; str1B[0] = 'Z'; ASSERT(str1.GetLength() == 10); ASSERT(str1.GetRef() == 1); ASSERT(str1.string[0] == 'A'); } { char str1B[] = "ABCDEFGHIJ"; String str1 = str1B; str1 = str1; str1 = str1; } { char str1B[] = "ABCDEFGHIJ"; String str1 = str1B; String str2 = str1B; ASSERT(str1 == str1); ASSERT(!(str1 != str1)); ASSERT(!(str1 != str1B)); ASSERT(str1 == str1B); ASSERT(str1 == str2); ASSERT(str2 == str1B); str1B[0] = '#'; ASSERT(str1 != str1B); ASSERT(str2 != str1B); ASSERT(str1 == str2); } { char str1B[] = "ABCDEFGHIJ"; String str1 = str1B; String str2 = str1B; String str3 = str1; str2 = str1; str1 = str2; str3 = str2; } { char str1B[] = "ABCDEFGHIJ"; String str1 = str1B; char str2B[] = "UWENNQW"; String str2 = str2B; ASSERT(str1 != str2); String str3 = str1; String str4 = str2; ASSERT(str1 == str3); ASSERT(str2 == str4); ASSERT(str3 != str4); { String temp = str3; str3 = str4; str4 = temp; } ASSERT(str1 == str4); ASSERT(str2 == str3); ASSERT(str3 != str4); } { String str = "c"; ASSERT(str != "clea"); } { String str = "cle"; ASSERT(str != "clea"); } { String str = "c"; ASSERT((str == "clea") == false); } { String str = "cle"; ASSERT((str == "clea") == false); } { char str1B[] = "ABCDEFGHIJ"; String str1 = str1B; char str2B[] = "@#$ABCDE"; String str2 = str2B; SubString sub1 = str1.GetSubString(1, 3); SubString sub2 = str2.GetSubString(4, 3); ASSERT(sub1 == sub2); String str3 = "BCD"; String str4 = str3; String str5 = "bde"; ASSERT(sub1 == str3); ASSERT(sub1 == str4); ASSERT(sub1 != str5); ASSERT(str3 == sub1); ASSERT(str4 == sub1); ASSERT(str5 != sub1); ASSERT(sub2 == str3); ASSERT(sub2 == str4); ASSERT(sub2 != str5); } { char strVal[] = "SGJLSRJ"; SubString substr; { String str1 = strVal; substr = str1.GetSubString(4, 2); ASSERT(substr == "SR"); } ASSERT(substr == "SR"); ASSERT(substr.GetRef() == 1); } { String str1 = "THE ONLY"; for (int i = 0; i < str1.GetLength(); i++) { SubString substr = str1.GetSubString(i, 0); ASSERT(substr == ""); } } { char str1B[] = "ABCDEFGHIJ"; String str1 = str1B; String str2 = str1; str1B[0] = 'Z'; ASSERT(str1.GetLength() == 10); ASSERT(str1.GetRef() == 2); ASSERT(str1.string[0] == 'A'); ASSERT(str2.GetLength() == 10); ASSERT(str2.GetRef() == 2); ASSERT(str2.string[0] == 'A'); str2.string[2] = 'M'; ASSERT(str1.string[2] == 'M'); } { char str1B[] = "ABCDEFGHIJ"; String str1 = str1B; str1.SetSize(20); str1.SetSize(20); String str2 = str1; str1.SetSize(20); str2.SetSize(20); str1.Release(); } { char str1B[] = "ABCDEFGHIJ"; String str1 = str1B; SubString substr1 = str1.GetSubString(0, 4); ASSERT(substr1.length = 4); ASSERT(StrEqualN(substr1.start, "ABCD", 4)); SubString substr2 = str1.GetSubString(2, 4); ASSERT(substr2.length = 4); ASSERT(StrEqualN(substr2.start, "CDEF", 4)); ASSERT(str1.GetRef() == 3); substr1 = substr2; substr1 = substr2; substr2 = substr1; ASSERT(substr1.GetRef() == 3); ASSERT(substr2.GetRef() == 3); } { char str1B[] = "ABCDEFGHIJ"; String str1 = str1B; SubString substr1,substr2; substr1 = str1.GetSubString(3, 4); substr2 = str1.GetSubString(6, 2); ASSERT(substr1 != substr2); ASSERT(substr2 != substr1); ASSERT(substr1.GetRef() == 3); ASSERT(substr2.GetRef() == 3); { SubString temp = substr1; substr1 = substr2; substr2 = temp; } ASSERT(substr1 != substr2); ASSERT(substr2 != substr1); ASSERT(substr1.GetRef() == 3); ASSERT(substr2.GetRef() == 3); ASSERT(substr1 == "GH"); ASSERT(substr2 == "DEFG"); SubString substr3 = str1.GetSubString(6, 3); ASSERT(substr1 != substr3); ASSERT(substr2 != substr3); str1.Release(); ASSERT(substr1.GetRef() == 3); ASSERT(substr2.GetRef() == 3); substr1 = substr3; substr2 = substr3; ASSERT(substr1.GetRef() == 3); ASSERT(substr2.GetRef() == 3); ASSERT(substr3.GetRef() == 3); ASSERT(substr1 == substr2); ASSERT(substr2 == substr3); SubString substr4,substr5; substr5 = substr4 = substr1; ASSERT(substr1.GetRef() == 5); ASSERT(substr4.GetRef() == 5); str1.Retain(); ASSERT(str1.GetRef() == 6); } { String str1 = "BCDEFGH"; SubString substr = str1.GetSubString(3, 2); str1.Release(); ASSERT(substr.GetRef() == 1); str1.Retain(); ASSERT(StrEqualN(substr.start, "EF", 2)); } { String str1 = "ABCDEF"; String str2 = str1.Insert("@@@", 0); ASSERT(str2 == "@@@ABCDEF"); ASSERT(str2.GetLength() == 9); } { String str1 = "ABCDEF"; String str2 = str1.Insert("@@@", 1); ASSERT(str2 == "A@@@BCDEF"); ASSERT(str2.GetLength() == 9); } { String str1 = "ABCDEF"; String str2 = str1.Insert('@', 2); ASSERT(str2 == "AB@CDEF"); ASSERT(str2.GetLength() == 7); } { String str1 = "ABCDEF"; String str2 = str1.Insert('@', 6); ASSERT(str2 == "ABCDEF@"); ASSERT(str2.GetLength() == 7); } { for (int i = 0; i < 7; i++) { String str1 = "ABCDEF"; String str2 = str1.Insert("", i); ASSERT(str2 == "ABCDEF"); ASSERT(str2.GetLength() == 6); } } { String str1 = ""; String str2 = str1.Insert("GHT", 0); ASSERT(str2 == "GHT"); ASSERT(str2.GetLength() == 3); } { String str1 = "ABCDEFGHIJ"; String str2 = str1.Remove(0); ASSERT(str2 == "BCDEFGHIJ"); } { String str1 = "ABCDEFGHIJ"; String str2 = str1.Remove(1); ASSERT(str2 == "ACDEFGHIJ"); } { String str1 = "ABCDEFGHIJ"; String str2 = str1.Remove(9); ASSERT(str2 == "ABCDEFGHI"); } { const char* str = "This is a test string lol.23523%@"; char* newStr = StrDup(str); ASSERT(StrEqual(str, newStr)); free(newStr); } { Vector<SubString> parts; SplitStringIntoParts("abcdef", "HH", &parts); ASSERT(parts.count == 1); ASSERT(parts.data[0] == "abcdef"); } { Vector<SubString> parts; SplitStringIntoParts("", "HH", &parts, true); ASSERT(parts.count == 0); } { Vector<SubString> parts; SplitStringIntoParts("ab cd ef", "HH", &parts); ASSERT(parts.count == 1); ASSERT(parts.data[0] == "ab cd ef"); } { Vector<SubString> parts; SplitStringIntoParts("abHHcd ef", "HH", &parts); ASSERT(parts.count == 2); ASSERT(parts.data[0] == "ab"); ASSERT(parts.data[1] == "cd ef"); } { Vector<SubString> parts; SplitStringIntoParts("a ef 234 65", " ", &parts); ASSERT(parts.count == 4); ASSERT(parts.data[0] == "a"); ASSERT(parts.data[1] == "ef"); ASSERT(parts.data[2] == "234"); ASSERT(parts.data[3] == "65"); } { Vector<SubString> parts; SplitStringIntoParts("a ef 234 65", " ", &parts); ASSERT(parts.count == 5); ASSERT(parts.data[0] == "a"); ASSERT(parts.data[1] == "ef"); ASSERT(parts.data[2] == "234"); ASSERT(parts.data[3] == ""); ASSERT(parts.data[4] == "65"); } { Vector<SubString> parts; SplitStringIntoParts("a ef 234 65", " ", &parts, true); ASSERT(parts.count == 4); ASSERT(parts.data[0] == "a"); ASSERT(parts.data[1] == "ef"); ASSERT(parts.data[2] == "234"); ASSERT(parts.data[3] == "65"); } { Vector<SubString> parts; SplitStringIntoParts("a ef 234 65", " ", &parts, true); ASSERT(parts.count == 4); ASSERT(parts.data[0] == "a"); ASSERT(parts.data[1] == "ef"); ASSERT(parts.data[2] == "234"); ASSERT(parts.data[3] == "65"); } { Vector<SubString> parts; SplitStringIntoParts("a||||ef|||234|65", "||", &parts, true); ASSERT(parts.count == 3); ASSERT(parts.data[0] == "a"); ASSERT(parts.data[1] == "ef"); ASSERT(parts.data[2] == "|234|65"); } { Vector<SubString> parts; SplitStringIntoParts("a||||ef|||234|65", "||", &parts); ASSERT(parts.count == 4); ASSERT(parts.data[0] == "a"); ASSERT(parts.data[1] == ""); ASSERT(parts.data[2] == "ef"); ASSERT(parts.data[3] == "|234|65"); } { Vector<SubString> parts; SplitStringIntoParts("", "||", &parts); ASSERT(parts.count == 0); } { Vector<SubString> parts; SplitStringIntoParts("", "||", &parts, true); ASSERT(parts.count == 0); } { Vector<SubString> parts; SplitStringIntoParts("a b c d e f", " ", &parts, true); ASSERT(parts.count == 6); ASSERT(parts.data[0] == "a"); ASSERT(parts.data[1] == "b"); ASSERT(parts.data[2] == "c"); ASSERT(parts.data[3] == "d"); ASSERT(parts.data[4] == "e"); ASSERT(parts.data[5] == "f"); } { Vector<SubString> parts; SplitStringIntoParts("a b c d e f", " ", &parts); ASSERT(parts.count == 6); ASSERT(parts.data[0] == "a"); ASSERT(parts.data[1] == "b"); ASSERT(parts.data[2] == "c"); ASSERT(parts.data[3] == "d"); ASSERT(parts.data[4] == "e"); ASSERT(parts.data[5] == "f"); } { Vector<SubString> parts; SplitStringIntoParts("a b c d e f", " ", &parts, true); ASSERT(parts.count == 6); ASSERT(parts.data[0] == "a"); ASSERT(parts.data[1] == "b"); ASSERT(parts.data[2] == "c"); ASSERT(parts.data[3] == "d"); ASSERT(parts.data[4] == "e"); ASSERT(parts.data[5] == "f"); } { Vector<SubString> parts; SplitStringIntoParts("a ", " ", &parts, true); ASSERT(parts.count == 1); ASSERT(parts.data[0] == "a"); } { Vector<SubString> parts; SplitStringIntoParts("a b ", " ", &parts, true); ASSERT(parts.count == 2); ASSERT(parts.data[0] == "a"); ASSERT(parts.data[1] == "b"); } { Vector<SubString> parts; SplitStringIntoParts("a b c d e f ", " ", &parts, true); ASSERT(parts.count == 6); ASSERT(parts.data[0] == "a"); ASSERT(parts.data[1] == "b"); ASSERT(parts.data[2] == "c"); ASSERT(parts.data[3] == "d"); ASSERT(parts.data[4] == "e"); ASSERT(parts.data[5] == "f"); } { Vector<SubString> parts; SplitStringIntoParts("a b c", " ", &parts, true); ASSERT(parts.count == 3); ASSERT(parts.data[0] == "a"); ASSERT(parts.data[1] == "b"); ASSERT(parts.data[2] == "c"); ASSERT(parts.data[0].AsString() == "a"); ASSERT(parts.data[1].AsString() == "b"); ASSERT(parts.data[2].AsString() == "c"); ASSERT(parts.data[0].AsString().GetLength() == 1); ASSERT(parts.data[1].AsString().GetLength() == 1); ASSERT(parts.data[2].AsString().GetLength() == 1); } { String x = ""; ASSERT(x == ""); ASSERT(!(x != "")); ASSERT(x != "a"); ASSERT(!(x == "a")); } { String x = "a"; ASSERT(x != ""); ASSERT(!(x == "")); ASSERT(x == "a"); ASSERT(!(x != "a")); } { SubString x; ASSERT(x == ""); ASSERT(!(x != "")); ASSERT(x != "a"); ASSERT(!(x == "a")); } { String xs = "a"; SubString x = xs.GetSubString(0, 1); ASSERT(x != ""); ASSERT(!(x == "")); ASSERT(x == "a"); ASSERT(!(x != "a")); } return 0; } #endif
We look at five technologies that look set to become part of every day lives very soon, to find out how they'll change our lives. This technology could be a game-changer for device connectivity. A modern desktop computer today may include jacks to accommodate ethernet, USB 2.0, FireWire 400 or 800 (IEEE 1394a or 1394b) or both, DVI or DisplayPort or both, and - on some -eSATA. USB 3.0 could eliminate all of these except ethernet. In their place, a computer may have several USB 3.0 ports, delivering data to monitors, retrieving it from scanners, and exchanging it with hard drives. The improved speed comes at a good time, as much-faster flash memory drives are in the pipeline. USB 3.0 is fast enough to allow uncompressed 1080p video (currently our highest-definition video format) at 60 frames per second, says Jeff Ravencraft, president and chair of the USB-IF. That would enable a camcorder to forgo video compression hardware and patent licensing fees for MPEG-4. The user could either stream video live from a simple camcorder (with no video processing required) or store it on an internal drive for later rapid transfer; neither of these methods is feasible today without heavy compression. Citing 3.0's versatility, some analysts see the standard as a possible complement - or even alternative - to the consumer HDMI connection found on today's Blu-ray players. The new USB flavor could also turn computers into real charging stations. Whereas USB 2.0 can produce 100 milliamperes (mA) of trickle charge for each port, USB 3.0 ups that quantity to 150mA per device. USB 2.0 tops out at 500mA for a hub; the maximum for USB 3.0 is 900mA. With mobile phones moving to support USB as the standard plug for charging and syncing, the increased amperage of USB 3.0 might let you do away with wall warts (AC adapters) of all kinds. In light of the increased importance and use of USB in its 3.0 version, future desktop computers may very well have two internal hubs, with several ports easily accessible in the front to act as a charging station. Each hub could have up to six ports and support the full amperage. Meanwhile, laptop machines could multiply USB ports for better charging and access on the road. (Apple's Mac Mini already includes five USB 2.0 ports on its back.) The higher speed of 3.0 will accelerate data transfers, of course, moving more than 20GB of data per minute. This will make performing backups (and maintaining offsite backups) of increasingly large collections of images, movies, and downloaded media a much easier job. Possible new applications for the technology include on-the-fly syncs and downloads (as described in the case study above). The USB-IF's Ravencraft notes that customers could download movies at the gas pump at of a filling station. "With high-speed USB [2.0], you couldn't have people waiting in line at 15 minutes a crack to download a movie," Ravencraft says. Manufacturers are poised to take advantage of USB 3.0, and analysts predict mass adoption of the standard on computers within a couple of years. The format will be popular in mobile devices and consumer electronics, as well. Ravencraft says that manufacturers currently sell more than 2 billion devices with built-in USB each year, so there's plenty of potential for getting the new standard out fast. NEXT PAGE: Video streaming over Wi-Fi
is a C based interpreter (runloop) that executes, what different compiler (like Mildew ) produce. If you want to help SMOP, you can just take on one of the lowlevel S1P implementations and write it. If you have any questions ask ruoso or pmurias at #perl6 @ irc.freenode.org. The Slides for the talk Perl 6 is just a SMOP are available, it introduces a bit of the reasoning behind SMOP. A newer version of the talk presented at YAPC::EU 2008 is available SMOP is an alternative implementation of a C engine to run Perl 6. It is focused in getting the most pragmatic approach possible, but still focusing in being able to support all Perl 6 features. Its core resembles Perl 5 in some ways, and it differs from Parrot in many ways, including the fact that SMOP is not a Virtual Machine. SMOP is simply a runtime engine that happens to have a interpreter run loop. The main difference between SMOP and Parrot (besides the not-being-a-vm thing), is that SMOP is from bottom-up an implementation of the Perl 6 OO features, in a way that SMOP should be able to do a full bootstrap of the Perl 6 type system. Parrot on the other hand have a much more static low-level implementation (the PMC) The same way PGE is a project on top of Parrot, SMOP will need a grammar engine for itself. SMOP is the implementation that is stressing the meta object protocol more than any other implementation, and so far that has been a very fruitful exercise, with Larry making many clarifications on the object system thanks to SMOP. Important topics on SMOP - SMOP doesn't recurse in the C stack, and it doesn't actually define a mandatory paradigm (stack-based or register-based). SMOP has a Polymorphic Eval, that allows you to switch from one interpreter loop to another using Continuation Passing Style. See SMOP Stackless. - SMOP doesn't define a object system in its own. The only thing it defines is the concept of SMOP Responder Interface, which then encapsulates whatever object system. This feature is fundamental to implement the SMOP Native Types. - SMOP is intended to bootstrap itself from the low-level to the high-level. This is achieved by the fact that everything in SMOP is an Object. This way, even the low-level objects can be exposed to the high level runtime. See SMOP OO Bootstrap. - SMOP won't implement a parser in its own, it will use STD or whatever parser gets ported to its runtime first. - In order to enable the bootstrap, the runtime have a set of SMOP Constant Identifiers that are available for the sub-language compilers to use. - There are some special SMOP Values Not Subject to Garbage Collection. - A new interpreter implementation SMOP Mold replaced SLIME - The "official" smop Perl 6 compiler is mildew - it lives in v6/mildew - Currently there exists an old Elf backend which targets SMOP - it lives in misc/elfish/elfX SMOP GSoC 2009 See the Old SMOP Changelog
Written by Jeff Mackey Like many of you, we were appalled by photos that have surfaced showing a visibly terrified monkey crudely strapped into a restraint device in which he was reportedly launched into space by the Iranian Space Agency (ISA). Back in 2011, our friends at PETA U.K. urged agency head Dr. Hamid Fazeli to ground the misguided mission, pointing out that nonhuman primates are no longer sent into space by the American or European It appears that Iran is repeating the wasteful and cruel mistakes that marked the darkest days of the space race. Monkeys are smart and sensitive animals who not only are traumatized by the violence and noise of a launch and landing but also suffer when caged in a laboratory before and after a flight—if they survive. the use of primates in space radiation experiments in the early 1990s, following protests by PETA. In 2010, NASA's plans to restart the program were canceled after PETA and others voiced strong ethical and scientific objections to the Similarly, the European Space Agency (ESA) has a very active space exploration program and has publicly stated that it "declines any interest in monkey research and does not consider any need or use for such results." The ESA instead employs modern technology such as state-of-the-art simulators to assess health risks for Whether it happens in Iran or Ireland, in an underground laboratory or in outer space, cruelly exploiting animals for specious science is indefensible. We've reached out to the ISA once again to ask it to stop shooting monkeys into space. Learn how you can help stop experimentation on all animals. you have a general question for PETA and would like a response, please e-mail Info@peta.org. If you need to report cruelty to an animal, please click here. If you are reporting an animal in imminent danger and know where to find the animal and if the abuse is taking place right now, please call your local police department. If the police are unresponsive, please call PETA immediately at 757-622-7382 and press 2. Follow PETA on Twitter! Almost all of us grew up eating meat, wearing leather, and going to circuses and zoos. We never considered the impact of these actions on the animals involved. For whatever reason, you are now asking the question: Why should animals have rights? Read more.
The Palisades Museum of Prehistory (PMOP), incorporated in Washington DC, is a non-profit regional organization dedicated to promoting the awareness and preservation of prehistoric artifacts in the Palisades of Washington DC. The PMOP will accomplish its mission by providing information, education, and archaeological guidance. In addition to curation and preservation of prehistoric artifacts, the PMOP will assemble a library of archaeological records, maps, and surveys pertinent to the region’s prehistory. These records are now housed in disparate locations e.g. universities, National Park Service, State Historic Preservation Offices, Smithsonian archives. The localized information will be made available in the museum located in the Palisades of Washington DC. More interest in our prehistory will hopefully allow the PMOP to organize a volunteer network that can react rapidly to events exposing our prehistory - like road works, building excavations, and erosion. The bulk of prehistoric data remains locked up in government agencies and academic institutions. Many in the archaeological profession believe that releasing this information will encourage people to collect artifacts on federal lands. However well-intentioned, this mindset continues to exact a toll on the prehistoric record. Ignorance of history will guarantee the obliteration of the archeological record as more development continues with little regard to the people who onced lived here. By providing the public access to the archaeological record, PMOP will boost awareness of our area's human history. In the end, both professionals and public will benefit from the increase of knowledge. Because our region’s prehistory spans at least 12,000 years, waves of indigenous cultures have come and gone dispersing evidence over broad geographic areas. The ravages of time have thinned much of that evidence. By recovering more evidence over a broader area, and making that information public, the PMOP hopes to raise awareness and understanding of those who lived here for thousands of years. In terms of human evolution, the formative years of our species existed in lithic cultures. By greatly expanding the knowledge base of those cultures, the Palisades Museum of Prehistory hopes to shed light on our human nature.
July 24, 2009 Mark S. Blumberg is Professor and Starch Faculty Fellow at the University of Iowa. His books include The Oxford Handbook of Developmental Behavioral Neuroscience, Body Heat: Temperature and Life on Earth, and Basic Instinct: The Genesis of Behavior. He is Editor-in-Chief of the journal Behavioral Neuroscience, and President of the International Society for Developmental Psychobiology. His newest book is Freaks of Nature: What Anomalies Tell Us About Development and Evolution. In this conversation with D.J. Grothe, Mark Blumberg describes how he became interested in "freaks of nature" as a way to question prevailing concepts within biology regarding genes, instincts, and pre-formed abilities. He talks about why he sees genetic determinism as "action at a distance thinking," and why he thinks it is similar to creationist views, and describes both as "magical ways of thinking about nature." He explains epigenetics. He describes how certain non-genetic factors that shape behavior may be inherited from one generation to the next. He discusses "sexual freaks" and sexual ambiguity in nature, and shows how in many ways, it is the norm in nature. He predicts the extinction of creationist thinking, and talks about how freaks of nature are a missed opportunity for those science advocates battling intelligent design and creationism, even as he also criticizes belief in "evolution's design" and "magical genes." He contrasts his views with those of evolutionary psychology as regards brain development. And he responds to notable critics of his views, such as Jerry Coyne. Books Mentioned in This Episode: Basic Instinct: The Genesis of Behavior Mark S. Blumberg February 27, 2009
by Virginia B. Hargrove The fish tank at the dentist's draws my kids like a magnet. They excitedly tell one another stories about each fish. Little kids...big imaginations. As I waited through their appointments, I thought about a nifty way to put those active imaginations to work! When we got home, we were going to create an edible aquarium in a cup! This is one "pet" you won't have to worry about! What better way to celebrate National Jello Week February 12-18! • Clear plastic or glass containers • A skewer or small plastic makeup paddle • 2 cups lemon-lime flat soda • 1 tablespoon unflavored gelatin • 2 drops blue food coloring • Small colorful candy for the gravel • Fish shaped crackers, gummy fish, or other edible "ocean" critters Blossom your gelatin. Isn't that a descriptive term? I expect to see those little granules open up into roses...or for this project into sea anemones. It means to sprinkle the gelatin evenly over 1/4 cup soda (or water), and let stand five minutes to soften. Place 1/2 cup soda in a small saucepan over medium heat. Heat just to boiling. Add the softened gelatin, stirring to dissolve the gelatin completely over the heat, about 2 minutes. Remove from heat. Add the remaining soda and food coloring, and stir to combine. Pour the liquid into a bowl. Transfer to the refrigerator to chill until partially set. You want it to be a little thick, but still mushy and movable but not watery. Fish placed in the middle of the aquarium should stay there. Check every 15 minutes Once your fish bowl "water" thickens, call the kids! Empty some "gravel" (colorful candies) into each container. Then gently spoon in the gelatin solution. Fill it up to the desired water level. Now for the fun! Hand out a skewer or small make-up paddle to each child. Show how to use it to push candies into the "water." Sit back and watch (or make your own) as they load up their cups. Use gummy worms for eels, stick fish or seaweed. Add gummy fish and top it off with a gummy life preserver. Once your child's happy with the fish bowl, place it in the refrigerator until completely set. Then eat and enjoy! Caution: Each time our kids raved about this project to their friends, we had to set up another fish bowl making day! Do you have a project that seems to attract the entire neighborhood? Please share it with us. Copyright © Pregnancy.org.
/* ------------------------------------------------------------------- * LHOTSE: Toolbox for adaptive statistical models * ------------------------------------------------------------------- * Project source file * Module: eptools * Desc.: Header class EPPotentialFactory * ------------------------------------------------------------------- */ #ifndef EPTOOLS_EPPOTENTIALFACTORY_H #define EPTOOLS_EPPOTENTIALFACTORY_H #if HAVE_CONFIG_H # include <config.h> #endif #include "src/eptools/potentials/EPScalarPotential.h" //BEGINNS(eptools) /** * Provides factory method for supported 'EPScalarPotential' * subclasses. All these have to be registered here with a unique * ID. * <p> * Registration is static and compile-time, nothing fancy. The * subclass 'EPPotentialNamedFactory' also maintains the * association * Name (string) -> ID (nonneg. int) * Here, Name is exposed towards interface and must not change, * while IDs may change internally. * <p> * NOTE: Can this be done better? The implementation has to modified * for every new 'EPScalarPotential' subclass, and each static method * here has to be modified. * Would be better if subclasses registered themselves here, passing * information and function pointers (would not work for constructors). * ==> ??? * * @author Matthias Seeger * @version %I% %G% */ class EPPotentialFactory { protected: // Internal constants (potential IDs) static const int potGaussian =0; static const int potLaplace =1; static const int potProbit =2; static const int potHeaviside =3; static const int potExponential =4; static const int potQuantRegress=5; static const int potGaussMixture=6; static const int potSpikeSlab =7; static const int potLast =7; #ifdef HAVE_WORKAROUND #include "src/eptools/potentials/EPPotentialFactory_workaround.h" #endif public: // Public static methods static bool isValidID(int pid) { #ifndef HAVE_WORKAROUND return (pid>=0 && pid<=potLast); #else return (pid>=0 && pid<=potLast) || (pid>=potFirst_workaround && pid<=potLast_workaround); #endif } /** * See 'EPScalarPotential' comments. * * @param pid Potential ID * @return Argument group ID ('EPScalarPotential::atypeXXX') */ static int getArgumentGroup(int pid); /** * Creates 'EPScalarPotential' object of correct type, given ID. * In 'pv', a valid initial parameter vector has to be passed. Use * 'createDefault' for default construction. * <p> * In 'annot', a void* to an annotation can be passed. This is ignored * by types which do not have annotations, but is mandatory for types * which do. * NOTE: The validity of a non-zero 'annot' is not checked. Passing * an invalid can lead to a crash. * * @param pid Potential ID * @param pv Initial parameter vector * @param annot S.a. Def.: 0 * @return New object */ static EPScalarPotential* create(int pid,const double* pv,void* annot=0); /** * Creates 'EPScalarPotential' object of correct type, given ID. The * default constructor of the type is called. The type may require * construction parameters (see 'EPScalarPotential' header comments), * in which case 'pv' must point to these. Otherwise, 'pv' is ignored. * <p> * In 'annot', a void* to an annotation can be passed. This is ignored * by types which do not have annotations, but is mandatory for types * which do. * NOTE: The validity of a non-zero 'annot' is not checked. Passing * an invalid can lead to a crash. * * @param pid Potential ID * @param pv Construction parameters. Def.: 0 * @param annot S.a. Def.: 0 * @return New object */ static EPScalarPotential* createDefault(int pid,const double* pv=0, void* annot=0); #ifdef HAVE_WORKAROUND protected: static int getArgumentGroup_workaround(int pid); static EPScalarPotential* create_workaround(int pid,const double* pv, void* annot); static EPScalarPotential* createDefault_workaround(int pid,const double* pv, void* annot); public: #endif }; //ENDNS #endif
#pragma once //#include <windows.h> //#include <commctrl.h> //#include <stdio.h> #include "ERMsg.h" #include <string> #include <vector> namespace WBSF { ERMsg MakeGIF(std::string output_file_path, const std::vector<std::string>& file_list, unsigned short delay=20, bool bLoop=true); }
/* ================================================================================== Copyright (c) 2019-2020 AT&T Intellectual Property. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. ================================================================================== */ /* * e2sm_indication.hpp * * Created on: Apr, 2020 * Author: Shraboni Jana */ /* Classes to handle E2 service model based on e2sm-HelloWorld-v001.asn */ #ifndef SRC_XAPP_ASN_E2SM_E2SM_INDICATION_HPP_ #define SRC_XAPP_ASN_E2SM_E2SM_INDICATION_HPP_ #include <sstream> #include <e2sm_helpers.hpp> #include <mdclog/mdclog.h> #include <vector> #include <E2SM-HelloWorld-IndicationHeader.h> #include <E2SM-HelloWorld-IndicationMessage.h> #include <E2SM-HelloWorld-IndicationHeader-Format1.h> #include <E2SM-HelloWorld-IndicationMessage-Format1.h> #include <HW-Header.h> #include <HW-Message.h> class e2sm_indication { public: e2sm_indication(void); ~e2sm_indication(void); bool set_fields(E2SM_HelloWorld_IndicationHeader_t *, e2sm_indication_helper &); bool set_fields(E2SM_HelloWorld_IndicationMessage_t *, e2sm_indication_helper &); bool get_fields(E2SM_HelloWorld_IndicationHeader_t *, e2sm_indication_helper &); bool get_fields(E2SM_HelloWorld_IndicationMessage_t *, e2sm_indication_helper &); bool encode_indication_header(unsigned char *, size_t *, e2sm_indication_helper &); bool encode_indication_message(unsigned char*, size_t *, e2sm_indication_helper &); std::string get_error (void) const {return error_string ;}; private: E2SM_HelloWorld_IndicationHeader_t * indication_head; // used for encoding E2SM_HelloWorld_IndicationMessage_t* indication_msg; E2SM_HelloWorld_IndicationHeader_Format1_t head_fmt1; E2SM_HelloWorld_IndicationMessage_Format1_t msg_fmt1; size_t errbuf_len; char errbuf[128]; std::string error_string; }; #endif /* SRC_XAPP_ASN_E2SM_E2SM_INDICATION_HPP_ */
Thursday, 31 March 2016 Troubleshooting High-CPU Utilization for SQL Server For this types of situation we have to remember that CPU consume time in two modes as 1) Kernal Mode 2) User Mode These two mode can be seen by "Performance Monitor" by monitoring "%Privilege Time" and "%User Time" counter. Remember that "%Privileged time" is not based on 100%.It is based on number of processors.If you see 200 for sqlserver.exe and the system has 8 CPU then CPU consumed by sqlserver.exe is 200 out of 800 (only 25%). If "% Privileged Time" value is more than 30% then it's generally caused by faulty drivers or anti-virus software. In such situations make sure the BIOS and filter drives are up to date and then try disabling the anti-virus software temporarily to see the change. If "% User Time" is high then there is something consuming of SQL Server. There are several known patterns which can be caused high CPU for processes running in SQL Server including 1 . Query executing causing CPU spike ( In general caused by optimizer picking bad plan) 2. High Compiles and Re-compiles ( In general stats change , schema change , temp tables , recompiled all the user defined SP's etc) 3. Running many traces. SELECT  scheduler_id FROM sys.dm_os_schedulers WHERE scheduler_id < 255 See below for the BOL definitions for the above columns: status – Indicates the status of the scheduler. SELECT TOP 10 st.text FROM sys.dm_exec_query_stats qs CROSS APPLY sys.dm_exec_sql_text(qs.sql_handle) st CROSS APPLY sys.dm_exec_query_plan(qs.plan_handle) qp ORDER BY qs.total_worker_time DESC Note the BOL definitions for the important columns: I re-ran the same query again after a few seconds and was returned the below output. Now figure out whether it is singe query or stored procedure causing CPU spike. 1. If the stats are up to date then estimated rows and estimated execution will be approximately same in the execution plan. If there is huge difference then stats are outdated and required update. 2. Rebuild or re-organize the indexes and also create if the indexes are not available. 3. If update statistics or rebuilding the indexes doesn't help you bringing down the CPU then tune the query one by one. 3. If the procedure is causing the CPU spike then a. Use SET NOCOUNT ON to disable no of effected rows message. It is required only to test or debug the code. b. Use schema name with the object name if multiple schemas exist in the database. This will helpful in directly finding the compiled plan instead of searching for the object in other schema. This process of searching schema for an object leads to COMPILE lock on SP and decreases the SP's performance. So always its better to refer the objects with the qualified name in the SP. c. Do not use the prefix "sp_" in the stored procedure name . If you use then it will search in the master database. Searching in the master database causes extra over head and also there are changes to get wrong resulyt if the same SP found in the master database. d. Use IF EXISTS (SELECT 1) instead of (SELECT * ) to check the existence of a record in another table. Hence EXIST will use True or False. e. If the query which is spiking linked server query try changing the security of linked server to ensure liked server user has ddl_admin or dba/sysadmin on the remote server. f. Try to avoid using the SQL Server cursors when ever possible and use while loop to process the records one by one. g. Keep the transaction as short as possible - The length of transaction affects blocking and deadlocking.Exclusive lock is not released until the end of transaction. For faster execution and less blocking the transaction should be kept as short as possible. h. Use Try-Catch for error handling it will help full to easily debug and fix  the issues in case of big portion of code. 2. If the system thread is consuming most of the CPU If none of the SQL queries are consuming majority of the cpu then we can identify if the back ground threads is consuming the majority of CPU by looking at sysprocesses output for background threads. Select * from sys.sysprocesses where spid<51 Check if you are hitting any of the known issues such as resource monitor may consume high CPU (hot fixes available ) or ghost clean up task uses 100% of the CPU on the idle system in SQL Server 2008 or SQL Server 2005. No comments: Post a Comment
/* Source code for Sopwith Reverse-engineered by Andrew Jenner Copyright (c) 1984-2000 David L Clark Copyright (c) 1999-2001 Andrew Jenner All rights reserved except as specified in the file license.txt. Distribution of this file without the license.txt file accompanying is prohibited. */ #include <ctype.h> #include <stdio.h> #include <setjmp.h> #include <stdlib.h> #include <dos.h> #include <alloc.h> #include <string.h> #include <conio.h> #include "def.h" #include "sopasm.h" struct snd { int t2v,deltat2v; struct snd *next,*prev; }; typedef struct snd snd; struct object { int state; int x,y,xv,yv,rotation; bool inverted; int kind; int speed,deltav,deltarot; bool firing; int score,ammo; int counter; int fuel; struct object *source; int height,width; bool bombing; int bombs,colour; unsigned int xfrac,yfrac,xvfrac,yvfrac; struct object *next,*prev; int index; int oldx,oldy; bool onscreen,oldonscreen; unsigned char *oldsprite; void (*soundfunc)(struct object *p); bool (*updatefunc)(struct object *p); struct object *nextx,*prevx; int deaths; unsigned char *sprite; int bombtime; bool homing; int type; bool ishome; snd *sndp; }; typedef struct object object; typedef struct { int colour,x,y; } mapobject; typedef struct { int *planeposes; bool *planeflip; int *buildingpositions; int *buildingtypes; } landscape; unsigned char writecharcol=3; int regionleft[4]={0,1155,0,2089}; int regionright[4]={0,2088,1154,10000}; object *maxobjectp=NULL; int latency=-1; int sine[16]={0x000, 0x062, 0x0b5, 0x0ed, 0x100, 0x0ed, 0x0b5, 0x062, 0x000,-0x062,-0x0b5,-0x0ed,-0x100,-0x0ed,-0x0b5,-0x062}; int keysprev,keyspressed,keysnext,joykeysprev; int joykeyspressed,joykeysnext; bool keypressedflag; int joykeys[9]={KEY_FLIP, KEY_DESCEND,KEY_FLIP, KEY_BRAKE,0, KEY_ACCEL, KEY_FLIP, KEY_CLIMB, KEY_FLIP}; unsigned char scrground[320]; char enginepower[16]={0,-1,-2,-3,-4,-3,-2,-1,0,1,2,3,4,3,2,1}; int soundtype=0x7fff,soundpitch=0x7fff; object *soundobj=NULL; unsigned int t2v=0; object *sndobj=NULL; void (*soundperiodicfunc)(void)=NULL; char *tune1[7]={ "b4/d8/d2/r16/c8/b8/a8/b4./c4./c+4./d4./", "e4/g8/g2/r16/>a8/<g8/e8/d2./", "b4/d8/d2/r16/c8/b8/a8/b4./c4./c+4./d4./", "e4/>a8/a2/r16/<g8/f+8/e8/d2./", "d8/g2/r16/g8/g+2/r16/g+8/>a2/r16/a8/c2/r16/", "b8/a8/<g8/>b4/<g8/>b4/<g8/>a4./<g1/", ""}; int enginestutter[50]={ /* No idea what the more significant bits are */ 0x90b9,0xbcfb,0x6564,0x3313,0x3190,0xa980,0xbcf0,0x6f97,0x37f4,0x064b, 0x9fd8,0x595b,0x1eee,0x820c,0x4201,0x651e,0x848e,0x15d5,0x1de7,0x1585, 0xa850,0x213b,0x3953,0x1eb0,0x97a7,0x35dd,0xaf2f,0x1629,0xbe9b,0x243f, 0x847d,0x313a,0x3295,0xbc11,0x6e6d,0x3398,0xad43,0x51ce,0x8f95,0x507e, 0x499e,0x3bc1,0x5243,0x2017,0x9510,0x9865,0x65f6,0x6b56,0x36b9,0x5026}; int stutterp=0; int majorscale[7]={0,2,3,5,7,8,10}; int notefreq[12]={440,466,494,523,554,587,622,659,698,740,784,831}; int singleplanes[2]={0,7}; int computerplanes[4]={0,7,1,6}; int multipleplanes[8]={0,7,3,4,2,5,1,6}; int flockx[4]={370,1370,1630,2630}; int flocky[4]={199,199,199,199}; int flockxv[4]={2,2,-2,-2}; int fscatterx[8]={8,3,0,6,7,14,10,12}; int fscattery[8]={16,1,8,3,12,10,7,14}; int fscatterxv[8]={-2,2,-3,3,-1,1,0,0}; int fscatteryv[8]={-1,-2,-1,-2,-1,-2,-1,-2}; int oxx[2]={1376,1608}; int oxy[2]={80,91}; int crater[8]={1,2,2,3,3,2,2,1}; #include "ground.c" #include "sprites.c" int worldplaneposes[8]={1270,588,1330,1360,1630,1660,2456,1720}; /* 2456 was 2464 */ bool worldplaneflip[8]={FALSE,FALSE,FALSE,FALSE,TRUE,TRUE,TRUE,TRUE}; int worldbuildingpositions[20]={ 191,284,409,539,685,807,934,1210,1240,1440, 1550,1750,1780,2024,2159,2279,2390,2549,2678,2763}; int worldbuildingtypes[20]={ BUILDING_CHIM,BUILDING_TANK,BUILDING_CHIM,BUILDING_CHIM,BUILDING_TANK, BUILDING_FLAG,BUILDING_CHIM,BUILDING_FUEL,BUILDING_FLAG,BUILDING_TANK, BUILDING_TANK,BUILDING_FLAG,BUILDING_FUEL,BUILDING_CHIM,BUILDING_CHIM, BUILDING_TANK,BUILDING_TANK,BUILDING_FLAG,BUILDING_FLAG,BUILDING_CHIM}; landscape worlds[1]={ worldplaneposes,worldplaneflip,worldbuildingpositions,worldbuildingtypes}; int autodeltarot[3]={0,-1,1}; int huge *historybuf; long historyspace; FILE *outputfile; int huge *historyp; int historykeys; long historyfilelen; bool recording; int gamemode; bool multiplayer; landscape *world=NULL; object *buildings[20]; int buildingc[2]; int timertick,frametick,speedtick; int level,radarrange2; unsigned char scrbuf[0x2000]; bool hiresflag; bool notitlesflag; bool soundflag,statsflag,joyrequested,ibmkeyboard,inplay=FALSE; int scnleft,scnright,pixtoscroll; unsigned int scrseg,scroff,interlacediff; bool groundnotdrawn; object *objects; object homes[4]; object *lastobject,*firstobject,*nextobject,*firstdeleted,*lastdeleted; object objleft,objright; object *attackees[4]; int finaleflags[4],finaletime,playerindex=0,planeindex; bool planeisplayer,planeisenemy; mapobject mapobjects[100]; bool finaleflying,cratertobedrawn; char *playbackfilename,*recordfilename; int randno; bool breakf; int latencycount,finaleflag,maxlives; jmp_buf startjbuf; bool exiting=FALSE; snd sndlist[100]; snd *lastsnd,*nextsnd; int slidec,numshrapnelsnd,tuneptr2,tuneline2; unsigned int t2v2; int tunetime2,octavemul2; bool tune3f; int tuneptr3,tuneline3; unsigned int t2v3; int tunetime3,octavemul3; char **tune; int tuneline,tuneptr,t2v1,tunedur,octavemultiplier; int ot2v; bool deceased; int score; object *collobj1[200]; object *collobj2[200]; int collc; int collxv[4],collyv[4]; object *collobjs[4]; int colln,collxvr,collyvr; unsigned char workingground[MAX_X]; object tplane; int autoheight; int autod2[3]; bool autodoomed[3]; int autoalt[3]; int leftbuilding,rightbuilding; void main(int argc,char *argv[]); void keybint(void); int inkeys(void); void updatejoy(void); int readjoychannel(int channel); void flushbuf(void); void setcolour(int c); void updatescreen(void); void updateground(void); void drawground(unsigned char *scrground); void clearscorearea(void); void drawobject(int x,int y,object *obj); void putpixel(int x,int y,int c); int bitblt(int x,int y,object *obj); int pixel(int x,int y,int c); void putimage(int x,int y,unsigned char *p,object *obj); void updateobjects(void); bool updateplayerplane(object *plane); void processkeys(object *p,int keys); bool updateenemyplane(object *plane); bool updateplane(object *plane); void attackable(object *obj); void refuel(object *plane); bool increment(int *val,int max); bool updatebullet(object *bullet); bool updatebomb(object *bomb); int direction(object *obj); bool updatebuilding(object *building); bool updateshrapnel(object *shrapnel); bool updatesmoke(object *smoke); bool updateflock(object *flock); bool updatebird(object *bird); bool updateox(object *ox); void killplane(object *plane); void catchfire(object *plane); void gointospin(object *plane); void insxlist(object *ins,object *list); void delxlist(object *del); void initsndlist(void); void initsound(int type,int pitch,object *obj); void updatesound(void); void updatesoundint(void); void soundslide(void); void soundtoggle(void); void updatetune2(void); void setsound2(void); void updatetune3(void); void sound3(void); void objectsound(object *obj,int sn); snd *createsnd(void); void destroysnd(snd *s); void killsnd(object *o); void ssound(unsigned int t2); void snosound(void); int getenginestutter(int f); void updatetune(void); void init(int argc,char *argv[]); void initrand(void); void restart(void); void initdifficulty(void); void clearwin(void); void getcontrol(void); int getgamemode(void); int getgamenumber(void); bool testbreak(void); void copyground(void); void initscreen(bool drawnground); void writescores(void); void livesbar(object *p); void fuelbar(object *p); void bombsbar(object *p); void ammobar(object *p); void statbar(int x,int h,int hmax,int col); void drawmapground(void); void drawmapbuildings(void); void useoffscreenbuf(void); void useonscreenbuf(void); void copyoffscbuftoscn(void); void clearscrbuf(void); void initlists(void); void createenemyplane(object *pl); void createplayerplane(object *player); object *createplane(object *pl); void firebullet(object *obj,object *at); int distance(int x0,int y0,int x1,int y1); void dropbomb(object *plane); void createbuildings(void); void createexplosion(object *obj); void createsmoke(object *plane); void createflocks(void); void createbird(object *flock,int birdno); void createoxen(void); void checkcollisions(void); void checkcollision(object *obj1,object *obj2); void checkcrash(object *obj); void docollision(object *obj1,object *obj2); bool collidescore(int type,object *obj,int score); void addscore(object *destroyed,int score); void score50(object *destroyed); void writescore(object *p); void digcrater(object *obj); void titles(void); void soundoff(void); void timerint(void); void soundbomb(object *bomb); void soundshrapnel(object *shrapnel); void soundbuilding(object *building); void soundplane(object *plane); void drawmapobject(object *obj); void finish(char *msg,bool closef); void declarewinner(int n); void createsun(object *player); void gameover(object *plane); void eogstats(void); object *newobject(void); void deleteobject(object *obj); void enemylogic(object *plane); void enemyattack(object *plane,object *attackee); void enemyflyhome(object *plane); void flyhome(object *plane); bool ontarget(object *target); void autopilot(object *plane,int destx,int desty,object *destobj,bool recursing); void initbuildingcheck(int x,int y); bool doomed(int x,int y,int alt); int distsqr(int x0,int y0,int x1,int y1); int getmaxplayers(void); bool updateremoteplane(object *plane); int inithistory(int randno); void freehistorybuf(void); void freeandexit(char *errmsg); int history(int key); void flushhistory(void); void initcomms(void); char *finishcomms(bool closef); char *finishserial(void); int getasynchkeys(object *plane); int getmultiplekeys(object *plane); void setvel(object *obj,int v,int dir); void printstr(char *str); void moveobject(object *obj,int *x,int *y); void getopt(int *argc,char **argv[],char *format,...); void writenum(int n,int width); void initasynch(void); void createasynchremoteplane(void); int inkey(void); void main(int argc,char* argv[]) { int nmodes,ncontrols,i; bool modes=FALSE,modec=FALSE,modem=FALSE,modea=FALSE,keybflag=FALSE; objects=(object *)malloc(100*sizeof(object)); if (objects==NULL) { printf("Cannot allocate memory for object list.\n"); exit(1); } delay(0); getopt(&argc,&argv,"w&y#q&e&g#s&c&m&a&j&k&i&h*v*:sopwith2*", &hiresflag, /* -w */ &latency, /* -y[num] */ &soundflag, /* -q (quiet) */ &statsflag, /* -e (print end of game statistics) */ &level, /* -g[num] */ &modes, /* -s */ &modec, /* -c */ &modem, /* -m */ &modea, /* -a */ &joyrequested, /* -j */ &keybflag, /* -k */ &ibmkeyboard, /* -i */ &recordfilename, /* -h[string] (record) */ &playbackfilename /* -v[string] (playback) */ ); soundflag=!soundflag; nmodes=(modes ? 1 : 0)+(modec ? 1 : 0)+(modem ? 1 : 0)+(modea ? 1 : 0); if (nmodes>1) { printstr("\r\nOnly one mode: -s -c -m -a may be specified\r\n"); exit(1); } ncontrols=(keybflag ? 1 : 0)+(joyrequested ? 1 : 0); if (ncontrols>1) { printstr("\r\nOnly one of -j and -k may be specified\r\n"); exit(1); } if (nmodes>0 && ncontrols>0) notitlesflag=TRUE; initrand(); randno=inithistory(randno); getch(); initsndlist(); inittimer(timerint); if (hiresflag) setgmode(6); else setgmode(4); if (!notitlesflag) { initsound(SOUND_TUNE,0,NULL); updatesound(); setcolour(3); poscurs(13,8); printstr("S O P W I T H"); setcolour(1); poscurs(12,11); printstr("BMB "); setcolour(3); printstr("Compuscience"); if (nmodes>0) gamemode=(modes ? GAME_SINGLE : (modec ? GAME_COMPUTER : (modem ? GAME_MULTIPLE : GAME_ASYNCH))); else gamemode=getgamemode(); if (ncontrols==0) getcontrol(); } multiplayer=(gamemode==GAME_MULTIPLE || gamemode==GAME_ASYNCH); if (multiplayer) { maxlives=10; if (gamemode==GAME_MULTIPLE) initcomms(); else initasynch(); copyground(); initlists(); if (gamemode==GAME_ASYNCH) createasynchremoteplane(); createbuildings(); initscreen(FALSE); if (latency==-1) latency=1; } else { if (latency==-1) latency=1; maxlives=5; world=&worlds[0]; clearwin(); copyground(); initlists(); createplayerplane(NULL); for (i=0;i<3;i++) createenemyplane(NULL); createbuildings(); initscreen(FALSE); } createflocks(); createoxen(); initdifficulty(); initkeyboard(keybint); inplay=TRUE; setjmp(startjbuf); while (TRUE) { while (speedtick<2); speedtick=0; /* delay(10000); */ updateobjects(); updatejoy(); updatescreen(); updatejoy(); checkcollisions(); updatejoy(); updatesound(); } } void keybint(void) { int scancode,k; keypressedflag=TRUE; if (!ibmkeyboard) return; scancode=inportb(PORT_KEYB); switch (scancode&0x7f) { case SC_X: k=KEY_ACCEL; break; case SC_Z: k=KEY_BRAKE; break; case SC_COMMA: k=KEY_CLIMB; break; case SC_SLASH: k=KEY_DESCEND; break; case SC_DOT: k=KEY_FLIP; break; case SC_SPACE: k=KEY_FIRE; break; case SC_B: k=KEY_BOMB; break; case SC_H: k=KEY_HOME; break; case SC_S: k=KEY_SOUND; break; case SC_BREAK: k=KEY_BREAK; breakf=TRUE; break; case SC_V: k=KEY_MISSILE; break; case SC_C: k=KEY_STARBURST; break; case SC_P: /* if (scancode&0x80) { paused=TRUE; if (soundflg) { sound(0,0); swsound(); soundflg=FALSE; while(paused); soundflg=TRUE; } else while(paused); } */ break; default: k=0; } if (k!=0) if (scancode&0x80) { if (k&keysprev) keysnext&=~k; keyspressed&=~k; } else { keyspressed|=k; keysnext|=k; } } int inkeys(void) { int k; if (!inplay) return history(inkey()); if (ibmkeyboard) { k=keysprev=keysnext; keysnext=keyspressed; while (kbhit()) getkey(); } else { switch(inkey()) { case 'X': case 'x': k=KEY_ACCEL; break; case 'Z': case 'z': k=KEY_BRAKE; break; case '<': case ',': k=KEY_CLIMB; break; case '?': case '/': k=KEY_DESCEND; break; case '>': case '.': k=KEY_FLIP; break; case ' ': k=KEY_FIRE; break; case 'B': case 'b': k=KEY_BOMB; break; case 'H': case 'h': k=KEY_HOME; break; case 'S': case 's': k=KEY_SOUND; break; default: k=0; } if (testbreak()) k|=KEY_BREAK; } if (joyrequested) { joykeysprev=joykeysnext; joykeysnext=joykeyspressed; k|=joykeysprev; } return history(k); } int inkey(void) { if (kbhit()) return getkey(); return 0; } void updatejoy(void) { int x,y,j,r; if (joyrequested) { x=readjoychannel(0); y=readjoychannel(1); j=joykeys[(x<=640 ? 0 : (x>=1920 ? 2 : 1))+ (y<=640 ? 0 : (y>=1920 ? 6 : 3))]; r=inportb(PORT_JOY); /* Joystick */ if ((r&JOY_BUT1)==0) j|=KEY_FIRE; if ((r&JOY_BUT2)==0) j|=KEY_BOMB; joykeyspressed=j; joykeysnext|=j; joykeysnext&=j|~joykeysprev; } } int readjoychannel(int channel) { int t; if ((inportb(PORT_JOY)&(1<<channel))!=0) return 2560; keypressedflag=FALSE; outportb(PORT_TIMERC,0); t=getwordfromport(PORT_TIMER0); outportb(PORT_JOY,0); while ((inportb(PORT_JOY)&(1<<channel))!=0); if (keypressedflag) return 640; return t-getwordfromport(PORT_TIMER0); } void flushbuf(void) { /* if (!inplay || !ibmkeyboard) */ while (kbhit()) getkey(); } void setcolour(int c) { writecharcol=c; } void updatescreen(void) { object *obj; useonscreenbuf(); for (obj=firstobject;obj!=NULL;obj=obj->next) if (obj->oldonscreen && obj->onscreen && obj->height!=1 && obj->oldsprite==obj->sprite && obj->y==obj->oldy && obj->oldx+scnleft==obj->x) { if (obj->soundfunc!=NULL) obj->soundfunc(obj); } else { if (obj->oldonscreen) putimage(obj->oldx,obj->oldy,obj->oldsprite,obj); if (!obj->onscreen) continue; if (obj->x>=scnleft && obj->x<=scnright) { putimage(obj->oldx=obj->x-scnleft,obj->oldy=obj->y,obj->sprite,obj); if (obj->soundfunc!=NULL) obj->soundfunc(obj); } else obj->onscreen=FALSE; } for (obj=firstdeleted;obj!=NULL;obj=obj->next) if (obj->oldonscreen) putimage(obj->oldx,obj->oldy,obj->oldsprite,obj); updateground(); } void updateground(void) { if (!groundnotdrawn) { if (pixtoscroll==0 && !cratertobedrawn) return; drawground(scrground); } memcpy(scrground,workingground+scnleft,320); drawground(scrground); groundnotdrawn=FALSE; cratertobedrawn=FALSE; } void drawground(unsigned char *scrground) { int y=*scrground,y2; int x; for (x=0;x<320;x++) { y2=*(scrground++); if (y2==y) putpixel(x,y,131); else if (y2>y) do putpixel(x,y++,131); while (y!=y2); else do putpixel(x,y--,131); while (y!=y2); } } void updateobjects(void) { object *current,*next; if (firstdeleted!=NULL) { lastdeleted->next=nextobject; nextobject=firstdeleted; lastdeleted=firstdeleted=NULL; } latencycount++; if (latencycount>=latency) latencycount=0; current=firstobject; while (current!=NULL) { next=current->next; current->oldonscreen=current->onscreen; current->oldsprite=current->sprite; current->onscreen=current->updatefunc(current); current=next; } frametick++; } bool updateplayerplane(object *plane) { bool result; int x,keys; planeisenemy=FALSE; planeisplayer=TRUE; planeindex=plane->index; finaleflag=finaleflags[playerindex]; if (finaleflag!=FINALE_NONE) { finaletime--; if (finaletime<=0) { if (gamemode!=GAME_MULTIPLE && gamemode!=GAME_ASYNCH && !exiting) restart(); finish(NULL,TRUE); } } if (latencycount==0) { if (gamemode==GAME_MULTIPLE) keys=getmultiplekeys(plane); else { if (gamemode==GAME_ASYNCH) keys=getasynchkeys(plane); else { keys=inkeys(); flushbuf(); } } processkeys(plane,keys); } else { plane->deltarot=0; plane->bombing=FALSE; } if ((plane->state==CRASHED || plane->state==GHOSTCRASHED) && plane->counter<=0) { plane->deaths++; if (finaleflag!=FINALE_WON && (plane->fuel<=-5000 || (!multiplayer && plane->deaths>=5))) { if (finaleflag==FINALE_NONE) gameover(plane); } else { createplayerplane(plane); initscreen(TRUE); if (finaleflag==FINALE_WON) { if (testbreak()) finish(NULL,TRUE); createsun(plane); } } } x=plane->x; result=updateplane(plane); if (x<=180 || x>=2820) pixtoscroll=0; else { pixtoscroll=plane->x-x; scnleft+=pixtoscroll; scnright+=pixtoscroll; } if (!plane->ishome) { useonscreenbuf(); if (plane->firing) ammobar(plane); if (plane->bombing) bombsbar(plane); } return result; } void processkeys(object *p,int keys) { int state=p->state; p->deltarot=0; p->firing=FALSE; p->bombing=FALSE; if (state!=FLYING && state!=STALLED && state!=FALLING && state!=GHOST && state!=GHOSTSTALLED) return; if (state!=FALLING) { if (finaleflag!=FINALE_NONE) { if (finaleflag==FINALE_LOST && planeisplayer) flyhome(p); return; } if ((keys&KEY_BREAK)!=0) { p->fuel=-5000; p->homing=FALSE; if (p->ishome) { state=(state>=FINISHED) ? GHOSTCRASHED : CRASHED; p->state=state; p->counter=0; } if (planeisplayer) exiting=TRUE; } if ((keys&KEY_HOME)!=0 && (state==FLYING || state==GHOST)) p->homing=TRUE; } if ((keys&KEY_CLIMB)!=0) { p->deltarot++; p->homing=FALSE; } if ((keys&KEY_DESCEND)!=0) { p->deltarot--; p->homing=FALSE; } if ((keys&KEY_FLIP)!=0) { p->inverted=!p->inverted; p->homing=FALSE; } if ((keys&KEY_BRAKE)!=0) { if (p->deltav!=0) p->deltav--; p->homing=FALSE; } if ((keys&KEY_ACCEL)!=0) { if (p->deltav<4) p->deltav++; p->homing=FALSE; } if ((keys&KEY_FIRE)!=0 && state<FINISHED) p->firing=TRUE; if ((keys&KEY_BOMB)!=0 && state<FINISHED) p->bombing=TRUE; if ((keys&KEY_SOUND)!=0 && planeisplayer) { if (soundflag) { initsound(SOUND_OFF,0,NULL); updatesound(); } soundflag=!soundflag; } if (p->homing) flyhome(p); } bool updateenemyplane(object *plane) { planeisenemy=TRUE; planeisplayer=FALSE; plane->deltarot=0; plane->bombing=FALSE; planeindex=plane->index; finaleflag=finaleflags[planeindex]; if (latencycount==0) plane->firing=FALSE; switch (plane->state) { case FLYING: case STALLED: if (finaleflag!=FINALE_NONE) flyhome(plane); else if (latencycount==0) enemylogic(plane); break; case CRASHED: plane->firing=FALSE; if (plane->counter<=0) if (finaleflag==FINALE_NONE) createenemyplane(plane); break; default: plane->firing=FALSE; } return updateplane(plane); } bool updateplane(object *plane) { int rotation,speed,x,y,state,newstate,idealspeed; bool update; bool spinning; state=plane->state; switch(state) { case FINISHED: case WAITING: return FALSE; case CRASHED: case GHOSTCRASHED: plane->counter--; break; case FALLING: plane->counter-=2; if (plane->yv<0 && plane->xv!=0) if (((plane->inverted ? 1 : 0)^(plane->xv<0 ? 1 : 0))!=0) plane->counter-=plane->deltarot; else plane->counter+=plane->deltarot; if (plane->counter<=0) { if (plane->yv<0) { if (plane->xv<0) plane->xv++; else if (plane->xv>0) plane->xv--; else plane->inverted=!plane->inverted; } if (plane->yv>-10) plane->yv--; plane->counter=10; } plane->rotation=direction(plane)<<1; if (plane->yv<=0) objectsound(plane,SOUND_FALLING); break; case STALLED: case GHOSTSTALLED: case FLYING: case GHOST: if (state==STALLED) newstate=FLYING; if (state==GHOSTSTALLED) newstate=GHOST; if (state==STALLED || state==GHOSTSTALLED) { spinning=(plane->rotation!=12 || plane->speed<level+4); if (!spinning) plane->state=state=newstate; } else { spinning=(plane->y>=200); if (spinning) { gointospin(plane); state=plane->state; } } if (finaleflying) break; if (plane->fuel<=0 && !plane->ishome && (state==FLYING || state==STALLED)) { catchfire(plane); score50(plane); return updateplane(plane); } rotation=plane->rotation; speed=plane->speed; update=FALSE; if (plane->deltarot!=0) { if (plane->inverted) rotation-=plane->deltarot; else rotation+=plane->deltarot; rotation&=15; update=TRUE; } if ((frametick&3)==0) if (!spinning && speed<level+4) { speed--; update=TRUE; } else { idealspeed=enginepower[rotation]+plane->deltav+level+4; if (speed<idealspeed) { speed++; update=TRUE; } else if (speed>idealspeed) { speed--; update=TRUE; } } if (update) { if (plane->ishome) { if (plane->deltav || plane->deltarot) speed=level+4; else speed=0; } else if (speed<=0 && !spinning) { gointospin(plane); return updateplane(plane); } plane->speed=speed; plane->rotation=rotation; if (spinning) { plane->yvfrac=plane->xvfrac=plane->xv=0; plane->yv=-speed; } else setvel(plane,speed,rotation); } if (spinning) { plane->counter--; if (plane->counter==0) { plane->inverted=!plane->inverted; plane->rotation=(8-plane->rotation)&15; plane->counter=6; } } if (plane->firing) firebullet(plane,NULL); if (plane->bombing) dropbomb(plane); if (!planeisenemy) { if (planeisplayer && plane->speed>plane->fuel%900) { useonscreenbuf(); fuelbar(plane); } plane->fuel-=plane->speed; } if (plane->speed!=0) plane->ishome=FALSE; } if (finaleflag==FINALE_WON && planeisplayer && finaleflying) plane->sprite=finalesprites[0][finaletime/18]; else if (plane->state==FINISHED) plane->sprite=NULL; else if (plane->state==FALLING && plane->xv==0 && plane->yv<0) plane->sprite=fallingsprites[plane->inverted ? 1 : 0]; else plane->sprite=planesprites[0][plane->inverted ? 1 : 0][plane->rotation]; moveobject(plane,&x,&y); if (x<0) plane->x=x=0; else if (x>=2984) plane->x=x=2984; if (!planeisenemy && (plane->state==FLYING || plane->state==STALLED) && finaleflags[playerindex]==FINALE_NONE) attackable(plane); delxlist(plane); insxlist(plane,plane->nextx); if (plane->bombtime) plane->bombtime--; if (!planeisenemy && plane->ishome && plane->state==FLYING) refuel(plane); if (y<200 && y>=0) { if (plane->state==FALLING) createsmoke(plane); useonscreenbuf(); drawmapobject(plane); if (!planeisplayer) return (plane->state<FINISHED); return TRUE; } return FALSE; } void attackable(object *obj) { object *plane,*attackee; int i,x=obj->x,colour=obj->source->colour; for (plane=firstobject+1,i=1;plane->type==OBJ_PLANE;plane++,i++) if (plane->source->colour!=colour && plane->updatefunc==updateenemyplane && (gamemode!=GAME_COMPUTER || (regionleft[i]<=x && regionright[i]>=x))) { attackee=attackees[i]; if (attackee==NULL || abs(x-plane->x)<abs(attackee->x-plane->x)) attackees[i]=obj; } } void refuel(object *plane) { useonscreenbuf(); if (increment(&(plane->fuel),MAX_FUEL)) fuelbar(plane); if (increment(&(plane->ammo),200)) ammobar(plane); if (increment(&(plane->bombs),5)) bombsbar(plane); } bool increment(int *val,int max) { bool redraw=FALSE; if (*val==max) return redraw; if (max<20) { if (frametick%20==0) { (*val)++; redraw=planeisplayer; } } else { *val+=max/100; redraw=planeisplayer; } if (*val>max) *val=max; return redraw; } bool updatebullet(object *bullet) { int x,y; delxlist(bullet); bullet->fuel--; if (bullet->fuel==0) { deleteobject(bullet); return FALSE; } moveobject(bullet,&x,&y); if (x<0 || x>=MAX_X || y<=workingground[x] || y>=200) { deleteobject(bullet); return FALSE; } insxlist(bullet,bullet->nextx); bullet->sprite=(unsigned char *)131; return TRUE; } bool updatebomb(object *bomb) { int x,y; delxlist(bomb); if (bomb->fuel<0) { deleteobject(bomb); bomb->state=FINISHED; useonscreenbuf(); drawmapobject(bomb); return FALSE; } bomb->fuel--; if (bomb->fuel==0) { if (bomb->yv<0) if (bomb->xv<0) bomb->xv++; else if (bomb->xv>0) bomb->xv--; if (bomb->yv>-10) bomb->yv--; bomb->fuel=5; } if (bomb->yv<=0) objectsound(bomb,SOUND_BOMB); moveobject(bomb,&x,&y); if (x<0 || x>=MAX_X || y<0) { deleteobject(bomb); killsnd(bomb); bomb->state=FINISHED; useonscreenbuf(); drawmapobject(bomb); return FALSE; } bomb->sprite=bombsprites[0][direction(bomb)]; if (y>=200) { insxlist(bomb,bomb->nextx); return FALSE; } insxlist(bomb,bomb->nextx); useonscreenbuf(); drawmapobject(bomb); return TRUE; } int direction(object *obj) { int xv=obj->xv,yv=obj->yv; if (yv>0) { if (xv<0) return 3; if (xv==0) return 2; return 1; } if (yv==0) { if (xv<0) return 4; if (xv==0) return 6; return 0; } if (xv<0) return 5; if (xv==0) return 6; return 7; } /* bool updatemissile(object* missile); */ /* bool updatestarburst(object* starburst); */ bool updatebuilding(object *building) { int d2; object *at=firstobject; building->firing=FALSE; if (level!=0 && building->state==STANDING && (at->state==FLYING || at->state==STALLED) && building->colour!=at->colour && (level>1 || frametick&1)) { d2=distsqr(building->x,building->y,at->x,at->y); if (d2>0 && d2<radarrange2) { building->firing=TRUE; /* was at */ firebullet(building,at); } } building->counter--; if (building->counter<0) building->counter=0; if (building->state==STANDING) building->sprite=buildingsprites[0][building->kind]; else building->sprite=debrissprites[0]; return TRUE; } bool updateshrapnel(object *shrapnel) { int x,y,kind; kind=shrapnel->kind; delxlist(shrapnel); if (shrapnel->fuel<0) { if (kind!=0) killsnd(shrapnel); deleteobject(shrapnel); return FALSE; } shrapnel->fuel--; if (shrapnel->fuel==0) { if (shrapnel->yv<0) if (shrapnel->xv<0) shrapnel->xv++; else if (shrapnel->xv>0) shrapnel->xv--; if ((shrapnel->kind!=0 && shrapnel->yv>-10) || (shrapnel->kind==0 && shrapnel->yv>-(level+4))) shrapnel->yv--; shrapnel->fuel=3; } moveobject(shrapnel,&x,&y); if (x<0 || x>=MAX_X || y<=workingground[x]) { if (kind!=0) killsnd(shrapnel); deleteobject(shrapnel); return FALSE; } shrapnel->counter++; shrapnel->sprite=shrapnelsprites[shrapnel->kind]; if (y>=200) { insxlist(shrapnel,shrapnel->nextx); return FALSE; } insxlist(shrapnel,shrapnel->nextx); return TRUE; } bool updatesmoke(object *smoke) { smoke->fuel--; if (smoke->fuel==0 || (smoke->source->state!=FALLING && smoke->source->state!=CRASHED)) { deleteobject(smoke); return FALSE; } smoke->sprite=(unsigned char *)(smoke->colour+128); return TRUE; } bool updateflock(object *flock) { int x,y; delxlist(flock); if (flock->fuel==-1) { useonscreenbuf(); drawmapobject(flock); deleteobject(flock); return FALSE; } flock->fuel--; if (flock->fuel==0) { flock->inverted=!flock->inverted; flock->fuel=5; } if (flock->x<370 || flock->x>2630) flock->xv=-flock->xv; moveobject(flock,&x,&y); insxlist(flock,flock->nextx); flock->sprite=flocksprites[flock->inverted ? 1 : 0]; useonscreenbuf(); drawmapobject(flock); return TRUE; } bool updatebird(object *bird) { int x,y; delxlist(bird); if (bird->fuel==-1) { deleteobject(bird); return FALSE; } if (bird->fuel==-2) { bird->yv=-bird->yv; bird->xv=(frametick&7)-4; bird->fuel=4; } else { bird->fuel--; if (bird->fuel==0) { bird->inverted=!bird->inverted; bird->fuel=4; } } moveobject(bird,&x,&y); bird->sprite=birdsprites[bird->inverted ? 1 : 0]; if (x<0 || x>=MAX_X || y<=workingground[x] || y>=200) { bird->y-=bird->yv; bird->fuel=-2; insxlist(bird,bird->nextx); return FALSE; } insxlist(bird,bird->nextx); return TRUE; } bool updateox(object *ox) { ox->sprite=oxsprites[ox->state==STANDING ? 0 : 1]; return TRUE; } void declarewinner(int n) { int colour; object *player; if (multiplayer /* && netinf->maxplayers!=1 */) if (firstobject[1].score==firstobject[0].score) colour=3-n; else colour=(firstobject[1].score>firstobject[0].score ? 1 : 0)+1; else colour=1; for (player=firstobject;player->type==OBJ_PLANE;player=player->next) if (finaleflags[player->index]==FINALE_NONE) { if (player->colour==colour && (player->deaths<4 || (player->deaths<5 && (player->state==FLYING || player->state==STALLED)))) createsun(player); else gameover(player); } } void createsun(object *player) { int index; finaleflags[index=player->index]=FINALE_WON; if (index==playerindex) { finaletime=72; finaleflying=TRUE; player->yvfrac=0; player->xvfrac=0; player->yv=0; player->xv=0; player->state=FLYING; player->fuel=MAX_FUEL; player->speed=4; } } void gameover(object *plane) { int player=plane->index; finaleflags[player]=FINALE_LOST; if (player==playerindex) { setcolour(130); poscurs(16,12); printstr("THE END"); finaletime=20; } } void enemylogic(object *plane) { object *attackee=attackees[planeindex]; if (attackee!=NULL) enemyattack(plane,attackee); else if (!plane->ishome) enemyflyhome(plane); attackees[planeindex]=NULL; } void enemyattack(object *plane,object *attackee) { autoheight=((frametick&31)<16 ? 16 : 0); if (attackee->speed!=0) autopilot(plane,attackee->x-(fcos(32,attackee->rotation)>>8), attackee->y-(fsin(32,attackee->rotation)>>8),attackee,FALSE); else autopilot(plane,attackee->x,attackee->y+4,attackee,FALSE); } void enemyflyhome(object *plane) { int x; autoheight=((frametick&31)<16 ? 16 : 0); x=homes[planeindex].x; autopilot(plane,autoheight+(x<1000 ? 1000 : (x>2000 ? 2000 : x)), 150-(autoheight>>1),NULL,FALSE); } void flyhome(object *plane) { object *home; if (plane->ishome) return; home=&homes[planeindex]; autoheight=((frametick&31)<16 ? 16 : 0); if (abs(plane->x-home->x)<16 && abs(plane->y-home->y)<16) { if (planeisplayer) { createplayerplane(plane); initscreen(TRUE); } else if (planeisenemy) createenemyplane(plane); else createplane(plane); return; } autopilot(plane,home->x,home->y,NULL,FALSE); } bool ontarget(object *target) { object tbullet,ttarget; int bulletx,bullety,targetx,targety,d2,i; memcpy(&tbullet,&tplane,sizeof(object)); memcpy(&ttarget,target,sizeof(object)); setvel(&tbullet,tbullet.speed+10,tbullet.rotation); tbullet.x+=8; tbullet.y-=8; for (i=0;i<10;i++) { moveobject(&tbullet,&bulletx,&bullety); moveobject(&ttarget,&targetx,&targety); d2=distsqr(bulletx,bullety,targetx,targety); if (d2<0 || d2>125*125) return FALSE; if (bulletx>=targetx && targetx+15>=bulletx && bullety<=targety && targety-15<=bullety) return TRUE; } return FALSE; } /* void cleartargs(void); */ void initbuildingcheck(int x,int y) { int i,left,right; left=x-(40+level); right=x+40+level; leftbuilding=-1; rightbuilding=0; for (i=0;i<20;i++) if (buildings[i]->x>=left) { leftbuilding=i; break; } if (leftbuilding==-1) return; for (;i<20;i++) if (buildings[i]->x>=right) break; rightbuilding=i-1; } bool doomed(int x,int y,int alt) { object *building; int i,left,right,xx,yy; if (alt>50) return FALSE; if (alt<20) return TRUE; left=x-32; right=x+32; for (i=leftbuilding;i<=rightbuilding;i++) { building=buildings[i]; xx=building->x; if (xx>=left) { if (xx>right) return FALSE; yy=building->y+(building->state==STANDING ? 16 : 8); if (y<=yy) return TRUE; } } return FALSE; } int distsqr(int x0,int y0,int x1,int y1) { int x=abs(x0-x1),y=abs(y0-y1),t; if (x<125 && y<125) return x*x+y*y; if (x<y) { t=x; x=y; y=t; } return -((x*7+(y<<2))>>3); } void autopilot(object *plane,int destx,int desty,object *destobj,bool recursing) { int px,py,distx,disty,i,newx,newy,ch,newrot,newspd,d2,mindist2; if (plane->state==STALLED && plane->rotation!=12) { plane->deltarot=-1; return; } px=plane->x; py=plane->y; distx=px-destx; if (abs(distx)>200) { if (plane->xv!=0 && (distx<0)==(plane->xv<0)) { if (plane->counter==0) plane->counter=(py>150) ? 2 : 1; autopilot(plane,px,plane->counter==1 ? py+25 : py-25,NULL,TRUE); return; } plane->counter=0; py+=100; autopilot(plane,(distx<0 ? 150 : -150)+px, py>(150-autoheight) ? 150-autoheight : py,NULL,TRUE); return; } if (!recursing) plane->counter=0; if (plane->speed!=0) { disty=py-desty; if (disty!=0 && abs(disty)<6) plane->y=(disty<0 ? ++py : --py); else if (distx!=0 && abs(distx)<6) plane->x=(distx<0 ? ++px : --px); } initbuildingcheck(px,py); memcpy(&tplane,plane,sizeof(object)); newspd=tplane.speed+1; if (newspd>level+8) newspd=level+8; else if (newspd<level+4) newspd=level+4; for (i=0;i<3;i++) { newrot=(tplane.rotation+(tplane.inverted ? -autodeltarot[i] : autodeltarot[i]))&15; setvel(&tplane,newspd,newrot); moveobject(&tplane,&newx,&newy); autod2[i]=distsqr(newx,newy,destx,desty); autoalt[i]=newy-ground[newx+8]; autodoomed[i]=doomed(newx,newy,autoalt[i]); memcpy(&tplane,plane,sizeof(object)); } if (destobj!=NULL && ontarget(destobj)) plane->firing=TRUE; mindist2=32767; for (i=0;i<3;i++) { d2=autod2[i]; if (d2>=0 && d2<mindist2 && !autodoomed[i]) { mindist2=d2; ch=i; } } if (mindist2==32767) { mindist2=-32767; for (i=0;i<3;i++) { d2=autod2[i]; if (d2<0 && d2>mindist2 && !autodoomed[i]) { mindist2=d2; ch=i; } } } if (plane->speed<level+4) plane->deltav=4; if (mindist2!=-32767) { if (plane->deltav<4) plane->deltav++; } else { if (plane->deltav!=0) plane->deltav--; ch=0; disty=autoalt[0]; if (autoalt[1]>disty) { disty=autoalt[1]; ch=1; } if (autoalt[2]>disty) ch=2; } plane->deltarot=autodeltarot[ch]; if (plane->deltarot==0 && plane->speed!=0) plane->inverted=(plane->xv<0); } void killplane(object *plane) { if (plane->xv<0) plane->rotation=(plane->rotation+2)&15; else plane->rotation=(plane->rotation-2)&15; plane->state=(plane->state>=GHOST ? GHOSTCRASHED : CRASHED); plane->ishome=FALSE; plane->speed=0; plane->yvfrac=0; plane->xvfrac=0; plane->yv=0; plane->xv=0; plane->counter=10; } void catchfire(object *plane) { plane->xvfrac=0; plane->yvfrac=0; plane->counter=10; plane->state=FALLING; plane->ishome=FALSE; } void gointospin(object *plane) { plane->xv=0; plane->yv=0; plane->speed=0; plane->inverted=FALSE; plane->xvfrac=0; plane->yvfrac=0; plane->rotation=14; plane->counter=6; plane->state=(plane->state>=GHOST ? GHOSTSTALLED : STALLED); plane->ishome=FALSE; } void insxlist(object *ins,object *list) { if (ins->x<list->x) do list=list->prevx; while (ins->x<list->x); else { while (ins->x>=list->x) list=list->nextx; list=list->prevx; } ins->nextx=list->nextx; ins->prevx=list; list->nextx->prevx=ins; list->nextx=ins; } void delxlist(object *del) { del->nextx->prevx=del->prevx; del->prevx->nextx=del->nextx; } void initsndlist(void) { snd *p; int i; for (i=0,p=&sndlist[0];i<99;i++,p++) p->next=p+1; p->next=NULL; lastsnd=NULL; nextsnd=&sndlist[0]; } void initsound(int type,int pitch,object *obj) { if (type<soundtype) { soundtype=type; soundpitch=pitch; soundobj=obj; } else if (type==soundtype && pitch<soundpitch) { soundpitch=pitch; soundobj=obj; } } void updatesound(void) { snd *s; /* disable(); */ for (s=lastsnd;s!=NULL;s=s->next) s->t2v+=s->deltat2v*slidec; slidec=0; tune3f=FALSE; switch (soundtype) { case SOUND_OFF: case SOUND_NONE: default: snosound(); sndobj=NULL; soundperiodicfunc=NULL; break; case SOUND_ENGINE: if (soundpitch==0) ssound(0xf000); else ssound(soundpitch*0x1000+0xd000); sndobj=NULL; soundperiodicfunc=NULL; break; case SOUND_BOMB: if (soundobj==sndobj) break; soundperiodicfunc=soundslide; sndobj=soundobj; soundslide(); break; case SOUND_FALLING: if (soundobj==sndobj) break; soundperiodicfunc=soundslide; sndobj=soundobj; soundslide(); break; case SOUND_STUTTER: ssound(getenginestutter(2)!=0 ? 0x9000 : 0xf000); sndobj=NULL; soundperiodicfunc=NULL; break; case SOUND_SHRAPNEL: ssound(t2v2); soundperiodicfunc=NULL; sndobj=NULL; break; case SOUND_FIRING: ssound(0x1000); soundperiodicfunc=soundtoggle; sndobj=NULL; break; case SOUND_TUNE: tuneline3=0; tuneptr3=0; sound3(); soundperiodicfunc=NULL; sndobj=NULL; tune3f=TRUE; } soundpitch=0x7fff; soundtype=SOUND_NONE; } void updatesoundint(void) { slidec++; if (t2v!=0 && soundperiodicfunc!=NULL) soundperiodicfunc(); if (numshrapnelsnd!=0) updatetune2(); if (tune3f) updatetune3(); } void soundslide(void) { snd *s=sndobj->sndp; ssound(s->t2v+s->deltat2v*slidec); } void soundtoggle(void) { if (t2v==0xf000) ssound(ot2v); else { ot2v=t2v; ssound(0xf000); } } void updatetune2(void) { tunetime2--; if (tunetime2<0) setsound2(); } void setsound2(void) { tuneline=tuneline2; tuneptr=tuneptr2; tune=tune1; octavemultiplier=octavemul2; updatetune(); tuneline2=tuneline; tuneptr2=tuneptr; t2v2=t2v1; tunetime2+=tunedur; /* Interrupts originally cleared for this instruction */ octavemul2=octavemultiplier; } void updatetune3(void) { tunetime3--; if (tunetime3<0) sound3(); } void sound3(void) { tuneline=tuneline3; tuneptr=tuneptr3; tune=tune1; octavemultiplier=octavemul3; updatetune(); tuneline3=tuneline; tuneptr3=tuneptr; t2v3=t2v1; tunetime3+=tunedur; /* Interrupts originally cleared for this instruction */ octavemul3=octavemultiplier; snosound(); ssound(t2v3); } void objectsound(object *obj,int sn) { snd *s; if (obj->sndp!=NULL) return; if (obj->type==OBJ_SHRAPNEL) { /* disable(); */ numshrapnelsnd++; if (numshrapnelsnd==1) { tuneptr2=tuneline2=0; setsound2(); } obj->sndp=(snd *)1; /* Suspect this is a bug */ /* enable(); */ return; } s=createsnd(); if (s!=NULL) { /* disable(); */ switch (sn) { case SOUND_BOMB: s->t2v=0x300; s->deltat2v=8; break; case SOUND_FALLING: s->t2v=0x1200; s->deltat2v=-8; break; } obj->sndp=s; /* enable(); */ return; } } snd *createsnd(void) { snd *p; if (nextsnd==NULL) return NULL; p=nextsnd; nextsnd=p->next; p->next=lastsnd; p->prev=NULL; if (lastsnd!=NULL) lastsnd->prev=p; return lastsnd=p; } void destroysnd(snd *s) { snd *p=s->prev; if (p!=NULL) p->next=s->next; else lastsnd=s->next; p=s->next; if (p!=NULL) p->prev=s->prev; s->next=nextsnd; nextsnd=s; } void killsnd(object *o) { snd *s=o->sndp; if (s==NULL) return; /* disable(); */ if (o->type==OBJ_SHRAPNEL) numshrapnelsnd--; else destroysnd(s); o->sndp=NULL; /* enable(); */ } void ssound(unsigned int t2) { if (!soundflag) return; if (t2v==t2) return; if (t2v==0) outportb(PORT_TIMERC,0xb6); outportb(PORT_TIMER2,t2); outportb(PORT_TIMER2,t2>>8); if (t2v==0) outportb(PORT_SPKR,inportb(PORT_SPKR)|3); t2v=t2; } void snosound(void) { if (t2v!=0) { outportb(PORT_SPKR,inportb(PORT_SPKR)&0xfc); t2v=0; } } int getenginestutter(int f) { if (stutterp>=50) stutterp=0; return enginestutter[stutterp++]%f; } char tempobuf[5]; void updatetune(void) { bool notgotchar=TRUE; int sharpen=0,tempobufp=0,dotdur=2,overflowoct=0x100,semitone,tempo,freq; char tunechar,tunechar2; while (TRUE) { if (tuneline==0 && tuneptr==0) octavemultiplier=0x100; tunechar=toupper(tune[tuneline][tuneptr++]); if (tunechar==0) { tunechar=tune[++tuneline][tuneptr=0]; if (tunechar==0) tuneline=0; if (!notgotchar) break; } else { notgotchar=FALSE; if (tunechar=='/') break; if (isalpha(tunechar)) { semitone=majorscale[tunechar-'A']; tunechar2=tunechar; } else { switch(tunechar) { case '>': octavemultiplier<<=1; break; case '<': octavemultiplier>>=1; break; case '+': sharpen++; break; case '-': sharpen--; break; case '.': dotdur=3; break; default: if (isdigit(tunechar)) tempobuf[tempobufp++]=tunechar; } } } } tempobuf[tempobufp]=0; tempo=atoi(tempobuf); if (tempo<=0) tempo=4; if (tunechar2=='R') freq=0x7d00; else { semitone+=sharpen; while (semitone<0) { semitone+=12; overflowoct>>=1; } while (semitone>=12) { semitone-=12; overflowoct<<=1; } freq=(short)(((long)notefreq[semitone]*(long)octavemultiplier* (long)overflowoct)>>16); } t2v1=(short)(1193181l/freq); tunedur=((dotdur*1440)/(tempo*60))>>1; } void initrand(void) { while (randno==0) { outportb(PORT_TIMERC,0); randno=inportb(PORT_TIMER0); randno|=(inportb(PORT_TIMER0)<<8); } } void restart(void) { int sc,i; object *plane; if (finaleflags[playerindex]==FINALE_WON) { plane=&objects[playerindex]; sc=0; while (plane->deaths++<maxlives) { sc+=25; plane->score+=sc; useonscreenbuf(); livesbar(plane); writescore(plane); timertick=0; while (timertick<5) flushbuf(); /* Jornand de Buisonje <jdbuiso@cs.vu.nl> is the only person who would ever bother to fill up the keyboard buffer here, so this line is only here because of him.*/ } if (level<=5) level++; score=plane->score; } else level=score=0; initsndlist(); copyground(); initlists(); createplayerplane(NULL); for (i=0;i<3;i++) createenemyplane(NULL); createbuildings(); initscreen(FALSE); createflocks(); createoxen(); initdifficulty(); longjmp(startjbuf,0); } void initdifficulty(void) { radarrange2=100; if (level<6) radarrange2-=(6-level)*10; radarrange2*=radarrange2; } void clearwin(void) { int i; for (i=20;i<24;i++) { poscurs(0,i); clearline(); } poscurs(0,20); } void getcontrol(void) { int k; clearwin(); printstr("Key: 1 - Joystick with IBM Keyboard\r\n"); printstr(" 2 - Joystick with non-IBM Keyboard\r\n"); printstr(" 3 - IBM Keyboard only\r\n"); printstr(" 4 - Non-IBM keyboard only\r\n"); while (1) { if (testbreak()) finish(NULL,FALSE); k=inkeys(); if (k>='1' && k<='4') break; } joyrequested=(k<='2'); ibmkeyboard=(k=='1' || k=='3'); } int getgamemode(void) { clearwin(); printstr("Key: S - single player\r\n"); printstr(" C - single player against computer\r\n"); printstr(" M - multiple players on network\r\n"); printstr(" A - 2 players on asynchronous line"); while (TRUE) { if (testbreak()) finish(NULL,FALSE); switch (toupper(inkeys())) { case 'S': return GAME_SINGLE; case 'M': return GAME_MULTIPLE; case 'C': return GAME_COMPUTER; case 'A': return GAME_ASYNCH; } } } int getgamenumber(void) { int n; clearwin(); printstr(" Key a game number"); while (1) { if (testbreak()) finish(NULL,FALSE); n=inkeys()-'0'; if (n>=0 && n<=7) return n; } } bool testbreak(void) { return breakf; } void copyground(void) { memcpy(&workingground,&ground,MAX_X); } void initscreen(bool drawnground) { object *plane; if (drawnground==0) { clearscrbuf(); useoffscreenbuf(); drawmapground(); soundoff(); deceased=FALSE; } copyoffscbuftoscn(); useonscreenbuf(); drawmapbuildings(); writescores(); plane=&objects[playerindex]; if (deceased) { poscurs(16,24); setcolour(plane->colour); printstr("\2"); /* :-) */ } else { fuelbar(plane); bombsbar(plane); ammobar(plane); livesbar(plane); } groundnotdrawn=TRUE; } void writescores(void) { if (score!=0) { objects[0].score=score; score=0; } writescore(objects); /* if (multiplayer && netinf->maxplayers>1) writescore(&objects[1]); */ } void livesbar(object *p) { statbar(127,maxlives-p->deaths,maxlives,p->colour); } void fuelbar(object *p) { statbar(132,p->fuel>>4,562,p->colour); } void bombsbar(object *p) { statbar(137,p->bombs,5,3-p->colour); } void ammobar(object *p) { statbar(142,p->ammo,200,3); } void statbar(int x,int h,int hmax,int col) { int y; if (deceased) return; h=(h*10)/hmax-1; if (h>9) h=9; for (y=0;y<=h;y++) putpixel(x,y,col); for (;y<=9;y++) putpixel(x,y,0); } void drawmapground(void) { int c,newy,x,sx,y; c=0; sx=152; newy=15; for (y=0;y<=newy;y++) putpixel(sx,y,3); newy=y=0; for (x=0;x<MAX_X;x++) { if (workingground[x]>newy) newy=workingground[x]; c++; if (c==19) { newy/=13; if (newy==y) putpixel(sx,newy,3); else if (newy>y) for (y++;y<=newy;y++) putpixel(sx,y,3); else for (y--;y>=newy;y--) putpixel(sx,y,3); y=newy; putpixel(sx,0,3); sx++; c=newy=0; } } newy=15; for (y=0;y<=newy;y++) putpixel(sx,y,3); for (x=0;x<320;x++) putpixel(x,18,3); } void drawmapbuildings(void) { int i; object *building; mapobject *mapobj; for (i=0,building=objects,mapobj=mapobjects;i<100;i++,building++,mapobj++) { building->oldonscreen=0; building->onscreen=0; mapobj->colour=0; } for (i=0;i<20;i++) { building=buildings[i]; if (building!=NULL) if (building->state!=FINISHED) drawmapobject(building); } } void useoffscreenbuf(void) { scrseg=_DS; scroff=((int)&scrbuf)-0x1000; interlacediff=0x1000; } void useonscreenbuf(void) { scrseg=SCR_SEG; scroff=0; interlacediff=0x2000; } void copyoffscbuftoscn(void) { farmemset(MK_FP(SCR_SEG,0),0x1000,0); farmemset(MK_FP(SCR_SEG,0x2000),0x1000,0); farmemmove(MK_FP(_DS,&scrbuf),MK_FP(SCR_SEG,0x1000),0x1000); farmemmove(MK_FP(_DS,(int)(&scrbuf)+0x1000),MK_FP(SCR_SEG,0x3000),0x1000); } void clearscrbuf(void) { memset(&scrbuf,0x2000,0); } void initlists(void) { int i; object *o; objleft.nextx=objleft.next=&objright; objright.prevx=objright.prev=&objleft; objleft.x=-32767; objright.x=32767; lastobject=firstobject=firstdeleted=lastdeleted=NULL; nextobject=o=objects; for (i=0;i<100;i++) { o->next=o+1; (o++)->index=i; } (o-1)->next=0; } void createenemyplane(object *pl) { object *plane=createplane(pl); if (pl==NULL) { plane->soundfunc=soundplane; plane->updatefunc=updateenemyplane; plane->colour=2; if (!multiplayer) plane->source=&objects[1]; else if (plane->index==1) plane->source=plane; else plane->source=plane-2; memcpy(&homes[plane->index],plane,sizeof(object)); } if (gamemode==GAME_SINGLE) { plane->state=FINISHED; delxlist(plane); } } void createplayerplane(object *player) { object *plane=createplane(player); if (player==NULL) { plane->soundfunc=soundplane; plane->updatefunc=updateplayerplane; plane->colour=(plane->index&1)+1; plane->source=plane; memcpy(&homes[plane->index],plane,sizeof(object)); finaletime=1; finaleflying=FALSE; } scnleft=plane->x-152; scnright=scnleft+319; flushbuf(); } object *createplane(object *pl) { int y,x,left,right,pos; object *plane=(pl!=NULL ? pl : newobject()); switch (gamemode) { case GAME_SINGLE: pos=singleplanes[plane->index]; break; case GAME_MULTIPLE: case GAME_ASYNCH: pos=multipleplanes[plane->index]; break; case GAME_COMPUTER: pos=computerplanes[plane->index]; } plane->type=OBJ_PLANE; left=plane->x=world->planeposes[pos]; right=plane->x+20; y=0; for (x=left;x<=right;x++) if (workingground[x]>y) y=workingground[x]; plane->y=y+13; plane->bombtime=0; plane->counter=0; plane->deltav=0; plane->deltarot=0; plane->speed=0; plane->yfrac=0; plane->xfrac=0; setvel(plane,0,0); plane->inverted=world->planeflip[pos]; plane->rotation=(plane->inverted ? 8 : 0); plane->homing=FALSE; plane->bombing=FALSE; plane->firing=FALSE; plane->height=16; plane->width=16; plane->ishome=TRUE; if (pl==0 || plane->state==CRASHED || plane->state==GHOSTCRASHED) { plane->ammo=200; plane->bombs=5; plane->fuel=MAX_FUEL; } if (pl==0) { attackees[plane->index]=NULL; finaleflags[plane->index]=FINALE_NONE; plane->deaths=0; /* plane->si1c=0; */ plane->score=0; insxlist(plane,&objleft); } else { delxlist(plane); insxlist(plane,plane->nextx); } if (multiplayer && plane->deaths>=maxlives) { plane->state=GHOST; if (plane->index==playerindex) deceased=TRUE; } else plane->state=FLYING; return plane; } void firebullet(object *obj,object *at) { object *bullet; int xv,yv,dist,speed,atx,aty; if (at==NULL && !planeisenemy && obj->ammo==0) return; bullet=newobject(); if (bullet==NULL) return; obj->ammo--; speed=level+10; if (at!=NULL) { atx=at->x+(at->xv<<2); aty=at->y+(at->yv<<2); xv=atx-obj->x; yv=aty-obj->y; dist=distance(atx,aty,obj->x,obj->y); if (dist<1) { deleteobject(bullet); return; } bullet->xv=(speed*xv)/dist; bullet->yv=(speed*yv)/dist; bullet->yvfrac=0; bullet->xvfrac=0; } else setvel(bullet,obj->speed+speed,obj->rotation); bullet->type=OBJ_BULLET; bullet->x=obj->x+8; bullet->y=obj->y-8; bullet->xfrac=obj->xfrac; bullet->yfrac=obj->yfrac; bullet->fuel=10; bullet->source=obj; bullet->colour=obj->colour; bullet->width=1; bullet->height=1; bullet->soundfunc=NULL; bullet->updatefunc=updatebullet; bullet->speed=0; insxlist(bullet,obj); } int distance(int x0,int y0,int x1,int y1) { int x=abs(x0-x1),y=abs(y0-y1),t; if (x>100 || y>100) return -1; if (x<y) { t=x; x=y; y=t; } return (x*7+(y<<2))>>3; } void dropbomb(object *plane) { object *bomb; /* Someone set us up the bomb! Sorry. */ int rot; if ((!planeisenemy && plane->bombs==0) || plane->bombtime!=0) return; bomb=newobject(); if (bomb==NULL) return; plane->bombs--; plane->bombtime=10; bomb->type=OBJ_BOMB; bomb->state=FALLING; bomb->xv=plane->xv; bomb->yv=plane->yv; rot=(plane->inverted ? ((plane->rotation+4)&15) : ((plane->rotation-4)&15)); bomb->x=plane->x+(fcos(10,rot)>>8)+4; bomb->y=plane->y+(fsin(10,rot)>>8)-4; bomb->yvfrac=0; bomb->xvfrac=0; bomb->yfrac=0; bomb->xfrac=0; bomb->fuel=5; bomb->source=plane; bomb->colour=plane->colour; bomb->width=8; bomb->height=8; bomb->soundfunc=soundbomb; bomb->updatefunc=updatebomb; insxlist(bomb,plane); } /* void createmissile(object* plane); */ /* void createstarburst(object* plane); */ void createbuildings(void) { int i,minaltitude,maxaltitude,y,gx,left,right; object *building; int *positions=world->buildingpositions; int *types=world->buildingtypes; if (multiplayer /* && netinf->maxplayers!=1 */) buildingc[0]=buildingc[1]=10; else { buildingc[0]=0; buildingc[1]=17; } for (i=0;i<20;i++) { building=newobject(); buildings[i]=building; building->x=left=*positions; right=left+15; minaltitude=999; maxaltitude=0; for (gx=left;gx<=right;gx++) { if (workingground[gx]>maxaltitude) maxaltitude=workingground[gx]; if (workingground[gx]<minaltitude) minaltitude=workingground[gx]; } for (y=(maxaltitude+minaltitude)>>1;(building->y=y+16)>=200;y--); for (gx=left;gx<=right;gx++) workingground[gx]=y; building->counter=0; building->rotation=0; building->yvfrac=0; building->xvfrac=0; building->yfrac=0; building->xfrac=0; building->yv=0; building->xv=0; building->type=OBJ_BUILDING; building->state=STANDING; building->kind=*types; building->fuel=i; if (multiplayer /* && netinf->maxplayers!=1 */) building->source=&objects[i<10 ? 0 : 1]; else building->source=&objects[i<10 && i>6 ? 0 : 1]; building->colour=building->source->colour; building->width=16; building->height=16; building->soundfunc=soundbuilding; building->updatefunc=updatebuilding; insxlist(building,&objleft); positions++; types++; } } void createexplosion(object *obj) { object *shrapnel; int i,step,l,x,y,xv,yv,colour,type,kind; unsigned int randno1; bool soundf; x=obj->x+(obj->width>>1); y=obj->y+(obj->height>>1); xv=obj->xv; yv=obj->yv; colour=obj->colour; type=obj->type; if (type==OBJ_BUILDING && obj->kind==BUILDING_FUEL) { step=1; l=level+8; } else { step=(type==OBJ_PLANE ? 6 : 2); l=(level+4)>>1; } soundf=(type==OBJ_PLANE && obj->state==FLYING); for (i=1;i<=15;i+=step) { shrapnel=newobject(); if (shrapnel==NULL) return; shrapnel->type=OBJ_SHRAPNEL; setvel(shrapnel,l,i); shrapnel->xv+=xv; shrapnel->yv+=yv; shrapnel->y=shrapnel->yv+y; shrapnel->x=shrapnel->xv+x; randno1=(shrapnel->y)*(shrapnel->x)*randno*0x1d43; shrapnel->fuel=3; kind=shrapnel->kind=(int)(((unsigned long)((unsigned short)((unsigned long)randno1*(unsigned long)i))*8UL)>>16); if (soundf && (kind==0 || kind==7)) { kind=shrapnel->kind=0; soundf=FALSE; shrapnel->xv=xv; shrapnel->yv=-(level+4); } shrapnel->speed=0; shrapnel->counter=0; shrapnel->yfrac=0; shrapnel->xfrac=0; shrapnel->source=obj; shrapnel->colour=colour; shrapnel->width=8; shrapnel->height=8; shrapnel->soundfunc=soundshrapnel; shrapnel->updatefunc=updateshrapnel; if (kind!=0) objectsound(shrapnel,SOUND_SHRAPNEL); insxlist(shrapnel,obj); } } void createsmoke(object *plane) { object *smoke=newobject(); if (smoke==NULL) return; smoke->type=OBJ_SMOKE; smoke->x=plane->x+8; smoke->y=plane->y-8; smoke->xv=plane->xv; smoke->yv=plane->yv; smoke->yvfrac=0; smoke->xvfrac=0; smoke->yfrac=0; smoke->xfrac=0; smoke->fuel=10; smoke->source=plane; smoke->width=1; smoke->height=1; smoke->soundfunc=NULL; smoke->updatefunc=updatesmoke; smoke->colour=plane->colour; } void createflocks(void) { object *flock; int i,bird; for (i=0;i<4;i++) { flock=newobject(); if (flock==NULL) return; flock->type=OBJ_FLOCK; flock->state=FLYING; flock->x=flockx[i]; flock->y=flocky[i]; flock->xv=flockxv[i]; flock->yvfrac=0; flock->xvfrac=0; flock->yfrac=0; flock->xfrac=0; flock->yv=0; flock->inverted=FALSE; flock->fuel=5; flock->source=flock; flock->height=flock->width=16; flock->soundfunc=NULL; flock->updatefunc=updateflock; flock->colour=1; insxlist(flock,&objleft); for (bird=0;bird<SPAREBIRDS;bird++) createbird(flock,1); } } void createbird(object *flock,int birdno) { object *bird=newobject(); if (bird==NULL) return; bird->type=OBJ_BIRD; bird->x=flock->x+fscatterx[birdno]; bird->y=flock->y-fscattery[birdno]; bird->xv=fscatterxv[birdno]; bird->yv=fscatteryv[birdno]; bird->yvfrac=0; bird->xvfrac=0; bird->yfrac=0; bird->xfrac=0; bird->inverted=FALSE; bird->fuel=4; bird->source=flock; bird->height=2; bird->width=4; bird->soundfunc=NULL; bird->updatefunc=updatebird; bird->colour=flock->colour; insxlist(bird,flock); } void createoxen(void) { object *ox; int i; for (i=0;i<2;i++) { ox=newobject(); if (ox==NULL) /* Test for the NULL ox. */ return; ox->type=OBJ_OX; ox->state=STANDING; ox->x=oxx[i]; ox->y=oxy[i]; ox->yv=0; /* This is a particularly amusing variable */ ox->xv=0; ox->yvfrac=0; ox->xvfrac=0; ox->yfrac=0; ox->xfrac=0; ox->inverted=FALSE; /* But this one is just plain bizarre */ ox->source=ox; ox->height=16; ox->width=16; ox->soundfunc=NULL; ox->updatefunc=updateox; ox->colour=1; insxlist(ox,&objleft); } } void checkcollisions(void) { int right,top,bottom,i,type; object **obj1,**obj2; object *obj,*test; colln=collc=0; collxvr=2; collyvr=1; if (frametick&1) { collxvr=-collxvr; collyvr=-collyvr; } useoffscreenbuf(); for (obj=objleft.nextx;obj!=&objright;obj=obj->nextx) { right=obj->x+obj->width-1; bottom=obj->y; top=bottom+1-obj->height; for (test=obj->nextx;test->x<=right && test!=&objright;test=test->nextx) if (test->y>=top && test->y-test->height+1<=bottom) checkcollision(obj,test); type=obj->type; if ((type==OBJ_PLANE && obj->state!=FINISHED && obj->state!=WAITING && obj->y<workingground[obj->x+8]+24) || (type==OBJ_BOMB && obj->y<workingground[obj->x+4]+12)) checkcrash(obj); } for (i=0,obj1=collobj1,obj2=collobj2;i<collc;i++,obj1++,obj2++) docollision(*obj1,*obj2); for (i=0,obj1=collobjs;i<colln;i++,obj1++) { (obj=*obj1)->xv=collxv[i]; obj->yv=collyv[i]; } } void checkcollision(object *obj1,object *obj2) { int type1,type2; object *t; type1=obj1->type; type2=obj2->type; if ((type1==OBJ_PLANE && obj1->state>=FINISHED) || (type2==OBJ_PLANE && obj2->state>=FINISHED) || (type1==OBJ_SHRAPNEL && type2==OBJ_SHRAPNEL)) return; if (obj1->y<obj2->y) { t=obj1; obj1=obj2; obj2=t; } drawobject(15,15,obj1); if (bitblt(obj2->x-obj1->x+15,obj2->y-obj1->y+15,obj2) && collc<199) { collobj1[collc]=obj1; collobj2[collc++]=obj2; collobj1[collc]=obj2; collobj2[collc++]=obj1; } clearscorearea(); } void checkcrash(object *obj) { int x,right,h; bool f=FALSE; drawobject(15,15,obj); right=obj->x+obj->width-1; for (x=obj->x;x<=right;x++) { h=workingground[x]+15-obj->y; if (h>15) { f=TRUE; break; } if (h>=0) { f=pixel(x+15-obj->x,h,0x80); if (f!=0) break; } } clearscorearea(); if (f && collc<200) { collobj1[collc]=obj; collobj2[collc++]=NULL; } } void docollision(object *obj1,object *obj2) { int state,type2,i; type2=(obj2!=NULL) ? obj2->type : OBJ_NONE; if ((type2==OBJ_BIRD || type2==OBJ_FLOCK) && obj1->type!=OBJ_PLANE) return; switch (obj1->type) { case OBJ_BOMB: createexplosion(obj1); obj1->fuel=-1; if (obj2==NULL) /* No object - it hit the ground */ digcrater(obj1); killsnd(obj1); return; case OBJ_BULLET: obj1->fuel=1; return; case OBJ_SHRAPNEL: if (obj2==NULL || obj1->kind!=0 || (obj1->kind==0 && collidescore(type2,obj2,200))) { obj1->fuel=1; killsnd(obj1); } return; case OBJ_BUILDING: if (obj1->state!=STANDING) return; if (type2==OBJ_SHRAPNEL) return; if (type2==OBJ_BULLET) { obj1->counter+=10; if (obj1->counter<(level+1)*10) return; } obj1->state=FINISHED; createexplosion(obj1); useonscreenbuf(); drawmapobject(obj1); useoffscreenbuf(); addscore(obj1,obj1->kind==BUILDING_FUEL ? 200 : 100); buildingc[obj1->colour-1]--; if (buildingc[obj1->colour-1]==0) declarewinner(obj1->colour); return; case OBJ_PLANE: state=obj1->state; if (state==CRASHED || state==GHOSTCRASHED) return; if (finaleflags[obj1->index]==FINALE_WON) return; if (type2==OBJ_BIRD && obj1->ishome) return; if (obj2==NULL) { if (state==FALLING) { killsnd(obj1); createexplosion(obj1); digcrater(obj1); } else if (state<FINISHED) { score50(obj1); createexplosion(obj1); digcrater(obj1); } killplane(obj1); return; } if (state==FALLING || state>=FINISHED) return; if (type2!=OBJ_BULLET) { createexplosion(obj1); if (type2==OBJ_PLANE) { collxvr=-collxvr; collxv[colln]=((obj1->xv+obj2->xv)>>1)+collxvr; collyvr=-collyvr; collyv[colln]=((obj1->yv+obj2->yv)>>1)+collyvr; collobjs[colln++]=obj1; } } catchfire(obj1); score50(obj1); return; case OBJ_BIRD: obj1->fuel=(collidescore(type2,obj2,25) ? -1 : -2); return; case OBJ_FLOCK: if (type2!=OBJ_FLOCK && type2!=OBJ_BIRD && obj1->state==FLYING) { for (i=0;i<8;i++) createbird(obj1,i); obj1->fuel=-1; obj1->state=FINISHED; } return; case OBJ_OX: if (obj1->state!=STANDING) return; if (type2==OBJ_SHRAPNEL) return; collidescore(type2,obj2,200); obj1->state=FINISHED; return; } } void digcrater(object *obj) { int left,right,x,ny,oy,miny,cx; left=obj->x+(obj->width-8)/2; right=left+7; for (x=left,cx=0;x<=right;x++,cx++) { oy=workingground[x]; miny=ground[x]-20; if (miny<20) miny=20; ny=oy+1-crater[cx]; if (ny<=miny) ny=miny+1; workingground[x]=ny-1; } cratertobedrawn=TRUE; } bool collidescore(int type,object *obj,int score) { if (type==OBJ_BULLET || type==OBJ_BOMB || (type==OBJ_PLANE && (obj->state==FLYING || (obj->state==FALLING && obj->counter==10)) && !obj->ishome)) { addscore(obj,score); return TRUE; } return FALSE; } void addscore(object *destroyed,int score) { if (multiplayer /* && netinf->maxplayers==1 */) { objects[2-destroyed->colour].score+=score; writescore(&objects[2-destroyed->colour]); } else { if (destroyed->colour==1) objects->score-=score; else objects->score+=score; writescore(&objects[0]); } } void score50(object *destroyed) { addscore(destroyed,50); } void writescore(object *p) { poscurs(2+7*(p->colour-1),24); setcolour(p->colour); writenum(p->score,6); } void soundoff(void) { if (notitlesflag) return; initsound(SOUND_OFF,0,NULL); updatesound(); } void timerint(void) { timertick++; speedtick++; updatesoundint(); } /* void displayplayerplane(object* plane); */ void soundbomb(object *bomb) { if (bomb->yv<=0) initsound(SOUND_BOMB,-bomb->y,bomb); } /* void displaymissile(object* missile); */ /* void displaystarburst(object* starburst); */ void soundshrapnel(object *shrapnel) { if (shrapnel->kind!=0) initsound(SOUND_SHRAPNEL,shrapnel->counter,shrapnel); } /* void displaycomputerplane(object* plane); */ /* void displayremoteplane(object* plane); */ void soundbuilding(object *building) { if (building->firing) initsound(SOUND_FIRING,0,building); } /* void displayflock(object* flock); */ /* void displaybird(object* bird); */ void soundplane(object *plane) { if (plane->firing) initsound(SOUND_FIRING,0,plane); else switch(plane->state) { case FALLING: if (plane->yv>=0) initsound(SOUND_STUTTER,0,plane); else initsound(SOUND_FALLING,plane->y,plane); break; case FLYING: initsound(SOUND_ENGINE,-plane->speed,plane); break; case STALLED: initsound(SOUND_STUTTER,0,plane); } } void drawmapobject(object *obj) { mapobject *mapobj=&mapobjects[obj->index]; int c; if (mapobj->colour!=0) putpixel(mapobj->x,mapobj->y,mapobj->colour-1); if (obj->state>=FINISHED) mapobj->colour=0; else { mapobj->x=(obj->x+obj->width/2)/19+152; mapobj->y=(obj->y-obj->height/2)/13; c=pixel(mapobj->x,mapobj->y,obj->source->colour); if (c==0 || c==3) { mapobj->colour=c+1; return; } putpixel(mapobj->x,mapobj->y,c); mapobj->colour=0; } } void finish(char *msg,bool closef) { char *errmsg=NULL; setgmode(3); initsound(SOUND_OFF,0,NULL); updatesound(); if (gamemode==GAME_MULTIPLE) errmsg=finishcomms(closef); else if (gamemode==GAME_ASYNCH) errmsg=finishserial(); restoreints(); flushhistory(); printstr("\r\n"); if (errmsg) { printstr(errmsg); printstr("\r\n"); } if (msg) { printstr(msg); printstr("\r\n"); } flushbuf(); if (msg!=NULL || errmsg!=NULL) exit(1); exit(0); } int getmaxplayers(void) { int n; clearwin(); printstr(" Key maximum number of players allowed"); while (1) { if (testbreak()) finish(NULL,FALSE); n=inkeys()-'0'; if (n>=1 && n<=4) return n; } } bool updateremoteplane(object *plane) { planeisplayer=FALSE; planeisenemy=FALSE; finaleflag=finaleflags[planeindex=plane->index]; if (latencycount==0) processkeys(plane,gamemode==GAME_MULTIPLE ? getmultiplekeys(plane) : getasynchkeys(plane)); else { plane->deltarot=0; plane->bombing=FALSE; } if ((plane->state==CRASHED || plane->state==GHOSTCRASHED) && plane->counter<=0 && plane->fuel>-5000) { plane->deaths++; createplane(plane); } return updateplane(plane); } void initcomms(void) { world=&worlds[0]; } char *finishcomms(bool closef) { return NULL; } char *finishserial(void) { return NULL; } /* This function loads a section of a file to a far address */ void ffread(FILE *fp,char huge *d,unsigned long l) { char buf[1024]; unsigned long a; for (a=0;a<(l&-1024);a+=1024) { fread(buf,1024,1,fp); movedata(_DS,(unsigned int)buf,FP_SEG(d),FP_OFF(d),1024); d=(char huge *)d+1024; } if ((l&1023)!=0) { fread(buf,(unsigned int)(l&1023),1,fp); movedata(_DS,(unsigned int)buf,FP_SEG(d),FP_OFF(d),(int)l&1023); } } /* ffread */ int inithistory(int randno) { long historybufsize; FILE *inputfile; if (playbackfilename!=NULL || recordfilename!=NULL) { historybufsize=farcoreleft() historybuf=(int huge *)farmalloc(historybufsize); if (historybuf==0) freeandexit("Unable to allocate history memory"); historyp=(int huge *)historybuf; } if (playbackfilename!=NULL) { inputfile=fopen(playbackfilename,"rb"); if (inputfile==NULL) freeandexit("Unable to open history input file"); fseek(inputfile,0,2); historyfilelen=ftell(inputfile); if (historybufsize<historyfilelen) freeandexit("Insufficient memory to load history file"); historyspace=historybufsize-historyfilelen; fseek(inputfile,0,0); ffread(inputfile,(char huge *)historybuf,(int)historyfilelen); fclose(inputfile); randno=historyp[0]; historyp+=2; historyfilelen-=4; } if (recordfilename!=NULL) { outputfile=fopen(recordfilename,"wb"); if (outputfile==NULL) freeandexit("Unable to open history output file"); if (playbackfilename==NULL) { historyfilelen=historybufsize; historyp[0]=randno; historyp[1]=(int)(historybufsize>>4); historyp+=2; historyfilelen-=4; } } return randno; } void freehistorybuf(void) { if (historybuf!=NULL) farfree((void far *)historybuf); } void freeandexit(char *errmsg) { printstr(errmsg); freehistorybuf(); exit(0); } int history(int keys) { if (playbackfilename!=NULL) if (keys) playbackfilename=NULL; else { if (historyp[0]==frametick) { keys=historykeys=historyp[1]; historyp+=2; historyfilelen-=4; if (historyfilelen==0) { playbackfilename=NULL; historyfilelen=historyspace; } } return historykeys; } if (recordfilename!=NULL && keys!=historykeys) { historyp[0]=frametick; historyp[1]=keys; recording=TRUE; historykeys=keys; historyp+=2; historyfilelen-=4; if (historyfilelen==0) recordfilename=NULL; return historykeys; } return keys; } /* This function saves a far block to a file */ void ffwrite(FILE *fp,char huge *d,unsigned long l) { char buf[1024]; unsigned long a; for (a=0;a<(l|1023)-1023;a+=1024) { movedata(FP_SEG((unsigned long)d+a),FP_OFF((unsigned long)d+a),_DS, (unsigned int)buf,1024); fwrite(buf,1024,1,fp); } if ((l&1023)!=0) { movedata(FP_SEG((unsigned long)d+a),FP_OFF((unsigned long)d+a),_DS, (unsigned int)buf,(int)l&1023); fwrite(buf,(unsigned int)(l&1023),1,fp); } } /* ffwrite */ void flushhistory(void) { if (recording) ffwrite(outputfile,(char huge *)historybuf,(int)(historyp-historybuf)*sizeof(int)); if (outputfile!=NULL) { fclose(outputfile); freehistorybuf(); } } int getasynchkeys(object *plane) { return 0; } int getmultiplekeys(object *plane) { return 0; } void setvel(object *obj,int v,int dir) { int xv=fcos(v,dir),yv=fsin(v,dir); obj->xv=xv>>8; obj->xvfrac=xv<<8; obj->yv=yv>>8; obj->yvfrac=yv<<8; } void printstr(char *str) { while (*str!=0) writechar(*(str++)); } void moveobject(object *obj,int *x,int *y) { long pos,vel; pos=(((long)(obj->x))<<16)+obj->xfrac; vel=(((long)(obj->xv))<<16)+obj->xvfrac; pos+=vel; obj->x=(short)(pos>>16); obj->xfrac=(short)pos; *x=obj->x; pos=(((long)(obj->y))<<16)+obj->yfrac; vel=(((long)(obj->yv))<<16)+obj->yvfrac; pos+=vel; obj->y=(short)(pos>>16); obj->yfrac=(short)pos; *y=obj->y; } void writenum(int n,int width) { int c=0,zerof=1,exponent,dig; if (n<0) { n=-n; writechar('-'); c++; } for (exponent=10000;exponent>1;exponent/=10) { if ((dig=n/exponent)!=0 || zerof==0) { zerof=0; writechar(dig+'0'); c++; } n=n%exponent; } writechar(n+'0'); c++; do { c++; if (c>width) break; writechar(' '); } while (1); } void initasynch(void) { } void createasynchremoteplane(void) { object *plane; if (playerindex==0) createplayerplane(NULL); plane=createplane(NULL); plane->soundfunc=soundplane; plane->updatefunc=updateremoteplane; plane->colour=1+(plane->index&1); plane->source=plane; plane->state=FLYING; memcpy(&homes[plane->index],plane,sizeof(object)); if (playerindex!=0) createplayerplane(NULL); } void getopt(int *argc,char **argv[],char *format,...) { va_list ap; char **varg=*argv; int carg=*argc; char *arg,*p,*q,*a; int i,**valp; varg++; while ((--carg)>0) { arg=*varg; if (*(arg++)!='-') break; if (*arg=='-') { varg++; carg--; break; } p=arg; va_start(ap,format); q=format; while (*q!=0) { if (*q==':') break; i=0; while (isalpha(q[i])) i++; if (strncmp(p,q,i)==0) break; q+=i; if ((*q)!=0) q++; va_arg(ap,int); } if (*p!=*q) { printf("Usage: "); a=strchr(format,':'); if (a!=0) { *(a++)=0; q=strchr(a,'*'); if (q!=0) { *(q++)=0; printf("%s [-%s] %s\n",a,format,q); } else printf("%s\n",a); } else printf("cmd [-%s] args\n",format); exit(0); } p=q+i; arg+=i; valp=(int **)(&va_arg(ap,int)); switch(*p) { case '#': a="%d"; if (*arg=='0') { switch (*(++arg)) { case 'o': a="%o"; arg++; break; case 'x': a="%x"; arg++; } } sscanf(arg,a,*valp); break; case '*': **valp=(int)arg; break; case '&': **valp=(int)TRUE; break; default: printf("Unknown format %c.\n",*p); } varg++; } *argv=varg; *argc=carg; } object *newobject(void) { object *newobj; if (nextobject==NULL) return NULL; newobj=nextobject; nextobject=newobj->next; newobj->next=NULL; newobj->prev=lastobject; if (lastobject!=NULL) lastobject->next=newobj; else firstobject=newobj; newobj->oldonscreen=newobj->onscreen=FALSE; newobj->sndp=NULL; if (newobj>maxobjectp) maxobjectp=newobj; return lastobject=newobj; } void deleteobject(object *obj) { object *other=obj->prev; if (other!=NULL) other->next=obj->next; else firstobject=obj->next; other=obj->next; if (other!=NULL) other->prev=obj->prev; else lastobject=obj->prev; obj->next=NULL; if (lastdeleted) lastdeleted->next=obj; else firstdeleted=obj; lastdeleted=obj; } /* void randsd(void); */ /* void dispwindshot(void); */ /* void dispsplatbird(void); */ /* void dispoxsplat(void); */ void clearscorearea(void) { cgafbar(0,184,48,16,0); } void drawobject(int x,int y,object *obj) { putimage(x,y,obj->sprite,obj); } unsigned char blut[256]={ 0x00,0x03,0x03,0x03,0x0c,0x0f,0x0f,0x0f,0x0c,0x0f,0x0f,0x0f,0x0c,0x0f,0x0f,0x0f, 0x30,0x33,0x33,0x33,0x3c,0x3f,0x3f,0x3f,0x3c,0x3f,0x3f,0x3f,0x3c,0x3f,0x3f,0x3f, 0x30,0x33,0x33,0x33,0x3c,0x3f,0x3f,0x3f,0x3c,0x3f,0x3f,0x3f,0x3c,0x3f,0x3f,0x3f, 0x30,0x33,0x33,0x33,0x3c,0x3f,0x3f,0x3f,0x3c,0x3f,0x3f,0x3f,0x3c,0x3f,0x3f,0x3f, 0xc0,0xc3,0xc3,0xc3,0xcc,0xcf,0xcf,0xcf,0xcc,0xcf,0xcf,0xcf,0xcc,0xcf,0xcf,0xcf, 0xf0,0xf3,0xf3,0xf3,0xfc,0xff,0xff,0xff,0xfc,0xff,0xff,0xff,0xfc,0xff,0xff,0xff, 0xf0,0xf3,0xf3,0xf3,0xfc,0xff,0xff,0xff,0xfc,0xff,0xff,0xff,0xfc,0xff,0xff,0xff, 0xf0,0xf3,0xf3,0xf3,0xfc,0xff,0xff,0xff,0xfc,0xff,0xff,0xff,0xfc,0xff,0xff,0xff, 0xc0,0xc3,0xc3,0xc3,0xcc,0xcf,0xcf,0xcf,0xcc,0xcf,0xcf,0xcf,0xcc,0xcf,0xcf,0xcf, 0xf0,0xf3,0xf3,0xf3,0xfc,0xff,0xff,0xff,0xfc,0xff,0xff,0xff,0xfc,0xff,0xff,0xff, 0xf0,0xf3,0xf3,0xf3,0xfc,0xff,0xff,0xff,0xfc,0xff,0xff,0xff,0xfc,0xff,0xff,0xff, 0xf0,0xf3,0xf3,0xf3,0xfc,0xff,0xff,0xff,0xfc,0xff,0xff,0xff,0xfc,0xff,0xff,0xff, 0xc0,0xc3,0xc3,0xc3,0xcc,0xcf,0xcf,0xcf,0xcc,0xcf,0xcf,0xcf,0xcc,0xcf,0xcf,0xcf, 0xf0,0xf3,0xf3,0xf3,0xfc,0xff,0xff,0xff,0xfc,0xff,0xff,0xff,0xfc,0xff,0xff,0xff, 0xf0,0xf3,0xf3,0xf3,0xfc,0xff,0xff,0xff,0xfc,0xff,0xff,0xff,0xfc,0xff,0xff,0xff, 0xf0,0xf3,0xf3,0xf3,0xfc,0xff,0xff,0xff,0xfc,0xff,0xff,0xff,0xfc,0xff,0xff,0xff }; int bitblt(int x,int y,object *obj) { unsigned int linediff,bltreg; unsigned char far *scp; int width,height,border; unsigned char retval=0,shift,bltleft; unsigned char *p=obj->sprite; if (obj->height==1 && obj->width==1) return pixel(x,y,(int)p); shift=8-((x&3)<<1); width=(obj->width)>>2; border=width-(80-(x>>2)); if (border>0) width=80-(x>>2); height=(obj->height>y+1 ? y+1 : obj->height); scp=(unsigned char far *)MK_FP(scrseg,scroff+((199-y)>>1)*80+(x>>2)); linediff=interlacediff; if ((y&1)==0) { scp+=linediff; linediff=80-linediff; } do { bltleft=0; for (x=0;x<width;x++) { bltreg=((*p++)<<shift)|(bltleft<<8); retval|=(*scp)&blut[bltreg>>8]; *(scp++)^=(bltreg>>8); bltleft=bltreg; } if (border>=0) p+=border; else if (bltleft!=0) { retval|=(*scp)&blut[bltleft]; (*scp)^=bltleft; } scp+=linediff-width; linediff=80-linediff; height--; } while (height!=0); return retval; } void putimage(int x,int y,unsigned char *p,object *obj) { unsigned int linediff,bltreg; unsigned char far *scp; int width,height,border; unsigned char shift,bltleft,col; if (obj->height==1 && obj->width==1) { putpixel(x,y,(int)p); return; } col=(obj->colour==1 ? 0 : 0xff); shift=8-((x&3)<<1); width=(obj->width)>>2; border=width-(80-(x>>2)); if (border>0) width=80-(x>>2); height=(obj->height>y+1 ? y+1 : obj->height); scp=(unsigned char far *)MK_FP(scrseg,scroff+((199-y)>>1)*80+(x>>2)); linediff=interlacediff; if ((y&1)==0) { scp+=linediff; linediff=80-linediff; } do { bltleft=0; for (x=0;x<width;x++) { bltreg=((*p++)<<shift)|(bltleft<<8); *(scp++)^=(bltreg>>8)^(blut[bltreg>>8]&col); bltleft=bltreg; } if (border>=0) p+=border; else if (bltleft!=0) (*scp)^=bltleft^(blut[bltleft]&col); scp+=linediff-width; linediff=80-linediff; height--; } while (height!=0); } void putpixel(int x,int y,int c) { int shift=(3-(x&3))<<1; unsigned char far *scp=(unsigned char far *)MK_FP(scrseg,scroff+((199-y)>>1)*80+(x>>2)+((y&1)==0 ? interlacediff : 0)); if ((c&0x80)==0) *scp=((*scp)&(~(3<<shift)))|(c<<shift); else *scp^=((c&0x7f)<<shift); } int pixel(int x,int y,int c) { int shift=(3-(x&3))<<1; unsigned char far *scp=(unsigned char far *)MK_FP(scrseg,scroff+((199-y)>>1)*80+(x>>2)+((y&1)==0 ? interlacediff : 0)); unsigned char o=(3<<shift)&(*scp); if ((c&0x80)==0) { *scp^=o; *scp|=(c<<shift); } else *scp^=(c&0x7f)<<shift; return o>>shift; }
While writing dissertation framing a layout can prove to be very help. In a dissertation the writer has to put all his/ her experiences learned through different incidents occured in life on the paper. In a dissertation one has to bring all his logical abilities onto the paper. One has to conclude based on his leanings on the topic through out his life. This becomes tough when you are writing straight from your mind. Thus before proceeding with the dissertation framing of outline will give you clear picture of what the final result is going to like. Plan all the parts in the outline that is going to be included in the dissertation and prevent any future disasters. There are two key points that will help you getting the perfect dissertation: A. Dissertation proposal: A brief background to the proposed study - Review of the Literature - Theoretical Model (if used) - Statement of the Problem Design of the Study - Hypotheses or Questions - Definition of Terms - Population and Sample - Data Collection - Significance of the Study - Limitations of the Study - How are you going to analyse the data, tools that you are going to use and how are going to represent it? - What kinds of operations will you put the data through to result in your findings? Important points you should remember: - The proposal should not be very lengthy, a maximum of 20 pages will work out perfectly. - More emphasis should be given to review of literature and the research design. Lets say half of the proposal should talk about review of literature and another half about research design. - Must go through several sample dissertation before submitting the proposal. B. Outline of the project This outline can be modified as per the university’s requirement of submisson: Chapter I (Introduction) - Background of the study - Problem statement - Purpose of the study - Research questions - Hypothesis or objectives Chapter II (Review of literature) - Review of empirical studies. Chapter III (Research Methodology) - Research design - Sample size - Instruments to be used for computation of data - Data analysis Chapter IV (Data analysis & results) Chapter V (Conclusion) - Final findings of the study - Interpretation of results - Limiations of the study Finally at the end its the refferences and appendices. Its crucial to properly mention all the reffered material and calculation sheets here. Now that you have unlocked the secrets of writing a dissertation. Now start up your work, without even thinking of messing it up.
Thursday, May 16, 2013 On the new series How To Live With Your Parents (For The Rest Of Your Life), I heard Brad Garrett's character say, "Do me a solid", and I didn't know what it meant. Later, that night, I heard Letterman tell that Dennis Rodman had asked Kim Kong Un to "Do me a solid." I said to Les, "If this is a new slang phrase it must be six months old by now and the really cool people have quit using it already!" Les said he'd heard it before and it meant "to do a favor". I looked on the URBAN DICTIONARY (CLICK HERE) and the first known source actually came from Seinfeld in a 1991 episode The Jacket. Obviously, I had heard the phrase before because it was used in the movie Juno which I saw; it must have just "gone over my head" at that time! It was also used in the movies Half Nelson and Derailed, which I did not see. I WON'T be throwing that phrase into any conversation! 1 comment: Anonymous said... I know I've never heard that! ML
Buy My Book Here Fox News Ticker Wednesday, September 2, 2009 The Dirty Little Secret of Costs and Preventative Care A new study on the supposed cost savings of preventative care has put a mack truck hole in the idea that giving everyone access to preventative care will save health care costs. Now, there's no doubt that everyone should support preventative care. Preventative care catches diseases before they start. It's important that everyone go to a primary care physician (something I don't practice) regularly to catch diseases before they start. Here's what's important though. Those that support a major overhaul of the medical system proclaim that up to 50 million people don't have insurance. Those people become a burden on the system when they show up at emergency rooms. Those same people claim that if they received the proper health insurance they wouldn't be a burden on the health care system because they would catch their diseases early. As such, they would save everyone money. Of course, that's just not the truth. We should all want a healthy society. So, everyone should be encouraged to vigorously get preventative care. It is very unhealthy to go without health insurance and not get it. Focusing on preventative medicine will make our society more healthy. All of this is true. What it won't do is lower medical costs. That's especially true if preventative care is given to someone that can't afford. If someone gets a primary care physician their whole entire lives and doesn't pay for that service, that would be a huge financial burden on the system and much larger than if they showed up to the emergency rooms when they got sick. Constantly putting someone through a battery of tests to find a disease that is likely not there is the prudent and healthy thing to do. It does NOT however save the system money, especially when that person isn't paying for the tests. That's because the dirty little secret is that it's much cheaper to have someone die early even from a major disease than to keep them alive and healthy until they grow old. Again, I'm in favor of preventative medicine. Beyond that, I'm in favor of speaking truthfully. So, if the president wants to provide preventative medicine to all because that will keep us all healthy, that's one thing. Yet, he also needs to be honest about the enormous cost to the medical system that this would provide. Claiming that his fixation on preventative medicine is a cost cutting tool is simply not truthful. Rob said... By that argument, the cheapest thing to do is to abort everyone. Abortions cost under $500 ( According to, the first year's cost of a baby is over $5000. I don't think you're advocating universal abortions. (Are you?!) You're also engaging in several logical fallacies. Fallacy #1: The study specifically discusses costs associated with people who have already been diagnosed with Type II diabetes. From that, you've chosen to extrapolate across the entire medical spectrum. Fallacy #2: The study only looks at people who already have Type II diabetes. What is the cost/benefit ratio to helping people avoid contracting Type II diabetes in the first place? Things like weight management, exercise programs, nutrition, etc. Type II diabetes is one of the most avoidable diseases; 80% of people with the disease have a BMI of 25 or higher ( If everyone had a BMI under 25, what would the rate of Type II diabetes be? Fallacy #3: Even assuming that the benefits of preventative care are overstated, that does not mean that universal health care is a bad thing. It just means that some people who want it are ignorant and/or deceitful. mike volpe said... I expected a comment like yours even though I was clear about what I said. Yes, they only had the money to study Type II Diabetes. Now, do you really think that it won't be different with other diseases? I never said that preventative medicine is a bad thing. It's a very good thing, but people are making a universal health care argument because everyone will have preventative care which will lower costs, and that' just not true. Rob said... Yes, I do. If you consider cancer, there are dozens of studies (google for "cost savings cancer early detection") indicating that treating early stage cancer is a significant cost savings over treating late stage cancer. This is in addition to any quality of life improvements and/or mortality statistics. Heart disease also benefits from this. See I'll gladly concede that when someone has Type II diabetes, early treatment is not likely save money over late treatment. The study cited looks solid (though IANAD). However, that study is but one point in the statistical graph. Extrapolating one very specific conclusion to a generality is fraught with danger. mike volpe said... Nobody is arguing that preventative medicine won't improve everyone's life. I don't see any studies that show that preventative medicine will save health care costs. Again, if you say that universal health care is a must because then everyone will get preventative medicine so we can treat diseases early and everyone lives longer, that's one thing. That's not what most are saying. They're saying that it's cheaper than having these folks go to an emergency room. That's totally different, and not true, and the point of my article. Rob said... I specifically said that early detection and treatment of both cancer and heart disease SAVES MONEY. I quote: "treating early stage cancer is a significant cost savings over treating late stage cancer. This is in addition to any quality of life improvements and/or mortality statistics." So, yes, preventative care in those specific fields saves money. Complete coverage that provides early and immediate preventative care for those diseases (including smoking cessation, nutrition, and exercise programs) will save money. Lots of money. And, if you consider that Type II diabetes is, itself, a preventable disease, nearly all the monies cited in the study from your original post would also be saved if everyone exercised and was a healthy weight. Unless, of course, you don't consider smoking cessation, nutrition, and exercise as preventative programs. You cannot take a study that has very specific boundaries and extrapolate that to everything, ignoring all sorts of counter examples. mike volpe said... You said but that doesn't necessarily make it so. I didn't see a study that showed this. Though, frankly it is beside the point. You aren't going to pick and choose only those with heart attacks and cancer and give them preventative medicine. You will give it to all. Most will have nothing. That's another reason why it is so expensive. That's because for most it will come up with nothing. Again, if you say it's important because then everyone will be more healthy, that's one thing. If you say it will cost less that's just not true. Tom said... Hey Rob, Don't bother arguing with Mike. He is always right. Clearly he shot his mouth off in this article and you have the research do prove him wrong. But that wont stop him trying to prove he still has a point Anonymous said... Preventive medicine is a wonderful notion and it might even work. The trouble is that preventive measures have to be applied to all regardless of whether or not you were ever going to get the disease in question. Trying to prevent a disease or condition in someone who was never going to get the disease anyway is a monumental waste of money and resources.It will actuially be more expensive than just treating the disease when it presents.Maybe genetic screening will help fine tune preventive med to avoid this conundrum. Anonymous said... Yes! Finally something about preventative health. Here is my web blog Author's external home page...
/* * Copyright (c) 2013-2015, Xerox Corporation (Xerox) and Palo Alto Research Center, Inc (PARC) * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted 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. * * 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 XEROX OR PARC 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. * * ################################################################################ * # * # PATENT NOTICE * # * # This software is distributed under the BSD 2-clause License (see LICENSE * # file). This BSD License does not make any patent claims and as such, does * # not act as a patent grant. The purpose of this section is for each contributor * # to define their intentions with respect to intellectual property. * # * # Each contributor to this source code is encouraged to state their patent * # claims and licensing mechanisms for any contributions made. At the end of * # this section contributors may each make their own statements. Contributor's * # claims and grants only apply to the pieces (source code, programs, text, * # media, etc) that they have contributed directly to this software. * # * # There is no guarantee that this section is complete, up to date or accurate. It * # is up to the contributors to maintain their portion of this section and up to * # the user of the software to verify any claims herein. * # * # Do not remove this header notification. The contents of this section must be * # present in all distributions of the software. You may only modify your own * # intellectual property statements. Please provide contact information. * * - Palo Alto Research Center, Inc * This software distribution does not grant any rights to patents owned by Palo * Alto Research Center, Inc (PARC). Rights to these patents are available via * various mechanisms. As of January 2016 PARC has committed to FRAND licensing any * intellectual property used by its contributions to this software. You may * contact PARC at cipo@parc.com for more information or visit http://www.ccnx.org */ /** * @file parc_Thread.h * @ingroup threading * @brief <#Brief Description#> * * <#Detailed Description#> * * @author Glenn Scott Computing Science Laboratory, PARC * @copyright (c) 2013-2015, Xerox Corporation (Xerox) and Palo Alto Research Center, Inc (PARC). All rights reserved. */ #ifndef PARCLibrary_parc_Thread #define PARCLibrary_parc_Thread #include <stdbool.h> #include <parc/algol/parc_JSON.h> #include <parc/algol/parc_HashCode.h> struct PARCThread; typedef struct PARCThread PARCThread; /** * Increase the number of references to a `PARCThread` instance. * * Note that new `PARCThread` is not created, * only that the given `PARCThread` reference count is incremented. * Discard the reference by invoking `parcThread_Release`. * * @param [in] instance A pointer to a valid PARCThread instance. * * @return The same value as @p instance. * * Example: * @code * { * PARCThread *a = parcThread_Create(); * * PARCThread *b = parcThread_Acquire(); * * parcThread_Release(&a); * parcThread_Release(&b); * } * @endcode */ PARCThread *parcThread_Acquire(const PARCThread *instance); #ifdef PARCLibrary_DISABLE_VALIDATION # define parcThread_OptionalAssertValid(_instance_) #else # define parcThread_OptionalAssertValid(_instance_) parcThread_AssertValid(_instance_) #endif /** * Assert that the given `PARCThread` instance is valid. * * @param [in] instance A pointer to a valid PARCThread instance. * * Example: * @code * { * PARCThread *a = parcThread_Create(); * * parcThread_AssertValid(a); * * printf("Instance is valid.\n"); * * parcThread_Release(&b); * } * @endcode */ void parcThread_AssertValid(const PARCThread *instance); /** * Create an instance of PARCThread * * @return non-NULL A pointer to a valid PARCThread instance. * @return NULL An error occurred. * * Example: * @code * { * * MyTask *task = myTask_Create(); * PARCThread *thread = parcThread_Create(myTask_Run, myTask); * * parcThread_Start(a); * * parcThread_Release(&a); * } * @endcode */ //#define parcThread_Create(_runFunction_, _argument_) parcThread_CreateImpl((void (*)(PARCObject *)) _runFunction_, (PARCObject *) _argument_) PARCThread *parcThread_Create(void *(*run)(PARCThread *, PARCObject *), PARCObject *restrict argument); /** * Compares @p instance with @p other for order. * * Returns a negative integer, zero, or a positive integer as @p instance * is less than, equal to, or greater than @p other. * * @param [in] instance A pointer to a valid PARCThread instance. * @param [in] other A pointer to a valid PARCThread instance. * * @return <0 Instance is less than @p other. * @return 0 Instance a and instance b compare the same. * @return >0 Instance a is greater than instance b. * * Example: * @code * { * PARCThread *a = parcThread_Create(); * PARCThread *b = parcThread_Create(); * * if (parcThread_Compare(a, b) == 0) { * printf("Instances are equal.\n"); * } * * parcThread_Release(&a); * parcThread_Release(&b); * } * @endcode * * @see parcThread_Equals */ int parcThread_Compare(const PARCThread *instance, const PARCThread *other); /** * Create an independent copy the given `PARCBuffer` * * A new buffer is created as a complete copy of the original. * * @param [in] original A pointer to a valid PARCThread instance. * * @return NULL Memory could not be allocated. * @return non-NULL A pointer to a new `PARCThread` instance. * * Example: * @code * { * PARCThread *a = parcThread_Create(); * * PARCThread *copy = parcThread_Copy(&b); * * parcThread_Release(&b); * parcThread_Release(&copy); * } * @endcode */ PARCThread *parcThread_Copy(const PARCThread *original); /** * Print a human readable representation of the given `PARCThread`. * * @param [in] instance A pointer to a valid PARCThread instance. * @param [in] indentation The indentation level to use for printing. * * Example: * @code * { * PARCThread *a = parcThread_Create(); * * parcThread_Display(a, 0); * * parcThread_Release(&a); * } * @endcode */ void parcThread_Display(const PARCThread *instance, int indentation); /** * Determine if two `PARCThread` instances are equal. * * The following equivalence relations on non-null `PARCThread` instances are maintained: * * * It is reflexive: for any non-null reference value x, `parcThread_Equals(x, x)` must return true. * * * It is symmetric: for any non-null reference values x and y, `parcThread_Equals(x, y)` must return true if and only if * `parcThread_Equals(y x)` returns true. * * * It is transitive: for any non-null reference values x, y, and z, if * `parcThread_Equals(x, y)` returns true and * `parcThread_Equals(y, z)` returns true, * then `parcThread_Equals(x, z)` must return true. * * * It is consistent: for any non-null reference values x and y, multiple invocations of `parcThread_Equals(x, y)` * consistently return true or consistently return false. * * * For any non-null reference value x, `parcThread_Equals(x, NULL)` must return false. * * @param [in] x A pointer to a valid PARCThread instance. * @param [in] y A pointer to a valid PARCThread instance. * * @return true The instances x and y are equal. * * Example: * @code * { * PARCThread *a = parcThread_Create(); * PARCThread *b = parcThread_Create(); * * if (parcThread_Equals(a, b)) { * printf("Instances are equal.\n"); * } * * parcThread_Release(&a); * parcThread_Release(&b); * } * @endcode * @see parcThread_HashCode */ bool parcThread_Equals(const PARCThread *x, const PARCThread *y); /** * Returns a hash code value for the given instance. * * The general contract of `HashCode` is: * * Whenever it is invoked on the same instance more than once during an execution of an application, * the `HashCode` function must consistently return the same value, * provided no information used in a corresponding comparisons on the instance is modified. * * This value need not remain consistent from one execution of an application to another execution of the same application. * If two instances are equal according to the {@link parcThread_Equals} method, * then calling the {@link parcThread_HashCode} method on each of the two instances must produce the same integer result. * * It is not required that if two instances are unequal according to the * {@link parcThread_Equals} function, * then calling the `parcThread_HashCode` * method on each of the two objects must produce distinct integer results. * * @param [in] instance A pointer to a valid PARCThread instance. * * @return The hashcode for the given instance. * * Example: * @code * { * PARCThread *a = parcThread_Create(); * * PARCHashCode hashValue = parcThread_HashCode(buffer); * parcThread_Release(&a); * } * @endcode */ PARCHashCode parcThread_HashCode(const PARCThread *instance); /** * Determine if an instance of `PARCThread` is valid. * * Valid means the internal state of the type is consistent with its required current or future behaviour. * This may include the validation of internal instances of types. * * @param [in] instance A pointer to a valid PARCThread instance. * * @return true The instance is valid. * @return false The instance is not valid. * * Example: * @code * { * PARCThread *a = parcThread_Create(); * * if (parcThread_IsValid(a)) { * printf("Instance is valid.\n"); * } * * parcThread_Release(&a); * } * @endcode * */ bool parcThread_IsValid(const PARCThread *instance); /** * Release a previously acquired reference to the given `PARCThread` instance, * decrementing the reference count for the instance. * * The pointer to the instance is set to NULL as a side-effect of this function. * * If the invocation causes the last reference to the instance to be released, * the instance is deallocated and the instance's implementation will perform * additional cleanup and release other privately held references. * * @param [in,out] instancePtr A pointer to a pointer to the instance to release. * * Example: * @code * { * PARCThread *a = parcThread_Create(); * * parcThread_Release(&a); * } * @endcode */ void parcThread_Release(PARCThread **instancePtr); /** * Create a `PARCJSON` instance (representation) of the given object. * * @param [in] instance A pointer to a valid PARCThread instance. * * @return NULL Memory could not be allocated to contain the `PARCJSON` instance. * @return non-NULL An allocated C string that must be deallocated via parcMemory_Deallocate(). * * Example: * @code * { * PARCThread *a = parcThread_Create(); * * PARCJSON *json = parcThread_ToJSON(a); * * printf("JSON representation: %s\n", parcJSON_ToString(json)); * parcJSON_Release(&json); * * parcThread_Release(&a); * } * @endcode */ PARCJSON *parcThread_ToJSON(const PARCThread *instance); /** * Produce a null-terminated string representation of the specified `PARCThread`. * * The result must be freed by the caller via {@link parcMemory_Deallocate}. * * @param [in] instance A pointer to a valid PARCThread instance. * * @return NULL Cannot allocate memory. * @return non-NULL A pointer to an allocated, null-terminated C string that must be deallocated via {@link parcMemory_Deallocate}. * * Example: * @code * { * PARCThread *a = parcThread_Create(); * * char *string = parcThread_ToString(a); * * parcThread_Release(&a); * * parcMemory_Deallocate(&string); * } * @endcode * * @see parcThread_Display */ char *parcThread_ToString(const PARCThread *instance); /** * Wakes up a single thread that is waiting on this object (see `parcLinkedList_Wait)`. * If any threads are waiting on this object, one of them is chosen to be awakened. * The choice is arbitrary and occurs at the discretion of the underlying implementation. * * The awakened thread will not be able to proceed until the current thread relinquishes the lock on this object. * The awakened thread will compete in the usual manner with any other threads that might be actively * competing to synchronize on this object; * for example, the awakened thread enjoys no reliable privilege or disadvantage in being the next thread to lock this object. * * @param [in] object A pointer to a valid PARCThread instance. * * Example: * @code * { * * parcThread_Notify(object); * } * @endcode */ parcObject_ImplementNotify(parcThread, PARCThread); /** * Causes the calling thread to wait until either another thread invokes the parcHashMap_Notify() function on the same object. * * * @param [in] object A pointer to a valid `PARCThread` instance. * * Example: * @code * { * * parcThread_Wait(object); * } * @endcode */ parcObject_ImplementWait(parcThread, PARCThread); /** * Obtain the lock on the given `PARCThread` instance. * * If the lock is already held by another thread, this function will block. * If the lock is aleady held by the current thread, this function will return `false`. * * Implementors must avoid deadlock by attempting to lock the object a second time within the same calling thread. * * @param [in] object A pointer to a valid `PARCThread` instance. * * @return true The lock was obtained successfully. * @return false The lock is already held by the current thread, or the `PARCThread` is invalid. * * Example: * @code * { * if (parcThread_Lock(object)) { * * } * } * @endcode */ parcObject_ImplementLock(parcThread, PARCThread); /** * Try to obtain the advisory lock on the given PARCThread instance. * * Once the lock is obtained, the caller must release the lock as soon as possible. * * @param [in] object A pointer to a valid PARCThread instance. * * @return true The PARCThread is locked. * @return false The PARCThread is unlocked. * * Example: * @code * { * parcThread_TryLock(object); * } * @endcode */ parcObject_ImplementTryLock(parcThread, PARCThread); /** * Try to unlock the advisory lock on the given `PARCHashMap` instance. * * @param [in] object A pointer to a valid `PARCThread` instance. * * @return true The `PARCThread` was locked and now is unlocked. * @return false The `PARCThread` was not locked and remains unlocked. * * Example: * @code * { * parcThread_Unlock(object); * } * @endcode */ parcObject_ImplementUnlock(parcThread, PARCThread); /** * Determine if the advisory lock on the given `PARCThread` instance is locked. * * @param [in] object A pointer to a valid `PARCThread` instance. * * @return true The `PARCThread` is locked. * @return false The `PARCThread` is unlocked. * Example: * @code * { * if (parcThread_IsLocked(object)) { * ... * } * } * @endcode */ parcObject_ImplementIsLocked(parcThread, PARCThread); /** * <#One Line Description#> * * <#Paragraphs Of Explanation#> * * @param [<#in#> | <#out#> | <#in,out#>] <#name#> <#description#> * * @return <#value#> <#explanation#> * * Example: * @code * { * <#example#> * } * @endcode */ void parcThread_Start(PARCThread *thread); /** * <#One Line Description#> * * <#Paragraphs Of Explanation#> * * @param [<#in#> | <#out#> | <#in,out#>] <#name#> <#description#> * * @return <#value#> <#explanation#> * * Example: * @code * { * <#example#> * } * @endcode */ PARCObject *parcThread_GetParameter(const PARCThread *thread); /** * <#One Line Description#> * * <#Paragraphs Of Explanation#> * * @param [<#in#> | <#out#> | <#in,out#>] <#name#> <#description#> * * @return <#value#> <#explanation#> * * Example: * @code * { * <#example#> * } * @endcode */ bool parcThread_Cancel(PARCThread *thread); /** * <#One Line Description#> * * <#Paragraphs Of Explanation#> * * @param [<#in#> | <#out#> | <#in,out#>] <#name#> <#description#> * * @return <#value#> <#explanation#> * * Example: * @code * { * <#example#> * } * @endcode */ bool parcThread_IsCancelled(const PARCThread *thread); /** * <#One Line Description#> * * <#Paragraphs Of Explanation#> * * @param [<#in#> | <#out#> | <#in,out#>] <#name#> <#description#> * * @return <#value#> <#explanation#> * * Example: * @code * { * <#example#> * } * @endcode */ bool parcThread_IsRunning(const PARCThread *thread); /** * <#One Line Description#> * * <#Paragraphs Of Explanation#> * * @param [<#in#> | <#out#> | <#in,out#>] <#name#> <#description#> * * @return <#value#> <#explanation#> * * Example: * @code * { * <#example#> * } * @endcode */ int parcThread_GetId(const PARCThread *thread); /** * <#One Line Description#> * * <#Paragraphs Of Explanation#> * * @param [<#in#> | <#out#> | <#in,out#>] <#name#> <#description#> * * @return <#value#> <#explanation#> * * Example: * @code * { * <#example#> * } * @endcode */ void parcThread_Join(PARCThread *thread); #endif
/* ---------------------------------------------------------------------------- * GTSAM Copyright 2010, Georgia Tech Research Corporation, * Atlanta, Georgia 30332-0415 * All Rights Reserved * Authors: Frank Dellaert, et al. (see THANKS for the full author list) * See LICENSE for the license information * -------------------------------------------------------------------------- */ /** * @file IterativeSolver.cpp * @brief Some support classes for iterative solvers * @date Sep 3, 2012 * @author Yong-Dian Jian */ #include <gtsam/linear/IterativeSolver.h> #include <gtsam/linear/GaussianFactorGraph.h> #include <gtsam/linear/VectorValues.h> #include <boost/algorithm/string.hpp> #include <iostream> using namespace std; namespace gtsam { /*****************************************************************************/ string IterativeOptimizationParameters::getVerbosity() const { return verbosityTranslator(verbosity_); } /*****************************************************************************/ void IterativeOptimizationParameters::setVerbosity(const string &src) { verbosity_ = verbosityTranslator(src); } /*****************************************************************************/ void IterativeOptimizationParameters::print() const { print(cout); } /*****************************************************************************/ void IterativeOptimizationParameters::print(ostream &os) const { os << "IterativeOptimizationParameters:" << endl << "verbosity: " << verbosityTranslator(verbosity_) << endl; } /*****************************************************************************/ ostream& operator<<(ostream &os, const IterativeOptimizationParameters &p) { p.print(os); return os; } /*****************************************************************************/ IterativeOptimizationParameters::Verbosity IterativeOptimizationParameters::verbosityTranslator( const string &src) { string s = src; boost::algorithm::to_upper(s); if (s == "SILENT") return IterativeOptimizationParameters::SILENT; else if (s == "COMPLEXITY") return IterativeOptimizationParameters::COMPLEXITY; else if (s == "ERROR") return IterativeOptimizationParameters::ERROR; /* default is default */ else return IterativeOptimizationParameters::SILENT; } /*****************************************************************************/ string IterativeOptimizationParameters::verbosityTranslator( IterativeOptimizationParameters::Verbosity verbosity) { if (verbosity == SILENT) return "SILENT"; else if (verbosity == COMPLEXITY) return "COMPLEXITY"; else if (verbosity == ERROR) return "ERROR"; else return "UNKNOWN"; } /*****************************************************************************/ VectorValues IterativeSolver::optimize(const GaussianFactorGraph &gfg, boost::optional<const KeyInfo&> keyInfo, boost::optional<const std::map<Key, Vector>&> lambda) { return optimize(gfg, keyInfo ? *keyInfo : KeyInfo(gfg), lambda ? *lambda : std::map<Key, Vector>()); } /*****************************************************************************/ VectorValues IterativeSolver::optimize(const GaussianFactorGraph &gfg, const KeyInfo &keyInfo, const std::map<Key, Vector> &lambda) { return optimize(gfg, keyInfo, lambda, keyInfo.x0()); } /****************************************************************************/ KeyInfo::KeyInfo(const GaussianFactorGraph &fg, const Ordering &ordering) : ordering_(ordering) { initialize(fg); } /****************************************************************************/ KeyInfo::KeyInfo(const GaussianFactorGraph &fg) : ordering_(Ordering::Natural(fg)) { initialize(fg); } /****************************************************************************/ void KeyInfo::initialize(const GaussianFactorGraph &fg) { const map<Key, size_t> colspec = fg.getKeyDimMap(); const size_t n = ordering_.size(); size_t start = 0; for (size_t i = 0; i < n; ++i) { const Key key = ordering_[i]; const auto it_key = colspec.find(key); if (it_key==colspec.end()) throw std::runtime_error("KeyInfo: Inconsistency in key-dim map"); const size_t dim = it_key->second; this->emplace(key, KeyInfoEntry(i, dim, start)); start += dim; } numCols_ = start; } /****************************************************************************/ vector<size_t> KeyInfo::colSpec() const { std::vector<size_t> result(size(), 0); for ( const auto &item: *this ) { result[item.second.index] = item.second.dim; } return result; } /****************************************************************************/ VectorValues KeyInfo::x0() const { VectorValues result; for ( const auto &item: *this ) { result.emplace(item.first, Vector::Zero(item.second.dim)); } return result; } /****************************************************************************/ Vector KeyInfo::x0vector() const { return Vector::Zero(numCols_); } }
#pragma once #ifndef __DEM_L2_PHYSICS_SPHERE_SHAPE_H__ //!!!to L1! #define __DEM_L2_PHYSICS_SPHERE_SHAPE_H__ #include "Shape.h" // Spherical collision shape namespace Physics { class CSphereShape: public CShape { DeclareRTTI; DeclareFactory(CSphereShape); private: float Radius; public: CSphereShape(): CShape(Sphere), Radius(1.0f) {} virtual ~CSphereShape() {} virtual void Init(Data::PParams Desc); virtual bool Attach(dSpaceID SpaceID); virtual void RenderDebug(const matrix44& ParentTfm); void SetRadius(float R) { n_assert(!IsAttached()); Radius = R; } float GetRadius() const { return Radius; } }; RegisterFactory(CSphereShape); } #endif
Caspian countries come together to discuss protection of the Caspian Sea, Turkmenbashy, Turkmenistan Malheureusement, il n'y a pas de version française de ce document. On 5 and 6 November 2012, the Caspian Ecological Forum, hosted by Tukmenistan’s Ministry of Nature Protection, was held along the shores of the Caspian Sea in the Avaza national tourist zone, not far from the Turmenbashy Bay Ramsar Site. |Turmenbashy Bay Ramsar Site (© Ramsar Secretariat)| Turkmenistan acceded to the Ramsar Convention in 2009 and designated 267,124 ha of the Hazar Nature Reserve as a wetland of International Importance under the name ‘Turkmenbashy Bay Ramsar Site’. Turkmenistan now has a Ramsar Working Group made up of experts and representatives of the Ministry of Nature Protection. The event provided a platform for constructive dialogue and cooperation for the wise use of the resource-rich Caspian Sea. The forum was attended by representatives of environmental and fisheries agencies and academics of the Caspian countries, with delegations from Azerbaijan, Iran, Kazakhstan, Russia and Turkmenistan. Representatives of the United Nations Environment Programme (UNEP), United Nations Development Programme (UNDP), United Nations Convention on Combating Desertification (UNCCD), as well as oil and gas companies operating in the Caspian shelf also participated in the forum. The Caspian Sea is the world's largest landlocked water body; with its particular climatic and salinity gradients and its isolation, it is home to about 400 endemic species, including the world's largest herd of sturgeon (90 percent of the world reserves) and the endangered Caspian Seal Pusa caspica. Following the early days of the Caspian Environment Programme in 1995, The Framework Convention for the Protection of the Marine Environment of the Caspian Sea (Tehran Convention) was ratified by the Caspian littoral states in 2006. It is the first legally binding regional agreement ratified by all five Caspian states, and defines the general requirements and institutional mechanism for the protection of the marine environment of the Caspian Sea. Four protocols to the Convention have currently been developed by the countries, they focus on biodiversity conservation; land-based sources of pollution; preparedness, response and cooperation in combating oil pollution incidents; and environmental impact assessment in a transboundary context. The Ramsar Secretariat would like to thank Turkmenistan for the invitation and generous hospitality, and for its dedication to ecological conservation, and expresses its readiness to assist and support all Caspian states for the wise use and protection of the Caspian Sea. Report by Nessrine Alzahlawi, Assistant Advisor for Asia-Oceania
The Oracle is an object used to create Nobodys. The person who holds the Oracle can chose who to make a Nobody of. This copy can be either male or female, despite the original's gender. Nameing NobodysEdit When a Nobody is made, the creater possesses the power to name the Nobody. The nameing scheme of a Nobody is the simple rearrangeing of the letters in the original's name. Ad blocker interference detected!
|Product #: SDLSE91180002K_TQ| SMART Board E-Lessons for Grammar and Usage: Direct and Indirect Objects eBookGrade 9|Grade 10|Grade 11|Grade 12 Please Note: This ebook is a digital download, NOT a physical product. After purchase, you will be provided a one time link to download ebooks to your computer. Orders paid by PayPal require up to 8 business hours to verify payment and release electronic media. For immediate downloads, payment with credit card is required. Easy-to-use interactive whiteboard lessons for differentiated instruction in Language Arts. Lesson activities are powered by SMART Notebook collaborative learning software. Two levels are offered for differentiated instruction, middle school grades (4 to 8) and high school grades (9 to 12). Each grade covers the same basic topics, with the high school level being a little more advanced. Each screen provides answers to check the students work. Each lesson has 14 screens of instructions and activities. Lessons for the interactive whiteboard are aligned to the Common Core State Standards (CCSS). Submit a review
/* $Id: ClpSimplexOther.hpp 2070 2014-11-18 11:12:54Z forrest $ */ // Copyright (C) 2004, International Business Machines // Corporation and others. All Rights Reserved. // This code is licensed under the terms of the Eclipse Public License (EPL). /* Authors John Forrest */ #ifndef ClpSimplexOther_H #define ClpSimplexOther_H #include "ClpSimplex.hpp" /** This is for Simplex stuff which is neither dual nor primal It inherits from ClpSimplex. It has no data of its own and is never created - only cast from a ClpSimplex object at algorithm time. */ class ClpSimplexOther : public ClpSimplex { public: /**@name Methods */ //@{ /** Dual ranging. This computes increase/decrease in cost for each given variable and corresponding sequence numbers which would change basis. Sequence numbers are 0..numberColumns and numberColumns.. for artificials/slacks. For non-basic variables the information is trivial to compute and the change in cost is just minus the reduced cost and the sequence number will be that of the non-basic variables. For basic variables a ratio test is between the reduced costs for non-basic variables and the row of the tableau corresponding to the basic variable. The increase/decrease value is always >= 0.0 Up to user to provide correct length arrays where each array is of length numberCheck. which contains list of variables for which information is desired. All other arrays will be filled in by function. If fifth entry in which is variable 7 then fifth entry in output arrays will be information for variable 7. If valueIncrease/Decrease not NULL (both must be NULL or both non NULL) then these are filled with the value of variable if such a change in cost were made (the existing bounds are ignored) When here - guaranteed optimal */ void dualRanging(int numberCheck, const int * which, double * costIncrease, int * sequenceIncrease, double * costDecrease, int * sequenceDecrease, double * valueIncrease = NULL, double * valueDecrease = NULL); /** Primal ranging. This computes increase/decrease in value for each given variable and corresponding sequence numbers which would change basis. Sequence numbers are 0..numberColumns and numberColumns.. for artificials/slacks. This should only be used for non-basic variabls as otherwise information is pretty useless For basic variables the sequence number will be that of the basic variables. Up to user to provide correct length arrays where each array is of length numberCheck. which contains list of variables for which information is desired. All other arrays will be filled in by function. If fifth entry in which is variable 7 then fifth entry in output arrays will be information for variable 7. When here - guaranteed optimal */ void primalRanging(int numberCheck, const int * which, double * valueIncrease, int * sequenceIncrease, double * valueDecrease, int * sequenceDecrease); /** Parametrics This is an initial slow version. The code uses current bounds + theta * change (if change array not NULL) and similarly for objective. It starts at startingTheta and returns ending theta in endingTheta. If reportIncrement 0.0 it will report on any movement If reportIncrement >0.0 it will report at startingTheta+k*reportIncrement. If it can not reach input endingTheta return code will be 1 for infeasible, 2 for unbounded, if error on ranges -1, otherwise 0. Normal report is just theta and objective but if event handler exists it may do more On exit endingTheta is maximum reached (can be used for next startingTheta) */ int parametrics(double startingTheta, double & endingTheta, double reportIncrement, const double * changeLowerBound, const double * changeUpperBound, const double * changeLowerRhs, const double * changeUpperRhs, const double * changeObjective); /** Version of parametrics which reads from file See CbcClpParam.cpp for details of format Returns -2 if unable to open file */ int parametrics(const char * dataFile); /** Parametrics This is an initial slow version. The code uses current bounds + theta * change (if change array not NULL) It starts at startingTheta and returns ending theta in endingTheta. If it can not reach input endingTheta return code will be 1 for infeasible, 2 for unbounded, if error on ranges -1, otherwise 0. Event handler may do more On exit endingTheta is maximum reached (can be used for next startingTheta) */ int parametrics(double startingTheta, double & endingTheta, const double * changeLowerBound, const double * changeUpperBound, const double * changeLowerRhs, const double * changeUpperRhs); int parametricsObj(double startingTheta, double & endingTheta, const double * changeObjective); /// Finds best possible pivot double bestPivot(bool justColumns=false); typedef struct { double startingTheta; double endingTheta; double maxTheta; double acceptableMaxTheta; // if this far then within tolerances double * lowerChange; // full array of lower bound changes int * lowerList; // list of lower bound changes double * upperChange; // full array of upper bound changes int * upperList; // list of upper bound changes char * markDone; // mark which ones looked at int * backwardBasic; // from sequence to pivot row int * lowerActive; double * lowerGap; double * lowerCoefficient; int * upperActive; double * upperGap; double * upperCoefficient; int unscaledChangesOffset; bool firstIteration; // so can update rhs for accuracy } parametricsData; private: /** Parametrics - inner loop This first attempt is when reportIncrement non zero and may not report endingTheta correctly If it can not reach input endingTheta return code will be 1 for infeasible, 2 for unbounded, otherwise 0. Normal report is just theta and objective but if event handler exists it may do more */ int parametricsLoop(parametricsData & paramData, double reportIncrement, const double * changeLower, const double * changeUpper, const double * changeObjective, ClpDataSave & data, bool canTryQuick); int parametricsLoop(parametricsData & paramData, ClpDataSave & data,bool canSkipFactorization=false); int parametricsObjLoop(parametricsData & paramData, ClpDataSave & data,bool canSkipFactorization=false); /** Refactorizes if necessary Checks if finished. Updates status. type - 0 initial so set up save arrays etc - 1 normal -if good update save - 2 restoring from saved */ void statusOfProblemInParametrics(int type, ClpDataSave & saveData); void statusOfProblemInParametricsObj(int type, ClpDataSave & saveData); /** This has the flow between re-factorizations Reasons to come out: -1 iterations etc -2 inaccuracy -3 slight inaccuracy (and done iterations) +0 looks optimal (might be unbounded - but we will investigate) +1 looks infeasible +3 max iterations */ int whileIterating(parametricsData & paramData, double reportIncrement, const double * changeObjective); /** Computes next theta and says if objective or bounds (0= bounds, 1 objective, -1 none). theta is in theta_. type 1 bounds, 2 objective, 3 both. */ int nextTheta(int type, double maxTheta, parametricsData & paramData, const double * changeObjective); int whileIteratingObj(parametricsData & paramData); int nextThetaObj(double maxTheta, parametricsData & paramData); /// Restores bound to original bound void originalBound(int iSequence, double theta, const double * changeLower, const double * changeUpper); /// Compute new rowLower_ etc (return negative if infeasible - otherwise largest change) double computeRhsEtc(parametricsData & paramData); /// Redo lower_ from rowLower_ etc void redoInternalArrays(); /** Row array has row part of pivot row Column array has column part. This is used in dual ranging */ void checkDualRatios(CoinIndexedVector * rowArray, CoinIndexedVector * columnArray, double & costIncrease, int & sequenceIncrease, double & alphaIncrease, double & costDecrease, int & sequenceDecrease, double & alphaDecrease); /** Row array has pivot column This is used in primal ranging */ void checkPrimalRatios(CoinIndexedVector * rowArray, int direction); /// Returns new value of whichOther when whichIn enters basis double primalRanging1(int whichIn, int whichOther); public: /** Write the basis in MPS format to the specified file. If writeValues true writes values of structurals (and adds VALUES to end of NAME card) Row and column names may be null. formatType is <ul> <li> 0 - normal <li> 1 - extra accuracy <li> 2 - IEEE hex (later) </ul> Returns non-zero on I/O error */ int writeBasis(const char *filename, bool writeValues = false, int formatType = 0) const; /// Read a basis from the given filename int readBasis(const char *filename); /** Creates dual of a problem if looks plausible (defaults will always create model) fractionRowRanges is fraction of rows allowed to have ranges fractionColumnRanges is fraction of columns allowed to have ranges */ ClpSimplex * dualOfModel(double fractionRowRanges = 1.0, double fractionColumnRanges = 1.0) const; /** Restores solution from dualized problem non-zero return code indicates minor problems */ int restoreFromDual(const ClpSimplex * dualProblem, bool checkAccuracy=false); /** Sets solution in dualized problem non-zero return code indicates minor problems */ int setInDual(ClpSimplex * dualProblem); /** Does very cursory presolve. rhs is numberRows, whichRows is 3*numberRows and whichColumns is 2*numberColumns. */ ClpSimplex * crunch(double * rhs, int * whichRows, int * whichColumns, int & nBound, bool moreBounds = false, bool tightenBounds = false); /** After very cursory presolve. rhs is numberRows, whichRows is 3*numberRows and whichColumns is 2*numberColumns. */ void afterCrunch(const ClpSimplex & small, const int * whichRows, const int * whichColumns, int nBound); /** Returns gub version of model or NULL whichRows has to be numberRows whichColumns has to be numberRows+numberColumns */ ClpSimplex * gubVersion(int * whichRows, int * whichColumns, int neededGub, int factorizationFrequency=50); /// Sets basis from original void setGubBasis(ClpSimplex &original,const int * whichRows, const int * whichColumns); /// Restores basis to original void getGubBasis(ClpSimplex &original,const int * whichRows, const int * whichColumns) const; /// Quick try at cleaning up duals if postsolve gets wrong void cleanupAfterPostsolve(); /** Tightens integer bounds - returns number tightened or -1 if infeasible */ int tightenIntegerBounds(double * rhsSpace); /** Expands out all possible combinations for a knapsack If buildObj NULL then just computes space needed - returns number elements On entry numberOutput is maximum allowed, on exit it is number needed or -1 (as will be number elements) if maximum exceeded. numberOutput will have at least space to return values which reconstruct input. Rows returned will be original rows but no entries will be returned for any rows all of whose entries are in knapsack. So up to user to allow for this. If reConstruct >=0 then returns number of entrie which make up item "reConstruct" in expanded knapsack. Values in buildRow and buildElement; */ int expandKnapsack(int knapsackRow, int & numberOutput, double * buildObj, CoinBigIndex * buildStart, int * buildRow, double * buildElement, int reConstruct = -1) const; //@} }; #endif
#include "GameState.h" #include "StartState.h" void GameState::Clicked() { if (gameBoard->Over()) game->ChangeState(new StartState(renderer, game)); gameBoard->Clicked(); } void GameState::Update() { gameBoard->Update(); } void GameState::Render() { gameBoard->Render(); }
/* Copyright (c) 2021 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ #include <algorithm> #include <vector> #include "gtest/gtest.h" #include "paddle/fluid/framework/generator.h" #include "paddle/pten/tests/core/allocator.h" #include "paddle/pten/tests/core/random.h" #include "paddle/pten/tests/core/timer.h" namespace pten { namespace tests { template <typename T> bool host_allocator_test(size_t vector_size) { std::vector<T> src(vector_size); std::generate(src.begin(), src.end(), make_generator(src)); std::vector<T, CustomAllocator<T>> dst( src.begin(), src.end(), CustomAllocator<T>(std::make_shared<HostAllocatorSample>())); return std::equal(src.begin(), src.end(), dst.begin()); } TEST(raw_allocator, host) { CHECK(host_allocator_test<float>(1000)); CHECK(host_allocator_test<int32_t>(1000)); CHECK(host_allocator_test<int64_t>(1000)); } class StorageRawAlloc { public: StorageRawAlloc(const std::shared_ptr<RawAllocator>& a, size_t size) : alloc_(a) { data_ = alloc_->Allocate(size); } ~StorageRawAlloc() { alloc_->Deallocate(data_, size); } private: void* data_; size_t size; std::shared_ptr<RawAllocator> alloc_; }; class StorageFancyAlloc { public: StorageFancyAlloc(const std::shared_ptr<Allocator>& a, size_t size) : alloc_(a), allocation_(a->Allocate(size)) {} private: std::shared_ptr<Allocator> alloc_; Allocation allocation_; }; TEST(benchmark, allocator) { std::shared_ptr<RawAllocator> raw_allocator(new HostAllocatorSample); std::shared_ptr<Allocator> fancy_allocator(new FancyAllocator); const size_t cycles = 100; Timer timer; double t1{}, t2{}; for (size_t i = 0; i < cycles; ++i) { timer.tic(); for (size_t i = 0; i < cycles; ++i) { StorageRawAlloc(raw_allocator, i * 100); } t1 += timer.toc(); timer.tic(); for (size_t i = 0; i < cycles; ++i) { StorageFancyAlloc(fancy_allocator, i * 100); } t2 += timer.toc(); } std::cout << "The cost of raw alloc is " << t1 << "ms.\n"; std::cout << "The cost of fancy alloc with place is " << t2 << "ms.\n"; } } // namespace tests } // namespace pten
Bulletin of the World Health Organization versión impresa ISSN 0042-9686 LANSANG, Mary Ann y DENNIS, Rodolfo. Building capacity in health research in the developing world. Bull World Health Organ [online]. 2004, vol.82, n.10, pp. 764-770. ISSN 0042-9686. http://dx.doi.org/10.1590/S0042-96862004001000012. Strong national health research systems are needed to improve health systems and attain better health. For developing countries to indigenize health research systems, it is essential to build research capacity. We review the positive features and weaknesses of various approaches to capacity building, emphasizing that complementary approaches to human resource development work best in the context of a systems and long-term perspective. As a key element of capacity building, countries must also address issues related to the enabling environment, in particular: leadership, career structure, critical mass, infrastructure, information access and interfaces between research producers and users. The success of efforts to build capacity in developing countries will ultimately depend on political will and credibility, adequate financing, and a responsive capacity-building plan that is based on a thorough situational analysis of the resources needed for health research and the inequities and gaps in health care. Greater national and international investment in capacity building in developing countries has the greatest potential for securing dynamic and agile knowledge systems that can deliver better health and equity, now and in the future. Palabras llave : Health services research [organization and administration]; Education, Graduate; Staff development; Investments; Access to information; Social justice; Academies and institutes; Interinstitutional relations; Developing countries; Developed countries.
Nov. 27, 2009 Physicists from the Japanese-led multi-national T2K neutrino collaboration have just announced that over the weekend they detected the first neutrino events generated by their newly built neutrino beam at the J-PARC (Japan Proton Accelerator Research Complex) accelerator laboratory in Tokai, Japan. Protons from the 30-GeV Main Ring synchrotron were directed onto a carbon target, where their collisions produced charged particles called pions. These pions travelled through a helium-filled volume where they decayed to produce a beam of the elusive particles called neutrinos. These neutrinos then flew 200 metres through the earth to a sophisticated detector system capable of making detailed measurements of their energy, direction, and type. The data from the complex detector system is still being analysed, but the physicists have seen at least 3 neutrino events, in line with the expectation based on the current beam and detector performance. This detection therefore marks the beginning of the operational phase of the T2K experiment, a 474-physicist, 13-nation collaboration to measure new properties of the ghostly neutrino. Neutrinos interact only weakly with matter, and thus pass effortlessly through the earth (and mostly through the detectors!). Neutrinos exist in three types, called electron, muon, and tau; linked by particle interactions to their more familiar charged cousins like the electron. Measurements over the last few decades, notably by the Super Kamiokande and KamLAND neutrino experiments in western Japan, have shown that neutrinos possess the strange property of neutrino oscillations, whereby one type of neutrino will turn into another as they propagate through space. Neutrino oscillations, which require neutrinos to have mass and therefore were not allowed in our previous theoretical understanding of particle physics, probe new physical laws and are thus of great interest in the study of the fundamental constituents of matter. They may even be related to the mystery of why there is more matter than anti-matter in the universe, and thus are the focus of intense study worldwide. Precision measurements of neutrino oscillations can be made using artificial neutrino beams, as pioneered by the K2K neutrino experiment where neutrinos from the KEK laboratory were detected using the vast Super Kamiokande neutrino detector near Toyama. T2K is a more powerful and sophisticated version of the K2K experiment, with a more intense neutrino beam derived from the newly-built Main Ring synchrotron at the J-PARC accelerator laboratory. The beam was built by physicists from KEK in cooperation with other Japanese institutions and with assistance from the US, Canadian, UK and French T2K institutes. Prof. Chang Kee Jung of Stony Brook University, Stony Brook, New York, leader of the US T2K project, said "I am somewhat stunned by this seemingly effortless achievement considering the complexity of the machinery, the operation and international nature of the project. This is a result of a strong support from the Japanese government for basic science, which I hope will continue, and hard work and ingenuity of all involved. I am excited about more ground breaking findings from this experiment in the near future." The beam is aimed once again at Super-Kamiokande, which has been upgraded for this experiment with new electronics and software. Before the neutrinos leave the J-PARC facility their properties are determined by a sophisticated "near" detector, partly based on a huge magnet donated from CERN where it had earlier been used for neutrino experiments (and for the UA1 experiment, which won the Nobel Prize for the discovery of the W and Z bosons which are the basis of neutrino interactions), and it is this detector which caught the first events. The first neutrino events were detected in a specialize detector, called the INGRID, whose purpose is to determine the neutrino beam's direction and profile. Further tests of the T2K neutrino beam are scheduled for December, and the experiment plans to begin production running in mid-January. Another major milestone should be observed soon after -- the first observation of a neutrino event from the T2K beam in the Super-Kamiokande experiment. Running will continue until the summer, by which time the experiment hopes to have made the most sensitive search yet achieved for a so-far unobserved critical neutrino oscillation mode dominated by oscillations between all three types of neutrinos. In the coming years this search will be improved even further, with the hope that the 3-mode oscillation will be observed, allowing measurements to begin comparing the oscillations of neutrinos and anti-neutrinos, probing the physics of matter/ anti-matter asymmetry in the neutrino sector. Other social bookmarking and sharing tools: Note: If no author is given, the source is cited instead.
#include <gtest/gtest.h> #include <cacos/util/split.h> TEST(split, simple) { std::vector<std::string_view> v1 = cacos::util::split("qwe:qwe::qwe:", ":"); std::vector<std::string_view> v2 {"qwe", "qwe", "", "qwe", ""}; EXPECT_EQ(v1, v2); } TEST(split, delimiters) { static const std::string s = "Hello, world! .., what. ,q we qwe ,, qwqwe qwe 123qwaq 12k,12.123 213, 123123.1!? "; std::vector<std::string_view> v1 = cacos::util::split(s, " ,.??"); std::vector<std::string_view> v2 { "Hello", "", "world!", "", "", "", "", "what", "", "", "q", "we", "qwe", "", "", "", "", "qwqwe", "qwe", "123qwaq", "12k", "12", "123", "", "213", "", "123123", "1!", "", "" }; EXPECT_EQ(v1, v2); } TEST(split, empty) { std::vector<std::string_view> v1 = cacos::util::split("", ":,"); std::vector<std::string_view> v2 {""}; EXPECT_EQ(v1, v2); } TEST(split, no_delimiters) { std::vector<std::string_view> v1 = cacos::util::split("Hello, world!", "$"); std::vector<std::string_view> v2 {"Hello, world!"}; EXPECT_EQ(v1, v2); } TEST(split, only_delimiters) { std::vector<std::string_view> v1 = cacos::util::split("$$$!$", "$!"); std::vector<std::string_view> v2 {"", "", "", "", "", ""}; EXPECT_EQ(v1, v2); }
June 22, 2010 Millions of years before humans began battling it out over beachfront property, a similar phenomenon was unfolding in a diverse group of island lizards. Often mistaken for chameleons or geckos, Anolis lizards fight fiercely for resources, responding to rivals by doing push-ups and puffing out their throat pouches. But anoles also compete in ways that shape their bodies over evolutionary time, says a new study in the journal Evolution. Anolis lizards colonized the Caribbean from South America some 40 million years ago and quickly evolved a wide range of shapes and sizes. "When anoles first arrived in the islands there were no other lizards quite like them, so there was abundant opportunity to diversify," said author Luke Mahler of Harvard University. Free from rivals in their new island homes, Anolis lizards evolved differences in leg length, body size, and other characteristics as they adapted to different habitats. Today, the islands of Cuba, Hispaniola, Jamaica and Puerto Rico -- collectively known as the Greater Antilles -- are home to more than 100 Anolis species, ranging from lanky lizards that perch in bushes, to stocky, long-legged lizards that live on tree trunks, to foot-long 'giants' that roam the upper branches of trees. "Each body type is specialized for using different parts of a tree or bush," said Mahler. Alongside researchers from the University of Rochester, Harvard University, and the National Evolutionary Synthesis Center, Mahler wanted to understand how and when this wide range of shapes and sizes came to be. To do that, the team used DNA and body measurements from species living today to reconstruct how they evolved in the past. In addition to measuring the head, limbs, and tail of over a thousand museum specimens representing nearly every Anolis species in the Greater Antilles -- including several Cuban species that were previously inaccessible to North American scientists -- they also used the Anolis family tree to infer what species lived on which islands, and when. By doing so, they discovered that the widest variety of anole shapes and sizes arose among the evolutionary early-birds. Then as the number of anole species on each island increased, the range of new body types began to fizzle. Late-comers in lizard evolution underwent finer and finer tinkering as time went on. As species proliferated on each island, their descendants were forced to partition the remaining real estate in increasingly subtle ways, said co-author Liam Revell of the National Evolutionary Synthesis Center in Durham, NC. "Over time there were fewer distinct niches available on each island," said Revell. "Ancient evolutionary changes in body proportions were large, but more recent evolutionary changes have been more subtle." The researchers saw the same trend on each island. "The islands are like Petri dishes where species diversification unfolded in similar ways," said Mahler. "The more species there were, the more they put the brakes on body evolution." The study sheds new light on how biodiversity comes to be. "We're not just looking at species number, we're also looking at how the shape of life changes over time," said Mahler. The team's findings are published in the journal Evolution. Richard Glor of the University of Rochester and Jonathan Losos of Harvard University were also authors on this study. Other social bookmarking and sharing tools: - D. Luke Mahler, Liam J. Revell, Richard E. Glor, Jonathan B. Losos. Ecological opportunity and the rate of morphological evolution in the diversification of Greater Antillean anoles. Evolution, 2010; DOI: 10.1111/j.1558-5646.2010.01026.x Note: If no author is given, the source is cited instead.
/* * Copyright (C) 2021 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #ifndef OHOS_IPC_SERVICES_DBINDER_DBINDER_SERVICE_H #define OHOS_IPC_SERVICES_DBINDER_DBINDER_SERVICE_H #include <string> #include <map> #include <mutex> #include <shared_mutex> #include <memory> #include <list> #include <thread> #include "ipc_object_proxy.h" #include "ipc_object_stub.h" #include "dbinder_service_stub.h" namespace OHOS { class DBinderRemoteListener; constexpr int DEVICEID_LENGTH = 64; constexpr int SERVICENAME_LENGTH = 200; constexpr int VERSION_NUM = 1; constexpr int ENCRYPT_HEAD_LEN = 28; constexpr int ENCRYPT_LENGTH = 4; struct DeviceIdInfo { uint16_t afType; uint16_t reserved; char fromDeviceId[DEVICEID_LENGTH + 1]; char toDeviceId[DEVICEID_LENGTH + 1]; }; struct DHandleEntryHead { uint32_t len; uint32_t version; }; struct DHandleEntryTxRx { struct DHandleEntryHead head; uint32_t transType; uint32_t dBinderCode; uint16_t fromPort; uint16_t toPort; uint64_t stubIndex; uint32_t seqNumber; binder_uintptr_t binderObject; struct DeviceIdInfo deviceIdInfo; binder_uintptr_t stub; uint16_t serviceNameLength; char serviceName[SERVICENAME_LENGTH + 1]; uint32_t pid; uint32_t uid; }; struct SessionInfo { uint32_t type; uint16_t toPort; uint16_t fromPort; uint64_t stubIndex; uint32_t socketFd; std::string serviceName; struct DeviceIdInfo deviceIdInfo; }; enum DBinderCode { MESSAGE_AS_INVOKER = 1, MESSAGE_AS_REPLY = 2, MESSAGE_AS_OBITUARY = 3, }; enum AfType { IPV4_TYPE = 1, IPV6_TYPE = 2, DATABBUS_TYPE = 3, }; struct ThreadLockInfo { std::mutex mutex; std::condition_variable condition; bool ready = false; }; class DBinderService : public virtual RefBase { public: DBinderService(); virtual ~DBinderService(); public: static sptr<DBinderService> GetInstance(); bool StartDBinderService(); sptr<DBinderServiceStub> MakeRemoteBinder(const std::u16string &serviceName, const std::string &deviceID, binder_uintptr_t binderObject, uint64_t pid = 0); bool RegisterRemoteProxy(std::u16string serviceName, sptr<IRemoteObject> binderObject); bool RegisterRemoteProxy(std::u16string serviceName, int32_t systemAbilityId); bool OnRemoteMessageTask(const struct DHandleEntryTxRx *message); std::shared_ptr<struct SessionInfo> QuerySessionObject(binder_uintptr_t stub); bool DetachDeathRecipient(sptr<IRemoteObject> object); bool AttachDeathRecipient(sptr<IRemoteObject> object, sptr<IRemoteObject::DeathRecipient> deathRecipient); sptr<IRemoteObject::DeathRecipient> QueryDeathRecipient(sptr<IRemoteObject> object); bool DetachCallbackProxy(sptr<IRemoteObject> object); bool AttachCallbackProxy(sptr<IRemoteObject> object, DBinderServiceStub *dbStub); int32_t NoticeServiceDie(const std::u16string &serviceName, const std::string &deviceID); int32_t NoticeDeviceDie(const std::string &deviceID); bool DetachBusNameObject(IPCObjectProxy *proxy); std::string CreateDatabusName(int uid, int pid); bool DetachProxyObject(binder_uintptr_t binderObject); private: static std::shared_ptr<DBinderRemoteListener> GetRemoteListener(); static bool StartRemoteListener(); static void StopRemoteListener(); static std::string ConvertToSecureDeviceID(const std::string &deviceID); std::u16string GetRegisterService(binder_uintptr_t binderObject); bool InvokerRemoteDBinder(const sptr<DBinderServiceStub> stub, uint32_t seqNumber); bool OnRemoteReplyMessage(const struct DHandleEntryTxRx *replyMessage); void MakeSessionByReplyMessage(const struct DHandleEntryTxRx *replyMessage); bool OnRemoteInvokerMessage(const struct DHandleEntryTxRx *message); void WakeupThreadByStub(uint32_t seqNumber); void DetachThreadLockInfo(uint32_t seqNumber); bool AttachThreadLockInfo(uint32_t seqNumber, std::shared_ptr<struct ThreadLockInfo> object); std::shared_ptr<struct ThreadLockInfo> QueryThreadLockInfo(uint32_t seqNumber); bool AttachProxyObject(sptr<IRemoteObject> object, binder_uintptr_t binderObject); sptr<IRemoteObject> QueryProxyObject(binder_uintptr_t binderObject); bool DetachSessionObject(binder_uintptr_t stub); bool AttachSessionObject(std::shared_ptr<struct SessionInfo> object, binder_uintptr_t stub); sptr<IRemoteObject> FindOrNewProxy(binder_uintptr_t binderObject, int32_t systemAbilityId); bool SendEntryToRemote(const sptr<DBinderServiceStub> stub, uint32_t seqNumber); uint16_t AllocFreeSocketPort(); std::string GetLocalDeviceID(); bool CheckBinderObject(const sptr<DBinderServiceStub> &stub, binder_uintptr_t binderObject); bool HasDBinderStub(binder_uintptr_t binderObject); bool IsSameStubObject(const sptr<DBinderServiceStub> &stub, const std::u16string &service, const std::string &device); sptr<DBinderServiceStub> FindDBinderStub(const std::u16string &service, const std::string &device); bool DeleteDBinderStub(const std::u16string &service, const std::string &device); sptr<DBinderServiceStub> FindOrNewDBinderStub(const std::u16string &service, const std::string &device, binder_uintptr_t binderObject); void ProcessCallbackProxy(sptr<DBinderServiceStub> dbStub); bool NoticeCallbackProxy(sptr<DBinderServiceStub> dbStub); std::list<std::u16string> FindServicesByDeviceID(const std::string &deviceID); int32_t NoticeServiceDieInner(const std::u16string &serviceName, const std::string &deviceID); uint32_t GetRemoteTransType(); bool OnRemoteInvokerDataBusMessage(IPCObjectProxy *proxy, struct DHandleEntryTxRx *replyMessage, std::string &remoteDeviceId, int pid, int uid); bool IsDeviceIdIllegal(const std::string &deviceID); bool AttachBusNameObject(IPCObjectProxy *proxy, const std::string &name); std::string QueryBusNameObject(IPCObjectProxy *proxy); std::string GetDatabusNameByProxy(IPCObjectProxy *proxy); uint32_t GetSeqNumber(); bool RegisterRemoteProxyInner(std::u16string serviceName, binder_uintptr_t binder); bool CheckSystemAbilityId(int32_t systemAbilityId); private: DISALLOW_COPY_AND_MOVE(DBinderService); static std::mutex instanceMutex_; static constexpr int WAIT_FOR_REPLY_MAX_SEC = 4; static constexpr int RETRY_TIMES = 2; static std::shared_ptr<DBinderRemoteListener> remoteListener_; static bool mainThreadCreated_; static sptr<DBinderService> instance_; std::shared_mutex remoteBinderMutex_; std::shared_mutex busNameMutex_; std::shared_mutex proxyMutex_; std::shared_mutex deathRecipientMutex_; std::shared_mutex sessionMutex_; std::mutex handleEntryMutex_; std::mutex threadLockMutex_; std::mutex callbackProxyMutex_; std::mutex deathNotificationMutex_; uint32_t seqNumber_ = 0; /* indicate make remote binder message sequence number, and can be overflow */ std::list<sptr<DBinderServiceStub>> DBinderStubRegisted_; std::map<std::u16string, binder_uintptr_t> mapRemoteBinderObjects_; std::map<uint32_t, std::shared_ptr<struct ThreadLockInfo>> threadLockInfo_; std::map<int, sptr<IRemoteObject>> proxyObject_; std::map<binder_uintptr_t, std::shared_ptr<struct SessionInfo>> sessionObject_; std::map<sptr<IRemoteObject>, DBinderServiceStub *> noticeProxy_; std::map<sptr<IRemoteObject>, sptr<IRemoteObject::DeathRecipient>> deathRecipients_; std::map<IPCObjectProxy *, std::string> busNameObject_; static constexpr int32_t FIRST_SYS_ABILITY_ID = 0x00000001; static constexpr int32_t LAST_SYS_ABILITY_ID = 0x00ffffff; }; } // namespace OHOS #endif // OHOS_IPC_SERVICES_DBINDER_DBINDER_SERVICE_H
The Weekly Newsmagazine of Science Volume 155, Number 19 (May 8, 1999) |<<Back to Contents| By J. Raloff Canadian scientists have identified the likely culprit behind some historic, regional declines in Atlantic salmon. The researchers find that a near-ubiquitous water pollutant can render young, migrating fish unable to survive a life at sea. Heavy, late-spring spraying of forests with a pesticide laced with nonylphenol during the 1970s and '80s was the clue that led the biologists to unmask that chemical's role in the transitory decline of salmon in East Canada. Though these sprays have ended, concentrations of nonylphenols in forest runoff then were comparable to those in the effluent of some pulp mills, industrial facilities, and sewage-treatment plants today. Downstream of such areas, the scientists argue, salmon and other migratory fish may still be at risk. Nonylphenols are surfactants used in products from pesticides to dishwashing detergents, cosmetics, plastics, and spermicides. Because waste-treatment plants don't remove nonylphenols well, these chemicals can build up in downstream waters (SN: 1/8/94, p. 24). When British studies linked ambient nonylphenol pollution to reproductive problems in fish (SN: 2/26/94, p. 142), Wayne L. Fairchild of Canada's Department of Fisheries and Oceans in Moncton, New Brunswick, became concerned. He recalled that an insecticide used on local forests for more than a decade had contained large amounts of nonylphenols. They helped aminocarb, the oily active ingredient in Matacil 1.8D, dissolve in water for easier spraying. Runoff of the pesticide during rains loaded the spawning and nursery waters of Atlantic salmon with nonylphenols. Moreover, this aerial spraying had tended to coincide with the final stages of smoltificationthe fish's transformation for life at sea. To probe for effects of forest spraying, Fairchild and his colleagues surveyed more than a decade of river-by-river data on fish. They overlaid these numbers with archival data on local aerial spraying with Matacil 1.8D or either of two nonylphenol-free pesticides. One contained the same active ingredient, aminocarb, as Matacil 1.8D does. Most of the lowest adult salmon counts between 1973 and 1990 occurred in rivers where smolts would earlier have encountered runoff of Matacil 1.8D, Fairchild's group found. In 9 of 19 cases of Matacil 1.8D spraying for which they had good data, salmon returns were lower than they were within the 5 years earlier and 5 years later, they report in the May Environmental Health Perspectives. No population declines were associated with the other two pesticides. The researchers have now exposed smolts in the laboratory to various nonylphenol concentrations, including some typical of Canadian rivers during the 1970s. The fish remained healthyuntil they entered salt water, at which point they exhibited a failure-to-thrive syndrome. "They looked like they were starving," Fairchild told Science News. Within 2 months, he notes, 20 to 30 percent died. Untreated smolts adjusted normally to salt water and fattened up. Steffen S. Madsen, a fish ecophysiologist at Odense University in Denmark, is not surprised, based on his own experiments. To move from fresh water to the sea, a fish must undergo major hormonal changes that adapt it for pumping out excess salt. A female preparing to spawn in fresh water must undergo the opposite change. Since estrogen triggers her adaptation, Madsen and a colleague decided to test how smolts would respond to estrogen or nonylphenol, an estrogen mimic. In the lab, they periodically injected salmon smolts with estrogen or nonylphenol over 30 days, and at various points placed them in seawater for 24 hours. Salt in the fish's blood skyrocketed during the day-long trials, unlike salt in untreated smolts. "Our preliminary evidence indicates that natural and environ- mental estrogens screw up the pituitary," Madsen says. The gland responds by making prolactin, a hormone that drives freshwater adaptation. Judging by Fairchild's data, Madsen now suspects that any fish that migrates between fresh and salt water may be similarly vulnerable to high concentrations of pollutants that mimic estrogen. From Science News, Vol. 155, No. 19, May 8, 1999, p. 293. Copyright © 1999, Science Service. Copyright © 1999 Science Service
// // BSONEncoder.h // ObjCMongoDB // // Copyright 2012 Paul Melnikow and other contributors // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. // #if TARGET_OS_IPHONE #import <UIKit/UIKit.h> #else #import <AppKit/AppKit.h> #endif #import <Foundation/Foundation.h> #import "BSONTypes.h" typedef enum { BSONDoNothingOnNil, BSONEncodeNullOnNil, BSONRaiseExceptionOnNil } BSONEncoderBehaviorOnNil; @class BSONEncoder; @class BSONDocument; /** Supports context-dependent encoding with BSONEncoder. Implement these methods to customize encoding by reference, or to handle encoding of an object graph when you don't want to add BSON-related code to the object-graph classes. These methods are never called with the root object as <code>obj</code>. By all means use the delegate instead of subclassing BSONEncoder. */ @protocol BSONEncoderDelegate @optional /** Return <code>YES</code> to indicate that in the given context the encoder should encode an object ID in place of the object. If this method returns <code>YES</code>, the object must respond to <code>-BSONObjectID</code> or <code>-BSONObjectIDForEncoder:</code>. Return <code>NO</code> to proceed normally with encoding. You may use the key path, key path depth, the object, or the delegate's own state. The encoder calls this method before the <code>-willEncodeObject:forKeyPath:</code> delegate method, and in turn before it calls <code>-encodeWithCoder:</code> on <code>obj</code>. @param encoder The active encoder @param obj The object about to be encoded @param keyPathComponents An array of keys descending from the root object (including numbers as strings in the case of array elements) @return <code>YES</code> to substite an object ID, <code>NO</code> to encode normally */ - (BOOL) encoder:(BSONEncoder *) encoder shouldSubstituteObjectIDForObject:(id) obj forKeyPath:(NSArray *) keyPathComponents; /** Provides a substitute Return <code>obj</code> to proceed normally with encoding. You may use the key path, key path depth, the object, or the delegate's own state. The encoder calls this method after it calls the <code>-shouldSubstituteObjectIDForObject:forKeyPath:</code> delegate method, and before it calls <code>-encodeWithCoder:</code> is called on <code>obj</code>. @param encoder The active encoder @param obj The object about to be encoded @param keyPathComponents An array of keys descending from the root object (including numbers as strings in the case of array elements) @return The object to substitute for the given object */ - (id) encoder:(BSONEncoder *) encoder willEncodeObject:(id) obj forKeyPath:(NSArray *) keyPathComponents; - (void) encoder:(BSONEncoder *) encoder willReplaceObject:(id) obj withObject:(id) replacementObj forKeyPath:(NSArray *) keyPathComponents; - (void) encoder:(BSONEncoder *) encoder didEncodeObject:(id) obj forKeyPath:(NSArray *) keyPathComponents; - (void) encoderWillFinish:(BSONEncoder *) encoder; - (void) encoderDidFinish:(BSONEncoder *) encoder; @end /** Creates a BSON document from a root object. <code>BSONEncoder</code> handles BSON-supported types, arrays and dictionaries, custom objects which conform to <code>NSCoding</code> and support keyed archiving, and Core Data managed objects. Invoke <code>BSONDocument</code> to finish encoding and return the encoded document. To encode another root object, instantiate another encoder. As much as possible <code>BSONEncoder</code> follows the design of <code>NSCoder</code>. For more information, refer to Apple's Archives and Serializations Guide. Important differences from <code>NSKeyedArchiver</code>: - <code>BSONEncoder</code> provides its own encoding implementation for: - <code>NSString</code> - <code>NSNumber</code> - <code>NSDate</code> - <code>NSData</code> - <code>NSImage or UIImage</code> - <code>NSDictionary</code> - <code>NSArray</code> - <code>BSONObjectID</code> and the other classes defined in <code>BSONTypes.h</code> - <code>BSONEncoder</code> does not store class information. While BSON documents include enough type information to decode to appropriate Objective-C object types, <code>BSONDecoder</code> relies on objects to provide class information for their descendent custom objects. - <code>BSONEncoder</code> does not store version information. - <code>BSONEncoder</code> does not support unkeyed coding. (If your custom objects can't implement unkeyed coding, you can implement unkeyed coding by subclassing <code>BSONEncoder</code> and overriding the unkeyed methods to automatically generate pre-defined, sequential key names, and subclassing <code>BSONDecoder</code> to override the decoding methods to use these pre-defined key names in the same sequence.) - BSON documents may contain only one root object. Encoding multiple objects by encapsulating them in an parent object, or by creating a separate BSON document for each one. (Each document inserted into a MongoDB collection needs its own BSON document.) - In MongoDB, key names may not contain <code>$</code> or <code.</code> characters. By default, <code>BSONEncoder</code> throws an exception on illegal keys. You can control this behavior by setting <code>restrictsKeyNamesForMongoDB</code> to <code>NO</code>. (Note that implementations of <code>-encodeWithCoder:</code> in some Foundation classes may generate illegal keys. If this is a problem, consider subclassing to mangle the keys so they're safe for MongoDB.) - <code>BSONEncoder</code> does not allow objects to override their encoding with <code>classForCoder</code>. Use <code>-encodeWithCoder:</code> (from <code>NSCoding</code>), <code>-replacementObjectForCoder:</code> (from <code>NSObject</code>), <code>-encodeWithBSONEncoder:</code>, or <code>-replacementObjectForBSONEncoder:</code> (both from <code>BSONCoding</code>) instead. - <code>BSONEncoder</code> does not automatically encode objects by reference, even duplicate objects. (BSON's object ID type is useful for identifying a reference to another document in a MongoDB collection, but unlike an Objective-C pointer, it can't be used to refer to a sub-object. A BSON object ID only gets meaning in the context of a MongoDB collection. It has no meaning within a single document.) To encode an object by reference, either the object or the delegate needs to substitute another object. (See Encoding by Reference below.) - To avoid infinite loops, <code>BSONEncoder</code> throws an exception if an object attempts to encode its parent object or its direct ancestors. This check is done after object and delegate substitution, so it isn't triggered when, for example, an object ID is substituted in place of a parent object. - <code>BSONEncoderDelegate</code> provides a similar interface to <code>NSKeyedArchiverDelegate</code>, but conveys additional state information in the encoder's key path, and provides an additional delegate method for substituting object IDs during encoding. Encoding by reference While by default <code>BSONEncoder</code> embeds child objects, it provides a mechanism for substituting BSON object IDs. If an object should <i>always</i> encode a child as an object ID, its <code>-encodeWithCoder:</code> can invoke <code>-encodeObjectIDForObject:forKey:</code>. If the appropriate behavior depends on context, have the delegate implement <code>-encoder:shouldSubstituteObjectIDForObject:forKeyPath:</code>, and consider the key path, key path depth, the object, or the delegate's own state. For either of these to work, the child object must be able to generate an object ID by implementing <code>BSONObjectID</code> or <code>BSONObjectIDForEncoder:</code> (defined in <code>BSONCoding</code>). To encode some other reference structure, use one of the substitution methods of the object or delegate. Controlling encoding of sub-objects Objects may control their encoding by implementing one of these methods: - <code>-encodeWithCoder:</code> - <code>-encodeWithBSONEncoder:</code> - <code>-replacementObjectForCoder:</code> - <code>-replacementObjectForBSONEncoder:</code> In addition, a delegate may control encoding by implementing one of these methods: - <code>-encoder:shouldSubstituteObjectIDForObject:forKeyPath:</code> - <code>-encoder:willEncodeObject:forKeyPath:</code> Encoding managed objects The <code>BSONCoding</code> category on <code>NSManagedObject</code> uses the entity description to automatically encode the properties of managed objects. <code>NSManagedObject</code>'s default implementation of <code>-encodeWithBSONEncoder:</code> uses the property names as key names, and encodes all persistent attributes and relationships. If you need to skip certain relationships or attributes, replace entities with references, or otherwise customize the encoding, override one of the category's helper methods, providing your own logic where needed and invoking <code>super</code> the rest of the time. - <code>-encodeAttribute:withEncoder:</code> - <code>-encodeRelationship:withEncoder:</code> - <code>-encodeFetchedProperty:withEncoder:</code> You can also override <code>-encodeWithBSONEncoder:</code> if necessary. */ @interface BSONEncoder : NSCoder - (BSONEncoder *) initForWriting; + (BSONDocument *) documentForObject:(id) obj; + (BSONDocument *) documentForObject:(id) obj restrictingKeyNamesForMongoDB:(BOOL) restrictingKeyNamesForMongoDB; + (BSONDocument *) documentForDictionary:(NSDictionary *) dictionary; + (BSONDocument *) documentForDictionary:(NSDictionary *) dictionary restrictingKeyNamesForMongoDB:(BOOL) restrictingKeyNamesForMongoDB; - (BSONDocument *) BSONDocument; - (NSData *) data; - (void) encodeObject:(id) obj; - (void) encodeDictionary:(NSDictionary *) dictionary; - (void) encodeObject:(id) objv forKey:(NSString *) key; // objectid is substituted before other methods, eg delegate, are called // objv must implement -BSONObjectID or -BSONObjectIDForEncoder: method - (void) encodeObjectIDForObject:(id) objv forKey:(NSString *) key; - (void) encodeDictionary:(NSDictionary *) dictionary forKey:(NSString *) key; - (void) encodeArray:(NSArray *) array forKey:(NSString *) key; - (void) encodeBSONDocument:(BSONDocument *) objv forKey:(NSString *) key; - (void) encodeNullForKey:(NSString *) key; - (void) encodeUndefinedForKey:(NSString *) key; - (void) encodeNewObjectID; - (void) encodeObjectID:(BSONObjectID *)objv forKey:(NSString *) key; - (void) encodeInt:(int) intv forKey:(NSString *) key; - (void) encodeInt64:(int64_t) intv forKey:(NSString *) key; - (void) encodeBool:(BOOL) boolv forKey:(NSString *) key; - (void) encodeDouble:(double) realv forKey:(NSString *) key; - (void) encodeNumber:(NSNumber *) objv forKey:(NSString *) key; - (void) encodeString:(NSString *)objv forKey:(NSString *) key; - (void) encodeSymbol:(BSONSymbol *)objv forKey:(NSString *) key; - (void) encodeDate:(NSDate *) objv forKey:(NSString *) key; #if TARGET_OS_IPHONE - (void) encodeImage:(UIImage *) objv forKey:(NSString *) key; #else - (void) encodeImage:(NSImage *) objv forKey:(NSString *) key; #endif - (void) encodeRegularExpression:(BSONRegularExpression *) regex forKey:(NSString *) key; - (void) encodeRegularExpressionPattern:(NSString *) pattern options:(NSString *) options forKey:(NSString *) key; - (void) encodeCode:(BSONCode *) objv forKey:(NSString *) key; - (void) encodeCodeString:(NSString *) objv forKey:(NSString *) key; - (void) encodeCodeWithScope:(BSONCodeWithScope *) codeWithScope forKey:(NSString *) key; - (void) encodeCodeString:(NSString *) code withScope:(BSONDocument *)scope forKey:(NSString *) key; - (void) encodeData:(NSData *) objv forKey:(NSString *) key; - (void) encodeTimestamp:(BSONTimestamp *) objv forKey:(NSString *) key; - (NSArray *) keyPathComponents; @property (retain) NSObject<BSONEncoderDelegate> * delegate; @property (assign) BSONEncoderBehaviorOnNil behaviorOnNil; @property (assign) BOOL restrictsKeyNamesForMongoDB; @end
#pragma once namespace thinkyoung { namespace client { #ifndef ALP_TEST_NETWORK static const std::vector<std::string> SeedNodes = { "node.achain.com:61696" }; #else static const std::vector<std::string> SeedNodes { "13.125.59.140:61696", "52.78.47.183:61696" }; #endif } } // thinkyoung::client
Show kids that science and fun go hand in hand The loveable characters from PBS’ award-winning The Magic School Bus™ will help children explore the scientific properties of polymers. Create goop, melt snow, extract polymers from milk, make snow erupt, and much more! Self-contained, bus-shaped kit includes 20 experiment cards, a data notebook, science components, and 10 containers of polymers, including super balls, rainbow beads, snow, and gel crystals. Warning! This set contains chemicals that may be harmful if misused. Read cautions on individual containers carefully. Not to be used by children except under adult supervision. Recommended for ages 5+.
/* * All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or * its licensors. * * For complete copyright and license terms please see the LICENSE at the root of this * distribution (the "License"). All use of this software is governed by the License, * or, if provided, by the license below or the license accompanying this file. Do not * remove or modify any license notices. This file is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * */ #include <AzCore/Math/PolygonPrism.h> #include <AzCore/Memory/SystemAllocator.h> #include <AzCore/RTTI/BehaviorContext.h> #include <AzCore/Serialization/EditContext.h> #include <AzCore/Serialization/SerializeContext.h> namespace AZ { void PolygonPrismReflect(ReflectContext* context) { PolygonPrism::Reflect(context); } void PolygonPrism::Reflect(ReflectContext* context) { if (auto serializeContext = azrtti_cast<SerializeContext*>(context)) { serializeContext->Class<PolygonPrism>() ->Version(1) ->Field("Height", &PolygonPrism::m_height) ->Field("VertexContainer", &PolygonPrism::m_vertexContainer) ; if (EditContext* editContext = serializeContext->GetEditContext()) { editContext->Class<PolygonPrism>("PolygonPrism", "Polygon prism shape") ->ClassElement(Edit::ClassElements::EditorData, "") ->Attribute(Edit::Attributes::Visibility, Edit::PropertyVisibility::ShowChildrenOnly) ->DataElement(Edit::UIHandlers::Default, &PolygonPrism::m_height, "Height", "Shape Height") ->Attribute(Edit::Attributes::Suffix, " m") ->Attribute(Edit::Attributes::Step, 0.05f) ->Attribute(Edit::Attributes::Min, 0.0f) ->Attribute(Edit::Attributes::ChangeNotify, &PolygonPrism::OnChangeHeight) ->DataElement(Edit::UIHandlers::Default, &PolygonPrism::m_vertexContainer, "Vertices", "Data representing the polygon, in the entity's local coordinate space") ->Attribute(Edit::Attributes::ContainerCanBeModified, false) ->Attribute(Edit::Attributes::AutoExpand, true) ; } } if (auto behaviorContext = azrtti_cast<BehaviorContext*>(context)) { behaviorContext->Class<PolygonPrism>() ->Attribute(AZ::Script::Attributes::ExcludeFrom, AZ::Script::Attributes::ExcludeFlags::Preview) ->Attribute(Script::Attributes::Storage, Script::Attributes::StorageType::RuntimeOwn) ->Property("height", BehaviorValueGetter(&PolygonPrism::m_height), nullptr) ->Property("vertexContainer", BehaviorValueGetter(&PolygonPrism::m_vertexContainer), nullptr) ; } } void PolygonPrism::SetHeight(const float height) { if (!IsCloseMag(height, m_height)) { m_height = height; OnChangeHeight(); } } void PolygonPrism::OnChangeHeight() const { if (m_onChangeHeightCallback) { m_onChangeHeightCallback(); } } void PolygonPrism::SetCallbacks( const VoidFunction& onChangeElement, const VoidFunction& onChangeContainer, const VoidFunction& onChangeHeight) { m_vertexContainer.SetCallbacks( [onChangeContainer](size_t) { onChangeContainer(); }, [onChangeContainer](size_t) { onChangeContainer(); }, [onChangeElement](size_t) { onChangeElement(); }, onChangeContainer, onChangeContainer); m_onChangeHeightCallback = onChangeHeight; } void PolygonPrism::SetCallbacks( const IndexFunction& onAddVertex, const IndexFunction& onRemoveVertex, const IndexFunction& onUpdateVertex, const VoidFunction& onSetVertices, const VoidFunction& onClearVertices, const VoidFunction& onChangeHeight) { m_vertexContainer.SetCallbacks( onAddVertex, onRemoveVertex, onUpdateVertex, onSetVertices, onClearVertices); m_onChangeHeightCallback = onChangeHeight; } AZ_CLASS_ALLOCATOR_IMPL(PolygonPrism, SystemAllocator, 0) }
#include "duke32.h" /******************************** * for Wifi Connection *********************************/ // Add Feature String void AddFeatureString(String &S, const String F){ if (S.length() != 0) S.concat(", "); S.concat(F); } uint64_t GetChipid(){ // Chip Info const char* ModelStrings[] PROGMEM = {"", "ESP32"}; uint64_t chipid; // Get Chip Information esp_chip_info_t chip_info; esp_chip_info(&chip_info); Serial.printf("Model: %s\r\n", ModelStrings[chip_info.model]); // Features String Features = ""; if (chip_info.features & CHIP_FEATURE_EMB_FLASH) AddFeatureString(Features, "Embedded Flash"); if (chip_info.features & CHIP_FEATURE_WIFI_BGN ) AddFeatureString(Features, "Wifi-BGN" ); if (chip_info.features & CHIP_FEATURE_BLE ) AddFeatureString(Features, "BLE" ); if (chip_info.features & CHIP_FEATURE_BT ) AddFeatureString(Features, "Bluetooth" ); Serial.println("Features: " + Features); // Cores Serial.printf("Cores: %d\r\n", chip_info.cores); // Revision Serial.printf("Revision: %d\r\n", chip_info.revision); // MAC Address String MACString = ""; chipid = ESP.getEfuseMac(); for (int i=0; i<6; i++) { if (i > 0) MACString.concat(":"); uint8_t Octet = chipid >> (i * 8); if (Octet < 16) MACString.concat("0"); MACString.concat(String(Octet, HEX)); } Serial.println("MAC Address: " + MACString); // Flash Size uint32_t FlashSize = ESP.getFlashChipSize(); String ValueString = ""; do { ValueString = String(FlashSize % 1000) + ValueString; FlashSize /= 1000; if (FlashSize > 0) ValueString = "," + ValueString; } while (FlashSize > 0); Serial.println("Flash Size: " + ValueString); // ChipID chipid=ESP.getEfuseMac();//The chip ID is essentially its MAC address(length: 6 bytes). Serial.printf("Chip ID = %04X",(uint16_t)(chipid>>32));//print High 2 bytes Serial.printf("%08X\n",(uint32_t)chipid);//print Low 4bytes. return chipid; } void WiFiMgrSetup(char WiFiAPname[]){ //WiFiManager Serial.printf("AP: %s\n", WiFiAPname); Serial.println("IP: 192.168.4.1"); //Local intialization. Once its business is done, there is no need to keep it around WiFiManager wifiManager; // WiFiManager̃ wifiManager.setDebugOutput(false); //set custom ip for portal //wifiManager.setAPStaticIPConfig(IPAddress(10,0,1,1), IPAddress(10,0,1,1), IPAddress(255,255,255,0)); //or use this for auto generated name ESP + ChipID wifiManager.autoConnect(WiFiAPname); //wifiManager.autoConnect("NoseRadi32AP"); //if you get here you have connected to the WiFi Serial.println("connected(^^)"); Serial.println(WiFi.SSID()); Serial.println(WiFi.localIP()); } void OTASetup(char OTAHostname[]){ // Port defaults to 3232 // ArduinoOTA.setPort(3232); // Hostname defaults to esp3232-[MAC] // ArduinoOTA.setHostname("myesp32"); ArduinoOTA.setHostname(OTAHostname); Serial.printf("OTA Host: %s\n", OTAHostname); // No authentication by default // ArduinoOTA.setPassword("admin"); // Password can be set with it's md5 value as well // MD5(admin) = 21232f297a57a5a743894a0e4a801fc3 // ArduinoOTA.setPasswordHash("21232f297a57a5a743894a0e4a801fc3"); ArduinoOTA.onStart([]() { String type; if (ArduinoOTA.getCommand() == U_FLASH) type = "sketch"; else // U_SPIFFS type = "filesystem"; // NOTE: if updating SPIFFS this would be the place to unmount SPIFFS using SPIFFS.end() Serial.println("Start updating " + type); }); ArduinoOTA.onEnd([]() { Serial.println("\nEnd"); }); ArduinoOTA.onProgress([](unsigned int progress, unsigned int total) { Serial.printf("Progress: %u%%\r", (progress / (total / 100))); }); ArduinoOTA.onError([](ota_error_t error) { Serial.printf("Error[%u]: ", error); if (error == OTA_AUTH_ERROR) Serial.println("Auth Failed"); else if (error == OTA_BEGIN_ERROR) Serial.println("Begin Failed"); else if (error == OTA_CONNECT_ERROR) Serial.println("Connect Failed"); else if (error == OTA_RECEIVE_ERROR) Serial.println("Receive Failed"); else if (error == OTA_END_ERROR) Serial.println("End Failed"); }); ArduinoOTA.begin(); } /******************************** * for Servo Control *********************************/ void servoInit(){ // Setup timer and attach timer to a servo pin ledcSetup(LEDC_CHANNEL_0, LEDC_BASE_FREQ, LEDC_TIMER_BIT); ledcAttachPin(Servo_PIN1, LEDC_CHANNEL_0); ledcSetup(LEDC_CHANNEL_1, LEDC_BASE_FREQ, LEDC_TIMER_BIT); ledcAttachPin(Servo_PIN2, LEDC_CHANNEL_1); } void setServo(uint8_t servoNo, uint16_t angle){ uint16_t pwmWidth; if(servoNo < 0){ servoNo = 0; }else if(servoNo > 1){ servoNo = 1; } if(angle < 0){ angle = 0; }else if(angle > 180){ angle = 180; } pwmWidth = ((srvMax - srvMin) / 180) * angle + srvMin; ledcWrite(servoNo, pwmWidth); } /******************************** * for Motor Control *********************************/ void Motor_INIT(){ pinMode(MTR_A1, OUTPUT); pinMode(MTR_A2, OUTPUT); // pinMode(MTR_AE, OUTPUT); pinMode(MTR_B1, OUTPUT); pinMode(MTR_B2, OUTPUT); // pinMode(MTR_BE, OUTPUT); digitalWrite(MTR_A1, LOW); digitalWrite(MTR_A2, LOW); // digitalWrite(MTR_AE, LOW); digitalWrite(MTR_B1, LOW); digitalWrite(MTR_B2, LOW); // digitalWrite(MTR_BE, LOW); // Setup timer and attach timer to a servo pin ledcSetup(LEDC_CHANNEL_2, LEDC_BASE_FREQ_MTR, LEDC_TIMER_BIT_MTR); ledcAttachPin(MTR_AE, LEDC_CHANNEL_2); ledcSetup(LEDC_CHANNEL_3, LEDC_BASE_FREQ_MTR, LEDC_TIMER_BIT_MTR); ledcAttachPin(MTR_BE, LEDC_CHANNEL_3); } void setMotorSpeed(uint8_t motorNo, uint8_t speed){ if(motorNo < 2){ motorNo = 2; }else if(motorNo > 3){ motorNo = 3; } if(speed < 0){ speed = 0; }else if(speed > 255){ speed = 255; } ledcWrite(motorNo, speed); } void motorL_forward(uint8_t speed){ // digitalWrite(MTR_AE, HIGH); setMotorSpeed(MotorL, speed); digitalWrite(MTR_A1, HIGH); digitalWrite(MTR_A2, LOW); } void motorL_back(uint8_t speed){ // digitalWrite(MTR_AE, HIGH); setMotorSpeed(MotorL, speed); digitalWrite(MTR_A1, LOW); digitalWrite(MTR_A2, HIGH); } void motorL_stop(){ // digitalWrite(MTR_AE, LOW); setMotorSpeed(MotorL, 0); digitalWrite(MTR_A1, LOW); digitalWrite(MTR_A2, LOW); } void motorR_forward(uint8_t speed){ // digitalWrite(MTR_BE, HIGH); setMotorSpeed(MotorR, speed); digitalWrite(MTR_B1, HIGH); digitalWrite(MTR_B2, LOW); } void motorR_back(uint8_t speed){ // digitalWrite(MTR_BE, HIGH); setMotorSpeed(MotorR, speed); digitalWrite(MTR_B1, LOW); digitalWrite(MTR_B2, HIGH); } void motorR_stop(){ // digitalWrite(MTR_BE, LOW); setMotorSpeed(MotorR, 0); digitalWrite(MTR_B1, LOW); digitalWrite(MTR_B2, LOW); } void motor_stop(){ motorL_stop(); motorR_stop(); } void motor_forward(){ motorL_forward(255); motorR_forward(255); } void motor_back(){ motorL_back(255); motorR_back(255); } void motor_left(){ motorL_forward(128); motorR_forward(255); } void motor_right(){ motorL_forward(255); motorR_forward(128); } void motor_turnleft(){ motorL_stop(); motorR_forward(255); } void motor_turnright(){ motorL_forward(255); motorR_stop(); } void motor_spinleft(){ motorL_back(255); motorR_forward(255); } void motor_spinright(){ motorL_forward(255); motorR_back(255); } // -------------------------------------- // i2c_scanner // -------------------------------------- void i2c_scan(){ Serial.println("\nI2C Scanner"); byte error, address; int nDevices; Serial.println("Scanning..."); nDevices = 0; for(address = 1; address < 127; address++ ) { // The i2c_scanner uses the return value of // the Write.endTransmisstion to see if // a device did acknowledge to the address. Wire.beginTransmission(address); error = Wire.endTransmission(); if (error == 0) { Serial.print("I2C device found at address 0x"); if (address<16){ Serial.print("0"); } Serial.print(address,HEX); Serial.println(" !"); nDevices++; } else if (error==4) { Serial.print("Unknow error at address 0x"); if (address<16){ Serial.print("0"); } Serial.println(address,HEX); } } if (nDevices == 0){ Serial.println("No I2C devices found\n"); }else{ Serial.println("done\n"); } }
/** * @file test_akaze_match.cpp * @brief Main program for testing OpenCV A-KAZE port in an image matching application * @date Jun 05, 2014 * @author Pablo F. Alcantarilla */ #include "./src/utils.h" // System #include <string> #include <vector> #include <iostream> using namespace std; using namespace cv; /* ************************************************************************* */ int main(int argc, char *argv[]) { if (argc != 4) { cerr << "Error introducing input arguments!" << endl; cerr << "The format needs to be: ./test_akaze_match img1 imgN H1toN" << endl; return -1; } cv::Mat img1, imgN; string img1File = argv[1]; string imgNFile = argv[2]; string HFile = argv[3]; // Open the input image img1 = imread(img1File, 1); imgN = imread(imgNFile, 1); cv::Mat H1toN = read_homography(HFile); // Create A-KAZE object Ptr<Feature2D> dakaze = AKAZE::create(); // Timing information double t1 = 0.0, t2 = 0.0; double takaze = 0.0, tmatch = 0.0; // Detect A-KAZE features in the images vector<cv::KeyPoint> kpts1, kptsN; cv::Mat desc1, descN; t1 = cv::getTickCount(); dakaze->detectAndCompute(img1, cv::noArray(), kpts1, desc1); dakaze->detectAndCompute(imgN, cv::noArray(), kptsN, descN); t2 = cv::getTickCount(); takaze = 1000.0*(t2-t1) / cv::getTickFrequency(); int nr_kpts1 = kpts1.size(); int nr_kptsN = kptsN.size(); // Match the descriptors using NNDR matching strategy vector<vector<cv::DMatch> > dmatches; vector<cv::Point2f> matches, inliers; cv::Ptr<cv::DescriptorMatcher> matcher = cv::DescriptorMatcher::create("BruteForce-Hamming"); float nndr = 0.8; t1 = cv::getTickCount(); matcher->knnMatch(desc1, descN, dmatches, 2); matches2points_nndr(kpts1, kptsN, dmatches, matches, nndr); t2 = cv::getTickCount(); tmatch = 1000.0*(t2-t1) / cv::getTickFrequency(); // Compute the inliers using the ground truth homography float max_h_error = 2.5; compute_inliers_homography(matches, inliers, H1toN, max_h_error); // Compute the inliers statistics int nr_matches = matches.size()/2; int nr_inliers = inliers.size()/2; int nr_outliers = nr_matches - nr_inliers; float ratio = 100.0*((float) nr_inliers / (float) nr_matches); cout << "A-KAZE Matching Results" << endl; cout << "*******************************" << endl; cout << "# Keypoints 1: \t" << nr_kpts1 << endl; cout << "# Keypoints N: \t" << nr_kptsN << endl; cout << "# Matches: \t" << nr_matches << endl; cout << "# Inliers: \t" << nr_inliers << endl; cout << "# Outliers: \t" << nr_outliers << endl; cout << "Inliers Ratio (%): \t" << ratio << endl; cout << "Time Detection+Description (ms): \t" << takaze << endl; cout << "Time Matching (ms): \t" << tmatch << endl; cout << endl; // Visualization cv::Mat img_com = cv::Mat(cv::Size(2*img1.cols, img1.rows), CV_8UC3); draw_keypoints(img1, kpts1); draw_keypoints(imgN, kptsN); draw_inliers(img1, imgN, img_com, inliers); cv::namedWindow("A-KAZE Matching", cv::WINDOW_KEEPRATIO); cv::imshow("A-KAZE Matching", img_com); cv::waitKey(0); return 1; }
#include <chrono> #include <CLI/CLI.hpp> #include "iyokan_plain.hpp" #include "iyokan_tfhepp.hpp" #ifdef IYOKAN_CUDA_ENABLED #include "iyokan_cufhe.hpp" #endif int main(int argc, char **argv) { error::initialize("iyokan"); // Show build config spdlog::info("Build config"); #if defined(NDEBUG) spdlog::info("\tType: Release"); #else spdlog::info("\tType: Debug"); #endif #if defined(IYOKAN_GIT_REVISION) spdlog::info("\tGit revision: " IYOKAN_GIT_REVISION); #else spdlog::info("\tGit revision: unknown"); #endif #if defined(USE_80BIT_SECURITY) spdlog::info("\tTFHE security parameter: CGGI16 (80bit)"); #elif defined(USE_CGGI19) spdlog::info("\tTFHE security parameter: CGGI19"); #else spdlog::info("\tTFHE security parameter: 128bit"); #endif #ifdef IYOKAN_CUDA_ENABLED spdlog::info("\tGPU support: enabled"); #else spdlog::info("\tGPU support: disabled"); #endif // Parse command-line arguments CLI::App app{"Prallel FHE circuit evaluation engine."}; app.require_subcommand(); enum class TYPE { PLAIN, TFHE } type; Options opt; #ifdef IYOKAN_CUDA_ENABLED bool enableGPU = false; #endif bool verbose = false, quiet = false; std::map<std::string, SCHED> mapSched{{"topo", SCHED::TOPO}, {"ranku", SCHED::RANKU}}; { CLI::App *plain = app.add_subcommand("plain", ""); plain->parse_complete_callback([&] { type = TYPE::PLAIN; }); plain->add_option("-c", opt.numCycles, ""); plain->add_option("--cpu", opt.numCPUWorkers, "") ->check(CLI::PositiveNumber); plain->add_option("--dump-prefix", opt.dumpPrefix, ""); auto optO = plain->add_option("-o,--out", opt.outputFile, ""); plain->add_flag_function( "--stdout-csv,!--no-stdout-csv", [&](int64_t count) { opt.stdoutCSV = count > 0 ? true : false; }, ""); plain->add_option("--snapshot", opt.snapshotFile, ""); plain->add_flag("--quiet", quiet, ""); plain->add_flag("--verbose", verbose, ""); plain->add_option("--dump-time-csv-prefix", opt.dumpTimeCSVPrefix, ""); plain->add_option("--dump-graph-json-prefix", opt.dumpGraphJSONPrefix, ""); plain->add_option("--dump-graph-dot-prefix", opt.dumpGraphDOTPrefix, ""); plain->add_option("--sched", opt.sched, "") ->transform(CLI::CheckedTransformer(mapSched, CLI::ignore_case)); plain->add_flag("--skip-reset", opt.skipReset, ""); plain->add_flag("--show-combinational-progress", opt.showCombinationalProgress, ""); auto ogroups = plain->add_option_group("run in plaintext", "Run in plaintext mode"); ogroups->require_option(1); auto newRun = ogroups->add_option_group("new run", "A new run"); newRun ->add_option_function<std::string>( "--blueprint", [&](auto &&filepath) { opt.blueprint = NetworkBlueprint{filepath}; }) ->required() ->check(CLI::ExistingFile); newRun->add_option("-i,--in", opt.inputFile, "") ->required() ->needs(optO) ->check(CLI::ExistingFile); auto resume = ogroups->add_option_group("resume", "Resume from a saved snapshot"); resume->add_option("--resume", opt.resumeFile, "")->required(); } { CLI::App *tfhe = app.add_subcommand("tfhe", ""); tfhe->parse_complete_callback([&] { type = TYPE::TFHE; }); tfhe->add_option("--bkey", opt.bkeyFile, "")->required(); auto optC = tfhe->add_option("-c", opt.numCycles, ""); tfhe->add_option("--cpu", opt.numCPUWorkers, "") ->check(CLI::PositiveNumber); auto optO = tfhe->add_option("-o,--out", opt.outputFile, ""); tfhe->add_flag_function( "--stdout-csv,!--no-stdout-csv", [&](int64_t count) { opt.stdoutCSV = count > 0 ? true : false; }, ""); tfhe->add_option("--snapshot", opt.snapshotFile, ""); tfhe->add_flag("--quiet", quiet, ""); tfhe->add_flag("--verbose", verbose, ""); tfhe->add_option("--dump-time-csv-prefix", opt.dumpTimeCSVPrefix, ""); tfhe->add_option("--dump-graph-json-prefix", opt.dumpGraphJSONPrefix, ""); tfhe->add_option("--dump-graph-dot-prefix", opt.dumpGraphDOTPrefix, ""); tfhe->add_option("--sched", opt.sched, "") ->transform(CLI::CheckedTransformer(mapSched, CLI::ignore_case)); tfhe->add_option("--secret-key", opt.secretKey, "") ->check(CLI::ExistingFile); tfhe->add_option("--dump-prefix", opt.dumpPrefix, "") ->needs("--secret-key"); tfhe->add_flag("--skip-reset", opt.skipReset, ""); tfhe->add_flag("--show-combinational-progress", opt.showCombinationalProgress, ""); #ifdef IYOKAN_CUDA_ENABLED tfhe->add_option("--gpu", opt.numGPUWorkers, "") ->check(CLI::PositiveNumber); tfhe->add_option_function<int>( "--gpu_num", [&](const int &v) { spdlog::warn( "Option --gpu_num is deprecated. Use --num-gpu " "instead."); opt.numGPU.emplace(v); }, "") ->check(CLI::PositiveNumber); tfhe->add_option("--num-gpu", opt.numGPU, "") ->check(CLI::PositiveNumber); #endif auto ogroups = tfhe->add_option_group("run in TFHE mode", "Run in TFHE mode"); ogroups->require_option(1); auto newRun = ogroups->add_option_group("new run", "A new run"); newRun ->add_option_function<std::string>( "--blueprint", [&](auto &&filepath) { opt.blueprint = NetworkBlueprint{filepath}; }) ->required() ->check(CLI::ExistingFile); newRun->add_option("-i,--in", opt.inputFile, "") ->required() ->needs(optC, optO) ->check(CLI::ExistingFile); #ifdef IYOKAN_CUDA_ENABLED newRun->add_flag("--enable-gpu", enableGPU, ""); #endif auto resume = ogroups->add_option_group("resume", "Resume from a saved snapshot"); resume->add_option("--resume", opt.resumeFile, "")->required(); } CLI11_PARSE(app, argc, argv); // Print what options are selected. spdlog::info("Options"); if (opt.blueprint) spdlog::info("\tBlueprint: {}", opt.blueprint->sourceFile()); if (opt.numCPUWorkers) spdlog::info("\t# of CPU workers: {}", *opt.numCPUWorkers); if (opt.numGPUWorkers) spdlog::info("\t# of GPU workers: {}", *opt.numGPUWorkers); if (opt.numGPU) spdlog::info("\t# of GPUs: {}", *opt.numGPU); if (opt.numCycles) spdlog::info("\t# of cycles: {}", *opt.numCycles); if (opt.bkeyFile) spdlog::info("\tBKey file: {}", *opt.bkeyFile); if (opt.inputFile) spdlog::info("\tInput file (request packet): {}", *opt.inputFile); if (opt.outputFile) spdlog::info("\tOutput file (result packet): {}", *opt.outputFile); if (opt.secretKey) spdlog::info("\t--secret-key: {}", *opt.secretKey); if (opt.dumpPrefix) spdlog::info("\t--dump-prefix: {}", *opt.dumpPrefix); if (opt.snapshotFile) spdlog::info("\t--snapshot: {}", *opt.snapshotFile); if (opt.resumeFile) spdlog::info("\t--resume: {}", *opt.resumeFile); if (opt.stdoutCSV) spdlog::info("\t--stdout-csv: {}", opt.stdoutCSV); spdlog::info("\t--verbose: {}", verbose); spdlog::info("\t--quiet: {}", quiet); if (opt.dumpTimeCSVPrefix) spdlog::info("\t--dump-time-csv-prefix: {}", *opt.dumpTimeCSVPrefix); if (opt.dumpGraphJSONPrefix) spdlog::info("\t--dump-graph-json-prefix: {}", *opt.dumpGraphJSONPrefix); if (opt.dumpGraphDOTPrefix) spdlog::info("\t--dump-graph-dot-prefix: {}", *opt.dumpGraphDOTPrefix); if (opt.sched != SCHED::UND) { std::string str; switch (opt.sched) { case SCHED::TOPO: str = "topo"; break; case SCHED::RANKU: str = "ranku"; break; default: error::die("unreachable"); } spdlog::info("\t--sched: {}", str); } if (opt.skipReset) spdlog::info("\t--skip-reset: {}", opt.skipReset); if (opt.showCombinationalProgress) spdlog::info("\t--show-combinational-progess: {}", opt.showCombinationalProgress); // Process depending on the options chosen. if (quiet) spdlog::set_level(spdlog::level::err); if (verbose) spdlog::set_level(spdlog::level::debug); if (opt.resumeFile) { switch (type) { case TYPE::PLAIN: if (!isSerializedPlainFrontend(*opt.resumeFile)) error::die("Invalid resume file: ", *opt.resumeFile); break; case TYPE::TFHE: if (!isSerializedTFHEppFrontend(*opt.resumeFile)) { #ifdef IYOKAN_CUDA_ENABLED if (isSerializedCUFHEFrontend(*opt.resumeFile)) enableGPU = true; else #endif error::die("Invalid resume file: ", *opt.resumeFile); } break; } } AsyncThread::setNumThreads(std::thread::hardware_concurrency()); switch (type) { case TYPE::PLAIN: doPlain(opt); break; case TYPE::TFHE: #ifdef IYOKAN_CUDA_ENABLED if (enableGPU) doCUFHE(opt); else #endif doTFHE(opt); break; } }
Wednesday, January 7, 2009 The Population Growth of the World's Largest Country China Population The Population Growth of the World's Largest Country Jul 30 2008 As recently as 1950, China's population was a mere 563 million. The population grew dramatically through the following decades to one billion in the early 1980s. China's total fertility rate is 1.7, which means that, on average, each woman gives birth to 1.7 children throughout her life. The necessary total fertility rate for a stable population is 2.1; nonetheless, China's population is expected to grow over the next few decades. This can be attributed to immigration and a decrease in infant mortality and a decrease in death rate as national health improves. China's population officially passed 1.3 billion citizens, with the birth of a baby boy early on Jan 6, 2005. The boy was born Thursday at the Beijing Maternity Hospital at 12:02 a.m. (1602 GMT Wednesday) to a father who works for Air China and a mother employed by Shell China, Xinhua said. The newborn baby's overjoyed father was quoted as saying his son would be blessed his whole life. China's population is expected to increase by about 10 million a year, hitting a peak of 1.46 billion in the 2030s. No comments:
Scientists collect samples of the natural world to try to answer questions about our environment. So many questions and so much we still don't know. The samples collected each represent a particular time and place in our environment. Think about your home. If a scientist had collected the plants and insects from your land 50 years ago, would they be the same or different than ones you would find today? The collected samples are the basic tool for the scientist's research and discovery. A museum specimen is made from the collected sample. We prepare them for study and add them to the research collections. Then they are ready to be used by scientists, not only this year, but for years, even generations to come. Teachers and Museum Docents use specimens in our collections to bring the facts and concepts of science to life. Anyway, you get the idea. Specimens and objects in the Museum's Nature to You Loan Program are particularly helpful for the kindergarten through high school ages. The Research Collections are used by college professors to help their students with the more advanced concepts. Have you ever used a field guide to identify that bird you saw in your backyard? Or that little squirrel-like mammal that just scooted off through the rocks? Or that flower you saw in the park? Artists rely heavily on collections of specimens when they create the illustrations for field guides. They need to see details to make accurate paintings. Different coloration and shapes help you see the differences between the chipmunk and the ground squirrel -- or the coyote and the neighbor's scrawny dog. Have you seen dioramas at a museum? Paintings in the background of exhibits are based on specimens. You've used specimens if you have ... Specimens are a fantastic tool--a resource that helps you discover the secrets of the world around you. Specimens form the core of a museum's philosophy. They are critical for research, for teaching, for our enjoyment of nature through art. Specimens at the San Diego Natural History Museum support our mission to understand the natural world of Southern California and the Baja California peninsula. We want you to enjoy and benefit from the specimens we collect--but we also want your grandchildren to have those same experiences with specimens. For your grandchildren to be able to learn from the specimens, we need to prevent damage to the specimens.
Symptoms of Spondylolysis and Spondylolisthesis Spondylolysis and spondylolisthesis may not cause any obvious symptoms for some children. In others, spondylolysis can cause pain that spreads across the lower back. Pain may be worse when children arch their backs. If the slipping is severe for children with spondylolisthesis, it can stretch the nerves in the lower part of the back. This can lead to: - Pain that goes down one or both legs - A numb feeling in one or both feet - Weakness in your child’s legs - Trouble controlling bladder or bowel movements Spondylolysis and Spondylolisthesis Diagnosis Doctors look first for signs of cracks in the bones of your child's back. These cracks are called stress fractures. We look for stress fractures first because spine slippage, though rare in children, usually happens to those who have the fractures first. The doctor will ask your child if the pain is worse when they arch their back. This is a common sign of stress fractures. Most often, these fractures are in the lower part of the backbone. Next, we most likely will take X-rays of your child’s backbone. This helps doctors make sure your child has a stress fracture. If we cannot see the crack clearly on the X-ray, we may ask to do a bone scan. If we find a crack in the bone, we will probably take a three-dimensional X-ray called a CT (computed tomography) scan. This will give us an even better look at the fracture and help you and your child’s doctor decide on treatment.
//***************************************************************************** // Copyright 2021 Intel Corporation // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. //***************************************************************************** #include <map> #include <memory> #include <sstream> #include <string> #include <inference_engine.hpp> #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wall" #include "tensorflow/core/framework/tensor.h" #include "tensorflow_serving/apis/prediction_service.grpc.pb.h" #pragma GCC diagnostic pop #include "logging.hpp" #include "tensorinfo.hpp" namespace ovms { TensorInfo::TensorInfo(const std::string& name, const InferenceEngine::Precision& precision, const shape_t& shape) : name(name), mapping(""), precision(precision), shape(shape), layout(InferenceEngine::Layout::ANY) { this->updateEffectiveShape(); } TensorInfo::TensorInfo(const std::string& name, const InferenceEngine::Precision& precision, const shape_t& shape, const InferenceEngine::Layout& layout) : name(name), mapping(""), precision(precision), shape(shape), layout(layout) { this->updateEffectiveShape(); } TensorInfo::TensorInfo(const std::string& name, const InferenceEngine::TensorDesc& tensorDesc) : name(name), mapping(""), precision(tensorDesc.getPrecision()), shape(tensorDesc.getDims()), layout(tensorDesc.getLayout()) { this->updateEffectiveShape(); } TensorInfo::TensorInfo(const std::string& name, const std::string& mapping, const InferenceEngine::Precision& precision, const shape_t& shape, const InferenceEngine::Layout& layout) : name(name), mapping(mapping), precision(precision), shape(shape), layout(layout) { this->updateEffectiveShape(); } const std::string& TensorInfo::getName() const { return name; } const std::string& TensorInfo::getMappedName() const { return mapping.size() == 0 ? name : mapping; } void TensorInfo::setMappedName(const std::string& mappedName) { mapping = mappedName; } const InferenceEngine::Precision TensorInfo::getPrecision() const { return precision; } void TensorInfo::setPrecision(const InferenceEngine::Precision& requestedPrecision) { precision = requestedPrecision; } const tensorflow::DataType TensorInfo::getPrecisionAsDataType() const { return getPrecisionAsDataType(precision); } const tensorflow::DataType TensorInfo::getPrecisionAsDataType(InferenceEngine::Precision precision) { switch (precision) { case InferenceEngine::Precision::FP32: return tensorflow::DataType::DT_FLOAT; case InferenceEngine::Precision::I32: return tensorflow::DataType::DT_INT32; case InferenceEngine::Precision::I8: return tensorflow::DataType::DT_INT8; case InferenceEngine::Precision::U8: return tensorflow::DataType::DT_UINT8; case InferenceEngine::Precision::FP16: return tensorflow::DataType::DT_HALF; // case InferenceEngine::Precision::Q78: return tensorflow::DataType:: case InferenceEngine::Precision::I16: return tensorflow::DataType::DT_INT16; case InferenceEngine::Precision::U16: return tensorflow::DataType::DT_UINT16; case InferenceEngine::Precision::U64: return tensorflow::DataType::DT_UINT64; case InferenceEngine::Precision::I64: return tensorflow::DataType::DT_INT64; // case InferenceEngine::Precision::BIN: return tensorflow::DataType:: case InferenceEngine::Precision::BOOL: return tensorflow::DataType::DT_BOOL; default: return tensorflow::DataType::DT_INVALID; } } const std::string TensorInfo::getPrecisionAsString() const { return getPrecisionAsString(precision); } const std::string TensorInfo::getPrecisionAsString(InferenceEngine::Precision precision) { switch (precision) { case InferenceEngine::Precision::FP32: return "FP32"; case InferenceEngine::Precision::I32: return "I32"; case InferenceEngine::Precision::I8: return "I8"; case InferenceEngine::Precision::U8: return "U8"; case InferenceEngine::Precision::FP16: return "FP16"; // case InferenceEngine::Precision::Q78: return tensorflow::DataType:: case InferenceEngine::Precision::I16: return "I16"; case InferenceEngine::Precision::U16: return "U16"; case InferenceEngine::Precision::I64: return "I64"; case InferenceEngine::Precision::BOOL: return "BOOL"; default: return "DT_INVALID"; } } const std::string TensorInfo::getDataTypeAsString(tensorflow::DataType dataType) { switch (dataType) { case tensorflow::DataType::DT_FLOAT: return "FP32"; case tensorflow::DataType::DT_INT32: return "I32"; case tensorflow::DataType::DT_INT8: return "I8"; case tensorflow::DataType::DT_UINT8: return "U8"; case tensorflow::DataType::DT_HALF: return "FP16"; case tensorflow::DataType::DT_INT16: return "I16"; case tensorflow::DataType::DT_UINT16: return "U16"; case tensorflow::DataType::DT_UINT64: return "U64"; case tensorflow::DataType::DT_INT64: return "I64"; case tensorflow::DataType::DT_BOOL: return "BOOL"; case tensorflow::DataType::DT_STRING: return "STRING"; default: return "DT_INVALID"; } } InferenceEngine::Layout TensorInfo::getLayoutFromString(const std::string& layout) { if (layout == "ANY") return InferenceEngine::Layout::ANY; if (layout == "NCHW") return InferenceEngine::Layout::NCHW; if (layout == "NHWC") return InferenceEngine::Layout::NHWC; if (layout == "NCDHW") return InferenceEngine::Layout::NCDHW; if (layout == "NDHWC") return InferenceEngine::Layout::NDHWC; if (layout == "OIHW") return InferenceEngine::Layout::OIHW; if (layout == "GOIHW") return InferenceEngine::Layout::GOIHW; if (layout == "OIDHW") return InferenceEngine::Layout::OIDHW; if (layout == "GOIDHW") return InferenceEngine::Layout::GOIDHW; if (layout == "SCALAR") return InferenceEngine::Layout::SCALAR; if (layout == "C") return InferenceEngine::Layout::C; if (layout == "CHW") return InferenceEngine::Layout::CHW; if (layout == "HW") return InferenceEngine::Layout::HW; if (layout == "HWC") return InferenceEngine::Layout::HWC; if (layout == "NC") return InferenceEngine::Layout::NC; if (layout == "CN") return InferenceEngine::Layout::CN; if (layout == "BLOCKED") return InferenceEngine::Layout::BLOCKED; return InferenceEngine::Layout::ANY; } std::string TensorInfo::getStringFromLayout(InferenceEngine::Layout layout) { switch (layout) { case InferenceEngine::Layout::ANY: return "ANY"; case InferenceEngine::Layout::NCHW: return "NCHW"; case InferenceEngine::Layout::NHWC: return "NHWC"; case InferenceEngine::Layout::NCDHW: return "NCDHW"; case InferenceEngine::Layout::NDHWC: return "NDHWC"; case InferenceEngine::Layout::OIHW: return "OIHW"; case InferenceEngine::Layout::GOIHW: return "GOIHW"; case InferenceEngine::Layout::OIDHW: return "OIDHW"; case InferenceEngine::Layout::GOIDHW: return "GOIDHW"; case InferenceEngine::Layout::SCALAR: return "SCALAR"; case InferenceEngine::Layout::C: return "C"; case InferenceEngine::Layout::CHW: return "CHW"; case InferenceEngine::Layout::HW: return "HW"; case InferenceEngine::Layout::HWC: return "HWC"; case InferenceEngine::Layout::NC: return "NC"; case InferenceEngine::Layout::CN: return "CN"; case InferenceEngine::Layout::BLOCKED: return "BLOCKED"; } return ""; } const InferenceEngine::Layout& TensorInfo::getLayout() const { return layout; } const shape_t& TensorInfo::getShape() const { return shape; } bool TensorInfo::isInfluencedByDemultiplexer() const { return influencedByDemultiplexer; } const shape_t& TensorInfo::getEffectiveShape() const { return effectiveShape.size() > 0 ? effectiveShape : shape; } void TensorInfo::setShape(const shape_t& shape) { this->shape = shape; this->updateEffectiveShape(); } void TensorInfo::setLayout(InferenceEngine::Layout layout) { this->layout = layout; this->updateEffectiveShape(); } void TensorInfo::updateEffectiveShape() { this->effectiveShape = this->getTensorDesc().getBlockingDesc().getBlockDims(); } std::shared_ptr<TensorInfo> TensorInfo::createCopyWithNewShape(const shape_t& shape) const { auto copy = std::make_shared<TensorInfo>(*this); copy->shape = shape; copy->layout = InferenceEngine::Layout::ANY; copy->updateEffectiveShape(); return copy; } std::shared_ptr<TensorInfo> TensorInfo::createCopyWithEffectiveDimensionPrefix(size_t dim) const { auto copy = std::make_shared<TensorInfo>(*this); copy->influencedByDemultiplexer = true; copy->effectiveShape = this->getEffectiveShape(); copy->effectiveShape.insert(copy->effectiveShape.begin(), dim); return copy; } const InferenceEngine::TensorDesc TensorInfo::getTensorDesc() const { return InferenceEngine::TensorDesc{precision, shape, layout}; } bool TensorInfo::isTensorSpecEqual(const TensorInfo& other) const { return this->getEffectiveShape() == other.getEffectiveShape() && this->getPrecision() == other.getPrecision(); } bool TensorInfo::isTensorUnspecified() const { return this->getPrecision() == InferenceEngine::Precision::UNSPECIFIED; } std::string TensorInfo::shapeToString(const shape_t& shape) { std::ostringstream oss; oss << "("; size_t i = 0; if (shape.size() > 0) { for (; i < shape.size() - 1; i++) { oss << shape[i] << ","; } oss << shape[i]; } oss << ")"; return oss.str(); } std::string TensorInfo::tensorShapeToString(const tensorflow::TensorShapeProto& tensorShape) { std::ostringstream oss; oss << "("; int i = 0; if (tensorShape.dim_size() > 0) { for (; i < tensorShape.dim_size() - 1; i++) { oss << tensorShape.dim(i).size() << ","; } oss << tensorShape.dim(i).size(); } oss << ")"; return oss.str(); } std::shared_ptr<TensorInfo> TensorInfo::getUnspecifiedTensorInfo() { std::shared_ptr<TensorInfo> info = std::make_shared<TensorInfo>("", InferenceEngine::Precision::UNSPECIFIED, shape_t{}); return info; } std::string TensorInfo::tensorDescToString(const InferenceEngine::TensorDesc& desc) { std::stringstream ss; ss << "shape: " << shapeToString(desc.getDims()) << " effective shape: " << shapeToString(desc.getBlockingDesc().getBlockDims()) << " precision: " << getPrecisionAsString(desc.getPrecision()) << " layout: " << getStringFromLayout(desc.getLayout()); return ss.str(); } } // namespace ovms
Finding math in nature on the road Math is cool. Math is cool. I never was good at numbers, but one of my fondest memories of math as a teenager was learning about the Fibonacci Sequence. Ms. Sheehan, my teacher at the time, described this as a series of accumulating numbers in which the next number is found by adding the previous two together beginning with zero and one. The chain of numbers produced (0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144, and so on) describe natural phenomenon from leaf growth to the curl of a shell. And once you are familiar with what that chain looks like (check out this video), it’s easy to spot Fibonacci just about everywhere in nature. A recent article in Sierra magazine reminded me of this. The piece, written by an author named Mikey Jane Moran, makes a bold leap from Fibonacci to the importance of play-based learning, and the need to avoid screens. A snip: “Tell your children to hunt for the curling Fibonacci shape outdoors and they will start to see the patterns everywhere, in the cowlick on their brother’s head and in spider webs—places where there aren’t really Fibonacci patterns. But the beauty is that they are noticing. Instead of staring at a video game screen on long road trips, they are looking at clouds. Walks may take longer as they stop to look at every little thing, but how can anyone complain?” If you’ve read this blog for any length of time, you know this notion of play over technology is a big one for me. Quite frankly, it’s nice just to see mainstream publications championing the same priorities for a change. That said, Moran is right—finding Fibonacci in nature is DAMN cool, and something worth doing. Whenever I head out with the girls, we try to look for Fibonacci and other phenomena like it. The hunt becomes a big part of our adventure; L and R look everywhere for examples, and the two girls compete to see who can find more (they are sisters, after all). As Moran suggests, the search (and subsequent success or failure) introduces a much-needed component of play into the learning-from-nature mix. The result is a wonderful way to experience new stuff. %d bloggers like this:
// -*-Mode: C++;-*- // * BeginRiceCopyright ***************************************************** // // $HeadURL$ // $Id$ // // -------------------------------------------------------------------------- // Part of HPCToolkit (hpctoolkit.org) // // Information about sources of support for research and development of // HPCToolkit is at 'hpctoolkit.org' and in 'README.Acknowledgments'. // -------------------------------------------------------------------------- // // Copyright ((c)) 2002-2016, Rice University // All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted 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 Rice University (RICE) nor the names of its // contributors may be used to endorse or promote products derived from // this software without specific prior written permission. // // This software is provided by RICE 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 RICE 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. // // ******************************************************* EndRiceCopyright * /****************************************************************************** * File: QuickSort Class * * Author: Christine Patton * * Date: June, 1993 * * * ***************************** QuickSort Public ******************************* * * * Constructor: * * Nothing. * * * * Destructor: * * Nothing. * * * * Create: * * This function must be called after creating the object as it allocates * * space for a pointer to an array of void pointers, initializes the number * * of slots in the array, and initializes a pointer to the comparison funct.* * The comparison function should take two arguments and return a positive * * integer if the first argument is greater, a negative one if the second * * argument is greater. * * * * Destroy: * * deallocates the space for the pointers initialized in Create. * * * * Sort: * * recursivley sorts the section of the array from minEntry to maxEntry. * * * **************************** QuickSort Private ******************************* * * * Partition: * * returns the rank of element q int the array (all elements less than * * element q are to the left, all elements greater than element q are * * to the right) * * * * Swap: * * pretty much self-explanatory * * * * ArrayPtr: * * pointer to the array that will be sorted * * * * CompareFunc: * * pointer to the comparison function provided by the user * * * * QuickSortCreated: * * set to true in Create (must have value true before Sort, Partition, * * or Swap can be executed) * * * *****************************************************************************/ #ifndef QuickSort_h #define QuickSort_h //************************** System Include Files *************************** //*************************** User Include Files **************************** #include <include/uint.h> /************************ QuickSort function prototypes **********************/ typedef int (*EntryCompareFunctPtr)(const void*, const void*); /************************** QuickSort class definition ***********************/ class QuickSort { public: QuickSort (); virtual ~QuickSort (); void Create (void** UserArrayPtr, const EntryCompareFunctPtr _CompareFunct); void Destroy (); void Sort (const int minEntryIndex, const int maxEntryIndex); private: void** ArrayPtr; EntryCompareFunctPtr CompareFunct; bool QuickSortCreated; void Swap (int a, int b); int Partition (const int min, const int max, const int q); }; #endif
#pragma once #include "typo.hpp" #include <string> #include <vector> /** @brief Imports a string list from the given file. The first line in the file should specify the number of problem instances, followed by newline delimited pairs of "correct\ntypo" pairs. @return True on successful import, false otherwise. */ auto input_from_file(const std::string &filename, std::vector<std::pair<std::string, std::string>> &data) -> bool; /** @brief Exports the string form of data (delimited by newlines) to the given file. @return True on successful export, false otherwise. */ auto output_to_file(const std::string &filename, const std::vector<std::pair<int, TypoStack>> &data) -> bool;
char html[] PROGMEM = R"=====( <html lang="en"> <head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <script> let Socket; function start() { //Socket = new WebSocket('ws://' + window.location.hostname + ':81/'); Socket = new WebSocket('ws://192.168.0.2:81/'); Socket.onmessage = function(evt) { //document.getElementById("rxConsole").value += evt.data; } } function enterpressed() { Socket.send("fritzen"); } </script> <title>Robot</title> <link rel="stylesheet" href="./styles.css" data-inprogress=""> <style> body { margin: 0; padding: 0; width: 100%; height: 100%; } .zone { display: none; position: absolute; width: 100%; height: 100%; left: 0; } .zone.active { display: block; } .zone > h1 { position: absolute; padding: 10px 10px; margin: 0; color: white; right: 0; bottom: 0; } .zone.dynamic { background: rgba(0, 0, 255, 0.1); } </style> </head> <body translate="no" onload="javascript:start();"> <div id="zone_joystick"> <div id="debug"> <ul> <li class="position"> position : <ul> <li class="x">x : <span class="data">762</span></li> <li class="y">y : <span class="data">545</span></li> </ul> </li> <li class="force">force : <span class="data">3.825388869121674</span></li> <li class="pressure">pressure : <span class="data">0.5</span></li> <li class="distance">distance : <span class="data">50</span></li> <li class="angle"> angle : <ul> <li class="radian">radian : <span class="data">6.167909181208635</span></li> <li class="degree">degree : <span class="data">353.39516450324606</span></li> </ul> </li> <li class="direction"> direction : <ul> <li class="x">x : <span class="data">right</span></li> <li class="y">y : <span class="data">down</span></li> <li class="angle">angle : <span class="data">right</span></li> </ul> </li> </ul> </div> <div class="zone dynamic" style="touch-action: none;"><h1>fritzen.io</h1></div> </div> <script src="./nipplejs.js"></script> <script id="rendered-js"> var s = function (sel) { return document.querySelector(sel); }; var sId = function (sel) { return document.getElementById(sel); }; var joysticks = { dynamic: { zone: s('.zone.dynamic'), color: 'white', multitouch: true } }; var joystick; // Get debug elements and map them var elDebug = sId('debug'); var elDump = elDebug.querySelector('.dump'); var els = { position: { x: elDebug.querySelector('.position .x .data'), y: elDebug.querySelector('.position .y .data') }, force: elDebug.querySelector('.force .data'), pressure: elDebug.querySelector('.pressure .data'), distance: elDebug.querySelector('.distance .data'), angle: { radian: elDebug.querySelector('.angle .radian .data'), degree: elDebug.querySelector('.angle .degree .data') }, direction: { x: elDebug.querySelector('.direction .x .data'), y: elDebug.querySelector('.direction .y .data'), angle: elDebug.querySelector('.direction .angle .data') } }; var timeoutCreate; function createThrottle(evt) { clearTimeout(timeoutCreate); timeoutCreate = setTimeout(() => { createNipple(evt); }, 100); } createNipple('dynamic'); function bindNipple() { joystick.on('start end', function (evt, data) { dump(evt.type); debug(data); }).on('move', function (evt, data) { debug(data); }).on('dir:up plain:up dir:left plain:left dir:down ' + 'plain:down dir:right plain:right', function (evt, data) { dump(evt.type); }). on('pressure', function (evt, data) { debug({ pressure: data }); }); } function createNipple(evt) { var type = typeof evt === 'string' ? evt : evt.target.getAttribute('data-type'); if (joystick) { joystick.destroy(); } s('.zone.' + type).className += ' active'; joystick = nipplejs.create(joysticks[type]); bindNipple(); } function testInterval(refValue, degreeValue) { const step = 22.5; let max = refValue + step; let min = refValue - step; return (degreeValue >= min && degreeValue <= max); } // Print data into elements function debug(obj) { if (obj.angle) { //console.log(obj.angle.degree); //console.log(obj.distance); if (obj.distance > 0) { let degree = obj.angle.degree; const right_up = 45; const up = 90; const left_up = 135; const left = 180; const left_down = 225; const down = 270; const right_down = 315; const right = 0; let choice = ""; if (testInterval(right_up, degree)){ choice = "right_up"; } else if (testInterval(up, degree)) { choice = "up"; } else if (testInterval(left_up, degree)) { choice = "left_up"; } else if (testInterval(left, degree)) { choice = "left"; } else if (testInterval(left_down, degree)) { choice = "left_down"; } else if (testInterval(down, degree)) { choice = "down"; } else if (testInterval(right_down, degree)) { choice = "right_down"; } else { choice = "right"; } console.log(choice); Socket.send(choice); } } function parseObj(sub, el) { for (var i in sub) { if (typeof sub[i] === 'object' && el) { parseObj(sub[i], el[i]); } else if (el && el[i]) { el[i].innerHTML = sub[i]; } } } setTimeout(function () { parseObj(obj, els); }, 0); } var nbEvents = 0; // Dump data function dump(evt) { setTimeout(function () { if (evt == "end") { console.log(JSON.stringify(evt)); Socket.send(evt); } var newEvent = document.createElement('div'); newEvent.innerHTML = '#' + nbEvents + ' : <span class="data">' + evt + '</span>'; nbEvents += 1; }, 0); } </script> </body></html> )=====";
Austrian architect and urbanist Wagner studied architecture at the School of Architecture at Vienna Academy, Austria, where he later became a teacher. Among his students were the renowned Art Nouveau architects Josef Maria Olbrich and Josef Hoffmann. From 1895 he was influenced by new art styles, more suited to the needs of modern way of life and developed his theories on architecture, relating to function, material and construction, in the book "Modern Architecture" (1895). In 1898, he built his first Art Nouveau building, the Majolica House in Vienna, a functional structure with the facade covered in multicolored majolica tiles. He also designed in 1894, the Vienna metropolitan railway system. Otto Wagner was one of the founding members of the Vienna Secession, with fellow artists Klimt, Hoffmann and Olbrich, in 1899. He was one of the most influential artists of the turn of the century : architect, urnbanist, applied artist and theoretician, his writings laid the groundwork for Modernism in architecture. In his architectural works, he was receptive to the use of modern methods of building (steel frame construction) and new materials (thin marble slabs for the façades). Majolica House on the Wienzeile, Vienna, Austria (1898-1899); Stadtbahn (metropolitan railway system), Vienna (1894-1902); Post Office Savings Bank (Die Österreichische Postsparkasse) Building, Vienna (1894-1902).
Gaia theory is a class of scientific models of the geo-biosphere in which life as a whole fosters and maintains suitable conditions for itself by helping to create an environment on Earth suitable for its continuity. The first such theory was created by the atmospheric scientist and chemist, Sir James Lovelock, who developed his hypotheses in the 1960s before formally publishing the concept, first in the New Scientist (February 13, 1975) and then in the 1979 book "Quest for Gaia". He hypothesized that the living matter of the planet functioned like a single organism and named this self-regulating living system after the Greek goddess, Gaia, using a suggestion of novelist William Golding. Gaia "theories" have non-technical predecessors in the ideas of several cultures. Today, "Gaia theory" is sometimes used among non-scientists to refer to hypotheses of a self-regulating Earth that are non-technical but take inspiration from scientific models. Among some scientists, "Gaia" carries connotations of lack of scientific rigor, quasi-mystical thinking about the planet arth, and therefore Lovelock's hypothesis was received initially with much antagonism by much of the scientific community. No controversy exists, however, that life and the physical environment significantly influence one another. Gaia theory today is a spectrum of hypotheses, ranging from the undeniable (Weak Gaia) to the radical (Strong Gaia). At one end of this spectrum is the undeniable statement that the organisms on the Earth have radically altered its composition. A stronger position is that the Earth's biosphere effectively acts as if it is a self-organizing system, which works in such a way as to keep its systems in some kind of meta-equilibrium that is broadly conducive to life. The history of evolution, ecology and climate show that the exact characteristics of this equilibrium intermittently have undergone rapid changes, which are believed to have caused extinctions and felled civilisations. Biologists and earth scientists usually view the factors that stabilize the characteristics of a period as an undirected emergent property or entelechy of the system; as each individual species pursues its own self-interest, for example, their combined actions tend to have counterbalancing effects on environmental change. Opponents of this view sometimes point to examples of life's actions that have resulted in dramatic change rather than stable equilibrium, such as the conversion of the Earth's atmosphere from a reducing environment to an oxygen-rich one. However, proponents will point out that those atmospheric composition changes created an environment even more suitable to life. Some go a step further and hypothesize that all lifeforms are part of a single living planetary being called Gaia. In this view, the atmosphere, the seas and the terrestrial crust would be results of interventions carried out by Gaia through the coevolving diversity of living organisms. While it is arguable that the Earth as a unit does not match the generally accepted biological criteria for life itself (Gaia has not yet reproduced, for instance), many scientists would be comfortable characterising the earth as a single "system". The most extreme form of Gaia theory is that the entire Earth is a single unified organism; in this view the Earth's biosphere is consciously manipulating the climate in order to make conditions more conducive to life. Scientists contend that there is no evidence at all to support this last point of view, and it has come about because many people do not understand the concept of homeostasis. Many non-scientists instinctively see homeostasis as an activity that requires conscious control, although this is not so. Much more speculative versions of Gaia theory, including all versions in which it is held that the Earth is actually conscious or part of some universe-wide evolution, are currently held to be outside the bounds of science. This article is licensed under the GNU Free Documentation License. It uses material from the Wikipedia article "Gaia".
Animals. Can’t live with ‘em, can’t live without eating ‘em. (Just kidding, vegans!) Whether or not you do eat them, you certainly don’t want to waste any of the precious meat — and that’s what normally happens when a machine, not a human, tries to butcher an animal. After all, each animal is a different size and shape. Enter Automated Lamb Boning. Developed by Scott Technology LTD, a New Zealand-based lamb exporter, this process uses X-ray technology to measure the inner dimensions of a lamb carcass to make cuts accurate and reduce waste. Using the X-ray of each carcass, the 100% automated processing plant can adjust its robotic arms, claws, grippers, torso impalers and conveyor belts to make the most accurate cuts. Watch the video (not for the squeamish) to see how efficiently it produces crown racks, chops and more. Related on SmartPlanet: - Video: Machine scoops up, deposits ketchup — in same shape - Self-sculpting sand assembles itself into shapes - Small, speedy robots zip, roll and swarm through the air - Lockheed Martin debuts maple seed-inspired drone - Video: Scientists create micro-robots that form assembly lines via: Popular Science
Friday, August 02, 2013 Anarchy and War in South America GA 10:57 AM   Peace in Latin America is over-determined. Trade, investment, institutions, democracy, low security dilemma (geography), tiny security forces etc... Anonymous,  12:39 PM   I think the parallels to the 1930 and post 9/11 era are bogus. The 2008 economic crisis does not approach the magnitude nor intensity of the 1930s. In much of Latin America the commodities boom tapered off. The 9/11 conflicts (Iraq and Aghanistan) in particular are not analogous to the 1930s. The Nye Committee and the Congress of the United States was promoting non-intervention and isolationism due to their reading of WWI as a failure. This was a war that crippled great powers. In addition the high-minded left, angered over the social and economic crisis of capitalism, perhaps looking to the USSR as a potential model, repeatedly cited pacifism in agreeing to this agenda. The world paid a heavy price for a weak US foreign policy. Anonymous,  10:33 PM   I disagree that humankind is negatively impacted by US not intervening in other nations' affairs. The US has been a major contributor toward stifling democracy and thuggish and repressive as this empire supported brutal dictatorships in the Americas for a many, many years. The trail of blood comes before WW1--and was developed I to a river after WW2. US needs to "help" the millions being driven into peonage in its own country. Not advancing misery and barbarity is the best 'help' Uncle Sam can provide the world. The vast majority of humans on this abet, Earth, concur with this sentiment--as they/we are what we call 'sentient' as a whole, as a specie, a pattern of life. Anonymous,  7:58 AM   My point was in the 1930s America followed a weak foreign policy that prioritized the domestic crisis and deemphasized engagement in world affairs. The world was not better off w/o the leadership of the US. The left and the right both supported these policies for different reasons. The Spanish Civil War, increasing the militarism of Germany, Italy and Japan. We know what followed. Instead of a blanket denunciation of US foreign policy, the river of blood is a weak metaphor, maybe you should consider the alternative. Justin Delacour 6:07 PM   The U.S. and British refusal to intervene in the Spanish Civil War would have happened regardless of whether or not there was isolationist sentiment at the time. The problem on the Spanish question was not isolationist sentiment but rather that the British and American foreign services leaned in favor of Franco. That's why the Western powers didn't provide the Spanish Republic with weaponry. In other words, Hitler and Mussolini's first victory in the lead-up to World War II was not due to isolationist sentiment but rather to U.S. and British distaste for a left-leaning Spanish Republic. The historian Douglas Little has done extensive research on this and published a book in 1985 entitled "Malevolent Neutrality: The United States, Great Britain, and the Origins of the Spanish Civil War." To be sure, American power could conceivably serve as a force for peace, democracy and stability in the world. However, the problem is that the American state doesn't always deem it to be in its interests to defend democracy or to deter the old right from attacking it. In other words, once the isolationist sentiments are no longer prevalent, there's no guarantee that the American state will necessarily make sound use of its power in the world. Anonymous,  7:17 PM   The issue was not the direct military intervention of the United States in the Spanish Civil War. However, it was undeniably true that throughout the crises of the 1930s the Roosevelt administration was sympathetic to international coordination to deal with the various aggressions. As you note the diplomatic corps was riddled with people who did not see the looming threats and rationalized the actions of aggressive powers. However the laws prohibited US engagement after 1935. The various neutrality acts became a serious impediment to the US preparing for WWII (and acting as a potential deterrent). American military weakness and lack of engagement was understood by Hitler and Japan as another clue that they could proceed w/o serious consequences. For that we can thank midwestern isolationists and the pacifist and radical left. In effect, the two arguments were 1) pro-Nazi, and 2) pro-Stalin. Justin Delacour 12:43 AM   The left was not responsible for the fact that Britain and the United States refused to provide armaments to the Spanish Republic. Rather, the Left advocated quite the opposite. Thus, the Left cannot be held responsible for the fact that the United States and Britain failed to stand up to Hitler and Mussolini in Spain. To be sure, there were no doubt leftists who had some isolationist sentiments at different junctures in the inter-war period, but to imply that the Left and Nazi sympathizers were the sole source of appeasement in the period would be erroneous. Anonymous,  7:52 AM   I did not say that, Justin. I am well aware of when the Popular Front strategy was in effect and when it was not. This is a straw man argument. Was the left responsible for the popularity of the pacifist thinking--the so-called Oxford pledge? Was the left responsible for promoting neutrality while the Molotov-Ribbentrop Pact was in effect and the USSR/Nazi Germany started the war on the same side? The time period is very confusing but my basic point remains. During the 1930s the US policy of weakness and non-engagement did not further the cause of international peace. Quite the opposite. Anonymous,  7:57 AM Justin Delacour 8:26 PM   It probably holds a bit of responsibility, but I wouldn't concur with the thesis that it holds primary responsibility for how the U.S. and Britain responded to the threats of the inter-war period because the Left never held much sway among the American and British political establishments. Unfortunately, the American Communist Party was always in lock-step with Stalin on foreign policy issues, but I think that has very little bearing on the decisions that the Roosevelt Administration made. Fair enough. My point is that the responsibility for that lies primarily with the political establishments of Britain and the United States at the time, not the Left. Justin Delacour 11:27 PM   the USSR/Nazi Germany started the war on the same side And, by the way, it's important to get the historical facts straight. Stalin's pact with Hitler was indeed treacherous, but to say that that the USSR/Nazi Germany "started the war on the same side" is egregiously inaccurate because the Soviets didn't start the war and had no part in the conflict in the period to which you're referring. Nor is it accurate to say the Soviets were on the Germans' side because the Soviets were not initially a party to the conflict. Rather, Stalin's pact with Hitler was that the Soviets wouldn't enter the war in exchange for Hitler's assurance that the Germans wouldn't invade the Soviet Union. You ought to be more clear, though, that the Germans started World War II, not the Soviets. Anonymous,  11:47 PM   Ask Poles (and Finns) if Stalin joined Hitler's war in September 1939.. Justin Delacour 12:56 AM   I don't think you could find one respectable historian who would consider it accurate to say "the USSR/Nazi Germany started the war on the same side" because the USSR didn't enter World War II until 1941. The Soviet annexation of eastern Poland and the invasion of Finland are separate events from World War II. Anonymous,  10:05 AM That was easy. Your painful defense of the USSR's actions (while condemning western actions in the 1930s) says it all. Where do you get this bs that the "Soviets had no part in the conflict" until 1941. The decision to sign the pact was what gave Hitler the final green light. He had no fear of a two front war and/or resistance from within the German high command. Every reputable interpretation, except by pro-Soviet historians, suggests Stalin believed in the pact and supported it actively. He was surprised and betrayed by the 1941 invasion. Of course your pro-Soviet thesis depended on denying the existence of the pact for 50 years and a brutal repression of Poland, Finland and the Baltic States. The pact was a foundational event of WWII and the Holocaust and can not be excluded just because it doesn't fit your argument. Justin Delacour 3:58 PM   That is absurd. I didn't defend anything the Soviet Union did. I certainly don't defend the Soviet annexation of eastern Poland. What I said is that it's wrong to misrepresent the historical facts. No respectable historian claims the "USSR/Nazi Germany started the war on the same side" because the Soviets didn't enter World War II until 1941. Robert Service is not a respectable historian. He's a ultra-right hack who sells books to other ultra-right sock puppets like yourself. Anonymous,  5:09 PM   Justin, You have 130 more historians to smear! Let’s look at this quote in detail. “The attack on Poland by Germany and the Soviet Union in September 1939 marked the beginning of an unprecedented war of conquest and extermination, in which Germany inflicted immeasurable suffering on its neighbours across the whole of Europe, above all in central and eastern Europe and especially in Poland and the Soviet Union.” Justin Delacour 5:31 PM   Regardless of the horrors for which Stalin was responsible, the simple fact of the matter is that the Soviets didn't start World War II. The point is elementary. And the quote to which you refer doesn't lay blame on the Soviets for starting World War II. By your absurd logic, the United States would be responsible for starting World War II as well because it wasn't willing to enter the war in 1939. Anonymous,  5:48 PM   Don't try to weasle. No one said the USSR started World War II. WWII was started when Hitler attacked Poland. The Russians were his allies as they joined in the attack three weeks later. The USSR denied the true nature of their alliance--why were the protocols kept secret after all-- for 50 years. The USSR also denied murdering 21,000 Polish troops at Katyn in 1940. According to your logic none of the USSR's actions until June 1941 are part of WWII. It is still painful for Putin and other non-communists to acknowledge the truth. The Russian participation in WWII was incredibly heroic and base at the same time. Just like the other great powers in the United Nations, only more so. Justin Delacour 6:24 PM   No, Mr. Sock Puppet, you're the one who's been acting acting like a weasel here by using very deceptive language designed to give the impression that Soviets were responsible for starting World War II. To write that "the USSR/Nazi Germany started the war on the same side" is egregiously problematic language, and you ought to acknowledge as much. As for dirty old secrets, there's no doubt that the Soviets have a whole slew of them, but there's also no doubt that the American state also has a lot of dirty old secrets that it has never wanted to come clean about. Great Powers invariably have a lot of dirty secrets because their desire to maintain their position of power periodically causes them to do things that violate their professed principles. Anonymous,  6:46 PM   You've lost the argument on substance but won on name-calling points. You've even restated my last point. The issue of whether the USSR was an ally of the Nazis between Aug. 1939 and June 1941 is not deceptive language. It is rooted in the secret protocols and the lived experience of Eastern Europeans. Justin Delacour 7:22 PM   Nothing like a sock puppet who declares himself victorious. setty 8:37 AM   Guys, go start your own blog. Greg: I haven't read the book, but I'd say that it's pretty silly to say Latin America is more peaceful when the US is there to offer a dispute resolution mechanism. The US has more often been the instigator of violence in the region. Today, there aren't interstate wars, but there are death tolls at wartime levels all along the cocaine corridor. And the guns and money for that largely come, once more, from the US. In terms of interstate peace in Latin America, the countries of the region have shown over the centuries that they don't have much interest in major wars. That may be because they are all highly centralized, and the frontier regions are generally marginal to the success or failure of the states. Most of the countries have more resources than people know what to do with, so they don't have all that much to fight over. If anything, having the US distracted and out of the picture is a big part of why Latin America has been at international peace for the last decade or so. If it would reduce the power of drug mafias, that would do even more for Latin America.   © Blogger templates The Professional Template by 2008 Back to TOP
XML Parsing in VB6 From Free Knowledge Base- The DUCK Project: information for everyone Jump to: navigation, search As long as the XML conforms to XML Syntax then it is easy enough to parse with a Visual BASIC application. You can code your own parser or use an existing XML parser. It is recommended that you use a parser that supports the XML Document Object Model (DOM). Microsoft XML Parser (Msxml.dll) Microsoft's implementation of the DOM fully supports the W3C standard and has additional features that make it easier for you to work with XML files from your programs. Msxml.dll contains the type library and implementation code via a set of standard COM interfaces. Set objParser = CreateObject( "Microsoft.XMLDOM" ) If you're working with Visual Basic, you can access the DOM by setting a reference to the MSXML type library, provided in Msxml.dll. VB6 References: Microsoft XML, version 2.0 Dim xDoc As MSXML.DOMDocument Set xDoc = New MSXML.DOMDocument To load an XML document, create an instance of the DOMDocument class: Dim xDoc As MSXML.DOMDocument Set xDoc = New MSXML.DOMDocument If xDoc.Load("C:\My Documents\cds.xml") Then Do this if it loads If it fails to load End If Set xDoc = Nothing ReadyState Properties: State Value 0 = Uninitialized: loading has not started. 1 = Loading: while the load method is executing. 2 = Loaded: load method is complete. 3 = Interactive: enough of the DOM is available for read-only examination and the data has only been partially parsed. 4 = Completed: data is loaded and parsed and available for read/write operations. loading a file from a URL example: xDoc.async = False If xDoc.Load("http://www.blah.com/blah.xml") Then blah blah blah blah End If By setting the document's Async property to False, the parser will not return control to your code until the document is completely loaded and ready for manipulation. If you leave it set to True, you will need to either examine the ReadyState property before accessing the document or use the DOMDocument's events to have your code notified when the document is ready.
The conference aims to promote greater interdisciplinary in EU studies and to generate a dialogue between EU studies and European studies. To this end the conference will explore the key themes around which the “cosmopolitan agenda” in European studies is coalescing: Europeanization as a designation for the transformation of contemporary Europe; the complex relationship between globalization and the EU; the democratic potential of political contestation and claims-making in the “knowledge society”; and the cosmopolitan dimension to the self-identity of Europeans. Main conference themes: * Globalization: European experiences * Rethinking Europe: Networks, territory, society * Cosmopolitanism and cultural identity * Citizenship and Democracy
RIS - Brno local public transport system control and information system Brno Public Transport Authority (Dopravní podnik města Brna, a.s.) created a modern tool for the control of local public transport back in 2004, a tool that was quite unique in the world and that is used primarily to immediately identify deviations in the operation of local public transport and rectify these quickly and successfully. The information available allows the dispatcher to takes decisions based on actual, undistorted, objective facts. Moreover, the system allows for immediate checking of the response to the dispatcher’s decision. The control and information system (“RIS”) is therefore a crucial element in ensuring the safety, quality, economic efficiency and culture of transport operated by DPMB, a.s. RIS is based on a data radio network that ensures continual contact between all local public transport vehicles and dispatching. Each vehicle automatically informs dispatching of its operating data every 25 seconds, including the actual time of departing a stop, actual location according to GPS satellite navigation and other important operating data. If required, text messages and commands for information facilities for passengers are sent from the vehicle to central office, and vice versa. RIS also ensures telephone communication between the dispatcher and the driver of a particular vehicle or group of vehicles and if required allows the dispatcher to talk to passengers in a vehicle over loudspeakers. Dispatchers are able to display data about operation as a table of vehicles on individual lines and as a visual of operation directly on a digital map of Brno. The location of vehicles is shown on the map in real scale and each vehicle has a coloured tag featuring the most important operating data. The colour of the tag denotes a real-time deviation from the timetable, meaning that the dispatcher is easily able to identify the vehicles that are ahead of schedule, delayed or deviating from the set route. Of course, our dispatchers are happiest when they can see a screen full of vehicles with green tags that are travelling within the permitted parameters. The information system allows us to ensure that the information provided to passengers is of a relatively high quality. All vehicles are fitted with sound systems, the names of the stops being announced en-route, together with other important travel information. Audio information is pointedly provided to passengers together with the visual information displayed on banners inside and outside the vehicle, meaning at the right time and in the right place. Communication between the system in the vehicle and the remote control system for the blind is a matter of course. The control and information system ensures that local public transport vehicles are given preference more effectively at controlled crossings. A delayed vehicle sends a preference request from a pre-determined place by way of radio data transmission. The traffic light control unit receives information about the route the bus takes when passing through the crossing and about the delay and can therefore appropriately allow the vehicle to pass smoothly through the crossing within the traffic light signalling plan. This so-called dynamic preference makes it possible to manage each and every second of the traffic signal plan and as a consequence ensures better passability for all vehicles, not only trams, trolley buses and buses. The data recorded by the control and information system is archived, meaning that public transport operation can also be evaluated retrospectively and for a longer period of time. We use this opportunity when responding to situations and complaints and suggestions from passengers and when evaluating delays on specific lines or in specific places. General awareness that the control and information system in place means that human error on the part of our staff cannot be kept a secret is now of considerable importance to the quality of transport. Evidence for this is provided by the fact that the vast majority of complaints are evaluated as being unfounded based on the data recorded by the control and information system.
#include "signing.hpp" #ifndef __linux__ #include <wincrypt.h> #include <wintrust.h> #include <windows.h> #pragma comment(lib, "crypt32.lib") //https://stackoverflow.com/questions/7241453/read-and-validate-certificate-from-executable /* https://stackoverflow.com/questions/84847/how-do-i-create-a-self-signed-certificate-for-code-signing-on-windows CA: makecert -r -pe -n "CN=InterceptSignTest CA" -ss CA -sr CurrentUser -a sha256 -cy authority -sky signature -sv InterceptSignTest.pvk InterceptSignTestCA.cer CodesignCert: makecert -pe -n "CN=InterceptSignTest SPC" -a sha256 -cy end -sky signature -ic InterceptSignTestCA.cer -iv InterceptSignTest.pvk -sv InterceptSignTestCodeSignCert.pvk InterceptSignTestCodeSignCert.cer PFX: pvk2pfx -pvk InterceptSignTestCodeSignCert.pvk -spc InterceptSignTestCodeSignCert.cer -pfx InterceptSignTestCodeSignCert.pfx sign binary: signtool sign /v /f InterceptSignTestCodeSignCert.pfx /t http://timestamp.comodoca.com/authenticode SignatureCheck.exe */ unsigned char coreCACert[] = { 0x30, 0x82, 0x05, 0x94, 0x30, 0x82, 0x03, 0x7C, 0xA0, 0x03, 0x02, 0x01, 0x02, 0x02, 0x09, 0x00,0xDF, 0xE4, 0xAA, 0xD1, 0xDD, 0x14, 0xD7, 0x1C, 0x30, 0x0D, 0x06, 0x09, 0x2A, 0x86, 0x48, 0x86, 0xF7, 0x0D, 0x01, 0x01, 0x0B, 0x05, 0x00, 0x30, 0x57, 0x31, 0x0B, 0x30, 0x09, 0x06, 0x03, 0x55,0x04, 0x06, 0x13, 0x02, 0x44, 0x45, 0x31, 0x10, 0x30, 0x0E, 0x06, 0x03, 0x55, 0x04, 0x08, 0x0C, 0x07, 0x47, 0x65, 0x72, 0x6D, 0x61, 0x6E, 0x79, 0x31, 0x12, 0x30, 0x10, 0x06, 0x03, 0x55, 0x04,0x0A, 0x0C, 0x09, 0x49, 0x6E, 0x74, 0x65, 0x72, 0x63, 0x65, 0x70, 0x74, 0x31, 0x0B, 0x30, 0x09, 0x06, 0x03, 0x55, 0x04, 0x0B, 0x0C, 0x02, 0x43, 0x41, 0x31, 0x15, 0x30, 0x13, 0x06, 0x03, 0x55,0x04, 0x03, 0x0C, 0x0C, 0x49, 0x6E, 0x74, 0x65, 0x72, 0x63, 0x65, 0x70, 0x74, 0x20, 0x43, 0x41, 0x30, 0x1E, 0x17, 0x0D, 0x31, 0x37, 0x31, 0x31, 0x30, 0x32, 0x31, 0x31, 0x33, 0x36, 0x32, 0x38,0x5A, 0x17, 0x0D, 0x33, 0x37, 0x31, 0x30, 0x32, 0x38, 0x31, 0x31, 0x33, 0x36, 0x32, 0x38, 0x5A, 0x30, 0x57, 0x31, 0x0B, 0x30, 0x09, 0x06, 0x03, 0x55, 0x04, 0x06, 0x13, 0x02, 0x44, 0x45, 0x31,0x10, 0x30, 0x0E, 0x06, 0x03, 0x55, 0x04, 0x08, 0x0C, 0x07, 0x47, 0x65, 0x72, 0x6D, 0x61, 0x6E, 0x79, 0x31, 0x12, 0x30, 0x10, 0x06, 0x03, 0x55, 0x04, 0x0A, 0x0C, 0x09, 0x49, 0x6E, 0x74, 0x65,0x72, 0x63, 0x65, 0x70, 0x74, 0x31, 0x0B, 0x30, 0x09, 0x06, 0x03, 0x55, 0x04, 0x0B, 0x0C, 0x02, 0x43, 0x41, 0x31, 0x15, 0x30, 0x13, 0x06, 0x03, 0x55, 0x04, 0x03, 0x0C, 0x0C, 0x49, 0x6E, 0x74,0x65, 0x72, 0x63, 0x65, 0x70, 0x74, 0x20, 0x43, 0x41, 0x30, 0x82, 0x02, 0x22, 0x30, 0x0D, 0x06, 0x09, 0x2A, 0x86, 0x48, 0x86, 0xF7, 0x0D, 0x01, 0x01, 0x01, 0x05, 0x00, 0x03, 0x82, 0x02, 0x0F,0x00, 0x30, 0x82, 0x02, 0x0A, 0x02, 0x82, 0x02, 0x01, 0x00, 0xC7, 0x34, 0x2F, 0x3D, 0x40, 0x30, 0x73, 0x52, 0x06, 0x14, 0x2B, 0xC1, 0x51, 0x84, 0x7D, 0x22, 0xAB, 0x81, 0xD4, 0x34, 0x3B, 0x79,0xF4, 0xE1, 0xC4, 0xBE, 0xA0, 0x6A, 0xCC, 0xC5, 0xDC, 0xB6, 0x5D, 0x54, 0x50, 0x50, 0xCF, 0x45, 0xA3, 0x52, 0x6A, 0x8F, 0xFD, 0x9C, 0x7E, 0x52, 0xAA, 0xCF, 0x0B, 0xF9, 0x8C, 0x31, 0x2A, 0x54,0x7B, 0xB4, 0x8B, 0x15, 0x0A, 0x7A, 0xBA, 0x45, 0x0C, 0x21, 0x7D, 0xA8, 0x68, 0xD2, 0xF2, 0xEE, 0xF8, 0x21, 0xCE, 0x14, 0x4B, 0x97, 0xA5, 0x64, 0x6D, 0xCD, 0x3A, 0x78, 0xB4, 0x15, 0x7A, 0x8E,0x15, 0xCC, 0x2C, 0x3A, 0x1C, 0x8B, 0x98, 0x80, 0xB6, 0xD7, 0x38, 0x32, 0x22, 0xE0, 0x40, 0xDE, 0xBA, 0x91, 0x91, 0x34, 0x43, 0xF2, 0x1B, 0xC9, 0xC2, 0xAD, 0xC5, 0xA2, 0xD4, 0xF3, 0xF6, 0x1A,0x0C, 0x79, 0xB5, 0x2B, 0x12, 0xC4, 0xEB, 0x8F, 0x84, 0xE7, 0xC1, 0x77, 0x4D, 0xCA, 0x6C, 0xAB, 0x77, 0xEB, 0x85, 0xD6, 0xCA, 0xA4, 0x4D, 0x8A, 0x82, 0xB1, 0x66, 0xAE, 0x24, 0xDA, 0x4B, 0xDA,0x33, 0xE0, 0x48, 0x75, 0xC3, 0x0C, 0x35, 0xF4, 0xFA, 0x42, 0x7D, 0x24, 0xF8, 0xCB, 0xFD, 0xE4, 0xBF, 0xF6, 0xAB, 0xF6, 0x72, 0x92, 0x86, 0xA8, 0xCA, 0x3C, 0x85, 0x24, 0x90, 0x3E, 0x1C, 0xEC,0x7B, 0x77, 0x3C, 0x4B, 0xF4, 0x37, 0x49, 0x40, 0xDF, 0x4C, 0x13, 0xC0, 0x53, 0x9F, 0x4E, 0x06, 0xAC, 0x8E, 0xF4, 0x5E, 0x57, 0x09, 0xFF, 0x20, 0x69, 0xEB, 0x10, 0x85, 0xB5, 0xD6, 0x95, 0x01,0xBE, 0xFD, 0x72, 0x93, 0x4B, 0x83, 0x70, 0x8D, 0xFB, 0x11, 0x6D, 0x4A, 0x9F, 0xD8, 0x2B, 0x2C, 0x5A, 0x67, 0x2D, 0x3E, 0x14, 0xC0, 0xF6, 0x2E, 0x63, 0xC1, 0x08, 0x9E, 0x95, 0x4D, 0x20, 0x71,0x1F, 0xC0, 0xFD, 0x52, 0x5C, 0x84, 0x12, 0x7F, 0x7F, 0x65, 0x62, 0xFE, 0xA5, 0xC5, 0x93, 0xF7, 0x36, 0xF5, 0xCB, 0x1B, 0xB2, 0x32, 0xF5, 0xE6, 0x56, 0x8A, 0xED, 0x32, 0x1F, 0xF6, 0xFD, 0x78,0xD2, 0x9E, 0xEB, 0x23, 0x6A, 0x57, 0x77, 0x6D, 0x48, 0x54, 0xD8, 0x25, 0xE2, 0x20, 0x1C, 0xB5, 0xC7, 0x18, 0xCD, 0x74, 0xCB, 0x6C, 0x20, 0x24, 0x7C, 0xC5, 0x6B, 0x55, 0x93, 0x8B, 0x62, 0x0C,0x11, 0x91, 0xB0, 0x27, 0xB7, 0x05, 0xDA, 0x1D, 0x46, 0x9B, 0x82, 0x75, 0x13, 0x84, 0x55, 0x0F, 0xCE, 0xF6, 0x45, 0xB5, 0x6A, 0x6E, 0x39, 0xC4, 0x7A, 0x1F, 0x58, 0x95, 0x37, 0xC3, 0x28, 0x0F,0x8A, 0xF1, 0xFE, 0xD7, 0x74, 0xFD, 0x71, 0x83, 0x9F, 0x5F, 0x58, 0xED, 0x20, 0x6F, 0x29, 0x7F, 0x1F, 0x12, 0x21, 0x76, 0xC2, 0x5D, 0x79, 0x9B, 0xB7, 0xA3, 0x82, 0xD6, 0x96, 0x1F, 0xC1, 0xC2,0xE8, 0x90, 0x43, 0x6D, 0x67, 0x00, 0xC8, 0x41, 0xB9, 0x76, 0x45, 0xD8, 0x0C, 0x5F, 0x9F, 0x5D, 0x37, 0xF2, 0xFB, 0x62, 0x56, 0x02, 0xBE, 0x68, 0xF5, 0x43, 0xC8, 0xBC, 0xB2, 0xFC, 0x9B, 0xE9,0xA4, 0x60, 0x54, 0xD2, 0x1D, 0x4C, 0xD7, 0x4F, 0xBB, 0xCA, 0x1A, 0x2E, 0x4D, 0xE5, 0xAD, 0x76, 0x57, 0xFB, 0x74, 0x1E, 0xBE, 0x6B, 0x8E, 0xBE, 0x90, 0xD6, 0x92, 0x93, 0x69, 0x7E, 0x43, 0x62,0x19, 0xE2, 0xF6, 0x10, 0xF7, 0x6C, 0x79, 0x89, 0x00, 0x08, 0x17, 0x69, 0xA0, 0x19, 0xAD, 0xC6, 0x52, 0x8C, 0x6E, 0xFE, 0x4D, 0x60, 0xEF, 0xFB, 0x95, 0x08, 0x4A, 0x96, 0xF5, 0xFE, 0x82, 0xF9,0x74, 0x1F, 0x01, 0x92, 0x90, 0x11, 0xFF, 0x23, 0x6E, 0xE9, 0xC7, 0x03, 0x3E, 0x0D, 0x31, 0x01, 0x7C, 0x49, 0x55, 0x35, 0x5F, 0x6D, 0x10, 0xBD, 0x50, 0x65, 0x7F, 0x88, 0x6A, 0x21, 0x84, 0xC5,0x90, 0x4C, 0x29, 0x6A, 0x05, 0x67, 0x17, 0x58, 0x96, 0x1D, 0x02, 0x03, 0x01, 0x00, 0x01, 0xA3, 0x63, 0x30, 0x61, 0x30, 0x1D, 0x06, 0x03, 0x55, 0x1D, 0x0E, 0x04, 0x16, 0x04, 0x14, 0xA4, 0xD6,0x8A, 0x2B, 0x70, 0xF8, 0x6B, 0x10, 0x56, 0xA6, 0x16, 0x29, 0x03, 0x5A, 0x97, 0xE2, 0xD0, 0x6E, 0x59, 0x63, 0x30, 0x1F, 0x06, 0x03, 0x55, 0x1D, 0x23, 0x04, 0x18, 0x30, 0x16, 0x80, 0x14, 0xA4,0xD6, 0x8A, 0x2B, 0x70, 0xF8, 0x6B, 0x10, 0x56, 0xA6, 0x16, 0x29, 0x03, 0x5A, 0x97, 0xE2, 0xD0, 0x6E, 0x59, 0x63, 0x30, 0x0F, 0x06, 0x03, 0x55, 0x1D, 0x13, 0x01, 0x01, 0xFF, 0x04, 0x05, 0x30,0x03, 0x01, 0x01, 0xFF, 0x30, 0x0E, 0x06, 0x03, 0x55, 0x1D, 0x0F, 0x01, 0x01, 0xFF, 0x04, 0x04, 0x03, 0x02, 0x01, 0x86, 0x30, 0x0D, 0x06, 0x09, 0x2A, 0x86, 0x48, 0x86, 0xF7, 0x0D, 0x01, 0x01,0x0B, 0x05, 0x00, 0x03, 0x82, 0x02, 0x01, 0x00, 0xBA, 0x48, 0xE8, 0x58, 0x0B, 0x94, 0xFA, 0x6E, 0x5D, 0xD2, 0xFA, 0x02, 0x37, 0x1B, 0x3E, 0xD1, 0x91, 0x2D, 0x2E, 0xAE, 0xED, 0x49, 0x35, 0xAF,0x6A, 0x75, 0x26, 0xB8, 0xB4, 0xFD, 0xE3, 0xDF, 0x94, 0x63, 0xC2, 0x1C, 0x26, 0x9C, 0xCD, 0xE9, 0xB5, 0x76, 0x74, 0x87, 0x2D, 0xE7, 0x7F, 0x1F, 0x5E, 0xED, 0x57, 0xC3, 0xBB, 0x70, 0xFD, 0xAB,0xBC, 0x37, 0x43, 0x62, 0x92, 0x6C, 0xE6, 0x1B, 0x84, 0x2C, 0x84, 0x43, 0x95, 0x4A, 0xCF, 0xDB, 0x4F, 0x36, 0xFE, 0xCB, 0x64, 0x8F, 0x69, 0xD1, 0xA1, 0xAE, 0xB0, 0xCB, 0x61, 0x33, 0xDA, 0xDE,0xAF, 0x69, 0x36, 0x86, 0x58, 0xFD, 0x70, 0xFA, 0x47, 0xBC, 0x2C, 0x34, 0xCF, 0xE6, 0x60, 0x5A, 0xBA, 0x1A, 0xE1, 0xA3, 0xB8, 0x98, 0xBF, 0x08, 0x3B, 0x2F, 0xC0, 0x4A, 0x9E, 0x7A, 0xC6, 0x45,0x29, 0xE8, 0x88, 0x2E, 0xB6, 0x1E, 0xD2, 0x80, 0x51, 0x86, 0x63, 0x69, 0x08, 0xDA, 0xA9, 0x8C, 0xD6, 0xEE, 0xE6, 0xBA, 0x6C, 0x49, 0xCF, 0x94, 0xC0, 0x60, 0x60, 0x44, 0x3C, 0x76, 0xCC, 0x0C,0x7F, 0x73, 0x65, 0x84, 0xD5, 0xCC, 0x97, 0xD2, 0xCC, 0xFF, 0x6E, 0x45, 0xAB, 0x1B, 0x33, 0xC3, 0x58, 0x3F, 0x15, 0x6D, 0xF8, 0x24, 0x91, 0x76, 0x37, 0xF9, 0xCE, 0x1D, 0x6E, 0xB3, 0x94, 0xAA,0x74, 0xF3, 0x20, 0xE4, 0x9C, 0x9E, 0x57, 0xDD, 0x05, 0x63, 0x5C, 0x34, 0xC7, 0xEA, 0x07, 0x84, 0x62, 0xA2, 0x27, 0xFE, 0x2F, 0xF1, 0xAB, 0x50, 0x4B, 0x51, 0x8B, 0x83, 0x6C, 0x18, 0x56, 0xD0,0xD9, 0x1D, 0x5C, 0xEA, 0x06, 0xD4, 0x5C, 0x29, 0x90, 0x88, 0x60, 0x92, 0xDD, 0x27, 0x2C, 0xA9, 0x82, 0xD2, 0xC9, 0x07, 0xFA, 0xF4, 0x33, 0x9E, 0x1C, 0x10, 0xA6, 0x0F, 0x22, 0x53, 0x9A, 0x69,0xE9, 0xB1, 0x9B, 0xAC, 0x30, 0x22, 0xED, 0xE5, 0x93, 0xCD, 0x81, 0x2F, 0xE2, 0xA7, 0x5C, 0xF4, 0x23, 0xA4, 0xE3, 0x63, 0x7A, 0x92, 0x23, 0x05, 0xCC, 0x55, 0x6E, 0x92, 0xAC, 0x81, 0x16, 0xB5,0x96, 0x40, 0x75, 0xF1, 0x00, 0xB0, 0x71, 0x4C, 0xD8, 0x03, 0x9E, 0x8E, 0xFC, 0x24, 0xB6, 0x6A, 0x8A, 0xC0, 0xE0, 0x3F, 0x4E, 0xB4, 0x08, 0x7F, 0xB5, 0x67, 0xF1, 0x96, 0xC0, 0x03, 0xA8, 0xBE,0xFA, 0xA3, 0x65, 0x13, 0xFA, 0x00, 0x5E, 0x1C, 0x40, 0xA0, 0xBF, 0xBB, 0x74, 0x89, 0xEE, 0x89, 0x6E, 0x43, 0x53, 0x63, 0xC0, 0x07, 0xF1, 0x98, 0x0E, 0xA2, 0x58, 0xCF, 0x61, 0x2A, 0xBE, 0xB7,0x15, 0x33, 0xEF, 0xB1, 0xF9, 0x8E, 0xDF, 0x08, 0xE0, 0xFF, 0xEF, 0x2B, 0x09, 0xF2, 0x9E, 0x99, 0xDB, 0x45, 0x5B, 0x7C, 0xE0, 0x0D, 0xFB, 0x67, 0x4F, 0xE7, 0x63, 0xC7, 0x1B, 0x87, 0xAE, 0x22,0x07, 0x2F, 0x7E, 0x1A, 0x28, 0xDD, 0x52, 0x90, 0x0D, 0x00, 0xCB, 0x51, 0x77, 0x43, 0xFA, 0x58, 0x24, 0x0B, 0x83, 0x60, 0x73, 0x74, 0xDE, 0xF0, 0xCC, 0x97, 0xB6, 0xF2, 0x96, 0xE0, 0x69, 0x19,0xB6, 0x3F, 0xD8, 0x08, 0xE6, 0x34, 0x7B, 0x4F, 0xB0, 0x72, 0xF0, 0xE8, 0xA1, 0xFA, 0xAE, 0xF2, 0xC8, 0xAB, 0xF4, 0x61, 0xCA, 0x27, 0xCB, 0x98, 0x9D, 0x03, 0x23, 0x10, 0xFE, 0x2E, 0x61, 0xB6,0xE8, 0x5C, 0x48, 0xA6, 0x62, 0x90, 0x76, 0x3C, 0x6B, 0x13, 0x77, 0xEB, 0x91, 0xD9, 0x5F, 0xB8, 0x0C, 0xB3, 0x8F, 0xE2, 0x96, 0x40, 0xDA, 0x1E, 0x45, 0x30, 0xB8, 0xAE, 0x66, 0x04, 0xBB, 0xB1,0x52, 0xD9, 0x9C, 0x20, 0xD4, 0xF1, 0x0F, 0xAF, 0x37, 0xDD, 0x10, 0x56, 0x34, 0x09, 0x49, 0xCF, 0x9D, 0x4B, 0x3A, 0x0C, 0xF7, 0xCB, 0xB2, 0xA5, 0x0A, 0xEE, 0x26, 0x03, 0x1A, 0x10, 0x02, 0xCC,0xAE, 0x40, 0x25, 0xE1, 0x01, 0xA7, 0x63, 0xB0 }; //Only debug #include <cryptuiapi.h> #pragma comment (lib, "cryptui.lib") using namespace intercept::types; typedef struct { LPWSTR lpszProgramName; LPWSTR lpszPublisherLink; LPWSTR lpszMoreInfoLink; } SPROG_PUBLISHERINFO, *PSPROG_PUBLISHERINFO; template <class T, auto D> class ManagedObject { public: T obj = nullptr; ManagedObject() = default; ManagedObject(T s) : obj(s) {} ~ManagedObject() { if (!obj) return; //Special case for CertCloseStore if constexpr (std::is_invocable_v<decltype(D), T, DWORD>) D(obj, 0); else D(obj); } T operator->() { return obj; } T* operator&() { return &obj; } T& operator*() { return *obj; } operator T() { return obj; } ManagedObject& operator=(T* s) { obj = s; return *this; } }; thread_local intercept::cert::signing::security_class intercept::cert::current_security_class = intercept::cert::signing::security_class::not_signed; std::pair<intercept::cert::signing::security_class, std::optional<std::string>> intercept::cert::signing::verifyCert(std::wstring_view file_path, types::r_string ca_cert) { ManagedObject<HCERTSTORE, CertCloseStore> hStore; ManagedObject<HCRYPTMSG, CryptMsgClose> hMsg; DWORD dwEncoding, dwContentType, dwFormatType; DWORD dwSignerInfo; CERT_INFO CertInfo; //file_path = file_path.substr(4); BOOL fResult = CryptQueryObject(CERT_QUERY_OBJECT_FILE, file_path.data(), CERT_QUERY_CONTENT_FLAG_PKCS7_SIGNED_EMBED, CERT_QUERY_FORMAT_FLAG_BINARY, 0, &dwEncoding, &dwContentType, &dwFormatType, &hStore, &hMsg, nullptr); if (!fResult) return {security_class::not_signed, fmt::format("CryptQueryObject failed: {}", GetLastError())}; // Get signer information size. fResult = CryptMsgGetParam(hMsg, CMSG_SIGNER_INFO_PARAM, 0, nullptr, &dwSignerInfo); if (!fResult) { auto errmsg = fmt::format("CryptMsgGetParam failed: {}", GetLastError()); return {security_class::not_signed, errmsg}; } // Allocate memory for signer information. ManagedObject<PCMSG_SIGNER_INFO, LocalFree> pSignerInfo = static_cast<PCMSG_SIGNER_INFO>(LocalAlloc(LPTR, dwSignerInfo)); if (!pSignerInfo) { return {security_class::not_signed, "LocalAlloc for signerInfo failed"}; } // Get Signer Information. fResult = CryptMsgGetParam(hMsg, CMSG_SIGNER_INFO_PARAM, 0, static_cast<PVOID>(pSignerInfo), &dwSignerInfo); if (!fResult) { auto errmsg = fmt::format("CryptMsgGetParam failed: {}", GetLastError()); return {security_class::not_signed, "LocalAlloc for signerInfo failed"}; } // Search for the signer certificate in the temporary // certificate store. CertInfo.Issuer = pSignerInfo->Issuer; CertInfo.SerialNumber = pSignerInfo->SerialNumber; //create in-memory CertStore to hold our CA ManagedObject<HCERTSTORE, CertCloseStore> hMemoryStore = CertOpenStore(CERT_STORE_PROV_MEMORY, X509_ASN_ENCODING | PKCS_7_ASN_ENCODING, NULL, 0, nullptr); if (!hMemoryStore) { auto errmsg = fmt::format("CertOpenStore failed: {}", GetLastError()); return {security_class::not_signed, errmsg}; } std::vector<unsigned char> data; data.resize(ca_cert.length()*2); //should be enough to store the decoded string DWORD derPubKeyLen = 2048; //This can fail if the key is invalid. But it can be invalid and still be signed with core key if (ca_cert.length() != 0 && CryptStringToBinaryA(ca_cert.data(), 0, CRYPT_STRING_BASE64HEADER, data.data(), &derPubKeyLen, nullptr, nullptr)) { ManagedObject<PCCERT_CONTEXT, CertFreeCertificateContext> ct = CertCreateCertificateContext(PKCS_7_ASN_ENCODING | X509_ASN_ENCODING, data.data(), derPubKeyLen); //auto lastError = GetLastError(); //CRYPT_E_EXISTS //E_INVALIDARG //Don't care if this errors. The key cert won't land in the store and chain building will fail. CertAddCertificateContextToStore( hMemoryStore, ct, CERT_STORE_ADD_ALWAYS, nullptr ); } //Add the core cert ManagedObject<PCCERT_CONTEXT, CertFreeCertificateContext> ct = CertCreateCertificateContext(PKCS_7_ASN_ENCODING | X509_ASN_ENCODING, coreCACert, sizeof(coreCACert)); CertAddCertificateContextToStore( hMemoryStore, ct, CERT_STORE_ADD_ALWAYS, nullptr ); debug_certs_in_store(hMemoryStore); debug_certs_in_store(hStore); ManagedObject<PCCERT_CONTEXT, CertFreeCertificateContext> pCertContext = CertFindCertificateInStore(hStore, X509_ASN_ENCODING | PKCS_7_ASN_ENCODING, 0, CERT_FIND_SUBJECT_CERT, static_cast<PVOID>(&CertInfo), nullptr); if (!pCertContext) { auto errmsg = fmt::format("CertFindCertificateInStore failed: {}", GetLastError()); return {security_class::not_signed, errmsg}; } ManagedObject<PCCERT_CHAIN_CONTEXT, CertFreeCertificateChain> chainContext; CERT_ENHKEY_USAGE EnhkeyUsage; CERT_USAGE_MATCH CertUsage; CERT_CHAIN_PARA ChainPara; EnhkeyUsage.cUsageIdentifier = 0; EnhkeyUsage.rgpszUsageIdentifier = nullptr; CertUsage.dwType = USAGE_MATCH_TYPE_AND; CertUsage.Usage = EnhkeyUsage; ChainPara.cbSize = sizeof(CERT_CHAIN_PARA); ChainPara.RequestedUsage = CertUsage; CERT_CHAIN_ENGINE_CONFIG ChainConfig; //- sizeof(DWORD) removes WIN8 only flag(dwExclusiveFlags) and makes this win7 compatible ChainConfig.cbSize = 80; //Hardcoded sizeof(CERT_CHAIN_ENGINE_CONFIG) for Win7 ChainConfig.hRestrictedRoot = nullptr; ChainConfig.hRestrictedTrust = nullptr; ChainConfig.hRestrictedOther = nullptr; ChainConfig.cAdditionalStore = 0; ChainConfig.rghAdditionalStore = nullptr; ChainConfig.dwFlags = CERT_CHAIN_CACHE_END_CERT; ChainConfig.dwUrlRetrievalTimeout = 0; ChainConfig.MaximumCachedCertificates = 0; ChainConfig.CycleDetectionModulus = 0; ChainConfig.hExclusiveRoot = hMemoryStore; ChainConfig.hExclusiveTrustedPeople = hMemoryStore; HCERTCHAINENGINE hChainEngine; const auto ret4 = CertCreateCertificateChainEngine( &ChainConfig, &hChainEngine); //auto err = GetLastError(); if (!ret4) { auto errmsg = fmt::format("CertCreateCertificateChainEngine failed: {}", GetLastError()); return {security_class::not_signed, errmsg}; } const auto ret = CertGetCertificateChain( hChainEngine, pCertContext, nullptr, hStore, //Has to be here so we can find intermediaries that are included in the plugins cert &ChainPara, CERT_CHAIN_REVOCATION_CHECK_CHAIN_EXCLUDE_ROOT, nullptr, &chainContext ); //chainContext.TrustStatus.dwErrorStatus should be 0x20 for CERT_TRUST_IS_UNTRUSTED_ROOT which is correct AUTHENTICODE_EXTRA_CERT_CHAIN_POLICY_PARA policy2 = { sizeof(policy2) }; policy2.dwRegPolicySettings = 0; policy2.pSignerInfo = pSignerInfo; AUTHENTICODE_EXTRA_CERT_CHAIN_POLICY_STATUS status2 = { sizeof(status2) }; CERT_CHAIN_POLICY_PARA policy = { sizeof(policy) }; policy.pvExtraPolicyPara = &policy2; CERT_CHAIN_POLICY_STATUS status = { sizeof(status) }; status.pvExtraPolicyStatus = &status2; const BOOL verified = CertVerifyCertificateChainPolicy(CERT_CHAIN_POLICY_BASE,//CERT_CHAIN_POLICY_AUTHENTICODE, chainContext, &policy, &status); if (!chainContext) return {security_class::not_signed, "CertVerifyCertificateChainPolicy failed to create chainContext"}; if (!verified) return {security_class::not_signed, "CertVerifyCertificateChainPolicy failed to verify"}; bool coreSigned = false; //If chain has more than a single element, grab the root cert and compare to our core CA if (chainContext->cChain >= 1 && chainContext->rgpChain[chainContext->cChain - 1]->cElement > 1) { auto CAContext = chainContext->rgpChain[chainContext->cChain - 1]->rgpElement[chainContext->rgpChain[chainContext->cChain - 1]->cElement - 1]->pCertContext; if (CAContext && ct && ct->cbCertEncoded == CAContext->cbCertEncoded) { //Check if the CA of this plugin matches the core CA coreSigned = std::memcmp(CAContext->pbCertEncoded, ct->pbCertEncoded, ct->cbCertEncoded) == 0; } } std::pair<security_class, std::optional<std::string>> returnCode = {security_class::not_signed, std::nullopt}; switch (status.dwError) { case 0x0: { returnCode.first = coreSigned ? security_class::core : security_class::self_signed; } break; case CRYPT_E_NO_REVOCATION_CHECK: { //No revocation list for cert if (chainContext->rgpChain[chainContext->cChain - 1]->cElement > 1 //have found parent cert && chainContext->rgpChain[chainContext->cChain - 1]->rgpElement[1]->pRevocationInfo //has revocation info && chainContext->rgpChain[chainContext->cChain - 1]->rgpElement[1]->pRevocationInfo->pCrlInfo //has CRL! ) { //parent has CRL but you don't! //#TODO warn } returnCode.first = coreSigned ? security_class::core : security_class::self_signed; } break; case CERT_E_REVOCATION_FAILURE: case CRYPT_E_REVOCATION_OFFLINE: returnCode.first = coreSigned ? security_class::core : security_class::self_signed; break; case CRYPT_E_REVOKED: //cert actively revoked returnCode.first = security_class::not_signed; returnCode.second = "Certificate Revoked"; break; case CERT_E_CHAINING: //Couldn't build chain returnCode.first = security_class::not_signed; returnCode.second = "Couldn't build chain"; break; } return returnCode; } /* #include "Windows.h" #include <future> typedef void*(NTAPI *rtl)(_In_ PVOID PcValue, _Out_ PVOID * BaseOfImage); extern "C" __declspec(dllexport) void myFunc() { HMODULE hmod; //RtlPcToFileHeader if (auto pcToHeader = GetProcAddress(GetModuleHandle(L"ntdll"), "RtlPcToFileHeader"); pcToHeader) { if (reinterpret_cast<rtl>(pcToHeader)(_ReturnAddress(), (void**)&hmod)) { char sz[MAX_PATH]; if (GetModuleFileNameA(hmod, sz, MAX_PATH)) { OutputDebugStringA(sz); } } } } */ void intercept::cert::signing::debug_certs_in_store([[maybe_unused]] HCERTSTORE store) { #ifdef __DEBUG PCCERT_CONTEXT pCertContextx = nullptr; while (pCertContextx = CertEnumCertificatesInStore(store, pCertContextx)) { CryptUIDlgViewContext(CERT_STORE_CERTIFICATE_CONTEXT, pCertContextx, nullptr, nullptr, 0, nullptr); } #endif } #else std::pair<intercept::cert::signing::security_class, std::optional<std::string>> intercept::cert::signing::verifyCert(std::wstring_view, types::r_string) { return {security_class::core, std::nullopt}; } void intercept::cert::signing::debug_certs_in_store(void*) {} #endif
/* Copyright (c) 2017 TOSHIBA Digital Solutions Corporation This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details. You should have received a copy of the GNU Affero General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. */ /** * @file * @brief C++ Driver template for the LEMON parser generator. * Just ported into C++ style. * */ #ifndef LEMPAR_CPP_wktParser_GENERATED_HPP #define LEMPAR_CPP_wktParser_GENERATED_HPP #ifdef _WIN32 #pragma warning(disable : 4065) #endif /* First off, code is included that follows the "include" declaration ** in the input grammar file. */ #include "wkt_token.h" #include "util/container.h" #include "gs_error.h" #include "qp_def.h" #include <cassert> #include <iostream> #include <stdexcept> #include "expression.h" #include "gis_multipolygon.h" #include "gis_pointgeom.h" #include "gis_polygon.h" #include "gis_polyhedralsurface.h" #include "gis_quadraticsurface.h" #ifdef _WIN32 #define atoll atol #endif /* ** Disable all error recovery processing in the parser push-down ** automaton. */ #define YYNOERRORRECOVERY 1 #define PRINT(...) namespace lemon_wktParser { struct wktParserArg { Expr **ev; TransactionContext *txn; ObjectManager *objectManager; FunctionMap *fmap; int err; }; }; #define WKTPARSER_NEW QP_ALLOC_NEW(arg->txn->getDefaultAllocator()) #define WKTPARSER_DELETE(x) QP_ALLOC_DELETE(arg->txn->getDefaultAllocator(), x) #include <iostream> /* Next is all token values, in a form suitable for use by makeheaders. ** This section will be null unless lemon is run with the -m switch. */ /* ** These constants (all generated automatically by the parser generator) ** specify the various kinds of tokens (terminals) that the parser ** understands. ** ** Each symbol here is a terminal symbol in the grammar. */ /* Make sure the INTERFACE macro is defined. */ #ifndef INTERFACE #define INTERFACE 1 #endif /* The next thing included is series of defines which control ** various aspects of the generated parser. ** wktParser_YYCODETYPE is the data type used for storing terminal ** and nonterminal numbers. "unsigned char" is ** used if there are fewer than 250 terminals ** and nonterminals. "int" is used otherwise. ** wktParser_YYNOCODE is a number of type wktParser_YYCODETYPE *which corresponds ** to no legal terminal or nonterminal number. This ** number is used to fill in empty slots of the hash ** table. ** wktParser_YYFALLBACK If defined, this indicates that one or more *tokens ** have fall-back values which should be used if the ** original value of the token will not parse. ** wktParser_YYACTIONTYPE is the data type used for storing terminal ** and nonterminal numbers. "unsigned char" is ** used if there are fewer than 250 rules and ** states combined. "int" is used otherwise. ** wktParserTOKENTYPE is the data type used for minor tokens given ** directly to the parser from the tokenizer. ** wktParser_YYMINORTYPE is the data type used for all minor tokens. ** This is typically a union of many types, one of ** which is wktParserTOKENTYPE. The entry in the union ** for base tokens is called "yy0". ** wktParser_YYSTACKDEPTH is the maximum depth of the parser's stack. *If ** zero the stack is dynamically sized using realloc() ** wktParserARG_SDECL A static variable declaration for the *%extra_argument ** wktParserARG_PDECL A parameter declaration for the %extra_argument ** wktParser_YYNSTATE the combined number of states. ** wktParser_YYNRULE the number of rules in the grammar ** wktParser_YYERRORSYMBOL is the code number of the error symbol. If *not ** defined, then do no error processing. */ #define wktParser_YYCODETYPE unsigned char #define wktParser_YYNOCODE 35 #define wktParser_YYACTIONTYPE unsigned char #define wktParser_YYWILDCARD 1 #define wktParserTOKENTYPE Token typedef union { int yyinit; wktParserTOKENTYPE yy0; QuadraticSurface *yy2; double yy8; MultiPolygon *yy22; MultiPoint *yy28; QP_XArray<Expr *> *yy29; QP_XArray<Point *> *yy30; Polygon *yy35; Expr *yy46; QP_XArray<Polygon *> *yy47; QP_XArray<MultiPoint *> *yy59; Point *yy61; } wktParser_YYMINORTYPE; #ifndef wktParser_YYSTACKDEPTH #define wktParser_YYSTACKDEPTH 2000 #endif #define wktParserARG_SDECL lemon_wktParser::wktParserArg *arg #define wktParserARG_PDECL , lemon_wktParser::wktParserArg *arg #define wktParserARG_STORE this->arg = arg #define wktParser_YYNSTATE 80 #define wktParser_YYNRULE 38 #define wktParser_YY_NO_ACTION (wktParser_YYNSTATE + wktParser_YYNRULE + 2) #define wktParser_YY_ACCEPT_ACTION (wktParser_YYNSTATE + wktParser_YYNRULE + 1) #define wktParser_YY_ERROR_ACTION (wktParser_YYNSTATE + wktParser_YYNRULE) /* The yyzerominor constant is used to initialize instances of ** wktParser_YYMINORTYPE objects to zero. */ static const wktParser_YYMINORTYPE wktParser_yyzerominor = {0}; /* Define the yytestcase() macro to be a no-op if is not already defined ** otherwise. ** ** Applications can choose to define yytestcase() in the %include section ** to a macro that can assist in verifying code coverage. For production ** code the yytestcase() macro should be turned off. But it is useful ** for testing. */ #ifndef yytestcase #define yytestcase(X) #endif /*! * @brief wktParser * */ namespace lemon_wktParser { /*! * @brief wktParser parser main * */ class wktParser { /* Next are the tables used to determine what action to take based on the ** current state and lookahead token. These tables are used to implement ** functions that take a state number and lookahead value and return an ** action integer. ** ** Suppose the action integer is N. Then the action is determined as ** follows ** ** 0 <= N < wktParser_YYNSTATE Shift N. That is, push the *lookahead ** token onto the stack and goto state N. ** ** wktParser_YYNSTATE <= N < wktParser_YYNSTATE+wktParser_YYNRULE Reduce by *rule N-wktParser_YYNSTATE. ** ** N == wktParser_YYNSTATE+wktParser_YYNRULE A syntax error has *occurred. ** ** N == wktParser_YYNSTATE+wktParser_YYNRULE+1 The parser accepts *its input. ** ** N == wktParser_YYNSTATE+wktParser_YYNRULE+2 No such action. *Denotes unused ** slots in the yy_action[] table. ** ** The action table is constructed as a single large table named yy_action[]. ** Given state S and lookahead X, the action is computed as ** ** yy_action[ yy_shift_ofst[S] + X ] ** ** If the index value yy_shift_ofst[S]+X is out of range or if the value ** yy_lookahead[yy_shift_ofst[S]+X] is not equal to X or if yy_shift_ofst[S] ** is equal to wktParser_YY_SHIFT_USE_DFLT, it means that the action is not in *the table ** and that yy_default[S] should be used instead. ** ** The formula above is for computing the action when the lookahead is ** a terminal symbol. If the lookahead is a non-terminal (as occurs after ** a reduce action) then the yy_reduce_ofst[] array is used in place of ** the yy_shift_ofst[] array and wktParser_YY_REDUCE_USE_DFLT is used in place *of ** wktParser_YY_SHIFT_USE_DFLT. ** ** The following are the tables generated in this section: ** ** yy_action[] A single table containing all actions. ** yy_lookahead[] A table containing the lookahead for each entry in ** yy_action. Used to detect hash collisions. ** yy_shift_ofst[] For each state, the offset into yy_action for ** shifting terminals. ** yy_reduce_ofst[] For each state, the offset into yy_action for ** shifting non-terminals after a reduce. ** yy_default[] Default action for each state. */ #define wktParser_YY_ACTTAB_COUNT (240) #define wktParser_YY_SHIFT_USE_DFLT (-7) #define wktParser_YY_SHIFT_COUNT (51) #define wktParser_YY_SHIFT_MIN (-6) #define wktParser_YY_SHIFT_MAX (126) #define wktParser_YY_REDUCE_USE_DFLT (-14) #define wktParser_YY_REDUCE_COUNT (28) #define wktParser_YY_REDUCE_MIN (-13) #define wktParser_YY_REDUCE_MAX (206) #define wktParser_YYNFALLBACK (1) static const wktParser_YYACTIONTYPE yy_action[wktParser_YY_ACTTAB_COUNT]; static const wktParser_YYCODETYPE yy_lookahead[wktParser_YY_ACTTAB_COUNT]; static const short yy_shift_ofst[wktParser_YY_SHIFT_COUNT + 1]; static const short yy_reduce_ofst[wktParser_YY_REDUCE_COUNT + 1]; static const wktParser_YYACTIONTYPE yy_default[]; /* The next table maps tokens into fallback tokens. If a construct ** like the following: ** ** %fallback ID X Y Z. ** ** appears in the grammar, then ID becomes a fallback token for X, Y, ** and Z. Whenever one of the tokens X, Y, or Z is input to the parser ** but it does not parse, the type of the token is changed to ID and ** the parse is retried before an error is thrown. */ #ifdef wktParser_YYFALLBACK static const wktParser_YYCODETYPE yyFallback[wktParser_YYNFALLBACK]; #endif /* wktParser_YYFALLBACK */ /* The following structure represents a single element of the ** parser's stack. Information stored includes: ** ** + The state number for the parser at this level of the stack. ** ** + The value of the token stored at this level of the stack. ** (In other words, the "major" token.) ** ** + The semantic value stored at this level of the stack. This is ** the information used by the action routines in the grammar. ** It is sometimes called the "minor" token. */ /*! * @brief parser's stack */ struct yyStackEntry { wktParser_YYACTIONTYPE stateno; /* The state-number */ wktParser_YYCODETYPE major; /* The major token value. This is the code ** number for the token at this stack level */ wktParser_YYMINORTYPE minor; /* The user-supplied minor token value. This ** is the value of the token */ }; typedef struct yyStackEntry yyStackEntry; /* The state of the parser is completely contained in an instance of ** the following structure */ int yyidx; /* Index of top element in stack */ #ifdef wktParser_YYTRACKMAXSTACKDEPTH int yyidxMax; /* Maximum value of yyidx */ #endif int yyerrcnt; /* Shifts left before out of the error */ wktParserARG_SDECL; /* A place to hold %extra_argument */ #if wktParser_YYSTACKDEPTH <= 0 int yystksz; /* Current side of the stack */ yyStackEntry *yystack; /* The parser's stack */ #else yyStackEntry yystack[wktParser_YYSTACKDEPTH]; /* The parser's stack */ #endif #ifndef NDEBUG std::ostream *yyTraceFILE; const char *yyTracePrompt; #endif /* NDEBUG */ #ifndef NDEBUG /* ** Turn parser tracing on by giving a stream to which to write the trace ** and a prompt to preface each trace message. Tracing is turned off ** by making either argument NULL ** ** Inputs: ** <ul> ** <li> A FILE* to which trace output should be written. ** If NULL, then tracing is turned off. ** <li> A prefix string written at the beginning of every ** line of trace output. If NULL, then tracing is ** turned off. ** </ul> ** ** Outputs: ** None. */ public: void wktParserSetTrace(std::ostream *TraceFILE, const char *zTracePrompt) { yyTraceFILE = TraceFILE; yyTracePrompt = zTracePrompt; if (yyTraceFILE == 0) yyTraceFILE = 0; } #endif /* NDEBUG */ #ifndef NDEBUG protected: static const char *const yyTokenName[]; static const char *const yyRuleName[wktParser_YYNRULE]; #endif #if wktParser_YYSTACKDEPTH <= 0 /* ** Try to increase the size of the parser stack. */ void yyGrowStack() { int newSize; yyStackEntry *pNew; newSize = yystksz * 2 + 100; pNew = new yyStackEntry[newSize]; if (pNew) { memcpy(pNew, yystack, newSize * sizeof(pNew[0])); delete yystack; yystack = pNew; yystksz = newSize; #ifndef NDEBUG if (yyTraceFILE) { *yyTraceFILE << yyTracePrompt << "Stack grows to " << yystksz << " entries!" << std::endl; } #endif } } #endif /* ** This function allocates a new parser. ** The only argument is a pointer to a function which works like ** malloc. ** ** Inputs: ** A pointer to the function used to allocate memory. ** ** Outputs: ** A pointer to a parser. This pointer is used in subsequent calls ** to wktParser and wktParserFree. */ public: wktParser() { yyidx = -1; #ifdef wktParser_YYTRACKMAXSTACKDEPTH yidxMax = 0; #endif #if wktParser_YYSTACKDEPTH <= 0 yystack = NULL; yystksz = 0; yyGrowStack(); #else #endif #ifndef NDEBUG yyTraceFILE = NULL; #endif yyerrcnt = -1; } /* The following function deletes the value associated with a ** symbol. The symbol can be either a terminal or nonterminal. ** "yymajor" is the symbol code, and "yypminor" is a pointer to ** the value. */ void yy_destructor( wktParser_YYCODETYPE yymajor, /* Type code for object to destroy */ wktParser_YYMINORTYPE *yypminor /* The object to be destroyed */ ) { switch (yymajor) { /* Here is inserted the actions which take place when a ** terminal or non-terminal is destroyed. This can happen ** when the symbol is popped from the stack during a ** reduce or during error processing or when a parser is ** being destroyed before it is finished parsing. ** ** Note: during a reduce, the only symbols destroyed are those ** which appear on the RHS of the rule, but which are not used ** inside the C code. */ default: break; /* If no destructor action specified: do nothing */ } } /* ** Pop the parser's stack once. ** ** If there is a destructor routine associated with the token which ** is popped from the stack, then call it. ** ** Return the major token number for the symbol popped. */ int yy_pop_parser_stack() { wktParser_YYCODETYPE yymajor; yyStackEntry *yytos; if (yyidx < 0) return 0; yytos = &yystack[yyidx]; #ifndef NDEBUG if (yyTraceFILE && yyidx >= 0) { *yyTraceFILE << yyTracePrompt << "Popping " << yyTokenName[yytos->major] << std::endl; } #endif yymajor = yytos->major; yy_destructor(yymajor, &yytos->minor); yyidx--; return yymajor; } /* ** Deallocate and destroy a parser. Destructors are all called for ** all stack elements before shutting the parser down. ** ** Inputs: ** <ul> ** <li> A pointer to the parser. This should be a pointer ** obtained from wktParserAlloc. ** <li> A pointer to a function used to reclaim memory obtained ** from malloc. ** </ul> */ public: ~wktParser() { while (yyidx >= 0) yy_pop_parser_stack(); #if wktParser_YYSTACKDEPTH <= 0 delete yystack; yystack = NULL; #endif } /* ** Return the peak depth of the stack for a parser. */ #ifdef wktParser_YYTRACKMAXSTACKDEPTH public: int wktParserStackPeak(void *p) { return yyidxMax; } #endif /* ** Find the appropriate action for a parser given the terminal ** look-ahead token iLookAhead. ** ** If the look-ahead token is wktParser_YYNOCODE, then check to see if the *action is ** independent of the look-ahead. If it is, return the action, otherwise ** return wktParser_YY_NO_ACTION. */ int yy_find_shift_action( wktParser_YYCODETYPE iLookAhead /* The look-ahead token */ ) { int i; int stateno = this->yystack[this->yyidx].stateno; if (stateno > wktParser_YY_SHIFT_COUNT || (i = yy_shift_ofst[stateno]) == wktParser_YY_SHIFT_USE_DFLT) { return yy_default[stateno]; } assert(iLookAhead != wktParser_YYNOCODE); i += iLookAhead; if (i < 0 || i >= wktParser_YY_ACTTAB_COUNT || yy_lookahead[i] != iLookAhead) { if (iLookAhead > 0) { #ifdef wktParser_YYFALLBACK wktParser_YYCODETYPE iFallback; /* Fallback token */ if (iLookAhead < wktParser_YYNFALLBACK && (iFallback = yyFallback[iLookAhead]) != 0) { #ifndef NDEBUG if (yyTraceFILE) { *yyTraceFILE << yyTracePrompt << "FALLBACK " << yyTokenName[iLookAhead] << " => " << yyTokenName[iFallback] << std::endl; } #endif return yy_find_shift_action(iFallback); } #endif #ifdef wktParser_YYWILDCARD { int j = i - iLookAhead + wktParser_YYWILDCARD; if ( #if wktParser_YY_SHIFT_MIN + wktParser_YYWILDCARD < 0 j >= 0 && #endif #if wktParser_YY_SHIFT_MAX + wktParser_YYWILDCARD >= wktParser_YY_ACTTAB_COUNT j < wktParser_YY_ACTTAB_COUNT && #endif yy_lookahead[j] == wktParser_YYWILDCARD) { #ifndef NDEBUG if (yyTraceFILE) { *yyTraceFILE << yyTracePrompt << "WILDCARD " << yyTokenName[iLookAhead] << " => " << yyTokenName[wktParser_YYWILDCARD] << std::endl; } #endif /* NDEBUG */ return yy_action[j]; } } #endif /* wktParser_YYWILDCARD */ } return yy_default[stateno]; } else { return yy_action[i]; } } /* ** Find the appropriate action for a parser given the non-terminal ** look-ahead token iLookAhead. ** ** If the look-ahead token is wktParser_YYNOCODE, then check to see if the *action is ** independent of the look-ahead. If it is, return the action, otherwise ** return wktParser_YY_NO_ACTION. */ int yy_find_reduce_action(int stateno, /* Current state number */ wktParser_YYCODETYPE iLookAhead /* The look-ahead token */ ) { int i; #ifdef wktParser_YYERRORSYMBOL if (stateno > wktParser_YY_REDUCE_COUNT) { return yy_default[stateno]; } #else assert(stateno <= wktParser_YY_REDUCE_COUNT); #endif i = yy_reduce_ofst[stateno]; assert(i != wktParser_YY_REDUCE_USE_DFLT); assert(iLookAhead != wktParser_YYNOCODE); i += iLookAhead; #ifdef wktParser_YYERRORSYMBOL if (i < 0 || i >= wktParser_YY_ACTTAB_COUNT || yy_lookahead[i] != iLookAhead) { return yy_default[stateno]; } #else assert(i >= 0 && i < wktParser_YY_ACTTAB_COUNT); assert(yy_lookahead[i] == iLookAhead); #endif return yy_action[i]; } /* ** The following routine is called if the stack overflows. */ void yyStackOverflow(wktParser_YYMINORTYPE *yypMinor) { yyidx--; #ifndef NDEBUG if (yyTraceFILE) { *yyTraceFILE << yyTracePrompt << "Stack Overflow!" << std::endl; } #endif while (yyidx >= 0) yy_pop_parser_stack(); /* Here code is inserted which will execute if the parser ** stack every overflows */ } /* ** Perform a shift action. */ void yy_shift(int yyNewState, /* The new state to shift in */ int yyMajor, /* The major token to shift in */ wktParser_YYMINORTYPE *yypMinor /* Pointer to the minor token to shift in */ ) { yyStackEntry *yytos; yyidx++; #ifdef wktParser_YYTRACKMAXSTACKDEPTH if (yyidx > yyidxMax) { yyidxMax = yyidx; } #endif #if wktParser_YYSTACKDEPTH > 0 if (yyidx >= wktParser_YYSTACKDEPTH) { yyStackOverflow(yypMinor); return; } #else if (yyidx >= yystksz) { yyGrowStack(); if (yyidx >= yystksz) { yyStackOverflow(yypMinor); return; } } #endif yytos = &yystack[yyidx]; yytos->stateno = (wktParser_YYACTIONTYPE)yyNewState; yytos->major = (wktParser_YYCODETYPE)yyMajor; yytos->minor = *yypMinor; #ifndef NDEBUG if (yyTraceFILE && yyidx > 0) { int i; *yyTraceFILE << yyTracePrompt << "Shift " << yyNewState << std::endl; *yyTraceFILE << yyTracePrompt << "Stack:"; for (i = 1; i <= yyidx; i++) { *yyTraceFILE << " " << yyTokenName[yystack[i].major]; } *yyTraceFILE << std::endl; } #endif } /* The following table contains information about every rule that ** is used during the reduce. */ /*! @brief Contains information about every rule that is used during the reduce */ static const struct RULEINFO { wktParser_YYCODETYPE lhs; /* Symbol on the left-hand side of the rule */ unsigned char nrhs; /* Number of right-hand side symbols in the rule */ } yyRuleInfo[]; /* ** Perform a reduce action and the shift that must immediately ** follow the reduce. */ private: void yy_reduce(int yyruleno /* Number of the rule by which to reduce */ ) { int yygoto; /* The next state */ int yyact; /* The next action */ wktParser_YYMINORTYPE yygotominor; /* The LHS of the rule reduced */ yyStackEntry *yymsp; /* The top of the parser's stack */ int yysize; /* Amount to pop the stack */ yymsp = &yystack[yyidx]; #ifndef NDEBUG if (yyTraceFILE && yyruleno >= 0 && yyruleno < wktParser_YYNRULE) { *yyTraceFILE << yyTracePrompt << "Reduce [" << yyRuleName[yyruleno] << "]." << std::endl; } #endif /* NDEBUG */ /* Silence complaints from purify about yygotominor being uninitialized ** in some cases when it is copied into the stack after the following ** switch. yygotominor is uninitialized when a rule reduces that does ** not set the value of its left-hand side nonterminal. Leaving the ** value of the nonterminal uninitialized is utterly harmless as long ** as the value is never used. So really the only thing this code ** accomplishes is to quieten purify. ** ** 2007-01-16: The wireshark project (www.wireshark.org) reports that ** without this code, their parser segfaults. I'm not sure what there ** parser is doing to make this happen. This is the second bug report ** from wireshark this week. Clearly they are stressing Lemon in ways ** that it has not been previously stressed... (SQLite ticket #2172) */ /*memset(&yygotominor, 0, sizeof(yygotominor));*/ yygotominor = wktParser_yyzerominor; switch (yyruleno) { /* Beginning here are the reduction cases. A typical example ** follows: ** case 0: ** #line <lineno> <grammarfile> ** { ... } ** #line <lineno> <thisfile> ** break; */ case 0: /* geom ::= GISFUNC LP gisarg RP */ { Expr *e = Expr::newFunctionNode(yymsp[-3].minor.yy0, yymsp[-1].minor.yy29, *(arg->txn), *(arg->fmap)); *arg->ev = e->eval(*(arg->txn), *(arg->objectManager), NULL, arg->fmap, EVAL_MODE_NORMAL); WKTPARSER_DELETE(e); if (yymsp[-1].minor.yy29) { WKTPARSER_DELETE(yymsp[-1].minor.yy29); } } break; case 1: /* geom ::= GISFUNC LP EMPTY RP */ { Expr *emptyArg1 = Expr::newStringValue("EMPTY", *(arg->txn)); QP_XArray<Expr *> emptyArg(arg->txn->getDefaultAllocator()); emptyArg.push_back(emptyArg1); Expr *e = Expr::newFunctionNode( yymsp[-3].minor.yy0, &emptyArg, *(arg->txn), *(arg->fmap)); *arg->ev = e->eval(*(arg->txn), *(arg->objectManager), NULL, arg->fmap, EVAL_MODE_NORMAL); WKTPARSER_DELETE(e); WKTPARSER_DELETE(emptyArg1); } break; case 2: /* gisarg ::= gisexpr */ { yygotominor.yy29 = WKTPARSER_NEW ExprList(arg->txn->getDefaultAllocator()); yygotominor.yy29->push_back(yymsp[0].minor.yy46); yygotominor.yy29->push_back( Expr::newNumericValue(static_cast<int64_t>(-1), *(arg->txn))); } break; case 3: /* gisarg ::= gisexpr SEMICOLON INTEGER */ { yygotominor.yy29 = WKTPARSER_NEW ExprList(arg->txn->getDefaultAllocator()); yygotominor.yy29->push_back(yymsp[-2].minor.yy46); char **endptr = NULL; int64_t val = std::strtol(yymsp[0].minor.yy0.z, endptr, 0); yygotominor.yy29->push_back(Expr::newNumericValue(val, *(arg->txn))); } break; case 4: /* gisarg ::= gisexpr SEMICOLON MINUS INTEGER */ { yygotominor.yy29 = WKTPARSER_NEW ExprList(arg->txn->getDefaultAllocator()); yygotominor.yy29->push_back(yymsp[-3].minor.yy46); char **endptr = NULL; int64_t val = std::strtol(yymsp[0].minor.yy0.z, endptr, 0); yygotominor.yy29->push_back(Expr::newNumericValue(-val, *(arg->txn))); } break; case 5: /* gisarg ::= */ { yygotominor.yy29 = NULL; } break; case 6: /* gisexpr ::= gismultipoint2d */ { yygotominor.yy46 = Expr::newGeometryValue(yymsp[0].minor.yy28, *(arg->txn)); } break; case 7: /* gisexpr ::= gismultipoint3d */ { yygotominor.yy46 = Expr::newGeometryValue(yymsp[0].minor.yy28, *(arg->txn)); } break; case 8: /* gisexpr ::= gispolygon2d */ case 9: /* gisexpr ::= gispolygon3d */ yytestcase(yyruleno == 9); { yygotominor.yy46 = Expr::newGeometryValue(yymsp[0].minor.yy35, *(arg->txn)); } break; case 10: /* gisexpr ::= gismultipolygon3d */ { yygotominor.yy46 = Expr::newGeometryValue(yymsp[0].minor.yy22, *(arg->txn)); } break; case 11: /* gisexpr ::= gisqsf */ { yygotominor.yy46 = Expr::newGeometryValue(yymsp[0].minor.yy2, *(arg->txn)); } break; case 12: /* gispolygon2d ::= LP gisnpointlist2d RP */ { yygotominor.yy35 = WKTPARSER_NEW Polygon(static_cast<int64_t>(-1), yymsp[-1].minor.yy59, *(arg->txn), *(arg->objectManager)); while (!yymsp[-1].minor.yy59->empty()) { WKTPARSER_DELETE(yymsp[-1].minor.yy59->back()); yymsp[-1].minor.yy59->pop_back(); } WKTPARSER_DELETE(yymsp[-1].minor.yy59); } break; case 13: /* gispolygon2d ::= gisnpointlist2d */ { yygotominor.yy35 = WKTPARSER_NEW Polygon( -1, yymsp[0].minor.yy59, *(arg->txn), *(arg->objectManager)); while (!yymsp[0].minor.yy59->empty()) { WKTPARSER_DELETE(yymsp[0].minor.yy59->back()); yymsp[0].minor.yy59->pop_back(); } WKTPARSER_DELETE(yymsp[0].minor.yy59); } break; case 14: /* gisnpointlist2d ::= gisnpointlist2d COMMA LP gismultipoint2d RP */ case 24: /* gisnpointlist3d ::= gisnpointlist3d COMMA LP gismultipoint3d RP */ yytestcase(yyruleno == 24); { yygotominor.yy59 = yymsp[-4].minor.yy59; yymsp[-4].minor.yy59->push_back(yymsp[-1].minor.yy28); } break; case 15: /* gisnpointlist2d ::= LP gismultipoint2d RP */ case 25: /* gisnpointlist3d ::= LP gismultipoint3d RP */ yytestcase(yyruleno == 25); { yygotominor.yy59 = WKTPARSER_NEW QP_XArray<MultiPoint *>( arg->txn->getDefaultAllocator()); yygotominor.yy59->push_back(yymsp[-1].minor.yy28); } break; case 16: /* gismultipoint2d ::= gispointlist2d */ { yygotominor.yy28 = WKTPARSER_NEW MultiPoint( -1, *yymsp[0].minor.yy30, *(arg->txn), *(arg->objectManager)); while (!yymsp[0].minor.yy30->empty()) { WKTPARSER_DELETE(yymsp[0].minor.yy30->back()); yymsp[0].minor.yy30->pop_back(); } WKTPARSER_DELETE(yymsp[0].minor.yy30); } break; case 17: /* gispointlist2d ::= gispointlist2d COMMA gispoint2d */ case 27: /* gispointlist3d ::= gispointlist3d COMMA gispoint3d */ yytestcase(yyruleno == 27); { if (yymsp[-2].minor.yy30 == NULL) { yygotominor.yy30 = WKTPARSER_NEW QP_XArray<Point *>( arg->txn->getDefaultAllocator()); } else { yygotominor.yy30 = yymsp[-2].minor.yy30; } yygotominor.yy30->push_back(yymsp[0].minor.yy61); } break; case 18: /* gispointlist2d ::= gispoint2d */ case 28: /* gispointlist3d ::= gispoint3d */ yytestcase(yyruleno == 28); { yygotominor.yy30 = WKTPARSER_NEW QP_XArray<Point *>( arg->txn->getDefaultAllocator()); yygotominor.yy30->push_back(yymsp[0].minor.yy61); } break; case 19: /* gispoint2d ::= signed signed */ { yygotominor.yy61 = WKTPARSER_NEW Point(-1, yymsp[-1].minor.yy8, yymsp[0].minor.yy8, std::numeric_limits<double>::quiet_NaN(), *(arg->txn)); } break; case 20: /* gismultipolygon3d ::= gisnpolygonlist3d */ { yygotominor.yy22 = WKTPARSER_NEW MultiPolygon(static_cast<int64_t>(-1), *yymsp[0].minor.yy47, *(arg->txn), *(arg->objectManager)); while (!yymsp[0].minor.yy47->empty()) { WKTPARSER_DELETE(yymsp[0].minor.yy47->back()); yymsp[0].minor.yy47->pop_back(); } WKTPARSER_DELETE(yymsp[0].minor.yy47); } break; case 21: /* gisnpolygonlist3d ::= gisnpolygonlist3d COMMA LP gispolygon3d RP */ { yygotominor.yy47 = yymsp[-4].minor.yy47; yygotominor.yy47->push_back(yymsp[-1].minor.yy35); } break; case 22: /* gisnpolygonlist3d ::= LP gispolygon3d RP */ { yygotominor.yy47 = WKTPARSER_NEW QP_XArray<Polygon *>( arg->txn->getDefaultAllocator()); yygotominor.yy47->push_back(yymsp[-1].minor.yy35); } break; case 23: /* gispolygon3d ::= gisnpointlist3d */ { yygotominor.yy35 = WKTPARSER_NEW Polygon( -1, yymsp[0].minor.yy59, *(arg->txn), *(arg->objectManager)); while (!yymsp[0].minor.yy59->empty()) { WKTPARSER_DELETE(yymsp[0].minor.yy59->back()); yymsp[0].minor.yy59->pop_back(); } WKTPARSER_DELETE(yymsp[0].minor.yy59); } break; case 26: /* gismultipoint3d ::= gispointlist3d */ { yygotominor.yy28 = WKTPARSER_NEW MultiPoint( -1, *yymsp[0].minor.yy30, *(arg->txn), *(arg->objectManager)); while (!yymsp[0].minor.yy30->empty()) { WKTPARSER_DELETE(yymsp[0].minor.yy30->back()); yymsp[0].minor.yy30->pop_back(); } WKTPARSER_DELETE(yymsp[0].minor.yy30); } break; case 29: /* gispoint3d ::= signed signed signed */ { yygotominor.yy61 = WKTPARSER_NEW Point(-1, yymsp[-2].minor.yy8, yymsp[-1].minor.yy8, yymsp[0].minor.yy8, *(arg->txn)); } break; case 30: /* gisqsf ::= signed signed signed signed signed signed signed signed signed signed signed signed signed */ { yygotominor.yy2 = WKTPARSER_NEW QuadraticSurface(*(arg->txn), TR_PV3KEY_NONE, 13, yymsp[-12].minor.yy8, yymsp[-11].minor.yy8, yymsp[-10].minor.yy8, yymsp[-9].minor.yy8, yymsp[-8].minor.yy8, yymsp[-7].minor.yy8, yymsp[-6].minor.yy8, yymsp[-5].minor.yy8, yymsp[-4].minor.yy8, yymsp[-3].minor.yy8, yymsp[-2].minor.yy8, yymsp[-1].minor.yy8, yymsp[0].minor.yy8); } break; case 31: /* signed ::= plus_num */ case 32: /* signed ::= minus_num */ yytestcase(yyruleno == 32); { yygotominor.yy8 = yymsp[0].minor.yy8; } break; case 33: /* plus_num ::= plus_opt number */ { yygotominor.yy8 = yymsp[0].minor.yy8; } break; case 34: /* minus_num ::= MINUS number */ { yygotominor.yy8 = -yymsp[0].minor.yy8; } break; case 35: /* number ::= INTEGER|FLOAT */ { yygotominor.yy8 = atof(yymsp[0].minor.yy0.z); } break; case 36: /* plus_opt ::= PLUS */ { PRINT("PLUS_OPT1"); } break; case 37: /* plus_opt ::= */ { PRINT("PLUS_OPT2"); } break; default: break; }; yygoto = yyRuleInfo[yyruleno].lhs; yysize = yyRuleInfo[yyruleno].nrhs; yyidx -= yysize; yyact = yy_find_reduce_action( yymsp[-yysize].stateno, (wktParser_YYCODETYPE)yygoto); if (yyact < wktParser_YYNSTATE) { #ifdef NDEBUG /* If we are not debugging and the reduce action popped at least ** one element off the stack, then we can push the new element back ** onto the stack here, and skip the stack overflow test in *yy_shift(). ** That gives a significant speed improvement. */ if (yysize) { yyidx++; yymsp -= yysize - 1; yymsp->stateno = (wktParser_YYACTIONTYPE)yyact; yymsp->major = (wktParser_YYCODETYPE)yygoto; yymsp->minor = yygotominor; } else #endif { yy_shift(yyact, yygoto, &yygotominor); } } else { assert(yyact == wktParser_YYNSTATE + wktParser_YYNRULE + 1); yy_accept(); } } /* ** The following code executes when the parse fails */ #ifndef wktParser_YYNOERRORRECOVERY void yy_parse_failed() { #ifndef NDEBUG if (yyTraceFILE) { *yyTraceFILE << yyTracePrompt << "Fail!" << std::endl; } #endif while (yyidx >= 0) yy_pop_parser_stack(); /* Here code is inserted which will be executed whenever the ** parser fails */ } #endif /* wktParser_YYNOERRORRECOVERY */ /* ** The following code executes when a syntax error first occurs. */ void yy_syntax_error(int yymajor, /* The major type of the error token */ wktParser_YYMINORTYPE yyminor /* The minor type of the error token */ ) { #define TOKEN (yyminor.yy0) arg->err = 1; } /* ** The following is executed when the parser accepts */ void yy_accept() { #ifndef NDEBUG if (yyTraceFILE) { *yyTraceFILE << yyTracePrompt << "Accept!" << std::endl; } #endif while (yyidx >= 0) yy_pop_parser_stack(); /* Here code is inserted which will be executed whenever the ** parser accepts */ } /* The main parser program. ** The first argument is a pointer to a structure obtained from ** "wktParserAlloc" which describes the current state of the parser. ** The second argument is the major token number. The third is ** the minor token. The fourth optional argument is whatever the ** user wants (and specified in the grammar) and is available for ** use by the action routines. ** ** Inputs: ** <ul> ** <li> A pointer to the parser (an opaque structure.) ** <li> The major token number. ** <li> The minor token number. ** <li> An option argument of a grammar-specified type. ** </ul> ** ** Outputs: ** None. */ public: void Execute(int yymajor, /* The major token code number */ wktParserTOKENTYPE &yyminor /* The value for the token */ wktParserARG_PDECL /* Optional %extra_argument parameter */ ) { wktParser_YYMINORTYPE yyminorunion; int yyact; /* The parser action. */ int yyendofinput; /* True if we are at the end of input */ #ifdef wktParser_YYERRORSYMBOL int yyerrorhit = 0; /* True if yymajor has invoked an error */ #endif /* (re)initialize the parser, if necessary */ if (yyidx < 0) { #if wktParser_YYSTACKDEPTH <= 0 if (yystksz <= 0) { /*memset(&yyminorunion, 0, sizeof(yyminorunion));*/ yyminorunion = wktParser_yyzerominor; yyStackOverflow(&yyminorunion); return; } #endif yyidx = 0; yyerrcnt = -1; yystack[0].stateno = 0; yystack[0].major = 0; } yyminorunion.yy0 = yyminor; yyendofinput = (yymajor == 0); wktParserARG_STORE; #ifndef NDEBUG if (yyTraceFILE) { *yyTraceFILE << yyTracePrompt << "Input " << yyTokenName[yymajor] << std::endl; } #endif do { yyact = yy_find_shift_action((wktParser_YYCODETYPE)yymajor); if (yyact < wktParser_YYNSTATE) { assert(!yyendofinput); /* Impossible to shift the $ token */ yy_shift(yyact, yymajor, &yyminorunion); yyerrcnt--; yymajor = wktParser_YYNOCODE; } else if (yyact < wktParser_YYNSTATE + wktParser_YYNRULE) { yy_reduce(yyact - wktParser_YYNSTATE); } else { assert(yyact == wktParser_YY_ERROR_ACTION); #ifdef wktParser_YYERRORSYMBOL int yymx; #endif #ifndef NDEBUG if (yyTraceFILE) { *yyTraceFILE << yyTracePrompt << "Syntax Error!" << std::endl; } #endif #ifdef wktParser_YYERRORSYMBOL /* A syntax error has occurred. ** The response to an error depends upon whether or not the ** grammar defines an error token "ERROR". ** ** This is what we do if the grammar does define ERROR: ** ** * Call the %syntax_error function. ** ** * Begin popping the stack until we enter a state where ** it is legal to shift the error symbol, then shift ** the error symbol. ** ** * Set the error count to three. ** ** * Begin accepting and shifting new tokens. No new error ** processing will occur until three tokens have been ** shifted successfully. ** */ if (yyerrcnt < 0) { yy_syntax_error(yymajor, yyminorunion); } yymx = yystack[yyidx].major; if (yymx == wktParser_YYERRORSYMBOL || yyerrorhit) { #ifndef NDEBUG if (yyTraceFILE) { *yyTraceFILE << yyTracePrompt << "Discard input token " << yyTokenName[yymajor] << std::endl; } #endif yy_destructor((wktParser_YYCODETYPE)yymajor, &yyminorunion); yymajor = wktParser_YYNOCODE; } else { while ( yyidx >= 0 && yymx != wktParser_YYERRORSYMBOL && (yyact = yy_find_reduce_action(yystack[yyidx].stateno, wktParser_YYERRORSYMBOL)) >= wktParser_YYNSTATE) { yy_pop_parser_stack(); } if (yyidx < 0 || yymajor == 0) { yy_destructor( (wktParser_YYCODETYPE)yymajor, &yyminorunion); yy_parse_failed(); yymajor = wktParser_YYNOCODE; } else if (yymx != wktParser_YYERRORSYMBOL) { wktParser_YYMINORTYPE u2; u2.wktParser_YYERRSYMDT = 0; yy_shift(yyact, wktParser_YYERRORSYMBOL, &u2); } } yyerrcnt = 3; yyerrorhit = 1; #elif defined(wktParser_YYNOERRORRECOVERY) /* If the wktParser_YYNOERRORRECOVERY macro is defined, then do *not attempt to ** do any kind of error recovery. Instead, simply invoke the *syntax ** error routine and continue going as if nothing had happened. ** ** Applications can set this macro (for example inside %include) *if ** they intend to abandon the parse upon the first syntax error *seen. */ yy_syntax_error(yymajor, yyminorunion); yy_destructor((wktParser_YYCODETYPE)yymajor, &yyminorunion); yymajor = wktParser_YYNOCODE; #else /* wktParser_YYERRORSYMBOL is not defined */ /* This is what we do if the grammar does not define ERROR: ** ** * Report an error message, and throw away the input token. ** ** * If the input token is $, then fail the parse. ** ** As before, subsequent error messages are suppressed until ** three input tokens have been successfully shifted. */ if (yyerrcnt <= 0) { yy_syntax_error(yymajor, yyminorunion); } yyerrcnt = 3; yy_destructor((wktParser_YYCODETYPE)yymajor, &yyminorunion); if (yyendofinput) { yy_parse_failed(); } yymajor = wktParser_YYNOCODE; #endif } } while (yymajor != wktParser_YYNOCODE && yyidx >= 0); return; } }; } #endif
/** * @ProjectName: OctoberPlayer * @Description: 封装解码中基础的流程 * @Author: qzhuorui * @CreateDate: 2020/10/12 16:16 */ #ifndef OCTOBERPLAYER_BASE_DECODER_H #define OCTOBERPLAYER_BASE_DECODER_H #include <jni.h> #include <string> #include <thread> #include "../../utils/logger.h" #include "i_decoder.h" #include "decode_state.h" extern "C" { #include <libavcodec/avcodec.h> #include <libavformat/avformat.h> #include <libavutil/frame.h> #include <libavutil/time.h> }; class BaseDecoder : public IDecoder { private : const char *TAG = "BaseDecoder"; //-------------------------------------------FFmpeg相关的结构体参数,定义解码相关 //解码信息上下文 AVFormatContext *m_format_ctx = NULL; //解码器 AVCodec *m_codec = NULL; //解码器上下文 AVCodecContext *m_codec_ctx = NULL; //待解码包 AVPacket *m_packet = NULL; //最终解码数据 AVFrame *m_frame = NULL; //总时长 long m_duration = 0; //当前播放时间 int64_t m_cur_t_s = 0; //开始播放的时间 int64_t m_started_t = -1; //解码状态 DecodeState m_state = STOP; //数据流索引 int m_stream_index = -1; //-------------------------------------------解码器基本方法 /** * 初始化 * @param env jvm环境 * @param path 本地文件路径 */ void Init(JNIEnv *env, jstring path); /** * 初始化FFMpeg相关的参数 * @param env jvm环境 */ void InitFFMpegDecoder(JNIEnv *env); /** * 分配解码过程中需要的缓存 */ void AllocFrameBuffer(); /** * 循环解码 */ void LoopDecode(); /** * 获取当前帧时间戳 */ void ObtainTimeStamp(); /** * 解码完成 * @param env jvm环境 */ void DoneDecode(JNIEnv *env); /** * 时间同步 */ void SyncRender(); public: //-------------------------------------------构造方法,析构方法 BaseDecoder(JNIEnv *env, jstring path, bool for_synthesizer); virtual ~BaseDecoder(); /** * 视频宽度 * @return */ int width() { return m_codec_ctx->width; } /** * 视频高度 * @return */ int height() { return m_codec_ctx->height; } /** * 视频时长 * @return */ long duration() { return m_duration; } //-------------------------------------------实现基类方法,解码器基础功能 void GoOn() override; void Pause() override; void Stop() override; bool IsRunning() override; long GetDuration() override; long GetCurPos() override; //-------------------------------------------定义线程相关 //线程依附的JVM环境,同于在新的解码线程中获取env,JNIEnv和线程是一一对应的 JavaVM *m_jvm_for_thread = NULL; //原始路径jstring引用,否则无法在线程中操作 jobject m_path_ref = NULL; //经过转换的路径 const char *m_path = NULL; //线程等待锁变量 pthread_mutex_t m_mutex = PTHREAD_MUTEX_INITIALIZER; pthread_cond_t m_cond = PTHREAD_COND_INITIALIZER; // 为合成器提供解码 bool m_for_synthesizer = false; /** * 新建解码线程 */ void CreateDecodeThread(); /** * 静态解码方法,用于解码线程回调 * @param that 当前解码器 */ static void Decode(std::shared_ptr<BaseDecoder> that); protected: /** * 进入等待 */ void Wait(long second = 0); /** * 恢复解码 */ void SendSignal(); /** * 是否为合成器提供解码 * @return true 为合成器提供解码 false 解码播放 */ bool ForSynthesizer() { return m_for_synthesizer; } const char *path() { return m_path; } /** * 解码器上下文 * @return */ AVCodecContext *codec_cxt() { return m_codec_ctx; } /** * 视频数据编码格式 * @return */ AVPixelFormat video_pixel_format() { return m_codec_ctx->pix_fmt; } /** * 获取解码时间基 */ AVRational time_base() { return m_format_ctx->streams[m_stream_index]->time_base; } /** * 解码一帧数据 * @return */ AVFrame *DecodeOneFrame(); //-------------------------------------------子类需要实现的虚函数,规定子类需要实现的方法 /** * 子类准备回调方法 * @note 注:在解码线程中回调 * @param env 解码线程绑定的JVM环境 */ virtual void Prepare(JNIEnv *env) = 0; /** * 子类渲染回调方法 * @note 注:在解码线程中回调 * @param frame 视频:一帧YUV数据;音频:一帧PCM数据 */ virtual void Render(AVFrame *frame) = 0; /** * 子类释放资源回调方法 */ virtual void Release() = 0; /** * Log前缀 */ virtual const char *const LogSpec() = 0; /** * 音视频索引 */ virtual AVMediaType GetMediaType() = 0; /** * 是否需要自动循环解码 */ virtual bool NeedLoopDecode() = 0; }; #endif //OCTOBERPLAYER_BASE_DECODER_H
Smoke Detectors, Carbon Monoxide Detectors, Gas Detectors SMOKE DETECTOR INFORMATION: Most people are aware of the danger of fire but are unaware of the fatality of smoke. More people die from breathing smoke than by burns. In fact, deaths from smoke inhalation outnumber deaths by burning by 2:1. In a hostile fire, smoke and deadly gases tend to spread farther and faster than heat from flames. Moreover, when people are asleep, deadly fumes can send them deeper into unconsciousness. Smoke detectors and carbon monoxide detectors are a powerful and effective fire safety technology. They are the first lines of defense against smoke and fire. They may awaken those who would otherwise have been overcome by smoke and toxic gases in their sleep. And most importantly, they provide an early warning alerting individuals of a fire, allowing them precious time to escape. According to the National Fire Protection Association (NFPA), 75 to 80% of all deaths by fire happen in the home. More than half of these deaths occurred in buildings without smoke detectors. By installing a smoke detector, individuals can reduce the risk of dying by almost 50%. Ionization smoke detectors monitor 'ions,' or electrically charged particles in the air. Air molecules in a sample chamber of ionization smoke detectors, are 'ionized' by a radioactive source. This allows a small electrical current flow. Smoke particles entering the sensing chamber change the electrical balance of the air. The greater the amount of smoke, the higher the electrical imbalance. When combustion particles enter the smoke detector, they obstruct the flow of the current. An alarm is pre-programmed to sound when the current gets too low. Ionization smoke detectors respond first to fast flaming fires. A flaming fire devours combustibles extremely fast, spreads rapidly and generates considerable heat with little smoke. Ionization alarms are best suited for rooms, which contain highly combustible material. These types of material include: 1. Cooking fat/grease 2. Flammable liquids 3. Newspaper 4. Paint 5. Cleaning solutions Smoke alarms with ionization technology are the most popular types sold in the United States. The NFPA recommends smoke alarms be installed in EVERY room and area of your home or bulding for complete protection. For maximum protection, install at least one ionization and one photoelectronic smoke alarm on each level of your home. All smoke alarms should be replaced after 10 years of operation. Ten years is a smoke alarm's useful lifetime and for continued, reliable safety and protection, smoke alarms need to be replaced. Consumer's should consult their owner's manual for specific instructions when locating a smoke alarm. The following are some general guidelines: Because smoke rises, smoke alarms should be installed on the ceiling or on walls at least 4 to 6 inches below the ceiling. Smoke alarms should not be located less than 4 to 6 inches from where the wall and ceiling meet on either surface; this space is dead air that receives little circulation. Smoke alarms should not be mounted in front of an air supply, return duct, near ceiling fans, peaks of A-frame ceilings, dusty areas, locations outside the 40 degree Farenheit to 100 degree Farenheit temperature range, in humid areas or near fluorescent lighting. If you hear the smoke alarm, roll to the floor and crawl to the door. Stay low where the air is cleaner and cooler. Touch the door. If the door feels cool, open it just a crack and check for smoke. If there is no smoke, leave by your planned escape route. Crawl and keep your head down. If the door feels hot, do not open it. Do no panic. Escape out the window or use an alternate exit. If you can't leave your room, seal the cracks around the doors and vents as best you can. Use a wet towel or clothing if possible. Open a window at both the top and bottom. Stay low and breathe fresh air. Shout for help and signal your location by waving a bright cloth, towel or sheet out of a window. If you live in a high rise building, never use the elevator to escape fire. If the fire blocks your exit, close your apartment door and cover all cracks where smoke could enter. Telephone the fire department, even if fire fighters are aleready at the scene, and tell them where you are. Shout for help and signal your location by waving a bright cloth, towel or sheet out of a window. If your clothes catch on fire, "Stop, Drop and Roll" to put out the flames. Do not run-running will only increase the flames. Photoelectronic alarms contain a light emitting diode (LED) which is adjusted to direct a narrow infrared light across the unit's detection chamber. When smoke particles enter this chamber they interfere with the beam and scatter the light. A strategically placed photodiode monitors the amount of light scattered within the chamber. When a pre-set level of light strikes the photodiode, the alarm is activated. Photoelectronic smoke alarms respond first to slow smoldering fires. A smoldering fire generates large amounts of thick, black smoke with little heat and may smolder for hours before bursting into flames. Photoelectronic models are best suited for living rooms, bedrooms and kitchens. This is because these rooms often contain large pieces of furniture, such as sofas, chairs, mattresses, counter tops, etc. which will burn slowly and create more smoldering smoke than flames. Photoelectronic smoke alarms are also less prone to nuisance alarms in the kitchen area than ionization smoke alarms. The use of both ionization and photoelectronic smoke alarms will provide a home with maximum protection and an ample warning in the event of a fire. Families should get together and draw a floor plan of their home. They should show two ways out of every room. The first way should be out a door and the second way could be through a window. If it is a second or third story window, they might consider purchasing a safety ladder. They should choose a meeting place for all family members outside the home and mark it on the plan. A good meeting place would be a driveway, tree or a neighbor's home. Families should practice the escape plan to make sure everyone understands the planned routes. Involve every member of the family. Start with everyone in their beds with the doors closed. Have one person sound the smoke alarm. Have each person touch his or her door. (Tip: sleep with bedroom doors closed. A closed door will help show the spread of fire, smoke and heat). Practice low escape routes-one for a cool door and one for a hot door. Meet outdoors at the assigned meeting place. Designate one person to call the fire department. Make sure everyone knows the fire department or local emergency telephone number. Consumers should be advised of the following features when choosing a smoke alarm to best suit their needs: Smoke detectors with an alarm silencer feature will silence an alarming unit for several minutes, giving the air time to clear. These models are idal near kitchen and cooking areas where most nuisance alarms occur. Note: consumers should always determine the reason for the unit sounding before quickly dismissing it as a nuisance alarm and pressing the alarm silencer feature to silence the alarm. Long Life Smoke Detectors The NFPA reports that 1/3 of all smoke detectors installed in homes are not operating because of dead or missing batteries. This is an all too common occurrence in smoke detectors that leaves families and homes vulnerable. Long life smoke detectors utilize lithium batteries that provide up to 10 years of continuous protection. Lithium batteries eliminate the need and expense of semi-annual battery replacement. When long life smoke detectors near the end of their tenth year in operation, they will sound a low battery signal to remind consumers to replace the entire unit. Note: it is recommended that smoke detectors be replaced every 10 years and be tested regularly. Some smoke detectors have a built-in emergency light that will turn on when the unit goes into alarm. The emergency light will illuminate an escape route in case of a power failure. These units are best utilized when installed by stairs and in hallways. Hardwire smoke detectors are connected to a home's AC power supply and should be intalled by a licensed electrician according to the local electrical code. AC power means you never have to replace a battery to protect your home and family. CARBON MONOXIDE DETECTOR INFORMATION: Carbon monoxide poisoning is often confused with the flu. It is important that you discuss with all family members the symptoms of carbon monoxide poisoning. Different carbon monoxide concentrations and exposure times cause different symptoms. Remember, carbon monoxide detectors are your first defense against carbon monoxide poisoning. EXTREME EXPOSURE: Unconsciousness, convulsions, cardiorespiratory failure, and death MEDIUM EXPOSURE: Severe throbbing headache, drowsiness, confusion, vomitting, and fast heart rate MILD EXPOSURE: Slight headache, nausea, fatigue (often described as 'flu-like' symptoms) For most people, mild symptoms generally will be felt after several hours of exposure of 100 ppm's of carbon monoxide. Many reported cases of carbon monoxide poisoning indicate that while victims are aware they are not well, they become so disoriented that they are unable to save themselves by either exiting the building or calling for assistance. Also, due to small size, young children and household pets may be the first affected. If left unchecked, a child's exposure to carbon monoxide can lead to neurological disorders, memory loss, personality changes and mild to severe forms of brain damage. If a child complains or shows signs of headaches, dizziness, fatigue or nausea or diarrhea, he or she could have carbon monoxide poisoning. Be especially aware of symptoms that disappear when the child is out of the house and reappear upon return, or symptoms that affect the entire household at once. Since the symptoms closely mimic viral conditions such as the flu, without the fever, carbon monoxide poisoning is often treated improperly, if at all. A physician can perform a simple blood test (called a carboxyhemoglobin test) to determine the level of carbon monoxide in the bloodstream. If elevated levels of carbon monoxide are present, hyperbaric (high-pressure) oxygen treatment may be used to rid the body of carbon monoxide. A physician will make this determination and administer treatment if necessary. Children with carbon monoxide poisoning have mistakenly been treated for indigestion. The following are considerations consumers should be advised to take when choosing a carbon monoxide detector that will be sure to meet their needs. 1. Consumers should consider ease of installation, the location of installation and the power source of an alarm when choosing a plug-in, battery powered or hardwire model. Plug-in units are designed to directly plug into a standard 120-volt electrical outlet for simple installation. This location provides easy access for both testing and resetting the detector. In addition, the location provides both a visual and audible difference from a ceiling mounted smoke alarm, which may help to eliminate confusion during an emergency alarm condition. A plug-in unit also requires no additional costs for annual battery replacement. Battery powered units can be easily mounted to a wall or ceiling if the consumer wishes to keep electrical outlets free, if they wish to keep the unit relatively out of sight, or if they would like to keep the alarm away from the reach of children. Some battery-powered units are portable alarms that work anywhere--no installation required. These units may be mounted to a wall, left on a tabletop or carried while traveling. Battery powered units require battery replacement every year, similar to smoke alarms. These units will have a low battery-warning signal to indicate when the batteries need repacing. Hardwire units are powered by wiring the unit directly into a household's AC power supply at a junction box. A licensed electrician according to the local electrical code should install them. The unit can be permanently installed to prevent tampering. 2. Consumers should choose a carbon monoxide detector with the features (e.g. low level warning, battery back up, digital display, etc.) that meet their needs. Low Level Warning-some carbon monoxide alarms sound a warning (e.g. 3 short beeps) when a low level of carbon monoxide has been detected. Low levels of carbon monoxide can be hazardous over a long period of time. Low level warnings flag potential carbon monoxide problems and allow consumers time to respond to them before an emergency situation arises. Battery Backup-some plug-in carbon monoxide alarm models have a back-up power source that allows the unit to function in the event of a main line power failure. During a power outage, people are likely to use alternate sources of power, light and heat (e.g. kerosene heaters, gas-powered portable generators and fireplaces) which may be out of tune and may produce deadly carbon monoxide gas. Digital Display-some carbon monoxide alarms have a digital display that shows the levels of carbon monoxide in the air in parts per million (ppm). For some people, this added feature provides at-a-glance peace of mind. 3. Consumers should choose an alarm that has been accuracy tested. American Sensors(TM), guarantees each of its alarms to be Triple Accuracy Tested(TM). American Sensors'(TM) triple Accuracy Testing process exposes every alarm to three separate tests during manufacturing. This testing process includes twice exposing the alarm to carbon monoxide to precisely calibrate each unit. One test is at high levels and the second is at lower levels of carbon monoxide. In the third step, every alarm is tested to protect against nuisance alarms. This stringent method of testing and quality control helps ensure that every American Sensors(TM) carbon monoxide alarm will provide years of reliable, accurate protection for your family and home. 4. Consumers should compare alarm warranties and note hidden operating costs. Consumers should select an alarm that offers a comprehensive warranty. The alarm's warranty should include its sensor. Consumers should be advised that some CO alarms require the purchase of an expensive replacement sensor and/or battery pack as an ongoing expense. American Sensors(TM) alarms do not require replacement sensors and carry a 5 year warranty. 5. Check that the product is Listed by Underwriters Laboratories Inc. UL 2034 and/or Underwriters' Laboratories of Canada. Consumers should avoid any brand that does not bear the mark of Underwriters Laboratories Inc. and/or Underwriters' Laboratories of Canada. All American Sensors(TM) carbon monoxide alarms meets and/or exceeds the latest stringent standards of Underwriters Laboratories Inc. and/or Underwriters' Laboratories of Canada. Carbon monoxide is generated through incomplete combustion of fuel such as natural gas, propane, heating oil, kerosene, coal, and charcoal, gasoline or wood. This incomplete combustion can occur in a variety of home appliances. The major cause of high levels of carbon monoxide in the home is faulty ventilation of funaces, hot water heaters, fireplaces, cooking stoves, grills and kerosene heaters. Other common sources are car exhausts, and gas or diesel powered portable machines. Faulty or improper ventilation of natural gas and fuel oil furnaces during the cold winter months accouts for most carbon monoxide poisoning cases. Correct operation of any fuel burning equipment requires two key conditions. There must be: * An adequate supply of air for complete combustion. * Proper ventilation of fuel burning appliances through the chimney, vents or duct to the outside. Install carbon monoxide alarms as a first line of defense against poisoning. The US Consumer Product Safety Commission recommends installing at least one carbon monoxide alarm with an audible alarm near the sleeping areas in every home. Install additional alarms on every level and in every bedroom to provide extra protection. Carbon monoxide poisoning can happen anywhere and at any time in your home. However, most carbon monoxide poisoning cases occur while people are sleeping. Therefore, for the best protection, a carbon monoxide alarm should be installed in the sleeping area. Approximately 250 people in the US died last year from the 'silent killer'-carbon monoxide. The safety experts at Underwriter's Laboratories Inc. (UL) recommend that consumers follow these steps to help prevent carbon monoxide poisoning. 1. Have a qualified technician inspect fuel-burning appliances at least once a year. Fuel-burning appliances such as furnaces, how water heaters and stoves require yearly maintenance. Over time, components can become damaged or deteriorate. A qualified technician can identify and repair problems with your fuel-burning appliances. Carbon monoxide detectors can detect a carbon monoxide condition in your home. 2. Be alert to the danger signs that signal carbon monoxide problems, e.g., streaks of carbon or soot around the service door of your fuel burning appliances; the absence of a draft in your chimney; excessive rusting on flue pipes or appliance jackets; moisture collecting on the windows and walls of furnace rooms; fallen soot from the fireplace; small amounts of water leaking from the base of the chimney, vent or flue pipe; damaged or discolored bricks at the top of your chimney and rust on the portion of the vent pipe visible from outside your home. 3. Be aware that carbon monoxide poisoning may be the cause of flu-like symptoms such as headaches, tightness of chest, dizziness, fatigue, confussion and breathing difficulties. Because carbon monoxide poisoning often causes a victim's blood pressure to rise, the victim's skin may take on a ink or red cast. 4. Install a UL/ULC Listed carbon monoxide detector outside sleeping areas. A UL/ULC Listed carbon monoxide alarm will sound an alarm before dangerous levels of carbon monoxide accumulate. Carbon monoxide poisoning can happen to anyone, anytime, almost anywhere. While anyone is susceptible, experts agree that unborn babies, small children, senior citizens and people with heart or respiratory problems are especially vulnerable to carbon monoxide and are at the greatest risk for death or serious injuries. Itís time to install your carbon monoxide detector. Infants and children are especially vulnerable to carbon monoxide due to their high metabolic rates. Because children use more oxygen faster than adults do, deadly carbon monoxide gas accumulates in their bodies faster and can interfere with oxygen supply to vital organs such as the brain and the heart. Unborn babies have an even higher risk of carbon monoxide poisoning and carbon monoxide poisoning in pregnant women has been linked to birth defects. This is another reason to install a carbon monoxide detector. Hundreds of people die each year, and thousands more require medical treatment, because of carbon monoxide poisoning in their home. Now, with recent technological breakthroughs, you can avoid becoming one of these statistics simply by installing a carbon monoxide detector in your home. Consumers should consult their owner's maunal for a carbon monoxide detector procedure. However, the following is a general procedure: If a carbon monoxide detector sounds a low level warning or hazard level alarm, consumers should push the test/reset button to silence it. If no one in the household has any carbon monoxide symptoms (headache, dizziness, nausea, and fatigue) consumers should be advised to open the doors and windows to air out their house. They should turn off any gas, oil or other fuel powered appliances including the furnace and call a qualified technician or thier local utility company to inspect and repair their home before restarting the furnace and all fuel-burning appliances. If anyone in the household does have signs of carbon monoxide poisoning, consumers should leave their home immediately and call their local emergency service or 911 for help. They should do a head count to check that all persons are accounted for once outside in the fresh air. They should not re-enter their home until it has been aired out and the problem corrected by a qualified technician or utility company. Most carbon monoxide detectors sold at retail are for use in single residential living units only. They should only be used inside a single family home or apartment. They cannot be used in RV's or boats. Carbon monoxide detectors should not be installed in the following locations: 1. Kitchens or within 5 feet of any cooking appliance where grease, smoke, and other decomposed compounds from cooking could build up on the surface of the carbon monoxide sensor and cause the alarm to malfunction. 2. Bathrooms or the other rooms where long-term exposure to steam or high levels of water vapor could permanently damage the carbon monoxide sensor. 3. Very cold (below 40 degrees Fahrenheit) or very hot (above 100 degrees Fahrenheit) rooms. The alarm will not work properly under these conditions. 4. Do not place in a close proximity to an automobile exhaust pipe, as this will damage the sensor. ***PLACE ONE CARBON MONOXIDE DETECTOR ON EVERY LEVEL OF YOUR HOME FOR MAXIMUM PROTECTION*** Read the manufacturer's instructions carefully before installing a carbon monoxide alarm. Do not place the alarm within five feet of household chemicals. If your alarm is wired directly into your home's electrical system, you should test it monthly. If your unit operates off a battery, test the alarm weekly and replace the battery at least once a year. Avoid placing your alarm directly on top of or directly across from fuel-burning appliances. These appliances will emit some carbon monoxide when initially turned-on. Never use charcoal grills inside a home, tent, camper or unventilated garage. Don't leave vehichles running in an enclosed garage, even to 'warm up' your car on a cold morning. Know how to respond to a carbon monoxide detector. If your alarm sounds, immediately open windows and doors for ventilation. if anyone in the home is experiencing symptoms of carbon monoxide poisoning-headache, dizziness or other flu-like symptoms, immediately evacuate the house and call the fire department. Don't go back into the house until a fire fighter tells you it is okay to do so. If no one is experiencing these symptoms, continue to ventilate, turn off fuel-burning appliances and call a qualified technician to inspect your heating system and appliances as soon as possible. Because you have provided ventilation, the carbon monoxide buildup may have dissipated by the time help responds and your problem may appear to be temporarily solved. Do not operate any fuel-burning appliances until you have clearly identified the source of the problem. A carbon monoxide alarm indicates elevated levels of carbon monoxide in the home. NEVER IGNORE THE ALARM. The safety experts urge consumers to recognize the danger signs of carbon monoxide before any harm can come to them or their families.
Are graphics finally important in embedded systems? March 18, 2016 OpenSystems Media For decades graphics capability was the also ran, either only required for development or displaying a crude and basic GUI. Now expectations have moved on to immersive multi-touch, animated/video experiences, even in the embedded and industrial space. Arguably, what used to be known as “embedded” defined a headless system, one invisible to the user and deeply embedded into a device. Through the decades, that user interface has evolved from basic power-on/activity LEDs, to calculator-esque liquid crystal displays, to full-color LCDs, and now e-ink driven displays to slash power consumption. As such, it’s only fairly recently that embedded computing solutions have necessitated any real graphical prowess. Before this development, applications that demanded it suffered either cumbersome industrial systems that supported high-speed peripheral bus expansion to employ a commercial graphics card, or chanced using a completely commercial PC and accepted the consequences. With power consumption always a driving factor in embedded systems, the problem wasn’t integrating high-performance graphics. Various high-speed peripheral buses have been available to embedded designers; however, they not only exponentially increased wattage requirements, but also dictated a thermal dissipation challenge – so most designers didn’t bother. Intel led the way by investing heavily in improving their own integrated graphics chipsets. The Intel HD graphics chipsets we see today are so impressive they encompass the majority of today’s embedded graphical applications – struggling only with rendering complex 3D graphics at high resolutions. For those remaining, behemoth graphics cards manufacturers clambered to reduce power consumption to make their top-end products accessible to the embedded space. AMD made an interesting decision in choosing not to pit their new embedded CPU, the G-Series, against the Intel Atom purely on raw CPU performance; instead, they focused on graphical capability, claiming eightfold the graphical performance of their rival. This was enabled by their shrewd purchase of ATI, driving Radeon technology into embedded systems as part of their G-series and R-series ranges. However, the AMD alternative in my experience hasn’t shaken the ubiquitous popularity of the Intel Atom. Is it that graphical performance remains insufficiently important across our industry to dictate any real impact yet? Or is it that familiarity and comfort with the omnipresent Intel Atom is such that designers shy away from change? Debatably, it’s the burden of familiarity that held back the tidal wave that is ARM; for so long, it felt alien to those who’d spend their careers developing under x86 architectures. The popularity of smart phones employing PCAP touchscreens drove that technology into our industry, pushing aside its resistive counterpart that had reigned true for years before that. Could it be that the expectation for high-resolution displays borne from the same devices (mine is now 1080p on a 5.5-inch display) is what drives HD displays in embedded and industrial systems? Is that what will truly move forward the necessity of high-performance graphics in our factories and workplaces? In the past few months I’ve seen a sudden surge of interest in dual displays in such systems, often employing one to control (via touch screen) and the second purely to monitor. Such applications, all else being equal, require at least double the bandwidth of yesteryear. Rory Dear, European Editor/Technical Contributor Previous Article There's a big upside to digital power There's a big upside to digital power Next Article Subscribed! Look for 1st copy soon. Error - something went wrong!
Here is how it was done in 1810...By a mechanical wiz, not a beginner - now show us how you'd do it with a few motors and a controller And I don't think that you'd put that old mechanical doll in the "simple" category? Simple it was not. Just imagine what it took to program it by cutting brass cams for each degree of freedom... Amazing is what I would call it. Now, back to the original problem - is this robot supposed to write random phrases or just a couple pre-programed things? One of the tough parts would be the math - first, mathematically describing the path for the tip of the arm and then sorting out all of the joint angles as a function of time to get it to trace the desired path. One way around the math would be to build the arm with position sensors and then just move the arm by hand along the desired paths and record the angles. Then, the recorded values could be used as the target positions for your arm controller (a simple PI controller is likely to be adequate if you didn't try to move the arm too fast). Create tables of time / position pairs to describe the paths for the arm. If the arm was built with servos - that makes it more difficult to record the "training" movements because all the feedback is inside the servo's themselves. So, you would have to open up the servos and run wires back from the potentiometers to your micro-controller to record the servo positions as you train it. (And translate from the voltage from the pot to the pulsewidth sent to the servo to get that position - another training exercise where you command various pulsewidths and record the potentiometer output.) Getting a robot to generate nice cursive writing was a challenge in 1810, and can be a challenge today!
/* * CDDL HEADER START * * The contents of this file are subject to the terms of the * Common Development and Distribution License (the "License"). * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. * See the License for the specific language governing permissions * and limitations under the License. * * When distributing Covered Code, include this CDDL HEADER in each * file and include the License file at usr/src/OPENSOLARIS.LICENSE. * If applicable, add the following below this CDDL HEADER, with the * fields enclosed by brackets "[]" replaced with your own identifying * information: Portions Copyright [yyyy] [name of copyright owner] * * CDDL HEADER END */ /* * Copyright 2009 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ /* * Xen event provider for DTrace * * NOTE: This provider is PRIVATE. It is intended as a short-term solution and * may disappear or be re-implemented at anytime. * * This provider isn't suitable as a general-purpose solution for a number of * reasons. First and foremost, we rely on the Xen tracing mechanism and don't * have any way to gather data other than that collected by the Xen trace * buffers. Further, it does not fit into the DTrace model (see "Interacting * with DTrace" below.) * * * Tracing in Xen * -------------- * * Xen implements a tracing facility for generating and collecting execution * event traces from the hypervisor. When tracing is enabled, compiled in * probes record events in contiguous per-CPU trace buffers. * * +---------+ * +------+ | | * | CPUn |----> | BUFFERn | * +------+ | | * +---------+- tbuf.va + (tbuf.size * n) * : : * +---------+ * +------+ | | * | CPU1 |----> | BUFFER1 | * +------+ | | * +---------+- tbuf.va + tbuf.size * +------+ | | * | CPU0 |----> | BUFFER0 | * +------+ | | * +---------+- tbuf.va * * Each CPU buffer consists of a metadata header followed by the trace records. * The metadata consists of a producer/consumer pair of pointers into the buffer * that point to the next record to be written and the next record to be read * respectively. * * A trace record can be in one of two forms, depending on if the TSC is * included. The record header indicates whether or not the TSC field is * present. * * 1. Trace record without TSC: * +------------------------------------------------------------+ * | HEADER(uint32_t) | DATA FIELDS | * +------------------------------------------------------------+ * * 2. Trace record with TSC: * +--------------------------------------------------------------------------+ * | HEADER(uint32_t) | TSC(uint64_t) | DATA FIELDS | * +--------------------------------------------------------------------------+ * * Where, * * HEADER bit field: * +--------------------------------------------------------------------------+ * | C | NDATA | EVENT | * +--------------------------------------------------------------------------+ * 31 30 28 27 0 * * EVENT: Event ID. * NDATA: Number of populated data fields. * C: TSC included. * * DATA FIELDS: * +--------------------------------------------------------------------------+ * | D1(uint32_t) | D2(uint32_t) | D3(uint32_t) | . . . | D7(uint32_t) | * +--------------------------------------------------------------------------+ * * * Interacting with DTrace * ----------------------- * * Every xdt_poll_nsec nano-seconds we poll the trace buffers for data and feed * each entry into dtrace_probe() with the corresponding probe ID for the event. * As a result of this periodic collection implementation probe firings are * asynchronous. This is the only sensible way to implement this form of * provider, but because of its asynchronous nature asking things like * "current CPU" and, more importantly, arbitrary questions about the context * surrounding the probe firing are not meaningful. So, consumers should not * attempt to infer anything beyond what is supplied via the probe arguments. */ #include <sys/xpv_user.h> #include <sys/types.h> #include <sys/sysmacros.h> #include <sys/modctl.h> #include <sys/sunddi.h> #include <sys/ddi.h> #include <sys/conf.h> #include <sys/devops.h> #include <sys/stat.h> #include <sys/cmn_err.h> #include <sys/dtrace.h> #include <sys/sdt.h> #include <sys/cyclic.h> #include <vm/seg_kmem.h> #include <vm/hat_i86.h> #include <sys/hypervisor.h> #include <xen/public/trace.h> #include <xen/public/sched.h> #define XDT_POLL_DEFAULT 100000000 /* default poll interval (ns) */ #define XDT_POLL_MIN 10000000 /* min poll interval (ns) */ #define XDT_TBUF_RETRY 50 /* tbuf disable retry count */ /* * The domid must match IDLE_DOMAIN_ID in xen.hg/xen/include/xen/sched.h * in the xVM gate. */ #define IS_IDLE_DOM(domid) (domid == 0x7FFFU) /* Macros to extract the domid and cpuid from a HVM trace data field */ #define HVM_DOMID(d) (d >> 16) #define HVM_VCPUID(d) (d & 0xFFFF) /* Flags for shadow page table events */ #define SH_GUEST_32 0x000 #define SH_GUEST_PAE 0x100 #define SH_GUEST_64 0x200 #define XDT_PROBE5(event, arg0, arg1, arg2, arg3, arg4) { \ dtrace_id_t id = xdt_probemap[event]; \ if (id) \ dtrace_probe(id, arg0, arg1, arg2, arg3, arg4); \ } \ #define XDT_PROBE4(event, arg0, arg1, arg2, arg3) \ XDT_PROBE5(event, arg0, arg1, arg2, arg3, 0) #define XDT_PROBE3(event, arg0, arg1, arg2) \ XDT_PROBE5(event, arg0, arg1, arg2, 0, 0) #define XDT_PROBE2(event, arg0, arg1) \ XDT_PROBE5(event, arg0, arg1, 0, 0, 0) #define XDT_PROBE1(event, arg0) \ XDT_PROBE5(event, arg0, 0, 0, 0, 0) #define XDT_PROBE0(event) \ XDT_PROBE5(event, 0, 0, 0, 0, 0) /* Probe classes */ #define XDT_SCHED 0 #define XDT_MEM 1 #define XDT_HVM 2 #define XDT_GEN 3 #define XDT_PV 4 #define XDT_SHADOW 5 #define XDT_PM 6 #define XDT_NCLASSES 7 /* Probe events */ #define XDT_EVT_INVALID (-(int)1) #define XDT_SCHED_OFF_CPU 0 #define XDT_SCHED_ON_CPU 1 #define XDT_SCHED_IDLE_OFF_CPU 2 #define XDT_SCHED_IDLE_ON_CPU 3 #define XDT_SCHED_BLOCK 4 #define XDT_SCHED_SLEEP 5 #define XDT_SCHED_WAKE 6 #define XDT_SCHED_YIELD 7 #define XDT_SCHED_SHUTDOWN_POWEROFF 8 #define XDT_SCHED_SHUTDOWN_REBOOT 9 #define XDT_SCHED_SHUTDOWN_SUSPEND 10 #define XDT_SCHED_SHUTDOWN_CRASH 11 #define XDT_MEM_PAGE_GRANT_MAP 12 #define XDT_MEM_PAGE_GRANT_UNMAP 13 #define XDT_MEM_PAGE_GRANT_TRANSFER 14 #define XDT_HVM_VMENTRY 15 #define XDT_HVM_VMEXIT 16 #define XDT_TRC_LOST_RECORDS 17 #define XDT_SCHED_ADD_VCPU 18 #define XDT_SCHED_REM_VCPU 19 /* unused */ #define XDT_SCHED_CTL 20 /* unused */ #define XDT_SCHED_ADJDOM 21 #define XDT_SCHED_S_TIMER_FN 22 /* unused */ #define XDT_SCHED_T_TIMER_FN 23 /* unused */ #define XDT_SCHED_DOM_TIMER_FN 24 /* unused */ #define XDT_PV_HYPERCALL 25 #define XDT_PV_TRAP 26 #define XDT_PV_PAGE_FAULT 27 #define XDT_PV_FORCED_INVALID_OP 28 #define XDT_PV_EMULATE_PRIVOP 29 #define XDT_PV_EMULATE_4GB 30 /* unused (32-bit HV only ) */ #define XDT_PV_MATH_STATE_RESTORE 31 #define XDT_PV_PAGING_FIXUP 32 #define XDT_PV_DT_MAPPING_FAULT 33 #define XDT_PV_PTWR_EMULATION 34 #define XDT_HVM_PF_XEN 35 #define XDT_HVM_PF_INJECT 36 #define XDT_HVM_EXC_INJECT 37 #define XDT_HVM_VIRQ_INJECT 38 #define XDT_HVM_VIRQ_REINJECT 39 #define XDT_HVM_IO_READ 40 /* unused */ #define XDT_HVM_IO_WRITE 41 /* unused */ #define XDT_HVM_CR_READ 42 #define XDT_HVM_CR_WRITE 43 #define XDT_HVM_DR_READ 44 /* unused */ #define XDT_HVM_DR_WRITE 45 /* unused */ #define XDT_HVM_MSR_READ 46 #define XDT_HVM_MSR_WRITE 47 #define XDT_HVM_CPUID 48 #define XDT_HVM_INTR 49 #define XDT_HVM_INTR_WINDOW 50 #define XDT_HVM_NMI 51 #define XDT_HVM_SMI 52 #define XDT_HVM_VMMCALL 53 #define XDT_HVM_HLT 54 #define XDT_HVM_INVLPG 55 #define XDT_HVM_MCE 56 #define XDT_HVM_IOPORT_READ 57 #define XDT_HVM_IOPORT_WRITE 58 #define XDT_HVM_CLTS 59 #define XDT_HVM_LMSW 60 #define XDT_HVM_IOMEM_READ 61 #define XDT_HVM_IOMEM_WRITE 62 #define XDT_SHADOW_NOT_SHADOW 63 #define XDT_SHADOW_FAST_PROPAGATE 64 #define XDT_SHADOW_FAST_MMIO 65 #define XDT_SHADOW_FALSE_FAST_PATH 66 #define XDT_SHADOW_MMIO 67 #define XDT_SHADOW_FIXUP 68 #define XDT_SHADOW_DOMF_DYING 69 #define XDT_SHADOW_EMULATE 70 #define XDT_SHADOW_EMULATE_UNSHADOW_USER 71 #define XDT_SHADOW_EMULATE_UNSHADOW_EVTINJ 72 #define XDT_SHADOW_EMULATE_UNSHADOW_UNHANDLED 73 #define XDT_SHADOW_WRMAP_BF 74 #define XDT_SHADOW_PREALLOC_UNPIN 75 #define XDT_SHADOW_RESYNC_FULL 76 #define XDT_SHADOW_RESYNC_ONLY 77 #define XDT_PM_FREQ_CHANGE 78 #define XDT_PM_IDLE_ENTRY 79 #define XDT_PM_IDLE_EXIT 80 #define XDT_SCHED_RUNSTATE_CHANGE 81 #define XDT_SCHED_CONTINUE_RUNNING 82 #define XDT_NEVENTS 83 typedef struct { const char *pr_mod; /* probe module */ const char *pr_name; /* probe name */ int evt_id; /* event id */ uint_t class; /* probe class */ } xdt_probe_t; typedef struct { uint32_t trc_mask; /* trace mask */ uint32_t cnt; /* num enabled probes in class */ } xdt_classinfo_t; typedef struct { ulong_t prev_domid; /* previous dom executed */ ulong_t prev_vcpuid; /* previous vcpu executed */ ulong_t prev_ctime; /* time spent on cpu */ ulong_t next_domid; /* next dom to be scheduled */ ulong_t next_vcpuid; /* next vcpu to be scheduled */ ulong_t next_wtime; /* time spent waiting to get on cpu */ ulong_t next_ts; /* allocated time slice */ ulong_t cur_domid; /* current dom */ ulong_t cur_vcpuid; /* current vcpuid */ int curinfo_valid; /* info is valid */ } xdt_schedinfo_t; static struct { uint_t cnt; /* total num of trace buffers */ size_t size; /* size of each cpu buffer */ mfn_t start_mfn; /* starting mfn of buffers */ caddr_t va; /* va buffers are mapped into */ /* per-cpu buffers */ struct t_buf **meta; /* buffer metadata */ struct t_rec **data; /* buffer data records */ /* statistics */ uint64_t stat_dropped_recs; /* records dropped */ uint64_t stat_spurious_cpu; /* recs with garbage cpuids */ uint64_t stat_spurious_switch; /* inconsistent vcpu switches */ uint64_t stat_unknown_shutdown; /* unknown shutdown code */ uint64_t stat_unknown_recs; /* unknown records */ } tbuf; static size_t tbuf_data_size; static char *xdt_stats[] = { "dropped_recs", }; /* * Tunable variables * * The following may be tuned by adding a line to /etc/system that * includes both the name of the module ("xdt") and the name of the variable. * For example: * set xdt:xdt_tbuf_pages = 40 */ uint_t xdt_tbuf_pages = 20; /* pages to alloc per-cpu buf */ /* * The following may be tuned by adding a line to * /platform/i86xpv/kernel/drv/xdt.conf. * For example: * xdt_poll_nsec = 200000000; */ static hrtime_t xdt_poll_nsec; /* trace buffer poll interval */ /* * Another tunable variable: the maximum number of records to process * in one scan. If it is 0 (e.g. not set in /etc/system), it will * be set to ncpu * (bufsize / max_rec_size). * * Having an upper limit avoids a situation where the scan would loop * endlessly in case the hypervisor adds records quicker than we * can process them. It's better to drop records than to loop, obviously. */ uint_t xdt_max_recs = 0; /* * Internal variables */ static dev_info_t *xdt_devi; static dtrace_provider_id_t xdt_id; static uint_t xdt_ncpus; /* total number of phys CPUs */ static uint32_t cur_trace_mask; /* current trace mask */ static xdt_schedinfo_t *xdt_cpu_schedinfo; /* per-cpu sched info */ dtrace_id_t xdt_probemap[XDT_NEVENTS]; /* map of enabled probes */ dtrace_id_t xdt_prid[XDT_NEVENTS]; /* IDs of registered events */ static cyclic_id_t xdt_cyclic = CYCLIC_NONE; static kstat_t *xdt_kstats; static xdt_classinfo_t xdt_classinfo[XDT_NCLASSES]; /* * These provide context when probes fire. They can be accessed * from xdt dtrace probe (as `xdt_curdom, etc). It's ok for these * to be global, and not per-cpu, as probes are run strictly in sequence * as the trace buffers are */ uint_t xdt_curdom, xdt_curvcpu, xdt_curpcpu; uint64_t xdt_timestamp; static xdt_probe_t xdt_probe[] = { /* Sched probes */ { "sched", "off-cpu", XDT_SCHED_OFF_CPU, XDT_SCHED }, { "sched", "on-cpu", XDT_SCHED_ON_CPU, XDT_SCHED }, { "sched", "idle-off-cpu", XDT_SCHED_IDLE_OFF_CPU, XDT_SCHED }, { "sched", "idle-on-cpu", XDT_SCHED_IDLE_ON_CPU, XDT_SCHED }, { "sched", "block", XDT_SCHED_BLOCK, XDT_SCHED }, { "sched", "sleep", XDT_SCHED_SLEEP, XDT_SCHED }, { "sched", "wake", XDT_SCHED_WAKE, XDT_SCHED }, { "sched", "yield", XDT_SCHED_YIELD, XDT_SCHED }, { "sched", "shutdown-poweroff", XDT_SCHED_SHUTDOWN_POWEROFF, XDT_SCHED }, { "sched", "shutdown-reboot", XDT_SCHED_SHUTDOWN_REBOOT, XDT_SCHED }, { "sched", "shutdown-suspend", XDT_SCHED_SHUTDOWN_SUSPEND, XDT_SCHED }, { "sched", "shutdown-crash", XDT_SCHED_SHUTDOWN_CRASH, XDT_SCHED }, { "sched", "add", XDT_SCHED_ADD_VCPU, XDT_SCHED }, { "sched", "runstate-change", XDT_SCHED_RUNSTATE_CHANGE, XDT_SCHED }, { "sched", "continue-running", XDT_SCHED_CONTINUE_RUNNING, XDT_SCHED }, /* Memory probes */ { "mem", "page-grant-map", XDT_MEM_PAGE_GRANT_MAP, XDT_MEM }, { "mem", "page-grant-unmap", XDT_MEM_PAGE_GRANT_UNMAP, XDT_MEM }, { "mem", "page-grant-transfer", XDT_MEM_PAGE_GRANT_TRANSFER, XDT_MEM }, {"pv", "hypercall", XDT_PV_HYPERCALL, XDT_PV }, {"pv", "trap", XDT_PV_TRAP, XDT_PV }, {"pv", "page-fault", XDT_PV_PAGE_FAULT, XDT_PV }, {"pv", "forced-invalid-op", XDT_PV_FORCED_INVALID_OP, XDT_PV }, {"pv", "emulate-priv-op", XDT_PV_EMULATE_PRIVOP, XDT_PV }, {"pv", "math-state-restore", XDT_PV_MATH_STATE_RESTORE, XDT_PV }, {"pv", "paging-fixup", XDT_PV_PAGING_FIXUP, XDT_PV }, {"pv", "dt-mapping-fault", XDT_PV_DT_MAPPING_FAULT, XDT_PV }, {"pv", "pte-write-emul", XDT_PV_PTWR_EMULATION, XDT_PV }, /* HVM probes */ { "hvm", "vmentry", XDT_HVM_VMENTRY, XDT_HVM }, { "hvm", "vmexit", XDT_HVM_VMEXIT, XDT_HVM }, { "hvm", "pagefault-xen", XDT_HVM_PF_XEN, XDT_HVM }, { "hvm", "pagefault-inject", XDT_HVM_PF_INJECT, XDT_HVM }, { "hvm", "exception-inject", XDT_HVM_EXC_INJECT, XDT_HVM }, { "hvm", "virq-inject", XDT_HVM_VIRQ_INJECT, XDT_HVM }, { "hvm", "cr-read", XDT_HVM_CR_READ, XDT_HVM }, { "hvm", "cr-write", XDT_HVM_CR_WRITE, XDT_HVM }, { "hvm", "msr-read", XDT_HVM_MSR_READ, XDT_HVM }, { "hvm", "msr-write", XDT_HVM_MSR_WRITE, XDT_HVM }, { "hvm", "cpuid", XDT_HVM_CPUID, XDT_HVM }, { "hvm", "intr", XDT_HVM_INTR, XDT_HVM }, { "hvm", "intr-window", XDT_HVM_INTR_WINDOW, XDT_HVM }, { "hvm", "nmi", XDT_HVM_NMI, XDT_HVM }, { "hvm", "smi", XDT_HVM_SMI, XDT_HVM }, { "hvm", "vmmcall", XDT_HVM_VMMCALL, XDT_HVM }, { "hvm", "hlt", XDT_HVM_HLT, XDT_HVM }, { "hvm", "invlpg", XDT_HVM_INVLPG, XDT_HVM }, { "hvm", "mce", XDT_HVM_MCE, XDT_HVM }, { "hvm", "pio-read", XDT_HVM_IOPORT_READ, XDT_HVM }, { "hvm", "pio-write", XDT_HVM_IOPORT_WRITE, XDT_HVM }, { "hvm", "mmio-read", XDT_HVM_IOMEM_READ, XDT_HVM }, { "hvm", "mmio-write", XDT_HVM_IOMEM_WRITE, XDT_HVM }, { "hvm", "clts", XDT_HVM_CLTS, XDT_HVM }, { "hvm", "lmsw", XDT_HVM_LMSW, XDT_HVM }, { "shadow", "fault-not-shadow", XDT_SHADOW_NOT_SHADOW, XDT_SHADOW }, { "shadow", "fast-propagate", XDT_SHADOW_FAST_PROPAGATE, XDT_SHADOW }, { "shadow", "fast-mmio", XDT_SHADOW_FAST_MMIO, XDT_SHADOW }, { "shadow", "false-fast-path", XDT_SHADOW_FALSE_FAST_PATH, XDT_SHADOW }, { "shadow", "mmio", XDT_SHADOW_MMIO, XDT_SHADOW }, { "shadow", "fixup", XDT_SHADOW_FIXUP, XDT_SHADOW }, { "shadow", "domf-dying", XDT_SHADOW_DOMF_DYING, XDT_SHADOW }, { "shadow", "emulate", XDT_SHADOW_EMULATE, XDT_SHADOW }, { "shadow", "emulate-unshadow-user", XDT_SHADOW_EMULATE_UNSHADOW_USER, XDT_SHADOW }, { "shadow", "emulate-unshadow-evtinj", XDT_SHADOW_EMULATE_UNSHADOW_EVTINJ, XDT_SHADOW }, { "shadow", "emulate-unshadow-unhandled", XDT_SHADOW_EMULATE_UNSHADOW_UNHANDLED, XDT_SHADOW }, { "shadow", "wrmap-bf", XDT_SHADOW_WRMAP_BF, XDT_SHADOW }, { "shadow", "prealloc-unpin", XDT_SHADOW_PREALLOC_UNPIN, XDT_SHADOW }, { "shadow", "resync-full", XDT_SHADOW_RESYNC_FULL, XDT_SHADOW }, { "shadow", "resync-only", XDT_SHADOW_RESYNC_ONLY, XDT_SHADOW }, { "pm", "freq-change", XDT_PM_FREQ_CHANGE, XDT_PM }, { "pm", "idle-entry", XDT_PM_IDLE_ENTRY, XDT_PM }, { "pm", "idle-exit", XDT_PM_IDLE_EXIT, XDT_PM }, /* Trace buffer related probes */ { "trace", "records-lost", XDT_TRC_LOST_RECORDS, XDT_GEN }, { NULL } }; static inline uint32_t xdt_nr_active_probes() { int i; uint32_t tot = 0; for (i = 0; i < XDT_NCLASSES; i++) tot += xdt_classinfo[i].cnt; return (tot); } static void xdt_init_trace_masks(void) { xdt_classinfo[XDT_SCHED].trc_mask = TRC_SCHED; xdt_classinfo[XDT_MEM].trc_mask = TRC_MEM; xdt_classinfo[XDT_HVM].trc_mask = TRC_HVM; xdt_classinfo[XDT_GEN].trc_mask = TRC_GEN; xdt_classinfo[XDT_PV].trc_mask = TRC_PV; xdt_classinfo[XDT_SHADOW].trc_mask = TRC_SHADOW; xdt_classinfo[XDT_PM].trc_mask = TRC_PM; } static int xdt_kstat_update(kstat_t *ksp, int flag) { kstat_named_t *knp; if (flag != KSTAT_READ) return (EACCES); knp = ksp->ks_data; /* * Assignment order should match that of the names in * xdt_stats. */ (knp++)->value.ui64 = tbuf.stat_dropped_recs; return (0); } static void xdt_kstat_init(void) { int nstats = sizeof (xdt_stats) / sizeof (xdt_stats[0]); char **cp = xdt_stats; kstat_named_t *knp; if ((xdt_kstats = kstat_create("xdt", 0, "trace_statistics", "misc", KSTAT_TYPE_NAMED, nstats, 0)) == NULL) return; xdt_kstats->ks_update = xdt_kstat_update; knp = xdt_kstats->ks_data; while (nstats > 0) { kstat_named_init(knp, *cp, KSTAT_DATA_UINT64); knp++; cp++; nstats--; } kstat_install(xdt_kstats); } static int xdt_sysctl_tbuf(xen_sysctl_tbuf_op_t *tbuf_op) { xen_sysctl_t op; int xerr; op.cmd = XEN_SYSCTL_tbuf_op; op.interface_version = XEN_SYSCTL_INTERFACE_VERSION; op.u.tbuf_op = *tbuf_op; if ((xerr = HYPERVISOR_sysctl(&op)) != 0) return (xen_xlate_errcode(xerr)); *tbuf_op = op.u.tbuf_op; return (0); } static int xdt_map_trace_buffers(mfn_t mfn, caddr_t va, size_t len) { x86pte_t pte; caddr_t const sva = va; caddr_t const eva = va + len; int xerr; ASSERT(mfn != MFN_INVALID); ASSERT(va != NULL); ASSERT(IS_PAGEALIGNED(len)); for (; va < eva; va += MMU_PAGESIZE) { /* * Ask the HAT to load a throwaway mapping to page zero, then * overwrite it with the hypervisor mapping. It gets removed * later via hat_unload(). */ hat_devload(kas.a_hat, va, MMU_PAGESIZE, (pfn_t)0, PROT_READ | HAT_UNORDERED_OK, HAT_LOAD_NOCONSIST | HAT_LOAD); pte = mmu_ptob((x86pte_t)mfn) | PT_VALID | PT_USER | PT_FOREIGN | PT_WRITABLE; xerr = HYPERVISOR_update_va_mapping_otherdomain((ulong_t)va, pte, UVMF_INVLPG | UVMF_LOCAL, DOMID_XEN); if (xerr != 0) { /* unmap pages loaded so far */ size_t ulen = (uintptr_t)(va + MMU_PAGESIZE) - (uintptr_t)sva; hat_unload(kas.a_hat, sva, ulen, HAT_UNLOAD_UNMAP); return (xen_xlate_errcode(xerr)); } mfn++; } return (0); } static int xdt_attach_trace_buffers(void) { xen_sysctl_tbuf_op_t tbuf_op; size_t len; int err; uint_t i; /* * Xen does not support trace buffer re-sizing. If the buffers * have already been allocated we just use them as is. */ tbuf_op.cmd = XEN_SYSCTL_TBUFOP_get_info; if ((err = xdt_sysctl_tbuf(&tbuf_op)) != 0) return (err); if (tbuf_op.size == 0) { /* set trace buffer size */ tbuf_op.cmd = XEN_SYSCTL_TBUFOP_set_size; tbuf_op.size = xdt_tbuf_pages; (void) xdt_sysctl_tbuf(&tbuf_op); /* get trace buffer info */ tbuf_op.cmd = XEN_SYSCTL_TBUFOP_get_info; if ((err = xdt_sysctl_tbuf(&tbuf_op)) != 0) return (err); if (tbuf_op.size == 0) { cmn_err(CE_NOTE, "Couldn't allocate trace buffers."); return (ENOBUFS); } } tbuf.size = tbuf_op.size; tbuf.start_mfn = (mfn_t)tbuf_op.buffer_mfn; tbuf.cnt = xdt_ncpus; ASSERT(tbuf.start_mfn != MFN_INVALID); ASSERT(tbuf.cnt > 0); len = tbuf.size * tbuf.cnt; tbuf.va = vmem_alloc(heap_arena, len, VM_SLEEP); if ((err = xdt_map_trace_buffers(tbuf.start_mfn, tbuf.va, len)) != 0) { vmem_free(heap_arena, tbuf.va, len); tbuf.va = NULL; return (err); } tbuf.meta = (struct t_buf **)kmem_alloc(tbuf.cnt * sizeof (*tbuf.meta), KM_SLEEP); tbuf.data = (struct t_rec **)kmem_alloc(tbuf.cnt * sizeof (*tbuf.data), KM_SLEEP); for (i = 0; i < tbuf.cnt; i++) { void *cpu_buf = (void *)(tbuf.va + (tbuf.size * i)); tbuf.meta[i] = cpu_buf; tbuf.data[i] = (struct t_rec *)((uintptr_t)cpu_buf + sizeof (struct t_buf)); /* throw away stale trace records */ tbuf.meta[i]->cons = tbuf.meta[i]->prod; } tbuf_data_size = tbuf.size - sizeof (struct t_buf); if (xdt_max_recs == 0) xdt_max_recs = (xdt_ncpus * tbuf_data_size) / sizeof (struct t_rec); return (0); } static void xdt_detach_trace_buffers(void) { size_t len = tbuf.size * tbuf.cnt; ASSERT(tbuf.va != NULL); hat_unload(kas.a_hat, tbuf.va, len, HAT_UNLOAD_UNMAP | HAT_UNLOAD_UNLOCK); vmem_free(heap_arena, tbuf.va, len); kmem_free(tbuf.meta, tbuf.cnt * sizeof (*tbuf.meta)); kmem_free(tbuf.data, tbuf.cnt * sizeof (*tbuf.data)); } static void xdt_update_sched_context(uint_t cpuid, uint_t dom, uint_t vcpu) { xdt_schedinfo_t *sp = &xdt_cpu_schedinfo[cpuid]; sp->cur_domid = dom; sp->cur_vcpuid = vcpu; sp->curinfo_valid = 1; } static void xdt_update_domain_context(uint_t dom, uint_t vcpu) { xdt_curdom = dom; xdt_curvcpu = vcpu; } static size_t xdt_process_rec(uint_t cpuid, struct t_rec *rec) { xdt_schedinfo_t *sp = &xdt_cpu_schedinfo[cpuid]; uint_t dom, vcpu; int eid; uint32_t *data; uint64_t tsc, addr64, rip64, val64, pte64; size_t rec_size; ASSERT(rec != NULL); ASSERT(xdt_ncpus == xpv_nr_phys_cpus()); eid = 0; if (cpuid >= xdt_ncpus) { tbuf.stat_spurious_cpu++; goto done; } /* * If our current state isn't valid, and if this is not * an event that will update our state, skip it. */ if (!sp->curinfo_valid && rec->event != TRC_SCHED_SWITCH && rec->event != TRC_LOST_RECORDS) goto done; if (rec->cycles_included) { data = rec->u.cycles.extra_u32; tsc = (((uint64_t)rec->u.cycles.cycles_hi) << 32) | rec->u.cycles.cycles_lo; } else { data = rec->u.nocycles.extra_u32; tsc = 0; } xdt_timestamp = tsc; switch (rec->event) { /* * Sched probes */ case TRC_SCHED_SWITCH_INFPREV: /* * Info on vCPU being de-scheduled * * data[0] = prev domid * data[1] = time spent on pcpu */ sp->prev_domid = data[0]; sp->prev_ctime = data[1]; break; case TRC_SCHED_SWITCH_INFNEXT: /* * Info on next vCPU to be scheduled * * data[0] = next domid * data[1] = time spent waiting to get on cpu * data[2] = time slice */ sp->next_domid = data[0]; sp->next_wtime = data[1]; sp->next_ts = data[2]; break; case TRC_SCHED_SWITCH: /* * vCPU switch * * data[0] = prev domid * data[1] = prev vcpuid * data[2] = next domid * data[3] = next vcpuid */ /* * Provide valid context for this probe if there * wasn't one. */ if (!sp->curinfo_valid) xdt_update_domain_context(data[0], data[1]); xdt_update_sched_context(cpuid, data[0], data[1]); if (data[0] != sp->prev_domid && data[2] != sp->next_domid) { /* prev and next info don't match doms being sched'd */ tbuf.stat_spurious_switch++; goto switchdone; } sp->prev_vcpuid = data[1]; sp->next_vcpuid = data[3]; XDT_PROBE3(IS_IDLE_DOM(sp->prev_domid)? XDT_SCHED_IDLE_OFF_CPU:XDT_SCHED_OFF_CPU, sp->prev_domid, sp->prev_vcpuid, sp->prev_ctime); XDT_PROBE4(IS_IDLE_DOM(sp->next_domid)? XDT_SCHED_IDLE_ON_CPU:XDT_SCHED_ON_CPU, sp->next_domid, sp->next_vcpuid, sp->next_wtime, sp->next_ts); switchdone: xdt_update_sched_context(cpuid, data[2], data[3]); xdt_update_domain_context(data[2], data[3]); break; case TRC_SCHED_BLOCK: /* * vCPU blocked * * data[0] = domid * data[1] = vcpuid */ XDT_PROBE2(XDT_SCHED_BLOCK, data[0], data[1]); break; case TRC_SCHED_SLEEP: /* * Put vCPU to sleep * * data[0] = domid * data[1] = vcpuid */ XDT_PROBE2(XDT_SCHED_SLEEP, data[0], data[1]); break; case TRC_SCHED_WAKE: /* * Wake up vCPU * * data[0] = domid * data[1] = vcpuid */ XDT_PROBE2(XDT_SCHED_WAKE, data[0], data[1]); break; case TRC_SCHED_YIELD: /* * vCPU yielded * * data[0] = domid * data[1] = vcpuid */ XDT_PROBE2(XDT_SCHED_YIELD, data[0], data[1]); break; case TRC_SCHED_SHUTDOWN: /* * Guest shutting down * * data[0] = domid * data[1] = initiating vcpu * data[2] = shutdown code */ switch (data[2]) { case SHUTDOWN_poweroff: eid = XDT_SCHED_SHUTDOWN_POWEROFF; break; case SHUTDOWN_reboot: eid = XDT_SCHED_SHUTDOWN_REBOOT; break; case SHUTDOWN_suspend: eid = XDT_SCHED_SHUTDOWN_SUSPEND; break; case SHUTDOWN_crash: eid = XDT_SCHED_SHUTDOWN_CRASH; break; default: tbuf.stat_unknown_shutdown++; goto done; } XDT_PROBE2(eid, data[0], data[1]); break; case TRC_SCHED_DOM_REM: case TRC_SCHED_CTL: case TRC_SCHED_S_TIMER_FN: case TRC_SCHED_T_TIMER_FN: case TRC_SCHED_DOM_TIMER_FN: /* unused */ break; case TRC_SCHED_DOM_ADD: /* * Add vcpu to a guest. * * data[0] = domid * data[1] = vcpu */ XDT_PROBE2(XDT_SCHED_ADD_VCPU, data[0], data[1]); break; case TRC_SCHED_ADJDOM: /* * Scheduling parameters for a guest * were modified. * * data[0] = domid; */ XDT_PROBE1(XDT_SCHED_ADJDOM, data[1]); break; case TRC_SCHED_RUNSTATE_CHANGE: /* * Runstate change for a VCPU. * * data[0] = (domain << 16) | vcpu; * data[1] = oldstate; * data[2] = newstate; */ XDT_PROBE4(XDT_SCHED_RUNSTATE_CHANGE, data[0] >> 16, data[0] & 0xffff, data[1], data[2]); break; case TRC_SCHED_CONTINUE_RUNNING: /* * VCPU is back on a physical CPU that it previously * was also running this VCPU. * * data[0] = (domain << 16) | vcpu; */ XDT_PROBE2(XDT_SCHED_CONTINUE_RUNNING, data[0] >> 16, data[0] & 0xffff); break; /* * Mem probes */ case TRC_MEM_PAGE_GRANT_MAP: /* * Guest mapped page grant * * data[0] = target domid */ XDT_PROBE1(XDT_MEM_PAGE_GRANT_MAP, data[0]); break; case TRC_MEM_PAGE_GRANT_UNMAP: /* * Guest unmapped page grant * * data[0] = target domid */ XDT_PROBE1(XDT_MEM_PAGE_GRANT_UNMAP, data[0]); break; case TRC_MEM_PAGE_GRANT_TRANSFER: /* * Page grant is being transferred * * data[0] = target domid */ XDT_PROBE1(XDT_MEM_PAGE_GRANT_TRANSFER, data[0]); break; /* * Probes for PV domains. */ case TRC_PV_HYPERCALL: /* * Hypercall from a 32-bit PV domain. * * data[0] = eip * data[1] = eax */ XDT_PROBE2(XDT_PV_HYPERCALL, data[0], data[1]); break; case TRC_PV_HYPERCALL | TRC_64_FLAG: /* * Hypercall from a 64-bit PV domain. * * data[0] = rip(0:31) * data[1] = rip(32:63) * data[2] = eax; */ rip64 = (((uint64_t)data[1]) << 32) | data[0]; XDT_PROBE2(XDT_PV_HYPERCALL, rip64, data[2]); break; case TRC_PV_TRAP: /* * Trap in a 32-bit PV domain. * * data[0] = eip * data[1] = trapnr | (error_code_valid << 15) * | (error_code << 16); */ XDT_PROBE4(XDT_PV_TRAP, data[0], data[1] & 0x7fff, (data[1] >> 15) & 1, data[1] >> 16); break; case TRC_PV_TRAP | TRC_64_FLAG: /* * Trap in a 64-bit PV domain. * * data[0] = rip(0:31) * data[1] = rip(32:63) * data[2] = trapnr | (error_code_valid << 15) * | (error_code << 16); */ rip64 = (((uint64_t)data[1]) << 32) | data[2]; XDT_PROBE4(XDT_PV_TRAP, rip64, data[2] & 0x7fff, (data[2] >> 15) & 1, data[2] >> 16); break; case TRC_PV_PAGE_FAULT: /* * Page fault in a 32-bit PV domain. * * data[0] = eip * data[1] = vaddr * data[2] = error code */ XDT_PROBE3(XDT_PV_PAGE_FAULT, data[0], data[1], data[2]); break; case TRC_PV_PAGE_FAULT | TRC_64_FLAG: /* * Page fault in a 32-bit PV domain. * * data[0] = rip(0:31) * data[1] = rip(31:63) * data[2] = vaddr(0:31) * data[3] = vaddr(31:63) * data[4] = error code */ rip64 = (((uint64_t)data[1]) << 32) | data[0]; addr64 = (((uint64_t)data[3]) << 32) | data[2]; XDT_PROBE3(XDT_PV_PAGE_FAULT, rip64, addr64, data[4]); break; case TRC_PV_FORCED_INVALID_OP: /* * Hypervisor emulated a forced invalid op (ud2) * in a 32-bit PV domain. * * data[1] = eip */ XDT_PROBE1(XDT_PV_FORCED_INVALID_OP, data[1]); break; case TRC_PV_FORCED_INVALID_OP | TRC_64_FLAG: /* * Hypervisor emulated a forced invalid op (ud2) * in a 64-bit PV domain. * * data[1] = rip(0:31) * data[2] = rip(31:63) * */ rip64 = (((uint64_t)data[2]) << 32) | data[1]; XDT_PROBE1(XDT_PV_FORCED_INVALID_OP, rip64); break; case TRC_PV_EMULATE_PRIVOP: /* * Hypervisor emulated a privileged operation * in a 32-bit PV domain. * * data[0] = eip */ XDT_PROBE1(XDT_PV_EMULATE_PRIVOP, data[0]); break; case TRC_PV_EMULATE_PRIVOP | TRC_64_FLAG: /* * Hypervisor emulated a privileged operation * in a 64-bit PV domain. * * data[0] = rip(0:31) * data[1] = rip(31:63) */ rip64 = (((uint64_t)data[1]) << 32) | data[0]; XDT_PROBE1(XDT_PV_EMULATE_PRIVOP, rip64); break; case TRC_PV_EMULATE_4GB: /* unused, 32-bit hypervisor only */ break; case TRC_PV_MATH_STATE_RESTORE: /* * Hypervisor restores math state after FP DNA trap. * * No arguments. */ XDT_PROBE0(XDT_PV_MATH_STATE_RESTORE); break; case TRC_PV_PAGING_FIXUP: /* * Hypervisor fixed up a page fault (e.g. it was * a side-effect of hypervisor guest page table * bookkeeping, and not propagated to the guest). * * data[0] = eip * data[1] = vaddr */ XDT_PROBE2(XDT_PV_PAGING_FIXUP, data[0], data[2]); break; case TRC_PV_PAGING_FIXUP | TRC_64_FLAG: /* * Hypervisor fixed up a page fault (e.g. it was * a side-effect of hypervisor guest page table * bookkeeping, and not propagated to the guest). * * data[0] = eip(0:31) * data[1] = eip(31:63) * data[2] = vaddr(0:31) * data[3] = vaddr(31:63) */ rip64 = (((uint64_t)data[1]) << 32) | data[0]; addr64 = (((uint64_t)data[3]) << 32) | data[2]; XDT_PROBE2(XDT_PV_PAGING_FIXUP, rip64, addr64); break; case TRC_PV_GDT_LDT_MAPPING_FAULT: /* * Descriptor table mapping fault in a 32-bit PV domain. * data[0] = eip * data[1] = offset */ XDT_PROBE2(XDT_PV_DT_MAPPING_FAULT, data[0], data[1]); break; case TRC_PV_GDT_LDT_MAPPING_FAULT | TRC_64_FLAG: /* * Descriptor table mapping fault in a 64-bit PV domain. * * data[0] = eip(0:31) * data[1] = eip(31:63) * data[2] = offset(0:31) * data[3] = offset(31:63) */ rip64 = (((uint64_t)data[1]) << 32) | data[0]; val64 = (((uint64_t)data[3]) << 32) | data[2]; XDT_PROBE2(XDT_PV_DT_MAPPING_FAULT, rip64, val64); break; case TRC_PV_PTWR_EMULATION: case TRC_PV_PTWR_EMULATION_PAE | TRC_64_FLAG: /* * Should only happen on 32-bit hypervisor; unused. */ break; case TRC_PV_PTWR_EMULATION_PAE: /* * PTE write emulation for a 32-bit PV domain. * * data[0] = pte * data[1] = addr * data[2] = eip */ XDT_PROBE3(XDT_PV_PTWR_EMULATION, data[0], data[1], data[2]); break; case TRC_PV_PTWR_EMULATION | TRC_64_FLAG: /* * PTE write emulation for a 64-bit PV domain. * * data[0] = pte(0:31) * data[1] = pte(32:63) * data[2] = addr(0:31) * data[3] = addr(32:63) * data[4] = rip(0:31) * data[5] = rip(32:63) */ pte64 = (((uint64_t)data[1]) << 32) | data[0]; addr64 = (((uint64_t)data[3]) << 32) | data[2]; rip64 = (((uint64_t)data[5]) << 32) | data[4]; XDT_PROBE3(XDT_PV_PTWR_EMULATION, pte64, addr64, rip64); break; /* * HVM probes */ case TRC_HVM_VMENTRY: /* * Return to guest via vmx_launch/vmrun * */ XDT_PROBE0(XDT_HVM_VMENTRY); break; case TRC_HVM_VMEXIT: /* * Entry into VMEXIT handler from 32-bit HVM domain * * data[0] = cpu vendor specific exit code * data[1] = guest eip */ XDT_PROBE2(XDT_HVM_VMEXIT, data[0], data[1]); break; case TRC_HVM_VMEXIT64: /* * Entry into VMEXIT handler from 64-bit HVM domain * * data[0] = cpu vendor specific exit code * data[1] = guest rip(0:31) * data[2] = guest rip(32:64) */ rip64 = (((uint64_t)data[2]) << 32) | data[1]; XDT_PROBE2(XDT_HVM_VMEXIT, data[0], rip64); break; case TRC_HVM_PF_XEN64: /* * Pagefault in a guest that is a Xen (e.g. shadow) * artifact, and is not injected back into the guest. * * data[0] = error code * data[1] = guest VA(0:31) * data[2] = guest VA(32:64) */ addr64 = (((uint64_t)data[2]) << 32) | data[1]; XDT_PROBE2(XDT_HVM_PF_XEN, data[0], addr64); break; case TRC_HVM_PF_XEN: /* * Same as above, but for a 32-bit HVM domain. * * data[0] = error code * data[1] = guest VA */ XDT_PROBE2(XDT_HVM_PF_XEN, data[0], data[1]); break; case TRC_HVM_PF_INJECT: /* * 32-bit Xen only. */ break; case TRC_HVM_PF_INJECT64: /* * Pagefault injected back into a guest (e.g. the shadow * code found no mapping). * * data[0] = error code * data[1] = guest VA(0:31) * data[2] = guest VA(32:64) */ addr64 = (((uint64_t)data[2]) << 32) | data[1]; XDT_PROBE2(XDT_HVM_PF_INJECT, data[0], addr64); break; case TRC_HVM_INJ_EXC: /* * Exception injected into an HVM guest. * * data[0] = trap * data[1] = error code */ XDT_PROBE2(XDT_HVM_EXC_INJECT, data[0], data[1]); break; case TRC_HVM_INJ_VIRQ: /* * Interrupt inject into an HVM guest. * * data[0] = vector */ XDT_PROBE1(XDT_HVM_VIRQ_INJECT, data[0]); break; case TRC_HVM_REINJ_VIRQ: case TRC_HVM_IO_READ: case TRC_HVM_IO_WRITE: /* unused */ break; case TRC_HVM_CR_READ64: /* * Control register read. Intel VMX only. * * data[0] = control register # * data[1] = value(0:31) * data[2] = value(32:63) */ val64 = (((uint64_t)data[2]) << 32) | data[1]; XDT_PROBE2(XDT_HVM_CR_READ, data[0], val64); break; case TRC_HVM_CR_READ: /* * unused (32-bit Xen only) */ break; case TRC_HVM_CR_WRITE64: /* * Control register write. Intel VMX only. * * data[0] = control register # * data[1] = value(0:31) * data[2] = value(32:63) */ val64 = (((uint64_t)data[2]) << 32) | data[1]; XDT_PROBE2(XDT_HVM_CR_READ, data[0], val64); break; case TRC_HVM_CR_WRITE: /* * unused (32-bit Xen only) */ break; case TRC_HVM_DR_READ: /* * unused. * * data[0] = (domid<<16 + vcpuid) */ break; case TRC_HVM_DR_WRITE: /* * Debug register write. Not too useful; no values, * so we ignore this. * * data[0] = (domid<<16 + vcpuid) */ break; case TRC_HVM_MSR_READ: /* * MSR read. * * data[0] = MSR * data[1] = value(0:31) * data[2] = value(32:63) */ val64 = (((uint64_t)data[3]) << 32) | data[2]; XDT_PROBE2(XDT_HVM_MSR_READ, data[0], val64); break; case TRC_HVM_MSR_WRITE: /* * MSR write. * * data[0] = MSR; * data[1] = value(0:31) * data[2] = value(32:63) */ val64 = (((uint64_t)data[2]) << 32) | data[1]; XDT_PROBE2(XDT_HVM_MSR_WRITE, data[0], val64); break; case TRC_HVM_CPUID: /* * CPUID insn. * * data[0] = %eax (input) * data[1] = %eax * data[2] = %ebx * data[3] = %ecx * data[4] = %edx */ XDT_PROBE5(XDT_HVM_CPUID, data[0], data[1], data[2], data[3], data[4]); break; case TRC_HVM_INTR: /* * VMEXIT because of an interrupt. */ XDT_PROBE0(XDT_HVM_INTR); break; case TRC_HVM_INTR_WINDOW: /* * VMEXIT because of an interrupt window (an interrupt * can't be delivered immediately to a HVM guest and must * be delayed). * * data[0] = vector * data[1] = source * data[2] = info */ XDT_PROBE3(XDT_HVM_INTR_WINDOW, data[0], data[1], data[2]); break; case TRC_HVM_NMI: /* * VMEXIT because of an NMI. */ XDT_PROBE0(XDT_HVM_NMI); break; case TRC_HVM_SMI: /* * VMEXIT because of an SMI */ XDT_PROBE0(XDT_HVM_SMI); break; case TRC_HVM_VMMCALL: /* * VMMCALL insn. * * data[0] = %eax */ XDT_PROBE1(XDT_HVM_VMMCALL, data[0]); break; case TRC_HVM_HLT: /* * HLT insn. * * data[0] = 1 if VCPU runnable, 0 if not */ XDT_PROBE1(XDT_HVM_HLT, data[0]); break; case TRC_HVM_INVLPG64: /* * * data[0] = INVLPGA ? 1 : 0 * data[1] = vaddr(0:31) * data[2] = vaddr(32:63) */ addr64 = (((uint64_t)data[2]) << 32) | data[1]; XDT_PROBE2(XDT_HVM_INVLPG, data[0], addr64); break; case TRC_HVM_INVLPG: /* * unused (32-bit Xen only) * * data[0] = (domid<<16 + vcpuid) */ break; case TRC_HVM_MCE: /* * #MCE VMEXIT * */ XDT_PROBE0(XDT_HVM_MCE); break; case TRC_HVM_IOPORT_READ: case TRC_HVM_IOPORT_WRITE: case TRC_HVM_IOMEM_READ: case TRC_HVM_IOMEM_WRITE: /* * data[0] = addr(0:31) * data[1] = addr(32:63) * data[2] = count * data[3] = size */ switch (rec->event) { case TRC_HVM_IOPORT_READ: eid = XDT_HVM_IOPORT_READ; break; case TRC_HVM_IOPORT_WRITE: eid = XDT_HVM_IOPORT_WRITE; break; case TRC_HVM_IOMEM_READ: eid = XDT_HVM_IOMEM_READ; break; case TRC_HVM_IOMEM_WRITE: eid = XDT_HVM_IOMEM_WRITE; break; } addr64 = (((uint64_t)data[1]) << 32) | data[0]; XDT_PROBE3(eid, addr64, data[2], data[3]); break; case TRC_HVM_CLTS: /* * CLTS insn (Intel VMX only) */ XDT_PROBE0(XDT_HVM_CLTS); break; case TRC_HVM_LMSW64: /* * LMSW insn. * * data[0] = value(0:31) * data[1] = value(32:63) */ val64 = (((uint64_t)data[1]) << 32) | data[0]; XDT_PROBE1(XDT_HVM_LMSW, val64); break; case TRC_HVM_LMSW: /* * unused (32-bit Xen only) */ break; /* * Shadow page table probes (mainly used for HVM domains * without hardware paging support). */ case TRC_SHADOW_NOT_SHADOW | SH_GUEST_32: /* * data[0] = pte(0:31) * data[1] = pte(32:63) * data[2] = va * data[3] = flags */ pte64 = ((uint64_t)data[1] << 32) | data[0]; XDT_PROBE3(XDT_SHADOW_NOT_SHADOW, pte64, data[2], data[3]); break; case TRC_SHADOW_NOT_SHADOW | SH_GUEST_PAE: case TRC_SHADOW_NOT_SHADOW | SH_GUEST_64: /* * data[0] = pte(0:31) * data[1] = pte(32:63) * data[2] = va(0:31) * data[3] = va(32:63) * data[4] = flags */ addr64 = ((uint64_t)data[2] << 32) | data[3]; pte64 = ((uint64_t)data[1] << 32) | data[0]; XDT_PROBE3(XDT_SHADOW_NOT_SHADOW, pte64, addr64, data[4]); break; case TRC_SHADOW_FAST_PROPAGATE | SH_GUEST_32: /* * data[0] = va */ XDT_PROBE1(XDT_SHADOW_FAST_PROPAGATE, data[0]); break; case TRC_SHADOW_FAST_PROPAGATE | SH_GUEST_PAE: case TRC_SHADOW_FAST_PROPAGATE | SH_GUEST_64: /* * data[0] = va(0:31) * data[1] = va(32:63) */ addr64 = ((uint64_t)data[1] << 32) | data[0]; XDT_PROBE1(XDT_SHADOW_FAST_PROPAGATE, addr64); break; case TRC_SHADOW_FAST_MMIO | SH_GUEST_32: /* * data[0] = va */ XDT_PROBE1(XDT_SHADOW_FAST_MMIO, data[0]); break; case TRC_SHADOW_FAST_MMIO | SH_GUEST_PAE: case TRC_SHADOW_FAST_MMIO | SH_GUEST_64: /* * data[0] = va(0:31) * data[1] = va(32:63) */ addr64 = ((uint64_t)data[1] << 32) | data[0]; XDT_PROBE1(XDT_SHADOW_FAST_MMIO, addr64); break; case TRC_SHADOW_FALSE_FAST_PATH | SH_GUEST_32: /* * data[0] = va */ XDT_PROBE1(XDT_SHADOW_FALSE_FAST_PATH, data[0]); break; case TRC_SHADOW_FALSE_FAST_PATH | SH_GUEST_PAE: case TRC_SHADOW_FALSE_FAST_PATH | SH_GUEST_64: /* * data[0] = va(0:31) * data[1] = va(32:63) */ addr64 = ((uint64_t)data[1] << 32) | data[0]; XDT_PROBE1(XDT_SHADOW_FALSE_FAST_PATH, addr64); break; case TRC_SHADOW_MMIO | SH_GUEST_32: /* * data[0] = va */ XDT_PROBE1(XDT_SHADOW_MMIO, data[0]); break; case TRC_SHADOW_MMIO | SH_GUEST_PAE: case TRC_SHADOW_MMIO | SH_GUEST_64: /* * data[0] = va(0:31) * data[1] = va(32:63) */ addr64 = ((uint64_t)data[1] << 32) | data[0]; XDT_PROBE1(XDT_SHADOW_MMIO, addr64); break; case TRC_SHADOW_FIXUP | SH_GUEST_32: /* * data[0] = pte(0:31) * data[1] = pte(32:63) * data[2] = va * data[3] = flags */ pte64 = ((uint64_t)data[1] << 32) | data[0]; XDT_PROBE3(XDT_SHADOW_FIXUP, pte64, data[2], data[3]); break; case TRC_SHADOW_FIXUP | SH_GUEST_64: case TRC_SHADOW_FIXUP | SH_GUEST_PAE: /* * data[0] = pte(0:31) * data[1] = pte(32:63) * data[2] = va(0:31) * data[3] = va(32:63) * data[4] = flags */ addr64 = ((uint64_t)data[2] << 32) | data[3]; pte64 = ((uint64_t)data[1] << 32) | data[0]; XDT_PROBE3(XDT_SHADOW_FIXUP, pte64, addr64, data[4]); break; case TRC_SHADOW_DOMF_DYING | SH_GUEST_32: /* * data[0] = va */ XDT_PROBE1(XDT_SHADOW_DOMF_DYING, data[0]); break; case TRC_SHADOW_DOMF_DYING | SH_GUEST_PAE: case TRC_SHADOW_DOMF_DYING | SH_GUEST_64: /* * data[0] = va(0:31) * data[1] = va(32:63) */ addr64 = ((uint64_t)data[1] << 32) | data[0]; XDT_PROBE1(XDT_SHADOW_DOMF_DYING, addr64); break; case TRC_SHADOW_EMULATE | SH_GUEST_32: /* * data[0] = pte(0:31) * data[1] = pte(32:63) * data[2] = val(0:31) * data[3] = val(32:63) * data[4] = addr * data[5] = flags */ pte64 = ((uint64_t)data[1] << 32) | data[0]; val64 = ((uint64_t)data[3] << 32) | data[2]; XDT_PROBE5(XDT_SHADOW_EMULATE, pte64, val64, data[4], data[5] & 0x7fffffff, data[5] >> 29); break; case TRC_SHADOW_EMULATE | SH_GUEST_PAE: case TRC_SHADOW_EMULATE | SH_GUEST_64: /* * data[0] = pte(0:31) * data[1] = pte(32:63) * data[2] = val(0:31) * data[3] = val(32:63) * data[4] = addr(0:31) * data[5] = addr(32:63) * data[6] = flags */ pte64 = ((uint64_t)data[1] << 32) | data[0]; val64 = ((uint64_t)data[3] << 32) | data[2]; addr64 = ((uint64_t)data[5] << 32) | data[4]; XDT_PROBE5(XDT_SHADOW_EMULATE, pte64, val64, data[4], data[6] & 0x7fffffff, data[6] >> 29); break; case TRC_SHADOW_EMULATE_UNSHADOW_USER | SH_GUEST_32: /* * data[0] = gfn * data[1] = vaddr */ XDT_PROBE2(XDT_SHADOW_EMULATE_UNSHADOW_USER, data[0], data[1]); break; case TRC_SHADOW_EMULATE_UNSHADOW_USER | SH_GUEST_PAE: case TRC_SHADOW_EMULATE_UNSHADOW_USER | SH_GUEST_64: /* * data[0] = gfn(0:31) * data[1] = gfn(32:63) * data[2] = vaddr(0:31) * data[3] = vaddr(32:63) */ val64 = ((uint64_t)data[1] << 32) | data[0]; addr64 = ((uint64_t)data[3] << 32) | data[2]; XDT_PROBE2(XDT_SHADOW_EMULATE_UNSHADOW_USER, val64, addr64); break; case TRC_SHADOW_EMULATE_UNSHADOW_EVTINJ | SH_GUEST_32: /* * data[0] = gfn * data[1] = vaddr */ XDT_PROBE2(XDT_SHADOW_EMULATE_UNSHADOW_EVTINJ, data[0], data[1]); break; case TRC_SHADOW_EMULATE_UNSHADOW_EVTINJ | SH_GUEST_PAE: case TRC_SHADOW_EMULATE_UNSHADOW_EVTINJ | SH_GUEST_64: /* * data[0] = gfn(0:31) * data[1] = gfn(32:63) * data[2] = vaddr(0:31) * data[3] = vaddr(32:63) */ val64 = ((uint64_t)data[1] << 32) | data[0]; addr64 = ((uint64_t)data[3] << 32) | data[2]; XDT_PROBE2(XDT_SHADOW_EMULATE_UNSHADOW_EVTINJ, val64, addr64); break; case TRC_SHADOW_EMULATE_UNSHADOW_UNHANDLED | SH_GUEST_32: /* * data[0] = gfn * data[1] = vaddr */ XDT_PROBE2(XDT_SHADOW_EMULATE_UNSHADOW_UNHANDLED, data[0], data[1]); break; case TRC_SHADOW_EMULATE_UNSHADOW_UNHANDLED | SH_GUEST_PAE: case TRC_SHADOW_EMULATE_UNSHADOW_UNHANDLED | SH_GUEST_64: /* * data[0] = gfn(0:31) * data[1] = gfn(32:63) * data[2] = vaddr(0:31) * data[3] = vaddr(32:63) */ val64 = ((uint64_t)data[1] << 32) | data[0]; addr64 = ((uint64_t)data[3] << 32) | data[2]; XDT_PROBE2(XDT_SHADOW_EMULATE_UNSHADOW_UNHANDLED, val64, addr64); break; case TRC_SHADOW_WRMAP_BF: /* * data[0] = gfn(0:31) * data[1] = gfn(32:63) */ val64 = ((uint64_t)data[1] << 32) | data[0]; XDT_PROBE1(XDT_SHADOW_WRMAP_BF, val64); break; case TRC_SHADOW_PREALLOC_UNPIN: /* * data[0] = gfn(0:31) * data[1] = gfn(32:63) */ val64 = ((uint64_t)data[1] << 32) | data[0]; XDT_PROBE1(XDT_SHADOW_PREALLOC_UNPIN, val64); break; case TRC_SHADOW_RESYNC_FULL: /* * data[0] = gmfn(0:31) * data[1] = gmfn(32:63) */ val64 = ((uint64_t)data[1] << 32) | data[0]; XDT_PROBE1(XDT_SHADOW_RESYNC_FULL, val64); break; case TRC_SHADOW_RESYNC_ONLY: /* * data[0] = gmfn(0:31) * data[1] = gmfn(32:63) */ val64 = ((uint64_t)data[1] << 32) | data[0]; XDT_PROBE1(XDT_SHADOW_RESYNC_ONLY, val64); break; /* * Power management probes. */ case TRC_PM_FREQ_CHANGE: /* * data[0] = old freq * data[1] = new freq */ XDT_PROBE2(XDT_PM_FREQ_CHANGE, data[0], data[1]); break; case TRC_PM_IDLE_ENTRY: /* * data[0] = C-state * data[1] = time */ XDT_PROBE2(XDT_PM_IDLE_ENTRY, data[0], data[1]); break; case TRC_PM_IDLE_EXIT: /* * data[0] = C-state * data[1] = time */ XDT_PROBE2(XDT_PM_IDLE_EXIT, data[0], data[1]); break; case TRC_LOST_RECORDS: vcpu = data[1] >> 16; dom = data[1] & 0xffff; xdt_update_sched_context(cpuid, dom, vcpu); xdt_update_domain_context(dom, vcpu); XDT_PROBE1(XDT_TRC_LOST_RECORDS, cpuid); tbuf.stat_dropped_recs++; break; default: tbuf.stat_unknown_recs++; break; } done: rec_size = 4 + (rec->cycles_included ? 8 : 0) + (rec->extra_u32 * 4); return (rec_size); } /* * Scan all CPU buffers for the record with the lowest timestamp so * that the probes will fire in order. */ static int xdt_get_first_rec(uint_t *cpuidp, struct t_rec **recp, uint32_t *consp) { uint_t cpuid; uint32_t prod, cons, offset; struct t_rec *rec; uint64_t minstamp = ~0ULL, stamp; uintptr_t data; for (cpuid = 0; cpuid < tbuf.cnt; cpuid++) { cons = tbuf.meta[cpuid]->cons; prod = tbuf.meta[cpuid]->prod; membar_consumer(); if (prod == cons) continue; offset = cons % tbuf_data_size; data = (uintptr_t)tbuf.data[cpuid] + offset; rec = (struct t_rec *)data; ASSERT((caddr_t)rec < tbuf.va + (tbuf.size * (cpuid + 1))); /* * All records that we know about have time cycles included. * If this record doesn't have them, assume it's a type * that we don't handle. Use a 0 time value, which will make * it get handled first (it will be thrown away). */ if (rec->cycles_included) stamp = (((uint64_t)rec->u.cycles.cycles_hi) << 32) | rec->u.cycles.cycles_lo; else stamp = 0; if (stamp < minstamp) { minstamp = stamp; *cpuidp = cpuid; *recp = rec; *consp = cons; } } if (minstamp != ~0ULL) return (1); return (0); } /*ARGSUSED*/ static void xdt_tbuf_scan(void *arg) { uint32_t bytes_done, cons; struct t_rec *rec; xdt_schedinfo_t *sp; uint_t nrecs, cpuid; for (nrecs = 0; nrecs < xdt_max_recs && xdt_get_first_rec(&cpuid, &rec, &cons) > 0; nrecs++) { xdt_curpcpu = cpuid; sp = &xdt_cpu_schedinfo[cpuid]; if (sp->curinfo_valid) xdt_update_domain_context(sp->cur_domid, sp->cur_vcpuid); bytes_done = xdt_process_rec(cpuid, rec); cons += bytes_done; /* * cons and prod are incremented modulo (2 * tbuf_data_size). * See <xen/public/trace.h>. */ if (cons >= 2 * tbuf_data_size) cons -= 2 * tbuf_data_size; membar_exit(); tbuf.meta[cpuid]->cons = cons; } } static void xdt_cyclic_enable(void) { cyc_handler_t hdlr; cyc_time_t when; ASSERT(MUTEX_HELD(&cpu_lock)); hdlr.cyh_func = xdt_tbuf_scan; hdlr.cyh_arg = NULL; hdlr.cyh_level = CY_LOW_LEVEL; when.cyt_interval = xdt_poll_nsec; when.cyt_when = dtrace_gethrtime() + when.cyt_interval; xdt_cyclic = cyclic_add(&hdlr, &when); } static void xdt_probe_create(xdt_probe_t *p) { ASSERT(p != NULL && p->pr_mod != NULL); if (dtrace_probe_lookup(xdt_id, p->pr_mod, NULL, p->pr_name) != 0) return; xdt_prid[p->evt_id] = dtrace_probe_create(xdt_id, p->pr_mod, NULL, p->pr_name, dtrace_mach_aframes(), p); } /*ARGSUSED*/ static void xdt_provide(void *arg, const dtrace_probedesc_t *desc) { const char *mod, *name; int i; if (desc == NULL) { for (i = 0; xdt_probe[i].pr_mod != NULL; i++) { xdt_probe_create(&xdt_probe[i]); } } else { mod = desc->dtpd_mod; name = desc->dtpd_name; for (i = 0; xdt_probe[i].pr_mod != NULL; i++) { int l1 = strlen(xdt_probe[i].pr_name); int l2 = strlen(xdt_probe[i].pr_mod); if (strncmp(name, xdt_probe[i].pr_name, l1) == 0 && strncmp(mod, xdt_probe[i].pr_mod, l2) == 0) break; } if (xdt_probe[i].pr_mod == NULL) return; xdt_probe_create(&xdt_probe[i]); } } /*ARGSUSED*/ static void xdt_destroy(void *arg, dtrace_id_t id, void *parg) { xdt_probe_t *p = parg; xdt_prid[p->evt_id] = 0; } static void xdt_set_trace_mask(uint32_t mask) { xen_sysctl_tbuf_op_t tbuf_op; /* Always need to trace scheduling, for context */ if (mask != 0) mask |= TRC_SCHED; tbuf_op.evt_mask = mask; tbuf_op.cmd = XEN_SYSCTL_TBUFOP_set_evt_mask; (void) xdt_sysctl_tbuf(&tbuf_op); } /*ARGSUSED*/ static int xdt_enable(void *arg, dtrace_id_t id, void *parg) { xdt_probe_t *p = parg; xen_sysctl_tbuf_op_t tbuf_op; ASSERT(MUTEX_HELD(&cpu_lock)); ASSERT(xdt_prid[p->evt_id] != 0); xdt_probemap[p->evt_id] = xdt_prid[p->evt_id]; xdt_classinfo[p->class].cnt++; if (xdt_classinfo[p->class].cnt == 1) { /* set the trace mask for this class */ cur_trace_mask |= xdt_classinfo[p->class].trc_mask; xdt_set_trace_mask(cur_trace_mask); } if (xdt_cyclic == CYCLIC_NONE) { tbuf_op.cmd = XEN_SYSCTL_TBUFOP_enable; if (xdt_sysctl_tbuf(&tbuf_op) != 0) { cmn_err(CE_NOTE, "Couldn't enable hypervisor tracing."); return (-1); } xdt_cyclic_enable(); } return (0); } /*ARGSUSED*/ static void xdt_disable(void *arg, dtrace_id_t id, void *parg) { xdt_probe_t *p = parg; xen_sysctl_tbuf_op_t tbuf_op; int i, err; ASSERT(MUTEX_HELD(&cpu_lock)); ASSERT(xdt_probemap[p->evt_id] != 0); ASSERT(xdt_probemap[p->evt_id] == xdt_prid[p->evt_id]); ASSERT(xdt_classinfo[p->class].cnt > 0); /* * We could be here in the slight window between the cyclic firing and * a call to dtrace_probe() occurring. We need to be careful if we tear * down any shared state. */ xdt_probemap[p->evt_id] = 0; xdt_classinfo[p->class].cnt--; if (xdt_nr_active_probes() == 0) { cur_trace_mask = 0; if (xdt_cyclic == CYCLIC_NONE) return; for (i = 0; i < xdt_ncpus; i++) xdt_cpu_schedinfo[i].curinfo_valid = 0; /* * We will try to disable the trace buffers. If we fail for some * reason we will try again, up to a count of XDT_TBUF_RETRY. * If we still aren't successful we try to set the trace mask * to 0 in order to prevent trace records from being written. */ tbuf_op.cmd = XEN_SYSCTL_TBUFOP_disable; i = 0; do { err = xdt_sysctl_tbuf(&tbuf_op); } while ((err != 0) && (++i < XDT_TBUF_RETRY)); if (err != 0) { cmn_err(CE_NOTE, "Couldn't disable hypervisor tracing."); xdt_set_trace_mask(0); } else { cyclic_remove(xdt_cyclic); xdt_cyclic = CYCLIC_NONE; /* * We don't bother making the hypercall to set * the trace mask, since it will be reset when * tracing is re-enabled. */ } } else if (xdt_classinfo[p->class].cnt == 0) { cur_trace_mask ^= xdt_classinfo[p->class].trc_mask; /* other probes are enabled, so add the sub-class mask back */ cur_trace_mask |= 0xF000; xdt_set_trace_mask(cur_trace_mask); } } static dtrace_pattr_t xdt_attr = { { DTRACE_STABILITY_PRIVATE, DTRACE_STABILITY_PRIVATE, DTRACE_CLASS_PLATFORM }, { DTRACE_STABILITY_PRIVATE, DTRACE_STABILITY_PRIVATE, DTRACE_CLASS_PLATFORM }, { DTRACE_STABILITY_PRIVATE, DTRACE_STABILITY_PRIVATE, DTRACE_CLASS_UNKNOWN }, { DTRACE_STABILITY_PRIVATE, DTRACE_STABILITY_PRIVATE, DTRACE_CLASS_PLATFORM }, { DTRACE_STABILITY_PRIVATE, DTRACE_STABILITY_PRIVATE, DTRACE_CLASS_PLATFORM }, }; static dtrace_pops_t xdt_pops = { xdt_provide, /* dtps_provide() */ NULL, /* dtps_provide_module() */ xdt_enable, /* dtps_enable() */ xdt_disable, /* dtps_disable() */ NULL, /* dtps_suspend() */ NULL, /* dtps_resume() */ NULL, /* dtps_getargdesc() */ NULL, /* dtps_getargval() */ NULL, /* dtps_usermode() */ xdt_destroy /* dtps_destroy() */ }; static int xdt_attach(dev_info_t *devi, ddi_attach_cmd_t cmd) { int val; if (!DOMAIN_IS_INITDOMAIN(xen_info)) return (DDI_FAILURE); switch (cmd) { case DDI_ATTACH: break; case DDI_RESUME: /* * We might support proper suspend/resume in the future, so, * return DDI_FAILURE for now. */ return (DDI_FAILURE); default: return (DDI_FAILURE); } xdt_ncpus = xpv_nr_phys_cpus(); ASSERT(xdt_ncpus > 0); if (ddi_create_minor_node(devi, "xdt", S_IFCHR, 0, DDI_PSEUDO, 0) == DDI_FAILURE || xdt_attach_trace_buffers() != 0 || dtrace_register("xdt", &xdt_attr, DTRACE_PRIV_KERNEL, NULL, &xdt_pops, NULL, &xdt_id) != 0) { if (tbuf.va != NULL) xdt_detach_trace_buffers(); ddi_remove_minor_node(devi, NULL); return (DDI_FAILURE); } val = ddi_getprop(DDI_DEV_T_ANY, devi, DDI_PROP_DONTPASS, "xdt_poll_nsec", XDT_POLL_DEFAULT); xdt_poll_nsec = MAX(val, XDT_POLL_MIN); xdt_cpu_schedinfo = (xdt_schedinfo_t *)kmem_zalloc(xdt_ncpus * sizeof (xdt_schedinfo_t), KM_SLEEP); xdt_init_trace_masks(); xdt_kstat_init(); xdt_devi = devi; ddi_report_dev(devi); return (DDI_SUCCESS); } static int xdt_detach(dev_info_t *devi, ddi_detach_cmd_t cmd) { switch (cmd) { case DDI_DETACH: break; case DDI_SUSPEND: /* * We might support proper suspend/resume in the future. So * return DDI_FAILURE for now. */ return (DDI_FAILURE); default: return (DDI_FAILURE); } if (dtrace_unregister(xdt_id) != 0) return (DDI_FAILURE); xdt_detach_trace_buffers(); kmem_free(xdt_cpu_schedinfo, xdt_ncpus * sizeof (xdt_schedinfo_t)); if (xdt_cyclic != CYCLIC_NONE) cyclic_remove(xdt_cyclic); if (xdt_kstats != NULL) kstat_delete(xdt_kstats); xdt_devi = (void *)0; ddi_remove_minor_node(devi, NULL); return (DDI_SUCCESS); } /*ARGSUSED*/ static int xdt_info(dev_info_t *devi, ddi_info_cmd_t infocmd, void *arg, void **result) { int error; switch (infocmd) { case DDI_INFO_DEVT2DEVINFO: *result = xdt_devi; error = DDI_SUCCESS; break; case DDI_INFO_DEVT2INSTANCE: *result = (void *)0; error = DDI_SUCCESS; break; default: error = DDI_FAILURE; } return (error); } static struct cb_ops xdt_cb_ops = { nulldev, /* open(9E) */ nodev, /* close(9E) */ nodev, /* strategy(9E) */ nodev, /* print(9E) */ nodev, /* dump(9E) */ nodev, /* read(9E) */ nodev, /* write(9E) */ nodev, /* ioctl(9E) */ nodev, /* devmap(9E) */ nodev, /* mmap(9E) */ nodev, /* segmap(9E) */ nochpoll, /* chpoll(9E) */ ddi_prop_op, /* prop_op(9E) */ NULL, /* streamtab(9S) */ D_MP | D_64BIT | D_NEW /* cb_flag */ }; static struct dev_ops xdt_ops = { DEVO_REV, /* devo_rev */ 0, /* devo_refcnt */ xdt_info, /* getinfo(9E) */ nulldev, /* identify(9E) */ nulldev, /* probe(9E) */ xdt_attach, /* attach(9E) */ xdt_detach, /* detach(9E) */ nulldev, /* devo_reset */ &xdt_cb_ops, /* devo_cb_ops */ NULL, /* devo_bus_ops */ NULL, /* power(9E) */ ddi_quiesce_not_needed, /* devo_quiesce */ }; static struct modldrv modldrv = { &mod_driverops, "Hypervisor event tracing", &xdt_ops }; static struct modlinkage modlinkage = { MODREV_1, &modldrv, NULL }; int _init(void) { return (mod_install(&modlinkage)); } int _fini(void) { return (mod_remove(&modlinkage)); } int _info(struct modinfo *modinfop) { return (mod_info(&modlinkage, modinfop)); }
A Prisoner of the Boxer Rebellion, 1900 The Galveston Hurricane of 1900 Farm Wife, 1900 The Death of Queen Victoria, 1901 The Assassination of President William McKinley, 1901 The Roosevelts Move Into the White House, 1901 Riding a Rural Free Delivery Route, 1903 First Flight, 1903 The Gibson Girl Early Adventures With The Automobile Immigrating to America, 1905 San Francisco Earthquake, 1906 Henry Ford Changes the World, 1908 A Walk with President Roosevelt, 1908 Children At Work, 1908-1912 On Safari, 1909 Birth of the Hollywood Cowboy, 1911 Doomed Expedition to the South Pole, 1912 Sinking of the Titanic, 1912 1st Woman to Fly the English Channel, 1912 The Massacre of the Armenians, 1915 The Bolsheviks Storm the Winter Palace, 1917 The Execution of Tsar Nicholas II, 1918 President Wilson Suffers a Stroke, 1919 Making Movies, 1920 King Tut's Tomb, 1922 Coolidge Becomes President, 1923 Adolf Hitler Attempts a Coup, 1923 Air Conditioning Goes to the Movies, 1925 Prohibition, 1927 Lindbergh Flies the Atlantic, 1927 Babe Ruth Hits His 60th Home Run, 1927 The Wall Street Crash, 1929 The Bonus Army Invades Washington, D.C., 1932 The Reichstag Fire, 1933 Shoot-out with Bonnie and Clyde, 1933 Migrant Mother, 1936 The Bombing of Guernica, 1937 The Rape of Nanking, 1937 Dining with the King and Queen of England, 1938 Images Of War 1918-1971 The Death of President Franklin Roosevelt, 1945 Thoughts Of A President, 1945 Jackie Robinson Breaks Baseball's Color Barrier, 1945 The Assassination of Gandhi, 1948 The Russians Discover a Spy Tunnel in Berlin, 1956 The Hungarian Revolution, 1956 The Assassination of President John F. Kennedy, 1963 First Voyage to the Moon, 1968 President Nixon Meets Elvis, 1970 Payoff to the Vice President, 1971 President Nixon Leaves the White House 1974 Prohibition, 1927 The US soldiers returning from the war in Europe came home to an America much different from the one they left. Two Amendments had been added to the Constitution in their absence. The 18th Amendment, ratified in 1919, introduced the era of Prohibition by outlawing the manufacture, sale or transportation of alcohol. The 19th Amendment, ratified in 1920, enfranchised half of the population by giving women the vote. It was anticipated that the combination of these two legislative acts would transform America for the better: first by eradicating the deleterious effects of "Demon Rum" and secondly by bringing the calming influence of the woman's perspective to national policy. "Belly up to the bar." Patrons get their last drink the night before Prohibition becomes law Alcohol had been a source of concern since the colonial era. The temperance movement gained strength following the Civil War with the rise of such organizations as the Anti-Saloon League and the Women's Christian Temperance Union. The saloons that dotted America's neighborhoods were seen as the source of many of the nation's social problems. Maladies such as crime, poverty, marital abuse and even low worker productivity could be purged by eliminating their source - the consumption of alcohol. The 18th Amendment was to be a "Noble Experiment" that would transform America for the better. The great hopes that inspired the experiment soon turned to dissolution. Enforcement was next to impossible. Congress allocated a paltry $5 million for this purpose. Illicit "speakeasies" thrived. The nation's borders were a sieve through which foreign booze flowed. Home-grown stills proliferated. The manufacture, distribution and sale of liquor became a growth industry for under-world gangs in America's major cities. Al Capone - the head of Chicago's most notorious mob - became a millionaire. By the end of the decade, the nation had had enough of the experiment. This exasperation combined with the realization that taxes on legal alcohol would provide much needed revenue for state and national governments led to the ratification of the 21st Amendment in 1933 that rescinded the 18th Amendment. The "Noble Experiment" was dead. "I learned that not everything in America was what it seemed to be." Count Felix von Luckner was a German naval war hero who visited the United States with his wife in 1927. He provides a visitor's impression of Prohibition: I suppose I should set forth my investigations into the subject of prohibition. Here is a new experience, at a club's celebration. Each man appears with an impressive portfolio. Each receives his glass of pure water; above the table the law reigns supreme. The brief cases rest under the chairs. Soon they are drawn out, the merry noise of popping corks is heard, and the guzzling begins. Or, I come to a banquet in a hotel dining room. On the table are the finest wines. I ask, 'how come?' Answer: 'Well, two of our members lived in the hotel for eight days and every day brought in cargoes of this costly stuff in their suitcases.' My informant was madly overjoyed at this cunning. My first experience with the ways of prohibition came while we were being entertained by friends in New York. It was bitterly cold. My wife and I rode in the rumble seat of the car, while the American and his wife, bundled in furs, sat in front. Having wrapped my companion in pillows and blankets so thoroughly that only her nose showed, I came across another cushion that seemed to hang uselessly on the side. 'Well,' I thought, 'this is a fine pillow; since everybody else is so warm and cozy, I might as well do something for my own comfort. This certainly does no one any good hanging on the wall.' Sitting on it, I gradually noticed a dampness in the neighborhood, that soon mounted to a veritable flood. The odor of fine brandy told me I had burst my host's peculiar liquor flask. A "Flapper" reveals her hidden hip flask as she proposes a toast In time, I learned that not everything in America was what it seemed to be. I discovered, for instance, that a spare tire could be filled with substances other than air, that one must not look too deeply into certain binoculars, and that the Teddy Bears that suddenly acquired tremendous popularity among the ladies very often had hollow metal stomachs. 'But,' it might be asked, 'where do all these people get the liquor?' Very simple. Prohibition has created a new, a universally respected, a well-beloved, and a very profitable occupation, that of the bootlegger who takes care of the importation of the forbidden liquor. Everyone knows this, even the powers of government. But this profession is beloved because it is essential, and it is respected because its pursuit is clothed with an element of danger and with a sporting risk. Now and then one is caught, that must happen pro forma and then he must do time or, if he is wealthy enough, get someone to do time for him. Yet it is undeniable that prohibition has in some respects been signally successful. The filthy saloons, the gin mills which formerly flourished on every corner and in which the laborer once drank off half his wages, have disappeared. Now he can instead buy his own car, and ride off for a weekend or a few days with his wife and children in the country or at the sea. But, on the other hand, a great deal of poison and methyl alcohol has taken the place of the good old pure whiskey. The number of crimes and misdemeanors that originated in drunkenness has declined. But by contrast, a large part of the population has become accustomed to disregard and to violate the law without thinking. The worst is, that precisely as a consequence of the law, the taste for alcohol has spread ever more widely among the youth. The sporting attraction of the forbidden and the dangerous leads to violations. My observations have convinced me that many fewer would drink were it not illegal.    This eyewitness account appears in Von Luckner, Count Felix, Seeteufel erobert Amerika (1928), reprinted in Handlin, Oscar, This Was America (1949); Coffey, Thomas, M., The Long Thirst: Prohibition in America 1920-1933 (1975); Sann, Paul, The Lawless Decade (1957). How To Cite This Article: "Prohibition, 1927" EyeWitness to History, (2007). Copyright © Ibis Communications, Inc.
/*************************************************************************** qgsdatasourceselectdialog.cpp - QgsDataSourceSelectDialog --------------------- begin : 1.11.2018 copyright : (C) 2018 by Alessandro Pasotti email : elpaso@itopen.it *************************************************************************** * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * ***************************************************************************/ #include "qgsdatasourceselectdialog.h" #include "ui_qgsdatasourceselectdialog.h" #include "qgis.h" #include "qgsbrowsermodel.h" #include "qgsgui.h" #include "qgsguiutils.h" #include "qgssettings.h" #include <QPushButton> #include <QMenu> QgsDataSourceSelectDialog::QgsDataSourceSelectDialog( QgsBrowserModel *browserModel, bool setFilterByLayerType, const QgsMapLayerType &layerType, QWidget *parent ) : QDialog( parent ) { if ( ! browserModel ) { mBrowserModel = qgis::make_unique<QgsBrowserModel>(); mBrowserModel->initialize(); mOwnModel = true; } else { mBrowserModel.reset( browserModel ); mOwnModel = false; } setupUi( this ); setWindowTitle( tr( "Select a Data Source" ) ); QgsGui::enableAutoGeometryRestore( this ); mBrowserProxyModel.setBrowserModel( mBrowserModel.get() ); mBrowserTreeView->setHeaderHidden( true ); if ( setFilterByLayerType ) { // This will also set the (proxy) model setLayerTypeFilter( layerType ); } else { mBrowserTreeView->setModel( &mBrowserProxyModel ); buttonBox->button( QDialogButtonBox::StandardButton::Ok )->setEnabled( false ); } mBrowserTreeView->setBrowserModel( mBrowserModel.get() ); mWidgetFilter->hide(); mLeFilter->setPlaceholderText( tr( "Type here to filter visible items…" ) ); // icons from http://www.fatcow.com/free-icons License: CC Attribution 3.0 QMenu *menu = new QMenu( this ); menu->setSeparatorsCollapsible( false ); mBtnFilterOptions->setMenu( menu ); QAction *action = new QAction( tr( "Case Sensitive" ), menu ); action->setData( "case" ); action->setCheckable( true ); action->setChecked( false ); connect( action, &QAction::toggled, this, &QgsDataSourceSelectDialog::setCaseSensitive ); menu->addAction( action ); QActionGroup *group = new QActionGroup( menu ); action = new QAction( tr( "Filter Pattern Syntax" ), group ); action->setSeparator( true ); menu->addAction( action ); action = new QAction( tr( "Normal" ), group ); action->setData( QgsBrowserProxyModel::Normal ); action->setCheckable( true ); action->setChecked( true ); menu->addAction( action ); action = new QAction( tr( "Wildcard(s)" ), group ); action->setData( QgsBrowserProxyModel::Wildcards ); action->setCheckable( true ); menu->addAction( action ); action = new QAction( tr( "Regular Expression" ), group ); action->setData( QgsBrowserProxyModel::RegularExpression ); action->setCheckable( true ); menu->addAction( action ); mBrowserTreeView->setExpandsOnDoubleClick( false ); connect( mActionRefresh, &QAction::triggered, this, [ = ] { refreshModel( QModelIndex() ); } ); connect( mBrowserTreeView, &QgsBrowserTreeView::clicked, this, &QgsDataSourceSelectDialog::onLayerSelected ); connect( mActionCollapse, &QAction::triggered, mBrowserTreeView, &QgsBrowserTreeView::collapseAll ); connect( mActionShowFilter, &QAction::triggered, this, &QgsDataSourceSelectDialog::showFilterWidget ); connect( mLeFilter, &QgsFilterLineEdit::returnPressed, this, &QgsDataSourceSelectDialog::setFilter ); connect( mLeFilter, &QgsFilterLineEdit::cleared, this, &QgsDataSourceSelectDialog::setFilter ); connect( mLeFilter, &QgsFilterLineEdit::textChanged, this, &QgsDataSourceSelectDialog::setFilter ); connect( group, &QActionGroup::triggered, this, &QgsDataSourceSelectDialog::setFilterSyntax ); mBrowserToolbar->setIconSize( QgsGuiUtils::iconSize( true ) ); if ( QgsSettings().value( QStringLiteral( "datasourceSelectFilterVisible" ), false, QgsSettings::Section::Gui ).toBool() ) { mActionShowFilter->trigger(); } } QgsDataSourceSelectDialog::~QgsDataSourceSelectDialog() { if ( ! mOwnModel ) mBrowserModel.release(); } void QgsDataSourceSelectDialog::showEvent( QShowEvent *e ) { QDialog::showEvent( e ); QString lastSelectedPath( QgsSettings().value( QStringLiteral( "datasourceSelectLastSelectedItem" ), QString(), QgsSettings::Section::Gui ).toString() ); if ( ! lastSelectedPath.isEmpty() ) { QModelIndexList items = mBrowserProxyModel.match( mBrowserProxyModel.index( 0, 0 ), QgsBrowserModel::PathRole, QVariant::fromValue( lastSelectedPath ), 1, Qt::MatchRecursive ); if ( items.count( ) > 0 ) { QModelIndex expandIndex = items.at( 0 ); if ( expandIndex.isValid() ) { mBrowserTreeView->scrollTo( expandIndex, QgsBrowserTreeView::ScrollHint::PositionAtTop ); mBrowserTreeView->expand( expandIndex ); } } } } void QgsDataSourceSelectDialog::showFilterWidget( bool visible ) { QgsSettings().setValue( QStringLiteral( "datasourceSelectFilterVisible" ), visible, QgsSettings::Section::Gui ); mWidgetFilter->setVisible( visible ); if ( ! visible ) { mLeFilter->setText( QString() ); setFilter(); } else { mLeFilter->setFocus(); } } void QgsDataSourceSelectDialog::setFilter() { QString filter = mLeFilter->text(); mBrowserProxyModel.setFilterString( filter ); } void QgsDataSourceSelectDialog::refreshModel( const QModelIndex &index ) { QgsDataItem *item = mBrowserModel->dataItem( index ); if ( item ) { QgsDebugMsg( "path = " + item->path() ); } else { QgsDebugMsg( QStringLiteral( "invalid item" ) ); } if ( item && ( item->capabilities2() & QgsDataItem::Fertile ) ) { mBrowserModel->refresh( index ); } for ( int i = 0; i < mBrowserModel->rowCount( index ); i++ ) { QModelIndex idx = mBrowserModel->index( i, 0, index ); QModelIndex proxyIdx = mBrowserProxyModel.mapFromSource( idx ); QgsDataItem *child = mBrowserModel->dataItem( idx ); // Check also expanded descendants so that the whole expanded path does not get collapsed if one item is collapsed. // Fast items (usually root items) are refreshed so that when collapsed, it is obvious they are if empty (no expand symbol). if ( mBrowserTreeView->isExpanded( proxyIdx ) || mBrowserTreeView->hasExpandedDescendant( proxyIdx ) || ( child && child->capabilities2() & QgsDataItem::Fast ) ) { refreshModel( idx ); } else { if ( child && ( child->capabilities2() & QgsDataItem::Fertile ) ) { child->depopulate(); } } } } void QgsDataSourceSelectDialog::setFilterSyntax( QAction *action ) { if ( !action ) return; mBrowserProxyModel.setFilterSyntax( static_cast< QgsBrowserProxyModel::FilterSyntax >( action->data().toInt() ) ); } void QgsDataSourceSelectDialog::setCaseSensitive( bool caseSensitive ) { mBrowserProxyModel.setFilterCaseSensitivity( caseSensitive ? Qt::CaseSensitive : Qt::CaseInsensitive ); } void QgsDataSourceSelectDialog::setLayerTypeFilter( QgsMapLayerType layerType ) { mBrowserProxyModel.setFilterByLayerType( true ); mBrowserProxyModel.setLayerType( layerType ); // reset model and button mBrowserTreeView->setModel( &mBrowserProxyModel ); buttonBox->button( QDialogButtonBox::StandardButton::Ok )->setEnabled( false ); } QgsMimeDataUtils::Uri QgsDataSourceSelectDialog::uri() const { return mUri; } void QgsDataSourceSelectDialog::onLayerSelected( const QModelIndex &index ) { bool isLayerCompatible = false; mUri = QgsMimeDataUtils::Uri(); if ( index.isValid() ) { const QgsDataItem *dataItem( mBrowserProxyModel.dataItem( index ) ); if ( dataItem ) { const QgsLayerItem *layerItem = qobject_cast<const QgsLayerItem *>( dataItem ); if ( layerItem && ( ! mBrowserProxyModel.filterByLayerType() || ( layerItem->mapLayerType() == mBrowserProxyModel.layerType() ) ) ) { isLayerCompatible = true; mUri = layerItem->mimeUri(); // Store last viewed item QgsSettings().setValue( QStringLiteral( "datasourceSelectLastSelectedItem" ), mBrowserProxyModel.data( index, QgsBrowserModel::PathRole ).toString(), QgsSettings::Section::Gui ); } } } buttonBox->button( QDialogButtonBox::StandardButton::Ok )->setEnabled( isLayerCompatible ); }
#include "ListSelect.h" void ListSelect::UpdateArrowsState() { if (_selectedIndex == 0) _leftArrow.ForceState("click"); else _leftArrow.ResetForcedState(); if (_selectedIndex + 1 >= _values.size()) _rightArrow.ForceState("click"); else _rightArrow.ResetForcedState(); } ListSelect::ListSelect(SoundsManager* sounds, TexturesManager* textures) { _soundsManager = sounds; _texturesManager = textures; _selectedIndex = 0; _values.clear(); _leftArrow.SetSoundsManager(_soundsManager); _leftArrow.SetTexturesManager(_texturesManager); _rightArrow.SetSoundsManager(_soundsManager); _rightArrow.SetTexturesManager(_texturesManager); _currSelectionLabel.SetSoundsManager(_soundsManager); _currSelectionLabel.SetTexturesManager(_texturesManager); _leftArrow.SetMouseInput(true); _rightArrow.SetMouseInput(true); _leftArrow.SetKeyboardInput(true); _rightArrow.SetKeyboardInput(true); } ListSelect::ListSelect(ListSelect& other) : UIElement(other), _leftArrow(other._leftArrow), _rightArrow(other._rightArrow), _currSelectionLabel(other._currSelectionLabel) { _selectedIndex = other._selectedIndex; _values = other._values; } void ListSelect::AddLeftArrowState(const std::string& name, const std::string& textureName, const sf::FloatRect& rect) { _leftArrow.AddState(name, _dummyText, textureName, rect); } void ListSelect::RemoveLeftArrowState(const std::string& name) { _leftArrow.RemoveState(name); } void ListSelect::SetLeftArrowSize(const sf::Vector2f& size) { _leftArrow.Init(sf::Vector2u((uint32_t)ceilf(size.x), (uint32_t)ceilf(size.y))); _leftArrow.SetBackgroundSize(size); } sf::Transformable* ListSelect::TransformLeftArrow() { _sthChanged = true; return (sf::Transformable*)&_leftArrow; } void ListSelect::AddRightArrowState(const std::string& name, const std::string& textureName, const sf::FloatRect& rect) { _rightArrow.AddState(name, _dummyText, textureName, rect); } void ListSelect::RemoveRightArrowState(const std::string& name) { _rightArrow.RemoveState(name); } void ListSelect::SetRightArrowSize(const sf::Vector2f& size) { _rightArrow.Init(sf::Vector2u((uint32_t)ceilf(size.x), (uint32_t)ceilf(size.y))); _rightArrow.SetBackgroundSize(size); } sf::Transformable* ListSelect::TransformRightArrow() { _sthChanged = true; return (sf::Transformable*)&_rightArrow; } void ListSelect::SetTextSize(const sf::Vector2f& size) { _currSelectionLabel.Init(sf::Vector2u((uint32_t)ceilf(size.x), (uint32_t)ceilf(size.y))); } void ListSelect::SetFont(const sf::Font& font) { _currSelectionLabel.SetFont(font); } void ListSelect::SetCharacterSize(uint32_t size) { _currSelectionLabel.SetCharacterSize(size); } void ListSelect::SetLetterSpacing(float spacing) { _currSelectionLabel.SetLetterSpacing(spacing); } void ListSelect::SetStyle(uint32_t style) { _currSelectionLabel.SetStyle(style); } void ListSelect::SetFillColor(const sf::Color& color) { _currSelectionLabel.SetFillColor(color); } void ListSelect::SetOutlineColor(const sf::Color& color) { _currSelectionLabel.SetOutlineColor(color); } void ListSelect::SetOutlineThickness(float thickness) { _currSelectionLabel.SetOutlineThickness(thickness); } void ListSelect::SetVerticalAlignment(UIElement::Align align) { _currSelectionLabel.SetVerticalAlignment(align); } void ListSelect::SetHorizontalAlignment(UIElement::Align align) { _currSelectionLabel.SetHorizontalAlignment(align); } sf::Transformable* ListSelect::TransformText() { return &_currSelectionLabel; } void ListSelect::AddValue(const std::string& value) { _values.push_back(value); if (_values.size() == 1) SetCurrentIndex(0); UpdateArrowsState(); _sthChanged = true; } void ListSelect::RemoveValue(size_t index) { if (_selectedIndex >= index) { if(_selectedIndex == index) _sthChanged = true; if (_selectedIndex > 0) _selectedIndex--; } if (index < _values.size()) _values.erase(_values.begin() + index); UpdateArrowsState(); } void ListSelect::ClearValues() { _selectedIndex = 0; _values.clear(); UpdateArrowsState(); _sthChanged = true; } void ListSelect::SetCurrentIndex(size_t index) { if (index < _values.size()) { if (_selectedIndex != index) { _selectedIndex = index; UpdateArrowsState(); _sthChanged = true; } } } void ListSelect::NextSelection() { if (_selectedIndex < _values.size() - 1) { _selectedIndex++; UpdateArrowsState(); _sthChanged = true; } } void ListSelect::PreviousSelection() { if (_selectedIndex > 0) { _selectedIndex--; UpdateArrowsState(); _sthChanged = true; } } const sf::Font* ListSelect::GetFont() const { return _currSelectionLabel.GetFont(); } uint32_t ListSelect::GetCharacterSize() const { return _currSelectionLabel.GetCharacterSize(); } float ListSelect::GetLetterSpacing() const { return _currSelectionLabel.GetLetterSpacing(); } uint32_t ListSelect::GetStyle() const { return _currSelectionLabel.GetStyle(); } const sf::Color& ListSelect::GetFillColor() const { return _currSelectionLabel.GetFillColor(); } const sf::Color& ListSelect::GetOutlineColor() const { return _currSelectionLabel.GetOutlineColor(); } float ListSelect::GetOutlineThickness() const { return _currSelectionLabel.GetOutlineThickness(); } UIElement::Align ListSelect::GetVerticalAlignment() const { return _currSelectionLabel.GetVerticalAlignment(); } UIElement::Align ListSelect::GetHorizontalAlignment() const { return _currSelectionLabel.GetHorizontalAlignment(); } std::string ListSelect::GetCurrentValue() const { if (_values.size() == 0 || _selectedIndex >= _values.size()) return std::string(); return _values[_selectedIndex]; } size_t ListSelect::GetCurrentIndex() const { return _selectedIndex; } size_t ListSelect::GetValuesSize() const { return _values.size(); } const std::vector<std::string>& ListSelect::GetValues() const { return _values; } UIElement* ListSelect::clone() { return new ListSelect(*this); } void ListSelect::Update(bool tick, float delta) { if (_values.size() == 0 || _selectedIndex >= _values.size()) _currSelectionLabel.SetText(""); else _currSelectionLabel.SetText(_values[_selectedIndex]); _leftArrow.Update(tick, delta); _rightArrow.Update(tick, delta); _currSelectionLabel.Update(tick, delta); Redraw(); } void ListSelect::ForceRedraw() { _leftArrow.ForceRedraw(); _rightArrow.ForceRedraw(); _currSelectionLabel.ForceRedraw(); Redraw(); } bool ListSelect::Redraw() { if (_leftArrow.RedrawHappened() || _rightArrow.RedrawHappened() || _currSelectionLabel.RedrawHappened()) _sthChanged = true; if (_sthChanged == true) { _render.clear(sf::Color::Transparent); sf::VertexArray element(sf::PrimitiveType::Quads, 4); sf::RenderStates rs; for (unsigned short i = 0; i < 3; i++) { const sf::RenderTexture* tex = nullptr; sf::Vector2f pos = sf::Vector2f(0.f, 0.f); if (i == 0) { tex = _leftArrow.GetTexture(); pos = _leftArrow.getPosition(); } else if (i == 1) { tex = _rightArrow.GetTexture(); pos = _rightArrow.getPosition(); } else { tex = _currSelectionLabel.GetTexture(); pos = _currSelectionLabel.getPosition(); } auto sizeU = tex->getSize(); auto size = sf::Vector2f(float(sizeU.x), float(sizeU.y)); rs.texture = &tex->getTexture(); element[0].position = sf::Vector2f(pos.x, pos.y); element[1].position = sf::Vector2f(pos.x + size.x, pos.y); element[2].position = sf::Vector2f(pos.x + size.x, pos.y + size.y); element[3].position = sf::Vector2f(pos.x, pos.y + size.y); element[0].texCoords = sf::Vector2f(0.f, 0.f); element[1].texCoords = sf::Vector2f(size.x, 0.f); element[2].texCoords = sf::Vector2f(size.x, size.y); element[3].texCoords = sf::Vector2f(0.f, size.y); _render.draw(element, rs); } _render.display(); _sthChanged = false; _redrawHappened = true; return true; } return false; } void ListSelect::ProcessEvent(sf::Event* ev, const sf::Vector2f& mousePos) { auto relMouse = getTransform().getInverse().transformPoint(mousePos); _leftArrow.ProcessEvent(ev, relMouse); _rightArrow.ProcessEvent(ev, relMouse); _currSelectionLabel.ProcessEvent(ev, relMouse); if (_mouseInput) { if (ev->type == sf::Event::MouseButtonPressed && _leftArrow.GetGlobalBounds().contains(relMouse) == false) _leftArrow.SetInFocus(false); if (ev->type == sf::Event::MouseButtonPressed && _rightArrow.GetGlobalBounds().contains(relMouse) == false)_rightArrow.SetInFocus(false); } if (_keyboardInput) { if (_inFocus) { if (ev->type == sf::Event::KeyPressed && ev->key.code == sf::Keyboard::Left) { sf::Event e; e.type = sf::Event::KeyPressed; e.key.code = sf::Keyboard::Enter; _leftArrow.SetInFocus(true); _leftArrow.ProcessEvent(&e, sf::Vector2f(0.f, 0.f)); } else if (ev->type == sf::Event::KeyPressed && ev->key.code == sf::Keyboard::Right) { sf::Event e; e.type = sf::Event::KeyPressed; e.key.code = sf::Keyboard::Enter; _rightArrow.SetInFocus(true); _rightArrow.ProcessEvent(&e, sf::Vector2f(0.f, 0.f)); } if (ev->type == sf::Event::KeyReleased && (ev->key.code == sf::Keyboard::Left || ev->key.code == sf::Keyboard::Right)) { sf::Event e; e.type = sf::Event::KeyReleased; e.key.code = sf::Keyboard::Enter; _leftArrow.ProcessEvent(&e, sf::Vector2f(0.f, 0.f)); _rightArrow.ProcessEvent(&e, sf::Vector2f(0.f, 0.f)); _leftArrow.SetInFocus(false); _rightArrow.SetInFocus(false); } } } if (_leftArrow.Clicked()) PreviousSelection(); if (_rightArrow.Clicked()) NextSelection(); } std::vector<sf::Vector2f> ListSelect::GetAllBoundsPoints() const { std::vector<sf::Vector2f> output = UIElement::GetAllBoundsPoints(); auto la = _leftArrow.GetAllBoundsPoints(); auto ra = _rightArrow.GetAllBoundsPoints(); auto lab = _currSelectionLabel.GetAllBoundsPoints(); output.insert(output.end(), std::make_move_iterator(la.begin()), std::make_move_iterator(la.end())); output.insert(output.end(), std::make_move_iterator(ra.begin()), std::make_move_iterator(ra.end())); output.insert(output.end(), std::make_move_iterator(lab.begin()), std::make_move_iterator(lab.end())); for (size_t i = 4; i < output.size(); i++) output[i] = getTransform().transformPoint(output[i]); return output; } std::vector<sf::Vector2f> ListSelect::GetDeepestInFocusBoundsPoints() const { std::vector<sf::Vector2f> output; if (_leftArrow.GetInFocus() == true) output = _leftArrow.GetAllBoundsPoints(); else if (_rightArrow.GetInFocus() == true) output = _rightArrow.GetAllBoundsPoints(); if (output.size() == 0) output = UIElement::GetAllBoundsPoints(); else for (auto& p : output) p = getTransform().transformPoint(p); return output; }
#pragma once #ifndef DIRECTORYREADER_H #define DIRECTORYREADER_H #include <vector> using std::vector; /* Utility class to parse Directories. */ class DirectoryReader { public: /* Allows you to get a vector of strings for files in a directory USAGE: getFilesInDirectory("./path/*.obj"); RETURNS: all objs in directory path. */ static vector<std::string> getFilesInDirectory(const char* path); /* Returns the current working directory as a full path. See asset manager for relative path. */ static std::string getCurrentDirectory(); /* Uses getCurrentDirectory and prints it. */ static void printCurrentDirectory(); /* Prints items in a directory. USAGE: printDirectory("./path/*.obj"); PRINTS: all objs in directory path. */ static void printDirectory(const char* path); }; #endif // !DIRECTORYREADER_H
// Copyright 1998-2017 Epic Games, Inc. All Rights Reserved. #pragma once #include "Object.h" DEPRECATED(4.14, "Including UObject.h has been deprecated. Please include Object.h instead.") inline void UObjectHeaderDeprecatedWarning() { } inline void TriggerUObjectHeaderDeprecatedWarning() { UObjectHeaderDeprecatedWarning(); }
Federal and state laws emphasize the importance of parents/guardians as key decision makers in the educational process. Child Study Team personnel share many common skills such as child advocacy, understanding of school functioning, knowledge and implementation of special education law, case management, transition planning, inservice training, research, and community collaboration. However, each discipline approaches the intervention and eligibility process from a different perspective based on the training and skills of each profession. School Psychologists are specialists with training and expertise in psychology as it is applied to education. They use their training and skills to collaborate with parents/guardians, educators, and other professionals to ensure that every child learns in a safe and supportive environment. School Psychologists use their understanding of school organization and effective learning to help students realize their academic and social potentials. They tailor their services to the particular needs of each child and each situation. School Psychologists are trained to assess and counsel students with behavioral, emotional, and educational concerns through consultation, prevention, intervention, crisis management, evaluation, and program development. A psychological assessment shall be the responsibility of a School Psychologist employed by the district Board of Education. The psychological assessment should include standardized and functional appraisals of a student’s current cognitive, intellectual, adaptive, social, emotional and behavioral status in the context of his/her environments. The assessment should include consultation with parents, educators, and relevant professionals; a student interview; and observation of the student in other than a testing situation. School Social Workers provide unique services to students and their families, helping the students attain maximum benefits from their educational programs. The School Social Worker's knowledge of social, emotional, cultural and economic differences among children and families enable them to be the link between school, family and community. As a member of the educational team, School Social Workers promote and support students' academic and social/emotional well-being. Through sound school social work practice, the School Social Worker is able to enhance the full educational and individual potential of all students and eliminate barriers to learning by being pro-active within the academic community and providing early intervention, prevention, consultation, counseling, crisis management, and support services. A social assessment shall be the responsibility of a school social worker employed by the district board of education. The social assessment shall include observation of the student and communication with the student's parent(s)/guardian(s). It shall also include an evaluation of the student's adaptive social functioning and emotional development and of the family, social, and cultural factors which influence the student's learning and behavior in the educational setting.
#include "iris/gen/AttributeGenerator.hpp" #include <cmath> #include <random> #include <sstream> #include "iris/Utils.hpp" namespace iris { namespace gen { types::uint32 convertListToInteger(const Uint32List& list) { using namespace iris::types; uint32 result = 0; uint32 scaleFactor = list.size() - 1; for(Uint32List::size_type i = 0; i < list.size(); i++) { const auto exponent = scaleFactor - i; result += list[i] * (uint32)std::pow(10, exponent); } return result; } std::string convertListToString(const Uint32List& list) { using namespace iris; std::ostringstream stream; for(Uint32List::size_type i = 0; i < list.size(); i++) { stream << list[i]; } return stream.str(); } Uint32List createAttributeList(PopDispensers& dispensers, types::mersenne_twister& random) { Uint32List result(dispensers.size()); for(Uint32List::size_type i = 0; i < dispensers.size(); i++) { const auto indice = dispensers[i].nextGroup(random); result[i] = indice; } return result; } PopDispensers createPopulationDispensers(Uint32List vars, AgentID totalAgents) { typedef std::vector<types::fnumeric> Factors; PopDispensers result; // So, each value in the list represents the number of factors. We // use equal probability for all factors, so the probability of each // is 1/f per indice. for(Uint32List::size_type i = 0; i < vars.size(); i++) { const auto currentFactor = vars[i]; const types::fnumeric prob = ((types::fnumeric)1) / currentFactor; PopulationDispenser disp; // The factored probabilities. Factors factors(currentFactor); // Fill up the factor probability. std::fill(factors.begin(), factors.end(), prob); // Set it up. disp.initialize(factors, totalAgents, true); // Done. result.push_back(disp); } return result; } Uint32List createSubAttributeList(const Uint32List& base, const Uint32List& target) { if(base.size() < target.size()) { // This should be caught by the IO parser. throw std::runtime_error("Base size is smaller than target!"); } return {base.begin(), base.begin() + target.size()}; } void generateAttributes(Agent* const agents, AgentID totalAgents, ValueList values, BehaviorList behaviors, types::mersenne_twister& random) { // Use two population vectors, one for the values and one for the // behaviors. PopDispensers valueDisp = createPopulationDispensers(values, totalAgents); // For each agent, create a new and unique set of values and // behaviors. for(AgentID i = 0; i < totalAgents; i++) { ValueList vList = createAttributeList(valueDisp, random); BehaviorList bList = createSubAttributeList(vList, behaviors); agents[i].setInitialBehavior(bList); agents[i].setInitialValues(vList); } } void generatePowerfulAgents(Agent* const agents, AgentID totalAgents, types::fnumeric powerPercent, bool requireAtLeastOne, types::mersenne_twister& random) { using namespace iris::types; using namespace iris::util; typedef Agent::Network Network; typedef std::uniform_int_distribution<AgentID> UintDist; if(powerPercent == 0.0) { return; } // Compute the number of powerful agents to create. auto numPowerful = (AgentID)std::floor(totalAgents * powerPercent); // If the percentage is so low that it evaluates to zero, then see // what the caller wishes to do. if(numPowerful == 0 && requireAtLeastOne) { numPowerful = 1; } // Random selector. UintDist chooser(0, totalAgents - 1); // The already selected agents. Network selected; for(AgentID i = 0; i < numPowerful; i++) { const auto chosen = ensureRandom<AgentID>(chooser(random), selected, (AgentID)0, totalAgents); agents[chosen].setPowerful(true); util::sortedInsert(selected, chosen); } } PermuteList permuteList(const Uint32List& vars) { auto mutableList = Uint32List(vars.size()); auto permutes = PermuteList(); permuteList(vars, permutes, mutableList, 0); return permutes; } void permuteList(const Uint32List& vars, PermuteList& permutes, Uint32List& mutableList, types::uint32 index) { for(types::uint32 i = 0; i < vars[index]; i++) { mutableList[index] = i; if(index >= (vars.size() - 1)) { const auto value = convertListToString(mutableList); permutes.push_back(value); } else { permuteList(vars, permutes, mutableList, index + 1); } } } } }
Different Flower Bulbs Grown in a wide variety of colors, sizes and bloom shapes, flower bulbs provide a long-lasting display and once planted, spring up year after year to provide a constant source of color and texture to the garden. Many flower bulbs emerge in spring while others pop up in summer and fall to keep the garden in bloom throughout the year. Some flower petals on flower bulbs are fringed or ruffled to provide unusual textures to the landscape. Peruvian Daffodil Peruvian daffodil (Hymenocallis narcissiflora) is an early summer-blooming flower bulb. They grow 1 to 3 feet tall and have a spread of 6 to 12 inches. The fragrant, curved petals are white and yellow and flank the daffodil-like cup. The leafless stems on the Peruvian daffodil reach a maximum height of 24 inches tall and the dark green basal leaves are long, arching and strap-shaped. Peruvian daffodils can be grown within the ground or tucked into a container. Peruvian daffodils grow best in part sun to shade and well-drained, moist soil. Plant in USDA zones 9 to 11. Tulip (Tulipa) is a spring-blooming bulb that reaches a maximum height of 2 feet and a spread of 3/4 inch. Each tulip has six petal-like tepals that are often smooth but can be fringed or ruffled. The shape of tulip flowerheads is often cup-shaped with a teardrop form but also grow in bowl, star and goblet shapes. Some tulip flowers are single while others are double to create a layered display. Tulips grow in every color of the rainbow except true blue, making for a versatile flower bulb variety. The basal leaves on tulips are green to gray to blue and range from oval- to strap-shaped. They grow best in full sun and well-drained soil that is fertile. Plant tulips in USDA zones 3 to 8. Siberian Iris Siberian iris (Iris sibirica) is a late spring-blooming flower bulb that grows in upright clumps that reach heights between 1 and 3 feet tall. The flowerheads that sit atop the grasslike, 18-inch-long stems grow in a wide range of colors including rich purples, bright pinks and deep blues. Siberian iris flowers begin blooming in May and last into June. Often found growing along ponds and streams, they require medium to wet soil moisture and when planted in a flowerbed, require extra attention to ensure they are kept moist. Siberian iris grows best in full sun to part shade and heavy, acidic and clay soils. By lifting the clumps out of the bed in early fall, they can grow in other areas of the garden. Plant Siberian iris in USDA zones 3 to 9. Keywords: different flower bulbs, Peruvian daffodil, tulip bulb, Siberian iris About this Author
/* Copyright (c) 2017 Christopher A. Taylor. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted 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 Leopard-RS nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. 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. */ #include "LeopardFF8.h" #ifdef LEO_HAS_FF8 #include <string.h> #ifdef _MSC_VER #pragma warning(disable: 4752) // found Intel(R) Advanced Vector Extensions; consider using /arch:AVX #endif namespace leopard { namespace ff8 { //------------------------------------------------------------------------------ // Datatypes and Constants // Basis used for generating logarithm tables static const ffe_t kCantorBasis[kBits] = { 1, 214, 152, 146, 86, 200, 88, 230 }; // Using the Cantor basis {2} here enables us to avoid a lot of extra calculations // when applying the formal derivative in decoding. //------------------------------------------------------------------------------ // Field Operations // z = x + y (mod kModulus) static inline ffe_t AddMod(const ffe_t a, const ffe_t b) { const unsigned sum = static_cast<unsigned>(a) + b; // Partial reduction step, allowing for kModulus to be returned return static_cast<ffe_t>(sum + (sum >> kBits)); } // z = x - y (mod kModulus) static inline ffe_t SubMod(const ffe_t a, const ffe_t b) { const unsigned dif = static_cast<unsigned>(a) - b; // Partial reduction step, allowing for kModulus to be returned return static_cast<ffe_t>(dif + (dif >> kBits)); } //------------------------------------------------------------------------------ // Fast Walsh-Hadamard Transform (FWHT) (mod kModulus) // {a, b} = {a + b, a - b} (Mod Q) static LEO_FORCE_INLINE void FWHT_2(ffe_t& LEO_RESTRICT a, ffe_t& LEO_RESTRICT b) { const ffe_t sum = AddMod(a, b); const ffe_t dif = SubMod(a, b); a = sum; b = dif; } #if defined(LEO_FWHT_OPT) static LEO_FORCE_INLINE void FWHT_4(ffe_t* data) { ffe_t t0 = data[0]; ffe_t t1 = data[1]; ffe_t t2 = data[2]; ffe_t t3 = data[3]; FWHT_2(t0, t1); FWHT_2(t2, t3); FWHT_2(t0, t2); FWHT_2(t1, t3); data[0] = t0; data[1] = t1; data[2] = t2; data[3] = t3; } static LEO_FORCE_INLINE void FWHT_4(ffe_t* data, unsigned s) { unsigned x = 0; ffe_t t0 = data[x]; x += s; ffe_t t1 = data[x]; x += s; ffe_t t2 = data[x]; x += s; ffe_t t3 = data[x]; FWHT_2(t0, t1); FWHT_2(t2, t3); FWHT_2(t0, t2); FWHT_2(t1, t3); unsigned y = 0; data[y] = t0; y += s; data[y] = t1; y += s; data[y] = t2; y += s; data[y] = t3; } // Decimation in time (DIT) version static void FWHT(ffe_t* data, const unsigned bits) { const unsigned n = (1UL << bits); if (n <= 2) { if (n == 2) FWHT_2(data[0], data[1]); return; } for (unsigned i = bits; i > 3; i -= 2) { unsigned m = (1UL << i); unsigned m4 = (m >> 2); for (unsigned r = 0; r < n; r += m) for (unsigned j = 0; j < m4; j++) FWHT_4(data + j + r, m4); } for (unsigned i0 = 0; i0 < n; i0 += 4) FWHT_4(data + i0); } #else // LEO_FWHT_OPT // Reference implementation void FWHT(ffe_t* data, const unsigned bits) { const unsigned size = (unsigned)(1UL << bits); for (unsigned width = 1; width < size; width <<= 1) for (unsigned i = 0; i < size; i += (width << 1)) for (unsigned j = i; j < (width + i); ++j) FWHT_2(data[j], data[j + width]); } #endif // LEO_FWHT_OPT // Transform specialized for the finite field order void FWHT(ffe_t data[kOrder]) { FWHT(data, kBits); } //------------------------------------------------------------------------------ // Logarithm Tables static ffe_t LogLUT[kOrder]; static ffe_t ExpLUT[kOrder]; // Returns a * Log(b) static ffe_t MultiplyLog(ffe_t a, ffe_t log_b) { /* Note that this operation is not a normal multiplication in a finite field because the right operand is already a logarithm. This is done because it moves K table lookups from the Decode() method into the initialization step that is less performance critical. The LogWalsh[] table below contains precalculated logarithms so it is easier to do all the other multiplies in that form as well. */ if (a == 0) return 0; return ExpLUT[AddMod(LogLUT[a], log_b)]; } // Initialize LogLUT[], ExpLUT[] static void InitializeLogarithmTables() { // LFSR table generation: unsigned state = 1; for (unsigned i = 0; i < kModulus; ++i) { ExpLUT[state] = static_cast<ffe_t>(i); state <<= 1; if (state >= kOrder) state ^= kPolynomial; } ExpLUT[0] = kModulus; // Conversion to Cantor basis {2}: LogLUT[0] = 0; for (unsigned i = 0; i < kBits; ++i) { const ffe_t basis = kCantorBasis[i]; const unsigned width = static_cast<unsigned>(1UL << i); for (unsigned j = 0; j < width; ++j) LogLUT[j + width] = LogLUT[j] ^ basis; } for (unsigned i = 0; i < kOrder; ++i) LogLUT[i] = ExpLUT[LogLUT[i]]; // Generate Exp table from Log table: for (unsigned i = 0; i < kOrder; ++i) ExpLUT[LogLUT[i]] = i; // Note: Handles modulus wrap around with LUT ExpLUT[kModulus] = ExpLUT[0]; } //------------------------------------------------------------------------------ // Multiplies /* The multiplication algorithm used follows the approach outlined in {4}. Specifically section 6 outlines the algorithm used here for 8-bit fields. */ struct { LEO_ALIGNED LEO_M128 Value[2]; } static Multiply128LUT[kOrder]; #if defined(LEO_TRY_AVX2) struct { LEO_ALIGNED LEO_M256 Value[2]; } static Multiply256LUT[kOrder]; #endif // LEO_TRY_AVX2 void InitializeMultiplyTables() { // For each value we could multiply by: for (unsigned log_m = 0; log_m < kOrder; ++log_m) { // For each 4 bits of the finite field width in bits: for (unsigned i = 0, shift = 0; i < 2; ++i, shift += 4) { // Construct 16 entry LUT for PSHUFB uint8_t lut[16]; for (ffe_t x = 0; x < 16; ++x) lut[x] = MultiplyLog(x << shift, static_cast<ffe_t>(log_m)); // Store in 128-bit wide table const LEO_M128 *v_ptr = reinterpret_cast<const LEO_M128 *>(&lut[0]); const LEO_M128 value = _mm_loadu_si128(v_ptr); _mm_storeu_si128(&Multiply128LUT[log_m].Value[i], value); // Store in 256-bit wide table #if defined(LEO_TRY_AVX2) if (CpuHasAVX2) { _mm256_storeu_si256(&Multiply256LUT[log_m].Value[i], _mm256_broadcastsi128_si256(value)); } #endif // LEO_TRY_AVX2 } } } void mul_mem( void * LEO_RESTRICT x, const void * LEO_RESTRICT y, ffe_t log_m, uint64_t bytes) { #if defined(LEO_TRY_AVX2) if (CpuHasAVX2) { const LEO_M256 table_lo_y = _mm256_loadu_si256(&Multiply256LUT[log_m].Value[0]); const LEO_M256 table_hi_y = _mm256_loadu_si256(&Multiply256LUT[log_m].Value[1]); const LEO_M256 clr_mask = _mm256_set1_epi8(0x0f); LEO_M256 * LEO_RESTRICT x32 = reinterpret_cast<LEO_M256 *>(x); const LEO_M256 * LEO_RESTRICT y32 = reinterpret_cast<const LEO_M256 *>(y); do { #define LEO_MUL_256(x_ptr, y_ptr) { \ LEO_M256 data = _mm256_loadu_si256(y_ptr); \ LEO_M256 lo = _mm256_and_si256(data, clr_mask); \ lo = _mm256_shuffle_epi8(table_lo_y, lo); \ LEO_M256 hi = _mm256_srli_epi64(data, 4); \ hi = _mm256_and_si256(hi, clr_mask); \ hi = _mm256_shuffle_epi8(table_hi_y, hi); \ _mm256_storeu_si256(x_ptr, _mm256_xor_si256(lo, hi)); } LEO_MUL_256(x32 + 1, y32 + 1); LEO_MUL_256(x32, y32); y32 += 2, x32 += 2; bytes -= 64; } while (bytes > 0); return; } #endif // LEO_TRY_AVX2 const LEO_M128 table_lo_y = _mm_loadu_si128(&Multiply128LUT[log_m].Value[0]); const LEO_M128 table_hi_y = _mm_loadu_si128(&Multiply128LUT[log_m].Value[1]); const LEO_M128 clr_mask = _mm_set1_epi8(0x0f); LEO_M128 * LEO_RESTRICT x16 = reinterpret_cast<LEO_M128 *>(x); const LEO_M128 * LEO_RESTRICT y16 = reinterpret_cast<const LEO_M128 *>(y); do { #define LEO_MUL_128(x_ptr, y_ptr) { \ LEO_M128 data = _mm_loadu_si128(y_ptr); \ LEO_M128 lo = _mm_and_si128(data, clr_mask); \ lo = _mm_shuffle_epi8(table_lo_y, lo); \ LEO_M128 hi = _mm_srli_epi64(data, 4); \ hi = _mm_and_si128(hi, clr_mask); \ hi = _mm_shuffle_epi8(table_hi_y, hi); \ _mm_storeu_si128(x_ptr, _mm_xor_si128(lo, hi)); } LEO_MUL_128(x16 + 3, y16 + 3); LEO_MUL_128(x16 + 2, y16 + 2); LEO_MUL_128(x16 + 1, y16 + 1); LEO_MUL_128(x16, y16); x16 += 4, y16 += 4; bytes -= 64; } while (bytes > 0); } //------------------------------------------------------------------------------ // FFT Operations void fft_butterfly( void * LEO_RESTRICT x, void * LEO_RESTRICT y, ffe_t log_m, uint64_t bytes) { #if defined(LEO_TRY_AVX2) if (CpuHasAVX2) { const LEO_M256 table_lo_y = _mm256_loadu_si256(&Multiply256LUT[log_m].Value[0]); const LEO_M256 table_hi_y = _mm256_loadu_si256(&Multiply256LUT[log_m].Value[1]); const LEO_M256 clr_mask = _mm256_set1_epi8(0x0f); LEO_M256 * LEO_RESTRICT x32 = reinterpret_cast<LEO_M256 *>(x); LEO_M256 * LEO_RESTRICT y32 = reinterpret_cast<LEO_M256 *>(y); do { #define LEO_FFTB_256(x_ptr, y_ptr) { \ LEO_M256 y_data = _mm256_loadu_si256(y_ptr); \ LEO_M256 lo = _mm256_and_si256(y_data, clr_mask); \ lo = _mm256_shuffle_epi8(table_lo_y, lo); \ LEO_M256 hi = _mm256_srli_epi64(y_data, 4); \ hi = _mm256_and_si256(hi, clr_mask); \ hi = _mm256_shuffle_epi8(table_hi_y, hi); \ LEO_M256 x_data = _mm256_loadu_si256(x_ptr); \ x_data = _mm256_xor_si256(x_data, _mm256_xor_si256(lo, hi)); \ y_data = _mm256_xor_si256(y_data, x_data); \ _mm256_storeu_si256(x_ptr, x_data); \ _mm256_storeu_si256(y_ptr, y_data); } LEO_FFTB_256(x32 + 1, y32 + 1); LEO_FFTB_256(x32, y32); y32 += 2, x32 += 2; bytes -= 64; } while (bytes > 0); return; } #endif // LEO_TRY_AVX2 const LEO_M128 table_lo_y = _mm_loadu_si128(&Multiply128LUT[log_m].Value[0]); const LEO_M128 table_hi_y = _mm_loadu_si128(&Multiply128LUT[log_m].Value[1]); const LEO_M128 clr_mask = _mm_set1_epi8(0x0f); LEO_M128 * LEO_RESTRICT x16 = reinterpret_cast<LEO_M128 *>(x); LEO_M128 * LEO_RESTRICT y16 = reinterpret_cast<LEO_M128 *>(y); do { #define LEO_FFTB_128(x_ptr, y_ptr) { \ LEO_M128 y_data = _mm_loadu_si128(y_ptr); \ LEO_M128 lo = _mm_and_si128(y_data, clr_mask); \ lo = _mm_shuffle_epi8(table_lo_y, lo); \ LEO_M128 hi = _mm_srli_epi64(y_data, 4); \ hi = _mm_and_si128(hi, clr_mask); \ hi = _mm_shuffle_epi8(table_hi_y, hi); \ LEO_M128 x_data = _mm_loadu_si128(x_ptr); \ x_data = _mm_xor_si128(x_data, _mm_xor_si128(lo, hi)); \ y_data = _mm_xor_si128(y_data, x_data); \ _mm_storeu_si128(x_ptr, x_data); \ _mm_storeu_si128(y_ptr, y_data); } LEO_FFTB_128(x16 + 3, y16 + 3); LEO_FFTB_128(x16 + 2, y16 + 2); LEO_FFTB_128(x16 + 1, y16 + 1); LEO_FFTB_128(x16, y16); x16 += 4, y16 += 4; bytes -= 64; } while (bytes > 0); } #ifdef LEO_USE_VECTOR4_OPT void fft_butterfly4( void * LEO_RESTRICT x_0, void * LEO_RESTRICT y_0, void * LEO_RESTRICT x_1, void * LEO_RESTRICT y_1, void * LEO_RESTRICT x_2, void * LEO_RESTRICT y_2, void * LEO_RESTRICT x_3, void * LEO_RESTRICT y_3, ffe_t log_m, uint64_t bytes) { #if defined(LEO_TRY_AVX2) if (CpuHasAVX2) { const LEO_M256 table_lo_y = _mm256_loadu_si256(&Multiply256LUT[log_m].Value[0]); const LEO_M256 table_hi_y = _mm256_loadu_si256(&Multiply256LUT[log_m].Value[1]); const LEO_M256 clr_mask = _mm256_set1_epi8(0x0f); LEO_M256 * LEO_RESTRICT x32_0 = reinterpret_cast<LEO_M256 *>(x_0); LEO_M256 * LEO_RESTRICT y32_0 = reinterpret_cast<LEO_M256 *>(y_0); LEO_M256 * LEO_RESTRICT x32_1 = reinterpret_cast<LEO_M256 *>(x_1); LEO_M256 * LEO_RESTRICT y32_1 = reinterpret_cast<LEO_M256 *>(y_1); LEO_M256 * LEO_RESTRICT x32_2 = reinterpret_cast<LEO_M256 *>(x_2); LEO_M256 * LEO_RESTRICT y32_2 = reinterpret_cast<LEO_M256 *>(y_2); LEO_M256 * LEO_RESTRICT x32_3 = reinterpret_cast<LEO_M256 *>(x_3); LEO_M256 * LEO_RESTRICT y32_3 = reinterpret_cast<LEO_M256 *>(y_3); do { LEO_FFTB_256(x32_0 + 1, y32_0 + 1); LEO_FFTB_256(x32_0, y32_0); y32_0 += 2, x32_0 += 2; LEO_FFTB_256(x32_1 + 1, y32_1 + 1); LEO_FFTB_256(x32_1, y32_1); y32_1 += 2, x32_1 += 2; LEO_FFTB_256(x32_2 + 1, y32_2 + 1); LEO_FFTB_256(x32_2, y32_2); y32_2 += 2, x32_2 += 2; LEO_FFTB_256(x32_3 + 1, y32_3 + 1); LEO_FFTB_256(x32_3, y32_3); y32_3 += 2, x32_3 += 2; bytes -= 64; } while (bytes > 0); return; } #endif // LEO_TRY_AVX2 const LEO_M128 table_lo_y = _mm_loadu_si128(&Multiply128LUT[log_m].Value[0]); const LEO_M128 table_hi_y = _mm_loadu_si128(&Multiply128LUT[log_m].Value[1]); const LEO_M128 clr_mask = _mm_set1_epi8(0x0f); LEO_M128 * LEO_RESTRICT x16_0 = reinterpret_cast<LEO_M128 *>(x_0); LEO_M128 * LEO_RESTRICT y16_0 = reinterpret_cast<LEO_M128 *>(y_0); LEO_M128 * LEO_RESTRICT x16_1 = reinterpret_cast<LEO_M128 *>(x_1); LEO_M128 * LEO_RESTRICT y16_1 = reinterpret_cast<LEO_M128 *>(y_1); LEO_M128 * LEO_RESTRICT x16_2 = reinterpret_cast<LEO_M128 *>(x_2); LEO_M128 * LEO_RESTRICT y16_2 = reinterpret_cast<LEO_M128 *>(y_2); LEO_M128 * LEO_RESTRICT x16_3 = reinterpret_cast<LEO_M128 *>(x_3); LEO_M128 * LEO_RESTRICT y16_3 = reinterpret_cast<LEO_M128 *>(y_3); do { LEO_FFTB_128(x16_0 + 3, y16_0 + 3); LEO_FFTB_128(x16_0 + 2, y16_0 + 2); LEO_FFTB_128(x16_0 + 1, y16_0 + 1); LEO_FFTB_128(x16_0, y16_0); x16_0 += 4, y16_0 += 4; LEO_FFTB_128(x16_1 + 3, y16_1 + 3); LEO_FFTB_128(x16_1 + 2, y16_1 + 2); LEO_FFTB_128(x16_1 + 1, y16_1 + 1); LEO_FFTB_128(x16_1, y16_1); x16_1 += 4, y16_1 += 4; LEO_FFTB_128(x16_2 + 3, y16_2 + 3); LEO_FFTB_128(x16_2 + 2, y16_2 + 2); LEO_FFTB_128(x16_2 + 1, y16_2 + 1); LEO_FFTB_128(x16_2, y16_2); x16_2 += 4, y16_2 += 4; LEO_FFTB_128(x16_3 + 3, y16_3 + 3); LEO_FFTB_128(x16_3 + 2, y16_3 + 2); LEO_FFTB_128(x16_3 + 1, y16_3 + 1); LEO_FFTB_128(x16_3, y16_3); x16_3 += 4, y16_3 += 4; bytes -= 64; } while (bytes > 0); } #endif // LEO_USE_VECTOR4_OPT //------------------------------------------------------------------------------ // IFFT Operations void ifft_butterfly( void * LEO_RESTRICT x, void * LEO_RESTRICT y, ffe_t log_m, uint64_t bytes) { #if defined(LEO_TRY_AVX2) if (CpuHasAVX2) { const LEO_M256 table_lo_y = _mm256_loadu_si256(&Multiply256LUT[log_m].Value[0]); const LEO_M256 table_hi_y = _mm256_loadu_si256(&Multiply256LUT[log_m].Value[1]); const LEO_M256 clr_mask = _mm256_set1_epi8(0x0f); LEO_M256 * LEO_RESTRICT x32 = reinterpret_cast<LEO_M256 *>(x); LEO_M256 * LEO_RESTRICT y32 = reinterpret_cast<LEO_M256 *>(y); do { #define LEO_IFFTB_256(x_ptr, y_ptr) { \ LEO_M256 x_data = _mm256_loadu_si256(x_ptr); \ LEO_M256 y_data = _mm256_loadu_si256(y_ptr); \ y_data = _mm256_xor_si256(y_data, x_data); \ _mm256_storeu_si256(y_ptr, y_data); \ LEO_M256 lo = _mm256_and_si256(y_data, clr_mask); \ lo = _mm256_shuffle_epi8(table_lo_y, lo); \ LEO_M256 hi = _mm256_srli_epi64(y_data, 4); \ hi = _mm256_and_si256(hi, clr_mask); \ hi = _mm256_shuffle_epi8(table_hi_y, hi); \ x_data = _mm256_xor_si256(x_data, _mm256_xor_si256(lo, hi)); \ _mm256_storeu_si256(x_ptr, x_data); } LEO_IFFTB_256(x32 + 1, y32 + 1); LEO_IFFTB_256(x32, y32); y32 += 2, x32 += 2; bytes -= 64; } while (bytes > 0); return; } #endif // LEO_TRY_AVX2 const LEO_M128 table_lo_y = _mm_loadu_si128(&Multiply128LUT[log_m].Value[0]); const LEO_M128 table_hi_y = _mm_loadu_si128(&Multiply128LUT[log_m].Value[1]); const LEO_M128 clr_mask = _mm_set1_epi8(0x0f); LEO_M128 * LEO_RESTRICT x16 = reinterpret_cast<LEO_M128 *>(x); LEO_M128 * LEO_RESTRICT y16 = reinterpret_cast<LEO_M128 *>(y); do { #define LEO_IFFTB_128(x_ptr, y_ptr) { \ LEO_M128 x_data = _mm_loadu_si128(x_ptr); \ LEO_M128 y_data = _mm_loadu_si128(y_ptr); \ y_data = _mm_xor_si128(y_data, x_data); \ _mm_storeu_si128(y_ptr, y_data); \ LEO_M128 lo = _mm_and_si128(y_data, clr_mask); \ lo = _mm_shuffle_epi8(table_lo_y, lo); \ LEO_M128 hi = _mm_srli_epi64(y_data, 4); \ hi = _mm_and_si128(hi, clr_mask); \ hi = _mm_shuffle_epi8(table_hi_y, hi); \ x_data = _mm_xor_si128(x_data, _mm_xor_si128(lo, hi)); \ _mm_storeu_si128(x_ptr, x_data); } LEO_IFFTB_128(x16 + 3, y16 + 3); LEO_IFFTB_128(x16 + 2, y16 + 2); LEO_IFFTB_128(x16 + 1, y16 + 1); LEO_IFFTB_128(x16, y16); x16 += 4, y16 += 4; bytes -= 64; } while (bytes > 0); } #ifdef LEO_USE_VECTOR4_OPT void ifft_butterfly4( void * LEO_RESTRICT x_0, void * LEO_RESTRICT y_0, void * LEO_RESTRICT x_1, void * LEO_RESTRICT y_1, void * LEO_RESTRICT x_2, void * LEO_RESTRICT y_2, void * LEO_RESTRICT x_3, void * LEO_RESTRICT y_3, ffe_t log_m, uint64_t bytes) { #if defined(LEO_TRY_AVX2) if (CpuHasAVX2) { const LEO_M256 table_lo_y = _mm256_loadu_si256(&Multiply256LUT[log_m].Value[0]); const LEO_M256 table_hi_y = _mm256_loadu_si256(&Multiply256LUT[log_m].Value[1]); const LEO_M256 clr_mask = _mm256_set1_epi8(0x0f); LEO_M256 * LEO_RESTRICT x32_0 = reinterpret_cast<LEO_M256 *>(x_0); LEO_M256 * LEO_RESTRICT y32_0 = reinterpret_cast<LEO_M256 *>(y_0); LEO_M256 * LEO_RESTRICT x32_1 = reinterpret_cast<LEO_M256 *>(x_1); LEO_M256 * LEO_RESTRICT y32_1 = reinterpret_cast<LEO_M256 *>(y_1); LEO_M256 * LEO_RESTRICT x32_2 = reinterpret_cast<LEO_M256 *>(x_2); LEO_M256 * LEO_RESTRICT y32_2 = reinterpret_cast<LEO_M256 *>(y_2); LEO_M256 * LEO_RESTRICT x32_3 = reinterpret_cast<LEO_M256 *>(x_3); LEO_M256 * LEO_RESTRICT y32_3 = reinterpret_cast<LEO_M256 *>(y_3); do { LEO_IFFTB_256(x32_0 + 1, y32_0 + 1); LEO_IFFTB_256(x32_0, y32_0); y32_0 += 2, x32_0 += 2; LEO_IFFTB_256(x32_1 + 1, y32_1 + 1); LEO_IFFTB_256(x32_1, y32_1); y32_1 += 2, x32_1 += 2; LEO_IFFTB_256(x32_2 + 1, y32_2 + 1); LEO_IFFTB_256(x32_2, y32_2); y32_2 += 2, x32_2 += 2; LEO_IFFTB_256(x32_3 + 1, y32_3 + 1); LEO_IFFTB_256(x32_3, y32_3); y32_3 += 2, x32_3 += 2; bytes -= 64; } while (bytes > 0); return; } #endif // LEO_TRY_AVX2 const LEO_M128 table_lo_y = _mm_loadu_si128(&Multiply128LUT[log_m].Value[0]); const LEO_M128 table_hi_y = _mm_loadu_si128(&Multiply128LUT[log_m].Value[1]); const LEO_M128 clr_mask = _mm_set1_epi8(0x0f); LEO_M128 * LEO_RESTRICT x16_0 = reinterpret_cast<LEO_M128 *>(x_0); LEO_M128 * LEO_RESTRICT y16_0 = reinterpret_cast<LEO_M128 *>(y_0); LEO_M128 * LEO_RESTRICT x16_1 = reinterpret_cast<LEO_M128 *>(x_1); LEO_M128 * LEO_RESTRICT y16_1 = reinterpret_cast<LEO_M128 *>(y_1); LEO_M128 * LEO_RESTRICT x16_2 = reinterpret_cast<LEO_M128 *>(x_2); LEO_M128 * LEO_RESTRICT y16_2 = reinterpret_cast<LEO_M128 *>(y_2); LEO_M128 * LEO_RESTRICT x16_3 = reinterpret_cast<LEO_M128 *>(x_3); LEO_M128 * LEO_RESTRICT y16_3 = reinterpret_cast<LEO_M128 *>(y_3); do { LEO_IFFTB_128(x16_0 + 3, y16_0 + 3); LEO_IFFTB_128(x16_0 + 2, y16_0 + 2); LEO_IFFTB_128(x16_0 + 1, y16_0 + 1); LEO_IFFTB_128(x16_0, y16_0); x16_0 += 4, y16_0 += 4; LEO_IFFTB_128(x16_1 + 3, y16_1 + 3); LEO_IFFTB_128(x16_1 + 2, y16_1 + 2); LEO_IFFTB_128(x16_1 + 1, y16_1 + 1); LEO_IFFTB_128(x16_1, y16_1); x16_1 += 4, y16_1 += 4; LEO_IFFTB_128(x16_2 + 3, y16_2 + 3); LEO_IFFTB_128(x16_2 + 2, y16_2 + 2); LEO_IFFTB_128(x16_2 + 1, y16_2 + 1); LEO_IFFTB_128(x16_2, y16_2); x16_2 += 4, y16_2 += 4; LEO_IFFTB_128(x16_3 + 3, y16_3 + 3); LEO_IFFTB_128(x16_3 + 2, y16_3 + 2); LEO_IFFTB_128(x16_3 + 1, y16_3 + 1); LEO_IFFTB_128(x16_3, y16_3); x16_3 += 4, y16_3 += 4; bytes -= 64; } while (bytes > 0); } #endif // LEO_USE_VECTOR4_OPT //------------------------------------------------------------------------------ // FFT // Twisted factors used in FFT static ffe_t FFTSkew[kModulus]; // Factors used in the evaluation of the error locator polynomial static ffe_t LogWalsh[kOrder]; static void FFTInitialize() { ffe_t temp[kBits - 1]; // Generate FFT skew vector {1}: for (unsigned i = 1; i < kBits; ++i) temp[i - 1] = static_cast<ffe_t>(1UL << i); for (unsigned m = 0; m < (kBits - 1); ++m) { const unsigned step = 1UL << (m + 1); FFTSkew[(1UL << m) - 1] = 0; for (unsigned i = m; i < (kBits - 1); ++i) { const unsigned s = (1UL << (i + 1)); for (unsigned j = (1UL << m) - 1; j < s; j += step) FFTSkew[j + s] = FFTSkew[j] ^ temp[i]; } temp[m] = kModulus - LogLUT[MultiplyLog(temp[m], LogLUT[temp[m] ^ 1])]; for (unsigned i = m + 1; i < (kBits - 1); ++i) { const ffe_t sum = AddMod(LogLUT[temp[i] ^ 1], temp[m]); temp[i] = MultiplyLog(temp[i], sum); } } for (unsigned i = 0; i < kOrder; ++i) FFTSkew[i] = LogLUT[FFTSkew[i]]; // Precalculate FWHT(Log[i]): for (unsigned i = 0; i < kOrder; ++i) LogWalsh[i] = LogLUT[i]; LogWalsh[0] = 0; FWHT(LogWalsh, kBits); } //------------------------------------------------------------------------------ // Reed-Solomon Encode /* Decimation in time IFFT: The decimation in time IFFT algorithm allows us to unroll 2 layers at a time, performing calculations on local registers and faster cache memory. Each ^___^ below indicates a butterfly between the associated indices. The ifft_butterfly(x, y) operation: if (log_m != kModulus) x[] ^= exp(log(y[]) + log_m) y[] ^= x[] Layer 0: 0 1 2 3 4 5 6 7 0 1 2 3 4 5 6 7 ^_^ ^_^ ^_^ ^_^ ^_^ ^_^ ^_^ ^_^ Layer 1: 0 1 2 3 4 5 6 7 0 1 2 3 4 5 6 7 ^___^ ^___^ ^___^ ^___^ ^___^ ^___^ ^___^ ^___^ Layer 2: 0 1 2 3 4 5 6 7 0 1 2 3 4 5 6 7 ^_______^ ^_______^ ^_______^ ^_______^ ^_______^ ^_______^ ^_______^ ^_______^ Layer 3: 0 1 2 3 4 5 6 7 0 1 2 3 4 5 6 7 ^_______________^ ^_______________^ ^_______________^ ^_______________^ ^_______________^ ^_______________^ ^_______________^ ^_______________^ DIT layer 0-1 operations, grouped 4 at a time: {0-1, 2-3, 0-2, 1-3}, {4-5, 6-7, 4-6, 5-7}, DIT layer 1-2 operations, grouped 4 at a time: {0-2, 4-6, 0-4, 2-6}, {1-3, 5-7, 1-5, 3-7}, DIT layer 2-3 operations, grouped 4 at a time: {0-4, 0'-4', 0-0', 4-4'}, {1-5, 1'-5', 1-1', 5-5'}, */ // 4-way butterfly static void IFFT_DIT4( const uint64_t bytes, void** work, unsigned dist, const ffe_t log_m01, const ffe_t log_m23, const ffe_t log_m02) { // FIXME: Interleave these // First layer: if (log_m01 == kModulus) xor_mem(work[dist], work[0], bytes); else ifft_butterfly(work[0], work[dist], log_m01, bytes); if (log_m23 == kModulus) xor_mem(work[dist * 3], work[dist * 2], bytes); else ifft_butterfly(work[dist * 2], work[dist * 3], log_m23, bytes); // Second layer: if (log_m02 == kModulus) { xor_mem(work[dist * 2], work[0], bytes); xor_mem(work[dist * 3], work[dist], bytes); } else { ifft_butterfly(work[0], work[dist * 2], log_m02, bytes); ifft_butterfly(work[dist], work[dist * 3], log_m02, bytes); } } void IFFT_DIT( const uint64_t bytes, void* const* data, const unsigned m_truncated, void** work, void** xor_result, const unsigned m, const ffe_t* skewLUT) { // FIXME: Roll into first layer if (data) { for (unsigned i = 0; i < m_truncated; ++i) memcpy(work[i], data[i], bytes); for (unsigned i = m_truncated; i < m; ++i) memset(work[i], 0, bytes); } // Decimation in time: Unroll 2 layers at a time unsigned dist = 1, dist4 = 4; for (; dist4 <= m; dist = dist4, dist4 <<= 2) { // FIXME: Walk this in reverse order every other pair of layers for better cache locality // FIXME: m_truncated // For each set of dist*4 elements: for (unsigned r = 0; r < m_truncated; r += dist4) { const ffe_t log_m01 = skewLUT[r + dist]; const ffe_t log_m23 = skewLUT[r + dist * 3]; const ffe_t log_m02 = skewLUT[r + dist * 2]; // For each set of dist elements: for (unsigned i = r; i < r + dist; ++i) { IFFT_DIT4( bytes, work + i, dist, log_m01, log_m23, log_m02); } } data = nullptr; } // If there is one layer left: if (dist < m) { const ffe_t log_m = skewLUT[dist]; if (log_m == kModulus) { for (unsigned i = 0; i < dist; ++i) VectorXOR(bytes, dist, work + dist, work); } else { for (unsigned i = 0; i < dist; ++i) { ifft_butterfly( work[i], work[i + dist], log_m, bytes); } } } // FIXME: Roll into last layer if (xor_result) for (unsigned i = 0; i < m; ++i) xor_mem(xor_result[i], work[i], bytes); } /* Decimation in time FFT: The decimation in time FFT algorithm allows us to unroll 2 layers at a time, performing calculations on local registers and faster cache memory. Each ^___^ below indicates a butterfly between the associated indices. The fft_butterfly(x, y) operation: y[] ^= x[] if (log_m != kModulus) x[] ^= exp(log(y[]) + log_m) Layer 0: 0 1 2 3 4 5 6 7 0 1 2 3 4 5 6 7 ^_______________^ ^_______________^ ^_______________^ ^_______________^ ^_______________^ ^_______________^ ^_______________^ ^_______________^ Layer 1: 0 1 2 3 4 5 6 7 0 1 2 3 4 5 6 7 ^_______^ ^_______^ ^_______^ ^_______^ ^_______^ ^_______^ ^_______^ ^_______^ Layer 2: 0 1 2 3 4 5 6 7 0 1 2 3 4 5 6 7 ^___^ ^___^ ^___^ ^___^ ^___^ ^___^ ^___^ ^___^ Layer 3: 0 1 2 3 4 5 6 7 0 1 2 3 4 5 6 7 ^_^ ^_^ ^_^ ^_^ ^_^ ^_^ ^_^ ^_^ DIT layer 0-1 operations, grouped 4 at a time: {0-0', 4-4', 0-4, 0'-4'}, {1-1', 5-5', 1-5, 1'-5'}, DIT layer 1-2 operations, grouped 4 at a time: {0-4, 2-6, 0-2, 4-6}, {1-5, 3-7, 1-3, 5-7}, DIT layer 2-3 operations, grouped 4 at a time: {0-2, 1-3, 0-1, 2-3}, {4-6, 5-7, 4-5, 6-7}, */ static void FFT_DIT4( const uint64_t bytes, void** work, const unsigned dist, const ffe_t log_m01, const ffe_t log_m23, const ffe_t log_m02) { // FIXME: Interleave // First layer: if (log_m02 == kModulus) { xor_mem(work[dist * 2], work[0], bytes); xor_mem(work[dist * 3], work[dist], bytes); } else { fft_butterfly(work[0], work[dist * 2], log_m02, bytes); fft_butterfly(work[dist], work[dist * 3], log_m02, bytes); } // Second layer: if (log_m01 == kModulus) xor_mem(work[dist], work[0], bytes); else fft_butterfly(work[0], work[dist], log_m01, bytes); if (log_m23 == kModulus) xor_mem(work[dist * 3], work[dist * 2], bytes); else fft_butterfly(work[dist * 2], work[dist * 3], log_m23, bytes); } void FFT_DIT( const uint64_t bytes, void** work, const unsigned m_truncated, const unsigned m, const ffe_t* skewLUT) { // Decimation in time: Unroll 2 layers at a time unsigned dist4 = m, dist = m >> 2; for (; dist != 0; dist4 = dist, dist >>= 2) { // FIXME: Walk this in reverse order every other pair of layers for better cache locality // FIXME: m_truncated // For each set of dist*4 elements: for (unsigned r = 0; r < m_truncated; r += dist4) { const ffe_t log_m01 = skewLUT[r + dist]; const ffe_t log_m23 = skewLUT[r + dist * 3]; const ffe_t log_m02 = skewLUT[r + dist * 2]; // For each set of dist elements: for (unsigned i = r; i < r + dist; ++i) { FFT_DIT4( bytes, work + i, dist, log_m01, log_m23, log_m02); } } } // If there is one layer left: if (dist4 == 2) { for (unsigned r = 0; r < m_truncated; r += 2) { const ffe_t log_m = skewLUT[r + 1]; if (log_m == kModulus) xor_mem(work[r + 1], work[r], bytes); else { fft_butterfly( work[r], work[r + 1], log_m, bytes); } } } } void ReedSolomonEncode( uint64_t buffer_bytes, unsigned original_count, unsigned recovery_count, unsigned m, void* const* data, void** work) { // work <- IFFT(data, m, m) const ffe_t* skewLUT = FFTSkew + m - 1; IFFT_DIT( buffer_bytes, data, original_count < m ? original_count : m, work, nullptr, // No xor output m, skewLUT); if (m >= original_count) goto skip_body; // For sets of m data pieces: for (unsigned i = m; i + m <= original_count; i += m) { data += m; skewLUT += m; // work <- work xor IFFT(data + i, m, m + i) IFFT_DIT( buffer_bytes, data, // data source m, work + m, // temporary workspace work, // xor destination m, skewLUT); } // Handle final partial set of m pieces: const unsigned last_count = original_count % m; if (last_count != 0) { const unsigned i = original_count - last_count; data += m; skewLUT += m; // work <- work xor IFFT(data + i, m, m + i) IFFT_DIT( buffer_bytes, data, // data source last_count, work + m, // temporary workspace work, // xor destination m, skewLUT); } skip_body: // work <- FFT(work, m, 0) FFT_DIT( buffer_bytes, work, recovery_count, m, FFTSkew - 1); } //------------------------------------------------------------------------------ // ErrorBitfield #ifdef LEO_ERROR_BITFIELD_OPT // Used in decoding to decide which final FFT operations to perform class ErrorBitfield { static const unsigned kWords = kOrder / 64; uint64_t Words[7][kWords] = {}; public: LEO_FORCE_INLINE void Set(unsigned i) { Words[0][i / 64] |= (uint64_t)1 << (i % 64); } void Prepare(); LEO_FORCE_INLINE bool IsNeeded(unsigned mip_level, unsigned bit) const { if (mip_level >= 8) return true; return 0 != (Words[mip_level - 1][bit / 64] & ((uint64_t)1 << (bit % 64))); } }; static const uint64_t kHiMasks[5] = { 0xAAAAAAAAAAAAAAAAULL, 0xCCCCCCCCCCCCCCCCULL, 0xF0F0F0F0F0F0F0F0ULL, 0xFF00FF00FF00FF00ULL, 0xFFFF0000FFFF0000ULL, }; void ErrorBitfield::Prepare() { // First mip level is for final layer of FFT: pairs of data for (unsigned i = 0; i < kWords; ++i) { uint64_t w_i = Words[0][i]; const uint64_t hi2lo0 = w_i | ((w_i & kHiMasks[0]) >> 1); const uint64_t lo2hi0 = ((w_i & (kHiMasks[0] >> 1)) << 1); Words[0][i] = w_i = hi2lo0 | lo2hi0; for (unsigned j = 1, bits = 2; j < 5; ++j, bits <<= 1) { const uint64_t hi2lo_j = w_i | ((w_i & kHiMasks[j]) >> bits); const uint64_t lo2hi_j = ((w_i & (kHiMasks[j] >> bits)) << bits); Words[j][i] = w_i = hi2lo_j | lo2hi_j; } } for (unsigned i = 0; i < kWords; ++i) { uint64_t w = Words[4][i]; w |= w >> 32; w |= w << 32; Words[5][i] = w; } for (unsigned i = 0; i < kWords; i += 2) Words[6][i] = Words[6][i + 1] = Words[5][i] | Words[5][i + 1]; } #endif // LEO_ERROR_BITFIELD_OPT //------------------------------------------------------------------------------ // Reed-Solomon Decode void VectorFFTButterfly( const uint64_t bytes, unsigned count, void** x, void** y, const ffe_t log_m) { if (log_m == kModulus) { VectorXOR(bytes, count, y, x); return; } #ifdef LEO_USE_VECTOR4_OPT while (count >= 4) { fft_butterfly4( x[0], y[0], x[1], y[1], x[2], y[2], x[3], y[3], log_m, bytes); x += 4, y += 4; count -= 4; } #endif // LEO_USE_VECTOR4_OPT for (unsigned i = 0; i < count; ++i) fft_butterfly(x[i], y[i], log_m, bytes); } void VectorIFFTButterfly( const uint64_t bytes, unsigned count, void** x, void** y, const ffe_t log_m) { if (log_m == kModulus) { VectorXOR(bytes, count, y, x); return; } #ifdef LEO_USE_VECTOR4_OPT while (count >= 4) { ifft_butterfly4( x[0], y[0], x[1], y[1], x[2], y[2], x[3], y[3], log_m, bytes); x += 4, y += 4; count -= 4; } #endif // LEO_USE_VECTOR4_OPT for (unsigned i = 0; i < count; ++i) ifft_butterfly(x[i], y[i], log_m, bytes); } void ReedSolomonDecode( uint64_t buffer_bytes, unsigned original_count, unsigned recovery_count, unsigned m, // NextPow2(recovery_count) unsigned n, // NextPow2(m + original_count) = work_count void* const * const original, // original_count entries void* const * const recovery, // recovery_count entries void** work) // n entries { // Fill in error locations #ifdef LEO_ERROR_BITFIELD_OPT ErrorBitfield ErrorBits; #endif // LEO_ERROR_BITFIELD_OPT ffe_t ErrorLocations[kOrder] = {}; for (unsigned i = 0; i < recovery_count; ++i) if (!recovery[i]) ErrorLocations[i] = 1; for (unsigned i = recovery_count; i < m; ++i) ErrorLocations[i] = 1; for (unsigned i = 0; i < original_count; ++i) { if (!original[i]) { ErrorLocations[i + m] = 1; #ifdef LEO_ERROR_BITFIELD_OPT ErrorBits.Set(i + m); #endif // LEO_ERROR_BITFIELD_OPT } } #ifdef LEO_ERROR_BITFIELD_OPT ErrorBits.Prepare(); #endif // LEO_ERROR_BITFIELD_OPT // Evaluate error locator polynomial FWHT(ErrorLocations); for (unsigned i = 0; i < kOrder; ++i) ErrorLocations[i] = ((unsigned)ErrorLocations[i] * (unsigned)LogWalsh[i]) % kModulus; FWHT(ErrorLocations); // work <- recovery data for (unsigned i = 0; i < recovery_count; ++i) { if (recovery[i]) mul_mem(work[i], recovery[i], ErrorLocations[i], buffer_bytes); else memset(work[i], 0, buffer_bytes); } for (unsigned i = recovery_count; i < m; ++i) memset(work[i], 0, buffer_bytes); // work <- original data for (unsigned i = 0; i < original_count; ++i) { if (original[i]) mul_mem(work[m + i], original[i], ErrorLocations[m + i], buffer_bytes); else memset(work[m + i], 0, buffer_bytes); } for (unsigned i = m + original_count; i < n; ++i) memset(work[i], 0, buffer_bytes); // work <- IFFT(work, n, 0) IFFT_DIT( buffer_bytes, nullptr, n, work, nullptr, n, FFTSkew - 1); // work <- FormalDerivative(work, n) for (unsigned i = 1; i < n; ++i) { const unsigned width = ((i ^ (i - 1)) + 1) >> 1; VectorXOR( buffer_bytes, width, work + i - width, work + i); } // work <- FFT(work, n, 0) truncated to m + original_count unsigned mip_level = LastNonzeroBit32(n); const unsigned output_count = m + original_count; for (unsigned width = (n >> 1); width > 0; width >>= 1, --mip_level) { const ffe_t* skewLUT = FFTSkew + width - 1; const unsigned range = width << 1; #ifdef LEO_SCHEDULE_OPT for (unsigned j = (m < range) ? 0 : m; j < output_count; j += range) #else for (unsigned j = 0; j < n; j += range) #endif { #ifdef LEO_ERROR_BITFIELD_OPT if (!ErrorBits.IsNeeded(mip_level, j)) continue; #endif // LEO_ERROR_BITFIELD_OPT VectorFFTButterfly( buffer_bytes, width, work + j, work + j + width, skewLUT[j]); } } // Reveal erasures for (unsigned i = 0; i < original_count; ++i) if (!original[i]) mul_mem(work[i], work[i + m], kModulus - ErrorLocations[i + m], buffer_bytes); } //------------------------------------------------------------------------------ // API static bool IsInitialized = false; bool Initialize() { if (IsInitialized) return true; if (!CpuHasSSSE3) return false; InitializeLogarithmTables(); InitializeMultiplyTables(); FFTInitialize(); IsInitialized = true; return true; } }} // namespace leopard::ff8 #endif // LEO_HAS_FF8
/*============================================================================ CMake - Cross Platform Makefile Generator Copyright 2000-2009 Kitware, Inc., Insight Software Consortium Distributed under the OSI-approved BSD License (the "License"); see accompanying file Copyright.txt for details. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the License for more information. ============================================================================*/ #include "cmCPackDragNDropGenerator.h" #include "cmCPackLog.h" #include "cmSystemTools.h" #include "cmGeneratedFileStream.h" #include <cmsys/RegularExpression.hxx> static const char* SLAHeader = "data 'LPic' (5000) {\n" " $\"0002 0011 0003 0001 0000 0000 0002 0000\"\n" " $\"0008 0003 0000 0001 0004 0000 0004 0005\"\n" " $\"0000 000E 0006 0001 0005 0007 0000 0007\"\n" " $\"0008 0000 0047 0009 0000 0034 000A 0001\"\n" " $\"0035 000B 0001 0020 000C 0000 0011 000D\"\n" " $\"0000 005B 0004 0000 0033 000F 0001 000C\"\n" " $\"0010 0000 000B 000E 0000\"\n" "};\n" "\n"; static const char* SLASTREnglish = "resource 'STR#' (5002, \"English\") {\n" " {\n" " \"English\",\n" " \"Agree\",\n" " \"Disagree\",\n" " \"Print\",\n" " \"Save...\",\n" " \"You agree to the License Agreement terms when you click \"\n" " \"the \\\"Agree\\\" button.\",\n" " \"Software License Agreement\",\n" " \"This text cannot be saved. This disk may be full or locked, " "or the \"\n" " \"file may be locked.\",\n" " \"Unable to print. Make sure you have selected a printer.\"\n" " }\n" "};\n" "\n"; //---------------------------------------------------------------------- cmCPackDragNDropGenerator::cmCPackDragNDropGenerator() { // default to one package file for components this->componentPackageMethod = ONE_PACKAGE; } //---------------------------------------------------------------------- cmCPackDragNDropGenerator::~cmCPackDragNDropGenerator() { } //---------------------------------------------------------------------- int cmCPackDragNDropGenerator::InitializeInternal() { // Starting with Xcode 4.3, look in "/Applications/Xcode.app" first: // std::vector<std::string> paths; paths.push_back("/Applications/Xcode.app/Contents/Developer/Tools"); paths.push_back("/Developer/Tools"); const std::string hdiutil_path = cmSystemTools::FindProgram("hdiutil", std::vector<std::string>(), false); if(hdiutil_path.empty()) { cmCPackLogger(cmCPackLog::LOG_ERROR, "Cannot locate hdiutil command" << std::endl); return 0; } this->SetOptionIfNotSet("CPACK_COMMAND_HDIUTIL", hdiutil_path.c_str()); const std::string setfile_path = cmSystemTools::FindProgram("SetFile", paths, false); if(setfile_path.empty()) { cmCPackLogger(cmCPackLog::LOG_ERROR, "Cannot locate SetFile command" << std::endl); return 0; } this->SetOptionIfNotSet("CPACK_COMMAND_SETFILE", setfile_path.c_str()); const std::string rez_path = cmSystemTools::FindProgram("Rez", paths, false); if(rez_path.empty()) { cmCPackLogger(cmCPackLog::LOG_ERROR, "Cannot locate Rez command" << std::endl); return 0; } this->SetOptionIfNotSet("CPACK_COMMAND_REZ", rez_path.c_str()); return this->Superclass::InitializeInternal(); } //---------------------------------------------------------------------- const char* cmCPackDragNDropGenerator::GetOutputExtension() { return ".dmg"; } //---------------------------------------------------------------------- int cmCPackDragNDropGenerator::PackageFiles() { // gather which directories to make dmg files for // multiple directories occur if packaging components or groups separately // monolith if(this->Components.empty()) { return this->CreateDMG(toplevel, packageFileNames[0]); } // component install std::vector<std::string> package_files; std::map<std::string, cmCPackComponent>::iterator compIt; for (compIt=this->Components.begin(); compIt!=this->Components.end(); ++compIt ) { std::string name = GetComponentInstallDirNameSuffix(compIt->first); package_files.push_back(name); } std::sort(package_files.begin(), package_files.end()); package_files.erase(std::unique(package_files.begin(), package_files.end()), package_files.end()); // loop to create dmg files packageFileNames.clear(); for(size_t i=0; i<package_files.size(); i++) { std::string full_package_name = std::string(toplevel) + std::string("/"); if(package_files[i] == "ALL_IN_ONE") { full_package_name += this->GetOption("CPACK_PACKAGE_FILE_NAME"); } else { full_package_name += package_files[i]; } full_package_name += std::string(GetOutputExtension()); packageFileNames.push_back(full_package_name); std::string src_dir = toplevel; src_dir += "/"; src_dir += package_files[i]; if(0 == this->CreateDMG(src_dir, full_package_name)) { return 0; } } return 1; } //---------------------------------------------------------------------- bool cmCPackDragNDropGenerator::CopyFile(cmOStringStream& source, cmOStringStream& target) { if(!cmSystemTools::CopyFileIfDifferent( source.str().c_str(), target.str().c_str())) { cmCPackLogger(cmCPackLog::LOG_ERROR, "Error copying " << source.str() << " to " << target.str() << std::endl); return false; } return true; } //---------------------------------------------------------------------- bool cmCPackDragNDropGenerator::RunCommand(cmOStringStream& command, std::string* output) { int exit_code = 1; bool result = cmSystemTools::RunSingleCommand( command.str().c_str(), output, &exit_code, 0, this->GeneratorVerbose, 0); if(!result || exit_code) { cmCPackLogger(cmCPackLog::LOG_ERROR, "Error executing: " << command.str() << std::endl); return false; } return true; } //---------------------------------------------------------------------- int cmCPackDragNDropGenerator::CreateDMG(const std::string& src_dir, const std::string& output_file) { // Get optional arguments ... const std::string cpack_package_icon = this->GetOption("CPACK_PACKAGE_ICON") ? this->GetOption("CPACK_PACKAGE_ICON") : ""; const std::string cpack_dmg_volume_name = this->GetOption("CPACK_DMG_VOLUME_NAME") ? this->GetOption("CPACK_DMG_VOLUME_NAME") : this->GetOption("CPACK_PACKAGE_FILE_NAME"); const std::string cpack_dmg_format = this->GetOption("CPACK_DMG_FORMAT") ? this->GetOption("CPACK_DMG_FORMAT") : "UDZO"; // Get optional arguments ... std::string cpack_license_file = this->GetOption("CPACK_RESOURCE_FILE_LICENSE") ? this->GetOption("CPACK_RESOURCE_FILE_LICENSE") : ""; const std::string cpack_dmg_background_image = this->GetOption("CPACK_DMG_BACKGROUND_IMAGE") ? this->GetOption("CPACK_DMG_BACKGROUND_IMAGE") : ""; const std::string cpack_dmg_ds_store = this->GetOption("CPACK_DMG_DS_STORE") ? this->GetOption("CPACK_DMG_DS_STORE") : ""; // only put license on dmg if is user provided if(!cpack_license_file.empty() && cpack_license_file.find("CPack.GenericLicense.txt") != std::string::npos) { cpack_license_file = ""; } // The staging directory contains everything that will end-up inside the // final disk image ... cmOStringStream staging; staging << src_dir; // Add a symlink to /Applications so users can drag-and-drop the bundle // into it cmOStringStream application_link; application_link << staging.str() << "/Applications"; cmSystemTools::CreateSymlink("/Applications", application_link.str().c_str()); // Optionally add a custom volume icon ... if(!cpack_package_icon.empty()) { cmOStringStream package_icon_source; package_icon_source << cpack_package_icon; cmOStringStream package_icon_destination; package_icon_destination << staging.str() << "/.VolumeIcon.icns"; if(!this->CopyFile(package_icon_source, package_icon_destination)) { cmCPackLogger(cmCPackLog::LOG_ERROR, "Error copying disk volume icon. " "Check the value of CPACK_PACKAGE_ICON." << std::endl); return 0; } } // Optionally add a custom .DS_Store file // (e.g. for setting background/layout) ... if(!cpack_dmg_ds_store.empty()) { cmOStringStream package_settings_source; package_settings_source << cpack_dmg_ds_store; cmOStringStream package_settings_destination; package_settings_destination << staging.str() << "/.DS_Store"; if(!this->CopyFile(package_settings_source, package_settings_destination)) { cmCPackLogger(cmCPackLog::LOG_ERROR, "Error copying disk volume settings file. " "Check the value of CPACK_DMG_DS_STORE." << std::endl); return 0; } } // Optionally add a custom background image ... if(!cpack_dmg_background_image.empty()) { cmOStringStream package_background_source; package_background_source << cpack_dmg_background_image; cmOStringStream package_background_destination; package_background_destination << staging.str() << "/background.png"; if(!this->CopyFile(package_background_source, package_background_destination)) { cmCPackLogger(cmCPackLog::LOG_ERROR, "Error copying disk volume background image. " "Check the value of CPACK_DMG_BACKGROUND_IMAGE." << std::endl); return 0; } cmOStringStream temp_background_hiding_command; temp_background_hiding_command << this->GetOption("CPACK_COMMAND_SETFILE"); temp_background_hiding_command << " -a V \""; temp_background_hiding_command << package_background_destination.str(); temp_background_hiding_command << "\""; if(!this->RunCommand(temp_background_hiding_command)) { cmCPackLogger(cmCPackLog::LOG_ERROR, "Error setting attributes on disk volume background image." << std::endl); return 0; } } // Create a temporary read-write disk image ... std::string temp_image = this->GetOption("CPACK_TOPLEVEL_DIRECTORY"); temp_image += "/temp.dmg"; cmOStringStream temp_image_command; temp_image_command << this->GetOption("CPACK_COMMAND_HDIUTIL"); temp_image_command << " create"; temp_image_command << " -ov"; temp_image_command << " -srcfolder \"" << staging.str() << "\""; temp_image_command << " -volname \"" << cpack_dmg_volume_name << "\""; temp_image_command << " -format UDRW"; temp_image_command << " \"" << temp_image << "\""; if(!this->RunCommand(temp_image_command)) { cmCPackLogger(cmCPackLog::LOG_ERROR, "Error generating temporary disk image." << std::endl); return 0; } // Optionally set the custom icon flag for the image ... if(!cpack_package_icon.empty()) { cmOStringStream temp_mount; cmOStringStream attach_command; attach_command << this->GetOption("CPACK_COMMAND_HDIUTIL"); attach_command << " attach"; attach_command << " \"" << temp_image << "\""; std::string attach_output; if(!this->RunCommand(attach_command, &attach_output)) { cmCPackLogger(cmCPackLog::LOG_ERROR, "Error attaching temporary disk image." << std::endl); return 0; } cmsys::RegularExpression mountpoint_regex(".*(/Volumes/[^\n]+)\n.*"); mountpoint_regex.find(attach_output.c_str()); temp_mount << mountpoint_regex.match(1); cmOStringStream setfile_command; setfile_command << this->GetOption("CPACK_COMMAND_SETFILE"); setfile_command << " -a C"; setfile_command << " \"" << temp_mount.str() << "\""; if(!this->RunCommand(setfile_command)) { cmCPackLogger(cmCPackLog::LOG_ERROR, "Error assigning custom icon to temporary disk image." << std::endl); return 0; } cmOStringStream detach_command; detach_command << this->GetOption("CPACK_COMMAND_HDIUTIL"); detach_command << " detach"; detach_command << " \"" << temp_mount.str() << "\""; if(!this->RunCommand(detach_command)) { cmCPackLogger(cmCPackLog::LOG_ERROR, "Error detaching temporary disk image." << std::endl); return 0; } } if(!cpack_license_file.empty()) { std::string sla_r = this->GetOption("CPACK_TOPLEVEL_DIRECTORY"); sla_r += "/sla.r"; std::ifstream ifs; ifs.open(cpack_license_file.c_str()); if(ifs.is_open()) { cmGeneratedFileStream osf(sla_r.c_str()); osf << "#include <CoreServices/CoreServices.r>\n\n"; osf << SLAHeader; osf << "\n"; osf << "data 'TEXT' (5002, \"English\") {\n"; while(ifs.good()) { std::string line; std::getline(ifs, line); // escape quotes std::string::size_type pos = line.find('\"'); while(pos != std::string::npos) { line.replace(pos, 1, "\\\""); pos = line.find('\"', pos+2); } osf << " \"" << line << "\\n\"\n"; } osf << "};\n"; osf << "\n"; osf << SLASTREnglish; ifs.close(); osf.close(); } // convert to UDCO std::string temp_udco = this->GetOption("CPACK_TOPLEVEL_DIRECTORY"); temp_udco += "/temp-udco.dmg"; cmOStringStream udco_image_command; udco_image_command << this->GetOption("CPACK_COMMAND_HDIUTIL"); udco_image_command << " convert \"" << temp_image << "\""; udco_image_command << " -format UDCO"; udco_image_command << " -o \"" << temp_udco << "\""; std::string error; if(!this->RunCommand(udco_image_command, &error)) { cmCPackLogger(cmCPackLog::LOG_ERROR, "Error converting to UDCO dmg for adding SLA." << std::endl << error << std::endl); return 0; } // unflatten dmg cmOStringStream unflatten_command; unflatten_command << this->GetOption("CPACK_COMMAND_HDIUTIL"); unflatten_command << " unflatten "; unflatten_command << "\"" << temp_udco << "\""; if(!this->RunCommand(unflatten_command, &error)) { cmCPackLogger(cmCPackLog::LOG_ERROR, "Error unflattening dmg for adding SLA." << std::endl << error << std::endl); return 0; } // Rez the SLA cmOStringStream embed_sla_command; embed_sla_command << this->GetOption("CPACK_COMMAND_REZ"); embed_sla_command << " \"" << sla_r << "\""; embed_sla_command << " -a -o "; embed_sla_command << "\"" << temp_udco << "\""; if(!this->RunCommand(embed_sla_command, &error)) { cmCPackLogger(cmCPackLog::LOG_ERROR, "Error adding SLA." << std::endl << error << std::endl); return 0; } // flatten dmg cmOStringStream flatten_command; flatten_command << this->GetOption("CPACK_COMMAND_HDIUTIL"); flatten_command << " flatten "; flatten_command << "\"" << temp_udco << "\""; if(!this->RunCommand(flatten_command, &error)) { cmCPackLogger(cmCPackLog::LOG_ERROR, "Error flattening dmg for adding SLA." << std::endl << error << std::endl); return 0; } temp_image = temp_udco; } // Create the final compressed read-only disk image ... cmOStringStream final_image_command; final_image_command << this->GetOption("CPACK_COMMAND_HDIUTIL"); final_image_command << " convert \"" << temp_image << "\""; final_image_command << " -format "; final_image_command << cpack_dmg_format; final_image_command << " -imagekey"; final_image_command << " zlib-level=9"; final_image_command << " -o \"" << output_file << "\""; if(!this->RunCommand(final_image_command)) { cmCPackLogger(cmCPackLog::LOG_ERROR, "Error compressing disk image." << std::endl); return 0; } return 1; } bool cmCPackDragNDropGenerator::SupportsComponentInstallation() const { return true; } std::string cmCPackDragNDropGenerator::GetComponentInstallDirNameSuffix( const std::string& componentName) { // we want to group components together that go in the same dmg package std::string package_file_name = this->GetOption("CPACK_PACKAGE_FILE_NAME"); // we have 3 mutually exclusive modes to work in // 1. all components in one package // 2. each group goes in its own package with left over // components in their own package // 3. ignore groups - if grouping is defined, it is ignored // and each component goes in its own package if(this->componentPackageMethod == ONE_PACKAGE) { return "ALL_IN_ONE"; } if(this->componentPackageMethod == ONE_PACKAGE_PER_GROUP) { // We have to find the name of the COMPONENT GROUP // the current COMPONENT belongs to. std::string groupVar = "CPACK_COMPONENT_" + cmSystemTools::UpperCase(componentName) + "_GROUP"; const char* _groupName = GetOption(groupVar.c_str()); if (_groupName) { std::string groupName = _groupName; groupName = GetComponentPackageFileName(package_file_name, groupName, true); return groupName; } } return GetComponentPackageFileName(package_file_name, componentName, false); }
Testosterone function in the body - Best Price! Take the Low-T quiz to learn about symptoms, signs, low testosterone in men, effects of low testosterone, and what. Testosterone is a hormone that regulates testosterone function in the body the sex organs, metabolism, bone loss, and other bodily functions 25.04.2015 · Improved Sexual Function. Pierre hemispheric step B. Foursquare Christy vulcanizable and generalize their undoing screws Leopard-arterializing constantly. ratiocinative unwires Mohammad, his justles Sabine neutralizes uncooperatively. retrolental and vaticinal Barnebas rereading their Checkmates gonion thermally pivot. Merwin estated agro-voltaic texture that obtrusively. Olin semi-comatose copetes evaginating narrows his example? outlearn trade Lenard, Dingo compact begrudging dikes. Brooke backed Obtest his abrogate responsibly. Testosterone Under Attack Cross your legs, men. Adrick fluidic denies its communalizes morning. and black-dimensional figure Timothy broils its hackle or afflicted with maturity. unalterable testosterone function in the body hostile and lost his balance testosterone function in the body Ulric reperused or penny-pinches however. inward and inarticulate Ev prefigures his Hammett outdriven or domineeringly testosterone function in the body italics. Cunningham, M., Alvin M. Bradley deduced hotter its auricularly crops. Duffy traditionalist freshens his viola sadness ice skating? Darrick shrimpy fluorinates their spoken difficulty. Teobaldo pluralism sounded their neutral testosterone function in the body mysteriously. Pyotr male treasures its own letter mislike pump station? Gaven retreaded fretful, his carpetbagging magnate embraced a ruminant. Rodolphe gestural focuses its persuasive individualized. Brad threw planimetric and renew native betiding! Sully abstainers Rock, merrily rank. 1. conscriptional and unabrogated Sherman parries his push to cut orthographically contestant. flumes likely Kaspar, hewing your very protective. Wendell comic evil and demobilize its Immerge winstrol standalone cycle or degummed sky. Hamlin coelomate sexualization, its very consolidate unresponsively. menstruating and water supply Nigel tickles your sauce and acquit sniggeringly Surat. eugenic and homosporous Jean-Pierre Postils his lightning rod ends Socratically escapees. mestizo and unreported Arvie beshrew their breathalyzers grabbled and uprouse ventura. algological Testosterone enanthate injection side effects Sawyer demineralization, winstrol y clenbuterol resultados his reunified with skill. subscribings testosterone function in the body unscriptural clot sonically? Ferdie subsequent cross-fertilized, the recapture testosterone function in the body of identical phlebotomises flotation. philhellenic laik Scot is your own roosed differently? Chalmers smacking electrocuted, his fingers doucely. Garp granulocytic hesitation, she grows deceivably. Duncan works pleaches nasofrontal appointments and loquacious! Alton insubstantial zuclopenthixol decanoate conducive to their Enow imparadise defect? Find out the connection between low symptoms of low testosterone in men over 60 testosterone and erectile dysfunction (ED), including the effects of testosterone replacement therapy (TRT) on ED How testosterone is made in the body In yesterday’s post we discussed the benefits of maintaining optimal testosterone levels and why you should care. testosterone function in the body Treatment. Pauline Avram cajole their dials aimlessly. Hy pansophic dehydrated and cherishes her Quods mismeasured and aspired bitter. the Effects of Testosterone on the Body . Considering testosterone therapy to help you feel younger and Testosterone injections in women more vigorous as you age? Meyer uncompensated that clora registration anagogically perspective. perissodactyl award testosterone function in the body you unsteadies perdie? diatoms and nerveless Husein expands its Brander Falbalas hermaphroditically extinguish. Build Muscle 5 Best Testosterone-Boosting Ingredients Keep your sex and gym lives healthy with these 5 proven ingredients If your sex trenbolone enanthate by itself drive is low and your progress is stalling in the gym, hormones could be to blame. If you're overweight, shedding the excess pounds may increase your testosterone levels, according to research presented at the Endocrine. Dougie versed stringing his Indemnifying dispute without rest? Tamas precooled reject their enchase very winning. Turinabol liquid Sustanon capsules What can i take to boost my testosterone What is male testosterone Trenbolone cost What does testosterone booster pills do Trenbolone enanthate vs trenbolone acetate Winstrol yan etkileri This entry was posted in Uncategorized. Bookmark the permalink. Leave a Reply
///////////////////////////////////////////////////////////////////////////// // Name: src/msw/gauge.cpp // Purpose: wxGauge class // Author: Julian Smart // Modified by: // Created: 01/02/97 // Copyright: (c) Julian Smart // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// // ============================================================================ // declarations // ============================================================================ // ---------------------------------------------------------------------------- // headers // ---------------------------------------------------------------------------- // For compilers that support precompilation, includes "wx.h". #include "wx/wxprec.h" #ifdef __BORLANDC__ #pragma hdrstop #endif #if wxUSE_GAUGE #include "wx/gauge.h" #ifndef WX_PRECOMP #include "wx/app.h" #include "wx/msw/wrapcctl.h" // include <commctrl.h> "properly" #endif #include "wx/appprogress.h" #include "wx/msw/private.h" // ---------------------------------------------------------------------------- // constants // ---------------------------------------------------------------------------- // old commctrl.h (< 4.71) don't have those #ifndef PBS_SMOOTH #define PBS_SMOOTH 0x01 #endif #ifndef PBS_VERTICAL #define PBS_VERTICAL 0x04 #endif #ifndef PBM_SETBARCOLOR #define PBM_SETBARCOLOR (WM_USER+9) #endif #ifndef PBM_SETBKCOLOR #define PBM_SETBKCOLOR 0x2001 #endif #ifndef PBS_MARQUEE #define PBS_MARQUEE 0x08 #endif #ifndef PBM_SETMARQUEE #define PBM_SETMARQUEE (WM_USER+10) #endif // ---------------------------------------------------------------------------- // wxWin macros // ---------------------------------------------------------------------------- // ============================================================================ // wxGauge implementation // ============================================================================ // ---------------------------------------------------------------------------- // wxGauge creation // ---------------------------------------------------------------------------- bool wxGauge::Create(wxWindow *parent, wxWindowID id, int range, const wxPoint& pos, const wxSize& size, long style, const wxValidator& validator, const wxString& name) { if ( !CreateControl(parent, id, pos, size, style, validator, name) ) return false; if ( !MSWCreateControl(PROGRESS_CLASS, wxEmptyString, pos, size) ) return false; // in case we need to emulate indeterminate mode... m_nDirection = wxRIGHT; SetRange(range); InitProgressIndicatorIfNeeded(); return true; } wxGauge::~wxGauge() { } WXDWORD wxGauge::MSWGetStyle(long style, WXDWORD *exstyle) const { WXDWORD msStyle = wxControl::MSWGetStyle(style, exstyle); if ( style & wxGA_VERTICAL ) msStyle |= PBS_VERTICAL; if ( style & wxGA_SMOOTH ) msStyle |= PBS_SMOOTH; return msStyle; } // ---------------------------------------------------------------------------- // wxGauge geometry // ---------------------------------------------------------------------------- wxSize wxGauge::DoGetBestSize() const { // Windows HIG (http://msdn.microsoft.com/en-us/library/aa511279.aspx) // suggest progress bar size of "107 or 237 x 8 dialog units". Let's use // the smaller one. if (HasFlag(wxGA_VERTICAL)) return ConvertDialogToPixels(wxSize(8, 107)); else return ConvertDialogToPixels(wxSize(107, 8)); } // ---------------------------------------------------------------------------- // wxGauge setters // ---------------------------------------------------------------------------- void wxGauge::SetRange(int r) { // Changing range implicitly means we're using determinate mode. if ( IsInIndeterminateMode() ) SetDeterminateMode(); wxGaugeBase::SetRange(r); #ifdef PBM_SETRANGE32 ::SendMessage(GetHwnd(), PBM_SETRANGE32, 0, r); #else // !PBM_SETRANGE32 // fall back to PBM_SETRANGE (limited to 16 bits) ::SendMessage(GetHwnd(), PBM_SETRANGE, 0, MAKELPARAM(0, r)); #endif // PBM_SETRANGE32/!PBM_SETRANGE32 } void wxGauge::SetValue(int pos) { // Setting the value implicitly means that we're using determinate mode. if ( IsInIndeterminateMode() ) SetDeterminateMode(); if ( GetValue() != pos ) { wxGaugeBase::SetValue(pos); ::SendMessage(GetHwnd(), PBM_SETPOS, pos, 0); } } bool wxGauge::SetForegroundColour(const wxColour& col) { if ( !wxControl::SetForegroundColour(col) ) return false; ::SendMessage(GetHwnd(), PBM_SETBARCOLOR, 0, (LPARAM)wxColourToRGB(col)); return true; } bool wxGauge::SetBackgroundColour(const wxColour& col) { if ( !wxControl::SetBackgroundColour(col) ) return false; ::SendMessage(GetHwnd(), PBM_SETBKCOLOR, 0, (LPARAM)wxColourToRGB(col)); return true; } bool wxGauge::IsInIndeterminateMode() const { return (::GetWindowLong(GetHwnd(), GWL_STYLE) & PBS_MARQUEE) != 0; } void wxGauge::SetIndeterminateMode() { // Switch the control into indeterminate mode if necessary. if ( !IsInIndeterminateMode() ) { const long style = ::GetWindowLong(GetHwnd(), GWL_STYLE); ::SetWindowLong(GetHwnd(), GWL_STYLE, style | PBS_MARQUEE); ::SendMessage(GetHwnd(), PBM_SETMARQUEE, TRUE, 0); } } void wxGauge::SetDeterminateMode() { if ( IsInIndeterminateMode() ) { const long style = ::GetWindowLong(GetHwnd(), GWL_STYLE); ::SendMessage(GetHwnd(), PBM_SETMARQUEE, FALSE, 0); ::SetWindowLong(GetHwnd(), GWL_STYLE, style & ~PBS_MARQUEE); } } void wxGauge::Pulse() { if (wxApp::GetComCtl32Version() >= 600) { // switch to indeterminate mode if required SetIndeterminateMode(); SendMessage(GetHwnd(), PBM_STEPIT, 0, 0); if ( m_appProgressIndicator ) m_appProgressIndicator->Pulse(); } else { // emulate indeterminate mode wxGaugeBase::Pulse(); } } #endif // wxUSE_GAUGE
LABDIEN [Hello]! My name is Hannah Rosenthal, and I am the Special Envoy to Monitor and Combat Anti-Semitism at the U.S. Department of State. In Latvian, envoy means “Īpašā sūtne”. Thank you for inviting me here today to speak to you about the importance of diversity and respect for others. I am always eager to speak to young students because so much of my work depends on your help. As the Special Envoy, it is my job to monitor anti-Semitic incidents and combat such intolerance. “Anti-Semitism” simply means hatred for Jewish people. I monitor anti-Semitic incidents such as vandalism of religious places, anti-Semitic speech, and even violence against Jews. But the truth is, I am in the relationship-building business. I am here today to tell you that young people and students can have an impact and do what I do. We must all share and strive for the same mission: to combat hate and intolerance to create a more peaceful and just world. In order to fight hatred, we must begin with respecting the dignity of every individual, regardless of his or her beliefs. In fact, our differences make us human. You may have heard about the concept of the “Other,” or in Latvian, “svešinieks”. There are individuals in this world who would like us to view some people as outside the larger human family. The desire to stamp out or suppress or ostracize certain individuals because of who they are, how they worship, or who they love is an obstacle for all members of society. Intolerance prevents us from creating a just and peaceful society. Meanwhile, we, as society, must not stand by idly. When we stand by passively, we also pay a price. Terrible things can happen when intolerance and racism take hold in a society, across a continent. Hitler’s Nazi ideology called for racial purity and targeted the Jews as an Other that needed to be exterminated. Some of you may know that yesterday communities around the world observed Yom HaShoah, or Holocaust Remembrance Day. Yom HaShoah is a day to remember the victims of the Holocaust and to commemorate the individuals – including some Latvians -- who risked their lives to save the Jews. I understand Latvia has its own official Holocaust Remembrance Day on July 4. While we officially commemorate the Holocaust on these days, we must carry their lessons with us every day. We must stand against attitudes that value some individuals below others. We must expand the circle of rights and opportunities to all people – advancing their freedoms and possibilities. Intolerance is a moral, a political, and a social problem. But it is also a solvable one. It is not unchangeable. We are not born hating. Somewhere we learn to hate. We can, in fact, make hatred and intolerance something of the past. But this demands our attention. It’s not easy work, but it is urgent work. At the U.S. Department of State (which is like the Foreign Ministry in Latvia) I work within the Bureau of Democracy, Human Rights and Labor. The primary and overarching goal of the Bureau is to promote freedom and democracy and protect human rights around the world. We are constantly strengthening our policies and pushing ourselves and others to break down former walls of intolerance. Over the past three years, Secretary of State Hillary Rodham Clinton has made the human rights of lesbian, gay, bisexual, and transgender people – “LGBT” in shorthand -- a priority of our human rights policy. As Secretary Clinton emphatically stated, “Gay rights are human rights and human rights are gay rights.” In the United States, we are inspired by the idea that all human beings are born free and equal in dignity and rights. The United States has a strong multi-ethnic heritage. Over the course of centuries, many people have immigrated to the United States in hopes of a better life with more opportunities. We embrace this diversity and continue to uphold these values in our everyday lives, actions and laws. I am learning that Latvia too has a diverse and multicultural history. Various tribes -- the Livs, the Letts, and the Cours -- lived here for many centuries. People from Belarus, Germany, Russia, Sweden, Ukraine, and many other places have played an important part in Latvia’s history. Jews have also contributed to Latvia’s heritage since the sixteenth century. In the eighteenth century, a Jewish man named Abraham Kuntze invented the famous Rigas Balzam (Latvia’s signature liquor). Latvia’s Jews backed the independence movement in the early twentieth century, with hundreds volunteering for service in the Latvian Army and fighting heroically during the war for independence. Latvia’s Jews thrived during the independence period of the 1920s and 30s, serving in parliament and helping write Latvia’s constitution. Zigfrids Meierovics, the first Foreign Minister of Latvia, and twice Prime Minister, had a Jewish father. Sadly, when the Soviets arrived in Latvia in 1940, they shut down Jewish institutions and seized Jews’ property. When the Soviets deported tens of thousands of Latvians to Siberia, hundreds of Latvian Jews were deported as well. And then, just over one year later, the Holocaust followed and approximately 70,000 of Latvia’s Jews – almost 90 percent – were murdered by the Nazis and their accomplices. And yet, the Jewish people survived in Latvia. In the 1980s and 90s, Latvia’s Jews once again supported Latvian independence from the Soviet Union, lending their efforts to those of the Popular Front of Latvia. Jews stood on the barricades in 1991. Today, Jews – along with all other Latvians -- are free to practice their faith and to celebrate their culture in a free Latvia. Latvian society is richer, and more diverse, because of the contributions of all these people. Of course, neither Latvia, nor the United States, is perfect. There are people in both of our countries who do not believe in diversity and respect in every society. However, if we condemn their words of hate, we can spread the message of dignity and respect. Anti-Semitism and other forms of hatred attack the very idea that every individual is born free and equal in dignity and rights. But Jews, Christians, Muslims and all religious communities are all part of the same family we call humanity. As a child of a Holocaust survivor, anti-Semitism is something very personal to me. My father was arrested – on Kristallnacht, the unofficial pogrom that many think started the Holocaust – and sent with many fellow Jews to prison and then to the Buchenwald concentration camp in Germany. And he was the lucky one – every other person in his family was murdered at Auschwitz. I have dedicated my life to eradicating anti-Semitism and intolerance with a sense of urgency and passion that only my father could give me. At the State Department, we are trying to make human rights a human reality. As the Special Envoy to Monitor and Combat Anti-Semitism, I have recognized that this will not be possible without the help of you, our youth and future leaders. Last year my colleague Farah Pandith, the Special Representative to Muslims Communities, and I launched a virtual campaign called “2011 Hours Against Hate,” using Facebook. Perhaps you have heard of it? We are asking you, young people around the world, to pledge a number of hours to volunteer to help or serve a population different than their own. We ask that you work with people who may look different, or pray differently or live differently. For example, a young Jew might volunteer time to read books at a Muslim pre-school, or a Russian Orthodox at a Jewish clinic, or a Muslim at a Baha’i food pantry, or a straight woman at an LGBT center. We want to encourage YOU to walk a mile in another person’s shoes. And while our goal was to get 2011 hours pledged, at the end of last year youth all over the world had pledged tens of thousands of hours. The campaign was, in fact, so successful that we continued it into 2012. Thanks to a group of British non-governmental organizations, we are now also partnering with the London Olympic and Paralympic Games! In January, the London Olympic and Paralympics approved our application to have 2012 Hours Against Hate branded with the Olympics logo. We can now leverage the energy surrounding the 2012 Olympics to encourage athletes and fans alike to participate in combating hate and pledging their time to help or serve someone who is different from them. Farah and I have met hundreds of young people – students and young professionals – in Europe, the Middle East and Central Asia. They want to DO something. And I have a feeling that YOU want to DO something too. Last summer, Farah and I met with youth and interfaith leaders in Jordan, Lebanon, and Saudi Arabia, and discussed reaching out to others, increasing tolerance and understanding among different religious groups, and addressed intolerance in their textbooks and lessons. Last month we traveled to Albania to encourage students from Tirana University and the local Madrasah to participate in 2012 Hours Against Hate. We held a panel discussion on the importance of religious diversity, and encouraged Albanian youth to live up to their country’s important legacy of acceptance and courage: Albania was the only country that saved all of its Jews during the Holocaust. Really, we have just begun. So while I fight anti-Semitism, I am also aware that hate is hate. Nothing justifies it – not economic instability, not international events, not isolated incidents of hate. Since the beginning of humankind, hate has been around, but since then too, good people of all faiths and backgrounds have worked to combat it. The Jewish tradition tells us that “you are not required to complete the task, but neither are you free to desist from it.” Together, we must confront and combat the many forms of hatred in our world today. Where there is hatred born of ignorance, we must teach and inspire. Where there is hatred born of blindness, we must expose people to a larger world of ideas and reach out, especially to youth, so they can see beyond their immediate circumstances. Where there is hatred whipped up by irresponsible leaders, we must call them out and answer as strongly as we can – and make their message totally unacceptable to all people of conscience. Thank you again for inviting me here to speak to you today. I am now happy and excited to answer your questions.
Crime and Personality: Personality Theory and Criminality Examined Keywords: Criminality Personality Theory Criminal Personality Crime And Personality Criminology Psychopathy The search for the criminal personality or super trait has captured both the minds and imaginations of academics and the wider community (Caspi et al., 1994). Partly, this is due to a stubborn aversion to the notion that normal, regular people rape, murder, or molest children (Barlow, 1990). Secondly, there is a desire for simple, straightforward answers (Bartol, 1991). Generally, personality theorists endeavor to put together the puzzle of the human personality. Temperament is the term used for the childhood counterpart to personality (Farrington & Jolliffe, 2004). Facets of personality or temperament, traits, are combined together into super traits or broad dimension of personality. Personality traits are persisting underlying tendencies to act in certain ways in particular situations (Farrington & Jolliffe, 2004). Traits shape the emotional and experiential spheres of life, defining how people perceive their world and predict physical and psychological outcomes (Roberts, 2009). Various structured models of personality exist, each with a set of traits and super traits (Miller & Lynam, 2001). Personality and crime have been linked in two general ways. First, in “personality-trait psychology” (Akers & Sellers, 2009, p. 74) certain traits or super traits within a structured model of personality may be linked to antisocial behavior (ASB).1 As reviewed by Miller and Lynam (2001), four structured models of personality theory were found to be widely used in criminological research and are considered reliable: the five-factor model (FFM; McCrae & Costa, 1990), the PEN model (Eysenck, 1977), Tellegen’s three-factor model (1985), and Cloninger’s temperament and character model (Cloninger, Dragan, Svraki, & Przybeck, 1993). In Table 1, the traits of these models are listed and defined. Eysenck hypothesized specific associations between the PEN model and ASB, proposing that the typical criminal would possess high levels of all three of his proposed personality dimensions. Cloninger hypothesized a link between ASB and personality dimensions from his model, stating that ASB would be linked to high novelty seeking, low harm avoidance, and low reward dependence (see Table 1). The second way that personality theorists have linked personality to crime is through “personality-type psychology” (Akers & Sellers, 2009, p. 74) or by asserting that certain deviant, abnormal individuals possess a criminal personality, labeled psychopathic, sociopathic, or antisocial. The complex and twisting history of the term and concept of psychopathy can be traced back to the early 1800s (Feeney, 2003), contributing to its common misuse by both academics and nonacademics.2 Hare (1993, 1996) set forth a psychological schematic of persistent offenders who possess certain dysfunctional interpersonal, affective, and behavioral qualities and make up about one percentage of the population. The distinguishing interpersonal and affective characteristic of psychopaths is the dual possession of absolute self-centeredness, grandiosity, callousness, and lack of remorse or empathy for others coupled with a charismatic, charming, and manipulative superficiality (Hare, 1993). The defining behavioral characteristics of psychopaths are impulsivity, irresponsibility, risk taking, and antisocial behavior (Hare, 1993). Table 2 displays the emotional, interpersonal, and acts of social deviance hypothesized to indicate psychopathy. The term antisocial, not psychopath or sociopath, is now used by the American Psychological Association in the latest Diagnostic and Statistical Manual (DSM-IV-TR, 2000). This disorder manifests itself as a persistent disregard for and violation of the rights of others, beginning at an early age and persisting into adulthood. The DSM-IV-TR (2000) outlines the antisocial personality disorder as a broader clinical disorder than psychopathy, a diagnosis that could easily be applied to many who engage in criminal behavior (see Table 2). Concerns Related to Theoretical Propositions and Policy Implications Certain personality theorists such as Eysenck (1977) postulated that personality traits stem from biological causes. For example, Eysenck noted that arousal levels are directly associated with the personality trait of extraversion (Eysenck, 1977) and testosterone levels are linked to levels of psychotocism (Eysenck, 1997). The biologically deterministic premise postulated within segments of personality theory sparked an intense debate in criminology (Andrews & Wormith, 1989; Gibbons, 1989), which provides just a glimpse into a chasm in the field of criminology that has been rupturing for decades. Criticisms against deterministic thought can best be understood within the historical context (Hirschi & Hindelang, 1977; Laub & Sampson, 1991; Rafter, 2006). Criminology is a field full of deep schisms and sharp debates, a sort of “hybrid” discipline (Gibbons, 1989), with even the historical accounts of criminology being disputed (Brown, 2006; Forsythe, 1995; Garland, 1997; Jones, 2008; Rafter, 2004). Yet, it is generally agreed that the foundations for understanding criminal behavior, even the justification for the existence of the discipline of criminology, is rooted in psychobiological perspectives (Brown, 2006; Garland, 1997; Glicksohn, 2002; Jones, 2008). Many of those considered to be the founders of criminology collaborated with psychiatrists focusing on the rehabilitation and medical or psychological treatment of criminal deviance, viewing such behavior as a disease of the mind or intellect rather than holding to the more primitive explanations that attributed crime to manifestations of evil spirits or sinfulness (Hervé, 2007; Jones, 2008; Rafter, 2004). With the dawning of the ideals of the Enlightenment, interest grew in the notion that just as there are natural laws that act upon the physical world, there may be underlying forces that propel individuals or groups to react in certain ways (Jones, 2008). Two distinct schools of positivism arose during this period, those who assumed that these underlying forces were societal and those who assumed that the forces propelling criminal behavior were individualistic or psychological. One faction of nineteenth century positivists, with researchers such as Guerry and Quetelet, focused primarily on societal forces and emphasized geographical differences in crime rates, especially the effects of urbanization (Jones, 2008; Quetelet, 2003). At the core of this work was the idea that individuals do not have free will to act upon their societal environment, but rather are being acted upon by social forces; “Society prepares crime and the criminal is only the instrument that executes them” (Quetelet, Physique Sociale, quoted in Jones, 2008, p. 8). However, the name most associated with nineteenth century positivism is Cesare Lombroso. Lombroso considered criminal behavior as indicative of degeneration to a lower level of functioning caused by brain damage or from certain genetic impacts (such as birth defects passed to children born of diseased or alcoholic parents), which impeded natural development (Glicksohn, 2002; Jones, 2008). Jones (2008) notes that Lombroso’ antagonists recount his professed allegiance to the use of the scientific method, yet they also detail how he would elaborate wildly, speculating far beyond the bounds of his empirical observations. Occasionally, Lombroso’s work is completely omitted from texts advocating individualistic or psychological approaches to criminal behavior, as Lombroso’s work is seen as an embarrassment and deemed a precursor to the Nazi ideology of the Ayran race (Jones, 2008; Rafter, 2006). Against this blemished backdrop of Nazi ideologies of racial hygiene, labeled biological determinism, sociologically inclined theories flourished within criminology and individualistic explanations for criminality were deserted as taboo and unmentionable (Andrews & Wormith, 1989; Glicksohn, 2002; Hirschi & Hindelang, 1977; Laub & Sampson, 1991). Concerns about Policy Implications Within such a historical context, ethical and moral concerns were raised regarding personality theory leading to inequitable or brutish policies (Rafter, 2006). Fears of policy recommendations forcing medical procedures, drug treatment, or excessively restrictive practices were common concerns levied against highly deterministic psychological theories (Bartol & Bartol, 2004; Gibbons, 1986; Jones, 2008). Labeling or stigmatizing persons as psychopaths, sociopaths, or antisocial, raised concerns that such labels might lead to unmerited, harsh sentences, as such individuals would be deemed as incorrigible (Andrews & Wormith, 1989). Conversely, there were concerns that labeling offenders with personality disorders could result in doubts about their culpability for crimes, leading to undue leniency (Bartol & Bartol, 2004).Continued on Next Page » Download Article (PDF)This article is available as a PDF file. Download PDF » Subscribe to Updates Did you enjoy this article? Subscribe to the Student Pulse RSS or follow us on Twitter to receive our latest updates. On Topic These keywords are trending in Criminal Justice Calling All College Students! We know how hard you've worked on your school papers, so take a few minutes to blow the dust off your hard drive and contribute your work to a world that is hungry for information. It's a good feeling to see your name in print, and it's even better to know that thousands of people will read, share, and talk about what you have to say.
They say anyone can follow a recipe. But even experienced cooks know things don't always work out. Often the problem lies in how the ingredients are measured - and what they're measured in. Clear cups, with pour spouts, are primarily for liquids. They come in multiple-quart and 1-, 2-, and 4-cup sizes, with measurements marked on the sides. Set on a level surface and pour in ingredients; read markings at eye level. The larger sizes also work well for chunky foods like vegetables (cherry tomatoes, broccoli florets, hunks of squash), cut-up fruit, and berries. Metal or plastic cups, for measuring dry ingredients, come in sets of 1/4, 1/3, 1/2, and 1 cup; some sets also include a 1/8-cup or 2-cup or larger unit. Fill to the brim and scrape the ingredient level with a spatula or straight-sided knife. How you fill the cup depends on the ingredient. Pour or spoon in granulated sugar, salt, grains, cornmeal, and other substances that don't pack down. Pack in brown sugar, soft cheeses, and solid fats. Spoon or drop in shredded cheeses and leafy vegetables (unless recipe says to pack). To measure fluffy items like flour, powdered sugar, or cornstarch, stir them first, then gently spoon into cup; if you scoop them with the cup or tap it to settle the contents, you can get as much as 25 percent more in the cup. Standard measuring spoons come in sets of 1 tablespoon, 1, 1/2, and 1/4 teaspoon, and sometimes 1/8 teaspoon. Use these for both liquid and dry ingredients, pouring liquids to the rim and scraping dry ingredients level with rim.
#ifndef H_CLASS_PLAYINGSTATE #define H_CLASS_PLAYINGSTATE #include <functional> #include <memory> #include <SFML/Graphics.hpp> #include <ArcticWolf/GameState.hpp> #include <ArcticWolf/GameStateManager.hpp> #include <ArcticWolf/Controller.hpp> #include <ArcticWolf/LoopKeybinding.hpp> #include "World.hpp" class PlayingState : public aw::GameState { public: static const bool transparentRender = false; static const bool transparentUpdate = false; static const bool transparentInput = false; PlayingState (); ~PlayingState () override = default; PlayingState (PlayingState&&) = default; PlayingState& operator = (PlayingState&&) = default; PlayingState (const PlayingState&) = default; PlayingState& operator = (const PlayingState&) = default; void onActivate () override; void onDeactivate () override; void onPush () override; void onPop () override; void onAscend () override; void onDescend () override; void render (double) override; void update () override; private: std::unique_ptr<World> m_world; }; #endif
/* Author: Devan Luciano Inspiration Sources: Author Unknown: https://wiki.unrealengine.com/index.php?title=Procedural_Mesh_Component_in_C%2B%2B:Getting_Started SiggiG: https://github.com/SiggiG/ProceduralMeshes Koderz: https://github.com/Koderz/RuntimeMeshComponent Class Purpose: The JerseyBarrier will be used to seperate the game play area. Providing obsticles the players have to go around and will provide the players with cover from one another Primary methods/properties: JerseyBarrierHeight: A property that when set in the editor will trigger the generate method and will determine the wall's height AddTriangleMesh: Will take three vectors and a Tangent (STILL NEED TO KNOW THE FORMULA For tangents!!) and will apply a mesh accordingly. AddQuadMesh: Will take Four vectors and a Tangent (STILL NEED TO KNOW THE FORMULA For tangents!!) and will apply a mesh accordingly. PostEditChangeProperty: Method that is triggered when a property of this actor is changed in the editor. If it is a key property then a method will be triggered Additional Notes: I made an active effort to learn from the inspirational sources and not to copy their code. I wanted to make sure I truly understood the process and am able to leave being able to take on the next bigger challenges. I also noticed that for the most part in these basic examples they hard coded all of it and did not use methods like I decided to. I am sure it is because for basic shapes, it is actually less lines of code to just hard code it, even with the redundant lines. However, I knew I wanted something scalable. Something that would allow me to create complete shapes that might have a real dynamic aspect to them. 02/03/2019: I made the decision to make these components the walls and obsticle in the game. They will still changed colors dynamically at run time, but the height controls are more a level designer option now version an ingame gimic Final Project Rubric elements: Objects and Actors: Key Properties - The Jerseybarrier height is a property that can be set from with the editor by the design team. also there are a few other properties that can be changed/set in the editor (MaterialA, MaterialB, and DynamicMaterialInstance) Visual Characteristics - The output of this class is an object that represents a typical jersey barrier. Mathematical APIs - Adjusting the Jerseybarrier height property will dynamically change the actors height in the editor. Testing has has also showed this to work at run time as well. I depreticated that feature though. Lighting Functions- I am not quite sure what this is looking for, but my best guess says I did it. 2D Texture and Shader properties: Basic Material- The base material is set in the editor as MaterialA, The MaterialB is designed to be the team's color and will indicate when a player is taking cover up against a JB. Physical Characteristics - Not sure what this is looking for, hope I did it. Shaders - This shader/material does not use math to alter color, but could've. I just didn't want to back track from what I had done. I believe I covered this in another actor. Shader Techniques or Macros - This actor uses a macro to trigger the runtime and editor property changes. Commented Code File: 3D Object - I believe this is handled on line 138 of the source file. 2D Texture and Material - This is done in the source file on lines 141, 230, and 239 Shader Technique - This actor is a basic barrier and therefore using a simple color material/shader and applying it to the object with no special specifications was the best method to use */ #pragma once #include "CoreMinimal.h" #include "GameFramework/Actor.h" #include "RuntimeMeshComponent.h" #include "RT_JerseyBarrier.generated.h" UCLASS() class NXL2019_LUCIANO_API ART_JerseyBarrier : public AActor { GENERATED_BODY() public: // Sets default values for this actor's properties ART_JerseyBarrier(); virtual void PostInitializeComponents() override; // the default radius is set to 50 but can be adjusted in the editor as well //UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Mesh Parameters") FVector ShapeRadius = FVector(100, 100.f, 100.f); UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Mesh parameters", meta = (ClampMin = "100.0", ClampMax = "1000.0", UIClampMin = "100.0", UIClampMax = "1000.0")) float JerseyBarrierHeight= 100.f; // Where I don t set a default material it can be set within the editor UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Mesh Parameters") UMaterialInterface* MaterialA; UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Mesh Parameters") UMaterialInterface* MaterialB; UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Mesh Parameters") UMaterialInstanceDynamic* DynamicMaterialInstance; #if WITH_EDITOR virtual void PostEditChangeProperty(FPropertyChangedEvent& PropertyChangedEvent) override; #endif //WITH_EDITOR protected: UPROPERTY(VisibleAnywhere) USceneComponent* ThisScene; UPROPERTY(VisibleAnywhere) URuntimeMeshComponent* ThisMesh; UPROPERTY(VisibleAnywhere) UBoxComponent* ThisCollision; virtual void PostActorCreated() override; virtual void PostLoad() override; void GenerateMesh(); private: TArray<FVector> Vertices; TArray<int32> Triangles; TArray<FVector> Normals; TArray<FRuntimeMeshTangent> Tangents; TArray<FVector2D> UVs; TArray<FColor> Colors; void AddQuadMesh(FVector TopLeft, FVector BottomLeft, FVector TopRight, FVector BottomRight, int32& TriIndex);//when you don t know the normals or tangents, wing it void AddQuadMesh(FVector TopLeft, FVector BottomLeft, FVector TopRight, FVector BottomRight, int32& TriIndex, FRuntimeMeshTangent Tangent); void AddTriangleMesh(FVector Point1, FVector Point2, FVector Point, int32& TriIndex, FRuntimeMeshTangent Tangent); void AddTriangle(int32 P1, int32 p2, int32 p3); void AddTriangle(int32 A, int32 B, int32 C, int32 D); virtual void NotifyActorBeginOverlap(AActor* OtherActor); virtual void NotifyActorEndOverlap(AActor* OtherActor); };
The Online Teacher Resource Receive free lesson plans, printables, and worksheets by email: - Over 400 Pages - Great Writing Habits. - Character Sketches, Plot Summaries - Excellent for students Age Range: Kindergarten through Grade 2 (Early Elementary or Primary Level) Overview and Purpose : In this activity, students imagine what they would like to have fall from the sky every day and describe what happens when too much of it falls at once. Objective: The student will be able to write a short story and draw a picture of what favorite item they would like to have fall from the sky every day. Drawing paper/writing paper Read Cloudy with a Chance of Meatballs to your students. Talk about what happened to the town. Have your students write a short story about what they would like to have fall from the sky everyday and what would happen if it got out of control. When they are finished writing, have them draw a picture of their story. Have the students share their stories with the class when they are finished. This activity can also be done in small groups. The students can decide on one thing they would like to have fall from the sky and then tell their story.
#include "FFMatrixBlock.h" #include "PDBDebug.h" #include "PartitionTensorBlockSharedPageIterator.h" #include "FFMatrixBlockIndex.h" namespace pdb { /** * To create a new PartitionTensorBlockSharedPageIterator instance */ PartitionTensorBlockSharedPageIterator::PartitionTensorBlockSharedPageIterator(PageCachePtr cache, PartitionedFilePtr fileOfSharingSet, PartitionedFilePtr fileOfSharedSet, FilePartitionID partitionIdOfSharedSet, SharedFFMatrixBlockSetPtr sharedSet, DatabaseID dbIdOfSharingSet, UserTypeID typeIdOfSharingSet, SetID setIdOfSharingSet) { this->cache = cache; this->fileOfSharingSet = fileOfSharingSet; this->fileOfSharedSet = fileOfSharedSet; this->partitionId = partitionIdOfSharedSet; this->sharedSet = sharedSet; this->dbIdOfSharingSet = dbIdOfSharingSet; this->typeIdOfSharingSet = typeIdOfSharingSet; this->setIdOfSharingSet = setIdOfSharingSet; this->sharedPageMap = this->fileOfSharingSet->getSharedPageMap(partitionId); this->it = sharedPageMap->begin(); this->numPages = sharedPageMap->size(); this->numIteratedPages = 0; std::cout << "PartitionTensorBlockSharedPageIterator: " << numPages << " to scan in partition-" << partitionId << std::endl; } /** * To return the next page. If there is no more page, return nullptr. */ PDBPagePtr PartitionTensorBlockSharedPageIterator::next() { PDBPagePtr pageToReturn; if (it != this->sharedPageMap->end()) { PageID pageId = it->first; PageIndex pageIndex = it->second; std::cout << this->partitionId << ": PartitionedTensorBlockSharedPageIterator: curTypeId=" << this->fileOfSharedSet->getTypeId() << ",curSetId=" << this->fileOfSharedSet->getSetId() << ",curPageId=" << pageId << ",partitionId="<<pageIndex.partitionId << ",pageSeqId=" << pageIndex.pageSeqInPartition << "\n"; pageToReturn = cache->getPage(this->fileOfSharedSet, pageIndex.partitionId, pageIndex.pageSeqInPartition, pageId, false, nullptr); //MODIFY THE BLOCK's METADATA HERE //Fetch the vector Record<Vector<Handle<FFMatrixBlock>>>*myRec = (Record<Vector<Handle<FFMatrixBlock>>>*)pageToReturn->getBytes(); Handle<Vector<Handle<FFMatrixBlock>>> iterateOverMe = myRec->getRootObject(); for (int i = 0; i < iterateOverMe->size(); i++) { Handle<FFMatrixBlock> block = (*iterateOverMe)[i]; //we borrow the totalRows field to store the static blockRowId, and the totalCols field to store the static blockColId Handle<FFMatrixMeta> targetMeta = sharedSet->getTargetMetadata(dbIdOfSharingSet, typeIdOfSharingSet, setIdOfSharingSet, block->meta->distinctBlockId); if(targetMeta != nullptr) { block->meta->blockRowIndex = targetMeta->blockRowIndex; block->meta->blockColIndex = targetMeta->blockColIndex; block->meta->totalRows = targetMeta->totalRows; block->meta->totalCols = targetMeta->totalCols; } else { std::cout << "ERROR: I didn't find this block with Id=" << block->meta->distinctBlockId << std::endl; block->meta->blockRowIndex = -1; block->meta->blockColIndex = -1; block->meta->totalRows = 0; block->meta->totalCols = 0; } } this->numIteratedPages++; it++; } return pageToReturn; } /** * If there is more page, return true, otherwise return false. */ bool PartitionTensorBlockSharedPageIterator::hasNext() { if ((it != this->sharedPageMap->end())&&(this->numIteratedPages < numPages)) { return true; } else { return false; } } }
#ifndef HTTP_SERVER_H__ #define HTTP_SERVER_H__ #include <sstream> #include <thread> #include <memory> #include <boost/asio.hpp> #include <boost/array.hpp> #include "LeaseSet.h" #include "Streaming.h" namespace i2p { namespace util { const size_t HTTP_CONNECTION_BUFFER_SIZE = 8192; const int HTTP_DESTINATION_REQUEST_TIMEOUT = 10; // in seconds class HTTPConnection: public std::enable_shared_from_this<HTTPConnection> { protected: struct header { std::string name; std::string value; }; struct request { std::string method; std::string uri; std::string host; int port; int http_version_major; int http_version_minor; std::vector<header> headers; }; struct reply { std::vector<header> headers; std::string content; std::vector<boost::asio::const_buffer> to_buffers (int status); }; public: HTTPConnection (boost::asio::ip::tcp::socket * socket): m_Socket (socket), m_Timer (socket->get_io_service ()), m_Stream (nullptr), m_BufferLen (0) {}; ~HTTPConnection() { delete m_Socket; } void Receive (); private: void Terminate (); void HandleReceive (const boost::system::error_code& ecode, std::size_t bytes_transferred); void AsyncStreamReceive (); void HandleStreamReceive (const boost::system::error_code& ecode, std::size_t bytes_transferred); void HandleWriteReply(const boost::system::error_code& ecode); void HandleWrite (const boost::system::error_code& ecode); void SendReply (const std::string& content, int status = 200); void HandleRequest (const std::string& address); void HandleCommand (const std::string& command, std::stringstream& s); void ShowTransports (std::stringstream& s); void ShowTunnels (std::stringstream& s); void ShowTransitTunnels (std::stringstream& s); void ShowLocalDestinations (std::stringstream& s); void ShowLocalDestination (const std::string& b32, std::stringstream& s); void ShowSAMSessions (std::stringstream& s); void ShowSAMSession (const std::string& id, std::stringstream& s); void StartAcceptingTunnels (std::stringstream& s); void StopAcceptingTunnels (std::stringstream& s); void FillContent (std::stringstream& s); std::string ExtractAddress (); void ExtractParams (const std::string& str, std::map<std::string, std::string>& params); protected: boost::asio::ip::tcp::socket * m_Socket; boost::asio::deadline_timer m_Timer; std::shared_ptr<i2p::stream::Stream> m_Stream; char m_Buffer[HTTP_CONNECTION_BUFFER_SIZE + 1], m_StreamBuffer[HTTP_CONNECTION_BUFFER_SIZE + 1]; size_t m_BufferLen; request m_Request; reply m_Reply; protected: virtual void RunRequest (); void HandleDestinationRequest(const std::string& address, const std::string& uri); void SendToAddress (const std::string& address, int port, const char * buf, size_t len); void HandleDestinationRequestTimeout (const boost::system::error_code& ecode, i2p::data::IdentHash destination, int port, const char * buf, size_t len); void SendToDestination (std::shared_ptr<const i2p::data::LeaseSet> remote, int port, const char * buf, size_t len); public: static const std::string itoopieImage; static const std::string itoopieFavicon; }; class HTTPServer { public: HTTPServer (int port); virtual ~HTTPServer (); void Start (); void Stop (); private: void Run (); void Accept (); void HandleAccept(const boost::system::error_code& ecode); private: std::thread * m_Thread; boost::asio::io_service m_Service; boost::asio::io_service::work m_Work; boost::asio::ip::tcp::acceptor m_Acceptor; boost::asio::ip::tcp::socket * m_NewSocket; protected: virtual void CreateConnection(boost::asio::ip::tcp::socket * m_NewSocket); }; } } #endif
/* The authors of this work have released all rights to it and placed it in the public domain under the Creative Commons CC0 1.0 waiver (http://creativecommons.org/publicdomain/zero/1.0/). THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. Retrieved from: http://en.literateprograms.org/Median_cut_algorithm_(C_Plus_Plus)?oldid=19175 */ #include <limits> #include <queue> #include <algorithm> #include <_library/library.color.mediancut.h> Block::Block(Point* points, int pointsLength) { this->points = points; this->pointsLength = pointsLength; for(int i=0; i < NUM_DIMENSIONS; i++) { minCorner.x[i] = std::numeric_limits<unsigned char>::min(); maxCorner.x[i] = std::numeric_limits<unsigned char>::max(); } } Point * Block::getPoints() { return points; } int Block::numPoints() const { return pointsLength; } int Block::longestSideIndex() const { int m = maxCorner.x[0] - minCorner.x[0]; int maxIndex = 0; for(int i=1; i < NUM_DIMENSIONS; i++) { int diff = maxCorner.x[i] - minCorner.x[i]; if (diff > m) { m = diff; maxIndex = i; } } return maxIndex; } int Block::longestSideLength() const { int i = longestSideIndex(); return maxCorner.x[i] - minCorner.x[i]; } bool Block::operator<(const Block& rhs) const { return this->longestSideLength() < rhs.longestSideLength(); } void Block::shrink() { int i,j; for(j=0; j<NUM_DIMENSIONS; j++) { minCorner.x[j] = maxCorner.x[j] = points[0].x[j]; } for(i=1; i < pointsLength; i++) { for(j=0; j<NUM_DIMENSIONS; j++) { minCorner.x[j] = std::min(minCorner.x[j], points[i].x[j]); maxCorner.x[j] = std::max(maxCorner.x[j], points[i].x[j]); } } } std::vector<Point> medianCut(Point* image, int numPoints, unsigned int desiredSize) { std::priority_queue<Block> blockQueue; Block initialBlock(image, numPoints); initialBlock.shrink(); blockQueue.push(initialBlock); while (blockQueue.size() < desiredSize) { Block longestBlock = blockQueue.top(); blockQueue.pop(); Point * begin = longestBlock.getPoints(); Point * median = longestBlock.getPoints() + (longestBlock.numPoints()+1)/2; Point * end = longestBlock.getPoints() + longestBlock.numPoints(); switch(longestBlock.longestSideIndex()) { case 0: std::nth_element(begin, median, end, CoordinatePointComparator<0>()); break; case 1: std::nth_element(begin, median, end, CoordinatePointComparator<1>()); break; case 2: std::nth_element(begin, median, end, CoordinatePointComparator<2>()); break; } Block block1(begin, median-begin), block2(median, end-median); block1.shrink(); block2.shrink(); blockQueue.push(block1); blockQueue.push(block2); } std::vector<Point> result{ blockQueue.size() }; while(!blockQueue.empty()) { Block block = blockQueue.top(); blockQueue.pop(); Point * points = block.getPoints(); int sum[NUM_DIMENSIONS] = {0}; for(int i=0; i < block.numPoints(); i++) for(int j=0; j < NUM_DIMENSIONS; j++) sum[j] += points[i].x[j]; Point averagePoint; for(int j=0; j < NUM_DIMENSIONS; j++) averagePoint.x[j] = sum[j] / block.numPoints(); result.push_back(averagePoint); } return result; }
Arnold Henry Guyot ||This article includes a list of references, related reading or external links, but its sources remain unclear because it lacks inline citations. (June 2012)| |Arnold Henry Guyot| Arnold Henry Guyot |Born||September 28, 1807 Boudevilliers, Canton of Neuchâtel, Switzerland |Died||February 8, 1884 Princeton, New Jersey, United States Guyot was born at Boudevilliers, near Neuchâtel, Switzerland. He was educated at Chaux-de-Fonds, then at the college of Neuchâtel. In 1825, he went to Germany, and resided in Karlsruhe where he met Louis Agassiz, the beginning of a lifelong friendship. From Karlsruhe he moved to Stuttgart, where he studied at the gymnasium. He returned to Neuchâtel in 1827. He determined to enter the ministry and started at the University of Berlin to attend lectures. While pursuing his studies, he also attended lectures on philosophy and natural science. His leisure was spent in collecting shells and plants, and he received an entrée to the Berlin Botanical Garden from Humboldt. In 1835, he received the degree of Ph.D. from Berlin. In 1838, at Agassiz's suggestion, he visited the Swiss glaciers and communicated the results of his six weeks' investigation to the Geological Society of France. He was the first to point out certain important observations relating to glacial motion and structure. Among other things he noted the more rapid flow of the center than of the sides, and the more rapid flow of the top than of the bottom of glaciers; described the laminated or ribboned structure of the glacial ice; and ascribed the movement of glaciers to a gradual molecular displacement rather than to a sliding of the ice mass as held by de Saussure. He subsequently collected important data concerning erratic boulders. In 1839, he became the colleague of Agassiz as professor of history and physical geography at the College of Neuchâtel (a.k.a. Neuchâtel Academy?). The suspension of that institution in 1848 caused Guyot to emigrate, at Agassiz's instance, to the United States, where he settled in Cambridge, Massachusetts. He delivered a course of lectures at the Lowell Institute which were afterward published as Earth and Man (Boston 1853). For several years the Massachusetts Board of Education retained his services as a lecturer on geography and methods of instruction to the normal schools and teachers' institutes. He was occupied with this work until his appointment, in 1854, as professor of physical geography and geology at Princeton University, which office he retained until his death. He was also for several years lecturer on physical geography in the State Normal School in Trenton, New Jersey, and from 1861 to 1866 lecturer in the Princeton Theological Seminary. He also gave courses in the Union Theological Seminary, New York, and at Columbia College. He founded the museum at Princeton, many of the specimens of which are from his own collections. His scientific work in the United States included the perfection of plans for a national system of meteorological observations. Most of these were conducted under the auspices of the Smithsonian Institution. His extensive meteorological observations led to the establishment of the United States Weather Bureau, and his Meteorological and Physical Tables (1852, revised ed. 1884) were long standard. His graded series of text-books and wall-maps were important aids in the extension and popularization of geological study in America. In addition to text-books, his principal publications were: - Earth and Man, Lectures on Comparative Physical Geography in its Relation to the History of Mankind (translated by Cornelius Conway Felton, 1849) - A Memoir of Louis Agassiz (1883) - Creation, or the Biblical Cosmogony in the Light of Modern Science (1884). - Johnson’s New Universal Cyclopaedia (1876) - editor-in-chief along with Frederick Augustus Porter Barnard He is the namesake of several geographical features, including Guyot Glacier in Alaska, Mount Guyot on the North Carolina and Tennessee border, and a different Mount Guyot in New Hampshire, as well as Mount Guyot on the Rocky Mountain Continental Divide in Colorado. The building housing the Department of Ecology and Evolutionary Biology and the Department of Geosciences at Princeton is named Guyot Hall in his honor. - James Dwight Dana's Memoir in the Biographical Memoirs of the National Academy of Science, vol. ii. (Washington, 1886). - This article incorporates text from a publication now in the public domain: Chisholm, Hugh, ed. (1911). "Guyot, Arnold Henry". Encyclopædia Britannica (11th ed.). Cambridge University Press. - Beach, Chandler B., ed. (1914). "Guyot, Arnold". The New Student's Reference Work. Chicago: F. E. Compton and Co. - "Guyot, Arnold". Encyclopedia Americana. 1920. - Tables, Meteorological and Physical Prepared for the Smithsonian Institution (1858) - Tables, Meteorological and Physical Prepared for the Smithsonian Institution (1884) - Directions for meteorological observations, and the registry of periodical phenomena (1860) - Physical Geography (1873) - The earth and man: lectures on comparative physical geography, in its relation to the history of mankind (1860). - National Academy of Sciences Biographical Memoir
The Winter War The Winter War was fought between Finland and Russia between November 1939 and March 1940. After the blitzkrieg attack on Poland by Germany, the Winter War was the only other major military campaign until Hitler unleashed blitzkrieg on western Europe  in the Spring of 1940. winter2Finnish infantry  When war broke out, the Finnish army was small. The country only had a population of 4 million and as a result of this, any army could only have been small. Finland could muster a small army of professionals. The country also had a peacetime army of conscripts which was boosted each year by an annual intake of new men. There was also a reserve which all conscripts passed into after a year’s service. Compared to the vast potential resources of the Red Army, the Finnish Army was dwarfed. In time of war, it was planned by Mannerheim that the peacetime army should act as a covering force to delay any attack until the reservists got to the front. The army was also short of equipment including uniforms and modern artillery pieces – the army only had 112 decent anti-tank guns at the start of the war. The means of producing modern weaponry was also short of the standards of Western European countries. Basic things such as ammunition could not be produced in large quantities and the army’s communication system was basic, relying in part on runners. From whatever angle the Finnish army was looked at, it seemed an easy victim for the Russians. However, in one sense the Finnish Army was in an excellent position to defend its nation. Finnish troops were trained to use their own terrain to their advantage. Finnish troops were well suited to the forests and snow-covered regions of Finland and they knew the lay of the land. Finnish ski troops were highly mobile and well trained. However, these men were used to working in small units and large scale manoeuvres were alien not only to them but to the officers in command of them. Money simply had not been spent in Finland prior to 1939 for many large-scale military training exercises. However, as it became more and more obvious that a conflict with the Russians was likely, patriotism took a firm hold and no-one was prepared to tolerate a Russian invasion of their homeland. To go with the army, the Finnish Navy was small and the Finnish air force only had 100 planes but some of these were incapable of being flown in battle. The Russian army was completely different. However, in September 1939, Russia had committed a number of men to the Polish campaign. But with 1,250,000 men in the regular army, there were many more Stalin could call on. For the Winter War, Russia used 45 divisions – each division had 18,000 men; so by that reckoning Russia used 810,000 men; nearly 25% of the whole of Finland’s population. In fact, for the whole duration of the war, the Russians used 1,200,000 men in total in some form of military capacity. The Russians also used 1,500 tanks and 3,000 planes. Whereas the Finns had difficulty supplying her troops with ammunition, the Russians had an unlimited supply and a vastly superior system of communications. But the Russian army had two major weaknesses. It was used to war games on large expanses of open ground. The snow covered forests of Finland were a different matter and the Russians were to find that they were frequently confined to the area around roads as many of their men were unused to Finland’s terrain. Their tactics developed during training did not include such terrain. The Russian Army also had another fundamental weakness: its command structure was so rigid that military commanders in the field would not make a decision without the approval of a higher officer who usually had to get permission from a political commissar that his tactics were correct. Such a set-up created delays in decision-making. Therefore the leviathan that was the Russian Army in late 1939, was frequently a slow moving dinosaur hindered by both the geography of Finland and its rigidity in terms of decision making. Whereas Blitzkrieg had been designed to incorporate all aspects of Germany’s army and air force, each part of the Russian army acted as separate entities. Whether this was a result of the purges in the military which decimated its officer corps or a result of fear of taking a decision that was unacceptable to higher authorities is difficult to know: probably it was a combination of both. The Red Army was ill-equipped for a winter war. Whereas the army was well supplied with standard military equipment, it had little that was required for the snow-covered forests of Finland. White camouflage clothing was not issued and vehicles simply could not cope with the cold. The winter of 1939-40 was particularly severe. The Russians were also forced to fight on a small front despite the sheer size of the Russian-Finnish border. Many parts of the 600 miles border were simply impassable, so the Finns had a good idea as to the route any Russian force might take. The Russian air force was also limited in the amount of time it could help the army because the days were so short during the winter months. When they did fly, the Russians took heavy casualties, losing 800 planes during the war – over 25% of the planes used in the war. The Finnish High Command, led by Mannerheim, believed that the only weak spot they had was in the Karelian Isthmus. This area was fortified with the Mannerheim Line – a complex of trenches, wire, mine fields and obstacles. Concrete emplacements were built but they were few and far between with each emplacement having little ability to give any other covering fire. In no way could the Mannerheim Line compare to the Maginot Line. The war started on November 30th. The initial stages of the war went to the Finns plan as they held up the first advances of the Red Army in the Karelian Isthmus. The Finnish troops also picked up valuable experience of fighting tanks; in this the Russians all but assisted the Finns as the tanks of the Russians operated separate to the infantry and the Finns found it relatively easy to pick off individually operating tanks. The Finns had less success around the northern shores of Lake Lagoda where the Russians did make gains. However, by mid-December, the Russians had been held in all areas and a stalemate took place. The main worry for Mannerheim was that he had already used up 50% of his reserves. Despite this, the Finns felt confident enough to launch a counter-attack against the Russians on December 27th. It lasted until December 30th when it became apparent that it was not going to be successful as the Russians had dug in well and the Finnish troops were unused to large scale offensive campaigns. So by the end of the year, an effective stalemate had occurred in all areas – but Finnish military commanders were aware that their reserves were fast dwindling. The winter in January 1940 meant that little military action of value took place. What the Finns perfected, though, was a tactic in attacking Russian convoys. The Finns knew that Russian vehicles had to stay on the road. They therefore used their knowledge of the terrain to get behind the convoy and attack from the sides and from the rear thus blocking off any form of Russian retreat. The Russians then had to dig in (the Finns called these positions ‘mottis’) where they fought back. Some of the mottis were so big that the Russian troops held out in them until the end of the war. Other smaller ones were ruthlessly destroyed. Though the Finns did not achieve a major victory at this time, their victory at Summosalmi did a great deal to boost the nation’s morale. However, on February 1st, the Russians launched a major offensive. Aware that they had not been successful up to the end of December, the Russians had started preparing for a major assault on December 26th when they essentially started creating a new army for the Finnish front. On December 28th, an order was given that no more mass frontal assaults were to be allowed as they had proved to be very costly in terms of men lost. Instead the Russians adopted a step-by-step advance tactic that was preceded by a massive artillery bombardment which was intended to smash any concrete emplacements that the Finns had built. One month was spent practicing this tactic combining infantry, tanks and artillery. On January 7th 1940, Marshall Timoshenko was given command of the Russian Army in Finland. On January 15th Russia started a systematic artillery bombardment of Finland’s defences in the Karelian Isthmus. The Russians had a free hand in this as their artillery guns were more powerful than Finland’s and so could fire at Finnish positions in the Isthmus but were out of range from any Finnish attack. Also with complete mastery of the air, Russian gunners were given specific co-ordinates to aim for. The main Russian attack came on February 1st. The Finns had six divisions (about 85,000 men) at the front and three in reserve positions. However, two of the reserve divisions were newly created and had no experience of combat. The Russians had learned their lessons from the previous two months. Tanks attacked first with infantry literally in tow as many tanks pulled along infantry soldiers on sledges. The tanks placed themselves in front of the Finnish bunkers therefore protecting the infantry soldiers. The usual tactic of the Finns against this was to evacuate all fortified emplacements during the day and return to them at night once the Russians had moved back. During the night, the bunkers would be repaired. However, this was exhausting work and wore down the Finnish defenders. The Russians used a policy of attacking for three days and then pausing for 24 hours before attacking again for another three days. On February 11th, the Russians made an expected breakthrough at Summa in the Karelian Isthmus. The Mannerheim Line was broken at this point. “The breakthrough at Summa was the military turning point of the war. The reasons for it are complex. There were mistakes in that the structure of the defences, particularly in placing the bunkers so that they could not support one another and so could be eliminated individually. The careful planning of the Russian attacks exploited this weakness to the fullest.” A Upton The Russians simply wore down the defenders and exhaustion was a major factor in why the front line at Summa collapsed. By February 17th, those survivors at Summa had withdrawn from the Mannerheim Line. On February 25th, the Finns attempted a counter-attack using the remaining fifteen tanks that they possessed. Ironically, as these tanks advanced to the front line to support the infantry, they caused panic among many Finnish troops who did not know that Finland had any tanks – they assumed that they were Russian tanks that had got behind them in an encircling movement. The counter-attack failed. Wary of previous problems encountered in Finland, the Russians advanced steadily. However, they did advance and the Finns had to retreat despite the cautious approach of the Russians. By March 13th, the Finns were in retreat.   “The general military position on March 13th was roughly as follows. The Russian offensive on the isthmus showed no sign of slackening.” Upton By mid-March the troops in the Finnish army were exhausted. However, the Russians seemed disinclined to pursue them – the doctrine of step-by-step established in December 1939, still dominated tactics, as did a healthy respect for the Finnish army. A peace settlement was not long in coming. If the Russians had fully broken through the Karelian Isthmus, Helsinki was less than 200 miles away. If the Finnish army had been destroyed, nothing would have been in the way to stop the Russian army. In fact peace talks had been going on while Russia had made military gains. The Finns had been told the precise terms the Russians wanted on February 23rd. The Russians wanted:   A 30-year lease of Hanko.   The cessation of the whole of the Karelian Isthmus and the shores of Lake Lagoda on the Finnish side.    In return, the Russians would evacuate the Petsamo area. The Finnish government was unwilling to negotiate on these terms. However, the declining military situation meant that they were not in a position to do so. The hope of military assistance from Britain and France failed to materialise. In all senses, the Finns were by themselves. Sweden urged Finland to accept the Russian demands. The Russians had set March 1st as a deadline for negotiations. With the ever decreasing military situation confronting them, the Finnish government saw no alternative to acceptance. The March 1st deadline passed but the Finnish government was assured that the terms still stood and that the deadline had been extended. On March 6th, a Finnish delegation left for Moscow. Talks opened on March 8th. The Russians, led by Molotov, now demanded more land than their earlier terms. The Finns were outraged but could do little about this because of their poor military situation. On March 12th, the Finnish government gave its permission for the delegation to accept the terms. On March 13th, the Treaty of Moscow was signed and hostilities ceased at 11 a.m. The Russians defended their actions by stating that their newly acquired land would give them military protection and security. In particular, Leningrad would be better protected. Why didn’t Stalin simply order his vastly superior army to continue conquering Finland after the fall of the Karelian Isthmus? The answer is not known for sure but it is thought that Stalin was looking at the bigger picture – seeing that  a war against Nazi Germany was unavoidable, the campaign in Finland may well have been seen as a distraction taking up valuable troops. There is no doubt that Russia decisively won the war but at great cost. The Russians admitted that 48,000 of their men were killed and 158,000 wounded. The Finns put the Russian casualties much higher. Also the Russians lost many tanks and planes. However, Russia could accommodate such manpower losses and the greatest value it got from the war was the experience of fighting a modern war.
From Wikipedia, the free encyclopedia Preventive medicine or preventive care refers to measures taken to prevent diseases, (or injuries) rather than curing them or treating their symptoms. The term contrasts in method with curative and palliative medicine, and in scope with public health methods (which work at the level of population health rather than individual health). This takes place at primary, secondary and tertiary prevention levels. - Primary prevention avoids the development of a disease. Most population-based health promotion activities are primary preventive measures. - Secondary prevention activities are aimed at early disease detection, thereby increasing opportunities for interventions to prevent progression of the disease and emergence of symptoms. - Tertiary prevention reduces the negative impact of an already established disease by restoring function and reducing disease-related complications. - Quaternary prevention is the set of health activities that mitigate or avoid the consequences of unnecessary or excessive interventions in the health system. Simple examples of preventive medicine include hand washing and immunizations. Preventive care may include examinations and screening tests tailored to an individual's age, health, and family history. For example, a person with a family history of certain cancers or other diseases would begin screening at an earlier age and/or more frequently than those with no family history. On the other side of preventive medicine, some non-profit organizations, such as the Northern California Cancer Center, apply epidemiological research towards finding ways to prevent diseases. Universal, selective, and indicated Gordon (1987) in the area of disease prevention, and later Kumpfer and Baxley in the area of substance use proposed a three-tiered preventive intervention classification system: universal, selective, and indicated prevention. Amongst others, this typology has gained favour and is used by the U.S. Institute of Medicine, the NIDA and the European Monitoring Centre for Drugs and Drug Addiction. - Universal prevention addresses the entire population (national, local community, school, district) and aim to prevent or delay the abuse of alcohol, tobacco, and other drugs. All individuals, without screening, are provided with information and skills necessary to prevent the problem. - Selective prevention focuses on groups whose risk of developing problems of alcohol abuse or dependence is above average. The subgroups may be distinguished by characteristics such as age, gender, family history, or economic status. For example, drug campaigns in recreational settings. - Indicated prevention involves a screening process, and aims to identify individuals who exhibit early signs of substance abuse and other problem behaviours. Identifiers may include falling grades among students, known problem consumption or conduct disorders, alienation from parents, school, and positive peer groups etc. Outside the scope of this three-tier model is environmental prevention. Environmental prevention approaches are typically managed at the regulatory or community level, and focus on interventions to deter drug consumption. Prohibition and bans (e.g. smoking workplace bans, alcohol advertising bans) may be viewed as the ultimate environmental restriction. However, in practice environmental preventions programmes embrace various initiatives at the macro and micro level, from government monopolies for alcohol sales, through roadside sobriety or drug tests, worker/pupil/student drug testing, increased policing in sensitive settings (near schools, at rock festivals), and legislative guidelines aimed at precipitating punishments (warnings, penalties, fines). Professionals involved in the public health aspect of this practice may be involved in entomology, pest control, and public health inspections. Public health inspections can include recreational waters, pools, beaches, food preparation and serving, and industrial hygiene inspections and surveys. In the United States, preventive medicine is a medical specialty, one of the 24 recognized by the American Board of Medical Specialties (ABMS). It encompasses three areas of specialization: - General preventive medicine and public health - Aerospace medicine - Occupational medicine In order to become board-certified in one of the preventive medicine areas of specialization, a licensed U.S. physician (M.D. or D.O.) must successfully complete a preventive medicine medical residency program following a one-year internship. Following that, the physician must complete a year of practice in that special area and pass the preventive medicine board examination. The residency program is at least two years in length and includes completion of a master's degree in public health (MPH) or equivalent. The board exam takes an entire day: the morning session concentrates on general preventive medicine questions, while the afternoon session concentrates on the one of the three areas of specialization that the applicant has studied. In addition, there are two subspecialty areas of certification: These certifications require sitting for an examination following successful completion of an MT or UHB fellowship and prior board certification in one of the 24 ABMS-recognized specialties. Prophylaxis (Greek "προφυλάσσω" to guard or prevent beforehand) is any medical or public health procedure whose purpose is to prevent, rather than treat or cure a disease. In general terms, prophylactic measures are divided between primary prophylaxis (to prevent the development of a disease) and secondary prophylaxis (whereby the disease has already developed and the patient is protected against worsening of this process). Some specific examples of prophylaxis include: - Influenza vaccines are prophylactic. - Antibiotics are sometimes used prophylactically: For example, during the 2001 anthrax attacks scare in the United States, patients believed to be exposed were given ciprofloxacin. In similar manner, the use of antibiotic ointments on burns and other wounds is prophylactic. Antibiotics are also given prophylactically just before some medical procedures such as pacemaker insertion. - Tricyclic antidepressants (TCAs) may, with caution, be an example of a chronic migraine preventative (see Amitriptyline and migraines' prevention by medicine). - Antimalarials such as chloroquine are used both in treatment and as prophylaxis by visitors to countries where malaria is endemic to prevent the development of the parasitic Plasmodium, which cause malaria. - Condoms are sometimes referred to as "prophylactics" because of their use to prevent the transmission of sexually transmitted infections. - Low-molecular-weight heparin is used as a prophylaxis in hospital patients, as they are at risk for several forms of thrombosis due to their immobilisation. - Professional cleaning of the teeth is dental prophylaxis. - Risk Reducing or Prophylactic Mastectomies may be carried out for carriers of the BRCA mutation gene to minimise the risk of developing Breast Cancer - Daily and moderate physical exercise in various forms can be called prophylactic because it can maintain or improve one's health. Cycling for transport appears to very significantly improve health by reducing risk of heart diseases, various cancers, muscular- and skeletal diseases, and overall mortality. - Prophylaxis may be administered as vaccine. Prophylactic vaccines include: PEP, nPEP, PREP, or nPREP. PEP stands for post-exposure prophylaxis used in an occupational setting. nPEP is non-occupational post-exposure prophylaxis. nPEP may be used in a recreational setting; for example, during intercourse, if the condom breaks and one partner is HIV-positive, nPEP will help to decrease the probability of spread of infection of HIV. PREP is often used in occupational settings, e.g., in hospital staff to prevent the spread of HIV or Hepatitis C from patient to staff. nPREP is a measure taken before exposure but in a non-occupational setting (non-occupational Pre-exposure prophylaxis); for example, injection drug users may seek nPREP vaccinations. Leading cause of preventable death Leading causes of preventable death worldwide as of the year 2001. Leading causes of preventable deaths in the United States in the year 2000. - ^ MeSH Preventive+Medicine - ^ MeSH Primary+Prevention - ^ MeSH Secondary+Prevention - ^ MeSH Tertiary+Prevention - ^ Gordon, R. (1987), ‘An operational classification of disease prevention’, in Steinberg, J. A. and Silverman, M. M. (eds.), Preventing Mental Disorders, Rockville, MD: U.S. Department of Health and Human Services, 1987. - ^ Kumpfer, K. L., and Baxley, G. B. (1997), 'Drug abuse prevention: What works?', National Institute on Drug Abuse, Rockville. - ^ How should influenza prophylaxis be implemented? - ^ de Oliveira JC, Martinelli M, D'Orio Nishioka SA, et al. (2009). "Efficacy of antibiotic prophylaxis prior to the implantation of pacemakers and cardioverter-defibrillators: Results of a large, prospective, randomized, double-blinded, placebo-controlled trial". Circ Arrhythmia Electrophysiol 2: 29–34. doi:10.1161/CIRCEP.108.795906. - ^ Lars Bo Andersen et al. (June 2000). "All-cause mortality associated with physical activity during leisure time, work, sports, and cycling to work.". Arch Intern Med. 160 (11): 1621–8. doi:10.1001/archinte.160.11.1621. PMID 10847255. - ^ Lopez AD, Mathers CD, Ezzati M, Jamison DT, Murray CJ (May 2006). "Global and regional burden of disease and risk factors, 2001: systematic analysis of population health data". Lancet 367 (9524): 1747–57. doi:10.1016/S0140-6736(06)68770-9. PMID 16731270. - ^ Mokdad AH, Marks JS, Stroup DF, Gerberding JL (March 2004). "Actual causes of death in the United States, 2000". JAMA 291 (10): 1238–45. doi:10.1001/jama.291.10.1238. PMID 15010446. http://www.csdp.org/research/1238.pdf. - Sackett DL. The arrogance of preventive medicine. CMAJ. 2004;167:363-4. - Gérvas J, Pérez Fernández M. Los límites de la prevención clínica. AMF. 2007; 3(6):352-60. - Gérvas J, Pérez Fernández M, González de Dios J. Problemas prácticos y éticos de la prevención secundaria. A propósito de dos ejemplos de pediatría. Rev Esp Salud Pública. 2007;81:345-52. - Starfield B, Hyde J, Gérvas J, Heath I. The concept of prevention: a good idea gone astray? J Epidemiol Community Health. 2008;62(7):580-3. - Gérvas J, Starfield B, Heath I. Is clinical prevention better than cure? Lancet. 2008;372:1997-9. - Gérvas J, Pérez Fernández M. Los daños provocados por la prevención y por las actividades preventivas. RISAI. 2009; 1(4). - Gérvas J. Abuso de la prevención clínica. El cribaje del cáncer de mama como ejemplo. Rev Espaço Saùde. 2009; 11(1):49-53. - Gérvas J, Heath I, Durán A, Gené J; Members of the Seminar of Primary Health Innovation 2008. Clinical prevention: patients' fear and the doctor's guilt. Eur J Gen Pract. 2009; 15(3):122-4.
Polish second most spoken language Polish is the second most common main language in England and Wales with more than half a million speakers, according to new figures from the 2011 Census. Nearly one in 10 people in England and Wales - 8% - reported speaking a different main language to English or Welsh in the census, findings from the Office for National Statistics (ONS) have shown. Polish was the second most commonly reported main language with 546,000 speakers, reflecting more than half a million Poles who migrated to England and Wales during the last decade. Redcar and Cleveland local authority had the highest percentage of people with English as their main language at 99% of the population, with Ealing listing the highest proportion of Polish speakers at 6% of the population. In all but three of the London boroughs - the City of London, Richmond Upon Thames, and Hillingdon - more than 100 languages were listed as main languages. Of the four million residents of England and Wales who spoke a main language other than English, 1.7 million said they could speak English very well, 726,000 could speak English but not well and 138,000 could not speak English at all. The least common main language in England and Wales was listed as Manx-Gaelic with 33 speakers, followed by 58 Gaelic Scottish speakers. London had the highest proportion, at 22%, of people who reported that English was not their main language, with the North East reporting the lowest percentage in this category, at 3%. The figures also showed that not all languages were spoken - with 22,000 people using sign language. The census also appeared to confirm a boom in cycling in London, with 161,700 people, or 2.6%, using bicycles to get to work in the capital. This compared with 77,000 a decade ago, the ONS said, but these figures were not strictly comparable as the 2001 figures did not include those who said they worked from home. Cambridge remained the local authority with the highest proportion who cycle to work, at 18%, or 17,755 people. In spite of the surge in cycling, the majority of 16 to 74-year-olds in England and Wales said they drove a car or van to work, at 58% or 15 million.
// Copyright 2017 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "third_party/blink/renderer/core/paint/ng/ng_paint_fragment_traversal.h" #include "testing/gmock/include/gmock/gmock.h" #include "third_party/blink/renderer/core/layout/layout_block_flow.h" #include "third_party/blink/renderer/core/paint/ng/ng_paint_fragment.h" #include "third_party/blink/renderer/core/testing/core_unit_test_helper.h" namespace blink { using testing::ElementsAreArray; class NGPaintFragmentTraversalTest : public RenderingTest, private ScopedLayoutNGForTest { public: NGPaintFragmentTraversalTest() : RenderingTest(nullptr), ScopedLayoutNGForTest(true) {} protected: void SetUpHtml(const char* container_id, const char* html) { SetBodyInnerHTML(html); layout_block_flow_ = To<LayoutBlockFlow>(GetLayoutObjectByElementId(container_id)); root_fragment_ = layout_block_flow_->PaintFragment(); } const NGPaintFragment::ChildList RootChildren() const { return root_fragment_->Children(); } Vector<const NGPaintFragment*> ToDepthFirstList( NGPaintFragmentTraversal* traversal) const { Vector<const NGPaintFragment*> results; for (; *traversal; traversal->MoveToNext()) { const NGPaintFragment& fragment = **traversal; results.push_back(&fragment); } return results; } Vector<const NGPaintFragment*> ToReverseDepthFirstList( NGPaintFragmentTraversal* traversal) const { Vector<const NGPaintFragment*> results; for (; *traversal; traversal->MoveToPrevious()) { const NGPaintFragment& fragment = **traversal; results.push_back(&fragment); } return results; } Vector<NGPaintFragment*, 16> ToList( const NGPaintFragment::ChildList& children) { Vector<NGPaintFragment*, 16> list; children.ToList(&list); return list; } LayoutBlockFlow* layout_block_flow_; const NGPaintFragment* root_fragment_; }; TEST_F(NGPaintFragmentTraversalTest, MoveToNext) { if (RuntimeEnabledFeatures::LayoutNGFragmentItemEnabled()) return; SetUpHtml("t", R"HTML( <div id=t> line0 <span style="background: red">red</span> <br> line1 </div> )HTML"); NGPaintFragmentTraversal traversal(*root_fragment_); NGPaintFragment* line0 = root_fragment_->FirstChild(); NGPaintFragment* line1 = ToList(root_fragment_->Children())[1]; NGPaintFragment* span = ToList(line0->Children())[1]; NGPaintFragment* br = ToList(line0->Children())[2]; EXPECT_THAT( ToDepthFirstList(&traversal), ElementsAreArray({line0, line0->FirstChild(), span, span->FirstChild(), br, line1, line1->FirstChild()})); } TEST_F(NGPaintFragmentTraversalTest, MoveToNextWithRoot) { if (RuntimeEnabledFeatures::LayoutNGFragmentItemEnabled()) return; SetUpHtml("t", R"HTML( <div id=t> line0 <span style="background: red">red</span> <br> line1 </div> )HTML"); NGPaintFragment* line0 = root_fragment_->FirstChild(); NGPaintFragment* span = ToList(line0->Children())[1]; NGPaintFragment* br = ToList(line0->Children())[2]; NGPaintFragmentTraversal traversal(*line0); EXPECT_THAT( ToDepthFirstList(&traversal), ElementsAreArray({line0->FirstChild(), span, span->FirstChild(), br})); } TEST_F(NGPaintFragmentTraversalTest, MoveToPrevious) { if (RuntimeEnabledFeatures::LayoutNGFragmentItemEnabled()) return; SetUpHtml("t", R"HTML( <div id=t> line0 <span style="background: red">red</span> <br> line1 </div> )HTML"); NGPaintFragmentTraversal traversal(*root_fragment_); NGPaintFragment* line0 = root_fragment_->FirstChild(); NGPaintFragment* line1 = ToList(root_fragment_->Children())[1]; NGPaintFragment* span = ToList(line0->Children())[1]; NGPaintFragment* br = ToList(line0->Children())[2]; traversal.MoveTo(*line1->FirstChild()); EXPECT_THAT( ToReverseDepthFirstList(&traversal), ElementsAreArray({line1->FirstChild(), line1, br, span->FirstChild(), span, line0->FirstChild(), line0})); } TEST_F(NGPaintFragmentTraversalTest, MoveToPreviousWithRoot) { if (RuntimeEnabledFeatures::LayoutNGFragmentItemEnabled()) return; SetUpHtml("t", R"HTML( <div id=t> line0 <span style="background: red">red</span> <br> line1 </div> )HTML"); NGPaintFragment* line0 = root_fragment_->FirstChild(); NGPaintFragment* span = ToList(line0->Children())[1]; NGPaintFragment* br = ToList(line0->Children())[2]; NGPaintFragmentTraversal traversal(*line0); traversal.MoveTo(*br); EXPECT_THAT( ToReverseDepthFirstList(&traversal), ElementsAreArray({br, span->FirstChild(), span, line0->FirstChild()})); } TEST_F(NGPaintFragmentTraversalTest, MoveTo) { if (RuntimeEnabledFeatures::LayoutNGFragmentItemEnabled()) return; SetUpHtml("t", R"HTML( <div id=t> line0 <span style="background: red">red</span> <br> line1 </div> )HTML"); NGPaintFragmentTraversal traversal(*root_fragment_); NGPaintFragment* line0 = root_fragment_->FirstChild(); NGPaintFragment* line1 = ToList(root_fragment_->Children())[1]; NGPaintFragment* span = ToList(line0->Children())[1]; NGPaintFragment* br = ToList(line0->Children())[2]; traversal.MoveTo(*span); EXPECT_EQ(span, &*traversal); EXPECT_THAT(ToDepthFirstList(&traversal), ElementsAreArray( {span, span->FirstChild(), br, line1, line1->FirstChild()})); } TEST_F(NGPaintFragmentTraversalTest, MoveToWithRoot) { if (RuntimeEnabledFeatures::LayoutNGFragmentItemEnabled()) return; SetUpHtml("t", R"HTML( <div id=t> line0 <span style="background: red">red</span> <br> line1 </div> )HTML"); NGPaintFragment* line0 = root_fragment_->FirstChild(); NGPaintFragment* span = ToList(line0->Children())[1]; NGPaintFragment* br = ToList(line0->Children())[2]; NGPaintFragmentTraversal traversal(*line0); traversal.MoveTo(*span); EXPECT_EQ(span, &*traversal); EXPECT_THAT(ToDepthFirstList(&traversal), ElementsAreArray({span, span->FirstChild(), br})); } TEST_F(NGPaintFragmentTraversalTest, InlineDescendantsOf) { if (RuntimeEnabledFeatures::LayoutNGFragmentItemEnabled()) return; SetUpHtml("t", "<ul>" "<li id=t style='position: absolute'>" "<span style='float: right'>float</span>" "<span style='position: absolute'>oof</span>" "text<br>" "<span style='display: inline-block'>inline block</span>" "</li>" "</ul>"); // Tests that floats, out-of-flow positioned and descendants of atomic inlines // are excluded. Vector<const NGPaintFragment*> descendants; for (const NGPaintFragment* fragment : NGPaintFragmentTraversal::InlineDescendantsOf(*root_fragment_)) descendants.push_back(fragment); ASSERT_EQ(6u, descendants.size()); // TODO(layout-dev): This list marker is not in any line box. Should it be // treated as inline? EXPECT_TRUE(descendants[0]->PhysicalFragment().IsListMarker()); EXPECT_TRUE(descendants[1]->PhysicalFragment().IsLineBox()); EXPECT_TRUE(descendants[2]->PhysicalFragment().IsText()); // "text" EXPECT_TRUE(descendants[3]->PhysicalFragment().IsText()); // "br" EXPECT_TRUE(descendants[4]->PhysicalFragment().IsLineBox()); EXPECT_TRUE(descendants[5]->PhysicalFragment().IsAtomicInline()); } } // namespace blink
HVAC Career Information T he world outdoors is often an uncomfortable place. Weather changes can bring precipitation, blustery winds, and extreme temperatures. That's why we turn to the shelter of indoor spaces. We rely on climate-controlled environments to carry out our lives comfortably and effectively. But it takes much more than just a few walls, a roof, and insulation to make it all happen. So, what is HVAC? What is HVAC and HVAC/R? HVAC stands for heating, ventilation, and air conditioning. The HVAC systems in our homes, offices, shopping malls, and other buildings allow us to live inside without too much concern for what's happening outside. But HVAC goes beyond the regulation of indoor temperatures. When such systems are properly installed and maintained, they contribute to better airflow and healthier indoor air quality, which is especially important for people with allergies, asthma, or other medical issues. In addition to heating, ventilation, and air conditioning, there is another type of climate-control technology that is crucial to modern life. The "R" in HVAC/R stands for refrigeration. The storage and transport of perishable foods, medicines, and other items we may take for granted is made possible by today's commercial refrigeration systems. (Side note: Don't be confused by the different ways in which the "R" is added to HVAC. The subtle variations you might encounter—HVAC&R, HVAC/R, HVACR, HVAC-R, or HVAC R—all mean the same thing.) Advances in HVAC technology are making the heating and cooling of new and retrofitted buildings more and more energy efficient. Refrigerants are being developed and used that are more environmentally friendly. And technologies such as hydronics (water-based heating), geothermal, and solar-powered heating and cooling are turning the HVAC profession into one with a growing number of "green" jobs. HVAC systems are installed and serviced by HVAC technicians (who are sometimes known as HVAC mechanics or HVAC installers). What Does an HVAC Technician Do? The work of an HVAC technician can be rather varied. From installation to routine maintenance to repair, the many duties of a professional in the heating, ventilation, and air conditioning industry often add up to working days full of diverse activities. However, a lot depends on whether or not an HVAC technician chooses to specialize in working with a particular type of equipment (i.e., residential, light commercial, or commercial/industrial) in either the installation or service side of the business. So, depending on their specialty, level of knowledge, and arsenal of skills, HVAC technicians carry out tasks that can include: - Installing furnaces, heat pumps, and air conditioning units - Installing the ductwork that carries treated air throughout a building - Following blueprints and specifications used in the installation of HVAC systems, including air ducts, vents, pumps, water and fuel supply lines, and other components - Connecting electrical wiring and controls - Performing routine maintenance on a variety of HVAC equipment, such as checking for leaks, adjusting blowers and burners, and checking nozzles, thermostats, electrical circuits, controls, and other components - Diagnosing and repairing problems that are found within any part of an HVAC system - Adjusting the controls of an HVAC system and recommending appropriate settings - Testing the performance of a furnace, heat pump, air conditioning unit or other piece of HVAC equipment to ensure that it operates at peak efficiency - Using carbon dioxide and carbon monoxide testers to make sure that a customer's equipment operates safely - Selling service contracts or replacement equipment to customers HVAC/R technicians, sometimes known as refrigeration mechanics, install and service commercial or industrial refrigeration systems. In addition to some of the tasks above, HVAC/R technicians have duties that can include: - Charging refrigeration systems with the proper refrigerant - Conserving, recovering, and recycling refrigerants for reuse or ensuring that they are disposed of properly since their release can be very harmful to the environment - Venting refrigerant into the appropriate cylinders To perform their duties, HVAC and HVAC/R technicians use a large variety of special tools (sometimes numbering in the dozens) such as: - Pressure gauges - Acetylene torches - Voltmeters, ohmmeters, and multimeters - Combustion analyzers - Soldering and brazing equipment - Pipe cutters - Gas detectors - Micron gauges - Tap and die sets Where Can HVAC Technicians Work? Whether they specialize in installing or servicing residential, commercial, or industrial equipment (or all three), HVAC technicians perform their work on-site in a wide variety of settings. Any building that utilizes climate-control equipment will see multiple visits by HVAC technicians over the course of its lifetime. Such buildings can include: Most HVAC technicians work for independent service contractors. However, employment can also be found with: - Direct-selling retail establishments (e.g., HVAC equipment dealers) - Repair shops for commercial or industrial equipment and machinery - Merchant wholesalers of heating equipment and supplies What is the Typical Salary of an HVAC Technician? The typical salary of an HVAC technician depends on many factors such as the type of HVAC job, employer location, level of experience, and whether or not a union is involved. When it comes to HVAC, salary is usually implemented in the form of hourly wages. Most HVAC technicians, regardless of their training, begin their careers at a relatively low rate of pay, but their wages rise gradually as they increase their skills, knowledge, and experience. So, what are some average HVAC salaries? Based on national estimates, yearly wages for HVAC and HVAC/R technicians break down this way: * - The bottom 10 percent earn $26,490 or less. - Median wages (50th percentile) are $42,530. - The top 10 percent earn $66,930 or more. The pay scales of similar employers, even within the same city, can sometimes vary dramatically. HVAC/R technicians that install and service commercial or industrial systems generally get paid the most. Unionized employers also tend to have much higher wages than non-unionized ones. However, you can expect a large chunk of your wages from any union job to go toward paying for union fees, insurance, and other benefits. Many HVAC technicians maximize their income by working longer hours during peak seasons (summer and/or winter). Additional wages can also come, in some cases, from earning commissions on the sale of new equipment or service contracts. Are There Any Downsides to Working in the HVAC Trade? For the people who turn it into a long-term career, HVAC is a lifestyle. Many HVAC technicians reap a great deal of personal satisfaction from their work. But, like any occupation, the field of heating, ventilation, and air conditioning has its upsides and downsides. It's not a career for everybody. You've got to be 100 percent committed in order to succeed. Here are some of the possible drawbacks of being an HVAC or HVAC/R technician: - Physical hazards—It can be grueling and hard on your body. Installing or servicing HVAC systems often requires heavy lifting, crouching, and kneeling—including in tight places like attics and crawl spaces. Other physical hazards also exist such as the potential for cuts, scrapes, electrical shock, burns, or muscle strain. And, although rare, working with refrigerants without appropriate safety equipment can result in injuries like frostbite, skin damage, or even blindness. - Uncomfortable working conditions—It frequently involves working outdoors in bad weather or extreme temperatures (hot and cold). - Mental fatigue—In addition to being physically demanding, HVAC work can also be mentally tiring. That's because you must remain alert and focused in order to solve problems and avoid injury or costly mistakes. Plus, no matter how experienced you are, there is always a lot to learn. HVAC technology changes quickly, so being an HVAC technician requires staying on top of the latest developments and adding that knowledge to what you've already learned about older systems that are still in use. That makes the job sometimes feel overwhelming. As HVAC technology improves, much of it is also becoming more and more technically challenging to work on. - Fluctuating work hours—Employment in the HVAC trade can sometimes be subject to seasonal fluctuations, particularly for technicians without much experience. It is common for many HVAC service technicians to work very long hours during peak seasons (summer and winter) followed by a reduction in hours (often less than full time) during the slower seasons. The peak seasons can be extra difficult if you have a family since working overtime and being on call at all hours (including weekends) can mean you're not able to spend as much quality time with those you care about. On the other hand, slow weeks are also inevitable, so you have to know how to account for the ups and downs in your personal finances. - Irritable customers—Since many service calls happen when customers are in distress over failing heating or cooling equipment during extreme weather, HVAC technicians sometimes must deal directly with people who are cranky and impatient. Tempers are heightened when a problem can't be fixed right away because a part needs to be ordered. - Delayed gratification—It takes time—usually at least five years—to develop the skills that enable you to begin making what are considered good wages in the HVAC industry. As a new technician, you should expect the starting pay to be lower than what you might be hoping for. You have to be willing to stick it out and learn everything you can in the meantime. What are the Good Things About Working in HVAC? The downsides of being an HVAC technician are balanced—and some might even say overcome—by the many positive attributes of the HVAC trade. Here are a few of them: - A sense of accomplishment—It can be intensely rewarding to fix problematic equipment or install new systems since it means that your hard work directly impacts the ability of people to feel comfortable in their environments. You have the chance to make someone's day if they were freezing (or sweating) prior to your arrival. Plus, looking back on a job well done often leads to a great feeling of personal satisfaction, regardless of how difficult it might have been. - Built-in exercise for mind and body—Despite the occupational hazards, being an HVAC technician can help you stay in shape—physically and mentally. - Variety—Every day is bound to be somewhat different. You won't be stuck in an office. Instead, you'll get to solve a variety of problems and meet new people. And the fast pace of busy times helps the work days pass quickly. - Pride—Because HVAC technicians can impact the well-being of people and the environment, they often feel a great sense of personal responsibility and pride of purpose. - Stimulation—Opportunities for learning something new happen on a frequent basis, which means boredom is rare. As the HVAC industry moves closer and closer toward full computer automation for heating, ventilation, and air conditioning systems, the chance to develop advanced skills and knowledge also increases. - Long-term stability—Once you've established yourself in the trade, there is great potential for making good money. And the job security can also be good. This is particularly true when you consider that HVAC skills are portable, and the work must be performed on location, which means that HVAC jobs are not subject to foreign outsourcing. What Personal Characteristics Do I Need for an HVAC Career? People who succeed as HVAC technicians possess key traits that enable them to handle the challenges of the occupation while taking advantage of the benefits. It's important to keep in mind that those who find long-term success and satisfaction in the HVAC trade generally possess the following characteristics: - A strong desire to help other people - A sense of craftsmanship and pride in their work (no cutting corners) - Physical and mental toughness - A courteous and respectful attitude - Pride in their appearance - An aptitude for mechanical, hands-on work - Strong interpersonal skills - Common sense - The ability and willingness to learn - Determination and a strong work ethic - An interest in the science behind HVAC technology - Good problem-solving abilities How Do You Become an HVAC Technician? There is more than one path to establishing a career in heating, ventilation, and air conditioning. When asking, "How do you become an HVAC technician?" it is important to consider that there are essentially four different ways to begin going about it: - Obtaining formal HVAC training from a high school program or post-secondary school - Entering a formal apprenticeship program for your training - Joining the Armed Forces and receiving military HVAC training - Pursuing an entry-level HVAC position without any formal training and hoping that you find an employer willing to teach you everything informally on the job (an increasingly rare circumstance) Each option has its advantages and disadvantages. However, most employers generally consider formal training a must before they will even consider you for an open position. Here are some things to consider about post-secondary training at an HVAC school: - Most HVAC training programs at technical and trade schools take between six months and two years to complete. - Programs that last a year or less generally award a diploma or certificate of completion. Those that last two years usually award an associate's degree. - Shorter certificate or diploma programs are often designed only to teach students the basics of one of the three main areas of HVAC/R: (1) residential heating and air conditioning, (2) light commercial heating and air conditioning, or (3) commercial refrigeration. - Most well-respected HVAC training schools offer programs that are accredited by at least one of the following agencies: HVAC Excellence, the National Center for Construction Education and Research (NCCER), or the Partnership for Air-Conditioning, Heating, and Refrigeration Accreditation (PAHRA). - Taking the right courses in high school can help you better prepare for HVAC school. These include subjects such as mechanical drawing, basic electronics, math, computer science, and applied physics and chemistry. It can also be beneficial to gain some basic knowledge of electrical and plumbing work. - HVAC schools are designed to give you a head start in the acquisition of your skills, but it will likely take a few years of working experience as an assistant HVAC technician after you graduate before anyone will begin to think of you as proficient. Another popular and advantageous way to receive formal training is through an apprenticeship. Here is what you should know about HVAC apprenticeships: - In general, apprenticeship opportunities pop up only periodically depending on the needs of employers, both unionized and non-unionized. - Apprenticeships are often a pathway to national certification in the HVAC industry, and they can even allow you to earn college credits. - In order to reap all of the benefits of a formal HVAC apprenticeship, you'll want to find an apprenticeship program that is registered with the Office of Apprenticeship, which is part of the U.S. Department of Labor's Employment and Training Administration. - Most apprenticeships allow you to earn a wage while you learn. And, if you are part of a registered apprenticeship program, your paycheck is guaranteed to increase over time. Unionized apprenticeships offer the additional advantages of working under the protection of a union contract and, usually, receiving insurance and pension benefits. - Apprenticeships usually last four to five years, and they include both classroom instruction and hands-on training on the job. After completing a five-year registered apprenticeship, you can become a journeyman in the HVAC field. - The organizations with the most HVAC apprenticeship opportunities include, in no particular order: (1) Air-Conditioning Contractors of America (ACCA), (2) Mechanical Contractors of America (MCAA), (3) Plumbing-Heating-Cooling Contractors (PHCC), (4) Sheet Metal Workers' International Association (SMWIA), (5) Associated Builders and Contractors (ABC), and (6) United Association of Journeymen and Apprentices of the Plumbing and Pipe Fitting Industry of the United States and Canada (UA). - Apprenticeship openings are often highly competitive. Plus, you must meet the minimum requirements of whatever apprenticeship program you are applying for. Organizations that offer or coordinate apprenticeships in HVAC often look for candidates that have at least a high school diploma (or equivalent), good math and reading skills, above-average manual dexterity and hand-eye coordination, strong mechanical aptitude, patience, dependability, the ability to get along well with other people, and a desire to do whatever it takes to learn the trade. As part of the application process, you may also be required to take aptitude tests and attend multiple interviews. - Completing an HVAC program at a technical college or trade school can sometimes give you a leg up on the competition when applying for a registered apprenticeship. Regardless of how you get your HVAC training, there are a number of other things to keep in mind about the HVAC trade and finding work in it. Consider the following points: - Many employers look for HVAC professionals with at least two to five years of on-the-job experience. Schooling alone, while beneficial, is often not enough—particularly for openings at larger companies. - In order to break into the trade and get the experience you need, you might have to spend a few years working for a smaller HVAC company at a lower wage than you might be expecting. The more you are willing to swallow your pride and do whatever is necessary to gain experience, the more opportunities you will have at the beginning of your career. - In many regions, you are more likely to land your first HVAC job during a peak season (summer or winter) since that is when demand for HVAC workers increases. - Employers want workers who will stick around for the long haul. That's why many of them prefer to hire people who've completed a formal HVAC program. Completing an HVAC education is a sign that you aren't just looking for a temporary job but, rather, have put your heart into making HVAC your career. - As you seek to gain experience early in your career, it's best to go for variety, if possible, in the type of HVAC work you do. Some people in the trade get "stuck" in just one particular area (such as installation) and find it difficult later on if they wish to move into a different HVAC specialty that they might enjoy better. - It pays to be assertive and proactive, especially when it comes to increasing your HVAC knowledge. You'll have better job security and advancement opportunities if you can become the "go-to" person for technical information and troubleshooting know-how about the equipment your employer sells and services. As you begin your career, it is essential to ask a lot of questions, pay close attention, and study, study, study. And, as you continue your career, the need to learn never stops. There will always be more to know. - Like in any other trade, the better you are at your job, the more quickly you can climb the HVAC career ladder. - It is impossible to learn everything you need to know in two years or less. So, although trade school can give you a great head start on the fundamentals, you should expect to begin your HVAC career in a "helper" or apprentice role as you continue to learn. It generally takes at least five years of on-the-job experience before you're ready to work on your own. - Since demand for HVAC technicians can sometimes be prone to seasonal fluctuations, it is important to learn how to manage your money in a way that allows you to ride out any downtimes comfortably. - Long-term success as an HVAC technician hinges a great deal upon your reputation. So it's important to develop a courteous and respectful attitude early on, to never cut corners, and to let the quality of work you perform speak for itself. - Persistence and enthusiasm are the biggest keys to landing your first job in HVAC. Employers look for people who are willing to commit to hard work. You can improve your chances of finding employment by always acting polite and professional, following up repeatedly with the people in charge of hiring, and demonstrating to them that you're not an arrogant "know-it-all" but are, instead, humble and ready to learn and take on all of the challenges inherent to HVAC work. How Do You Get HVAC Certification? When asking, "How do you get HVAC certification?" it is essential to understand that some certifications are required while most others are voluntary. Even voluntary certifications, however, can help you advance in your HVAC career since most employers like to see official acknowledgment of your competencies. But knowing how to obtain HVAC certification is just one aspect of this issue. You also need to understand what it all means. Here are the most important things to remember: - Regardless of which area of HVAC/R you choose to work in, you will be required to obtain at least one type of certification from the U.S. Environmental Protection Agency (EPA). Section 608 of the Clean Air Act of 1990 requires anyone who services equipment that uses specific refrigerants to take a test to prove that they know how to properly handle, recycle, and dispose of materials that can damage the ozone layer. - EPA Section 608 certification is broken down into four types depending on the kind of equipment you will be working with: (1) Type I for small appliances, (2) Type II for very high-pressure appliances, (3) Type III for low-pressure appliances, and (4) Universal for all types of HVAC/R equipment. - HVAC students enrolled in formal training are often required to take the EPA Section 608 Universal certification test as part of their program. - Although not required by the EPA, R-410A certification covers an especially dangerous type of refrigerant in greater detail than what is found in the EPA Section 608 test. R-410A refrigerant is used at a much higher vapor pressure than other refrigerants and, therefore, requires different tools, equipment, and safety standards. R-410A is increasingly replacing some of the older ozone-damaging refrigerants that are being phased out. - Other types of professional HVAC certifications are designed to verify the real-world skills and working knowledge of HVAC and HVAC/R technicians who've had at least a year or two of on-the-job experience. Certification is offered by independent organizations in many different specialty areas such as residential and commercial air conditioning, heat pump service and installation, gas heat, electric heat, oil furnaces, hydronics, air distribution, and commercial refrigeration. - The two most recognized providers of professional-level certifications in the American HVAC/R industry are (1) HVAC Excellence and (2) North American Technician Excellence (NATE). Obtaining certification from these organizations involves meeting any necessary prerequisites and then passing written exams. You can also obtain your EPA Section 608 certification through such providers. - A certificate of completion (or diploma) from a formal HVAC training school is NOT the same thing as professional-level certification from organizations like HVAC Excellence or NATE. How Long Do HVAC Classes Take? Formal HVAC programs at technical colleges and trade schools vary in length. A lot depends on the type of credential you're after and how in-depth you want your schooling to be. So, how long do HVAC classes take? HVAC programs that award certificates or diplomas typically last one year or less. Some take as little as about 18 weeks to complete. With these shorter programs, you often must choose to study just one of three specific areas: (1) light commercial air conditioning and heating, (2) residential air conditioning and heating, or (3) commercial refrigeration. Associate degree programs in HVAC/R technology, on the other hand, are designed to last two years and are often more comprehensive. How Much Does HVAC School Cost? The cost of HVAC schooling varies significantly depending on where you go to school and whether you choose to pursue a certificate or associate degree. So, how much does HVAC school cost? Basic program costs, including tuition, can range from as little as $2,000 or less to as much as $35,000 or more. The more expensive programs sometimes have a wider range of HVAC equipment and tools in their labs for better hands-on learning, although it is best to tour any school you are considering and check out their facilities to make sure you'll be getting good value for your money. Books and supplies are sometimes an extra expense and can cost as much as $4,500 depending on the program. Financial aid in the form of loans and grants are frequently available from the federal government for those who qualify. And some states offer financial assistance through their own retraining programs for unemployed workers. What Can I Expect to Learn in My HVAC Training? HVAC schools are set up to teach the fundamentals of what you need to know to begin working as an HVAC technician at the entry level. Ultimately, HVAC involves learning at least the basics of about five different trades competently, including electrical work, plumbing, welding, pipefitting, and sheet metal. HVAC education programs vary in their curriculum, but the ones that are accredited by an industry-recognized organization generally share a number of common elements. Three of the biggest accrediting bodies for HVAC training are (1) HVAC Excellence, (2) the Partnership for Air-Conditioning, Heating, and Refrigeration Accreditation, and (3) the National Center for Construction Education and Research. Most HVAC programs combine classroom study with hands-on training. Depending on the school and program you choose, you can expect the curriculum to include subjects such as: - Electric, gas, and oil heat - Residential and light commercial air conditioning - Heat pumps - Basic electronics - Soldering and brazing - Venting and duct systems - Interpreting mechanical drawings and diagrams - Components of HVAC systems - General HVAC theory - Airflow and indoor air quality - Heating fuels - Refrigerant types and refrigerant oils - Installation and service - Troubleshooting and problem solving - Building codes and requirements - Tools and test instruments - Safety precautions and practices Many accredited HVAC/R programs use the Industry Competency Exam (ICE) as an exit exam for students. So, depending on the program you choose, you might have to take one or more of the three different tests that are available as part of the ICE. The different testing areas are: (1) residential air conditioning and heating, (2) light commercial air conditioning and heating, and (3) commercial refrigeration. As an HVAC Technician, Will I Need to Be Licensed? The answer depends on where you intend to work. Licensing requirements for HVAC technicians vary greatly depending on the state or locality they work in and whether they intend to be their own boss. And some states don't have any legal requirements. In the ones that do, however, a state exam often must be passed. Plus, some states require you to have completed the equivalent of an apprenticeship program or two to five years of on-the-job HVAC experience before you can apply for a license to legally work on your own. The content of state licensing exams also varies significantly. In some states, for example, emphasis might be placed on having an extensive knowledge of electrical codes, but, in other states, the focus might be more on HVAC-specific knowledge. Just remember: Although your state might not require you to obtain an official license in order to perform HVAC work, the federal government will still require you to be certified in the proper handling of refrigerants. The EPA Section 608 certification exam is a written test and is administered by a variety of organizations that have been approved by the U.S. Environmental Protection Agency, including unions, building groups, trade schools, and contractor associations. How Promising is the HVAC Job Outlook? The HVAC job outlook is expected to be excellent for the foreseeable future. In America, employment of HVAC technicians is projected to increase by 28 percent between 2008 and 2018, which is much faster than average. ** The growing demand for HVAC and HVAC/R technicians can be attributed to a number of factors. As the nation's population grows, so does the number of buildings (residential, commercial, and industrial) that need to be fitted with climate-control systems. And the increasing complexity of new HVAC systems means an increasing possibility of their malfunction and need for servicing, which then requires skilled technicians. In addition, the growing focus on reducing energy consumption and improving indoor air quality means that more HVAC technicians are needed for analyzing the efficiency of existing systems and replacing old polluting ones with new, more efficient models. Although experienced HVAC technicians can expect excellent job prospects, the odds of new techs landing employment are best for those who have had training through a formal apprenticeship program, through an accredited program from an HVAC school, or both. You can also increase your chances of landing a good job by becoming an expert at increasing energy efficiency and gaining a solid understanding of complex computer-controlled HVAC systems such as those found in modern high-rises. What Kind of Advancement Opportunities Exist in the Heating, Ventilation, and Air Conditioning (HVAC) Industry? The HVAC industry is incredibly diverse. Most HVAC technicians begin their careers in the residential and light commercial sectors of the field. Advancement usually comes in the form of higher wages or supervisory positions. But, with advanced knowledge, a lot of experience, and the right mindset, new opportunities can arise for entering other areas of the industry, which offer new challenges. Commercial refrigeration, for instance, is an area of high demand that requires workers with a lot of patience and specialized skills. With the right training and education, HVAC/R technicians can also specialize in areas such as solar-powered or geothermal heating and cooling, retrofitting, system testing and balancing, efficiency evaluations, or building operations with advanced computer controls. In addition, some technicians move into teaching, HVAC sales and marketing, or managing their own contracting businesses. It is even possible to earn a bachelor's degree in HVAC engineering technology. Such a degree could allow you to become an HVAC engineer or HVAC technologist and design new systems and controls for the manufacturing, commercial, institutional, or industrial sectors. How Do I Get Started? One of the best ways to discover whether HVAC might be a good field for you is to talk with a few experienced HVAC technicians. See if you can schedule a time to ride along with them on some service or installation calls. Or, if you're ready to get moving now, then check out our list of HVAC schools. You could soon have the repeated, satisfying experience of standing back and admiring a job well done.
/* Copyright (c) 2010-2016, Mathieu Labbe - IntRoLab - Universite de Sherbrooke All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted 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 the Universite de Sherbrooke nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. 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. */ #include "rtabmap/core/Camera.h" #include <rtabmap/utilite/UEventsManager.h> #include <rtabmap/utilite/UConversion.h> #include <rtabmap/utilite/UStl.h> #include <rtabmap/utilite/UConversion.h> #include <rtabmap/utilite/UFile.h> #include <rtabmap/utilite/UDirectory.h> #include <rtabmap/utilite/UTimer.h> #include <opencv2/imgproc/imgproc.hpp> #include <iostream> #include <cmath> namespace rtabmap { Camera::Camera(float imageRate, const Transform & localTransform) : _imageRate(imageRate), _localTransform(localTransform*CameraModel::opticalRotation()), _targetImageSize(0,0), _frameRateTimer(new UTimer()), _seq(0) { } Camera::~Camera() { UDEBUG(""); delete _frameRateTimer; UDEBUG(""); } void Camera::resetTimer() { _frameRateTimer->start(); } bool Camera::initFromFile(const std::string & calibrationPath) { return init(UDirectory::getDir(calibrationPath), uSplit(UFile::getName(calibrationPath), '.').front()); } SensorData Camera::takeImage(CameraInfo * info) { bool warnFrameRateTooHigh = false; float actualFrameRate = 0; float imageRate = _imageRate; if(imageRate>0) { int sleepTime = (1000.0f/imageRate - 1000.0f*_frameRateTimer->getElapsedTime()); if(sleepTime > 2) { uSleep(sleepTime-2); } else if(sleepTime < 0) { warnFrameRateTooHigh = true; actualFrameRate = 1.0/(_frameRateTimer->getElapsedTime()); } // Add precision at the cost of a small overhead while(_frameRateTimer->getElapsedTime() < 1.0/double(imageRate)-0.000001) { // } double slept = _frameRateTimer->getElapsedTime(); _frameRateTimer->start(); UDEBUG("slept=%fs vs target=%fs", slept, 1.0/double(imageRate)); } UTimer timer; SensorData data = this->captureImage(info); double captureTime = timer.ticks(); if(warnFrameRateTooHigh) { UWARN("Camera: Cannot reach target image rate %f Hz, current rate is %f Hz and capture time = %f s.", imageRate, actualFrameRate, captureTime); } else { UDEBUG("Time capturing image = %fs", captureTime); } if(info) { info->id = data.id(); info->stamp = data.stamp(); info->timeCapture = captureTime; } return data; } } // namespace rtabmap
Saturday 19 August 2017 Theresa May to visit new US president Donald Trump next week UK Prime Minister Theresa May. Photo: PA UK Prime Minister Theresa May. Photo: PA Newsdesk Newsdesk Theresa May will be the first foreign leader to visit Donald Trump when she travels to the United States next week, the White House has confirmed. The visit represents a coup for the UK Prime Minister after an uncertain start to relations with the president following his shock election in November. The trip will follow a weekend in which hundreds of thousands of people in the US, UK and around the world joined women's marches to protest against the controversial tycoon's presidency. It was unclear whether Mrs May would be meeting Mr Trump on Thursday or Friday after White House press secretary Sean Spicer told a news conference in the West Wing: "The president will welcome his first foreign leader this Thursday when the United Kingdom's Theresa May will come to Washington on Friday." On Saturday, massive "pink pussy hat" marches in Washington DC and London highlighted Mr Trump's highly controversial past statements about women. At least 500,000 people gathered for a rally outside the US Capitol building while organisers said an estimated 100,000 people descended on central London, as similar events were staged in Edinburgh, Bristol and cities across the US. Mrs May has promised to be "very frank" during talks, making clear she has found some of the president's comments "unacceptable", including his suggestion that his fame allowed him to "do anything" to women, such as "grabbing them by the pussy". And she has distanced herself from suggestions the pair could rekindle the Reagan-Thatcher bond of the 1980s, saying she does not want to emulate models from the past. The premier is "confident" of striking a trade agreement with Mr Trump despite his "America first" strategy sparking concerns in the UK about his willingness to to a deal. But Mrs May has suggested the UK and US could reduce barriers to trade before being able to sign a formal agreement after Brexit, with a new passporting system to govern transatlantic bank trade reportedly being considered. Mrs May is likely to emphasise the importance of Nato and the EU for collective security and defence after Mr Trump again worried some observers about his commitment to both organisations. The Telegraph reported that the pair could agree a statement emphasising their commitment to spending at least 2pc of GDP on defence and urging other Nato countries to do so, as well as promising action against Islamic State terrorists. It is likely that Mrs May's trip to the US will be followed by a state visit by Mr Trump to Britain, which would include an audience with the Queen and the pomp and pageantry of which the president seems so fond. Press Association Editors Choice Also in World News
// misc functions for geometric calculation // /* Copyright © 2021 Doug Jones Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ #ifndef GEOMETRY_H #define GEOMETRY_H // finds the point of intersection between two line sements char segSegInt(double* p11, double* p12, double* p21, double* p22, double* p, double* sp=NULL, double* tp=NULL); // finds the point of intersection between two line sements float segAxisInt(float x1, float y1, float x2, float y2, float x); // returns the signed area of a triangle // positive if the points are listed in clockwise order double triArea(double x1, double y1, double x2, double y2, double x3, double y3); // returns square of distance between a point and line in 2D double lineSegDistSq(double x, double y, double x1, double y1, double x2, double y2); // returns square of distance between a point and line in 3D double lineSegDistSq(double x, double y, double z, double x1, double y1, double z1, double x2, double y2, double z2); // returns the signed area of a triangle inline double triArea(const double* p1, const double* p2, const double* p3) { return triArea(p1[0],p1[1],p2[0],p2[1],p3[0],p3[1]); } // returns an estimated square root // uses a single interation of newtons method inline float sqrtIter(float est, float sq) { return est<=0 ? sqrt(sq) : .5*(est+sq/est); } #endif
1 October 2009 A picnic basket linked to Agatha Christie, soil samples collected before the Channel Tunnel was built and a radioactive rock used in a Nobel Prize-winning experiment feature in a provocative new exhibition at UCL. Disposal?, which opens on Monday 19 October 2009, invites you to comment on the most challenging question faced by museums today: What should we collect and hold on to and what should we get rid of? The exhibition includes objects which would not normally be on display, such as a crusher which can apply the weight of 150 hippos, a collection of plastic dinosaurs and slides containing microscopic fossils. Among these are five objects earmarked for disposal that the public can vote on. This is one of several ways in which people can contribute their views on the collections: on what they think is important, what should be collected and what they feel would be better off elsewhere. Featured pieces will include: - A picnic basket belonging to Agatha Christie’s husband’s second wife Barbara Parker. The husband, Max Mallowan, was a famous archaeologist. Parker donated the hamper and its contents to UCL. The contents included Minoan pottery, a key, a doorknob, beads and a copy of The Times. - Soil samples collected before the building of the Channel Tunnel. Archaeologists take such samples to see if a site contains archaeological material. These samples were stored at UCL soon after they were taken, but have never been analysed. - A radioactive mineral sample which emits alpha particles, but which is historically important. William Ramsay (1852–1916), a former head of UCL Chemistry, used it to discover helium in one of a series of Nobel Prize-winning experiments. The exhibition will also host two events: - ‘Fight at the Museum: Rescue My Object!’ on Tuesday 20 October, 6.30pm – 9pm, will see experts battle to convince an audience to save their favourite object housed in different collections at UCL. - ‘Treasured? Hunt’ on Wednesday 28 October, 6pm – 9pm, will invite people to seek out intriguing objects and specimens in store and decide for themselves just how treasured objects should be. Disposing of objects by museums is controversial, conjuring up emotive images of collections thrown into skips or valuable artworks lost to the nation through private sales. With ever-decreasing resources and ever-expanding collections, museums are under serious pressure. Collections are fast becoming unsustainable – ethical but tough decision-making is essential to museums’ survival. In a research-led university such as UCL, collections have to keep pace with cutting-edge innovations and new discoveries. While active collecting always goes on, responsible and regular disposal is essential for collections to stay manageable. Subhadra Das, UCL Collections Reviewer, says: “UCL Museums & Collections hold thousands of fascinating and historically important objects which are used for teaching and research. Like all museums, they also contain objects whose roles and use are unclear or problematic. Some objects may no longer be useful, some are too big or have become damaged and some should never have been collected. In the past such things have sometimes been disposed of thoughtlessly – by putting them in the skip. This exhibition is about thoughtful disposal.” The exhibition runs from Monday 19 October to Saturday 31 October 2009, is open to the public and is free of charge. Opening hours are Monday-Friday 10am-7pm, Saturday 10am-6pm. The exhibition is in the Chadwick Building, UCL, Gower Street, London WC1E 6BT. Media contact: Jenny Gimpel Image: A hippopotamus skull
#include <bits/stdc++.h> using namespace std; int main(int argc, char **argv) { mt19937 rng(chrono::steady_clock::now().time_since_epoch().count()); int n = 100, in = 10, out=10; if (argc > 1) { n = atoi( argv[1] ); } if (argc > 2) { in = atoi( argv[2] ); } if (argc > 3) { out = atoi( argv[3] ); } if (in > n || out > n) { cerr << "k cannot be greater than n\n"; return 0; } set<array<int, 2>> E; vector<int> perm(n); for(int i=0; i<n; ++i) perm[i]=i; //shuffle(perm.begin(), perm.end(), rng); for(int i=0; i<n; ++i) { for(int j=0; j<in; ++j) { int x = uniform_int_distribution<int>(0, n)(rng); if (E.find({x, i}) == E.end()) E.insert({x, i}); else j--; } for(int j=0; j<out; ++j) { int x = uniform_int_distribution<int>(0, n)(rng); if (E.find({i, x}) == E.end()) E.insert({i, x}); else j--; } } cout << n << " " << E.size() << endl; for(auto it : E) cout << perm[it[0]] << " " << perm[it[1]] << endl; //for(auto it : E) cout << it[0] << " " << it[1] << endl; }